From 2af61718b11ac7eebdc01a5104c16bcaf94715d1 Mon Sep 17 00:00:00 2001 From: Jan Hentschel Date: Sun, 17 Dec 2017 19:51:11 +0100 Subject: [PATCH] HBASE-19541 Removed unnecessary semicolons in hbase-server --- .../java/org/apache/hadoop/hbase/Server.java | 2 +- .../ZKSplitLogManagerCoordination.java | 4 ++-- .../coprocessor/ObserverContextImpl.java | 2 +- .../FanOutOneBlockAsyncDFSOutputHelper.java | 2 +- .../hadoop/hbase/io/hfile/BlockCache.java | 2 +- .../hadoop/hbase/io/hfile/Cacheable.java | 2 +- .../hadoop/hbase/io/hfile/HFileBlock.java | 2 +- .../apache/hadoop/hbase/master/HMaster.java | 2 +- .../hadoop/hbase/master/ServerListener.java | 6 ++--- .../procedure/ServerProcedureInterface.java | 2 +- .../procedure/TableProcedureInterface.java | 2 +- .../mob/compactions/MobCompactionRequest.java | 2 +- .../hbase/monitoring/MonitoredTask.java | 2 +- .../hadoop/hbase/procedure/Subprocedure.java | 2 +- .../MasterFlushTableProcedureManager.java | 2 +- .../hadoop/hbase/regionserver/FlushType.java | 2 +- .../hbase/regionserver/StoreFileInfo.java | 3 +-- .../hadoop/hbase/regionserver/wal/FSHLog.java | 2 +- .../hbase/regionserver/wal/FSWALEntry.java | 2 +- .../security/access/AccessControlFilter.java | 2 +- .../visibility/expression/Operator.java | 2 +- .../hadoop/hbase/util/BloomFilterFactory.java | 2 +- .../apache/hadoop/hbase/util/HBaseFsck.java | 12 ++++------ .../hbase/util/ShutdownHookManager.java | 5 ++-- .../hbase/client/TestMetaWithReplicas.java | 12 +++++----- .../hbase/client/TestSnapshotWithAcl.java | 2 +- .../hbase/client/TestSplitOrMergeStatus.java | 4 ++-- .../hbase/coprocessor/TestWALObserver.java | 2 +- .../hadoop/hbase/io/hfile/TagUsage.java | 3 +-- .../hbase/io/hfile/TestCacheConfig.java | 6 ++--- .../io/hfile/TestHFileDataBlockEncoder.java | 2 +- .../hbase/mapreduce/MapreduceTestingShim.java | 5 ++-- .../hadoop/hbase/master/AbstractTestDLS.java | 2 +- .../hbase/master/TestMasterNoCluster.java | 2 +- .../hbase/master/TestMasterShutdown.java | 2 +- .../hbase/master/TestSplitLogManager.java | 2 +- .../master/cleaner/TestCleanerChore.java | 2 +- .../master/snapshot/TestAssignProcedure.java | 2 +- .../snapshot/TestSnapshotFileCache.java | 2 +- .../hadoop/hbase/procedure/TestProcedure.java | 2 +- .../hbase/regionserver/RegionAsTable.java | 2 +- .../hbase/regionserver/TestBulkLoad.java | 8 +++---- .../regionserver/TestHRegionFileSystem.java | 2 +- .../regionserver/TestHRegionReplayEvents.java | 2 +- .../regionserver/TestMobStoreScanner.java | 4 ++-- .../regionserver/TestMultiLogThreshold.java | 2 +- .../TestRegionReplicaFailover.java | 2 +- .../hbase/regionserver/TestStoreScanner.java | 6 ++--- .../hbase/regionserver/TestWALLockup.java | 4 ++-- .../wal/AbstractTestWALReplay.java | 2 +- .../security/access/TestAccessController.java | 24 +++++++++---------- .../access/TestAccessController2.java | 24 +++++++++---------- .../visibility/TestVisibilityLabels.java | 6 ++--- .../TestVisibilityLabelsReplication.java | 4 ++-- ...ilityLabelsWithDefaultVisLabelService.java | 2 +- .../TestVisibilityLabelsWithDeletes.java | 6 ++--- .../snapshot/TestFlushSnapshotFromClient.java | 2 +- .../hbase/tool/MapreduceTestingShim.java | 5 ++-- .../util/ProcessBasedLocalHBaseCluster.java | 2 +- .../hadoop/hbase/util/TestFSHDFSUtils.java | 2 +- .../hadoop/hbase/wal/IOTestProvider.java | 2 +- .../hadoop/hbase/wal/TestWALMethods.java | 2 +- 62 files changed, 114 insertions(+), 121 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java index 65c0322e960..53a757a7264 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/Server.java @@ -103,7 +103,7 @@ public interface Server extends Abortable, Stoppable { // If an exception, just return null } return fs; - }; + } /** * @return True is the server is Stopping diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java index 4e0c973d8c2..6ec257f03f0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZKSplitLogManagerCoordination.java @@ -223,7 +223,7 @@ public class ZKSplitLogManagerCoordination extends ZKListener implements @Override public void checkTasks() { rescan(Long.MAX_VALUE); - }; + } /** * signal the workers that a task was resubmitted by creating the RESCAN node. @@ -554,7 +554,7 @@ public class ZKSplitLogManagerCoordination extends ZKListener implements /** * task completed with error */ - ERR(); + ERR() } /** diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ObserverContextImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ObserverContextImpl.java index 7de6f0b4440..89795e68814 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ObserverContextImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/ObserverContextImpl.java @@ -58,7 +58,7 @@ public class ObserverContextImpl implements Ob public boolean isBypassable() { return this.bypassable; - }; + } public void bypass() { if (!this.bypassable) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java index 4fa06a4de4d..e82b0518da3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java @@ -212,7 +212,7 @@ public final class FanOutOneBlockAsyncDFSOutputHelper { throw new RuntimeException(e.getCause()); } } - }; + } Object createObject(ClientProtocol instance, String src, FsPermission masked, String clientName, EnumSetWritable flag, boolean createParent, short replication, long blockSize, diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java index 50d85084c37..25ca735d746 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java @@ -143,5 +143,5 @@ public interface BlockCache extends Iterable { * @param cacheKey the cache key of the block * @param block the hfileblock to be returned */ - default void returnBlock(BlockCacheKey cacheKey, Cacheable block){}; + default void returnBlock(BlockCacheKey cacheKey, Cacheable block){} } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/Cacheable.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/Cacheable.java index a2e621f8789..ca33b5da4eb 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/Cacheable.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/Cacheable.java @@ -73,6 +73,6 @@ public interface Cacheable extends HeapSize { * exclusive memory area of this Cacheable. */ public static enum MemoryType { - SHARED, EXCLUSIVE; + SHARED, EXCLUSIVE } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java index 992ebbde59f..52f14bfe3ed 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java @@ -834,7 +834,7 @@ public class HFileBlock implements Cacheable { INIT, WRITING, BLOCK_READY - }; + } /** Writer state. Used to ensure the correct usage protocol. */ private State state = State.INIT; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 945f54d7d70..3b7e8fffa54 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -3429,7 +3429,7 @@ public class HMaster extends HRegionServer implements MasterServices { } if (this.serverManager.addServerToDrainList(server)) { serversAdded.add(server); - }; + } } // Move the regions off the decommissioned servers. if (offload) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerListener.java index fc38ad8c6cb..ba177ad0bc6 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerListener.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerListener.java @@ -30,17 +30,17 @@ public interface ServerListener { /** * Started waiting on RegionServers to check-in. */ - default void waiting() {}; + default void waiting() {} /** * The server has joined the cluster. * @param serverName The remote servers name. */ - default void serverAdded(final ServerName serverName) {}; + default void serverAdded(final ServerName serverName) {} /** * The server was removed from the cluster. * @param serverName The remote servers name. */ - default void serverRemoved(final ServerName serverName) {}; + default void serverRemoved(final ServerName serverName) {} } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerProcedureInterface.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerProcedureInterface.java index ad6af217995..798357ef272 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerProcedureInterface.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ServerProcedureInterface.java @@ -30,7 +30,7 @@ import org.apache.yetus.audience.InterfaceStability; public interface ServerProcedureInterface { public enum ServerOperationType { CRASH_HANDLER - }; + } /** * @return Name of this server instance. diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableProcedureInterface.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableProcedureInterface.java index 98346bb3473..b9ead26b5f3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableProcedureInterface.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableProcedureInterface.java @@ -33,7 +33,7 @@ public interface TableProcedureInterface { CREATE, DELETE, DISABLE, EDIT, ENABLE, READ, REGION_EDIT, REGION_SPLIT, REGION_MERGE, REGION_ASSIGN, REGION_UNASSIGN, REGION_GC, MERGED_REGIONS_GC/* region operations */ - }; + } /** * @return the name of the table the procedure is operating on diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/MobCompactionRequest.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/MobCompactionRequest.java index 73e74ff37be..5025ed26122 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/MobCompactionRequest.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/MobCompactionRequest.java @@ -59,6 +59,6 @@ public abstract class MobCompactionRequest { /** * All of mob files are selected. */ - ALL_FILES; + ALL_FILES } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTask.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTask.java index ffad68e5598..f0eefd7016e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTask.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/MonitoredTask.java @@ -29,7 +29,7 @@ public interface MonitoredTask extends Cloneable { RUNNING, WAITING, COMPLETE, - ABORTED; + ABORTED } long getStartTime(); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java index 6416e6a65b9..21aff69b0ae 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java @@ -337,5 +337,5 @@ abstract public class Subprocedure implements Callable { @Override public void cleanup(Exception e) {} - }; + } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/MasterFlushTableProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/MasterFlushTableProcedureManager.java index 75e041a15df..bced854d100 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/MasterFlushTableProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/MasterFlushTableProcedureManager.java @@ -71,7 +71,7 @@ public class MasterFlushTableProcedureManager extends MasterProcedureManager { private Map procMap = new HashMap<>(); private boolean stopped; - public MasterFlushTableProcedureManager() {}; + public MasterFlushTableProcedureManager() {} @Override public void stop(String why) { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushType.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushType.java index e9fd8895426..5c94a7832e7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushType.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/FlushType.java @@ -33,5 +33,5 @@ enum FlushType { ABOVE_ONHEAP_HIGHER_MARK,/* happens due to higher mark breach of onheap memstore settings An offheap memstore can even breach the onheap_higher_mark*/ ABOVE_OFFHEAP_LOWER_MARK,/* happens due to lower mark breach of offheap memstore settings*/ - ABOVE_OFFHEAP_HIGHER_MARK;/*/* happens due to higer mark breach of offheap memstore settings*/ + ABOVE_OFFHEAP_HIGHER_MARK /* happens due to higer mark breach of offheap memstore settings*/ } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java index a1fe2d1e224..e7419d53483 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java @@ -552,8 +552,7 @@ public class StoreFileInfo { if (link != o.link && link != null && !link.equals(o.link)) return false; return true; - }; - + } @Override public int hashCode() { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java index 0c880f53dfc..a1dd2d0c55b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java @@ -290,7 +290,7 @@ public class FSHLog extends AbstractFSWAL { */ @VisibleForTesting protected void beforeWaitOnSafePoint() { - }; + } @Override protected void doAppend(Writer writer, FSWALEntry entry) throws IOException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSWALEntry.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSWALEntry.java index 57eccbbded3..6efd7bc3a26 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSWALEntry.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSWALEntry.java @@ -87,7 +87,7 @@ class FSWALEntry extends Entry { public String toString() { return "sequence=" + this.txid + ", " + super.toString(); - }; + } boolean isInMemStore() { return this.inMemstore; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlFilter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlFilter.java index bfc415c3c4e..e0427ce72b5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlFilter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlFilter.java @@ -55,7 +55,7 @@ class AccessControlFilter extends FilterBase { CHECK_TABLE_AND_CF_ONLY, /** Cell permissions can override table or CF permissions */ CHECK_CELL_DEFAULT, - }; + } private TableAuthManager authManager; private TableName table; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/expression/Operator.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/expression/Operator.java index fdec5ac50d7..0bb81378bc0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/expression/Operator.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/expression/Operator.java @@ -31,5 +31,5 @@ public enum Operator { public String toString() { return String.valueOf(this.rep); - }; + } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterFactory.java index 89ff5b7222e..506aa210f91 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterFactory.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterFactory.java @@ -229,4 +229,4 @@ public final class BloomFilterFactory { writer.addInlineBlockWriter(bloomWriter); return bloomWriter; } -}; +} diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java index 5ca1ed671bf..81ff495822e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java @@ -2765,8 +2765,7 @@ public class HBaseFsck extends Configured implements Closeable { handler.handleOverlapGroup(overlapgroup); return null; } - }; - + } /** * Maintain information about a particular table. @@ -2936,7 +2935,7 @@ public class HBaseFsck extends Configured implements Closeable { + ". You need to create a new .regioninfo and region " + "dir in hdfs to plug the hole."); } - }; + } /** * This handler fixes integrity errors from hdfs information. There are @@ -4429,7 +4428,7 @@ public class HBaseFsck extends Configured implements Closeable { } catch (ExecutionException e) { LOG.error("Unexpected exec exception! Should've been caught already. (Bug?)", e); // Shouldn't happen, we already logged/caught any exceptions in the Runnable - }; + } } } catch (IOException e) { LOG.error("Cannot execute WorkItemHdfsDir for " + tableDir, e); @@ -4489,7 +4488,7 @@ public class HBaseFsck extends Configured implements Closeable { } return null; } - }; + } /** * Display the full report from fsck. This displays all live and dead region @@ -4858,8 +4857,7 @@ public class HBaseFsck extends Configured implements Closeable { hbck.close(); return hbck.getRetCode(); } - }; - + } public HBaseFsck exec(ExecutorService exec, String[] args) throws KeeperException, IOException, InterruptedException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ShutdownHookManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ShutdownHookManager.java index a897f400f5f..0464b7c3e57 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ShutdownHookManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/ShutdownHookManager.java @@ -64,7 +64,7 @@ abstract public class ShutdownHookManager { return Runtime.getRuntime().removeShutdownHook(shutdownHookThread); } - }; + } private static class ShutdownHookManagerV2 extends ShutdownHookManager { public void addShutdownHook(Thread shutdownHookThread, int priority) { @@ -91,6 +91,5 @@ abstract public class ShutdownHookManager { throw new RuntimeException("we could not use ShutdownHookManager", ex); } } - }; - + } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java index e01c28f60e3..ce908c09aec 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaWithReplicas.java @@ -182,8 +182,8 @@ public class TestMetaWithReplicas { util.getAdmin().deleteTable(TABLE); } ServerName master = null; - try (Connection c = ConnectionFactory.createConnection(util.getConfiguration());) { - try (Table htable = util.createTable(TABLE, FAMILIES);) { + try (Connection c = ConnectionFactory.createConnection(util.getConfiguration())) { + try (Table htable = util.createTable(TABLE, FAMILIES)) { util.getAdmin().flush(TableName.META_TABLE_NAME); Thread.sleep(conf.getInt(StorefileRefresherChore.REGIONSERVER_STOREFILE_REFRESH_PERIOD, 30000) * 6); @@ -219,7 +219,7 @@ public class TestMetaWithReplicas { Get get = null; Result r = null; byte[] row = "test".getBytes(); - try (Table htable = c.getTable(TABLE);) { + try (Table htable = c.getTable(TABLE)) { Put put = new Put(row); put.addColumn("foo".getBytes(), row, row); BufferedMutator m = c.getBufferedMutator(TABLE); @@ -237,7 +237,7 @@ public class TestMetaWithReplicas { ((ClusterConnection)c).clearRegionCache(); } conf.setBoolean(HConstants.USE_META_REPLICAS, false); - try (Table htable = c.getTable(TABLE);) { + try (Table htable = c.getTable(TABLE)) { r = htable.get(get); assertTrue(Arrays.equals(r.getRow(), row)); } @@ -252,7 +252,7 @@ public class TestMetaWithReplicas { TEST_UTIL.getAdmin().disableTable(tableName); TEST_UTIL.getAdmin().deleteTable(tableName); } - try (Table htable = TEST_UTIL.createTable(tableName, FAMILIES);) { + try (Table htable = TEST_UTIL.createTable(tableName, FAMILIES)) { byte[] row = "test".getBytes(); ConnectionImplementation c = ((ConnectionImplementation) TEST_UTIL.getConnection()); // check that metalookup pool would get created @@ -440,7 +440,7 @@ public class TestMetaWithReplicas { // checks that the when the server holding meta replica is shut down, the meta replica // can be recovered try (ClusterConnection conn = (ClusterConnection) - ConnectionFactory.createConnection(TEST_UTIL.getConfiguration());) { + ConnectionFactory.createConnection(TEST_UTIL.getConfiguration())) { RegionLocations rl = conn. locateRegion(TableName.META_TABLE_NAME, Bytes.toBytes(""), false, true); HRegionLocation hrl = rl.getRegionLocation(1); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithAcl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithAcl.java index df2a6e8a1fc..71019602312 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithAcl.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotWithAcl.java @@ -87,7 +87,7 @@ public class TestSnapshotWithAcl extends SecureTestUtil { } return null; } - }; + } static class AccessWriteAction implements AccessTestAction { private TableName tableName; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSplitOrMergeStatus.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSplitOrMergeStatus.java index 678134bb401..9415ce378a3 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSplitOrMergeStatus.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSplitOrMergeStatus.java @@ -90,7 +90,7 @@ public class TestSplitOrMergeStatus { assertFalse(results[0]); admin.split(t.getName()); while ((count = admin.getTableRegions(tableName).size()) == originalCount) { - Threads.sleep(1);; + Threads.sleep(1); } count = admin.getTableRegions(tableName).size(); assertTrue(originalCount < count); @@ -110,7 +110,7 @@ public class TestSplitOrMergeStatus { admin.split(t.getName()); int postSplitCount = -1; while ((postSplitCount = admin.getTableRegions(tableName).size()) == originalCount) { - Threads.sleep(1);; + Threads.sleep(1); } assertTrue("originalCount=" + originalCount + ", newCount=" + postSplitCount, originalCount != postSplitCount); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java index 86a0d391f1b..a6628bb7a24 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java @@ -349,7 +349,7 @@ public class TestWALObserver { // Make a new wal for new region open. final WALFactory wals2 = new WALFactory(conf, null, ServerName.valueOf(currentTest.getMethodName()+"2", 16010, System.currentTimeMillis()).toString()); - WAL wal2 = wals2.getWAL(UNSPECIFIED_REGION, null);; + WAL wal2 = wals2.getWAL(UNSPECIFIED_REGION, null); HRegion region = HRegion.openHRegion(newConf, FileSystem.get(newConf), hbaseRootDir, hri, htd, wal2, TEST_UTIL.getHBaseCluster().getRegionServer(0), null); long seqid2 = region.getOpenSeqNum(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TagUsage.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TagUsage.java index eae08c4d039..d73257e0033 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TagUsage.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TagUsage.java @@ -30,6 +30,5 @@ public enum TagUsage { // KVs with tags ONLY_TAG, // kvs with and without tags - PARTIAL_TAG; - + PARTIAL_TAG } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java index e07d2aa531d..c398d9420b1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java @@ -87,7 +87,7 @@ public class TestCacheConfig { LOG.info("Deserialized " + b); return cacheable; } - }; + } static class IndexCacheEntry extends DataCacheEntry { private static IndexCacheEntry SINGLETON = new IndexCacheEntry(); @@ -118,7 +118,7 @@ public class TestCacheConfig { @Override public String toString() { return "size=" + SIZE + ", type=" + getBlockType(); - }; + } @Override public long heapSize() { @@ -149,7 +149,7 @@ public class TestCacheConfig { public MemoryType getMemoryType() { return MemoryType.EXCLUSIVE; } - }; + } static class MetaCacheEntry extends DataCacheEntry { @Override diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java index 2d233766678..d0dc6a366da 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java @@ -88,7 +88,7 @@ public class TestHFileDataBlockEncoder { HeapSize heapSize = blockCache.getBlock(cacheKey, false, false, true); assertTrue(heapSize instanceof HFileBlock); - HFileBlock returnedBlock = (HFileBlock) heapSize;; + HFileBlock returnedBlock = (HFileBlock) heapSize; if (blockEncoder.getDataBlockEncoding() == DataBlockEncoding.NONE) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MapreduceTestingShim.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MapreduceTestingShim.java index b080d7f4264..66b2a71e1e1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MapreduceTestingShim.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/MapreduceTestingShim.java @@ -126,7 +126,7 @@ abstract public class MapreduceTestingShim { public String obtainMROutputDirProp() { return "mapred.output.dir"; } - }; + } private static class MapreduceV2Shim extends MapreduceTestingShim { public JobContext newJobContext(Configuration jobConf) { @@ -166,6 +166,5 @@ abstract public class MapreduceTestingShim { // from Hadoop 0.23.x. If we use the source directly we break the hadoop 1.x compile. return "mapreduce.output.fileoutputformat.outputdir"; } - }; - + } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java index f3d53c152ad..50168b28fd6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/AbstractTestDLS.java @@ -262,7 +262,7 @@ public abstract class AbstractTestDLS { master.balanceSwitch(false); try (ZKWatcher zkw = new ZKWatcher(conf, "table-creation", null); - Table ht = installTable(zkw, numRegionsToCreate);) { + Table ht = installTable(zkw, numRegionsToCreate)) { HRegionServer hrs = findRSToKill(false); List regions = ProtobufUtil.getOnlineRegions(hrs.getRSRpcServices()); makeWAL(hrs, regions, numLogLines, 100); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java index fd44c891b8f..3af1bc92e6d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java @@ -228,7 +228,7 @@ public class TestMasterNoCluster { while (!master.serviceStarted) Threads.sleep(10); // Fake master that there are regionservers out there. Report in. for (int i = 0; i < sns.length; i++) { - RegionServerReportRequest.Builder request = RegionServerReportRequest.newBuilder();; + RegionServerReportRequest.Builder request = RegionServerReportRequest.newBuilder(); ServerName sn = ServerName.parseVersionedServerName(sns[i].getVersionedBytes()); request.setServer(ProtobufUtil.toServerName(sn)); request.setLoad(ServerMetricsBuilder.toServerLoad(ServerMetricsBuilder.of(sn))); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java index 29c24f77b54..9351369587b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java @@ -134,7 +134,7 @@ public class TestMasterShutdown { cluster.waitOnMaster(MASTER_INDEX); } catch (Exception e) { } - }; + } }; shutdownThread.start(); LOG.info("Called master join on " + master.getName()); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java index cd5239edbe4..505dda4fea0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java @@ -542,7 +542,7 @@ public class TestSplitLogManager { } } } - }; + } }.start(); slm.splitLogDistributed(logDirPath); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java index 95178e2afc5..7b49848b327 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestCleanerChore.java @@ -433,7 +433,7 @@ public class TestCleanerChore { protected boolean validate(Path file) { return true; } - }; + } public static class AlwaysDelete extends BaseHFileCleanerDelegate { @Override diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestAssignProcedure.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestAssignProcedure.java index ed53c3af56a..ba14a1384fb 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestAssignProcedure.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestAssignProcedure.java @@ -116,7 +116,7 @@ public class TestAssignProcedure { // Happens after the code we are testing has been called. this.remoteCallFailedWasCalled.set(true); } - }; + } /** * Test that we deal with ServerCrashProcedure zero'ing out the targetServer in the diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java index 60c9c4b71b1..e2f326e1a73 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java @@ -208,7 +208,7 @@ public class TestSnapshotFileCache { files.addAll(SnapshotReferenceUtil.getHFileNames(UTIL.getConfiguration(), fs, snapshotDir)); return files; } - }; + } private SnapshotMock.SnapshotBuilder createAndTestSnapshotV1(final SnapshotFileCache cache, final String name, final boolean tmp, final boolean removeOnExit) throws IOException { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java index 0603b21446c..cc486230829 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestProcedure.java @@ -77,7 +77,7 @@ public class TestProcedure { public void sendGlobalBarrierComplete() { completedProcedure.countDown(); } - }; + } /** * With a single member, verify ordered execution. The Coordinator side is run in a separate diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java index 2fbaaffd0f7..3c06d6e77c0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java @@ -186,7 +186,7 @@ public class RegionAsTable implements Table { public ScanMetrics getScanMetrics() { throw new UnsupportedOperationException(); } - }; + } @Override public ResultScanner getScanner(Scan scan) throws IOException { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java index f3c5da60e99..178ea2e4458 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java @@ -120,7 +120,7 @@ public class TestBulkLoad { walKey.setWriteEntry(we); } return 01L; - }; + } }); testRegionWithFamiliesAndSpecifiedTableName(tableName, family1) .bulkLoadHFiles(familyPaths, false, null); @@ -145,7 +145,7 @@ public class TestBulkLoad { walKey.setWriteEntry(we); } return 01L; - }; + } }); testRegionWithFamilies(family1).bulkLoadHFiles(withFamilyPathsFor(family1), false, null); verify(log).sync(anyLong()); @@ -164,7 +164,7 @@ public class TestBulkLoad { walKey.setWriteEntry(we); } return 01L; - }; + } }); testRegionWithFamilies(family1, family2).bulkLoadHFiles(withFamilyPathsFor(family1, family2), false, null); @@ -184,7 +184,7 @@ public class TestBulkLoad { walKey.setWriteEntry(we); } return 01L; - }; + } }); TableName tableName = TableName.valueOf("test", "test"); testRegionWithFamiliesAndSpecifiedTableName(tableName, family1, family2) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionFileSystem.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionFileSystem.java index 0514005b603..85e7ada4ef2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionFileSystem.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionFileSystem.java @@ -352,7 +352,7 @@ public class TestHRegionFileSystem { // Create a Region String familyName = "cf"; - ; + RegionInfo hri = RegionInfoBuilder.newBuilder(TableName.valueOf(name.getMethodName())).build(); HRegionFileSystem regionFs = HRegionFileSystem.createRegionOnFileSystem(conf, fs, rootDir, hri); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java index ba8d193ad04..7a2438b3286 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java @@ -414,7 +414,7 @@ public class TestHRegionReplayEvents { } } } else { - lastReplayed = replayEdit(secondaryRegion, entry);; + lastReplayed = replayEdit(secondaryRegion, entry); } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreScanner.java index 59e4ded1262..b221106f2a0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreScanner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMobStoreScanner.java @@ -304,7 +304,7 @@ public class TestMobStoreScanner { long ts1 = System.currentTimeMillis(); long ts2 = ts1 + 1; long ts3 = ts1 + 2; - byte [] value = generateMobValue((int)defaultThreshold+1);; + byte [] value = generateMobValue((int)defaultThreshold+1); Put put1 = new Put(row1); put1.addColumn(family, qf1, ts3, value); @@ -387,7 +387,7 @@ public class TestMobStoreScanner { long ts1 = System.currentTimeMillis(); long ts2 = ts1 + 1; long ts3 = ts1 + 2; - byte [] value = generateMobValue((int)defaultThreshold+1);; + byte [] value = generateMobValue((int)defaultThreshold+1); // Put some data Put put1 = new Put(row1); put1.addColumn(family, qf1, ts3, value); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java index 39f76203fc3..fcf64fee7f8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiLogThreshold.java @@ -75,7 +75,7 @@ public class TestMultiLogThreshold { } private enum ActionType { - REGION_ACTIONS, ACTIONS; + REGION_ACTIONS, ACTIONS } /** diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java index 3889e55a272..00988b3c7f2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicaFailover.java @@ -293,7 +293,7 @@ public class TestRegionReplicaFailover { } catch (Throwable e) { ex.compareAndSet(null, e); } - }; + } }; aborter.start(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java index 1f5db50b35e..d147cc921d1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java @@ -203,7 +203,7 @@ public class TestStoreScanner { PrivateCellUtil.createFirstOnRow(CELL_GRID[CELL_GRID_BLOCK3_BOUNDARY]): PrivateCellUtil.createFirstOnRow(CELL_GRID[CELL_GRID_BLOCK2_BOUNDARY]); } - }; + } private static final int CELL_WITH_VERSIONS_BLOCK2_BOUNDARY = 4; @@ -243,7 +243,7 @@ public class TestStoreScanner { return PrivateCellUtil .createFirstOnRow(CELL_WITH_VERSIONS[CELL_WITH_VERSIONS_BLOCK2_BOUNDARY]); } - }; + } private static class CellWithVersionsNoOptimizeStoreScanner extends StoreScanner { // Count of how often optimize is called and of how often it does an optimize. @@ -269,7 +269,7 @@ public class TestStoreScanner { public Cell getNextIndexedKey() { return null; } - }; + } @Test public void testWithColumnCountGetFilter() throws Exception { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java index 62d22d201ba..d69149ce3b2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java @@ -270,7 +270,7 @@ public class TestWALLockup { LOG.info("In flush", e); } LOG.info("Exiting"); - }; + } }; t.setDaemon(true); t.start(); @@ -452,7 +452,7 @@ public class TestWALLockup { } latch.countDown(); LOG.info("Sync exiting"); - }; + } }; t.setDaemon(true); t.start(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestWALReplay.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestWALReplay.java index ededcf3cfab..d90a5dfc935 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestWALReplay.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestWALReplay.java @@ -657,7 +657,7 @@ public abstract class AbstractTestWALReplay { } return super.flushSnapshot(snapshot, cacheFlushId, status, throughputController, tracker); } - }; + } /** * Test that we could recover the data correctly after aborting flush. In the diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java index 24355321e3d..6a77d725481 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java @@ -909,7 +909,7 @@ public class TestAccessController extends SecureTestUtil { Increment inc = new Increment(TEST_ROW); inc.addColumn(TEST_FAMILY, TEST_QUALIFIER, 1); try(Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { t.increment(inc); } return null; @@ -927,7 +927,7 @@ public class TestAccessController extends SecureTestUtil { Delete d = new Delete(TEST_ROW); d.addFamily(TEST_FAMILY); try(Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { t.checkAndMutate(TEST_ROW, TEST_FAMILY).qualifier(TEST_QUALIFIER) .ifEquals(Bytes.toBytes("test_value")).thenDelete(d); } @@ -1147,7 +1147,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try(Connection conn = ConnectionFactory.createConnection(conf); - Table acl = conn.getTable(AccessControlLists.ACL_TABLE_NAME);) { + Table acl = conn.getTable(AccessControlLists.ACL_TABLE_NAME)) { BlockingRpcChannel service = acl.coprocessorService(HConstants.EMPTY_START_ROW); AccessControlService.BlockingInterface protocol = AccessControlService.newBlockingStub(service); @@ -1212,7 +1212,7 @@ public class TestAccessController extends SecureTestUtil { p.addColumn(family2, qualifier, Bytes.toBytes("v2")); try (Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(tableName);) { + Table t = conn.getTable(tableName)) { t.put(p); } return null; @@ -1239,7 +1239,7 @@ public class TestAccessController extends SecureTestUtil { Put p = new Put(Bytes.toBytes("a")); p.addColumn(family2, qualifier, Bytes.toBytes("v2")); try (Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(tableName);) { + Table t = conn.getTable(tableName)) { t.put(p); } return null; @@ -1253,7 +1253,7 @@ public class TestAccessController extends SecureTestUtil { g.addFamily(family1); g.addFamily(family2); try (Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(tableName);) { + Table t = conn.getTable(tableName)) { t.get(g); } return null; @@ -2127,7 +2127,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try (Connection conn = ConnectionFactory.createConnection(TEST_UTIL.getConfiguration()); - Admin admin = conn.getAdmin();) { + Admin admin = conn.getAdmin()) { return admin.getTableDescriptor(TEST_TABLE); } } @@ -2216,7 +2216,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try(Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { return t.get(new Get(TEST_ROW)); } } @@ -2242,7 +2242,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try(Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { return t.get(new Get(TEST_ROW)); } } @@ -2450,7 +2450,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try(Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { return t.get(new Get(TEST_ROW)); } } @@ -2558,7 +2558,7 @@ public class TestAccessController extends SecureTestUtil { @Override public Object run() throws Exception { try (Connection conn = ConnectionFactory.createConnection(conf); - Table t = conn.getTable(TEST_TABLE);) { + Table t = conn.getTable(TEST_TABLE)) { BlockingRpcChannel service = t.coprocessorService(HConstants.EMPTY_BYTE_ARRAY); PingCoprocessor.newBlockingStub(service).noop(null, NoopRequest.newBuilder().build()); } @@ -2716,7 +2716,7 @@ public class TestAccessController extends SecureTestUtil { return new PrivilegedAction>() { @Override public List run() { - try(Connection conn = ConnectionFactory.createConnection(conf);) { + try(Connection conn = ConnectionFactory.createConnection(conf)) { return AccessControlClient.getUserPermissions(conn, regex); } catch (Throwable e) { LOG.error("error during call of AccessControlClient.getUserPermissions.", e); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java index 7b7a150fefd..4fbf7d313a8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController2.java @@ -348,9 +348,9 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { Result[] next1 = scanner1.next(5); assertTrue("User having table level access should be able to scan all " + "the data in the table.", next1.length == 3); @@ -364,9 +364,9 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { Result[] next1 = scanner1.next(5); assertTrue("User having column family level access should be able to scan all " + "the data belonging to that family.", next1.length == 2); @@ -380,10 +380,10 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); s1.addFamily(TEST_FAMILY_2); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { scanner1.next(); } } @@ -395,9 +395,9 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { Result[] next1 = scanner1.next(5); assertTrue("User having column qualifier level access should be able to scan " + "that column family qualifier data.", next1.length == 1); @@ -411,10 +411,10 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); s1.addFamily(TEST_FAMILY_2); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { scanner1.next(); } } @@ -426,10 +426,10 @@ public class TestAccessController2 extends SecureTestUtil { @Override public Void run() throws Exception { try (Connection connection = ConnectionFactory.createConnection(conf); - Table table = connection.getTable(tableName);) { + Table table = connection.getTable(tableName)) { Scan s1 = new Scan(); s1.addColumn(TEST_FAMILY, Q2); - try (ResultScanner scanner1 = table.getScanner(s1);) { + try (ResultScanner scanner1 = table.getScanner(s1)) { scanner1.next(); } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java index ba93d190fd1..d175bc6254f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabels.java @@ -375,7 +375,7 @@ public abstract class TestVisibilityLabels { RegionServerThread rs = TEST_UTIL.getHBaseCluster().startRegionServer(); waitForLabelsRegionAvailability(rs.getRegionServer()); try (Table table = createTableAndWriteDataWithLabels(tableName, "(" + SECRET + "|" + CONFIDENTIAL - + ")", PRIVATE);) { + + ")", PRIVATE)) { Scan s = new Scan(); s.setAuthorizations(new Authorizations(SECRET)); ResultScanner scanner = table.getScanner(s); @@ -425,7 +425,7 @@ public abstract class TestVisibilityLabels { } }; SUPERUSER.runAs(action); - try (Table ht = TEST_UTIL.getConnection().getTable(LABELS_TABLE_NAME);) { + try (Table ht = TEST_UTIL.getConnection().getTable(LABELS_TABLE_NAME)) { Scan scan = new Scan(); scan.setAuthorizations(new Authorizations(VisibilityUtils.SYSTEM_LABEL)); ResultScanner scanner = ht.getScanner(scan); @@ -616,7 +616,7 @@ public abstract class TestVisibilityLabels { @Test public void testLabelsWithAppend() throws Throwable { TableName tableName = TableName.valueOf(TEST_NAME.getMethodName()); - try (Table table = TEST_UTIL.createTable(tableName, fam);) { + try (Table table = TEST_UTIL.createTable(tableName, fam)) { byte[] row1 = Bytes.toBytes("row1"); byte[] val = Bytes.toBytes("a"); Put put = new Put(row1); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsReplication.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsReplication.java index 072a385e990..26f1b87dd0b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsReplication.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsReplication.java @@ -222,7 +222,7 @@ public class TestVisibilityLabelsReplication { try (Table table = writeData(TABLE_NAME, "(" + SECRET + "&" + PUBLIC + ")" + "|(" + CONFIDENTIAL + ")&(" + TOPSECRET + ")", "(" + PRIVATE + "|" + CONFIDENTIAL + ")&(" + PUBLIC + "|" + TOPSECRET + ")", "(" + SECRET + "|" + CONFIDENTIAL + ")" + "&" + "!" + TOPSECRET, - CellVisibility.quote(UNICODE_VIS_TAG) + "&" + SECRET);) { + CellVisibility.quote(UNICODE_VIS_TAG) + "&" + SECRET)) { Scan s = new Scan(); s.setAuthorizations(new Authorizations(SECRET, CONFIDENTIAL, PRIVATE, TOPSECRET, UNICODE_VIS_TAG)); @@ -250,7 +250,7 @@ public class TestVisibilityLabelsReplication { current = cellScanner.current(); assertTrue(Bytes.equals(current.getRowArray(), current.getRowOffset(), current.getRowLength(), row4, 0, row4.length)); - try (Table table2 = TEST_UTIL1.getConnection().getTable(TABLE_NAME);) { + try (Table table2 = TEST_UTIL1.getConnection().getTable(TABLE_NAME)) { s = new Scan(); // Ensure both rows are replicated scanner = table2.getScanner(s); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java index 189b37f9357..6b4d4b50fee 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDefaultVisLabelService.java @@ -222,7 +222,7 @@ public class TestVisibilityLabelsWithDefaultVisLabelService extends TestVisibili public void testVisibilityLabelsOnWALReplay() throws Exception { final TableName tableName = TableName.valueOf(TEST_NAME.getMethodName()); try (Table table = createTableAndWriteDataWithLabels(tableName, - "(" + SECRET + "|" + CONFIDENTIAL + ")", PRIVATE);) { + "(" + SECRET + "|" + CONFIDENTIAL + ")", PRIVATE)) { List regionServerThreads = TEST_UTIL.getHBaseCluster() .getRegionServerThreads(); for (RegionServerThread rsThread : regionServerThreads) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java index 0a7d918fd45..e8aa0e7a363 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityLabelsWithDeletes.java @@ -169,7 +169,7 @@ public class TestVisibilityLabelsWithDeletes { public void testVisibilityLabelsWithDeleteFamily() throws Exception { setAuths(); final TableName tableName = TableName.valueOf(TEST_NAME.getMethodName()); - try (Table table = createTableAndWriteDataWithLabels(SECRET, CONFIDENTIAL + "|" + TOPSECRET);) { + try (Table table = createTableAndWriteDataWithLabels(SECRET, CONFIDENTIAL + "|" + TOPSECRET)) { PrivilegedExceptionAction actiona = new PrivilegedExceptionAction() { @Override public Void run() throws Exception { @@ -245,7 +245,7 @@ public class TestVisibilityLabelsWithDeletes { final TableName tableName = TableName.valueOf(TEST_NAME.getMethodName()); long[] ts = new long[] { 123l, 125l }; try (Table table = createTableAndWriteDataWithLabels(ts, - CONFIDENTIAL + "|" + TOPSECRET, SECRET);) { + CONFIDENTIAL + "|" + TOPSECRET, SECRET)) { PrivilegedExceptionAction actiona = new PrivilegedExceptionAction() { @Override public Void run() throws Exception { @@ -2092,7 +2092,7 @@ public class TestVisibilityLabelsWithDeletes { }; VisibilityLabelsResponse response = SUPERUSER.runAs(action); final TableName tableName = TableName.valueOf(TEST_NAME.getMethodName()); - try (Table table = doPuts(tableName);) { + try (Table table = doPuts(tableName)) { PrivilegedExceptionAction actiona = new PrivilegedExceptionAction() { @Override public Void run() throws Exception { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java index a2c015c6b53..81f9ad72c0d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java @@ -444,7 +444,7 @@ public class TestFlushSnapshotFromClient { .toString(ProtobufUtil.createHBaseProtosSnapshotDesc(ss))); toBeSubmitted.countDown(); } - }; + } // build descriptions SnapshotDescription[] descs = new SnapshotDescription[ssNum]; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/MapreduceTestingShim.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/MapreduceTestingShim.java index 3f7d4410655..b653395dfff 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/MapreduceTestingShim.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/MapreduceTestingShim.java @@ -126,7 +126,7 @@ abstract public class MapreduceTestingShim { public String obtainMROutputDirProp() { return "mapred.output.dir"; } - }; + } private static class MapreduceV2Shim extends MapreduceTestingShim { public JobContext newJobContext(Configuration jobConf) { @@ -166,6 +166,5 @@ abstract public class MapreduceTestingShim { // from Hadoop 0.23.x. If we use the source directly we break the hadoop 1.x compile. return "mapreduce.output.fileoutputformat.outputdir"; } - }; - + } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/ProcessBasedLocalHBaseCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/ProcessBasedLocalHBaseCluster.java index 6415fdb62e6..9c426f83e60 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/ProcessBasedLocalHBaseCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/ProcessBasedLocalHBaseCluster.java @@ -73,7 +73,7 @@ public class ProcessBasedLocalHBaseCluster { ProcessBasedLocalHBaseCluster.class); private List daemonPidFiles = - Collections.synchronizedList(new ArrayList());; + Collections.synchronizedList(new ArrayList()); private boolean shutdownHookInstalled; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java index 8f503e034b1..333d050de48 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestFSHDFSUtils.java @@ -47,7 +47,7 @@ public class TestFSHDFSUtils { Configuration conf = HTU.getConfiguration(); conf.setInt("hbase.lease.recovery.first.pause", 10); conf.setInt("hbase.lease.recovery.pause", 10); - }; + } private FSHDFSUtils fsHDFSUtils = new FSHDFSUtils(); private static Path FILE = new Path(HTU.getDataTestDir(), "file.txt"); long startTime = -1; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/IOTestProvider.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/IOTestProvider.java index bfd18cf5f4a..935664741e0 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/IOTestProvider.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/IOTestProvider.java @@ -78,7 +78,7 @@ public class IOTestProvider implements WALProvider { append, sync, fileroll, - none; + none } private FSHLog log = null; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALMethods.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALMethods.java index a6d245698f9..e33e18db86c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALMethods.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALMethods.java @@ -52,7 +52,7 @@ import org.junit.experimental.categories.Category; */ @Category({RegionServerTests.class, SmallTests.class}) public class TestWALMethods { - private static final byte[] TEST_REGION = Bytes.toBytes("test_region");; + private static final byte[] TEST_REGION = Bytes.toBytes("test_region"); private static final TableName TEST_TABLE = TableName.valueOf("test_table");