accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [4/8] git commit: ACCUMULO-2578: Throw exception when offset is non-zero.
Date Sat, 24 May 2014 22:32:15 GMT
ACCUMULO-2578: Throw exception when offset is non-zero.

Signed-off-by: Josh Elser <elserj@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9fbc24ab
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9fbc24ab
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9fbc24ab

Branch: refs/heads/master
Commit: 9fbc24abea69aa1da162d48a93ddc09970bdb6e1
Parents: cff4c2d
Author: Gary Singh <gary.singh@sabre-eng.com>
Authored: Fri May 16 13:13:02 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat May 24 18:15:54 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/util/LocalityGroupUtil.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9fbc24ab/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
index 6efd098..da3593d 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java
@@ -155,6 +155,9 @@ public class LocalityGroupUtil {
   }
   
   public static String encodeColumnFamily(ByteSequence bs) {
+    if (bs.offset() != 0) {
+      throw new IllegalArgumentException("The offset cannot be non-zero.");
+    }
     return encodeColumnFamily(new StringBuilder(), bs.getBackingArray(), bs.length());
   }
   


Mime
View raw message