hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject svn commit: r1516293 - in /hbase/trunk: bin/hirb.rb bin/region_mover.rb bin/region_status.rb hbase-server/src/main/ruby/shell/commands.rb
Date Wed, 21 Aug 2013 20:21:15 GMT
Author: jeffreyz
Date: Wed Aug 21 20:21:14 2013
New Revision: 1516293

URL: http://svn.apache.org/r1516293
Log:
HBASE-9210: hbase shell -d doesn't print out exception stack trace

Modified:
    hbase/trunk/bin/hirb.rb
    hbase/trunk/bin/region_mover.rb
    hbase/trunk/bin/region_status.rb
    hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb

Modified: hbase/trunk/bin/hirb.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hirb.rb?rev=1516293&r1=1516292&r2=1516293&view=diff
==============================================================================
--- hbase/trunk/bin/hirb.rb (original)
+++ hbase/trunk/bin/hirb.rb Wed Aug 21 20:21:14 2013
@@ -114,6 +114,7 @@ require 'shell/formatter'
 
 # Setup console
 @shell = Shell::Shell.new(@hbase, @formatter)
+@shell.debug = @shell_debug
 
 # Add commands to this namespace
 @shell.export_commands(self)

Modified: hbase/trunk/bin/region_mover.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/region_mover.rb?rev=1516293&r1=1516292&r2=1516293&view=diff
==============================================================================
--- hbase/trunk/bin/region_mover.rb (original)
+++ hbase/trunk/bin/region_mover.rb Wed Aug 21 20:21:14 2013
@@ -365,7 +365,7 @@ def loadRegions(options, hostname)
     begin
       isSuccessfulScan(admin, r)
       exists = true
-    rescue org.apache.hadoop.hbase.exceptions.NotServingRegionException => e
+    rescue org.apache.hadoop.hbase.NotServingRegionException => e
       $LOG.info("Failed scan of " + e.message)
     end
     count = count + 1

Modified: hbase/trunk/bin/region_status.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/region_status.rb?rev=1516293&r1=1516292&r2=1516293&view=diff
==============================================================================
--- hbase/trunk/bin/region_status.rb (original)
+++ hbase/trunk/bin/region_status.rb Wed Aug 21 20:21:14 2013
@@ -47,7 +47,7 @@ require 'java'
 
 import org.apache.hadoop.hbase.HBaseConfiguration
 import org.apache.hadoop.hbase.HConstants
-import org.apache.hadoop.hbase.exceptions.MasterNotRunningException
+import org.apache.hadoop.hbase.MasterNotRunningException
 import org.apache.hadoop.hbase.client.HBaseAdmin
 import org.apache.hadoop.hbase.client.HTable
 import org.apache.hadoop.hbase.client.Scan

Modified: hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb?rev=1516293&r1=1516292&r2=1516293&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb (original)
+++ hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb Wed Aug 21 20:21:14 2013
@@ -33,9 +33,13 @@ module Shell
         #(everything is a message, so this is just the formal semantics to support that idiom)
         translate_hbase_exceptions(*args) { send(cmd,*args) }
       rescue => e
+        rootCause = e
+        while rootCause != nil && rootCause.respond_to?(:cause) && rootCause.cause
!= nil
+          rootCause = rootCause.cause
+        end
         puts
-        puts "ERROR: #{e}"
-        puts "Backtrace: #{e.backtrace.join("\n           ")}" if debug
+        puts "ERROR: #{rootCause}"
+        puts "Backtrace: #{rootCause.backtrace.join("\n           ")}" if debug
         puts
         puts "Here is some help for this command:"
         puts help



Mime
View raw message