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
72702eeb70
commit
f7fbc168a1
|
@ -117,7 +117,8 @@ module Shell
|
||||||
raise "Unknown region #{args.first}!"
|
raise "Unknown region #{args.first}!"
|
||||||
end
|
end
|
||||||
if cause.is_a?(org.apache.hadoop.hbase.NamespaceNotFoundException)
|
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
|
end
|
||||||
if cause.is_a?(org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException)
|
if cause.is_a?(org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException)
|
||||||
raise "Unknown snapshot #{args.first}!"
|
raise "Unknown snapshot #{args.first}!"
|
||||||
|
|
Loading…
Reference in New Issue