HBASE-8798 Fix a minor bug in shell command with clone_snapshot table error

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1499138 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-07-02 22:46:25 +00:00
parent 0814983467
commit 9ccf16db51
2 changed files with 3 additions and 3 deletions

View File

@ -2462,7 +2462,7 @@ public class HBaseAdmin implements Abortable, Closeable {
public void cloneSnapshot(final String snapshotName, final String tableName)
throws IOException, TableExistsException, RestoreSnapshotException, InterruptedException {
if (tableExists(tableName)) {
throw new TableExistsException("Table '" + tableName + " already exists");
throw new TableExistsException(tableName);
}
internalRestoreSnapshot(snapshotName, tableName);
waitUntilTableIsEnabled(Bytes.toBytes(tableName));

View File

@ -86,8 +86,8 @@ module Shell
rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
raise "Unknown column family! Valid column names: #{valid_cols.join(", ")}"
rescue org.apache.hadoop.hbase.exceptions.TableExistsException
raise "Table already exists: #{args.first}!"
rescue org.apache.hadoop.hbase.exceptions.TableExistsException => e
raise "Table already exists: #{e.message}!"
end
end
end