YARN-6112. UpdateCallDuration is calculated only when debug logging is enabled. (Yufei Gu via kasha)
This commit is contained in:
parent
5fb723bb77
commit
9b85053583
|
@ -50,9 +50,6 @@ public class FSOpDurations implements MetricsSource {
|
||||||
@Metric("Duration for a update thread run")
|
@Metric("Duration for a update thread run")
|
||||||
MutableRate updateThreadRun;
|
MutableRate updateThreadRun;
|
||||||
|
|
||||||
@Metric("Duration for an update call")
|
|
||||||
MutableRate updateCall;
|
|
||||||
|
|
||||||
@Metric("Duration for a preempt call")
|
@Metric("Duration for a preempt call")
|
||||||
MutableRate preemptCall;
|
MutableRate preemptCall;
|
||||||
|
|
||||||
|
@ -87,7 +84,6 @@ public class FSOpDurations implements MetricsSource {
|
||||||
continuousSchedulingRun.setExtended(isExtended);
|
continuousSchedulingRun.setExtended(isExtended);
|
||||||
nodeUpdateCall.setExtended(isExtended);
|
nodeUpdateCall.setExtended(isExtended);
|
||||||
updateThreadRun.setExtended(isExtended);
|
updateThreadRun.setExtended(isExtended);
|
||||||
updateCall.setExtended(isExtended);
|
|
||||||
preemptCall.setExtended(isExtended);
|
preemptCall.setExtended(isExtended);
|
||||||
|
|
||||||
INSTANCE.isExtended = isExtended;
|
INSTANCE.isExtended = isExtended;
|
||||||
|
@ -110,10 +106,6 @@ public class FSOpDurations implements MetricsSource {
|
||||||
updateThreadRun.add(value);
|
updateThreadRun.add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addUpdateCallDuration(long value) {
|
|
||||||
updateCall.add(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addPreemptCallDuration(long value) {
|
public void addPreemptCallDuration(long value) {
|
||||||
preemptCall.add(value);
|
preemptCall.add(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -350,7 +350,6 @@ public class FairScheduler extends
|
||||||
protected void update() {
|
protected void update() {
|
||||||
try {
|
try {
|
||||||
writeLock.lock();
|
writeLock.lock();
|
||||||
long start = getClock().getTime();
|
|
||||||
|
|
||||||
FSQueue rootQueue = queueMgr.getRootQueue();
|
FSQueue rootQueue = queueMgr.getRootQueue();
|
||||||
|
|
||||||
|
@ -373,9 +372,6 @@ public class FairScheduler extends
|
||||||
rootMetrics.getAvailableVirtualCores()) +
|
rootMetrics.getAvailableVirtualCores()) +
|
||||||
" Demand: " + rootQueue.getDemand());
|
" Demand: " + rootQueue.getDemand());
|
||||||
}
|
}
|
||||||
|
|
||||||
long duration = getClock().getTime() - start;
|
|
||||||
fsOpDurations.addUpdateCallDuration(duration);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
writeLock.unlock();
|
writeLock.unlock();
|
||||||
|
|
Loading…
Reference in New Issue