Skip to content

Commit e1d919c

Browse files
committed
HADOOP-19425. Fix CheckStyle.
1 parent 40e553c commit e1d919c

13 files changed

+108
-86
lines changed

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemCheckAccess.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,14 @@ private void checkIfConfigIsSet(String configKey){
330330

331331
private void assertAccessible(Path testFilePath, FsAction fsAction)
332332
throws IOException {
333-
assertTrue(
334-
335-
isAccessible(testUserFs, testFilePath, fsAction), "Should have been given access " + fsAction + " on " + testFilePath);
333+
assertTrue(isAccessible(testUserFs, testFilePath, fsAction),
334+
"Should have been given access " + fsAction + " on " + testFilePath);
336335
}
337336

338337
private void assertInaccessible(Path testFilePath, FsAction fsAction)
339338
throws IOException {
340-
assertFalse(
341-
342-
isAccessible(testUserFs, testFilePath, fsAction), "Should have been denied access " + fsAction + " on " + testFilePath);
339+
assertFalse(isAccessible(testUserFs, testFilePath, fsAction),
340+
"Should have been denied access " + fsAction + " on " + testFilePath);
343341
}
344342

345343
private void setExecuteAccessForParentDirs(Path dir) throws IOException {

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemListStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public void testListFileVsListDir2() throws Exception {
250250
FileStatus[] testFiles = fs.listStatus(testFile0Path);
251251
assertEquals(1, testFiles.length, "Wrong listing size of file " + testFile0Path);
252252
FileStatus file0 = testFiles[0];
253-
assertEquals(new Path(getTestUrl(),testFolder + "/testFolder2/testFolder3/testFile"),
253+
assertEquals(new Path(getTestUrl(), testFolder + "/testFolder2/testFolder3/testFile"),
254254
file0.getPath(), "Wrong path for " + file0);
255255
assertIsFileReference(file0);
256256
}

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemMkDir.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void testMkdirExistingDirOverwriteFalse() throws Exception {
7878

7979
@Test
8080
public void createDirWithExistingFilename() throws Exception {
81-
assumeFalse(DEFAULT_FS_AZURE_ENABLE_MKDIR_OVERWRITE &&
82-
getIsNamespaceEnabled(getFileSystem()),
81+
assumeFalse(DEFAULT_FS_AZURE_ENABLE_MKDIR_OVERWRITE
82+
&& getIsNamespaceEnabled(getFileSystem()),
8383
"Ignore test until default overwrite is set to false");
8484
final AzureBlobFileSystem fs = getFileSystem();
8585
Path path = path("testFilePath");

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemRandomRead.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,9 @@ public Long call() throws Exception {
217217
}
218218
);
219219
long elapsedTimeMs = timer.elapsedTimeMs();
220-
assertTrue(
221-
222-
elapsedTimeMs < MAX_ELAPSEDTIMEMS, String.format(
223-
"There should not be any network I/O (elapsedTimeMs=%1$d).",
224-
elapsedTimeMs));
220+
assertTrue(elapsedTimeMs < MAX_ELAPSEDTIMEMS, String.format(
221+
"There should not be any network I/O (elapsedTimeMs=%1$d).",
222+
elapsedTimeMs));
225223
}
226224
}
227225

@@ -268,11 +266,9 @@ public FSDataInputStream call() throws Exception {
268266
);
269267

270268
long elapsedTimeMs = timer.elapsedTimeMs();
271-
assertTrue(
272-
273-
elapsedTimeMs < MAX_ELAPSEDTIMEMS, String.format(
274-
"There should not be any network I/O (elapsedTimeMs=%1$d).",
275-
elapsedTimeMs));
269+
assertTrue(elapsedTimeMs < MAX_ELAPSEDTIMEMS, String.format(
270+
"There should not be any network I/O (elapsedTimeMs=%1$d).",
271+
elapsedTimeMs));
276272
}
277273
}
278274

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFilesystemAcl.java

Lines changed: 80 additions & 51 deletions
Large diffs are not rendered by default.

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemInitialization.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public void ensureAzureBlobFileSystemIsInitialized() throws Exception {
5151

5252
String scheme = this.getAuthType() == AuthType.SharedKey ? FileSystemUriSchemes.ABFS_SCHEME
5353
: FileSystemUriSchemes.ABFS_SECURE_SCHEME;
54-
assertEquals(fs.getUri(), new URI(scheme,filesystem + "@" + accountName,null,null,null));
54+
assertEquals(fs.getUri(), new URI(scheme,
55+
filesystem + "@" + accountName, null, null, null));
5556
assertNotNull(fs.getWorkingDirectory(), "working directory");
5657
}
5758

@@ -69,8 +70,8 @@ public void ensureSecureAzureBlobFileSystemIsInitialized() throws Exception {
6970

7071
try(SecureAzureBlobFileSystem fs = (SecureAzureBlobFileSystem) FileSystem.newInstance(rawConfig)) {
7172
assertEquals(fs.getUri(),
72-
new URI(FileSystemUriSchemes.ABFS_SECURE_SCHEME,filesystem + "@" +
73-
accountName,null,null,null));
73+
new URI(FileSystemUriSchemes.ABFS_SECURE_SCHEME, filesystem + "@" +
74+
accountName, null, null, null));
7475
assertNotNull(fs.getWorkingDirectory(), "working directory");
7576
}
7677
}

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestFileSystemProperties.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ public void testBase64InvalidFileSystemProperties() throws Exception {
112112
.getFilesystemProperties(tracingContext);
113113
assertEquals(properties, fetchedProperties);
114114
});
115-
116-
}
115+
}
117116

118117
@Test
119118
public void testBase64InvalidPathProperties() throws Exception {
@@ -129,8 +128,7 @@ public void testBase64InvalidPathProperties() throws Exception {
129128
.getPathStatus(testPath, tracingContext);
130129
assertEquals(properties, fetchedProperties);
131130
});
132-
133-
}
131+
}
134132

135133
@Test
136134
public void testSetFileSystemProperties() throws Exception {

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestWasbAbfsCompatibility.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import static org.apache.hadoop.fs.contract.ContractTestUtils.assertMkdirs;
4848
import static org.apache.hadoop.fs.contract.ContractTestUtils.assertPathExists;
4949
import static org.junit.jupiter.api.Assumptions.assumeFalse;
50-
import static org.junit.jupiter.api.Assumptions.assumeTrue;
5150

5251
/**
5352
* Test compatibility between ABFS client and WASB client.

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/extensions/ITestAbfsDelegationTokens.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
import java.io.PrintStream;
2525
import java.net.URI;
2626

27-
import org.junit.jupiter.api.*;
27+
import org.junit.jupiter.api.AfterAll;
28+
import org.junit.jupiter.api.AfterEach;
29+
import org.junit.jupiter.api.BeforeAll;
30+
import org.junit.jupiter.api.BeforeEach;
31+
import org.junit.jupiter.api.Test;
2832
import org.slf4j.Logger;
2933
import org.slf4j.LoggerFactory;
3034

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/extensions/TestDTManagerLifecycle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void testBindingThroughManager() throws Throwable {
129129
AbfsDelegationTokenManager manager = new AbfsDelegationTokenManager(conf);
130130
manager.bind(FSURI, conf);
131131
StubDelegationTokenManager stub = getTokenManager(manager);
132-
assertEquals(ABFS, stub.createServiceText().toString(),"Service in " + manager);
132+
assertEquals(ABFS, stub.createServiceText().toString(), "Service in " + manager);
133133
assertEquals(FSURI, stub.getFsURI(), "Binding URI of " + stub);
134134

135135
Token<DelegationTokenIdentifier> token = manager.getDelegationToken(

0 commit comments

Comments
 (0)