public static int startMetaStoreWithRetry(HadoopThriftAuthBridge bridge, Configuration conf) throws Exception { return MetaStoreTestUtils.startMetaStoreWithRetry(bridge, conf, false); }
public static int startMetaStoreWithRetry(Configuration conf, boolean keepJdbcUri) throws Exception { return MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf, keepJdbcUri); }
public static int startMetaStoreWithRetry(final HadoopThriftAuthBridge bridge) throws Exception { return MetaStoreTestUtils.startMetaStoreWithRetry(bridge, MetastoreConf.newMetastoreConf()); }
public static int startMetaStoreWithRetry(Configuration conf) throws Exception { return MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); }
public static int startMetaStoreWithRetry() throws Exception { return MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), MetastoreConf.newMetastoreConf()); }
@Before public void setUp() throws Exception { System.setProperty("hive.metastore.event.listeners", DummyListener.class.getName()); System.setProperty("hive.metastore.pre.event.listeners", DummyPreListener.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setVar(conf, ConfVars.PARTITION_NAME_WHITELIST_PATTERN, metaConfVal); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); DummyListener.notifyList.clear(); DummyPreListener.notifyList.clear(); }
@Before public void setUp() throws Exception { System.setProperty("hive.metastore.event.listeners", DummyListener.class.getName()); System.setProperty("hive.metastore.pre.event.listeners", DummyPreListener.class.getName()); System.setProperty("hive.metastore.end.function.listeners", DummyEndFunctionListener.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); msc = new HiveMetaStoreClient(conf); }
@Before public void startServer() throws Exception { MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); } }
@Before public void setUp() throws Exception { conf = MetastoreConf.newMetastoreConf(); System.setProperty(ConfVars.EVENT_LISTENERS.toString(), IpAddressListener.class.getName()); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); msc = new HiveMetaStoreClient(conf); }
@Before public void setUp() throws Exception { System.setProperty("hive.metastore.init.hooks", DummyMetaStoreInitListener.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); }
@Before public void setUp() throws Exception { System.setProperty("hive.metastore.event.listeners", DummyListener.class.getName()); System.setProperty("hive.metastore.pre.event.listeners", DummyPreListener.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setVar(conf, ConfVars.PARTITION_NAME_WHITELIST_PATTERN, metaConfVal); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); msc = new HiveMetaStoreClient(conf); msc.dropDatabase(dbName, true, true, true); DummyListener.notifyList.clear(); DummyPreListener.notifyList.clear(); }
private void startReplicationTargetMetaStoreIfRequired() throws Exception { if (!isReplicationTargetHCatRunning) { HiveConf conf = new HiveConf(); conf.set("javax.jdo.option.ConnectionURL", hcatConf.get("javax.jdo.option.ConnectionURL") .replace("metastore", "target_metastore")); replicationTargetHCatPort = MetaStoreTestUtils.startMetaStoreWithRetry(conf); replicationTargetHCatConf = new HiveConf(hcatConf); replicationTargetHCatConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + replicationTargetHCatPort); isReplicationTargetHCatRunning = true; } }
@Before public void setUp() throws Exception { DummyRawStoreControlledCommit.setCommitSucceed(true); System.setProperty(ConfVars.EVENT_LISTENERS.toString(), DummyListener.class.getName()); System.setProperty(ConfVars.RAW_STORE_IMPL.toString(), DummyRawStoreControlledCommit.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); msc = new HiveMetaStoreClient(conf); DummyListener.notifyList.clear(); }
@Before public void setUp() throws Exception { super.setUp(); if (isServerStarted) { Assert.assertNotNull("Unable to connect to the MetaStore server", client); return; } port = MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); System.out.println("Starting MetaStore Server on port " + port); isServerStarted = true; // This is default case with setugi off for both client and server client = createClient(); }
@BeforeClass public static void startMetaStoreServer() throws Exception { conf.set("hive.in.test", "true"); MetaStoreTestUtils.setConfForStandloneMode(conf); MetastoreConf.setLongVar(conf, ConfVars.BATCH_RETRIEVE_MAX, 2); MetastoreConf.setLongVar(conf, ConfVars.LIMIT_PARTITION_REQUEST, 100); port = MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); LOG.info("Starting MetaStore Server on port " + port); try (HiveMetaStoreClient client = createClient()) { new DatabaseBuilder().setName(dbName).create(client, conf); } }
public void start() throws Exception { MetastoreConf.setBoolVar(getConfiguration(), MetastoreConf.ConfVars.EXECUTE_SET_UGI, false); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), getConfiguration()); super.start(); } }
@Before public void setUp() throws Exception { System.setProperty("hive.metastore.pre.event.listeners", AlternateFailurePreListener.class.getName()); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setLongVar(conf, ConfVars.HMS_HANDLER_ATTEMPTS, 2); MetastoreConf.setTimeVar(conf, ConfVars.HMS_HANDLER_INTERVAL, 0, TimeUnit.MILLISECONDS); MetastoreConf.setBoolVar(conf, ConfVars.HMS_HANDLER_FORCE_RELOAD_CONF, false); MetaStoreTestUtils.setConfForStandloneMode(conf); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); msc = new HiveMetaStoreClient(conf); }
@Before public void setUp() throws Exception { conf = MetastoreConf.newMetastoreConf(); conf.setClass(MetastoreConf.ConfVars.EXPRESSION_PROXY_CLASS.getVarname(), MsckPartitionExpressionProxy.class, PartitionExpressionProxy.class); MetaStoreTestUtils.setConfForStandloneMode(conf); conf.setBoolean(MetastoreConf.ConfVars.MULTITHREADED.getVarname(), false); MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); TxnDbUtil.setConfValues(conf); TxnDbUtil.prepDb(conf); client = new HiveMetaStoreClient(conf); }
@BeforeClass public static void startMetastore() throws Exception { conf = MetastoreConf.newMetastoreConf(); MetaStoreTestUtils.setConfForStandloneMode(conf); MetastoreConf.setClass(conf, ConfVars.EVENT_LISTENERS, SchemaEventListener.class, MetaStoreEventListener.class); MetastoreConf.setClass(conf, ConfVars.TRANSACTIONAL_EVENT_LISTENERS, TransactionalSchemaEventListener.class, MetaStoreEventListener.class); MetastoreConf.setClass(conf, ConfVars.PRE_EVENT_LISTENERS, SchemaPreEventListener.class, MetaStorePreEventListener.class); int port = MetaStoreTestUtils.startMetaStoreWithRetry(HadoopThriftAuthBridge.getBridge(), conf); MetastoreConf.setVar(conf, ConfVars.THRIFT_URIS, "thrift://localhost:" + port); client = new HiveMetaStoreClient(conf); }
@BeforeClass public static void startMetaStoreServer() throws Exception { Configuration metastoreConf = MetastoreConf.newMetastoreConf(); MetastoreConf.setClass(metastoreConf, ConfVars.EXPRESSION_PROXY_CLASS, MockPartitionExpressionForMetastore.class, PartitionExpressionProxy.class); MetaStoreTestUtils.setConfForStandloneMode(metastoreConf); msPort = MetaStoreTestUtils.startMetaStoreWithRetry(metastoreConf); conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setVar(conf, ConfVars.THRIFT_URIS, "thrift://localhost:" + msPort); MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3); MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false); MetastoreConf.setClass(conf, ConfVars.EXPRESSION_PROXY_CLASS, MockPartitionExpressionForMetastore.class, PartitionExpressionProxy.class); }