Examples of TaskID


Examples of org.apache.hadoop.mapreduce.TaskID

  protected void setup(Context context) throws java.io.IOException,
      InterruptedException {
    super.setup(context);
    debugInfo=0;
    doccount=0;
    TaskID taskId = context.getTaskAttemptID().getTaskID();
    this.Index = taskId.getId();

    context.getCounter("higo", "dumpcount").increment(0);

    Configuration conf = context.getConfiguration();
    isNotFdtMode=conf.get("mdrill.table.mode","").indexOf("@hdfs@")<0;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

      if (!fs.exists(new Path(indexHdfsPath))) {
        fs.rename(new Path(tmpath), new Path(indexHdfsPath));
      }
      if (shardWriter.getNumDocs() > 0 && lastkey != null) {
        TaskID taskId = context.getTaskAttemptID().getTaskID();
        int partition = taskId.getId();
        System.out.println("###########>>>>"+partition);
        context.write(new IntWritable(partition),new Text(indexHdfsPath));
      }
      FileSystem lfs = FileSystem.getLocal(conf);
      if(lfs.exists(new Path(localtmpath)))
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

  protected void setup(Context context) throws IOException, InterruptedException {
    super.setup(context);
    Configuration conf = context.getConfiguration();
    this.res= new PriorityQueue<Clusterlist>(limit,Collections.reverseOrder(cmp));

  TaskID taskId = context.getTaskAttemptID().getTaskID();
  this.Index = taskId.getId()*10000;
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

     */
    public static TaskID newTaskId(JobID jobId) {
        if (jobId == null) {
            throw new IllegalArgumentException("jobId must not be null"); //$NON-NLS-1$
        }
        return new TaskID(jobId, true, 0);
    }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

          return store;
        }
         
        private DataOutputStream createOutputStream(String fieldValue) throws IOException {
          Configuration conf = ctx.getConfiguration();
          TaskID taskId = ctx.getTaskAttemptID().getTaskID();
          Path path = new Path(fieldValue, fieldValue + '-'
                  + NumberFormat.getInstance().format(taskId.getId()));
          Path workOutputPath = ((FileOutputCommitter)getOutputCommitter(ctx)).getWorkPath();
          Path file = new Path(workOutputPath, path);
          FileSystem fs = file.getFileSystem(conf);               
          FSDataOutputStream fileOut = fs.create(file, false);
          return fileOut;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

  public void initialize(DoFn<?, ?> fn, Integer tid) {
    if (context == null || !Objects.equal(lastTID, tid)) {
      TaskAttemptID attemptID;
      if (tid != null) {
        TaskID taskId = new TaskID(new JobID(jobName, 0), false, tid);
        attemptID = new TaskAttemptID(taskId, 0);
        lastTID = tid;
      } else {
        attemptID = new TaskAttemptID();
        lastTID = null;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

   * @return masked {@link TaskID} with empty {@link JobID}.
   */
  private TaskID maskTaskID(TaskID taskId) {
    JobID jobId = new JobID();
    TaskType taskType = taskId.getTaskType();
    return new TaskID(jobId, taskType, taskId.getId());
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.TaskID

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

Examples of org.apache.hadoop.mapreduce.TaskID

    return taskInfo;
  }

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

Examples of org.apache.hadoop.mapreduce.TaskID

          : State.FAILED;
    }
  }

  private TaskID getMaskedTaskID(TaskType taskType, int taskNumber) {
    return new TaskID(new JobID(), taskType, taskNumber);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.