From 253ac505390775836b19e946f37c5ae6dd2e17c8 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Wed, 18 Apr 2018 16:33:03 -0500 Subject: [PATCH] HBASE-20276 ADDENDUM Ruby 1.8 syntax fixes. --- hbase-shell/src/main/ruby/hbase/table.rb | 6 +++--- hbase-shell/src/main/ruby/shell/commands/get_splits.rb | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hbase-shell/src/main/ruby/hbase/table.rb b/hbase-shell/src/main/ruby/hbase/table.rb index 3e3fb8e734..4f70510dba 100644 --- a/hbase-shell/src/main/ruby/hbase/table.rb +++ b/hbase-shell/src/main/ruby/hbase/table.rb @@ -720,9 +720,9 @@ EOF # Get the split points for the table def _get_splits_internal() locator = @table.getRegionLocator() - locator.getAllRegionLocations() - .map { |i| Bytes.toStringBinary(i.getRegionInfo().getStartKey) } - .delete_if { |k| k == "" } + locator.getAllRegionLocations().map { |i| + Bytes.toStringBinary(i.getRegionInfo().getStartKey) + }.delete_if { |k| k == "" } ensure locator.close() end diff --git a/hbase-shell/src/main/ruby/shell/commands/get_splits.rb b/hbase-shell/src/main/ruby/shell/commands/get_splits.rb index 26be15f176..197d6eb627 100644 --- a/hbase-shell/src/main/ruby/shell/commands/get_splits.rb +++ b/hbase-shell/src/main/ruby/shell/commands/get_splits.rb @@ -38,8 +38,7 @@ EOF def get_splits(table) splits = table._get_splits_internal() - puts(format('Total number of splits = %d', - numsplits: (splits.size + 1))) + puts(format('Total number of splits = %d', (splits.size + 1))) splits end end -- 2.16.1