You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2018/07/14 04:56:36 UTC

hive git commit: HIVE-19886 : Logs may be directed to 2 files if --hiveconf hive.log.file is used (Jaume Marhuenda via Zoltan Haindrich)

Repository: hive
Updated Branches:
  refs/heads/master 3b88d6c1f -> bf54424d2


HIVE-19886 : Logs may be directed to 2 files if --hiveconf hive.log.file is used (Jaume Marhuenda via Zoltan Haindrich)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/bf54424d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/bf54424d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/bf54424d

Branch: refs/heads/master
Commit: bf54424d22b6b117595f09b1bbaf8024de0ce906
Parents: 3b88d6c
Author: Jaume Marhuenda <ja...@gmail.com>
Authored: Fri Jul 13 21:55:00 2018 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Fri Jul 13 21:55:00 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hive/service/server/HiveServer2.java  | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/bf54424d/service/src/java/org/apache/hive/service/server/HiveServer2.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/server/HiveServer2.java b/service/src/java/org/apache/hive/service/server/HiveServer2.java
index 6184fdc..2471883 100644
--- a/service/src/java/org/apache/hive/service/server/HiveServer2.java
+++ b/service/src/java/org/apache/hive/service/server/HiveServer2.java
@@ -62,7 +62,6 @@ import org.apache.hadoop.hive.common.JvmPauseMonitor;
 import org.apache.hadoop.hive.common.LogUtils;
 import org.apache.hadoop.hive.common.LogUtils.LogInitializationException;
 import org.apache.hadoop.hive.common.ServerUtils;
-import org.apache.hadoop.hive.common.cli.CommonCliOptions;
 import org.apache.hadoop.hive.common.metrics.common.MetricsFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -1209,11 +1208,17 @@ public class HiveServer2 extends CompositeService {
         for (String propKey : confProps.stringPropertyNames()) {
           // save logging message for log4j output latter after log4j initialize properly
           debugMessage.append("Setting " + propKey + "=" + confProps.getProperty(propKey) + ";\n");
-          if (propKey.equalsIgnoreCase("hive.root.logger")) {
-            CommonCliOptions.splitAndSetLogger(propKey, confProps);
-          } else {
-            System.setProperty(propKey, confProps.getProperty(propKey));
+          if ("hive.log.file".equals(propKey) ||
+              "hive.log.dir".equals(propKey) ||
+              "hive.root.logger".equals(propKey)) {
+            throw new IllegalArgumentException("Logs will be split in two "
+                + "files if the commandline argument " + propKey + " is "
+                + "used. To prevent this use to HADOOP_CLIENT_OPTS -D"
+                + propKey + "=" + confProps.getProperty(propKey)
+                + " or use the set the value in the configuration file"
+                + " (see HIVE-19886)");
           }
+          System.setProperty(propKey, confProps.getProperty(propKey));
         }
 
         // Process --help