HBASE-15706 HFilePrettyPrinter should print out nicely formatted tags. (huaxiang sun)
This commit is contained in:
parent
d8e032279f
commit
4706303186
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue