HBASE-15706 HFilePrettyPrinter should print out nicely formatted tags. (huaxiang sun)

This commit is contained in:
anoopsjohn 2016-04-29 09:23:57 +05:30
parent d8e032279f
commit 4706303186
2 changed files with 2 additions and 2 deletions

View File

@ -1184,7 +1184,7 @@ public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId,
if (tags != null) { if (tags != null) {
List<String> tagsString = new ArrayList<String>(); List<String> tagsString = new ArrayList<String>();
for (Tag t : tags) { for (Tag t : tags) {
tagsString.add((t.getType()) + ":" + TagUtil.getValueAsString(t)); tagsString.add(t.toString());
} }
stringMap.put("tag", tagsString); stringMap.put("tag", tagsString);
} }

View File

@ -370,7 +370,7 @@ public class HFilePrettyPrinter extends Configured implements Tool {
List<Tag> tags = TagUtil.asList(cell.getTagsArray(), cell.getTagsOffset(), List<Tag> tags = TagUtil.asList(cell.getTagsArray(), cell.getTagsOffset(),
cell.getTagsLength()); cell.getTagsLength());
for (Tag tag : tags) { for (Tag tag : tags) {
System.out.print(String.format(" T[%d]: %s", i++, TagUtil.getValueAsString(tag))); System.out.print(String.format(" T[%d]: %s", i++, tag.toString()));
} }
} }
System.out.println(); System.out.println();