当前位置: 首页>>代码示例>>Java>>正文


Java NetworkTopology.DEFAULT_HOST_LEVEL属性代码示例

本文整理汇总了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);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:46,代码来源:JobInProgress.java

示例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);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:58,代码来源:JobInProgress.java


注:本文中的org.apache.hadoop.net.NetworkTopology.DEFAULT_HOST_LEVEL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。