} catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+
+ @SuppressWarnings("rawtypes")
+ @BeforeClass
+ public static void connectToMetastore() throws Exception {
+ conf = new HiveConf();
+
+
MetastoreConf.setVar(conf,MetastoreConf.ConfVars.TRANSACTIONAL_EVENT_LISTENERS,
+ "org.apache.hive.hcatalog.listener.DbNotificationListener");
+ conf.setBoolVar(HiveConf.ConfVars.HIVE_IN_TEST_REPL, true);
+ conf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
+ conf.setBoolVar(HiveConf.ConfVars.FIRE_EVENTS_FOR_DML, true);
+ conf.setBoolVar(HiveConf.ConfVars.REPLCMENABLED, false);
+ conf.setVar(HiveConf.ConfVars.METASTORE_RAW_STORE_IMPL,
DummyRawStoreFailEvent.class.getName());
+ MetastoreConf.setTimeVar(conf,
MetastoreConf.ConfVars.EVENT_DB_LISTENER_CLEAN_INTERVAL, CLEANUP_SLEEP_TIME,
TimeUnit.SECONDS);
+ MetastoreConf.setVar(conf,
MetastoreConf.ConfVars.EVENT_MESSAGE_FACTORY,
JSONMessageEncoder.class.getName());
+ MetastoreConf.setTimeVar(conf,
MetastoreConf.ConfVars.EVENT_DB_LISTENER_TTL, EVENTS_TTL, TimeUnit.SECONDS);
+ MetastoreConf.setTimeVar(conf,
EVENT_DB_LISTENER_CLEAN_STARTUP_WAIT_INTERVAL, 20, TimeUnit.SECONDS);
+
+ conf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER,
+
"org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
+ SessionState.start(new CliSessionState(conf));
+
+ msClient = new HiveMetaStoreClient(conf);
+ driver = DriverFactory.newDriver(conf);
+ md = JSONMessageEncoder.getInstance().getDeserializer();
+
+ bcompat = new ReplicationV1CompatRule(msClient, conf,
testsToSkipForReplV1BackwardCompatTesting);
+ }
+
+ @Before
+ public void setup() throws Exception {
+ long now = System.currentTimeMillis() / 1000;
+ startTime = 0;
+ if (now > Integer.MAX_VALUE) {
+ fail("Bummer, time has fallen over the edge");
+ } else {
+ startTime = (int) now;
+ }
+ firstEventId = msClient.getCurrentNotificationEventId().getEventId();
+ DummyRawStoreFailEvent.setEventSucceed(true);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() {
Review Comment:
I assume that fixes the flakiness. Am I correct?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]