diff --git a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveSink.java b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveSink.java index fbb2de2c87..dc04f8a5a6 100644 --- a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveSink.java +++ b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveSink.java @@ -103,10 +103,11 @@ public TestHiveSink() throws Exception { conf = new HiveConf(this.getClass()); TestUtil.setConfValues(conf); + TxnDbUtil.setConfValues(conf); // 1) prepare hive - TxnDbUtil.cleanDb(); - TxnDbUtil.prepDb(); + TxnDbUtil.cleanDb(conf); + TxnDbUtil.prepDb(conf); // 2) Setup Hive client SessionState.start(new CliSessionState(conf)); diff --git a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveWriter.java b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveWriter.java index 4d7c9bb8ca..3bdb4ec0bd 100644 --- a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveWriter.java +++ b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestHiveWriter.java @@ -86,6 +86,7 @@ public TestHiveWriter() throws Exception { // 1) Start metastore conf = new HiveConf(this.getClass()); TestUtil.setConfValues(conf); + TxnDbUtil.setConfValues(conf); if (metaStoreURI != null) { conf.setVar(HiveConf.ConfVars.METASTOREURIS, metaStoreURI); } @@ -99,8 +100,8 @@ public TestHiveWriter() throws Exception { @Before public void setUp() throws Exception { // 1) prepare hive - TxnDbUtil.cleanDb(); - TxnDbUtil.prepDb(); + TxnDbUtil.cleanDb(conf); + TxnDbUtil.prepDb(conf); // 1) Setup tables TestUtil.dropDB(conf, dbName); diff --git a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestUtil.java b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestUtil.java index 1fcb4eb46f..db724fa996 100644 --- a/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestUtil.java +++ b/flume-ng-sinks/flume-hive-sink/src/test/java/org/apache/flume/sink/hive/TestUtil.java @@ -58,6 +58,8 @@ public static void setConfValues(HiveConf conf) { conf.setVar(HiveConf.ConfVars.HIVE_TXN_MANAGER, txnMgr); conf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, true); conf.set("fs.raw.impl", RawFileSystem.class.getName()); + conf.setBoolVar(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION, false); + conf.set("datanucleus.schema.autoCreateAll", "true"); } public static void createDbAndTable(Driver driver, String databaseName, diff --git a/pom.xml b/pom.xml index 5ef45844f6..6e0a7d7dc1 100644 --- a/pom.xml +++ b/pom.xml @@ -72,7 +72,7 @@ limitations under the License. 1.0.0 9.3.19.v20170502 2.0.0 - 1.0.0 + 2.3.6 4.4.6 4.5.3 1.10