HBASE-6644 HBaseAdmin.createTable should wait more till table is enabled.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1376680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2012-08-23 20:26:26 +00:00
parent f96e1641cf
commit b02f807aa3
1 changed files with 9 additions and 2 deletions

View File

@ -451,10 +451,17 @@ public class HBaseAdmin implements Abortable, Closeable {
}
} else {
doneWithMetaScan = true;
tries = -1;
}
}
if (doneWithMetaScan && isTableEnabled(desc.getName())) {
} else if (isTableEnabled(desc.getName())) {
return;
} else {
try { // Sleep
Thread.sleep(getPauseTime(tries));
} catch (InterruptedException e) {
throw new InterruptedIOException("Interrupted when waiting" +
" for table to be enabled; meta scan was done");
}
}
}
throw new TableNotEnabledException(