Skip to content

Commit 9f62a82

Browse files
authored
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>
1 parent 0fe9794 commit 9f62a82

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ private HFileContext createHFileContext(Path path,
386386
.withHBaseCheckSum(true)
387387
.withHFileName(path.getName())
388388
.withCompression(trailer.getCompressionCodec())
389-
.withCellComparator(trailer.createComparator(trailer.getComparatorClassName()));
389+
.withCellComparator(FixedFileTrailer.createComparator(trailer.getComparatorClassName()));
390390
// Check for any key material available
391391
byte[] keyBytes = trailer.getEncryptionKey();
392392
if (keyBytes != null) {

hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public int processFile(Path file, boolean checkRootDir) throws IOException {
291291

292292
if (checkRootDir) {
293293
Path rootPath = CommonFSUtils.getRootDir(getConf());
294-
String rootString = rootPath + rootPath.SEPARATOR;
294+
String rootString = rootPath + Path.SEPARATOR;
295295
if (!file.toString().startsWith(rootString)) {
296296
// First we see if fully-qualified URI matches the root dir. It might
297297
// also be an absolute path in the same filesystem, so we prepend the FS

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
@@ -501,7 +501,7 @@ private ThreadPoolExecutor getPool() {
501501
@VisibleForTesting
502502
protected boolean shouldFlushInMemory(MutableSegment currActive, Cell cellToAdd,
503503
MemStoreSizing memstoreSizing) {
504-
long cellSize = currActive.getCellLength(cellToAdd);
504+
long cellSize = MutableSegment.getCellLength(cellToAdd);
505505
long segmentDataSize = currActive.getDataSize();
506506
while (segmentDataSize + cellSize < inmemoryFlushSize || inWalReplay) {
507507
// when replaying edits from WAL there is no need in in-memory flush regardless the size

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public Chunk getNewExternalChunk(ChunkCreator.ChunkType chunkType) {
377377
*/
378378
@Override
379379
public Chunk getNewExternalChunk(int size) {
380-
int allocSize = size + ChunkCreator.getInstance().SIZEOF_CHUNK_HEADER;
380+
int allocSize = size + ChunkCreator.SIZEOF_CHUNK_HEADER;
381381
if (allocSize <= ChunkCreator.getInstance().getChunkSize()) {
382382
return getNewExternalChunk(ChunkCreator.ChunkType.DATA_CHUNK);
383383
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ protected void postFinish() {
155155
private int getBatchEntrySizeExcludeBulkLoad(WALEntryBatch entryBatch) {
156156
int totalSize = 0;
157157
for(Entry entry : entryBatch.getWalEntries()) {
158-
totalSize += entryReader.getEntrySizeExcludeBulkLoad(entry);
158+
totalSize += ReplicationSourceWALReader.getEntrySizeExcludeBulkLoad(entry);
159159
}
160160
return totalSize;
161161
}

hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,7 @@ private void preHasUserPermissions(User caller, String userName, List<Permission
25872587
result = AuthResult.allow(request, "Self user validation allowed", caller, null, null,
25882588
null, null);
25892589
}
2590-
accessChecker.logResult(result);
2590+
AccessChecker.logResult(result);
25912591
}
25922592
}
25932593
}

hbase-server/src/main/java/org/apache/hadoop/hbase/util/HbckTableInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ public boolean checkRegionChain(TableIntegrityErrorHandler handler) throws IOExc
716716
}
717717
}
718718

719-
if (hbck.shouldDisplayFullReport()) {
719+
if (HBaseFsck.shouldDisplayFullReport()) {
720720
// do full region split map dump
721721
hbck.getErrors().print("---- Table '" + this.tableName
722722
+ "': region split map");
@@ -807,4 +807,4 @@ private void dumpSidelinedRegions(Map<Path, HbckRegionInfo> regions) {
807807
path.toUri().getPath() + " " + tableName);
808808
}
809809
}
810-
}
810+
}

0 commit comments

Comments
 (0)