Skip to content

Commit 060ca84

Browse files
committed
HBASE-27408 Improve BucketAllocatorException log to always include HFile name (#4886)
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
1 parent 22ec7fb commit 060ca84

File tree

1 file changed

+8
-2
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,13 +1025,19 @@ private static String getAllocationFailWarningMessage(final BucketAllocatorExcep
10251025
final HFileContext fileContext = ((HFileBlock) re.getData()).getHFileContext();
10261026
final String columnFamily = Bytes.toString(fileContext.getColumnFamily());
10271027
final String tableName = Bytes.toString(fileContext.getTableName());
1028-
if (tableName != null && columnFamily != null) {
1028+
if (tableName != null) {
10291029
sb.append(" Table: ");
10301030
sb.append(tableName);
1031+
}
1032+
if (columnFamily != null) {
10311033
sb.append(" CF: ");
10321034
sb.append(columnFamily);
1033-
sb.append(" HFile: ");
1035+
}
1036+
sb.append(" HFile: ");
1037+
if (fileContext.getHFileName() != null) {
10341038
sb.append(fileContext.getHFileName());
1039+
} else {
1040+
sb.append(re.getKey());
10351041
}
10361042
} else {
10371043
sb.append(" HFile: ");

0 commit comments

Comments
 (0)