From 59c519b0f2b7c3511aa25bc15af1d43a5837544a Mon Sep 17 00:00:00 2001 From: "subrat.mishra" Date: Mon, 10 Sep 2018 13:18:58 +0530 Subject: [PATCH] HBASE-21178 Changed the method signature of converter_method to accept only bytes in convert_bytes method. --- hbase-shell/src/main/ruby/hbase/table.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-shell/src/main/ruby/hbase/table.rb b/hbase-shell/src/main/ruby/hbase/table.rb index 55211b0056..568afad389 100644 --- a/hbase-shell/src/main/ruby/hbase/table.rb +++ b/hbase-shell/src/main/ruby/hbase/table.rb @@ -778,7 +778,10 @@ EOF end def convert_bytes(bytes, converter_class = nil, converter_method = nil) - convert_bytes_with_position(bytes, 0, bytes.length, converter_class, converter_method) + # Avoid nil + converter_class = 'org.apache.hadoop.hbase.util.Bytes' unless converter_class + converter_method = 'toStringBinary' unless converter_method + eval(converter_class).method(converter_method).call(bytes) end def convert_bytes_with_position(bytes, offset, len, converter_class, converter_method) -- 2.15.2 (Apple Git-101.1)