HBASE-26999 Addendum fix spotless errors

This commit is contained in:
Duo Zhang 2022-05-13 09:57:26 +08:00
parent 930bc5368c
commit 62dbae2914
2 changed files with 10 additions and 11 deletions

View File

@ -1231,13 +1231,11 @@ public class HStore
allowedOnPath = ".*/(HStore|TestHStore).java")
void replaceStoreFiles(Collection<HStoreFile> compactedFiles, Collection<HStoreFile> result,
boolean writeCompactionMarker) throws IOException {
storeEngine.replaceStoreFiles(compactedFiles, result,
() -> {
if (writeCompactionMarker) {
writeCompactionWalRecord(compactedFiles, result);
}
},
() -> {
storeEngine.replaceStoreFiles(compactedFiles, result, () -> {
if (writeCompactionMarker) {
writeCompactionWalRecord(compactedFiles, result);
}
}, () -> {
synchronized (filesCompacting) {
filesCompacting.removeAll(compactedFiles);
}

View File

@ -34,7 +34,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Function;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.CellComparator;
@ -408,7 +407,9 @@ public abstract class StoreEngine<SF extends StoreFlusher, CP extends Compaction
List<HStoreFile> openedFiles = openStoreFiles(toBeAddedFiles, false);
// propogate the file changes to the underlying store file manager
replaceStoreFiles(toBeRemovedStoreFiles, openedFiles, () -> {}, () -> {}); // won't throw an exception
replaceStoreFiles(toBeRemovedStoreFiles, openedFiles, () -> {
}, () -> {
}); // won't throw an exception
}
/**
@ -491,8 +492,8 @@ public abstract class StoreEngine<SF extends StoreFlusher, CP extends Compaction
}
public void replaceStoreFiles(Collection<HStoreFile> compactedFiles,
Collection<HStoreFile> newFiles, IOExceptionRunnable walMarkerWriter,
Runnable actionUnderLock) throws IOException {
Collection<HStoreFile> newFiles, IOExceptionRunnable walMarkerWriter, Runnable actionUnderLock)
throws IOException {
storeFileTracker.replace(StoreUtils.toStoreFileInfo(compactedFiles),
StoreUtils.toStoreFileInfo(newFiles));
walMarkerWriter.run();