Commit 0adfa8f4 by nixonrodrigues Committed by Madhan Neethiraj

ATLAS-2544: initialize Atlas Authorizer after type-store initialization

parent 96a348a9
......@@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.apache.atlas.AtlasErrorCode;
import org.apache.atlas.AtlasException;
import org.apache.atlas.authorize.AtlasAuthorizerFactory;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.ha.HAConfiguration;
import org.apache.atlas.listener.ActiveStateChangeHandler;
......@@ -94,6 +95,12 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
if (!HAConfiguration.isHAEnabled(conf) || isMigrationEnabled) {
atlasTypeDefStore.init();
loadBootstrapTypeDefs();
try {
AtlasAuthorizerFactory.getAtlasAuthorizer();
} catch (Throwable t) {
LOG.error("AtlasTypeDefStoreInitializer.init(): Unable to obtain AtlasAuthorizer", t);
}
} else {
LOG.info("AtlasTypeDefStoreInitializer.init(): deferring type loading until instance activation");
}
......@@ -753,4 +760,4 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
}
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment