本文整理汇总了Java中org.apache.hadoop.net.NetworkTopology.DEFAULT_HOST_LEVEL属性的典型用法代码示例。如果您正苦于以下问题:Java NetworkTopology.DEFAULT_HOST_LEVEL属性的具体用法?Java NetworkTopology.DEFAULT_HOST_LEVEL怎么用?Java NetworkTopology.DEFAULT_HOST_LEVEL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.net.NetworkTopology
的用法示例。
在下文中一共展示了NetworkTopology.DEFAULT_HOST_LEVEL属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JobInProgress
/**
* Create an almost empty JobInProgress, which can be used only for tests
*/
protected JobInProgress(JobID jobid, JobConf conf, JobTracker tracker)
throws IOException {
this.conf = conf;
this.jobId = jobid;
this.numMapTasks = conf.getNumMapTasks();
this.numReduceTasks = conf.getNumReduceTasks();
this.maxLevel = NetworkTopology.DEFAULT_HOST_LEVEL;
this.anyCacheLevel = this.maxLevel+1;
this.jobtracker = tracker;
this.restartCount = 0;
this.status = new JobStatus(jobid, 0.0f, 0.0f, JobStatus.PREP);
this.profile = new JobProfile(conf.getUser(), jobid, "", "",
conf.getJobName(), conf.getQueueName());
hasSpeculativeMaps = conf.getMapSpeculativeExecution();
hasSpeculativeReduces = conf.getReduceSpeculativeExecution();
this.nonLocalMaps = new LinkedList<TaskInProgress>();
this.failedMaps = new TreeSet<TaskInProgress>(failComparator);
this.nonLocalRunningMaps = new LinkedHashSet<TaskInProgress>();
this.runningMapCache = new IdentityHashMap<Node, Set<TaskInProgress>>();
this.nonRunningReduces = new TreeSet<TaskInProgress>(failComparator);
this.runningReduces = new LinkedHashSet<TaskInProgress>();
this.resourceEstimator = new ResourceEstimator(this);
this.status = new JobStatus(jobid, 0.0f, 0.0f, JobStatus.PREP);
this.status.setUsername(conf.getUser());
this.profile = new JobProfile(conf.getUser(), jobid, "", "",
conf.getJobName(), conf.getQueueName());
this.memoryPerMap = conf.getMemoryForMapTask();
this.memoryPerReduce = conf.getMemoryForReduceTask();
this.maxTaskFailuresPerTracker = conf.getMaxTaskFailuresPerTracker();
this.mapFailuresPercent = conf.getMaxMapTaskFailuresPercent();
this.reduceFailuresPercent = conf.getMaxReduceTaskFailuresPercent();
// Check task limits
checkTaskLimits();
this.taskCompletionEvents = new ArrayList<TaskCompletionEvent>
(numMapTasks + numReduceTasks + 10);
try {
this.userUGI = UserGroupInformation.getCurrentUser();
} catch (IOException ie){
throw new RuntimeException(ie);
}
}
示例2: JobInProgress
/**
* Create an almost empty JobInProgress, which can be used only for tests
*/
protected JobInProgress(JobID jobid, JobConf conf, JobTracker tracker) {
this.conf = conf;
this.jobId = jobid;
this.numMapTasks = conf.getNumMapTasks();
this.numReduceTasks = conf.getNumReduceTasks();
this.maxLevel = NetworkTopology.DEFAULT_HOST_LEVEL;
this.anyCacheLevel = this.maxLevel+1;
this.jobtracker = tracker;
this.restartCount = 0;
this.status = new JobStatus(jobid, 0.0f, 0.0f, JobStatus.PREP);
this.profile = new JobProfile(conf.getUser(), jobid, "", "",
conf.getJobName(), conf.getQueueName());
this.memoryPerMap = conf.getMemoryForMapTask();
this.memoryPerReduce = conf.getMemoryForReduceTask();
this.maxTaskFailuresPerTracker = conf.getMaxTaskFailuresPerTracker();
this.nonLocalMaps = new LinkedList<TaskInProgress>();
this.nonLocalRunningMaps = new LinkedHashSet<TaskInProgress>();
this.runningMapCache = new IdentityHashMap<Node, Set<TaskInProgress>>();
this.nonRunningReduces = new LinkedList<TaskInProgress>();
this.runningReduces = new LinkedHashSet<TaskInProgress>();
this.resourceEstimator = new ResourceEstimator(this);
this.nonLocalMaps = new LinkedList<TaskInProgress>();
this.nonLocalRunningMaps = new LinkedHashSet<TaskInProgress>();
this.runningMapCache = new IdentityHashMap<Node, Set<TaskInProgress>>();
this.nonRunningReduces = new LinkedList<TaskInProgress>();
this.runningReduces = new LinkedHashSet<TaskInProgress>();
this.jobSetupCleanupNeeded = true;
this.jobFinishWhenReducesDone = false;
this.taskCompletionEvents = new ArrayList<TaskCompletionEvent>
(numMapTasks + numReduceTasks + 10);
this.slowTaskThreshold = Math.max(0.0f,
conf.getFloat(JobInProgress.SPECULATIVE_SLOWTASK_THRESHOLD,1.0f));
this.speculativeCap = conf.getFloat(
JobInProgress.SPECULATIVECAP,0.1f);
this.slowNodeThreshold = conf.getFloat(
JobInProgress.SPECULATIVE_SLOWNODE_THRESHOLD,1.0f);
this.refreshTimeout = conf.getLong(JobInProgress.REFRESH_TIMEOUT, 5000L);
this.speculativeStddevMeanRatioMax = conf.getFloat(
JobInProgress.SPECULATIVE_STDDEVMEANRATIO_MAX, 0.33f);
this.speculativeMapUnfininshedThreshold = conf.getFloat(
SPECULATIVE_MAP_UNFINISHED_THRESHOLD_KEY,
speculativeMapUnfininshedThreshold);
this.speculativeReduceUnfininshedThreshold = conf.getFloat(
SPECULATIVE_REDUCE_UNFINISHED_THRESHOLD_KEY,
speculativeReduceUnfininshedThreshold);
hasSpeculativeMaps = conf.getMapSpeculativeExecution();
hasSpeculativeReduces = conf.getReduceSpeculativeExecution();
LOG.info(jobId + ": hasSpeculativeMaps = " + hasSpeculativeMaps +
", hasSpeculativeReduces = " + hasSpeculativeReduces);
enableNoFetchEmptyMapOutputs = conf.getBoolean(ENABLE_NO_FETCH_MAP_OUTPUTS, false);
LOG.info(jobId + ": enableNoFetchEmptyMapOutputs = " + enableNoFetchEmptyMapOutputs);
}