You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by go...@apache.org on 2016/02/19 08:01:37 UTC
[2/2] hive git commit: HIVE-13079: LLAP: Allow reading log4j
properties from default JAR resources (Gopal V, reviewed by Sergey Shelukhin)
HIVE-13079: LLAP: Allow reading log4j properties from default JAR resources (Gopal V, reviewed by Sergey Shelukhin)
Signed-off-by: Gopal V <go...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6051835b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6051835b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6051835b
Branch: refs/heads/master
Commit: 6051835bb238ac5206fe444861ca07b96bad9e34
Parents: 675fa32
Author: Gopal V <go...@apache.org>
Authored: Thu Feb 18 23:01:07 2016 -0800
Committer: Gopal V <go...@apache.org>
Committed: Thu Feb 18 23:01:07 2016 -0800
----------------------------------------------------------------------
.../org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/6051835b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
index 32c791f..820b2ed 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
@@ -19,6 +19,7 @@
package org.apache.hadoop.hive.llap.cli;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.util.Map.Entry;
@@ -44,6 +45,7 @@ import org.apache.hadoop.hive.llap.io.api.impl.LlapInputFormat;
import org.apache.hadoop.hive.ql.exec.Utilities;
import org.apache.hadoop.hive.ql.io.HiveInputFormat;
import org.apache.hadoop.hive.ql.session.SessionState;
+import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
@@ -332,7 +334,10 @@ public class LlapServiceDriver {
}
createLlapDaemonConfig(lfs, confPath, conf, propsDirectOptions, options.getConfig());
- lfs.copyFromLocalFile(new Path(logger.toString()), confPath);
+ // logger can be a resource stream or a real file (cannot use copy)
+ InputStream loggerContent = logger.openStream();
+ IOUtils.copyBytes(loggerContent,
+ lfs.create(new Path(confPath, "llap-daemon-log4j2.properties"), true), conf, true);
// extract configs for processing by the python fragments in Slider
JSONObject configs = new JSONObject();