Revert "YARN-3181. FairScheduler: Fix up outdated findbugs issues. (kasha)"
This reverts commit c2b185def8
.
This commit is contained in:
parent
d8846707c5
commit
32b4330456
|
@ -320,8 +320,6 @@ Release 2.7.0 - UNRELEASED
|
||||||
YARN-2079. Recover NonAggregatingLogHandler state upon nodemanager
|
YARN-2079. Recover NonAggregatingLogHandler state upon nodemanager
|
||||||
restart. (Jason Lowe via junping_du)
|
restart. (Jason Lowe via junping_du)
|
||||||
|
|
||||||
YARN-3181. FairScheduler: Fix up outdated findbugs issues. (kasha)
|
|
||||||
|
|
||||||
YARN-3124. Fixed CS LeafQueue/ParentQueue to use QueueCapacities to track
|
YARN-3124. Fixed CS LeafQueue/ParentQueue to use QueueCapacities to track
|
||||||
capacities-by-label. (Wangda Tan via jianhe)
|
capacities-by-label. (Wangda Tan via jianhe)
|
||||||
|
|
||||||
|
|
|
@ -152,12 +152,22 @@
|
||||||
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService" />
|
<Class name="org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.LogAggregationService" />
|
||||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||||
</Match>
|
</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 -->
|
<!-- Inconsistent sync warning - minimumAllocation is only initialized once and never changed -->
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler" />
|
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler" />
|
||||||
<Field name="minimumAllocation" />
|
<Field name="minimumAllocation" />
|
||||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||||
</Match>
|
</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-->
|
<!-- Inconsistent sync warning - reinitialize read from other queue does not need sync-->
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue" />
|
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue" />
|
||||||
|
@ -215,6 +225,18 @@
|
||||||
<Field name="scheduleAsynchronously" />
|
<Field name="scheduleAsynchronously" />
|
||||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||||
</Match>
|
</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 -->
|
<!-- Inconsistent sync warning - numRetries is only initialized once and never changed -->
|
||||||
<Match>
|
<Match>
|
||||||
|
@ -414,6 +436,11 @@
|
||||||
<Field name="queue" />
|
<Field name="queue" />
|
||||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||||
</Match>
|
</Match>
|
||||||
|
<Match>
|
||||||
|
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler" />
|
||||||
|
<Field name="allocConf" />
|
||||||
|
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||||
|
</Match>
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode" />
|
<Class name="org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode" />
|
||||||
<Field name="numContainers" />
|
<Field name="numContainers" />
|
||||||
|
|
|
@ -33,9 +33,6 @@ import org.apache.hadoop.yarn.util.resource.Resources;
|
||||||
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
|
||||||
import javax.annotation.concurrent.ThreadSafe;
|
|
||||||
|
|
||||||
@ThreadSafe
|
|
||||||
public class AllocationConfiguration extends ReservationSchedulerConfiguration {
|
public class AllocationConfiguration extends ReservationSchedulerConfiguration {
|
||||||
private static final AccessControlList EVERYBODY_ACL = new AccessControlList("*");
|
private static final AccessControlList EVERYBODY_ACL = new AccessControlList("*");
|
||||||
private static final AccessControlList NOBODY_ACL = new AccessControlList(" ");
|
private static final AccessControlList NOBODY_ACL = new AccessControlList(" ");
|
||||||
|
@ -207,16 +204,12 @@ public class AllocationConfiguration extends ReservationSchedulerConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourceWeights getQueueWeight(String queue) {
|
public ResourceWeights getQueueWeight(String queue) {
|
||||||
synchronized (queueWeights) {
|
ResourceWeights weight = queueWeights.get(queue);
|
||||||
ResourceWeights weight = queueWeights.get(queue);
|
return (weight == null) ? ResourceWeights.NEUTRAL : weight;
|
||||||
return (weight == null) ? ResourceWeights.NEUTRAL : weight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQueueWeight(String queue, ResourceWeights weight) {
|
public void setQueueWeight(String queue, ResourceWeights weight) {
|
||||||
synchronized (queueWeights) {
|
queueWeights.put(queue, weight);
|
||||||
queueWeights.put(queue, weight);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUserMaxApps(String user) {
|
public int getUserMaxApps(String user) {
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class AllocationFileLoaderService extends AbstractService {
|
||||||
* @throws ParserConfigurationException if XML parser is misconfigured.
|
* @throws ParserConfigurationException if XML parser is misconfigured.
|
||||||
* @throws SAXException if config file is malformed.
|
* @throws SAXException if config file is malformed.
|
||||||
*/
|
*/
|
||||||
public void reloadAllocations() throws IOException,
|
public synchronized void reloadAllocations() throws IOException,
|
||||||
ParserConfigurationException, SAXException, AllocationConfigurationException {
|
ParserConfigurationException, SAXException, AllocationConfigurationException {
|
||||||
if (allocFile == null) {
|
if (allocFile == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -31,8 +31,6 @@ import org.apache.hadoop.metrics2.lib.MetricsRegistry;
|
||||||
import static org.apache.hadoop.metrics2.lib.Interns.info;
|
import static org.apache.hadoop.metrics2.lib.Interns.info;
|
||||||
import org.apache.hadoop.metrics2.lib.MutableRate;
|
import org.apache.hadoop.metrics2.lib.MutableRate;
|
||||||
|
|
||||||
import javax.annotation.concurrent.ThreadSafe;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to capture the performance metrics of FairScheduler.
|
* Class to capture the performance metrics of FairScheduler.
|
||||||
* This should be a singleton.
|
* This should be a singleton.
|
||||||
|
@ -40,7 +38,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
@InterfaceStability.Unstable
|
@InterfaceStability.Unstable
|
||||||
@Metrics(context="fairscheduler-op-durations")
|
@Metrics(context="fairscheduler-op-durations")
|
||||||
@ThreadSafe
|
|
||||||
public class FSOpDurations implements MetricsSource {
|
public class FSOpDurations implements MetricsSource {
|
||||||
|
|
||||||
@Metric("Duration for a continuous scheduling run")
|
@Metric("Duration for a continuous scheduling run")
|
||||||
|
|
Loading…
Reference in New Issue