From e622690816c39abf9885ebd98015f8a966e7b751 Mon Sep 17 00:00:00 2001 From: haxiaolin Date: Wed, 15 Jun 2022 14:39:46 +0800 Subject: [PATCH] spotless apply --- .../querymatcher/ScanQueryMatcher.java | 5 +++-- .../hadoop/hbase/regionserver/TestHRegion.java | 8 ++++---- .../hadoop/hbase/regionserver/TestHStore.java | 16 +++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java index 837dad58d35f..ac60b5fd64ce 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/querymatcher/ScanQueryMatcher.java @@ -271,8 +271,9 @@ public void clearCurrentRow() { * Set the row when there is change in row n */ public void setToNewRow(Cell currentRow) { - if (this.currentRow == null - || this.rowComparator.compareRows(currentRow, this.currentRow) != 0) { + if ( + this.currentRow == null || this.rowComparator.compareRows(currentRow, this.currentRow) != 0 + ) { this.currentRow = currentRow; columns.reset(); reset(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java index dc90995305b3..c0b6950ef02f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java @@ -6949,9 +6949,9 @@ public void testTTLsUsingSmallHeartBeatCells() throws IOException { // using small heart beat cells conf.setLong(StoreScanner.HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK, 2); - region = HBaseTestingUtil - .createRegionAndWAL(RegionInfoBuilder.newBuilder(tableDescriptor.getTableName()).build(), - TEST_UTIL.getDataTestDir(), conf, tableDescriptor); + region = HBaseTestingUtil.createRegionAndWAL( + RegionInfoBuilder.newBuilder(tableDescriptor.getTableName()).build(), + TEST_UTIL.getDataTestDir(), conf, tableDescriptor); assertNotNull(region); long now = EnvironmentEdgeManager.currentTime(); // Add a cell that will expire in 5 seconds via cell TTL @@ -6981,7 +6981,7 @@ public void testTTLsUsingSmallHeartBeatCells() throws IOException { checkScan(2); } - private void checkScan(int expectCellSize) throws IOException{ + private void checkScan(int expectCellSize) throws IOException { Scan s = new Scan().withStartRow(row); ScannerContext.Builder contextBuilder = ScannerContext.newBuilder(true); ScannerContext scannerContext = contextBuilder.build(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java index 293ed946d935..aff41c1abf6d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStore.java @@ -1275,7 +1275,8 @@ public void testPreventLoopRead() throws Exception { init(name.getMethodName(), conf, TableDescriptorBuilder.newBuilder(TableName.valueOf(table)), ColumnFamilyDescriptorBuilder.newBuilder(family).setTimeToLive(10).build(), new MyStoreHook() { - @Override public long getSmallestReadPoint(HStore store) { + @Override + public long getSmallestReadPoint(HStore store) { return seqId + 3; } }); @@ -1292,8 +1293,7 @@ public void testPreventLoopRead() throws Exception { ScannerContext.Builder contextBuilder = ScannerContext.newBuilder(false); // test normal scan, should return all the cells ScannerContext scannerContext = contextBuilder.build(); - try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, - seqId + 3)) { + try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, seqId + 3)) { scanner.next(myList, scannerContext); assertEquals(6, myList.size()); } @@ -1302,8 +1302,7 @@ public void testPreventLoopRead() throws Exception { edge.incrementTime(10 * 1000); scannerContext = contextBuilder.build(); myList.clear(); - try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, - seqId + 3)) { + try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, seqId + 3)) { // r0 scanner.next(myList, scannerContext); assertEquals(0, myList.size()); @@ -1311,8 +1310,7 @@ public void testPreventLoopRead() throws Exception { // should scan all non-ttl expired cells by iterative next int resultCells = 0; - try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, - seqId + 3)) { + try (InternalScanner scanner = (InternalScanner) store.getScanner(scan, null, seqId + 3)) { boolean hasMore = true; while (hasMore) { myList.clear(); @@ -1322,8 +1320,8 @@ public void testPreventLoopRead() throws Exception { } for (Cell c : myList) { byte[] actualValue = CellUtil.cloneValue(c); - assertTrue("expected:" + Bytes.toStringBinary(value1) + ", actual:" + Bytes - .toStringBinary(actualValue), Bytes.equals(actualValue, value1)); + assertTrue("expected:" + Bytes.toStringBinary(value1) + ", actual:" + + Bytes.toStringBinary(actualValue), Bytes.equals(actualValue, value1)); } } assertEquals(2, resultCells);