ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: Revert "AMBARI-19005. 'conf.server' dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission."
Date Thu, 08 Dec 2016 22:31:41 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18901 f4aaf58cb -> 1c5c7df31


Revert "AMBARI-19005. 'conf.server' dir for HIVE1 and HIVE2 should have 700 permission and
files in it should have 600 permission."

This reverts commit 24045aa89c5ce9c9dc251be1339ce0eadd7c3c2f.


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

Branch: refs/heads/branch-feature-AMBARI-18901
Commit: 1c5c7df312e09d5be80413766402794eca072ce1
Parents: f4aaf58
Author: Swapan Shridhar <sshridhar@hortonworks.com>
Authored: Thu Dec 8 14:31:34 2016 -0800
Committer: Swapan Shridhar <sshridhar@hortonworks.com>
Committed: Thu Dec 8 14:31:34 2016 -0800

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive.py     | 38 ++++++++------------
 .../package/scripts/hive_interactive.py         | 20 +++++------
 2 files changed, 22 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1c5c7df3/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 415261d..bcc598a 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
@@ -109,7 +109,7 @@ def hive(name=None):
 
   if name == 'hiveserver2':
     # copy tarball to HDFS feature not supported
-    if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS,
params.stack_version_formatted_major)):
+    if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS,
params.stack_version_formatted_major)):  
       params.HdfsResource(params.webhcat_apps_dir,
                             type="directory",
                             action="create_on_execute",
@@ -226,13 +226,13 @@ def hive(name=None):
             configuration_attributes=params.config['configuration_attributes']['hive-site'],
             owner=params.hive_user,
             group=params.user_group,
-            mode=0600)
+            mode=0644)
 
   # Generate atlas-application.properties.xml file
   if has_atlas_in_cluster():
     atlas_hook_filepath = os.path.join(params.hive_config_dir, params.atlas_hook_filename)
     setup_atlas_hook(SERVICE.HIVE, params.hive_atlas_application_properties, atlas_hook_filepath,
params.hive_user, params.user_group)
-
+  
   if name == 'hiveserver2':
     XmlConfig("hiveserver2-site.xml",
               conf_dir=params.hive_server_conf_dir,
@@ -240,7 +240,7 @@ def hive(name=None):
               configuration_attributes=params.config['configuration_attributes']['hiveserver2-site'],
               owner=params.hive_user,
               group=params.user_group,
-              mode=0600)
+              mode=0644)
 
   if params.hive_metastore_site_supported and name == 'metastore':
     XmlConfig("hivemetastore-site.xml",
@@ -249,12 +249,11 @@ def hive(name=None):
               configuration_attributes=params.config['configuration_attributes']['hivemetastore-site'],
               owner=params.hive_user,
               group=params.user_group,
-              mode=0600)
-
+              mode=0644)
+  
   File(format("{hive_config_dir}/hive-env.sh"),
        owner=params.hive_user,
        group=params.user_group,
-       mode=0600,
        content=InlineTemplate(params.hive_env_sh_template)
   )
 
@@ -287,7 +286,6 @@ def hive(name=None):
     File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hivemetastore.properties"),
          owner=params.hive_user,
          group=params.user_group,
-         mode=0600,
          content=Template("hadoop-metrics2-hivemetastore.properties.j2")
     )
 
@@ -330,7 +328,6 @@ def hive(name=None):
     File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hiveserver2.properties"),
          owner=params.hive_user,
          group=params.user_group,
-         mode=0600,
          content=Template("hadoop-metrics2-hiveserver2.properties.j2")
     )
 
@@ -359,16 +356,11 @@ Writes configuration files required by Hive.
 """
 def fill_conf_dir(component_conf_dir):
   import params
-  hive_client_conf_path = os.path.realpath(format("{stack_root}/current/{component_directory}/conf"))
-  component_conf_dir = os.path.realpath(component_conf_dir)
-  mode_identified_for_file = 0644 if component_conf_dir == hive_client_conf_path else 0600
-  mode_identified_for_dir = 0744 if component_conf_dir == hive_client_conf_path else 0700
 
   Directory(component_conf_dir,
             owner=params.hive_user,
             group=params.user_group,
-            create_parents = True,
-            mode=mode_identified_for_dir
+            create_parents = True
   )
 
   XmlConfig("mapred-site.xml",
@@ -377,19 +369,17 @@ def fill_conf_dir(component_conf_dir):
             configuration_attributes=params.config['configuration_attributes']['mapred-site'],
             owner=params.hive_user,
             group=params.user_group,
-            mode=mode_identified_for_file)
+            mode=0644)
 
 
   File(format("{component_conf_dir}/hive-default.xml.template"),
        owner=params.hive_user,
-       group=params.user_group,
-       mode=mode_identified_for_file
+       group=params.user_group
   )
 
   File(format("{component_conf_dir}/hive-env.sh.template"),
        owner=params.hive_user,
-       group=params.user_group,
-       mode=mode_identified_for_file
+       group=params.user_group
   )
 
   # Create hive-log4j.properties and hive-exec-log4j.properties
@@ -398,14 +388,14 @@ def fill_conf_dir(component_conf_dir):
     log4j_exec_filename = 'hive-exec-log4j.properties'
     if (params.log4j_exec_props != None):
       File(format("{component_conf_dir}/{log4j_exec_filename}"),
-           mode=mode_identified_for_file,
+           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=mode_identified_for_file,
+           mode=0644,
            group=params.user_group,
            owner=params.hive_user,
            content=StaticFile(format("{component_conf_dir}/{log4j_exec_filename}.template"))
@@ -414,14 +404,14 @@ def fill_conf_dir(component_conf_dir):
     log4j_filename = 'hive-log4j.properties'
     if (params.log4j_props != None):
       File(format("{component_conf_dir}/{log4j_filename}"),
-           mode=mode_identified_for_file,
+           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=mode_identified_for_file,
+           mode=0644,
            group=params.user_group,
            owner=params.hive_user,
            content=StaticFile(format("{component_conf_dir}/{log4j_filename}.template"))

http://git-wip-us.apache.org/repos/asf/ambari/blob/1c5c7df3/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 2cee307..298db2a 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
@@ -177,7 +177,6 @@ def hive_interactive(name=None):
       del merged_hive_interactive_site_copy[item]
 
   for conf_dir in hive2_conf_dirs_list:
-      mode_identified = 0644 if conf_dir == hive2_client_conf_path else 0600
       if conf_dir == hive2_client_conf_path:
         XmlConfig("hive-site.xml",
                   conf_dir=conf_dir,
@@ -193,54 +192,54 @@ def hive_interactive(name=None):
                   configuration_attributes=params.config['configuration_attributes']['hive-interactive-site'],
                   owner=params.hive_user,
                   group=params.user_group,
-                  mode=0600)
+                  mode=0644)
+
       XmlConfig("hiveserver2-site.xml",
                 conf_dir=conf_dir,
                 configurations=merged_hiveserver2_interactive_site,
                 configuration_attributes=params.config['configuration_attributes']['hiveserver2-interactive-site'],
                 owner=params.hive_user,
                 group=params.user_group,
-                mode=mode_identified)
+                mode=0644)
 
       hive_server_interactive_conf_dir = conf_dir
 
       File(format("{hive_server_interactive_conf_dir}/hive-env.sh"),
            owner=params.hive_user,
            group=params.user_group,
-           mode=mode_identified,
            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=mode_identified,
+           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=mode_identified,
+           mode=0644,
            group=params.user_group,
            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=mode_identified,
+         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=mode_identified,
+         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=mode_identified,
+         mode=0644,
          group=params.user_group,
          owner=params.hive_user,
          content=params.beeline_log4j2)
@@ -248,20 +247,17 @@ def hive_interactive(name=None):
       File(os.path.join(hive_server_interactive_conf_dir, "hadoop-metrics2-hiveserver2.properties"),
            owner=params.hive_user,
            group=params.user_group,
-           mode=mode_identified,
            content=Template("hadoop-metrics2-hiveserver2.properties.j2")
            )
 
       File(format("{hive_server_interactive_conf_dir}/hadoop-metrics2-llapdaemon.properties"),
            owner=params.hive_user,
            group=params.user_group,
-           mode=mode_identified,
            content=Template("hadoop-metrics2-llapdaemon.j2"))
 
       File(format("{hive_server_interactive_conf_dir}/hadoop-metrics2-llaptaskscheduler.properties"),
            owner=params.hive_user,
            group=params.user_group,
-           mode=mode_identified,
            content=Template("hadoop-metrics2-llaptaskscheduler.j2"))
 
 


Mime
View raw message