Example usage for org.apache.hadoop.mapreduce TaskID toString

List of usage examples for org.apache.hadoop.mapreduce TaskID toString

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce TaskID toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.inmobi.conduit.distcp.tools.mapred.lib.DynamicInputChunk.java

License:Apache License

/**
 * 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.
 *///from w  w  w .j  av a 2  s. c o  m
public void assignTo(TaskID taskId) throws IOException {
    Path newPath = new Path(chunkSet.getChunkRootPath(), taskId.toString());
    if (!chunkSet.getFileSystem().rename(chunkFilePath, newPath)) {
        LOG.warn(chunkFilePath + " could not be assigned to " + taskId);
    }
}