@@ -251,7 +251,7 @@ private void testCreate() throws Exception {
251251 try {
252252 testCreate (path , false );
253253 fail ("the create should have failed because the file exists " +
254- "and override is FALSE" );
254+ "and override is FALSE" );
255255 } catch (IOException ex ) {
256256 System .out .println ("#" );
257257 } catch (Exception ex ) {
@@ -311,8 +311,8 @@ private void testTruncate() throws Exception {
311311
312312 private void assertPathCapabilityForTruncate (Path file ) throws Exception {
313313 FileSystem fs = this .getHttpFSFileSystem ();
314- assertTrue (
315- fs . hasPathCapability ( file , CommonPathCapabilities . FS_TRUNCATE ), "HttpFS/WebHdfs/SWebHdfs support truncate" );
314+ assertTrue (fs . hasPathCapability ( file , CommonPathCapabilities . FS_TRUNCATE ),
315+ "HttpFS/WebHdfs/SWebHdfs support truncate" );
316316 fs .close ();
317317 }
318318
@@ -482,18 +482,18 @@ private void testFileStatusAttr() throws Exception {
482482 // Get the FileSystem instance that's being tested
483483 FileSystem fs = this .getHttpFSFileSystem ();
484484 // Check FileStatus
485- assertFalse (
486- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot should be disallowed by default" );
485+ assertFalse (fs . getFileStatus ( path ). isSnapshotEnabled (),
486+ "Snapshot should be disallowed by default" );
487487 // Allow snapshot
488488 distributedFs .allowSnapshot (path );
489489 // Check FileStatus
490- assertTrue (
491- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot enabled bit is not set in FileStatus" );
490+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
491+ "Snapshot enabled bit is not set in FileStatus" );
492492 // Disallow snapshot
493493 distributedFs .disallowSnapshot (path );
494494 // Check FileStatus
495- assertFalse (
496- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot enabled bit is not cleared in FileStatus" );
495+ assertFalse (fs . getFileStatus ( path ). isSnapshotEnabled (),
496+ "Snapshot enabled bit is not cleared in FileStatus" );
497497 // Cleanup
498498 fs .delete (path , true );
499499 fs .close ();
@@ -1174,9 +1174,9 @@ private void testStoragePolicy() throws Exception {
11741174 Path path = new Path (getProxiedFSTestDir (), "policy.txt" );
11751175 FileSystem httpfs = getHttpFSFileSystem ();
11761176 // test getAllStoragePolicies
1177- assertArrayEquals (
1178-
1179- fs . getAllStoragePolicies (). toArray (), httpfs . getAllStoragePolicies (). toArray (), "Policy array returned from the DFS and HttpFS should be equals" );
1177+ assertArrayEquals (fs . getAllStoragePolicies (). toArray (),
1178+ httpfs . getAllStoragePolicies (). toArray (),
1179+ "Policy array returned from the DFS and HttpFS should be equals" );
11801180
11811181 // test get/set/unset policies
11821182 DFSTestUtil .createFile (fs , path , 0 , (short ) 1 , 0L );
@@ -1191,14 +1191,12 @@ private void testStoragePolicy() throws Exception {
11911191 assertEquals (HdfsConstants .COLD_STORAGE_POLICY_NAME .toString (),
11921192 httpFsPolicy .getName (), "Storage policy returned from the get API should" +
11931193 " be same as set policy" );
1194- assertEquals (
1195-
1196- httpFsPolicy , dfsPolicy , "Storage policy returned from the DFS and HttpFS should be equals" );
1194+ assertEquals (httpFsPolicy , dfsPolicy ,
1195+ "Storage policy returned from the DFS and HttpFS should be equals" );
11971196 // unset policy
11981197 httpfs .unsetStoragePolicy (path );
1199- assertEquals (
1200- defaultdfsPolicy , httpfs .getStoragePolicy (path ), "After unset storage policy, the get API shoudld"
1201- + " return the default policy" );
1198+ assertEquals (defaultdfsPolicy , httpfs .getStoragePolicy (path ),
1199+ "After unset storage policy, the get API shoudld return the default policy" );
12021200 fs .close ();
12031201 }
12041202
@@ -1433,16 +1431,16 @@ private void testCreateSnapshot(String snapshotName) throws Exception {
14331431 }
14341432 Path snapshotsDir = new Path ("/tmp/tmp-snap-test/.snapshot" );
14351433 FileStatus [] snapshotItems = fs .listStatus (snapshotsDir );
1436- assertTrue (
1437- snapshotItems . length == 1 , "Should have exactly one snapshot." );
1434+ assertTrue (snapshotItems . length == 1 ,
1435+ "Should have exactly one snapshot." );
14381436 String resultingSnapName = snapshotItems [0 ].getPath ().getName ();
14391437 if (snapshotName == null ) {
14401438 assertTrue (
14411439 Pattern .matches ("(s)(\\ d{8})(-)(\\ d{6})(\\ .)(\\ d{3})" ,
14421440 resultingSnapName ), "Snapshot auto generated name not matching pattern" );
14431441 } else {
1444- assertTrue (
1445- snapshotName . equals ( resultingSnapName ), "Snapshot name is not same as passed name." );
1442+ assertTrue (snapshotName . equals ( resultingSnapName ),
1443+ "Snapshot name is not same as passed name." );
14461444 }
14471445 cleanSnapshotTests (snapshottablePath , resultingSnapName );
14481446 }
@@ -1492,11 +1490,11 @@ private void testRenameSnapshot() throws Exception {
14921490 "snap-new-name" );
14931491 Path snapshotsDir = new Path ("/tmp/tmp-snap-test/.snapshot" );
14941492 FileStatus [] snapshotItems = fs .listStatus (snapshotsDir );
1495- assertTrue (
1496- snapshotItems . length == 1 , "Should have exactly one snapshot." );
1493+ assertTrue (snapshotItems . length == 1 ,
1494+ "Should have exactly one snapshot." );
14971495 String resultingSnapName = snapshotItems [0 ].getPath ().getName ();
1498- assertTrue (
1499- "snap-new-name" . equals ( resultingSnapName ), "Snapshot name is not same as passed name." );
1496+ assertTrue ("snap-new-name" . equals ( resultingSnapName ),
1497+ "Snapshot name is not same as passed name." );
15001498 cleanSnapshotTests (snapshottablePath , resultingSnapName );
15011499 }
15021500 }
@@ -1510,12 +1508,12 @@ private void testDeleteSnapshot() throws Exception {
15101508 fs .createSnapshot (snapshottablePath , "snap-to-delete" );
15111509 Path snapshotsDir = new Path ("/tmp/tmp-snap-test/.snapshot" );
15121510 FileStatus [] snapshotItems = fs .listStatus (snapshotsDir );
1513- assertTrue (
1514- snapshotItems . length == 1 , "Should have exactly one snapshot." );
1511+ assertTrue (snapshotItems . length == 1 ,
1512+ "Should have exactly one snapshot." );
15151513 fs .deleteSnapshot (snapshottablePath , "snap-to-delete" );
15161514 snapshotItems = fs .listStatus (snapshotsDir );
1517- assertTrue (
1518- snapshotItems . length == 0 , "There should be no snapshot anymore." );
1515+ assertTrue (snapshotItems . length == 0 ,
1516+ "There should be no snapshot anymore." );
15191517 fs .delete (snapshottablePath , true );
15201518 }
15211519 }
@@ -1528,8 +1526,8 @@ private void testAllowSnapshot() throws Exception {
15281526 // Get the FileSystem instance that's being tested
15291527 FileSystem fs = this .getHttpFSFileSystem ();
15301528 // Check FileStatus
1531- assertFalse (
1532- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot should be disallowed by default" );
1529+ assertFalse (fs . getFileStatus ( path ). isSnapshotEnabled (),
1530+ "Snapshot should be disallowed by default" );
15331531 // Allow snapshot
15341532 if (fs instanceof HttpFSFileSystem ) {
15351533 HttpFSFileSystem httpFS = (HttpFSFileSystem ) fs ;
@@ -1542,8 +1540,8 @@ private void testAllowSnapshot() throws Exception {
15421540 " doesn't support allowSnapshot" );
15431541 }
15441542 // Check FileStatus
1545- assertTrue (
1546- fs . getFileStatus ( path ). isSnapshotEnabled (), "allowSnapshot failed" );
1543+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
1544+ "allowSnapshot failed" );
15471545 // Cleanup
15481546 fs .delete (path , true );
15491547 }
@@ -1557,8 +1555,8 @@ private void testDisallowSnapshot() throws Exception {
15571555 // Get the FileSystem instance that's being tested
15581556 FileSystem fs = this .getHttpFSFileSystem ();
15591557 // Check FileStatus
1560- assertTrue (
1561- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot should be allowed by DFS" );
1558+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
1559+ "Snapshot should be allowed by DFS" );
15621560 // Disallow snapshot
15631561 if (fs instanceof HttpFSFileSystem ) {
15641562 HttpFSFileSystem httpFS = (HttpFSFileSystem ) fs ;
@@ -1571,8 +1569,8 @@ private void testDisallowSnapshot() throws Exception {
15711569 " doesn't support disallowSnapshot" );
15721570 }
15731571 // Check FileStatus
1574- assertFalse (
1575- fs . getFileStatus ( path ). isSnapshotEnabled (), "disallowSnapshot failed" );
1572+ assertFalse (fs . getFileStatus ( path ). isSnapshotEnabled (),
1573+ "disallowSnapshot failed" );
15761574 // Cleanup
15771575 fs .delete (path , true );
15781576 }
@@ -1586,8 +1584,8 @@ private void testDisallowSnapshotException() throws Exception {
15861584 // Get the FileSystem instance that's being tested
15871585 FileSystem fs = this .getHttpFSFileSystem ();
15881586 // Check FileStatus
1589- assertTrue (
1590- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot should be allowed by DFS" );
1587+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
1588+ "Snapshot should be allowed by DFS" );
15911589 // Create some snapshots
15921590 fs .createSnapshot (path , "snap-01" );
15931591 fs .createSnapshot (path , "snap-02" );
@@ -1619,8 +1617,8 @@ private void testDisallowSnapshotException() throws Exception {
16191617 }
16201618 // Check FileStatus, should still be enabled since
16211619 // disallow snapshot should fail
1622- assertTrue (
1623- fs . getFileStatus ( path ). isSnapshotEnabled (), "disallowSnapshot should not have succeeded" );
1620+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
1621+ "disallowSnapshot should not have succeeded" );
16241622 // Cleanup
16251623 fs .deleteSnapshot (path , "snap-02" );
16261624 fs .deleteSnapshot (path , "snap-01" );
@@ -1707,8 +1705,8 @@ private void testGetSnapshotDiffIllegalParam() throws Exception {
17071705 // Get the FileSystem instance that's being tested
17081706 FileSystem fs = this .getHttpFSFileSystem ();
17091707 // Check FileStatus
1710- assertTrue (
1711- fs . getFileStatus ( path ). isSnapshotEnabled (), "Snapshot should be allowed by DFS" );
1708+ assertTrue (fs . getFileStatus ( path ). isSnapshotEnabled (),
1709+ "Snapshot should be allowed by DFS" );
17121710 assertTrue (fs .getFileStatus (path ).isSnapshotEnabled ());
17131711 // Get snapshot diff
17141712 testGetSnapshotDiffIllegalParamCase (fs , path , "" , "" );
@@ -1870,8 +1868,7 @@ private void verifyGetServerDefaults(FileSystem fs, DistributedFileSystem dfs)
18701868 WebHdfsFileSystem webHdfsFileSystem = (WebHdfsFileSystem ) fs ;
18711869 sds = webHdfsFileSystem .getServerDefaults ();
18721870 } else {
1873- fail (
1874- fs .getClass ().getSimpleName () + " doesn't support getServerDefaults" );
1871+ fail (fs .getClass ().getSimpleName () + " doesn't support getServerDefaults" );
18751872 }
18761873 // Verify result with DFS
18771874 FsServerDefaults dfssds = dfs .getServerDefaults ();
0 commit comments