HBASE-22451 TestLoadIncrementalHFiles and TestSecureLoadIncrementalHFiles are flaky (#250)

Start ZKNamespaceManager as first step in TableNamespaceManager initialization

Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
Andrew Purtell 2019-05-30 17:47:06 -07:00 committed by GitHub
parent e233cfbe75
commit 5beba8fd4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -235,14 +235,16 @@ public class TableNamespaceManager {
return true;
}
if (zkNamespaceManager == null) {
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
zkNamespaceManager.start();
}
// Now check if the table is assigned, if not then fail fast
if (isTableAssigned()) {
try {
boolean initGoodSofar = true;
nsTable = this.masterServices.getConnection().getTable(TableName.NAMESPACE_TABLE_NAME);
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
zkNamespaceManager.start();
if (get(nsTable, NamespaceDescriptor.DEFAULT_NAMESPACE.getName()) == null) {
if (createNamespaceAync) {
masterServices.getMasterProcedureExecutor().submitProcedure(