SENTRY-1697: Deprecate feature flag for enabling notification log (Alex Kolbasov, reviewed by Vamsee Yarlagadda, Kalyan Kalvagadda and Na Li)
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/e4936efd Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/e4936efd Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/e4936efd Branch: refs/heads/master Commit: e4936efdc4cb1f7bcffd4c0b23835088e81f1af3 Parents: 0c72566 Author: Alexander Kolbasov <[email protected]> Authored: Wed Jul 12 21:37:06 2017 +0200 Committer: Alexander Kolbasov <[email protected]> Committed: Wed Jul 12 21:37:21 2017 +0200 ---------------------------------------------------------------------- .../org/apache/sentry/service/thrift/SentryService.java | 10 +--------- .../apache/sentry/service/thrift/ServiceConstants.java | 2 -- .../sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sentry/blob/e4936efd/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java index 0c7173f..6014a79 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java @@ -113,7 +113,6 @@ public class SentryService implements Callable, SigUtils.SigListener { private final SentryStore sentryStore; private ScheduledExecutorService sentryStoreCleanService; private final LeaderStatusMonitor leaderMonitor; - private final boolean notificationLogEnabled; private final boolean hdfsSyncEnabled; public SentryService(Configuration conf) throws Exception { @@ -167,9 +166,6 @@ public class SentryService implements Callable, SigUtils.SigListener { this.leaderMonitor = LeaderStatusMonitor.getLeaderStatusMonitor(conf); webServerPort = conf.getInt(ServerConfig.SENTRY_WEB_PORT, ServerConfig.SENTRY_WEB_PORT_DEFAULT); - notificationLogEnabled = conf.getBoolean(ServerConfig.SENTRY_NOTIFICATION_LOG_ENABLED, - ServerConfig.SENTRY_NOTIFICATION_LOG_ENABLED_DEFAULT); - hdfsSyncEnabled = SentryServiceUtil.isHDFSSyncEnabled(conf); status = Status.NOT_STARTED; @@ -285,10 +281,6 @@ public class SentryService implements Callable, SigUtils.SigListener { return; } - if (!notificationLogEnabled) { - return; - } - String metastoreURI = SentryServiceUtil.getHiveMetastoreURI(); if (metastoreURI == null) { LOGGER.info("Metastore uri is not configured. Do not start HMSFollower"); @@ -324,7 +316,7 @@ public class SentryService implements Callable, SigUtils.SigListener { } private void stopHMSFollower(Configuration conf) { - if (!notificationLogEnabled || !hdfsSyncEnabled) { + if (!hdfsSyncEnabled) { return; } http://git-wip-us.apache.org/repos/asf/sentry/blob/e4936efd/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java index d85e7b4..6e22875 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java @@ -171,8 +171,6 @@ public class ServiceConstants { public static final String SENTRY_HMSFOLLOWER_INTERVAL_MILLS = "sentry.hmsfollower.interval.mills"; public static final long SENTRY_HMSFOLLOWER_INTERVAL_MILLS_DEFAULT = 500; - public static final String SENTRY_NOTIFICATION_LOG_ENABLED = "sentry.notification.log.enabled"; - public static final boolean SENTRY_NOTIFICATION_LOG_ENABLED_DEFAULT = false; public static final String SENTRY_WEB_ENABLE = "sentry.service.web.enable"; public static final Boolean SENTRY_WEB_ENABLE_DEFAULT = false; public static final String SENTRY_WEB_PORT = "sentry.service.web.port"; http://git-wip-us.apache.org/repos/asf/sentry/blob/e4936efd/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java index ba50752..e62c54a 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java @@ -797,7 +797,6 @@ public abstract class TestHDFSIntegrationBase { properties.put(ServerConfig.SENTRY_STORE_JDBC_PASS, "dummy"); properties.put("sentry.service.processor.factories", "org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessorFactory,org.apache.sentry.hdfs.SentryHDFSServiceProcessorFactory"); - properties.put(ServerConfig.SENTRY_NOTIFICATION_LOG_ENABLED,"true"); properties.put("sentry.policy.store.plugins", "org.apache.sentry.hdfs.SentryPlugin"); properties.put(ServerConfig.SENTRY_HMSFOLLOWER_INIT_DELAY_MILLS, "10000"); properties.put(ServerConfig.SENTRY_HMSFOLLOWER_INTERVAL_MILLS, "50");
