diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java index 41ec446f7f1..d40b7a38c7a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java @@ -100,6 +100,9 @@ public class Put extends Mutation implements HeapSize, Comparable { this.familyMap.put(entry.getKey(), entry.getValue()); } this.durability = putToCopy.durability; + for (Map.Entry entry : putToCopy.getAttributesMap().entrySet()) { + this.setAttribute(entry.getKey(), entry.getValue()); + } } /** diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java index 0c5565baedc..b876fa7e837 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java @@ -222,6 +222,9 @@ public class Scan extends OperationWithAttributes { this.tr = get.getTimeRange(); this.familyMap = get.getFamilyMap(); this.getScan = true; + for (Map.Entry attr : get.getAttributesMap().entrySet()) { + setAttribute(attr.getKey(), attr.getValue()); + } } public boolean isGetScan() {