You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by an...@apache.org on 2014/09/26 06:35:24 UTC
git commit: HBASE-12084 Remove deprecated APIs from Result - shell
addendum
Repository: hbase
Updated Branches:
refs/heads/master 78d532e5f -> 375fc1efe
HBASE-12084 Remove deprecated APIs from Result - shell addendum
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/375fc1ef
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/375fc1ef
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/375fc1ef
Branch: refs/heads/master
Commit: 375fc1efe3f542243e18a581ea0daee1d27d5d87
Parents: 78d532e
Author: anoopsjohn <an...@gmail.com>
Authored: Fri Sep 26 10:04:58 2014 +0530
Committer: anoopsjohn <an...@gmail.com>
Committed: Fri Sep 26 10:04:58 2014 +0530
----------------------------------------------------------------------
hbase-shell/src/main/ruby/hbase/table.rb | 18 +++++++++---------
hbase-shell/src/main/ruby/shell/commands/grant.rb | 2 +-
.../main/ruby/shell/commands/set_visibility.rb | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/375fc1ef/hbase-shell/src/main/ruby/hbase/table.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/table.rb b/hbase-shell/src/main/ruby/hbase/table.rb
index cc4f2a7..da0295b 100644
--- a/hbase-shell/src/main/ruby/hbase/table.rb
+++ b/hbase-shell/src/main/ruby/hbase/table.rb
@@ -355,12 +355,12 @@ EOF
# Print out results. Result can be Cell or RowResult.
res = {}
- result.list.each do |kv|
- family = String.from_java_bytes(kv.getFamily)
- qualifier = org.apache.hadoop.hbase.util.Bytes::toStringBinary(kv.getQualifier)
+ result.listCells.each do |c|
+ family = String.from_java_bytes(c.getFamily)
+ qualifier = org.apache.hadoop.hbase.util.Bytes::toStringBinary(c.getQualifier)
column = "#{family}:#{qualifier}"
- value = to_string(column, kv, maxlength)
+ value = to_string(column, c, maxlength)
if block_given?
yield(column, value)
@@ -387,7 +387,7 @@ EOF
return nil if result.isEmpty
# Fetch cell value
- cell = result.list[0]
+ cell = result.listCells[0]
org.apache.hadoop.hbase.util.Bytes::toLong(cell.getValue)
end
@@ -481,12 +481,12 @@ EOF
row = iter.next
key = org.apache.hadoop.hbase.util.Bytes::toStringBinary(row.getRow)
- row.list.each do |kv|
- family = String.from_java_bytes(kv.getFamily)
- qualifier = org.apache.hadoop.hbase.util.Bytes::toStringBinary(kv.getQualifier)
+ row.listCells.each do |c|
+ family = String.from_java_bytes(c.getFamily)
+ qualifier = org.apache.hadoop.hbase.util.Bytes::toStringBinary(c.getQualifier)
column = "#{family}:#{qualifier}"
- cell = to_string(column, kv, maxlength)
+ cell = to_string(column, c, maxlength)
if block_given?
yield(key, "column=#{column}, #{cell}")
http://git-wip-us.apache.org/repos/asf/hbase/blob/375fc1ef/hbase-shell/src/main/ruby/shell/commands/grant.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands/grant.rb b/hbase-shell/src/main/ruby/shell/commands/grant.rb
index 89fdde6..43fb720 100644
--- a/hbase-shell/src/main/ruby/shell/commands/grant.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/grant.rb
@@ -92,7 +92,7 @@ EOF
iter = scanner.iterator
while iter.hasNext
row = iter.next
- row.list.each do |cell|
+ row.listCells.each do |cell|
put = org.apache.hadoop.hbase.client.Put.new(row.getRow)
put.add(cell)
t.set_cell_permissions(put, permissions)
http://git-wip-us.apache.org/repos/asf/hbase/blob/375fc1ef/hbase-shell/src/main/ruby/shell/commands/set_visibility.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands/set_visibility.rb b/hbase-shell/src/main/ruby/shell/commands/set_visibility.rb
index b2b57b1..cdb7724 100644
--- a/hbase-shell/src/main/ruby/shell/commands/set_visibility.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/set_visibility.rb
@@ -57,7 +57,7 @@ EOF
iter = scanner.iterator
while iter.hasNext
row = iter.next
- row.list.each do |cell|
+ row.listCells.each do |cell|
put = org.apache.hadoop.hbase.client.Put.new(row.getRow)
put.add(cell)
t.set_cell_visibility(put, visibility)