HBASE-19540 Reduced number of unnecessary semicolons

This commit is contained in:
Jan Hentschel 2017-12-17 17:27:58 +01:00
parent dbe409e2c7
commit f46a6d1637
17 changed files with 55 additions and 59 deletions

View File

@ -56,12 +56,12 @@ public class MetricsIOSourceImpl extends BaseSourceImpl implements MetricsIOSour
@Override
public void updateFsReadTime(long t) {
fsReadTimeHisto.add(t);
};
}
@Override
public void updateFsPReadTime(long t) {
fsPReadTimeHisto.add(t);
};
}
@Override
public void updateFsWriteTime(long t) {
@ -80,5 +80,4 @@ public class MetricsIOSourceImpl extends BaseSourceImpl implements MetricsIOSour
metricsRegistry.snapshot(mrb, all);
}
}

View File

@ -164,8 +164,7 @@ public class IntegrationTestBackupRestore extends IntegrationTestBase {
try (Connection conn = util.getConnection();
Admin admin = conn.getAdmin();
BackupAdmin client = new BackupAdminImpl(conn);) {
BackupAdmin client = new BackupAdminImpl(conn)) {
// #0- insert some data to table TABLE_NAME1, TABLE_NAME2
loadData(TABLE_NAME1, rowsInBatch);
loadData(TABLE_NAME2, rowsInBatch);

View File

@ -110,7 +110,7 @@ public class IntegrationTestIngestWithMOB extends IntegrationTestIngest {
@Test
public void testIngest() throws Exception {
runIngestTest(JUNIT_RUN_TIME, 100, 10, 1024, 10, 20);
};
}
@Override
protected void initTable() throws IOException {

View File

@ -346,5 +346,5 @@ public class StripeCompactionsPerformanceEvaluation extends AbstractHBaseTool {
public boolean verify(byte[] rowKey, byte[] cf, Set<byte[]> columnSet) {
return true;
}
};
}
}

View File

@ -38,6 +38,5 @@ public class RollingBatchRestartRsExceptMetaAction extends RollingBatchRestartRs
List<ServerName> servers = super.selectServers();
servers.remove(metaServer);
return servers;
};
}
}

View File

@ -109,7 +109,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify extends IntegrationT
private static User USER1, USER2;
private enum Counters {
ROWS_VIS_EXP_1, ROWS_VIS_EXP_2, ROWS_VIS_EXP_3, ROWS_VIS_EXP_4;
ROWS_VIS_EXP_1, ROWS_VIS_EXP_2, ROWS_VIS_EXP_3, ROWS_VIS_EXP_4
}
@Override

View File

@ -170,9 +170,10 @@ public class SyncTable extends Configured implements Tool {
Throwable mapperException;
public static enum Counter {BATCHES, HASHES_MATCHED, HASHES_NOT_MATCHED, SOURCEMISSINGROWS,
public static enum Counter { BATCHES, HASHES_MATCHED, HASHES_NOT_MATCHED, SOURCEMISSINGROWS,
SOURCEMISSINGCELLS, TARGETMISSINGROWS, TARGETMISSINGCELLS, ROWSWITHDIFFS, DIFFERENTCELLVALUES,
MATCHINGROWS, MATCHINGCELLS, EMPTY_BATCHES, RANGESMATCHED, RANGESNOTMATCHED};
MATCHINGROWS, MATCHINGCELLS, EMPTY_BATCHES, RANGESMATCHED, RANGESNOTMATCHED
}
@Override
protected void setup(Context context) throws IOException {

View File

@ -1194,7 +1194,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
for (int i = startRow; i < lastRow; i++) {
if (i % everyN != 0) continue;
long startTime = System.nanoTime();
try (TraceScope scope = TraceUtil.createTrace("test row");){
try (TraceScope scope = TraceUtil.createTrace("test row")){
testRow(i);
}
if ( (i - startRow) > opts.measureAfter) {

View File

@ -80,7 +80,7 @@ public class TestCopyTable {
final byte[] COLUMN1 = Bytes.toBytes("c1");
try (Table t1 = TEST_UTIL.createTable(tableName1, FAMILY);
Table t2 = TEST_UTIL.createTable(tableName2, FAMILY);) {
Table t2 = TEST_UTIL.createTable(tableName2, FAMILY)) {
// put rows into the first table
for (int i = 0; i < 10; i++) {
Put p = new Put(Bytes.toBytes("row" + i));

View File

@ -185,7 +185,7 @@ public class TestImportExport {
*/
@Test
public void testSimpleCase() throws Throwable {
try (Table t = UTIL.createTable(TableName.valueOf(name.getMethodName()), FAMILYA, 3);) {
try (Table t = UTIL.createTable(TableName.valueOf(name.getMethodName()), FAMILYA, 3)) {
Put p = new Put(ROW1);
p.addColumn(FAMILYA, QUAL, now, QUAL);
p.addColumn(FAMILYA, QUAL, now + 1, QUAL);
@ -203,37 +203,37 @@ public class TestImportExport {
t.put(p);
}
String[] args = new String[] {
// Only export row1 & row2.
"-D" + TableInputFormat.SCAN_ROW_START + "=\\x32row1",
"-D" + TableInputFormat.SCAN_ROW_STOP + "=\\x32row3",
name.getMethodName(),
FQ_OUTPUT_DIR,
"1000", // max number of key versions per key to export
String[] args = new String[] {
// Only export row1 & row2.
"-D" + TableInputFormat.SCAN_ROW_START + "=\\x32row1",
"-D" + TableInputFormat.SCAN_ROW_STOP + "=\\x32row3",
name.getMethodName(),
FQ_OUTPUT_DIR,
"1000", // max number of key versions per key to export
};
assertTrue(runExport(args));
final String IMPORT_TABLE = name.getMethodName() + "import";
try (Table t = UTIL.createTable(TableName.valueOf(IMPORT_TABLE), FAMILYB, 3)) {
args = new String[] {
"-D" + Import.CF_RENAME_PROP + "="+FAMILYA_STRING+":"+FAMILYB_STRING,
IMPORT_TABLE,
FQ_OUTPUT_DIR
};
assertTrue(runExport(args));
assertTrue(runImport(args));
final String IMPORT_TABLE = name.getMethodName() + "import";
try (Table t = UTIL.createTable(TableName.valueOf(IMPORT_TABLE), FAMILYB, 3);) {
args = new String[] {
"-D" + Import.CF_RENAME_PROP + "="+FAMILYA_STRING+":"+FAMILYB_STRING,
IMPORT_TABLE,
FQ_OUTPUT_DIR
};
assertTrue(runImport(args));
Get g = new Get(ROW1);
g.setMaxVersions();
Result r = t.get(g);
assertEquals(3, r.size());
g = new Get(ROW2);
g.setMaxVersions();
r = t.get(g);
assertEquals(3, r.size());
g = new Get(ROW3);
r = t.get(g);
assertEquals(0, r.size());
}
Get g = new Get(ROW1);
g.setMaxVersions();
Result r = t.get(g);
assertEquals(3, r.size());
g = new Get(ROW2);
g.setMaxVersions();
r = t.get(g);
assertEquals(3, r.size());
g = new Get(ROW3);
r = t.get(g);
assertEquals(0, r.size());
}
}
/**
@ -267,7 +267,7 @@ public class TestImportExport {
FileSystem fs = FileSystem.get(UTIL.getConfiguration());
fs.copyFromLocalFile(importPath, new Path(FQ_OUTPUT_DIR + Path.SEPARATOR + name));
String IMPORT_TABLE = name;
try (Table t = UTIL.createTable(TableName.valueOf(IMPORT_TABLE), Bytes.toBytes("f1"), 3);) {
try (Table t = UTIL.createTable(TableName.valueOf(IMPORT_TABLE), Bytes.toBytes("f1"), 3)) {
String[] args = new String[] {
"-Dhbase.import.version=0.94" ,
IMPORT_TABLE, FQ_OUTPUT_DIR
@ -297,8 +297,7 @@ public class TestImportExport {
.build())
.build();
UTIL.getAdmin().createTable(desc);
try (Table t = UTIL.getConnection().getTable(desc.getTableName());) {
try (Table t = UTIL.getConnection().getTable(desc.getTableName())) {
Put p = new Put(ROW1);
p.addColumn(FAMILYA, QUAL, now, QUAL);
p.addColumn(FAMILYA, QUAL, now + 1, QUAL);
@ -329,8 +328,7 @@ public class TestImportExport {
.build())
.build();
UTIL.getAdmin().createTable(desc);
try (Table t = UTIL.getConnection().getTable(desc.getTableName());) {
try (Table t = UTIL.getConnection().getTable(desc.getTableName())) {
Put p = new Put(ROW1);
p.addColumn(FAMILYA, QUAL, now, QUAL);
p.addColumn(FAMILYA, QUAL, now + 1, QUAL);
@ -363,7 +361,7 @@ public class TestImportExport {
.build())
.build();
UTIL.getAdmin().createTable(desc);
try (Table t = UTIL.getConnection().getTable(desc.getTableName());) {
try (Table t = UTIL.getConnection().getTable(desc.getTableName())) {
args = new String[] {
IMPORT_TABLE,
FQ_OUTPUT_DIR
@ -717,8 +715,7 @@ public class TestImportExport {
public void testDurability() throws Throwable {
// Create an export table.
String exportTableName = name.getMethodName() + "export";
try (Table exportTable = UTIL.createTable(TableName.valueOf(exportTableName), FAMILYA, 3);) {
try (Table exportTable = UTIL.createTable(TableName.valueOf(exportTableName), FAMILYA, 3)) {
// Insert some data
Put put = new Put(ROW1);
put.addColumn(FAMILYA, QUAL, now, QUAL);

View File

@ -371,5 +371,5 @@ public abstract class RemoteProcedureDispatcher<TEnv, TRemote extends Comparable
public DelayedTask(final FutureTask<Void> task, final long delay, final TimeUnit unit) {
super(task, EnvironmentEdgeManager.currentTime() + unit.toMillis(delay));
}
};
}
}

View File

@ -649,7 +649,7 @@ public class WALProcedureStore extends ProcedureStoreBase {
slotsCache.offer(slot);
}
private enum PushType { INSERT, UPDATE, DELETE };
private enum PushType { INSERT, UPDATE, DELETE }
private long pushData(final PushType type, final ByteSlot slot,
final long procId, final long[] subProcIds) {

View File

@ -32,7 +32,7 @@ public class TestProcedureToString {
/**
* A do-nothing environment for BasicProcedure.
*/
static class BasicProcedureEnv {};
static class BasicProcedureEnv {}
/**
* A do-nothing basic procedure just for testing toString.

View File

@ -149,7 +149,8 @@ public class TestStateMachineProcedure {
assertEquals(TEST_FAILURE_EXCEPTION, cause);
}
public enum TestSMProcedureState { STEP_1, STEP_2 };
public enum TestSMProcedureState { STEP_1, STEP_2 }
public static class TestSMProcedure
extends StateMachineProcedure<TestProcEnv, TestSMProcedureState> {
protected Flow executeFromState(TestProcEnv env, TestSMProcedureState state) {

View File

@ -107,7 +107,7 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
private static final long serialVersionUID = 1L;
private byte[] startRow = HConstants.EMPTY_START_ROW;
private byte[] endRow = HConstants.EMPTY_END_ROW;;
private byte[] endRow = HConstants.EMPTY_END_ROW;
private List<byte[]> columns = new ArrayList<>();
private int batch = Integer.MAX_VALUE;
private long startTime = 0;

View File

@ -209,7 +209,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer {
}
for (RegionInfo region : misplacedRegions) {
String groupName = rsGroupInfoManager.getRSGroupOfTable(region.getTable());;
String groupName = rsGroupInfoManager.getRSGroupOfTable(region.getTable());
RSGroupInfo info = rsGroupInfoManager.getRSGroup(groupName);
List<ServerName> candidateList = filterOfflineServers(info, servers);
ServerName server = this.internalBalancer.randomAssignment(region,

View File

@ -210,7 +210,7 @@ public class TestThriftServer {
int currentCountDeleteTable = getCurrentCount("deleteTable_num_ops", 2, metrics);
int currentCountDisableTable = getCurrentCount("disableTable_num_ops", 2, metrics);
createTestTables(handler);
dropTestTables(handler);;
dropTestTables(handler);
metricsHelper.assertCounter("createTable_num_ops", currentCountCreateTable + 2,
metrics.getSource());
metricsHelper.assertCounter("deleteTable_num_ops", currentCountDeleteTable + 2,