You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iceberg.apache.org by GitBox <gi...@apache.org> on 2018/12/05 16:43:40 UTC

[GitHub] rdblue closed pull request #19: Set derby log system property earlier

rdblue closed pull request #19: Set derby log system property earlier
URL: https://github.com/apache/incubator-iceberg/pull/19
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 @@
 
 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 @@ public void setup() throws IOException,
           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 @@ public void cleanup() {
     }
   }
 
-  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");


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services