YARN-6381. FSAppAttempt has several variables that should be final

(Contributed by Ameet Zaveri via Daniel Templeton)
This commit is contained in:
Daniel Templeton 2017-04-05 16:06:00 -07:00
parent 539ef5aa2e
commit a2c57bb70d
1 changed files with 6 additions and 6 deletions

View File

@ -74,11 +74,11 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
private static final DefaultResourceCalculator RESOURCE_CALCULATOR
= new DefaultResourceCalculator();
private long startTime;
private Priority appPriority;
private ResourceWeights resourceWeights;
private final long startTime;
private final Priority appPriority;
private final ResourceWeights resourceWeights;
private Resource demand = Resources.createResource(0);
private FairScheduler scheduler;
private final FairScheduler scheduler;
private FSQueue fsQueue;
private Resource fairShare = Resources.createResource(0, 0);
@ -96,9 +96,9 @@ public class FSAppAttempt extends SchedulerApplicationAttempt
// Used to record node reservation by an app.
// Key = RackName, Value = Set of Nodes reserved by app on rack
private Map<String, Set<String>> reservations = new HashMap<>();
private final Map<String, Set<String>> reservations = new HashMap<>();
private List<FSSchedulerNode> blacklistNodeIds = new ArrayList<>();
private final List<FSSchedulerNode> blacklistNodeIds = new ArrayList<>();
/**
* Delay scheduling: We often want to prioritize scheduling of node-local
* containers over rack-local or off-switch containers. To achieve this