Skip to content

Commit bdb0487

Browse files
committed
fix checkstyle.
1 parent 463eb7a commit bdb0487

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRollingUpgradeRollback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void testRollbackWithQJM() throws Exception {
165165

166166
// start rolling upgrade
167167
dfs.setSafeMode(SafeModeAction.ENTER);
168-
Assertions.assertEquals(0, dfsadmin.run(new String[] { "-rollingUpgrade", "prepare" }));
168+
Assertions.assertEquals(0, dfsadmin.run(new String[]{"-rollingUpgrade", "prepare"}));
169169
dfs.setSafeMode(SafeModeAction.LEAVE);
170170
// create new directory
171171
dfs.mkdirs(bar);

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSeekBug.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
public class TestSeekBug {
4141
static final long seed = 0xDEADBEEFL;
4242
static final int ONEMB = 1 << 20;
43-
43+
4444
private void checkAndEraseData(byte[] actual, int from, byte[] expected, String message) {
4545
for (int idx = 0; idx < actual.length; idx++) {
4646
assertEquals(actual[idx], expected[from + idx], message + " byte " + (from + idx)
4747
+ " differs. expected " + expected[from + idx] + " actual " + actual[idx]);
4848
actual[idx] = 0;
4949
}
5050
}
51-
51+
5252
private void seekReadFile(FileSystem fileSys, Path name) throws IOException {
5353
FSDataInputStream stm = fileSys.open(name, 4096);
5454
byte[] expected = new byte[ONEMB];
5555
Random rand = new Random(seed);
5656
rand.nextBytes(expected);
57-
57+
5858
// First read 128 bytes to set count in BufferedInputStream
5959
byte[] actual = new byte[128];
6060
stm.read(actual, 0, actual.length);
@@ -83,7 +83,7 @@ private void smallReadSeek(FileSystem fileSys, Path name) throws IOException {
8383
byte[] expected = new byte[ONEMB];
8484
Random rand = new Random(seed);
8585
rand.nextBytes(expected);
86-
86+
8787
// Issue a simple read first.
8888
byte[] actual = new byte[128];
8989
stmRaw.seek(100000);
@@ -105,13 +105,13 @@ private void smallReadSeek(FileSystem fileSys, Path name) throws IOException {
105105
// all done
106106
stmRaw.close();
107107
}
108-
108+
109109
private void cleanupFile(FileSystem fileSys, Path name) throws IOException {
110110
assertTrue(fileSys.exists(name));
111111
fileSys.delete(name, true);
112112
assertTrue(!fileSys.exists(name));
113113
}
114-
114+
115115
/**
116116
* Test if the seek bug exists in FSDataInputStream in DFS.
117117
*/
@@ -139,7 +139,7 @@ public void testSeekBugDFS() throws IOException {
139139
* <code>FSDataInpuStream#seek</code> argument
140140
*/
141141
@Test
142-
public void testNegativeSeek() throws IOException {
142+
public void testNegativeSeek() throws IOException {
143143
Assertions.assertThrows(IOException.class, () -> {
144144
Configuration conf = new HdfsConfiguration();
145145
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
@@ -165,14 +165,14 @@ public void testNegativeSeek() throws IOException {
165165
cluster.shutdown();
166166
}
167167
});
168-
}
168+
}
169169

170170
/**
171171
* Test (expected to throw IOE) for <code>FSDataInpuStream#seek</code>
172172
* when the position argument is larger than the file size.
173173
*/
174174
@Test
175-
public void testSeekPastFileSize() throws IOException {
175+
public void testSeekPastFileSize() throws IOException {
176176
Assertions.assertThrows(IOException.class, () -> {
177177
Configuration conf = new HdfsConfiguration();
178178
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
@@ -198,8 +198,8 @@ public void testSeekPastFileSize() throws IOException {
198198
cluster.shutdown();
199199
}
200200
});
201-
}
202-
201+
}
202+
203203
/**
204204
* Tests if the seek bug exists in FSDataInputStream in LocalFS.
205205
*/

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSetrepIncreasing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static void setrep(int fromREP, int toREP, boolean simulatedStorage) throws IOEx
6161
try {
6262
assertEquals(0, shell.run(args));
6363
} catch (Exception e) {
64-
assertTrue(false, "-setrep " + e);
64+
assertTrue(false, "-setrep " + e);
6565
}
6666
}
6767

0 commit comments

Comments
 (0)