From 84a5d29391308958b83849ab0ba0faef3b6a0a57 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 3 Jul 2017 19:51:16 -0700 Subject: [PATCH] HBASE-18286 Create static empty byte array to save memory Revert "Revert "HBASE-18266 Create static empty byte array to save memory (Ben Epstein)"" ... i.e. a reapply but with correct JIRA this time. This reverts commit 3a0db474a20fc6ee212db6d99d9503b6397c2fa8. --- .../src/main/java/org/apache/hadoop/hbase/client/Put.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 5c3ac4bbd9d..5c1528f218f 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 @@ -345,7 +345,7 @@ public class Put extends Mutation implements HeapSize, Comparable { * existing KeyValue object in the family map. */ public boolean has(byte [] family, byte [] qualifier) { - return has(family, qualifier, this.ts, new byte[0], true, true); + return has(family, qualifier, this.ts, HConstants.EMPTY_BYTE_ARRAY, true, true); } /** @@ -360,7 +360,7 @@ public class Put extends Mutation implements HeapSize, Comparable { * existing KeyValue object in the family map. */ public boolean has(byte [] family, byte [] qualifier, long ts) { - return has(family, qualifier, ts, new byte[0], false, true); + return has(family, qualifier, ts, HConstants.EMPTY_BYTE_ARRAY, false, true); } /**