本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}