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 GitHub
parent 0fe97947de
commit 9f62a82334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View File

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

View File

@ -291,7 +291,7 @@ public class HFilePrettyPrinter extends Configured implements Tool {
if (checkRootDir) { if (checkRootDir) {
Path rootPath = CommonFSUtils.getRootDir(getConf()); Path rootPath = CommonFSUtils.getRootDir(getConf());
String rootString = rootPath + rootPath.SEPARATOR; String rootString = rootPath + Path.SEPARATOR;
if (!file.toString().startsWith(rootString)) { if (!file.toString().startsWith(rootString)) {
// First we see if fully-qualified URI matches the root dir. It might // 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 // 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 @VisibleForTesting
protected boolean shouldFlushInMemory(MutableSegment currActive, Cell cellToAdd, protected boolean shouldFlushInMemory(MutableSegment currActive, Cell cellToAdd,
MemStoreSizing memstoreSizing) { MemStoreSizing memstoreSizing) {
long cellSize = currActive.getCellLength(cellToAdd); long cellSize = MutableSegment.getCellLength(cellToAdd);
long segmentDataSize = currActive.getDataSize(); long segmentDataSize = currActive.getDataSize();
while (segmentDataSize + cellSize < inmemoryFlushSize || inWalReplay) { while (segmentDataSize + cellSize < inmemoryFlushSize || inWalReplay) {
// when replaying edits from WAL there is no need in in-memory flush regardless the size // 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 @Override
public Chunk getNewExternalChunk(int size) { 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()) { if (allocSize <= ChunkCreator.getInstance().getChunkSize()) {
return getNewExternalChunk(ChunkCreator.ChunkType.DATA_CHUNK); return getNewExternalChunk(ChunkCreator.ChunkType.DATA_CHUNK);
} else { } else {

View File

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

View File

@ -2587,7 +2587,7 @@ public class AccessController implements MasterCoprocessor, RegionCoprocessor,
result = AuthResult.allow(request, "Self user validation allowed", caller, null, null, result = AuthResult.allow(request, "Self user validation allowed", caller, null, null,
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 // do full region split map dump
hbck.getErrors().print("---- Table '" + this.tableName hbck.getErrors().print("---- Table '" + this.tableName
+ "': region split map"); + "': region split map");
@ -807,4 +807,4 @@ public class HbckTableInfo {
path.toUri().getPath() + " " + tableName); path.toUri().getPath() + " " + tableName);
} }
} }
} }