Skip to content

Commit

Permalink
HADOOP-19189. Mukund's feedback
Browse files Browse the repository at this point in the history
Change-Id: I5a233329b7bae9da9b894f5226f20437bf7672fc
  • Loading branch information
steveloughran committed Jun 6, 2024
1 parent 165b8d2 commit 3b7e5ca
Showing 1 changed file with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,25 +115,40 @@ public static Collection<Object[]> params() {
}

/**
* Name of committer to set in fs config. If "" do not set one.
* Name of committer to set in filesystem config. If "" do not set one.
*/
private final String fsCommitterName;
private final String pathCommitterName;

/**
* Name of committer to set in job config.
*/
private final String jobCommitterName;

/**
* Expected committer class.
* If null: an exception is expected
*/
private final Class<? extends AbstractS3ACommitter> committerClass;

/**
* Description from parameters, simply for thread names to be more informative.
*/
private final String description;

public ITestS3ACommitterFactory(final String fsCommitterName,
final String pathCommitterName,
/**
* Create a parameterized instance.
* @param fsCommitterName committer to set in filesystem config
* @param jobCommitterName committer to set in job config
* @param committerClass expected committer class
* @param description debug text for thread names.
*/
public ITestS3ACommitterFactory(
final String fsCommitterName,
final String jobCommitterName,
final Class<? extends AbstractS3ACommitter> committerClass,
final String description) {
this.fsCommitterName = fsCommitterName;
this.pathCommitterName = pathCommitterName;
this.jobCommitterName = jobCommitterName;
this.committerClass = committerClass;
this.description = description;
}
Expand Down Expand Up @@ -178,7 +193,7 @@ public void setup() throws Exception {
jobConf.set(FileOutputFormat.OUTDIR, outDir.toUri().toString());
jobConf.set(MRJobConfig.TASK_ATTEMPT_ID, attempt0);
jobConf.setInt(MRJobConfig.APPLICATION_ATTEMPT_ID, 1);
maybeSetCommitterName(jobConf, pathCommitterName);
maybeSetCommitterName(jobConf, jobCommitterName);
tContext = new TaskAttemptContextImpl(jobConf, taskAttempt0);

LOG.info("Filesystem Committer='{}'; task='{}'",
Expand Down

0 comments on commit 3b7e5ca

Please sign in to comment.