本文整理汇总了Java中org.apache.hadoop.mapreduce.TaskID.toString方法的典型用法代码示例。如果您正苦于以下问题:Java TaskID.toString方法的具体用法?Java TaskID.toString怎么用?Java TaskID.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.mapreduce.TaskID
的用法示例。
在下文中一共展示了TaskID.toString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: assignTo
import org.apache.hadoop.mapreduce.TaskID; //导入方法依赖的package包/类
/**
* Reassigns the chunk to a specified Map-Task, for consumption.
*
* @param taskId The Map-Task to which a the chunk is to be reassigned.
* @throws IOException Exception on failure to reassign.
*/
public void assignTo(TaskID taskId) throws IOException {
Path newPath = new Path(chunkRootPath, taskId.toString());
if (!fs.rename(chunkFilePath, newPath)) {
LOG.warn("{} could not be assigned to {}", chunkFilePath, taskId);
}
}
示例2: TaskStartedEvent
import org.apache.hadoop.mapreduce.TaskID; //导入方法依赖的package包/类
/**
* Create an event to record start of a task
* @param id Task Id
* @param startTime Start time of the task
* @param taskType Type of the task
* @param splitLocations Split locations, applicable for map tasks
*/
public TaskStartedEvent(TaskID id, long startTime,
TaskType taskType, String splitLocations) {
datum.taskid = new Utf8(id.toString());
datum.splitLocations = new Utf8(splitLocations);
datum.startTime = startTime;
datum.taskType = new Utf8(taskType.name());
}
示例3: assignTo
import org.apache.hadoop.mapreduce.TaskID; //导入方法依赖的package包/类
/**
* Reassigns the chunk to a specified Map-Task, for consumption.
* @param taskId The Map-Task to which a the chunk is to be reassigned.
* @throws IOException Exception on failure to reassign.
*/
public void assignTo(TaskID taskId) throws IOException {
Path newPath = new Path(chunkRootPath, taskId.toString());
if (!fs.rename(chunkFilePath, newPath)) {
LOG.warn(chunkFilePath + " could not be assigned to " + taskId);
}
}
示例4: assignTo
import org.apache.hadoop.mapreduce.TaskID; //导入方法依赖的package包/类
/**
* Reassigns the chunk to a specified Map-Task, for consumption.
* @param taskId The Map-Task to which a the chunk is to be reassigned.
* @throws IOException Exception on failure to reassign.
*/
public void assignTo(TaskID taskId) throws IOException {
Path newPath = new Path(chunkContext.getChunkRootPath(), taskId.toString());
if (!chunkContext.getFs().rename(chunkFilePath, newPath)) {
LOG.warn(chunkFilePath + " could not be assigned to " + taskId);
}
}
示例5: TaskUpdatedEvent
import org.apache.hadoop.mapreduce.TaskID; //导入方法依赖的package包/类
/**
* Create an event to record task updates
* @param id Id of the task
* @param finishTime Finish time of the task
*/
public TaskUpdatedEvent(TaskID id, long finishTime) {
datum.taskid = new Utf8(id.toString());
datum.finishTime = finishTime;
}