Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.TaskID


  }

  public synchronized static String getUniqueFile(TaskAttemptContext context,
      String name, String extension) {

    TaskID taskId = context.getTaskAttemptID().getTaskID();
    int partition = taskId.getId();
    partition = partition + (int) fileCount;
    StringBuilder result = new StringBuilder();
    result.append(name);
    result.append('-');
    // result.append(taskId.isMap() ? 'm' : 'r');
View Full Code Here


  }

  public synchronized static String getUniqueFile(TaskAttemptContext context,
      String name, String extension) {

    TaskID taskId = context.getTaskAttemptID().getTaskID();
    int partition = taskId.getId();
    partition = partition + (int) fileCount;
    StringBuilder result = new StringBuilder();
    result.append(name);
    result.append('-');
    // result.append(taskId.isMap() ? 'm' : 'r');
View Full Code Here

   * @return a string like $name-[mr]-$id$extension
   */
  public synchronized static String getUniqueFile(TaskAttemptContext context,
                                                  String name,
                                                  String extension) {
    TaskID taskId = context.getTaskAttemptID().getTaskID();
    int partition = taskId.getId();
    StringBuilder result = new StringBuilder();
    result.append(name);
    result.append('-');
    result.append(taskId.isMap() ? 'm' : 'r');
    result.append('-');
    result.append(NUMBER_FORMAT.format(partition));
    result.append(extension);
    return result.toString();
  }
View Full Code Here

   *          raw {@link TaskID} read from trace
   * @return masked {@link TaskID} with empty {@link JobID}.
   */
  private TaskID maskTaskID(TaskID taskId) {
    JobID jobId = new JobID();
    return new TaskID(jobId, taskId.isMap(), taskId.getId());
  }
View Full Code Here

   *          raw {@link TaskAttemptID} read from trace
   * @return masked {@link TaskAttemptID} with empty {@link JobID}.
   */
  private TaskAttemptID maskAttemptID(TaskAttemptID attemptId) {
    JobID jobId = new JobID();
    TaskID taskId = attemptId.getTaskID();
    return new TaskAttemptID(jobId.getJtIdentifier(), jobId.getId(),
        attemptId.isMap(), taskId.getId(), attemptId.getId());
  }
View Full Code Here

    return taskInfo;
  }

  private TaskAttemptID makeTaskAttemptID(TaskType taskType, int taskNumber,
      int taskAttemptNumber) {
    return new TaskAttemptID(new TaskID(JobID.forName(job.getJobID()),
        TaskType.MAP == taskType, taskNumber), taskAttemptNumber);
  }
View Full Code Here

          : State.FAILED;
    }
  }

  private TaskID getMaskedTaskID(TaskType taskType, int taskNumber) {
    return new TaskID(new JobID(), TaskType.MAP == taskType, taskNumber);
  }
View Full Code Here

      if(!info.isSetupOrCleanup()) {
        String[] taskTrackers = info.getTaskTrackers();
        for(String taskTracker : taskTrackers) {
          TTInfo ttInfo = wovenClient.getTTInfo(taskTracker);
          TTClient ttCli =  cluster.getTTClient(ttInfo.getStatus().getHost());
          TaskID taskId = info.getTaskID();
          TTTaskInfo ttTaskInfo = ttCli.getProxy().getTask(taskId);
          Assert.assertNotNull(ttTaskInfo);
          Assert.assertNotNull(ttTaskInfo.getConf());
          Assert.assertNotNull(ttTaskInfo.getUser());
          Assert.assertTrue(ttTaskInfo.getTaskStatus().getProgress() >= 0.0);
View Full Code Here

    public void setup(Context context) throws IOException, InterruptedException {
    super.setup(context);
   
 
   
    TaskID taskId = context.getTaskAttemptID().getTaskID();
    this.Index = taskId.getId();
    System.out.println("###########>>>>"+this.Index);
    Configuration conf = context.getConfiguration();

    String mode=conf.get("mdrill.table.mode","");
    HashMap<String,ArrayList<String>> contanis=new HashMap<String, ArrayList<String>>();
View Full Code Here

import com.alimama.mdrill.utils.UniqConfig;

public class JobIndexPublic {
  public static String getOutFileName(TaskAttemptContext context,
      String prefix) {
    TaskID taskId = context.getTaskAttemptID().getTaskID();
    int partition = taskId.getId();
    NumberFormat nf = NumberFormat.getInstance();
    nf.setMinimumIntegerDigits(5);
    nf.setGroupingUsed(false);
    StringBuilder result = new StringBuilder();
    result.append(prefix);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapreduce.TaskID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.