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


Java TaskTracker.setStatus方法代码示例

本文整理汇总了Java中org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker.setStatus方法的典型用法代码示例。如果您正苦于以下问题:Java TaskTracker.setStatus方法的具体用法?Java TaskTracker.setStatus怎么用?Java TaskTracker.setStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker的用法示例。


在下文中一共展示了TaskTracker.setStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager() {
  JobConf conf = new JobConf();
  queueManager = new QueueManager(conf);
  
  TaskTracker tt1 = new TaskTracker("tt1");
  tt1.setStatus(new TaskTrackerStatus("tt1", "http", "tt1.host", 1,
                new ArrayList<TaskStatus>(), 0, 0,
                maxMapTasksPerTracker, maxReduceTasksPerTracker));
  trackers.put("tt1", tt1);
  
  TaskTracker tt2 = new TaskTracker("tt2");
  tt2.setStatus(new TaskTrackerStatus("tt2", "http", "tt2.host", 2,
                new ArrayList<TaskStatus>(), 0, 0,
                maxMapTasksPerTracker, maxReduceTasksPerTracker));
  trackers.put("tt2", tt2);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:17,代码来源:TestJobQueueTaskScheduler.java

示例2: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager() {
  TaskTracker tt1 = new TaskTracker("tt1");
  tt1.setStatus(new TaskTrackerStatus("tt1", "http", "tt1.host", 1,
                                      new ArrayList<TaskStatus>(), 0, 0,
                                      maxMapTasksPerTracker, 
                                      maxReduceTasksPerTracker));
  trackers.put("tt1", tt1);
  
  TaskTracker tt2 = new TaskTracker("tt2");
  tt2.setStatus(new TaskTrackerStatus("tt2", "http", "tt2.host", 2,
                                      new ArrayList<TaskStatus>(), 0, 0,
                                      maxMapTasksPerTracker, 
                                      maxReduceTasksPerTracker));
  trackers.put("tt2", tt2);

}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:17,代码来源:TestFairScheduler.java

示例3: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager() {
  JobConf conf = new JobConf();
  queueManager = new QueueManager(conf);
  
  TaskTracker tt1 = new TaskTracker("tt1");
  tt1.setStatus(new TaskTrackerStatus("tt1", "tt1.host", 1,
                new ArrayList<TaskStatus>(), 0,
                maxMapTasksPerTracker, maxReduceTasksPerTracker));
  trackers.put("tt1", tt1);
  
  TaskTracker tt2 = new TaskTracker("tt2");
  tt2.setStatus(new TaskTrackerStatus("tt2", "tt2.host", 2,
                new ArrayList<TaskStatus>(), 0,
                maxMapTasksPerTracker, maxReduceTasksPerTracker));
  trackers.put("tt2", tt2);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:17,代码来源:TestJobQueueTaskScheduler.java

示例4: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager() {
  JobConf conf = new JobConf();
  queueManager = new QueueManager(conf);
  
  TaskTracker tt1 = new TaskTracker("tt1");
  tt1.setStatus(new TaskTrackerStatus("tt1", "tt1.host", 1,
                                      new ArrayList<TaskStatus>(), 0,
                                      maxMapTasksPerTracker, 
                                      maxReduceTasksPerTracker));
  trackers.put("tt1", tt1);
  
  TaskTracker tt2 = new TaskTracker("tt2");
  tt2.setStatus(new TaskTrackerStatus("tt2", "tt2.host", 2,
                                      new ArrayList<TaskStatus>(), 0,
                                      maxMapTasksPerTracker, 
                                      maxReduceTasksPerTracker));
  trackers.put("tt2", tt2);
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:19,代码来源:TestJobQueueTaskScheduler.java

示例5: testReservedSlots

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public void testReservedSlots() throws IOException {
    JobConf conf = new JobConf();
    conf.setNumMapTasks(1);
    conf.setNumReduceTasks(1);
    conf.setSpeculativeExecution(false);
    
    //Set task tracker objects for reservation.
    TaskTracker tt2 = jobTracker.getTaskTracker(trackers[1]);
    TaskTrackerStatus status2 = new TaskTrackerStatus(
        trackers[1],JobInProgress.convertTrackerNameToHostName(
            trackers[1]),0,new ArrayList<TaskStatus>(), 0, 2, 2);
    tt2.setStatus(status2);
    
    fakeJob = new FakeJobInProgress(conf, jobTracker);
    fakeJob.setClusterSize(3);
    fakeJob.initTasks();
    
    FakeObjectUtilities.sendHeartBeat(jobTracker, status2, false,
      true, trackers[1], responseId);
    responseId++; 
    
    assertEquals("Mismtach in reserved map slots", 
      numMapSlotsToReserve, mi.numReservedMapSlots); 
    assertEquals("Mismtach in reserved red slots", 
      numReduceSlotsToReserve, mi.numReservedReduceSlots); 
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:27,代码来源:TestJobTrackerInstrumentation.java

示例6: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(
  int numTaskTrackers,
  int maxMapTasksPerTracker, int maxReduceTasksPerTracker) {
Configuration cfn = new Configuration();
cfn.set("mapred.queue.names","default");
qm = new FakeQueueManager(cfn);
  this.maxMapTasksPerTracker = maxMapTasksPerTracker;
  this.maxReduceTasksPerTracker = maxReduceTasksPerTracker;
  for (int i = 1; i < numTaskTrackers + 1; i++) {
    String ttName = "tt" + i;
    TaskTracker tt = new TaskTracker(ttName);
    tt.setStatus(
      new TaskTrackerStatus(
        ttName, ttName + ".host", i,
        new ArrayList<TaskStatus>(), 0,
        maxMapTasksPerTracker,
        maxReduceTasksPerTracker));
    trackers.put(ttName, tt);
  }

  defaultJobConf = new JobConf();
  defaultJobConf.set("mapred.queue.names","default");
  //by default disable speculative execution.
  defaultJobConf.setMapSpeculativeExecution(false);
  defaultJobConf.setReduceSpeculativeExecution(false);
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:27,代码来源:CapacityTestUtils.java

示例7: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(int numTaskTrackers,
    int maxMapTasksPerTracker, int maxReduceTasksPerTracker) {
  this.maxMapTasksPerTracker = maxMapTasksPerTracker;
  this.maxReduceTasksPerTracker = maxReduceTasksPerTracker;
  for (int i = 1; i < numTaskTrackers + 1; i++) {
    String ttName = "tt" + i;
    TaskTracker tt = new TaskTracker(ttName);
    tt.setStatus(new TaskTrackerStatus(ttName, "http", ttName + ".host", i,
                                       new ArrayList<TaskStatus>(), 0, 0,
                                       maxMapTasksPerTracker,
                                       maxReduceTasksPerTracker));
    trackers.put(ttName, tt);
  }
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:15,代码来源:TestCapacityScheduler.java

示例8: addTaskTracker

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public void addTaskTracker(String ttName) {
  TaskTracker tt = new TaskTracker(ttName);
  tt.setStatus(new TaskTrackerStatus(ttName, "http", ttName + ".host", 1,
                                     new ArrayList<TaskStatus>(), 0, 0,
                                     maxMapTasksPerTracker, 
                                     maxReduceTasksPerTracker));
  trackers.put(ttName, tt);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:9,代码来源:TestCapacityScheduler.java

示例9: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(int numTaskTrackers,
    int maxMapTasksPerTracker, int maxReduceTasksPerTracker) {
  this.maxMapTasksPerTracker = maxMapTasksPerTracker;
  this.maxReduceTasksPerTracker = maxReduceTasksPerTracker;
  for (int i = 1; i < numTaskTrackers + 1; i++) {
    String ttName = "tt" + i;
    TaskTracker tt = new TaskTracker(ttName);
    tt.setStatus(new TaskTrackerStatus(ttName, ttName + ".host", i,
                                       new ArrayList<TaskStatus>(), 0, 
                                       maxMapTasksPerTracker,
                                       maxReduceTasksPerTracker));
    trackers.put(ttName, tt);
  }
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:15,代码来源:TestCapacityScheduler.java

示例10: addTaskTracker

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public void addTaskTracker(String ttName) {
  TaskTracker tt = new TaskTracker(ttName);
  tt.setStatus(new TaskTrackerStatus(ttName, ttName + ".host", 1,
                                     new ArrayList<TaskStatus>(), 0,
                                     maxMapTasksPerTracker, 
                                     maxReduceTasksPerTracker));
  trackers.put(ttName, tt);
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:9,代码来源:TestCapacityScheduler.java

示例11: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(int numTrackers) {
  for (int i = 1; i <= numTrackers; i++) {
    TaskTracker tt = new TaskTracker("tt" + i);
    tt.setStatus(new TaskTrackerStatus("tt" + i,  "host" + i, i,
        new ArrayList<TaskStatus>(), 0,
        maxMapTasksPerTracker, maxReduceTasksPerTracker));
    trackers.put("tt" + i, tt);
  }
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:10,代码来源:TestFairScheduler.java

示例12: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(int numRacks, int numTrackersPerRack) {
  int nextTrackerId = 1;
  for (int rack = 1; rack <= numRacks; rack++) {
    for (int node = 1; node <= numTrackersPerRack; node++) {
      int id = nextTrackerId++;
      String host = "rack" + rack + ".node" + node;
      System.out.println("Creating TaskTracker tt" + id + " on " + host);
      TaskTracker tt = new TaskTracker("tt" + id);
      tt.setStatus(new TaskTrackerStatus("tt" + id, host, 0,
          new ArrayList<TaskStatus>(), 0,
          maxMapTasksPerTracker, maxReduceTasksPerTracker));
      trackers.put("tt" + id, tt);
    }
  }
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:16,代码来源:TestFairScheduler.java

示例13: HFSPFakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public HFSPFakeTaskTrackerManager(int numRacks, int numTrackersPerRack) {
  int nextTrackerId = 1;
  for (int rack = 1; rack <= numRacks; rack++) {
    for (int node = 1; node <= numTrackersPerRack; node++) {
      int id = nextTrackerId++;
      String host = "rack" + rack + ".node" + node;
      System.out.println("Creating TaskTracker tt" + id + " on " + host);
      TaskTracker tt = new TaskTracker("tt" + id);
      tt.setStatus(new TaskTrackerStatus("tt" + id, host, 0,
          new ArrayList<TaskStatus>(), 0, 0, maxMapTasksPerTracker,
          maxReduceTasksPerTracker));
      trackers.put("tt" + id, tt);
    }
  }
}
 
开发者ID:melrief,项目名称:HFSP,代码行数:16,代码来源:HFSPFakeTaskTrackerManager.java

示例14: FakeTaskTrackerManager

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public FakeTaskTrackerManager(int numRacks, int numTrackersPerRack) {
  int nextTrackerId = 1;
  for (int rack = 1; rack <= numRacks; rack++) {
    for (int node = 1; node <= numTrackersPerRack; node++) {
      int id = nextTrackerId++;
      String host = "rack" + rack + ".node" + node;
      System.out.println("Creating TaskTracker tt" + id + " on " + host);
      TaskTracker tt = new TaskTracker("tt" + id);
      tt.setStatus(new TaskTrackerStatus("tt" + id, "http", host, 0,
          new ArrayList<TaskStatus>(), 0, 0,
          maxMapTasksPerTracker, maxReduceTasksPerTracker));
      trackers.put("tt" + id, tt);
    }
  }
}
 
开发者ID:karahiyo,项目名称:hanoi-hadoop-2.0.0-cdh,代码行数:16,代码来源:TestFairScheduler.java

示例15: addTaskTracker

import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker; //导入方法依赖的package包/类
public void addTaskTracker(String ttName) {
  TaskTracker tt = new TaskTracker(ttName);
  tt.setStatus(
    new TaskTrackerStatus(
      ttName, ttName + ".host", 1,
      new ArrayList<TaskStatus>(), 0,
      maxMapTasksPerTracker,
      maxReduceTasksPerTracker));
  trackers.put(ttName, tt);
}
 
开发者ID:rekhajoshm,项目名称:mapreduce-fork,代码行数:11,代码来源:CapacityTestUtils.java


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