hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject hive git commit: HIVE-13954: Parquet logs should go to STDERR (Prasanth Jayachandran reviewed by Gunther Hagleitner)
Date Tue, 07 Jun 2016 22:32:03 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 0e975f0d6 -> 52c7c04b0


HIVE-13954: Parquet logs should go to STDERR (Prasanth Jayachandran reviewed by Gunther Hagleitner)


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

Branch: refs/heads/branch-1
Commit: 52c7c04b065cf58d234d560aa5e02d45fd1ebb60
Parents: 0e975f0
Author: Prasanth Jayachandran <prasanthj@apache.org>
Authored: Tue Jun 7 15:31:50 2016 -0700
Committer: Prasanth Jayachandran <prasanthj@apache.org>
Committed: Tue Jun 7 15:31:50 2016 -0700

----------------------------------------------------------------------
 bin/hive                                        |  3 +
 .../main/resources/parquet-logging.properties   | 70 ++++++++++++++++++++
 packaging/src/main/assembly/bin.xml             |  5 ++
 3 files changed, 78 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/52c7c04b/bin/hive
----------------------------------------------------------------------
diff --git a/bin/hive b/bin/hive
index 9e4f0bd..ed90716 100755
--- a/bin/hive
+++ b/bin/hive
@@ -293,6 +293,9 @@ for j in $SERVICE_LIST ; do
   fi
 done
 
+# to initialize logging for all services
+export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djava.util.logging.config.file=$bin/../conf/parquet-logging.properties
"
+
 if [ "$TORUN" = "" ] ; then
   echo "Service $SERVICE not found"
   echo "Available Services: $SERVICE_LIST"

http://git-wip-us.apache.org/repos/asf/hive/blob/52c7c04b/common/src/main/resources/parquet-logging.properties
----------------------------------------------------------------------
diff --git a/common/src/main/resources/parquet-logging.properties b/common/src/main/resources/parquet-logging.properties
new file mode 100644
index 0000000..ff5a842
--- /dev/null
+++ b/common/src/main/resources/parquet-logging.properties
@@ -0,0 +1,70 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Properties file which configures the operation of the JDK
+# logging facility.
+
+# The system will look for this config file, first using
+# a System property specified at startup:
+#
+# >java -Djava.util.logging.config.file=myLoggingConfigFilePath
+#
+# If this property is not specified, then the config file is
+# retrieved from its default location at:
+#
+# JDK_HOME/jre/lib/logging.properties
+
+# Global logging properties.
+# ------------------------------------------
+# The set of handlers to be loaded upon startup.
+# Comma-separated list of class names.
+# (? LogManager docs say no comma here, but JDK example has comma.)
+# handlers=java.util.logging.ConsoleHandler
+org.apache.parquet.handlers= java.util.logging.FileHandler
+
+# Default global logging level.
+# Loggers and Handlers may override this level
+.level=INFO
+
+# Handlers
+# -----------------------------------------
+
+# --- ConsoleHandler ---
+# Override of global logging level
+java.util.logging.ConsoleHandler.level=INFO
+java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
+java.util.logging.SimpleFormatter.format=[%1$tc] %4$s: %2$s - %5$s %6$s%n
+
+# --- FileHandler ---
+# Override of global logging level
+java.util.logging.FileHandler.level=ALL
+
+# Naming style for the output file:
+# (The output file is placed in the system temporary directory.
+# %u is used to provide unique identifier for the file.
+# For more information refer
+# https://docs.oracle.com/javase/7/docs/api/java/util/logging/FileHandler.html)
+java.util.logging.FileHandler.pattern=%t/parquet-%u.log
+
+# Limiting size of output file in bytes:
+java.util.logging.FileHandler.limit=50000000
+
+# Number of output files to cycle through, by appending an
+# integer to the base file name:
+java.util.logging.FileHandler.count=1
+
+# Style of output (Simple or XML):
+java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter

http://git-wip-us.apache.org/repos/asf/hive/blob/52c7c04b/packaging/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/packaging/src/main/assembly/bin.xml b/packaging/src/main/assembly/bin.xml
index 63253c5..ce64e66 100644
--- a/packaging/src/main/assembly/bin.xml
+++ b/packaging/src/main/assembly/bin.xml
@@ -338,6 +338,11 @@
       <destName>beeline-log4j.properties.template</destName>
     </file>
     <file>
+      <source>${project.parent.basedir}/common/src/main/resources/parquet-logging.properties</source>
+      <outputDirectory>conf</outputDirectory>
+      <destName>parquet-logging.properties</destName>
+    </file>
+    <file>
       <source>${project.parent.basedir}/hcatalog/README.txt</source>
       <outputDirectory>hcatalog/share/doc/hcatalog</outputDirectory>
     </file>


Mime
View raw message