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
|
||||
miss the earlier keys on a lookup
|
||||
(Schubert Zhang via Stack)
|
||||
HBASE-1977 Add ts and allow setting VERSIONS when scanning in shell
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1760 Cleanup TODOs in HTable
|
||||
|
|
|
@ -384,6 +384,7 @@ module HBase
|
|||
timestamp = args["TIMESTAMP"] || nil
|
||||
columns = args["COLUMNS"] || getAllColumns()
|
||||
cache = args["CACHE_BLOCKS"] || true
|
||||
versions = args["VERSIONS"] || 1
|
||||
|
||||
if columns.class == String
|
||||
columns = [columns]
|
||||
|
@ -410,6 +411,7 @@ module HBase
|
|||
scan.setTimeStamp(timestamp)
|
||||
end
|
||||
scan.setCacheBlocks(cache)
|
||||
scan.setMaxVersions(versions) if versions > 1
|
||||
else
|
||||
scan = Scan.new()
|
||||
end
|
||||
|
@ -429,7 +431,7 @@ module HBase
|
|||
qualifier = String.from_java_bytes kv.getQualifier()
|
||||
column = family + ':' + qualifier
|
||||
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
|
||||
@formatter.footer(now, count)
|
||||
|
|
Loading…
Reference in New Issue