diff --git a/CHANGES.txt b/CHANGES.txt index 9c5974946e9..ddc9da33c16 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -159,6 +159,10 @@ Release 0.21.0 - Unreleased HBASE-2120 [stargate] Unable to delete column families (Greg Lu via Andrew Purtell) HBASE-2123 Remove 'master' command-line option from PE + HBASE-2024 [stargate] Deletes not working as expected (Greg Lu via Andrew + Purtell) + HBASE-2122 [stargate] Initializing scanner column families doesn't work + (Greg Lu via Andrew Purtell) IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java b/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java index 4dab7e2f396..6f5f315e18c 100644 --- a/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java +++ b/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowResource.java @@ -277,7 +277,13 @@ public class RowResource implements Constants { if (LOG.isDebugEnabled()) { LOG.debug("DELETE " + uriInfo.getAbsolutePath()); } - Delete delete = new Delete(rowspec.getRow()); + + Delete delete = null; + if (rowspec.hasTimestamp()) + delete = new Delete(rowspec.getRow(), rowspec.getTimestamp(), null); + else + delete = new Delete(rowspec.getRow()); + for (byte[] column: rowspec.getColumns()) { byte[][] split = KeyValue.parseColumn(column); if (rowspec.hasTimestamp()) { diff --git a/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/ScannerResultGenerator.java b/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/ScannerResultGenerator.java index 0fde791fd68..07abcb0892e 100644 --- a/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/ScannerResultGenerator.java +++ b/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/ScannerResultGenerator.java @@ -59,7 +59,7 @@ public class ScannerResultGenerator extends ResultGenerator { byte[][] columns = rowspec.getColumns(); for (byte[] column: columns) { byte[][] split = KeyValue.parseColumn(column); - if (split.length == 2) { + if (split.length == 2 && split[1].length != 0) { scan.addColumn(split[0], split[1]); } else { scan.addFamily(split[0]);