HBASE-23929 Shell formatter for for meta table should pretty-print values of info:merge columns

This commit is contained in:
stack 2020-03-11 16:40:07 -07:00
parent 64e67fb98b
commit 0b18a7dc26
1 changed files with 2 additions and 1 deletions

View File

@ -738,7 +738,8 @@ EOF
# Intercept cells whose format we know such as the info:regioninfo in hbase:meta
def to_string(column, kv, maxlength = -1, converter_class = nil, converter = nil)
if is_meta_table?
if column == 'info:regioninfo' || column == 'info:splitA' || column == 'info:splitB'
if column == 'info:regioninfo' || column == 'info:splitA' || column == 'info:splitB' || \
column.start_with?('info:merge')
hri = org.apache.hadoop.hbase.HRegionInfo.parseFromOrNull(kv.getValueArray,
kv.getValueOffset, kv.getValueLength)
return format('timestamp=%d, value=%s', kv.getTimestamp, hri.nil? ? '' : hri.toString)