ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [19/50] ambari git commit: AMBARI-14752. hawq_profile script conflicts with HAWQ segment init(Lav Jain via odiachenko).
Date Tue, 26 Jan 2016 21:45:22 GMT
AMBARI-14752. hawq_profile script conflicts with HAWQ segment init(Lav Jain via odiachenko).


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: c305bc9f30ec07a46cd492e44bb9f1247441404f
Parents: c4f643a
Author: Oleksandr Diachenko <odiachenko@pivotal.io>
Authored: Fri Jan 22 14:04:19 2016 -0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Fri Jan 22 14:04:19 2016 -0800

----------------------------------------------------------------------
 .../HAWQ/2.0.0/package/scripts/common.py        | 11 --------
 .../2.0.0/package/scripts/hawq_constants.py     |  1 -
 .../HAWQ/2.0.0/package/scripts/hawqsegment.py   |  1 -
 .../HAWQ/2.0.0/package/scripts/master_helper.py | 10 --------
 .../2.0.0/package/templates/hawq-profile.sh.j2  | 27 --------------------
 5 files changed, 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py
index daab7eb..23342f5 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py
@@ -33,17 +33,6 @@ import utils
 import hawq_constants
 
 
-def update_bashrc(source_file, target_file):
-  """
-  Updates the hawq_user's .bashrc file with HAWQ env variables like
-  MASTER_DATA_DIRECTORY, PGHOST, PGPORT and PGUSER. 
-  And sources the greenplum_path file.
-  """
-  append_src_cmd = "echo 'source {0}' >> {1}".format(source_file, target_file)
-  src_cmd_exists = "grep 'source {0}' {1}".format(source_file, target_file)
-  Execute(append_src_cmd, user=hawq_constants.hawq_user, timeout=hawq_constants.default_exec_timeout,
not_if=src_cmd_exists)
-
-
 def setup_user():
   """
   Creates HAWQ user home directory and sets up the correct ownership.

http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
index 79efcc3..01de99a 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
@@ -45,7 +45,6 @@ sysctl_conf_dir = "/etc/sysctl.d"
 
 # Files
 hawq_slaves_file = os.path.join(hawq_config_dir, "slaves")
-hawq_user_bashrc_file = os.path.join(hawq_user_home_dir, ".bashrc")
 hawq_greenplum_path_file = os.path.join(hawq_home_dir, "greenplum_path.sh")
 hawq_hosts_file = "/tmp/hawq_hosts"
 hawq_check_file = os.path.join(hawq_config_dir, "gpcheck.cnf")

http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py
index 37a118c..6bc9802 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py
@@ -42,7 +42,6 @@ class HawqSegment(Script):
     env.set_params(hawq_constants)
     common.setup_user()
     common.setup_common_configurations()
-    common.update_bashrc(hawq_constants.hawq_greenplum_path_file, hawq_constants.hawq_user_bashrc_file)
 
 
   def __start_segment(self):

http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py
index a685db4..2e0b6da 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py
@@ -54,15 +54,6 @@ def __setup_passwordless_ssh():
   File(hawq_constants.hawq_hosts_file, action='delete')
 
 
-def __setup_hawq_user_profile():
-  """
-  Sets up the ENV variables for hawq_user as a convenience for the command line users
-  """
-  hawq_profile_file = os.path.join(os.path.expanduser("~{0}".format(hawq_constants.hawq_user)),
".hawq-profile.sh")
-  File(hawq_profile_file, content=Template("hawq-profile.sh.j2"), owner=hawq_constants.hawq_user,
group=hawq_constants.hawq_group)
-  common.update_bashrc(hawq_profile_file, hawq_constants.hawq_user_bashrc_file)
-
-
 def configure_master():
   """
   Configures the master node after rpm install
@@ -70,7 +61,6 @@ def configure_master():
   common.setup_user()
   common.setup_common_configurations()
   __setup_master_specific_conf_files()
-  __setup_hawq_user_profile()
   __create_local_dirs()
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/c305bc9f/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2
deleted file mode 100644
index 625a9f5..0000000
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/templates/hawq-profile.sh.j2
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# 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.
-#
-
-######################################
-##### HAWQ env #######################
-######################################
-source {{hawq_greenplum_path_file}}
-export MASTER_DATA_DIRECTORY={{hawq_master_dir}}
-export PGPORT={{hawq_master_address_port}}
-export PGHOST={{hawqmaster_host}}
-export PGUSER={{hawq_user}}


Mime
View raw message