HBASE-24811 Use class access static field or method (#2189)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: Anoop Sam John <anoopsamjohn@apache.org>
This commit is contained in:
Yechao Chen 2020-08-23 11:24:44 +08:00 committed by Duo Zhang
parent 34de350cb3
commit 836c04d356
7 changed files with 8 additions and 8 deletions

View File

@ -384,7 +384,7 @@ public class HFileInfo implements SortedMap<byte[], byte[]> {
.withHBaseCheckSum(true)
.withHFileName(path.getName())
.withCompression(trailer.getCompressionCodec())
.withCellComparator(trailer.createComparator(trailer.getComparatorClassName()));
.withCellComparator(FixedFileTrailer.createComparator(trailer.getComparatorClassName()));
// Check for any key material available
byte[] keyBytes = trailer.getEncryptionKey();
if (keyBytes != null) {

View File

@ -290,7 +290,7 @@ public class HFilePrettyPrinter extends Configured implements Tool {
if (checkRootDir) {
Path rootPath = CommonFSUtils.getRootDir(getConf());
String rootString = rootPath + rootPath.SEPARATOR;
String rootString = rootPath + Path.SEPARATOR;
if (!file.toString().startsWith(rootString)) {
// First we see if fully-qualified URI matches the root dir. It might
// also be an absolute path in the same filesystem, so we prepend the FS

View File

@ -501,7 +501,7 @@ public class CompactingMemStore extends AbstractMemStore {
@VisibleForTesting
protected boolean shouldFlushInMemory(MutableSegment currActive, Cell cellToAdd,
MemStoreSizing memstoreSizing) {
long cellSize = currActive.getCellLength(cellToAdd);
long cellSize = MutableSegment.getCellLength(cellToAdd);
long segmentDataSize = currActive.getDataSize();
while (segmentDataSize + cellSize < inmemoryFlushSize || inWalReplay) {
// when replaying edits from WAL there is no need in in-memory flush regardless the size

View File

@ -377,7 +377,7 @@ public class MemStoreLABImpl implements MemStoreLAB {
*/
@Override
public Chunk getNewExternalChunk(int size) {
int allocSize = size + ChunkCreator.getInstance().SIZEOF_CHUNK_HEADER;
int allocSize = size + ChunkCreator.SIZEOF_CHUNK_HEADER;
if (allocSize <= ChunkCreator.getInstance().getChunkSize()) {
return getNewExternalChunk(ChunkCreator.ChunkType.DATA_CHUNK);
} else {

View File

@ -145,7 +145,7 @@ public class ReplicationSourceShipper extends Thread {
private int getBatchEntrySizeExcludeBulkLoad(WALEntryBatch entryBatch) {
int totalSize = 0;
for(Entry entry : entryBatch.getWalEntries()) {
totalSize += entryReader.getEntrySizeExcludeBulkLoad(entry);
totalSize += ReplicationSourceWALReader.getEntrySizeExcludeBulkLoad(entry);
}
return totalSize;
}

View File

@ -2581,7 +2581,7 @@ public class AccessController implements MasterCoprocessor, RegionCoprocessor,
result = AuthResult.allow(request, "Self user validation allowed", caller, null, null,
null, null);
}
accessChecker.logResult(result);
AccessChecker.logResult(result);
}
}
}

View File

@ -716,7 +716,7 @@ public class HbckTableInfo {
}
}
if (hbck.shouldDisplayFullReport()) {
if (HBaseFsck.shouldDisplayFullReport()) {
// do full region split map dump
hbck.getErrors().print("---- Table '" + this.tableName
+ "': region split map");
@ -807,4 +807,4 @@ public class HbckTableInfo {
path.toUri().getPath() + " " + tableName);
}
}
}
}