StagingCommitter extends AbstractS3ACommitter { @Override public String toString() { final StringBuilder sb = new StringBuilder("StagingCommitter{"); sb.append(super.toString()); sb.append(", conflictResolution=").append(conflictResolution); if (wrappedCommitter != null) { sb.append(", wrappedCommitter=").append(wrappedCommitter); } sb.append('}'); return sb.toString(); } StagingCommitter(Path outputPath,
      TaskAttemptContext context); @Override String getName(); @Override String toString(); static String getUploadUUID(Configuration conf, String jobId); static String getUploadUUID(Configuration conf, JobID jobId); Boolean useUniqueFilenames(); FileSystem getJobAttemptFileSystem(JobContext context); static Path getJobAttemptPath(JobContext context, Path out); static Path getTaskAttemptPath(TaskAttemptContext context, Path out); Path getCommittedTaskPath(TaskAttemptContext context); @Override Path getTempTaskAttemptPath(TaskAttemptContext context); @Override Path getBaseTaskAttemptPath(TaskAttemptContext context); @Override Path getJobAttemptPath(JobContext context); @Override void setupJob(JobContext context); @Override void cleanupStagingDirs(); @Override void setupTask(TaskAttemptContext context); @Override boolean needsTaskCommit(TaskAttemptContext context); @Override void commitTask(TaskAttemptContext context); @Override void abortTask(TaskAttemptContext context); final ConflictResolution getConflictResolutionMode(
      JobContext context,
      Configuration fsConf); static String getConfictModeOption(JobContext context,
      Configuration fsConf); static final String NAME; }
@Test public void testAttemptPathConstructionNoSchema() throws Exception { Configuration config = new Configuration(); final String jobUUID = addUUID(config); config.set(BUFFER_DIR, "/tmp/mr-local-0,/tmp/mr-local-1"); String commonPath = "file:/tmp/mr-local-"; assertThat("Missing scheme should produce local file paths", getLocalTaskAttemptTempDir(config, jobUUID, tac.getTaskAttemptID()).toString(), StringStartsWith.startsWith(commonPath)); }
@Test public void testAttemptPathConstructionWithSchema() throws Exception { Configuration config = new Configuration(); final String jobUUID = addUUID(config); String commonPath = "file:/tmp/mr-local-"; config.set(BUFFER_DIR, "file:/tmp/mr-local-0,file:/tmp/mr-local-1"); assertThat("Path should be the same with file scheme", getLocalTaskAttemptTempDir(config, jobUUID, tac.getTaskAttemptID()).toString(), StringStartsWith.startsWith(commonPath)); }