Skip to content

Commit 9462933

Browse files
authored
HBASE-27408 Improve BucketAllocatorException log to always include HFile name (#4886)
Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Xiaolin Ha <[email protected]>
1 parent f68b61a commit 9462933

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
@@ -1045,13 +1045,19 @@ private static String getAllocationFailWarningMessage(final BucketAllocatorExcep
10451045
final HFileContext fileContext = ((HFileBlock) re.getData()).getHFileContext();
10461046
final String columnFamily = Bytes.toString(fileContext.getColumnFamily());
10471047
final String tableName = Bytes.toString(fileContext.getTableName());
1048-
if (tableName != null && columnFamily != null) {
1048+
if (tableName != null) {
10491049
sb.append(" Table: ");
10501050
sb.append(tableName);
1051+
}
1052+
if (columnFamily != null) {
10511053
sb.append(" CF: ");
10521054
sb.append(columnFamily);
1053-
sb.append(" HFile: ");
1055+
}
1056+
sb.append(" HFile: ");
1057+
if (fileContext.getHFileName() != null) {
10541058
sb.append(fileContext.getHFileName());
1059+
} else {
1060+
sb.append(re.getKey());
10551061
}
10561062
} else {
10571063
sb.append(" HFile: ");

0 commit comments

Comments
 (0)