YARN-3181. FairScheduler: Fix up outdated findbugs issues. (kasha)
This commit is contained in:
parent
58cb9f5293
commit
c2b185def8
@ -277,6 +277,8 @@ Release 2.7.0 - UNRELEASED
|
||||
YARN-2079. Recover NonAggregatingLogHandler state upon nodemanager
|
||||
restart. (Jason Lowe via junping_du)
|
||||
|
||||
YARN-3181. FairScheduler: Fix up outdated findbugs issues. (kasha)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
YARN-2990. FairScheduler's delay-scheduling always waits for node-local and
|
||||
|
@ -142,22 +142,12 @@
|
||||
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationFileLoaderService" />
|
||||
<Field name="allocFile" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<!-- Inconsistent sync warning - minimumAllocation is only initialized once and never changed -->
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler" />
|
||||
<Field name="minimumAllocation" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSSchedulerNode" />
|
||||
<Method name="reserveResource" />
|
||||
<Bug pattern="BC_UNCONFIRMED_CAST" />
|
||||
</Match>
|
||||
<!-- Inconsistent sync warning - reinitialize read from other queue does not need sync-->
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue" />
|
||||
@ -213,18 +203,6 @@
|
||||
<Field name="scheduleAsynchronously" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<!-- Inconsistent sync warning - updateInterval is only initialized once and never changed -->
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler" />
|
||||
<Field name="updateInterval" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<!-- Inconsistent sync warning - callDurationMetrics is only initialized once and never changed -->
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler" />
|
||||
<Field name="fsOpDurations" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
|
||||
<!-- Inconsistent sync warning - numRetries is only initialized once and never changed -->
|
||||
<Match>
|
||||
@ -424,11 +402,6 @@
|
||||
<Field name="queue" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler" />
|
||||
<Field name="allocConf" />
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode" />
|
||||
<Field name="numContainers" />
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
@ThreadSafe
|
||||
public class AllocationConfiguration extends ReservationSchedulerConfiguration {
|
||||
private static final AccessControlList EVERYBODY_ACL = new AccessControlList("*");
|
||||
private static final AccessControlList NOBODY_ACL = new AccessControlList(" ");
|
||||
@ -204,13 +207,17 @@ public float getFairSharePreemptionThreshold(String queueName) {
|
||||
}
|
||||
|
||||
public ResourceWeights getQueueWeight(String queue) {
|
||||
synchronized (queueWeights) {
|
||||
ResourceWeights weight = queueWeights.get(queue);
|
||||
return (weight == null) ? ResourceWeights.NEUTRAL : weight;
|
||||
}
|
||||
}
|
||||
|
||||
public void setQueueWeight(String queue, ResourceWeights weight) {
|
||||
synchronized (queueWeights) {
|
||||
queueWeights.put(queue, weight);
|
||||
}
|
||||
}
|
||||
|
||||
public int getUserMaxApps(String user) {
|
||||
Integer maxApps = userMaxApps.get(user);
|
||||
|
@ -201,7 +201,7 @@ public synchronized void setReloadListener(Listener reloadListener) {
|
||||
* @throws ParserConfigurationException if XML parser is misconfigured.
|
||||
* @throws SAXException if config file is malformed.
|
||||
*/
|
||||
public synchronized void reloadAllocations() throws IOException,
|
||||
public void reloadAllocations() throws IOException,
|
||||
ParserConfigurationException, SAXException, AllocationConfigurationException {
|
||||
if (allocFile == null) {
|
||||
return;
|
||||
|
@ -31,6 +31,8 @@
|
||||
import static org.apache.hadoop.metrics2.lib.Interns.info;
|
||||
import org.apache.hadoop.metrics2.lib.MutableRate;
|
||||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* Class to capture the performance metrics of FairScheduler.
|
||||
* This should be a singleton.
|
||||
@ -38,6 +40,7 @@
|
||||
@InterfaceAudience.Private
|
||||
@InterfaceStability.Unstable
|
||||
@Metrics(context="fairscheduler-op-durations")
|
||||
@ThreadSafe
|
||||
public class FSOpDurations implements MetricsSource {
|
||||
|
||||
@Metric("Duration for a continuous scheduling run")
|
||||
|
Loading…
Reference in New Issue
Block a user