Repository: ambari Updated Branches: refs/heads/branch-2.5 8cfdf91b9 -> b753496b5
AMBARI-21265 - parquet-logging.properties is missing in hive conf when HDP is upgraded (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b753496b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b753496b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b753496b Branch: refs/heads/branch-2.5 Commit: b753496b5f3f787b62eb4e83b6eecd256e07a9b4 Parents: 8cfdf91 Author: Jonathan Hurley <[email protected]> Authored: Thu Jun 15 14:59:20 2017 -0400 Committer: Jonathan Hurley <[email protected]> Committed: Fri Jun 16 09:20:39 2017 -0400 ---------------------------------------------------------------------- .../HIVE/0.12.0.2.0/metainfo.xml | 19 ++-- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 8 +- .../0.12.0.2.0/package/scripts/params_linux.py | 5 + .../2.1.0.3.0/configuration/parquet-logging.xml | 106 +++++++++++++++++++ .../HIVE/configuration/parquet-logging.xml | 106 +++++++++++++++++++ 5 files changed, 237 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/b753496b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml index eb5683f..fee90cf 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml @@ -185,12 +185,12 @@ <customCommands> <customCommand> <name>CLEAN</name> - <commandScript> - <script>scripts/mysql_server.py</script> - <scriptType>PYTHON</scriptType> - <timeout>600</timeout> - </commandScript> - </customCommand> + <commandScript> + <script>scripts/mysql_server.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </customCommand> </customCommands> </component> @@ -225,11 +225,17 @@ <fileName>hive-exec-log4j.properties</fileName> <dictionaryName>hive-exec-log4j</dictionaryName> </configFile> + <configFile> + <type>env</type> + <fileName>parquet-logging.properties</fileName> + <dictionaryName>parquet-logging</dictionaryName> + </configFile> </configFiles> <configuration-dependencies> <config-type>hive-site</config-type> </configuration-dependencies> </component> + <component> <name>HCAT</name> <displayName>HCat Client</displayName> @@ -340,6 +346,7 @@ <config-type>hivemetastore-site.xml</config-type> <config-type>webhcat-site</config-type> <config-type>webhcat-env</config-type> + <config-type>parquet-logging</config-type> <config-type>ranger-hive-plugin-properties</config-type> <config-type>ranger-hive-audit</config-type> <config-type>ranger-hive-policymgr-ssl</config-type> http://git-wip-us.apache.org/repos/asf/ambari/blob/b753496b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py index c362972..1c53804 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py @@ -454,7 +454,13 @@ def fill_conf_dir(component_conf_dir): owner=params.hive_user, content=StaticFile(format("{component_conf_dir}/{log4j_filename}.template")) ) - pass # if params.log4j_version == '1' + + if params.parquet_logging_properties is not None: + File(format("{component_conf_dir}/parquet-logging.properties"), + mode = mode_identified_for_file, + group = params.user_group, + owner = params.hive_user, + content = params.parquet_logging_properties) def jdbc_connector(target, hive_previous_jdbc_jar): http://git-wip-us.apache.org/repos/asf/ambari/blob/b753496b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index e908d30..cf116c5 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -495,6 +495,11 @@ if (('hive-exec-log4j' in config['configurations']) and ('content' in config['co else: log4j_exec_props = None +# parquet-logging.properties +parquet_logging_properties = None +if 'parquet-logging' in config['configurations']: + parquet_logging_properties = config['configurations']['parquet-logging']['content'] + daemon_name = status_params.daemon_name process_name = status_params.process_name hive_env_sh_template = config['configurations']['hive-env']['content'] http://git-wip-us.apache.org/repos/asf/ambari/blob/b753496b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/parquet-logging.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/parquet-logging.xml b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/parquet-logging.xml new file mode 100644 index 0000000..c80f65b --- /dev/null +++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/configuration/parquet-logging.xml @@ -0,0 +1,106 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * 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. + */ +--> +<configuration supports_adding_forbidden="false"> + <property> + <name>content</name> + <display-name>parquet-logging</display-name> + <description>Custom Parquet Logging</description> + <value> +# 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 + + </value> + <value-attributes> + <type>content</type> + <show-property-name>false</show-property-name> + </value-attributes> + <on-ambari-upgrade add="false"/> + </property> +</configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/b753496b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/parquet-logging.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/parquet-logging.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/parquet-logging.xml new file mode 100644 index 0000000..c80f65b --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/parquet-logging.xml @@ -0,0 +1,106 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * 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. + */ +--> +<configuration supports_adding_forbidden="false"> + <property> + <name>content</name> + <display-name>parquet-logging</display-name> + <description>Custom Parquet Logging</description> + <value> +# 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 + + </value> + <value-attributes> + <type>content</type> + <show-property-name>false</show-property-name> + </value-attributes> + <on-ambari-upgrade add="false"/> + </property> +</configuration>
