Skip to content

Commit

Permalink
HBASE-24811 Use class access static field or method (#2189)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Guanghao Zhang <[email protected]>
Signed-off-by: Anoop Sam John <[email protected]>
  • Loading branch information
utf7 authored and Apache9 committed Aug 23, 2020
1 parent 34de350 commit 836c04d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private HFileContext createHFileContext(Path path,
.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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public int processFile(Path file, boolean checkRootDir) throws IOException {

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ private ThreadPoolExecutor getPool() {
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public Chunk getNewExternalChunk(ChunkCreator.ChunkType chunkType) {
*/
@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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected void postFinish() {
private int getBatchEntrySizeExcludeBulkLoad(WALEntryBatch entryBatch) {
int totalSize = 0;
for(Entry entry : entryBatch.getWalEntries()) {
totalSize += entryReader.getEntrySizeExcludeBulkLoad(entry);
totalSize += ReplicationSourceWALReader.getEntrySizeExcludeBulkLoad(entry);
}
return totalSize;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ private void preHasUserPermissions(User caller, String userName, List<Permission
result = AuthResult.allow(request, "Self user validation allowed", caller, null, null,
null, null);
}
accessChecker.logResult(result);
AccessChecker.logResult(result);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ public boolean checkRegionChain(TableIntegrityErrorHandler handler) throws IOExc
}
}

if (hbck.shouldDisplayFullReport()) {
if (HBaseFsck.shouldDisplayFullReport()) {
// do full region split map dump
hbck.getErrors().print("---- Table '" + this.tableName
+ "': region split map");
Expand Down Expand Up @@ -807,4 +807,4 @@ private void dumpSidelinedRegions(Map<Path, HbckRegionInfo> regions) {
path.toUri().getPath() + " " + tableName);
}
}
}
}

0 comments on commit 836c04d

Please sign in to comment.