HBASE-1977 Add ts and allow setting VERSIONS when scanning in shell
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@835761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
efef11e2dc
commit
bbb6ce9d34
|
@ -110,6 +110,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-1841 If multiple of same key in an hfile and they span blocks, may
|
HBASE-1841 If multiple of same key in an hfile and they span blocks, may
|
||||||
miss the earlier keys on a lookup
|
miss the earlier keys on a lookup
|
||||||
(Schubert Zhang via Stack)
|
(Schubert Zhang via Stack)
|
||||||
|
HBASE-1977 Add ts and allow setting VERSIONS when scanning in shell
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -384,6 +384,7 @@ module HBase
|
||||||
timestamp = args["TIMESTAMP"] || nil
|
timestamp = args["TIMESTAMP"] || nil
|
||||||
columns = args["COLUMNS"] || getAllColumns()
|
columns = args["COLUMNS"] || getAllColumns()
|
||||||
cache = args["CACHE_BLOCKS"] || true
|
cache = args["CACHE_BLOCKS"] || true
|
||||||
|
versions = args["VERSIONS"] || 1
|
||||||
|
|
||||||
if columns.class == String
|
if columns.class == String
|
||||||
columns = [columns]
|
columns = [columns]
|
||||||
|
@ -410,6 +411,7 @@ module HBase
|
||||||
scan.setTimeStamp(timestamp)
|
scan.setTimeStamp(timestamp)
|
||||||
end
|
end
|
||||||
scan.setCacheBlocks(cache)
|
scan.setCacheBlocks(cache)
|
||||||
|
scan.setMaxVersions(versions) if versions > 1
|
||||||
else
|
else
|
||||||
scan = Scan.new()
|
scan = Scan.new()
|
||||||
end
|
end
|
||||||
|
@ -429,7 +431,7 @@ module HBase
|
||||||
qualifier = String.from_java_bytes kv.getQualifier()
|
qualifier = String.from_java_bytes kv.getQualifier()
|
||||||
column = family + ':' + qualifier
|
column = family + ':' + qualifier
|
||||||
cell = toString(column, kv, maxlength)
|
cell = toString(column, kv, maxlength)
|
||||||
@formatter.row([row, "column=%s, %s" % [column, cell]])
|
@formatter.row([row, "column=%s, ts=%d, %s" % [column, kv.getTimestamp(), cell]])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@formatter.footer(now, count)
|
@formatter.footer(now, count)
|
||||||
|
|
Loading…
Reference in New Issue