HBASE-9871 PB issue : Increment attributes are not getting passed to server
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1537884 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dcf61670d4
commit
22b465ea1c
|
@ -717,6 +717,9 @@ public final class ProtobufUtil {
|
||||||
increment.setTimeRange(minStamp, maxStamp);
|
increment.setTimeRange(minStamp, maxStamp);
|
||||||
}
|
}
|
||||||
increment.setDurability(toDurability(proto.getDurability()));
|
increment.setDurability(toDurability(proto.getDurability()));
|
||||||
|
for (NameBytesPair attribute : proto.getAttributeList()) {
|
||||||
|
increment.setAttribute(attribute.getName(), attribute.getValue().toByteArray());
|
||||||
|
}
|
||||||
return increment;
|
return increment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -973,6 +976,15 @@ public final class ProtobufUtil {
|
||||||
}
|
}
|
||||||
builder.addColumnValue(columnBuilder.build());
|
builder.addColumnValue(columnBuilder.build());
|
||||||
}
|
}
|
||||||
|
Map<String, byte[]> attributes = increment.getAttributesMap();
|
||||||
|
if (!attributes.isEmpty()) {
|
||||||
|
NameBytesPair.Builder attributeBuilder = NameBytesPair.newBuilder();
|
||||||
|
for (Map.Entry<String, byte[]> attribute : attributes.entrySet()) {
|
||||||
|
attributeBuilder.setName(attribute.getKey());
|
||||||
|
attributeBuilder.setValue(ZeroCopyLiteralByteString.wrap(attribute.getValue()));
|
||||||
|
builder.addAttribute(attributeBuilder.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue