|
@@ -153,6 +153,7 @@ public class FairScheduler extends
|
|
|
private final int UPDATE_DEBUG_FREQUENCY = 25;
|
|
|
private int updatesToSkipForDebug = UPDATE_DEBUG_FREQUENCY;
|
|
|
|
|
|
+ @Deprecated
|
|
|
@VisibleForTesting
|
|
|
Thread schedulingThread;
|
|
|
|
|
@@ -167,15 +168,19 @@ public class FairScheduler extends
|
|
|
|
|
|
protected boolean sizeBasedWeight; // Give larger weights to larger jobs
|
|
|
// Continuous Scheduling enabled or not
|
|
|
+ @Deprecated
|
|
|
protected boolean continuousSchedulingEnabled;
|
|
|
// Sleep time for each pass in continuous scheduling
|
|
|
+ @Deprecated
|
|
|
protected volatile int continuousSchedulingSleepMs;
|
|
|
// Node available resource comparator
|
|
|
private Comparator<FSSchedulerNode> nodeAvailableResourceComparator =
|
|
|
new NodeAvailableResourceComparator();
|
|
|
protected double nodeLocalityThreshold; // Cluster threshold for node locality
|
|
|
protected double rackLocalityThreshold; // Cluster threshold for rack locality
|
|
|
+ @Deprecated
|
|
|
protected long nodeLocalityDelayMs; // Delay for node locality
|
|
|
+ @Deprecated
|
|
|
protected long rackLocalityDelayMs; // Delay for rack locality
|
|
|
protected boolean assignMultiple; // Allocate multiple containers per
|
|
|
// heartbeat
|
|
@@ -284,6 +289,7 @@ public class FairScheduler extends
|
|
|
* Thread which attempts scheduling resources continuously,
|
|
|
* asynchronous to the node heartbeats.
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
private class ContinuousSchedulingThread extends Thread {
|
|
|
|
|
|
@Override
|
|
@@ -389,18 +395,44 @@ public class FairScheduler extends
|
|
|
return rackLocalityThreshold;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Delay in milliseconds for locality fallback node to rack.
|
|
|
+ * @deprecated linked to {@link #isContinuousSchedulingEnabled} deprecation
|
|
|
+ * @return delay in ms
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
public long getNodeLocalityDelayMs() {
|
|
|
return nodeLocalityDelayMs;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Delay in milliseconds for locality fallback rack to other.
|
|
|
+ * @deprecated linked to {@link #isContinuousSchedulingEnabled} deprecation
|
|
|
+ * @return delay in ms
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
public long getRackLocalityDelayMs() {
|
|
|
return rackLocalityDelayMs;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Whether continuous scheduling is turned on.
|
|
|
+ * @deprecated Continuous scheduling should not be turned ON. It is
|
|
|
+ * deprecated because it can cause scheduler slowness due to locking issues.
|
|
|
+ * Schedulers should use assignmultiple as a replacement.
|
|
|
+ * @return whether continuous scheduling is enabled
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
public boolean isContinuousSchedulingEnabled() {
|
|
|
return continuousSchedulingEnabled;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * The sleep time of the continuous scheduler thread.
|
|
|
+ * @deprecated linked to {@link #isContinuousSchedulingEnabled} deprecation
|
|
|
+ * @return sleep time in ms
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
public int getContinuousSchedulingSleepMs() {
|
|
|
return continuousSchedulingSleepMs;
|
|
|
}
|
|
@@ -894,6 +926,7 @@ public class FairScheduler extends
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Deprecated
|
|
|
void continuousSchedulingAttempt() throws InterruptedException {
|
|
|
long start = getClock().getTime();
|
|
|
List<FSSchedulerNode> nodeIdList;
|
|
@@ -1253,6 +1286,7 @@ public class FairScheduler extends
|
|
|
this.rmContext = rmContext;
|
|
|
}
|
|
|
|
|
|
+ @SuppressWarnings("deprecation")
|
|
|
private void initScheduler(Configuration conf) throws IOException {
|
|
|
try {
|
|
|
writeLock.lock();
|
|
@@ -1299,6 +1333,10 @@ public class FairScheduler extends
|
|
|
}
|
|
|
|
|
|
if (continuousSchedulingEnabled) {
|
|
|
+ // Contiuous scheduling is deprecated log it on startup
|
|
|
+ LOG.warn("Continuous scheduling is turned ON. It is deprecated " +
|
|
|
+ "because it can cause scheduler slowness due to locking issues. " +
|
|
|
+ "Schedulers should use assignmultiple as a replacement.");
|
|
|
// start continuous scheduling thread
|
|
|
schedulingThread = new ContinuousSchedulingThread();
|
|
|
schedulingThread.setName("FairSchedulerContinuousScheduling");
|
|
@@ -1374,6 +1412,7 @@ public class FairScheduler extends
|
|
|
super.serviceStart();
|
|
|
}
|
|
|
|
|
|
+ @SuppressWarnings("deprecation")
|
|
|
@Override
|
|
|
public void serviceStop() throws Exception {
|
|
|
try {
|