YARN-7032. [ATSv2] NPE while starting hbase co-processor when HBase authorization is enabled. Contributed by Rohith Sharma K S.

This commit is contained in:
Sunil G 2017-12-20 11:31:15 +05:30
parent 41b581012a
commit d62932c3b2
1 changed files with 3 additions and 1 deletions

View File

@ -98,8 +98,10 @@ public void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put,
if ((attributes != null) && (attributes.size() > 0)) { if ((attributes != null) && (attributes.size() > 0)) {
for (Map.Entry<String, byte[]> attribute : attributes.entrySet()) { for (Map.Entry<String, byte[]> attribute : attributes.entrySet()) {
Tag t = HBaseTimelineStorageUtils.getTagFromAttribute(attribute); Tag t = HBaseTimelineStorageUtils.getTagFromAttribute(attribute);
if (t != null) {
tags.add(t); tags.add(t);
} }
}
byte[] tagByteArray = Tag.fromList(tags); byte[] tagByteArray = Tag.fromList(tags);
NavigableMap<byte[], List<Cell>> newFamilyMap = new TreeMap<>( NavigableMap<byte[], List<Cell>> newFamilyMap = new TreeMap<>(
Bytes.BYTES_COMPARATOR); Bytes.BYTES_COMPARATOR);