You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2018/12/05 16:43:42 UTC
[incubator-iceberg] branch master updated: Set derby log system
property earlier (#19)
This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new f9c8cde Set derby log system property earlier (#19)
f9c8cde is described below
commit f9c8cde7f33c36520b6b2c82774a66d284cd6757
Author: mccheah <mc...@palantir.com>
AuthorDate: Wed Dec 5 08:43:38 2018 -0800
Set derby log system property earlier (#19)
Otherwise an empty hive/derby.log file is created when running the tests.
---
.../src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java b/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
index 0638abf..8c2bfdc 100644
--- a/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
+++ b/hive/src/test/java/com/netflix/iceberg/hive/HiveTableBaseTest.java
@@ -17,7 +17,6 @@ package com.netflix.iceberg.hive;
import com.netflix.iceberg.PartitionSpec;
import com.netflix.iceberg.Schema;
-import com.netflix.iceberg.TableMetadataParser;
import com.netflix.iceberg.types.Types;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
@@ -108,6 +107,8 @@ class HiveTableBaseTest {
NoSuchFieldException, SQLException {
this.executorService = Executors.newSingleThreadExecutor();
hiveLocalDir = createTempDirectory("hive", asFileAttribute(fromString("rwxrwxrwx"))).toFile();
+ File derbyLogFile = new File(hiveLocalDir, "derby.log");
+ System.setProperty("derby.stream.error.file", derbyLogFile.getAbsolutePath());
setupDB("jdbc:derby:" + getDerbyPath() + ";create=true");
this.server = thriftServer();
@@ -132,10 +133,7 @@ class HiveTableBaseTest {
}
}
- private HiveConf hiveConf(Configuration conf, int port) throws IOException {
- File derbyLogFile = new File(hiveLocalDir, "derby.log");
- derbyLogFile.createNewFile();
- System.setProperty("derby.stream.error.file", derbyLogFile.getPath());
+ private HiveConf hiveConf(Configuration conf, int port) {
final HiveConf hiveConf = new HiveConf(conf, this.getClass());
// Setting AUTO_CREATE_ALL in hadoop config somehow still reverts to false.
hiveConf.set(SCHEMA_VERIFICATION.getVarname(), "false");