diff --git a/bin/hive b/bin/hive index e6693f6..4df8a34 100755 --- a/bin/hive +++ b/bin/hive @@ -310,7 +310,7 @@ for j in $SERVICE_LIST ; do done # to initialize logging for all services -export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.properties " +export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.properties -Djava.util.logging.config.file=$bin/../conf/parquet-logging.properties " if [ "$TORUN" = "" ] ; then echo "Service $SERVICE not found" 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 diff --git a/packaging/src/main/assembly/bin.xml b/packaging/src/main/assembly/bin.xml index 03d40f0..06a7cf2 100644 --- a/packaging/src/main/assembly/bin.xml +++ b/packaging/src/main/assembly/bin.xml @@ -398,6 +398,11 @@ llap-cli-log4j2.properties.template + ${project.parent.basedir}/common/src/main/resources/parquet-logging.properties + conf + parquet-logging.properties + + ${project.parent.basedir}/hcatalog/README.txt hcatalog/share/doc/hcatalog