Skip to content

Commit ac6d543

Browse files
committed
HBASE-22451 TestLoadIncrementalHFiles and TestSecureLoadIncrementalHFiles are flaky (#250)
Start ZKNamespaceManager as first step in TableNamespaceManager initialization Signed-off-by: Peter Somogyi <[email protected]>
1 parent 911f98c commit ac6d543

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,16 @@ public synchronized boolean isTableAvailableAndInitialized(
222222
return true;
223223
}
224224

225+
if (zkNamespaceManager == null) {
226+
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
227+
zkNamespaceManager.start();
228+
}
229+
225230
// Now check if the table is assigned, if not then fail fast
226231
if (isTableAssigned()) {
227232
try {
228233
boolean initGoodSofar = true;
229234
nsTable = this.masterServices.getConnection().getTable(TableName.NAMESPACE_TABLE_NAME);
230-
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
231-
zkNamespaceManager.start();
232-
233235
if (get(nsTable, NamespaceDescriptor.DEFAULT_NAMESPACE.getName()) == null) {
234236
if (createNamespaceAync) {
235237
masterServices.getMasterProcedureExecutor().submitProcedure(

0 commit comments

Comments
 (0)