Skip to content

Commit 3b7e5ca

Browse files
committed
HADOOP-19189. Mukund's feedback
Change-Id: I5a233329b7bae9da9b894f5226f20437bf7672fc
1 parent 165b8d2 commit 3b7e5ca

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/ITestS3ACommitterFactory.java

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,25 +115,40 @@ public static Collection<Object[]> params() {
115115
}
116116

117117
/**
118-
* Name of committer to set in fs config. If "" do not set one.
118+
* Name of committer to set in filesystem config. If "" do not set one.
119119
*/
120120
private final String fsCommitterName;
121-
private final String pathCommitterName;
121+
122+
/**
123+
* Name of committer to set in job config.
124+
*/
125+
private final String jobCommitterName;
122126

123127
/**
124128
* Expected committer class.
125129
* If null: an exception is expected
126130
*/
127131
private final Class<? extends AbstractS3ACommitter> committerClass;
128132

133+
/**
134+
* Description from parameters, simply for thread names to be more informative.
135+
*/
129136
private final String description;
130137

131-
public ITestS3ACommitterFactory(final String fsCommitterName,
132-
final String pathCommitterName,
138+
/**
139+
* Create a parameterized instance.
140+
* @param fsCommitterName committer to set in filesystem config
141+
* @param jobCommitterName committer to set in job config
142+
* @param committerClass expected committer class
143+
* @param description debug text for thread names.
144+
*/
145+
public ITestS3ACommitterFactory(
146+
final String fsCommitterName,
147+
final String jobCommitterName,
133148
final Class<? extends AbstractS3ACommitter> committerClass,
134149
final String description) {
135150
this.fsCommitterName = fsCommitterName;
136-
this.pathCommitterName = pathCommitterName;
151+
this.jobCommitterName = jobCommitterName;
137152
this.committerClass = committerClass;
138153
this.description = description;
139154
}
@@ -178,7 +193,7 @@ public void setup() throws Exception {
178193
jobConf.set(FileOutputFormat.OUTDIR, outDir.toUri().toString());
179194
jobConf.set(MRJobConfig.TASK_ATTEMPT_ID, attempt0);
180195
jobConf.setInt(MRJobConfig.APPLICATION_ATTEMPT_ID, 1);
181-
maybeSetCommitterName(jobConf, pathCommitterName);
196+
maybeSetCommitterName(jobConf, jobCommitterName);
182197
tContext = new TaskAttemptContextImpl(jobConf, taskAttempt0);
183198

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

0 commit comments

Comments
 (0)