HBASE-2402 [stargate] set maxVersions on gets

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@930138 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2010-04-01 23:35:24 +00:00
parent 379baff984
commit e1b5bff0f0
2 changed files with 13 additions and 0 deletions

View File

@ -507,6 +507,7 @@ Release 0.21.0 - Unreleased
(Alexey Kovyrin via Stack)
HBASE-2327 [EC2] Allocate elastic IP addresses for ZK and master nodes
HBASE-2319 [stargate] multiuser mode: request shaping
HBASE-2402 [stargate] set maxVersions on gets
OPTIMIZATIONS
HBASE-410 [testing] Speed up the test suite

View File

@ -37,6 +37,8 @@ public class RowSpec {
public static final long DEFAULT_START_TIMESTAMP = 0;
public static final long DEFAULT_END_TIMESTAMP = Long.MAX_VALUE;
private static final String versionPrefix = "?v=";
private byte[] row = HConstants.EMPTY_START_ROW;
private byte[] endRow = null;
private TreeSet<byte[]> columns =
@ -53,6 +55,7 @@ public class RowSpec {
i = parseRowKeys(path, i);
i = parseColumns(path, i);
i = parseTimestamp(path, i);
i = parseMaxVersions(path, i);
}
private int parseRowKeys(final String path, int i)
@ -198,6 +201,15 @@ public class RowSpec {
return i;
}
private int parseMaxVersions(final String path, int i) {
String s = path.substring(i);
if (s.startsWith(versionPrefix)) {
this.maxVersions = Integer.valueOf(s.substring(versionPrefix.length()));
i += s.length();
}
return i;
}
public RowSpec(byte[] startRow, byte[] endRow, byte[][] columns,
long startTime, long endTime, int maxVersions) {
this.row = startRow;