Skip to content

Commit ee4538c

Browse files
author
krgoyal krgoyal
committed
Remove guava dependencies
1 parent 132bd43 commit ee4538c

File tree

1 file changed

+6
-3
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/usermanagement

1 file changed

+6
-3
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/usermanagement/ConcurrentUsersManager.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.usermanagement;
22

3-
import com.google.common.collect.ImmutableSet;
3+
import java.util.Arrays;
4+
import java.util.Collections;
5+
import java.util.HashSet;
46
import java.util.Map;
57
import java.util.Set;
68
import java.util.concurrent.ConcurrentHashMap;
@@ -37,8 +39,9 @@ class ConcurrentUsersManager extends AbstractCSUsersManager {
3739
private static final Logger LOG =
3840
LoggerFactory.getLogger(ConcurrentUsersManager.class);
3941

40-
private final Set<SchedulingMode> schedulingModes =
41-
ImmutableSet.of(SchedulingMode.IGNORE_PARTITION_EXCLUSIVITY, SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY);
42+
private static final Set<SchedulingMode> schedulingModes = Collections.unmodifiableSet(
43+
new HashSet<>(Arrays.asList(SchedulingMode.IGNORE_PARTITION_EXCLUSIVITY, SchedulingMode.RESPECT_PARTITION_EXCLUSIVITY))
44+
);
4245

4346
// TODO - share threads in a global pool and enable a thread to compute user limits of multiple queues
4447
// If scheduler has too many queues, its not ideal to start a thread per queue

0 commit comments

Comments
 (0)