From e8ba249d5ce2ec293a4d19b54fc8298d4eac0271 Mon Sep 17 00:00:00 2001 From: Chandan Rajah Date: Wed, 26 Jun 2013 17:13:42 +0100 Subject: Fixed minor bugs with HBase prefix salter --- src/main/java/parallelai/spyglass/hbase/HBaseSalter.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/parallelai/spyglass/hbase/HBaseSalter.java b/src/main/java/parallelai/spyglass/hbase/HBaseSalter.java index fc656a4..e3f5dc9 100644 --- a/src/main/java/parallelai/spyglass/hbase/HBaseSalter.java +++ b/src/main/java/parallelai/spyglass/hbase/HBaseSalter.java @@ -149,16 +149,21 @@ public class HBaseSalter { public static byte[][] getAllKeysWithStop(byte[] originalKey, String prefixList, byte stopKey) throws IOException { char[] prefixArray = prefixList.toCharArray(); - - return getAllKeysWithStartStop(originalKey, prefixList, (byte)prefixArray[0], (byte)(stopKey - 1)); + + return getAllKeysWithStartStop(originalKey, prefixList, (byte)prefixArray[0], stopKey); +// return getAllKeysWithStartStop(originalKey, prefixList, (byte)prefixArray[0], (byte)(stopKey - 1)); } public static byte[][] getAllKeysInRange(byte[] originalKey, String prefixList, byte startPrefix, byte stopPrefix) { - return getAllKeysWithStartStop(originalKey, prefixList, startPrefix, (byte)(stopPrefix - 1)); + return getAllKeysWithStartStop(originalKey, prefixList, startPrefix, stopPrefix); +// return getAllKeysWithStartStop(originalKey, prefixList, startPrefix, (byte)(stopPrefix - 1)); } private static byte[][] getAllKeysWithStartStop(byte[] originalKey, String prefixList, byte startPrefix, byte stopPrefix) { - char[] prefixArray = prefixList.toCharArray(); + LOG.info("".format("getAllKeysWithStartStop: OKEY (%s) PLIST (%s) PSRT (%s) PSTP (%s)", + Bytes.toString(originalKey), prefixList, startPrefix, stopPrefix)); + + char[] prefixArray = prefixList.toCharArray(); TreeSet prefixSet = new TreeSet(); for( char c : prefixArray ) { -- cgit v1.2.3