Repository: ambari
Updated Branches:
  refs/heads/trunk 3bbc5afec -> d3bac3a1d


AMBARI-16235: Add beeline, hive-exec and hive log properties to /etc/hive2/conf


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

Branch: refs/heads/trunk
Commit: d3bac3a1d6ba6bc0e3bda91d3ee8194651fa8daa
Parents: 3bbc5af
Author: Nahappan Somasundaram <nsomasunda...@hortonworks.com>
Authored: Wed May 4 12:14:11 2016 -0700
Committer: Nahappan Somasundaram <nsomasunda...@hortonworks.com>
Committed: Mon May 9 17:16:37 2016 -0700

----------------------------------------------------------------------
 .../0.1.0/package/scripts/params_windows.py     |   2 +
 .../HIVE/0.12.0.2.0/package/scripts/hive.py     |  64 +++++------
 .../package/scripts/hive_interactive.py         |  21 ++++
 .../0.12.0.2.0/package/scripts/params_linux.py  |   9 ++
 .../HIVE/configuration/beeline-log4j2.xml       |  78 ++++++++++++++
 .../HIVE/configuration/hive-exec-log4j2.xml     |  99 +++++++++++++++++
 .../services/HIVE/configuration/hive-log4j2.xml | 106 +++++++++++++++++++
 .../stacks/2.5/HIVE/test_hive_server_int.py     |  41 ++++---
 .../python/stacks/2.5/configs/hsi_default.json  |   9 ++
 9 files changed, 376 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
index 8eaee70..64589ec 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
@@ -22,6 +22,8 @@ import os
 
 from resource_management.libraries.script.script import Script
 
+# default value of log4j version is 1 for hive
+log4j_version = '1'
 
 config = Script.get_config()
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/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 0cca1a9..7b16474 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
@@ -375,37 +375,41 @@ def fill_conf_dir(component_conf_dir):
        group=params.user_group
   )
 
-  log4j_exec_filename = 'hive-exec-log4j.properties'
-  if (params.log4j_exec_props != None):
-    File(format("{component_conf_dir}/{log4j_exec_filename}"),
-         mode=0644,
-         group=params.user_group,
-         owner=params.hive_user,
-         content=params.log4j_exec_props
-    )
-  elif (os.path.exists("{component_conf_dir}/{log4j_exec_filename}.template")):
-    File(format("{component_conf_dir}/{log4j_exec_filename}"),
-         mode=0644,
-         group=params.user_group,
-         owner=params.hive_user,
-         
content=StaticFile(format("{component_conf_dir}/{log4j_exec_filename}.template"))
-    )
+  # Create hive-log4j.properties and hive-exec-log4j.properties
+  # in /etc/hive/conf and not in /etc/hive2/conf
+  if params.log4j_version == '1':
+    log4j_exec_filename = 'hive-exec-log4j.properties'
+    if (params.log4j_exec_props != None):
+      File(format("{component_conf_dir}/{log4j_exec_filename}"),
+           mode=0644,
+           group=params.user_group,
+           owner=params.hive_user,
+           content=params.log4j_exec_props
+      )
+    elif 
(os.path.exists("{component_conf_dir}/{log4j_exec_filename}.template")):
+      File(format("{component_conf_dir}/{log4j_exec_filename}"),
+           mode=0644,
+           group=params.user_group,
+           owner=params.hive_user,
+           
content=StaticFile(format("{component_conf_dir}/{log4j_exec_filename}.template"))
+      )
 
-  log4j_filename = 'hive-log4j.properties'
-  if (params.log4j_props != None):
-    File(format("{component_conf_dir}/{log4j_filename}"),
-         mode=0644,
-         group=params.user_group,
-         owner=params.hive_user,
-         content=params.log4j_props
-    )
-  elif (os.path.exists("{component_conf_dir}/{log4j_filename}.template")):
-    File(format("{component_conf_dir}/{log4j_filename}"),
-         mode=0644,
-         group=params.user_group,
-         owner=params.hive_user,
-         
content=StaticFile(format("{component_conf_dir}/{log4j_filename}.template"))
-    )
+    log4j_filename = 'hive-log4j.properties'
+    if (params.log4j_props != None):
+      File(format("{component_conf_dir}/{log4j_filename}"),
+           mode=0644,
+           group=params.user_group,
+           owner=params.hive_user,
+           content=params.log4j_props
+      )
+    elif (os.path.exists("{component_conf_dir}/{log4j_filename}.template")):
+      File(format("{component_conf_dir}/{log4j_filename}"),
+           mode=0644,
+           group=params.user_group,
+           owner=params.hive_user,
+           
content=StaticFile(format("{component_conf_dir}/{log4j_filename}.template"))
+      )
+    pass # if params.log4j_version == '1'
 
 
 def jdbc_connector(target):

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index e8532da..da3b39d 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -142,6 +142,27 @@ def hive_interactive(name=None):
        owner=params.hive_user,
        content=params.llap_cli_log4j2)
 
+  hive_log4j2_filename = 'hive-log4j2.properties'
+  File(format("{hive_server_interactive_conf_dir}/{hive_log4j2_filename}"),
+     mode=0644,
+     group=params.user_group,
+     owner=params.hive_user,
+     content=params.hive_log4j2)
+
+  hive_exec_log4j2_filename = 'hive-exec-log4j2.properties'
+  
File(format("{hive_server_interactive_conf_dir}/{hive_exec_log4j2_filename}"),
+     mode=0644,
+     group=params.user_group,
+     owner=params.hive_user,
+     content=params.hive_exec_log4j2)
+
+  beeline_log4j2_filename = 'beeline-log4j2.properties'
+  File(format("{hive_server_interactive_conf_dir}/{beeline_log4j2_filename}"),
+     mode=0644,
+     group=params.user_group,
+     owner=params.hive_user,
+     content=params.beeline_log4j2)
+
   # On some OS this folder could be not exists, so we will create it before 
pushing there files
   Directory(params.limits_conf_dir,
             create_parents = True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/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 ec43fea..e9f5e47 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
@@ -41,6 +41,9 @@ from 
resource_management.libraries.functions.get_port_from_url import get_port_f
 from resource_management.libraries.functions.expect import expect
 from resource_management.libraries import functions
 
+# Default log4j version; put config files under /etc/hive/conf
+log4j_version = '1'
+
 # server configurations
 config = Script.get_config()
 tmp_dir = Script.get_tmp_dir()
@@ -318,6 +321,9 @@ elif status_params.role == "HIVE_SERVER" and 
hive_server_hosts is not None and h
 elif status_params.role == "HIVE_SERVER_INTERACTIVE" and 
hive_server_interactive_hosts is not None and hostname in 
hive_server_interactive_hosts:
   hive_conf_dirs_list.append(status_params.hive_server_interactive_conf_dir)
 
+# log4j version is 2 for hive2; put config files under /etc/hive2/conf
+if status_params.role == "HIVE_SERVER_INTERACTIVE":
+  log4j_version = '2'
 
 #Starting hiveserver2
 start_hiveserver2_script = 'startHiveserver2.sh.j2'
@@ -540,6 +546,9 @@ has_hive_interactive = len(hive_interactive_hosts) > 0
 if has_hive_interactive:
   llap_daemon_log4j = config['configurations']['llap-daemon-log4j']['content']
   llap_cli_log4j2 = config['configurations']['llap-cli-log4j2']['content']
+  hive_log4j2 = config['configurations']['hive-log4j2']['content']
+  hive_exec_log4j2 = config['configurations']['hive-exec-log4j2']['content']
+  beeline_log4j2 = config['configurations']['beeline-log4j2']['content']
 
   hive_server_interactive_conf_dir = 
status_params.hive_server_interactive_conf_dir
   execute_path_hive_interactive = os.path.join(os.environ['PATH'], 
hive_interactive_bin, hadoop_bin_dir)

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/beeline-log4j2.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/beeline-log4j2.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/beeline-log4j2.xml
new file mode 100644
index 0000000..95163eb
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/beeline-log4j2.xml
@@ -0,0 +1,78 @@
+<?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_final="false" supports_adding_forbidden="true">
+  <property>
+  <name>content</name>
+  <description>Custom beeline-log4j2.properties</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.
+
+status = INFO
+name = BeelineLog4j2
+packages = org.apache.hadoop.hive.ql.log
+
+# list of properties
+property.hive.log.level = WARN
+property.hive.root.logger = console
+
+# list of all appenders
+appenders = console
+
+# console appender
+appender.console.type = Console
+appender.console.name = console
+appender.console.target = SYSTEM_ERR
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n
+
+# list of all loggers
+loggers = HiveConnection
+
+# HiveConnection logs useful info for dynamic service discovery
+logger.HiveConnection.name = org.apache.hive.jdbc.HiveConnection
+logger.HiveConnection.level = INFO
+
+# root logger
+rootLogger.level = ${sys:hive.log.level}
+rootLogger.appenderRefs = root
+rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}
+  </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+  </property>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-exec-log4j2.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-exec-log4j2.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-exec-log4j2.xml
new file mode 100644
index 0000000..6b96664
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-exec-log4j2.xml
@@ -0,0 +1,99 @@
+<?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_final="false" supports_adding_forbidden="true">
+  <property>
+  <name>content</name>
+  <description>Custom hive-exec-log4j2.properties</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.
+
+status = INFO
+name = HiveExecLog4j2
+packages = org.apache.hadoop.hive.ql.log
+
+# list of properties
+property.hive.log.level = INFO
+property.hive.root.logger = FA
+property.hive.query.id = hadoop
+property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
+property.hive.log.file = ${sys:hive.query.id}.log
+
+# list of all appenders
+appenders = console, FA
+
+# console appender
+appender.console.type = Console
+appender.console.name = console
+appender.console.target = SYSTEM_ERR
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n
+
+# simple file appender
+appender.FA.type = File
+appender.FA.name = FA
+appender.FA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file}
+appender.FA.layout.type = PatternLayout
+appender.FA.layout.pattern = %d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n
+
+# list of all loggers
+loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX
+
+logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
+logger.NIOServerCnxn.level = WARN
+
+logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO
+logger.ClientCnxnSocketNIO.level = WARN
+
+logger.DataNucleus.name = DataNucleus
+logger.DataNucleus.level = ERROR
+
+logger.Datastore.name = Datastore
+logger.Datastore.level = ERROR
+
+logger.JPOX.name = JPOX
+logger.JPOX.level = ERROR
+
+# root logger
+rootLogger.level = ${sys:hive.log.level}
+rootLogger.appenderRefs = root
+rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}
+  </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+  </property>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-log4j2.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-log4j2.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-log4j2.xml
new file mode 100644
index 0000000..afbead2
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-log4j2.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_final="false" supports_adding_forbidden="true">
+  <property>
+  <name>content</name>
+  <description>Custom hive-log4j2.properties</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.
+
+status = INFO
+name = HiveLog4j2
+packages = org.apache.hadoop.hive.ql.log
+
+# list of properties
+property.hive.log.level = INFO
+property.hive.root.logger = DRFA
+property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
+property.hive.log.file = hive.log
+
+# list of all appenders
+appenders = console, DRFA
+
+# console appender
+appender.console.type = Console
+appender.console.name = console
+appender.console.target = SYSTEM_ERR
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n
+
+# daily rolling file appender
+appender.DRFA.type = RollingFile
+appender.DRFA.name = DRFA
+appender.DRFA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file}
+# Use %pid in the filePattern to append process-id@host-name to the filename 
if you want separate log files for different CLI session
+appender.DRFA.filePattern = 
${sys:hive.log.dir}/${sys:hive.log.file}.%d{yyyy-MM-dd}
+appender.DRFA.layout.type = PatternLayout
+appender.DRFA.layout.pattern = %d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n
+appender.DRFA.policies.type = Policies
+appender.DRFA.policies.time.type = TimeBasedTriggeringPolicy
+appender.DRFA.policies.time.interval = 1
+appender.DRFA.policies.time.modulate = true
+appender.DRFA.strategy.type = DefaultRolloverStrategy
+appender.DRFA.strategy.max = 30
+
+# list of all loggers
+loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX
+
+logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
+logger.NIOServerCnxn.level = WARN
+
+logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO
+logger.ClientCnxnSocketNIO.level = WARN
+
+logger.DataNucleus.name = DataNucleus
+logger.DataNucleus.level = ERROR
+
+logger.Datastore.name = Datastore
+logger.Datastore.level = ERROR
+
+logger.JPOX.name = JPOX
+logger.JPOX.level = ERROR
+
+# root logger
+rootLogger.level = ${sys:hive.log.level}
+rootLogger.appenderRefs = root
+rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}
+  </value>
+    <value-attributes>
+      <type>content</type>
+      <show-property-name>false</show-property-name>
+    </value-attributes>
+  </property>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py 
b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
index 6a0d777..e2bd0c2 100644
--- a/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
+++ b/ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py
@@ -172,18 +172,6 @@ class TestHiveServerInteractive(RMFTestCase):
                               owner='hive',
                               group='hadoop',
     )
-    self.assertResourceCalled('File', 
'/usr/hdp/current/hive-server2-hive2/conf/hive-exec-log4j.properties',
-                              content='log4jproperties\nline2',
-                              owner='hive',
-                              group='hadoop',
-                              mode=0644,
-    )
-    self.assertResourceCalled('File', 
'/usr/hdp/current/hive-server2-hive2/conf/hive-log4j.properties',
-                              content='log4jproperties\nline2',
-                              owner='hive',
-                              group='hadoop',
-                              mode=0644,
-    )
     hive_site_conf = {}
     hive_site_conf.update(self.getConfig()['configurations']['hive-site'])
     
hive_site_conf.update(self.getConfig()['configurations']['hive-interactive-site'])
@@ -216,17 +204,6 @@ class TestHiveServerInteractive(RMFTestCase):
                               owner=u"hive",
                               group=u"hadoop")
 
-    self.assertResourceCalled("File", 
"/usr/hdp/current/hive-server2-hive2/conf/conf.server/hive-exec-log4j.properties",
-                              content=u'log4jproperties\nline2',
-                              owner=u'hive',
-                              group=u'hadoop',
-                              mode=420)
-    self.assertResourceCalled("File", 
"/usr/hdp/current/hive-server2-hive2/conf/conf.server/hive-log4j.properties",
-                              content=u'log4jproperties\nline2',
-                              owner=u'hive',
-                              group=u'hadoop',
-                              mode=420)
-
     self.assertResourceCalled('XmlConfig', 'hive-site.xml',
                               group='hadoop',
                               
conf_dir='/usr/hdp/current/hive-server2-hive2/conf/conf.server',
@@ -272,6 +249,24 @@ class TestHiveServerInteractive(RMFTestCase):
                               group='hadoop',
                               mode=0644,
     )
+    self.assertResourceCalled('File', 
'/usr/hdp/current/hive-server2-hive2/conf/conf.server/hive-log4j2.properties',
+                              content='con\ntent',  # Test new line
+                              owner='hive',
+                              group='hadoop',
+                              mode=0644,
+    )
+    self.assertResourceCalled('File', 
'/usr/hdp/current/hive-server2-hive2/conf/conf.server/hive-exec-log4j2.properties',
+                              content='con\ntent',  # Test new line
+                              owner='hive',
+                              group='hadoop',
+                              mode=0644,
+    )
+    self.assertResourceCalled('File', 
'/usr/hdp/current/hive-server2-hive2/conf/conf.server/beeline-log4j2.properties',
+                              content='con\ntent',  # Test new line
+                              owner='hive',
+                              group='hadoop',
+                              mode=0644,
+    )
     self.assertResourceCalled('Directory', '/etc/security/limits.d',
                               owner='root',
                               group='root',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3bac3a1/ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json 
b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json
index 9bff890..65ff8b3 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_default.json
@@ -54,6 +54,15 @@
         "llap-cli-log4j2": {
           "content" : "con\ntent"
         },
+        "hive-log4j2": {
+            "content" : "con\ntent"
+        },
+        "hive-exec-log4j2": {
+            "content" : "con\ntent"
+        },
+        "beeline-log4j2": {
+            "content" : "con\ntent"
+        },
         "sqoop-site": {
             "atlas.cluster.name": "c1",
             "sqoop.job.data.publish.class": 
"org.apache.atlas.sqoop.hook.SqoopHook"

Reply via email to