Repository: atlas Updated Branches: refs/heads/master 96a348a9a -> 79eed8c23
ATLAS-2544: initialize Atlas Authorizer after type-store initialization Signed-off-by: Madhan Neethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/0adfa8f4 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/0adfa8f4 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/0adfa8f4 Branch: refs/heads/master Commit: 0adfa8f459453b789e55071db2da1758aebd4c0e Parents: 96a348a Author: nixonrodrigues <[email protected]> Authored: Thu Apr 12 10:33:31 2018 -0700 Committer: Madhan Neethiraj <[email protected]> Committed: Thu Apr 12 10:33:31 2018 -0700 ---------------------------------------------------------------------- .../store/bootstrap/AtlasTypeDefStoreInitializer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/0adfa8f4/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java ---------------------------------------------------------------------- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java index 40b7d11..c56157d 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java @@ -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 +}
