HBASE-9210: hbase shell -d doesn't print out exception stack trace
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516293 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a0b240db54
commit
ed864807e3
@ -114,6 +114,7 @@ require 'shell/formatter'
|
|||||||
|
|
||||||
# Setup console
|
# Setup console
|
||||||
@shell = Shell::Shell.new(@hbase, @formatter)
|
@shell = Shell::Shell.new(@hbase, @formatter)
|
||||||
|
@shell.debug = @shell_debug
|
||||||
|
|
||||||
# Add commands to this namespace
|
# Add commands to this namespace
|
||||||
@shell.export_commands(self)
|
@shell.export_commands(self)
|
||||||
|
@ -365,7 +365,7 @@ def loadRegions(options, hostname)
|
|||||||
begin
|
begin
|
||||||
isSuccessfulScan(admin, r)
|
isSuccessfulScan(admin, r)
|
||||||
exists = true
|
exists = true
|
||||||
rescue org.apache.hadoop.hbase.exceptions.NotServingRegionException => e
|
rescue org.apache.hadoop.hbase.NotServingRegionException => e
|
||||||
$LOG.info("Failed scan of " + e.message)
|
$LOG.info("Failed scan of " + e.message)
|
||||||
end
|
end
|
||||||
count = count + 1
|
count = count + 1
|
||||||
|
@ -47,7 +47,7 @@ require 'java'
|
|||||||
|
|
||||||
import org.apache.hadoop.hbase.HBaseConfiguration
|
import org.apache.hadoop.hbase.HBaseConfiguration
|
||||||
import org.apache.hadoop.hbase.HConstants
|
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.HBaseAdmin
|
||||||
import org.apache.hadoop.hbase.client.HTable
|
import org.apache.hadoop.hbase.client.HTable
|
||||||
import org.apache.hadoop.hbase.client.Scan
|
import org.apache.hadoop.hbase.client.Scan
|
||||||
|
@ -33,9 +33,13 @@ module Shell
|
|||||||
#(everything is a message, so this is just the formal semantics to support that idiom)
|
#(everything is a message, so this is just the formal semantics to support that idiom)
|
||||||
translate_hbase_exceptions(*args) { send(cmd,*args) }
|
translate_hbase_exceptions(*args) { send(cmd,*args) }
|
||||||
rescue => e
|
rescue => e
|
||||||
|
rootCause = e
|
||||||
|
while rootCause != nil && rootCause.respond_to?(:cause) && rootCause.cause != nil
|
||||||
|
rootCause = rootCause.cause
|
||||||
|
end
|
||||||
puts
|
puts
|
||||||
puts "ERROR: #{e}"
|
puts "ERROR: #{rootCause}"
|
||||||
puts "Backtrace: #{e.backtrace.join("\n ")}" if debug
|
puts "Backtrace: #{rootCause.backtrace.join("\n ")}" if debug
|
||||||
puts
|
puts
|
||||||
puts "Here is some help for this command:"
|
puts "Here is some help for this command:"
|
||||||
puts help
|
puts help
|
||||||
|
Loading…
x
Reference in New Issue
Block a user