You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bb...@apache.org on 2022/11/21 13:21:41 UTC
[hbase] branch master updated: HBASE-27408 Improve BucketAllocatorException log to always include HFile name (#4886)
This is an automated email from the ASF dual-hosted git repository.
bbeaudreault pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 94629331791 HBASE-27408 Improve BucketAllocatorException log to always include HFile name (#4886)
94629331791 is described below
commit 94629331791ea9dbec171ad9070d8c4d486bd16b
Author: Bryan Beaudreault <bb...@apache.org>
AuthorDate: Mon Nov 21 08:21:29 2022 -0500
HBASE-27408 Improve BucketAllocatorException log to always include HFile name (#4886)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Xiaolin Ha <ha...@apache.org>
---
.../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 6849b176f72..a50e5b46455 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -1045,13 +1045,19 @@ public class BucketCache implements BlockCache, HeapSize {
final HFileContext fileContext = ((HFileBlock) re.getData()).getHFileContext();
final String columnFamily = Bytes.toString(fileContext.getColumnFamily());
final String tableName = Bytes.toString(fileContext.getTableName());
- if (tableName != null && columnFamily != null) {
+ if (tableName != null) {
sb.append(" Table: ");
sb.append(tableName);
+ }
+ if (columnFamily != null) {
sb.append(" CF: ");
sb.append(columnFamily);
- sb.append(" HFile: ");
+ }
+ sb.append(" HFile: ");
+ if (fileContext.getHFileName() != null) {
sb.append(fileContext.getHFileName());
+ } else {
+ sb.append(re.getKey());
}
} else {
sb.append(" HFile: ");