Skip to content

Commit 5beba8f

Browse files
authored
HBASE-22451 TestLoadIncrementalHFiles and TestSecureLoadIncrementalHFiles are flaky (#250)
Start ZKNamespaceManager as first step in TableNamespaceManager initialization Signed-off-by: Peter Somogyi <psomogyi@apache.org>
1 parent e233cfb commit 5beba8f

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
@@ -235,14 +235,16 @@ public synchronized boolean isTableAvailableAndInitialized(
235235
return true;
236236
}
237237

238+
if (zkNamespaceManager == null) {
239+
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
240+
zkNamespaceManager.start();
241+
}
242+
238243
// Now check if the table is assigned, if not then fail fast
239244
if (isTableAssigned()) {
240245
try {
241246
boolean initGoodSofar = true;
242247
nsTable = this.masterServices.getConnection().getTable(TableName.NAMESPACE_TABLE_NAME);
243-
zkNamespaceManager = new ZKNamespaceManager(masterServices.getZooKeeper());
244-
zkNamespaceManager.start();
245-
246248
if (get(nsTable, NamespaceDescriptor.DEFAULT_NAMESPACE.getName()) == null) {
247249
if (createNamespaceAync) {
248250
masterServices.getMasterProcedureExecutor().submitProcedure(

0 commit comments

Comments
 (0)