Skip to content

Commit bbb5112

Browse files
author
fanshilun
committed
MAPREDUCE-7421. Fix CheckStyle & UnitTest.
1 parent 6eac9de commit bbb5112

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestCounters.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ public void testCounterValue() {
4949
long expectedValue = initValue;
5050
Counter counter = new Counters().findCounter("test", "foo");
5151
counter.setValue(initValue);
52-
assertEquals(
53-
expectedValue, counter.getValue(), "Counter value is not initialized correctly");
52+
assertEquals(expectedValue, counter.getValue(),
53+
"Counter value is not initialized correctly");
5454
for (int j = 0; j < NUMBER_INC; j++) {
5555
int incValue = rand.nextInt();
5656
counter.increment(incValue);
5757
expectedValue += incValue;
58-
assertEquals(
59-
expectedValue, counter.getValue(), "Counter value is not incremented correctly");
58+
assertEquals(expectedValue, counter.getValue(),
59+
"Counter value is not incremented correctly");
6060
}
6161
expectedValue = rand.nextInt();
6262
counter.setValue(expectedValue);
63-
assertEquals(
64-
expectedValue, counter.getValue(), "Counter value is not set correctly");
63+
assertEquals(expectedValue, counter.getValue(),
64+
"Counter value is not set correctly");
6565
}
6666
}
6767

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/TestMRIntermediateDataEncryption.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import java.util.concurrent.atomic.AtomicLong;
3535

3636
import org.junit.jupiter.api.AfterAll;
37-
import org.junit.jupiter.api.BeforeEach;
3837
import org.junit.jupiter.api.BeforeAll;
3938
import org.junit.jupiter.params.ParameterizedTest;
4039
import org.junit.jupiter.params.provider.MethodSource;

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/join/TestJoinProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private void validateOuterKeyValue(IntWritable k, TupleWritable v,
322322
assertTrue(val1.get() == 1, kvstr);
323323
}
324324
if (val2 != null) {
325-
assertTrue( val2.get() == 2, kvstr);
325+
assertTrue(val2.get() == 2, kvstr);
326326
}
327327
}
328328

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,9 @@ public void testFailingMapper() throws IOException, InterruptedException,
753753
}
754754

755755
TaskCompletionEvent[] events = job.getTaskCompletionEvents(0, 2);
756-
assertEquals(TaskCompletionEvent.Status.FAILED,
756+
assertEquals(TaskCompletionEvent.Status.FAILED,
757757
events[0].getStatus());
758-
assertEquals(TaskCompletionEvent.Status.TIPFAILED,
758+
assertEquals(TaskCompletionEvent.Status.TIPFAILED,
759759
events[1].getStatus());
760760
assertEquals(JobStatus.State.FAILED, job.getJobState());
761761
verifyFailingMapperCounters(job);

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithProfiler.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,17 @@ private void testProfilerInternal(boolean useDefault) throws Exception {
246246
final BufferedReader br = new BufferedReader(new InputStreamReader(
247247
localFs.open(profilePath)));
248248
final String line = br.readLine();
249-
assertTrue(
250-
line !=null && line.startsWith("JAVA PROFILE"), "No hprof content found!");
249+
assertTrue(line !=null && line.startsWith("JAVA PROFILE"),
250+
"No hprof content found!");
251251
br.close();
252252
assertEquals(0L, localFs.getFileStatus(stdoutPath).getLen());
253253
} else {
254-
assertFalse(
255-
localFs.exists(profilePath), "hprof file should not exist");
254+
assertFalse(localFs.exists(profilePath),
255+
"hprof file should not exist");
256256
}
257257
} else {
258-
assertFalse(
259-
localFs.exists(profilePath), "hprof file should not exist");
258+
assertFalse(localFs.exists(profilePath),
259+
"hprof file should not exist");
260260
if (tid.getTaskID().getId() == PROFILED_TASK_ID) {
261261
// reducer is profiled with Xprof
262262
final BufferedReader br = new BufferedReader(new InputStreamReader(

0 commit comments

Comments
 (0)