HBASE-19771 restore_snapshot shell command gives wrong namespace if the namespace doesn't exist
Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
parent
20ccaef841
commit
8bbfcdda46
|
@ -117,7 +117,8 @@ module Shell
|
|||
raise "Unknown region #{args.first}!"
|
||||
end
|
||||
if cause.is_a?(org.apache.hadoop.hbase.NamespaceNotFoundException)
|
||||
raise "Unknown namespace #{args.first.split(':')[0]}!"
|
||||
s = /.*NamespaceNotFoundException: (?<namespace>[^\n]+).*/.match(cause.message)
|
||||
raise "Unknown namespace #{s['namespace']}!"
|
||||
end
|
||||
if cause.is_a?(org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException)
|
||||
raise "Unknown snapshot #{args.first}!"
|
||||
|
|
Loading…
Reference in New Issue