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>
This commit is contained in:
parent
f68b61a027
commit
9462933179
|
@ -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: ");
|
||||
|
|
Loading…
Reference in New Issue