ambari git commit: AMBARI-16209. Write out new log property files under /etc/hive2/conf (smohanty)

2016-05-03 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 5b80f4902 -> 5fea54102


AMBARI-16209. Write out new log property files under /etc/hive2/conf (smohanty)


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

Branch: refs/heads/trunk
Commit: 5fea54102c8534ad80ee46bb56334eb2b2a24e33
Parents: 5b80f49
Author: Sumit Mohanty 
Authored: Tue May 3 14:01:36 2016 -0700
Committer: Sumit Mohanty 
Committed: Tue May 3 14:01:36 2016 -0700

--
 .../HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml  | 4 ++--
 .../HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5fea5410/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
index 5c8f9a8..bf1edbb 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
@@ -23,7 +23,7 @@
 
   
   content
-  Custom log4j.properties
+  Custom llap-cli-log4j2.properties
   
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -66,7 +66,7 @@ appender.console.layout.pattern = %p %c{2}: %m%n
 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 @ to the 
filename if you want separate log files for different CLI session
+# 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{-MM-dd}
 appender.DRFA.layout.type = PatternLayout
 appender.DRFA.layout.pattern = %d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n

http://git-wip-us.apache.org/repos/asf/ambari/blob/5fea5410/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml
index 793ea7a..23a6761 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-daemon-log4j.xml
@@ -23,7 +23,7 @@
 
   
   content
-  Custom log4j.properties
+  Custom llap-daemon-log4j2.properties
   
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file



ambari git commit: AMBARI-16209. Write out new log property files under /etc/hive2/conf (smohanty)

2016-05-03 Thread smohanty
Repository: ambari
Updated Branches:
  refs/heads/trunk 51c0cb4ff -> 46d1d7b18


AMBARI-16209. Write out new log property files under /etc/hive2/conf (smohanty)


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

Branch: refs/heads/trunk
Commit: 46d1d7b188d3f8c020f992c91406d994bac5eebc
Parents: 51c0cb4
Author: Sumit Mohanty 
Authored: Tue May 3 07:30:40 2016 -0700
Committer: Sumit Mohanty 
Committed: Tue May 3 07:30:40 2016 -0700

--
 .../package/scripts/hive_interactive.py |  29 +++--
 .../0.12.0.2.0/package/scripts/params_linux.py  |   5 +
 .../HIVE/configuration/llap-cli-log4j2.xml  | 108 +++
 .../HIVE/configuration/llap-daemon-log4j.xml|  21 +++-
 .../stacks/2.5/HIVE/test_hive_server_int.py |  12 +++
 .../python/stacks/2.5/configs/hsi_default.json  |   6 ++
 6 files changed, 167 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/46d1d7b1/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 24047ff..e8532da 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
@@ -126,34 +126,43 @@ def hive_interactive(name=None):
   File(format("{hive_server_interactive_conf_dir}/hive-env.sh"),
owner=params.hive_user,
group=params.user_group,
-   content=InlineTemplate(params.hive_interactive_env_sh_template)
-   )
+   content=InlineTemplate(params.hive_interactive_env_sh_template))
+
+  llap_daemon_log4j_filename = 'llap-daemon-log4j2.properties'
+  
File(format("{hive_server_interactive_conf_dir}/{llap_daemon_log4j_filename}"),
+   mode=0644,
+   group=params.user_group,
+   owner=params.hive_user,
+   content=params.llap_daemon_log4j)
+
+  llap_cli_log4j2_filename = 'llap-cli-log4j2.properties'
+  File(format("{hive_server_interactive_conf_dir}/{llap_cli_log4j2_filename}"),
+   mode=0644,
+   group=params.user_group,
+   owner=params.hive_user,
+   content=params.llap_cli_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,
 owner='root',
-group='root'
-  )
+group='root')
 
   File(os.path.join(params.limits_conf_dir, 'hive.conf'),
owner='root',
group='root',
mode=0644,
-   content=Template("hive.conf.j2")
-  )
+   content=Template("hive.conf.j2"))
 
   if not os.path.exists(params.target_hive_interactive):
 jdbc_connector(params.target_hive_interactive)
 
   File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
content = 
DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
-   mode = 0644,
-   )
+   mode = 0644)
   File(params.start_hiveserver2_interactive_path,
mode=0755,
-   content=Template(format('{start_hiveserver2_interactive_script}'))
-   )
+   content=Template(format('{start_hiveserver2_interactive_script}')))
 
   Directory(params.hive_pid_dir,
 create_parents=True,

http://git-wip-us.apache.org/repos/asf/ambari/blob/46d1d7b1/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 2e1a2af..cef2cbc 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
@@ -538,12 +538,16 @@ HdfsResource = functools.partial(
 hive_interactive_hosts = 
default('/clusterHostInfo/hive_server_interactive_hosts', [])
 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_server_interactive_conf_dir =