Skip to content

Commit 2d34334

Browse files
committed
HBASE-26826 Backport StoreFileTracker (HBASE-26067, HBASE-26584, and others) to branch-2.5
Address post backport errorprone, checkstyle, and javadoc precommit findings. Signed-off-by: Andrew Purtell <[email protected]>
1 parent 6cf93a0 commit 2d34334

File tree

15 files changed

+34
-33
lines changed

15 files changed

+34
-33
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,10 +2868,10 @@ private Future<Void> internalRestoreSnapshotAsync(final String snapshotName,
28682868
@Override
28692869
protected RestoreSnapshotResponse rpcCall() throws Exception {
28702870
final RestoreSnapshotRequest.Builder builder = RestoreSnapshotRequest.newBuilder()
2871-
.setSnapshot(snapshot)
2872-
.setNonceGroup(nonceGroup)
2873-
.setNonce(nonce)
2874-
.setRestoreACL(restoreAcl);
2871+
.setSnapshot(snapshot)
2872+
.setNonceGroup(nonceGroup)
2873+
.setNonce(nonce)
2874+
.setRestoreACL(restoreAcl);
28752875
if (customSFT != null) {
28762876
builder.setCustomSFT(customSFT);
28772877
}

hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableDescriptorBuilder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,8 @@ public ModifyableTableDescriptor removeValue(Bytes key) {
818818
/**
819819
* Remove metadata represented by the key from the {@link #values} map
820820
*
821-
* @param key Key whose key and value we're to remove from TableDescriptor
822-
* parameters.
823-
* @return the modifyable TD
821+
* @param key Key whose key and value we're to remove from TableDescriptor parameters
822+
* @return the modifiable TD
824823
*/
825824
public ModifyableTableDescriptor removeValue(final byte[] key) {
826825
return removeValue(new Bytes(key));

hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestFileBasedSFTBulkLoad.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
@Category(IntegrationTests.class)
6767
public class IntegrationTestFileBasedSFTBulkLoad extends IntegrationTestBulkLoad {
6868

69-
private static final Logger LOG = LoggerFactory.getLogger(IntegrationTestFileBasedSFTBulkLoad.class);
69+
private static final Logger LOG =
70+
LoggerFactory.getLogger(IntegrationTestFileBasedSFTBulkLoad.class);
7071

7172
private static String NUM_MAPS_KEY = "hbase.IntegrationTestBulkLoad.numMaps";
7273
private static String NUM_IMPORT_ROUNDS_KEY = "hbase.IntegrationTestBulkLoad.numImportRounds";

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ public long timeOfOldestEdit() {
232232
}
233233

234234
/**
235-
* This method is protected under {@link HStore#lock} write lock,<br/>
236-
* and this method is used by {@link HStore#updateStorefiles} after flushing is completed.<br/>
235+
* This method is protected under HStore write lock.<br/>
237236
* The passed snapshot was successfully persisted; it can be let go.
238237
* @param id Id of the snapshot to clean out.
239238
* @see MemStore#snapshot()

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactingMemStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public String getFamilyName() {
395395
}
396396

397397
/**
398-
* This method is protected under {@link HStore#lock} read lock.
398+
* This method is protected under HStore read lock.
399399
*/
400400
@Override
401401
public List<KeyValueScanner> getScanners(long readPt) throws IOException {

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,8 @@ private void initializeThreads() {
22622262
double brokenStoreFileCleanerDelayJitter = conf.getDouble(
22632263
BrokenStoreFileCleaner.BROKEN_STOREFILE_CLEANER_DELAY_JITTER,
22642264
BrokenStoreFileCleaner.DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY_JITTER);
2265-
double jitterRate = (ThreadLocalRandom.current().nextDouble() - 0.5D) * brokenStoreFileCleanerDelayJitter;
2265+
double jitterRate = (ThreadLocalRandom.current().nextDouble() - 0.5D) *
2266+
brokenStoreFileCleanerDelayJitter;
22662267
long jitterValue = Math.round(brokenStoreFileCleanerDelay * jitterRate);
22672268
this.brokenStoreFileCleaner =
22682269
new BrokenStoreFileCleaner((int) (brokenStoreFileCleanerDelay + jitterValue),

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public SecureBulkLoadListener(FileSystem fs, String stagingDir, Configuration co
364364

365365
@Override
366366
public String prepareBulkLoad(final byte[] family, final String srcPath, boolean copyFile,
367-
String customStaging ) throws IOException {
367+
String customStaging) throws IOException {
368368
Path p = new Path(srcPath);
369369

370370
//store customStaging for failedBulkLoad

hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
package org.apache.hadoop.hbase.snapshot;
2020

21-
import static org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerFactory.TRACKER_IMPL;
22-
2321
import java.io.IOException;
2422
import java.io.InputStream;
2523
import java.io.OutputStream;

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkloadBase.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
import org.junit.Rule;
6060
import org.junit.rules.TemporaryFolder;
6161
import org.junit.rules.TestName;
62-
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
63-
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
6462
import org.junit.runner.RunWith;
6563
import org.junit.runners.Parameterized;
64+
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
65+
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
6666

6767
@RunWith(Parameterized.class)
6868
public class TestBulkloadBase {
@@ -135,7 +135,8 @@ protected HRegion testRegionWithFamiliesAndSpecifiedTableName(TableName tableNam
135135
}
136136

137137
protected HRegion testRegionWithFamilies(byte[]... families) throws IOException {
138-
TableName tableName = TableName.valueOf(name.getMethodName().substring(0, name.getMethodName().indexOf("[")));
138+
TableName tableName =
139+
TableName.valueOf(name.getMethodName().substring(0, name.getMethodName().indexOf("[")));
139140
return testRegionWithFamiliesAndSpecifiedTableName(tableName, families);
140141
}
141142

@@ -175,7 +176,9 @@ private String createHFileForFamilies(byte[] family) throws IOException {
175176

176177
private static String generateUniqueName(final String suffix) {
177178
String name = UUID.randomUUID().toString().replaceAll("-", "");
178-
if (suffix != null) name += suffix;
179+
if (suffix != null) {
180+
name += suffix;
181+
}
179182
return name;
180183
}
181184

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMergesSplitsAddToTracker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ private void validateDaughterRegionsFiles(HRegion region, String orignalFileName
234234
List<StoreFileInfo> infos = region.getRegionFileSystem().getStoreFiles("info");
235235
final MutableBoolean foundLink = new MutableBoolean(false);
236236
infos.stream().forEach(i -> {
237-
i.getActiveFileName().contains(orignalFileName);
238237
if(i.getActiveFileName().contains(untrackedFile)){
239238
fail();
240239
}

0 commit comments

Comments
 (0)