Preconditions.checkState(hiveConnectionFactory == null); hiveConnectionFactory = new HiveSimpleConnectionFactory(conf, new HiveConf()); hiveConnectionFactory.init(); hmsFollower = new HMSFollower(conf, sentryStore, leaderMonitor, hiveConnectionFactory);
@BeforeClass public static void setup() throws IOException, LoginException { configuration.set(ServerConfig.PRINCIPAL, "sentry/_HOST@TEST.COM"); hiveConnectionFactory = new HiveSimpleConnectionFactory(configuration, new HiveConf()); hiveConnectionFactory.init(); configuration.set("sentry.hive.sync.create", "true"); configuration.set(SENTRY_SERVICE_FULL_UPDATE_PUBSUB, "true"); enableHdfsSyncInSentry(configuration); }
configuration.set(AUTHZ_SERVER_NAME.getVar(), serverName); HMSFollower hmsFollower = new HMSFollower(configuration, sentryStore, null, new HiveSimpleConnectionFactory(conf, new HiveConf()), null);
configuration.set(AUTHZ_SERVER_NAME.getVar(), serverName); HMSFollower hmsFollower = new HMSFollower(configuration, sentryStore, null, new HiveSimpleConnectionFactory(conf, new HiveConf()), null);