ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: Revert "AMBARI-17159. Upon successful start, log the process id for daemons started. (mpapirkovskyy)"
Date Mon, 13 Jun 2016 20:40:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 98873150a -> accc96dba


Revert "AMBARI-17159. Upon successful start, log the process id for daemons started. (mpapirkovskyy)"

This reverts commit 81b06bbb28dfc22e51cb521b2438cc690cb58061.


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

Branch: refs/heads/trunk
Commit: accc96dba353a84ff4fbf835ae494a625a6541ce
Parents: 9887315
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Mon Jun 13 13:40:43 2016 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Mon Jun 13 13:40:43 2016 -0700

----------------------------------------------------------------------
 .../libraries/functions/flume_agent_helper.py   | 20 +++-----------
 .../libraries/script/script.py                  | 29 ++------------------
 .../package/scripts/accumulo_script.py          | 15 ++--------
 .../0.1.0/package/scripts/metrics_collector.py  |  4 ---
 .../0.1.0/package/scripts/metrics_grafana.py    |  4 ---
 .../0.1.0/package/scripts/metrics_monitor.py    |  6 +---
 .../0.1.0/package/scripts/status.py             | 26 ++++++++----------
 .../0.1.0/package/scripts/status_params.py      |  3 --
 .../package/scripts/metadata_server.py          |  4 ---
 .../0.5.0.2.1/package/scripts/falcon_server.py  |  4 ---
 .../1.4.0.2.0/package/scripts/flume_handler.py  |  6 +---
 .../0.96.0.2.0/package/scripts/hbase_master.py  |  8 ++----
 .../package/scripts/hbase_regionserver.py       |  8 ++----
 .../package/scripts/phoenix_queryserver.py      |  4 ---
 .../package/scripts/phoenix_service.py          |  5 ++--
 .../0.96.0.2.0/package/scripts/status_params.py |  6 +---
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  4 ---
 .../2.1.0.2.0/package/scripts/journalnode.py    |  4 ---
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |  4 ---
 .../2.1.0.2.0/package/scripts/nfsgateway.py     |  4 ---
 .../HDFS/2.1.0.2.0/package/scripts/snamenode.py |  4 ---
 .../2.1.0.2.0/package/scripts/zkfc_slave.py     |  4 ---
 .../package/scripts/hive_metastore.py           |  9 ++----
 .../0.12.0.2.0/package/scripts/hive_server.py   |  7 ++---
 .../package/scripts/hive_server_interactive.py  |  9 ++----
 .../0.12.0.2.0/package/scripts/hive_service.py  |  5 ++--
 .../package/scripts/hive_service_interactive.py |  3 +-
 .../0.12.0.2.0/package/scripts/status_params.py |  8 +++---
 .../package/scripts/webhcat_server.py           |  4 ---
 .../KAFKA/0.8.1/package/scripts/kafka_broker.py |  4 ---
 .../0.5.0.2.2/package/scripts/knox_gateway.py   |  4 ---
 .../4.0.0.2.0/package/scripts/oozie_server.py   |  4 ---
 .../0.4.0/package/scripts/ranger_tagsync.py     |  4 ---
 .../1.2.1/package/scripts/job_history_server.py |  4 ---
 .../SPARK/1.2.1/package/scripts/livy_server.py  |  6 +---
 .../package/scripts/spark_thrift_server.py      |  4 ---
 .../2.0.0/package/scripts/job_history_server.py |  4 ---
 .../package/scripts/spark_thrift_server.py      |  4 ---
 .../STORM/0.9.1/package/scripts/drpc_server.py  |  4 ---
 .../STORM/0.9.1/package/scripts/nimbus.py       |  4 ---
 .../STORM/0.9.1/package/scripts/pacemaker.py    |  4 ---
 .../STORM/0.9.1/package/scripts/rest_api.py     |  4 ---
 .../STORM/0.9.1/package/scripts/supervisor.py   |  4 ---
 .../STORM/0.9.1/package/scripts/ui_server.py    |  4 ---
 .../scripts/application_timeline_server.py      |  6 ----
 .../2.1.0.2.0/package/scripts/historyserver.py  |  4 ---
 .../2.1.0.2.0/package/scripts/nodemanager.py    |  4 ---
 .../package/scripts/resourcemanager.py          |  4 ---
 .../3.4.5/package/scripts/zookeeper_server.py   |  4 ---
 .../stacks/2.0.6/HIVE/test_hive_server.py       |  6 ++--
 .../2.0.6/configs/default_ams_embedded.json     |  3 --
 51 files changed, 49 insertions(+), 265 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-common/src/main/python/resource_management/libraries/functions/flume_agent_helper.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/flume_agent_helper.py b/ambari-common/src/main/python/resource_management/libraries/functions/flume_agent_helper.py
index 80e7b28..bf1481c 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/flume_agent_helper.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/flume_agent_helper.py
@@ -38,8 +38,11 @@ def get_flume_status(flume_conf_directory, flume_run_directory):
   :param flume_run_directory: the run directory (ie /var/run/flume)
   :return: a list of status information for each expected flume agent
   """
+  meta_files = find_expected_agent_names(flume_conf_directory)
+  pid_files = []
 
-  pid_files = get_flume_pid_files(flume_conf_directory, flume_run_directory)
+  for agent_name in meta_files:
+    pid_files.append(os.path.join(flume_run_directory, agent_name + '.pid'))
 
   processes = []
   for pid_file in pid_files:
@@ -47,21 +50,6 @@ def get_flume_status(flume_conf_directory, flume_run_directory):
 
   return processes
 
-def get_flume_pid_files(flume_conf_directory, flume_run_directory):
-  """
-  Gets the flume agent pid files
-
-  :param flume_conf_directory:  the configuration directory (ie /etc/flume/conf)
-  :param flume_run_directory: the run directory (ie /var/run/flume)
-  :return: a list of pid files for each expected flume agent
-  """
-
-  meta_files = find_expected_agent_names(flume_conf_directory)
-  pid_files = []
-  for agent_name in meta_files:
-    pid_files.append(os.path.join(flume_run_directory, agent_name + '.pid'))
-
-  return pid_files
 
 def find_expected_agent_names(flume_conf_directory):
   """

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-common/src/main/python/resource_management/libraries/script/script.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 047389d..49dcb4e 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -35,7 +35,6 @@ from ambari_commons.constants import UPGRADE_TYPE_NON_ROLLING, UPGRADE_TYPE_ROLL
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from resource_management.libraries.resources import XmlConfig
 from resource_management.libraries.resources import PropertiesFile
-from resource_management.core import sudo
 from resource_management.core.resources import File, Directory
 from resource_management.core.source import InlineTemplate
 from resource_management.core.environment import Environment
@@ -256,9 +255,6 @@ class Script(object):
           self.pre_start()
         
         method(env)
-
-        if self.command_name == "start" and not self.is_hook():
-          self.post_start()
     finally:
       if self.should_expose_component_version(self.command_name):
         self.save_component_version_to_structured_out()
@@ -272,9 +268,6 @@ class Script(object):
   
   def get_user(self):
     return ""
-
-  def get_pid_files(self):
-    return []
         
   def pre_start(self):
     if self.log_out_files:
@@ -282,30 +275,15 @@ class Script(object):
       user = self.get_user()
       
       if log_folder == "":
-        Logger.logger.error("Log folder for current script is not defined")
+        Logger.logger.warn("Log folder for current script is not defined")
         return
       
       if user == "":
-        Logger.logger.error("User for current script is not defined")
+        Logger.logger.warn("User for current script is not defined")
         return
       
       show_logs(log_folder, user, lines_count=COUNT_OF_LAST_LINES_OF_OUT_FILES_LOGGED, mask=OUT_FILES_MASK)
 
-  def post_start(self):
-    pid_files = self.get_pid_files()
-    if pid_files == []:
-      Logger.logger.error("Pid files for current script are not defined")
-      return
-
-    pids = []
-    for pid_file in pid_files:
-      if not sudo.path_exists(pid_file):
-        raise Fail("Pid file {0} doesn't exist after starting of the component.")
-
-      pids.append(sudo.read_file(pid_file).strip())
-
-    Logger.info("Component has started with pid(s): {0}".format(', '.join(pids)))
-
   def choose_method_to_execute(self, command_name):
     """
     Returns a callable object that should be executed for a given command.
@@ -711,7 +689,6 @@ class Script(object):
           self.start(env, rolling_restart=(restart_type == "rolling_upgrade"))
         else:
           self.start(env)
-      self.post_start()
 
       if is_stack_upgrade:
         # Remain backward compatible with the rest of the services that haven't switched to using
@@ -832,4 +809,4 @@ class Script(object):
 
   def __init__(self):
     if Script.instance is not None:
-      raise Fail("An instantiation already exists! Use, get_instance() method.")
+      raise Fail("An instantiation already exists! Use, get_instance() method.")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
index f9d5fce..0c5cee9 100644
--- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
+++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
@@ -48,11 +48,7 @@ class AccumuloScript(Script):
   }
 
   def __init__(self, component):
-    import status_params
-    env.set_params(status_params)
-
     self.component = component
-    self.pid_file = format("{pid_dir}/accumulo-{accumulo_user}-{component}.pid")
 
 
   def get_component_name(self):
@@ -97,8 +93,9 @@ class AccumuloScript(Script):
   def status(self, env):
     import status_params
     env.set_params(status_params)
-
-    check_process_status(self.pid_file)
+    component = self.component
+    pid_file = format("{pid_dir}/accumulo-{accumulo_user}-{component}.pid")
+    check_process_status(pid_file)
 
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
@@ -177,12 +174,6 @@ class AccumuloScript(Script):
     import params
     return params.log_dir
 
-  def get_pid_files(self):
-    import status_params
-    env.set_params(status_params)
-
-    return [self.pid_file]
-
   def get_user(self):
     import params
     return params.accumulo_user

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
index 2019c9a..825a48e 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
@@ -68,10 +68,6 @@ class AmsCollector(Script):
     import params
     return params.ams_user
 
-  def get_pid_files(self):
-    import status
-    return status.get_collector_pid_files()
-
 
 @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT)
 class AmsCollectorDefault(AmsCollector):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py
index 747a687..ae2a635 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py
@@ -63,9 +63,5 @@ class AmsGrafana(Script):
     env.set_params(status_params)
     check_service_status(name='grafana')
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.grafana_pid_file]
-
 if __name__ == "__main__":
   AmsGrafana().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
index 8277296..7dc66b2 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py
@@ -58,11 +58,7 @@ class AmsMonitor(Script):
   def get_log_folder(self):
     import params
     return params.ams_monitor_log_dir
-
-  def get_pid_files(self):
-    import status_params
-    return [status_params.monitor_pid_file]
-
+  
   def get_user(self):
     import params
     return params.ams_user

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
index bb5f75c..fa4e8a4 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
@@ -22,26 +22,24 @@ from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 import os
 
-def get_collector_pid_files():
-  pid_files = []
-  pid_files.append(format("{ams_collector_pid_dir}/ambari-metrics-collector.pid"))
-  pid_files.append(format("{hbase_pid_dir}/hbase-{hbase_user}-master.pid"))
-  if os.path.exists(format("{hbase_pid_dir}/distributed_mode")):
-    pid_files.append(format("{hbase_pid_dir}/hbase-{hbase_user}-regionserver.pid"))
-  return pid_files
-
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def check_service_status(name):
-  import status_params
-  env.set_params(status_params)
-
   if name=='collector':
-    for pid_files in get_collector_pid_files():
+    pid_file = format("{ams_collector_pid_dir}/ambari-metrics-collector.pid")
+    check_process_status(pid_file)
+    pid_file = format("{hbase_pid_dir}/hbase-{hbase_user}-master.pid")
+    check_process_status(pid_file)
+    if os.path.exists(format("{hbase_pid_dir}/distributed_mode")):
+      pid_file = format("{hbase_pid_dir}/hbase-{hbase_user}-regionserver.pid")
       check_process_status(pid_file)
+
   elif name == 'monitor':
-    check_process_status(status_params.monitor_pid_file)
+    pid_file = format("{ams_monitor_pid_dir}/ambari-metrics-monitor.pid")
+    check_process_status(pid_file)
+
   elif name == 'grafana':
-    check_process_status(status_params.grafana_pid_file)
+    pid_file = format("{ams_grafana_pid_dir}/grafana-server.pid")
+    check_process_status(pid_file)
 
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
 def check_service_status(name):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
index 6057a8b..5be54e3 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
@@ -34,9 +34,6 @@ ams_collector_pid_dir = config['configurations']['ams-env']['metrics_collector_p
 ams_monitor_pid_dir = config['configurations']['ams-env']['metrics_monitor_pid_dir']
 ams_grafana_pid_dir = config['configurations']['ams-grafana-env']['metrics_grafana_pid_dir']
 
-monitor_pid_file = format("{ams_monitor_pid_dir}/ambari-metrics-monitor.pid")
-grafana_pid_file = format("{ams_grafana_pid_dir}/grafana-server.pid")
-
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 ams_hbase_conf_dir = format("{hbase_conf_dir}")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
index 76bbe47..c859ffb 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py
@@ -170,9 +170,5 @@ class MetadataServer(Script):
     import params
     return params.metadata_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_file]
-
 if __name__ == "__main__":
   MetadataServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
index ee82e6d..cd74890 100644
--- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
+++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
@@ -156,10 +156,6 @@ class FalconServerLinux(FalconServer):
     import params
     return params.falcon_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.server_pid_file]
-
 
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class FalconServerWindows(FalconServer):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
index 98b357e..107ce6d 100644
--- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
+++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/flume_handler.py
@@ -22,7 +22,7 @@ from flume import get_desired_state
 
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import conf_select, stack_select
-from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names, get_flume_status, get_flume_pid_files
+from resource_management.libraries.functions.flume_agent_helper import find_expected_agent_names, get_flume_status
 from resource_management.core.exceptions import ComponentIsNotRunning
 from resource_management.core.logger import Logger
 from resource_management.core.resources.service import Service
@@ -100,10 +100,6 @@ class FlumeHandlerLinux(FlumeHandler):
     import params
     return None # means that is run from the same user as ambari is run
 
-  def get_pid_files(self):
-    import params
-    return get_flume_pid_files(params.flume_conf_dir, params.flume_run_dir)
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class FlumeHandlerWindows(FlumeHandler):
   def install(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
index d2c8089..0efc19d 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
@@ -95,8 +95,8 @@ class HbaseMasterDefault(HbaseMaster):
   def status(self, env):
     import status_params
     env.set_params(status_params)
-
-    check_process_status(status_params.hbase_master_pid_file)
+    pid_file = format("{pid_dir}/hbase-{hbase_user}-master.pid")
+    check_process_status(pid_file)
 
   def security_status(self, env):
     import status_params
@@ -155,9 +155,5 @@ class HbaseMasterDefault(HbaseMaster):
     import params
     return params.hbase_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.hbase_master_pid_file]
-
 if __name__ == "__main__":
   HbaseMaster().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
index fb713f5..f5560b2 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
@@ -103,8 +103,8 @@ class HbaseRegionServerDefault(HbaseRegionServer):
   def status(self, env):
     import status_params
     env.set_params(status_params)
-
-    check_process_status(status_params.regionserver_pid_file)
+    pid_file = format("{pid_dir}/hbase-{hbase_user}-regionserver.pid")
+    check_process_status(pid_file)
 
   def security_status(self, env):
     import status_params
@@ -163,9 +163,5 @@ class HbaseRegionServerDefault(HbaseRegionServer):
     import params
     return params.hbase_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.regionserver_pid_file]
-
 if __name__ == "__main__":
   HbaseRegionServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_queryserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_queryserver.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_queryserver.py
index 77820cc..82113e9 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_queryserver.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_queryserver.py
@@ -84,9 +84,5 @@ class PhoenixQueryServer(Script):
     import params
     return params.hbase_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.phoenix_pid_file]
-
 if __name__ == "__main__":
   PhoenixQueryServer().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_service.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_service.py
index 42d9cd1..0d6d50d 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_service.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/phoenix_service.py
@@ -26,9 +26,8 @@ from resource_management.libraries.functions import check_process_status, format
 
 # Note: Phoenix Query Server is only applicable to phoenix version stacks and above.
 def phoenix_service(action = 'start'): # 'start', 'stop', 'status'
-    # Note: params should already be imported before calling phoenix_service()
-    import status_params
-    pid_file = status_params.phoenix_pid_file
+    # Note: params/status_params should already be imported before calling phoenix_service()
+    pid_file = format("{pid_dir}/phoenix-{hbase_user}-server.pid")
     no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps -p `cat {pid_file}` >/dev/null 2>&1")
 
     if action == "status":

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/status_params.py
index bc75c78..70b5548 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/status_params.py
@@ -46,10 +46,6 @@ else:
   pid_dir = config['configurations']['hbase-env']['hbase_pid_dir']
   hbase_user = config['configurations']['hbase-env']['hbase_user']
 
-  hbase_master_pid_file = format("{pid_dir}/hbase-{hbase_user}-master.pid")
-  regionserver_pid_file = format("{pid_dir}/hbase-{hbase_user}-regionserver.pid")
-  phoenix_pid_file = format("{pid_dir}/phoenix-{hbase_user}-server.pid")
-
   # Security related/required params
   hostname = config['hostname']
   security_enabled = config['configurations']['cluster-env']['security_enabled']
@@ -65,4 +61,4 @@ else:
   if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
     hbase_conf_dir = format("{stack_root}/current/{component_directory}/conf")
     
-stack_name = default("/hostLevelParams/stack_name", None)
+stack_name = default("/hostLevelParams/stack_name", None)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
index 130c021..c12ba0c 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
@@ -164,10 +164,6 @@ class DataNodeDefault(DataNode):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.datanode_pid_file]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class DataNodeWindows(DataNode):
   def install(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
index 46df454..6341633 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
@@ -169,10 +169,6 @@ class JournalNodeDefault(JournalNode):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.journalnode_pid_file]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class JournalNodeWindows(JournalNode):
   def install(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
index 07a9722..df02311 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
@@ -356,10 +356,6 @@ class NameNodeDefault(NameNode):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.namenode_pid_file]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class NameNodeWindows(NameNode):
   def install(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
index 7ba1f96..770df59 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
@@ -143,9 +143,5 @@ class NFSGateway(Script):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.nfsgateway_pid_file]
-
 if __name__ == "__main__":
   NFSGateway().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
index 0f1f438..318b449 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
@@ -143,10 +143,6 @@ class SNameNodeDefault(SNameNode):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.snamenode_pid_file]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class SNameNodeWindows(SNameNode):
   pass

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
index b575d14..aa0ab0f 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
@@ -158,10 +158,6 @@ class ZkfcSlaveDefault(ZkfcSlave):
     import params
     return params.hdfs_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.zkfc_pid_file]
-
 def initialize_ha_zookeeper(params):
   try:
     iterations = 10

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index 562d330..55cddd6 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -90,10 +90,11 @@ class HiveMetastoreDefault(HiveMetastore):
   def status(self, env):
     import status_params
     from resource_management.libraries.functions import check_process_status
-    env.set_params(status_params)
 
+    env.set_params(status_params)
+    pid_file = format("{hive_pid_dir}/{hive_metastore_pid}")
     # Recursively check all existing gmetad pid files
-    check_process_status(status_params.hive_metastore_pid)
+    check_process_status(pid_file)
 
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
@@ -248,10 +249,6 @@ class HiveMetastoreDefault(HiveMetastore):
     import params
     return params.hive_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.hive_metastore_pid]
-
 
 if __name__ == "__main__":
   HiveMetastore().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
index 7c886b2..31b083b 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
@@ -107,9 +107,10 @@ class HiveServerDefault(HiveServer):
   def status(self, env):
     import status_params
     env.set_params(status_params)
+    pid_file = format("{hive_pid_dir}/{hive_pid}")
 
     # Recursively check all existing gmetad pid files
-    check_process_status(status_params.hive_pid)
+    check_process_status(pid_file)
 
 
   def pre_upgrade_restart(self, env, upgrade_type=None):
@@ -206,9 +207,5 @@ class HiveServerDefault(HiveServer):
     import params
     return params.hive_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.hive_pid]
-
 if __name__ == "__main__":
   HiveServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
index bfd5b78..7de3d49 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
@@ -140,8 +140,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
       # We are not doing 'llap' status check done here as part of status check for 'HSI', as 'llap' status
       # check is a heavy weight operation.
 
+      pid_file = format("{hive_pid_dir}/{hive_interactive_pid}")
       # Recursively check all existing gmetad pid files
-      check_process_status(status_params.hive_interactive_pid)
+      check_process_status(pid_file)
 
     def security_status(self, env):
       HiveServerDefault.security_status(env)
@@ -390,10 +391,6 @@ class HiveServerInteractiveDefault(HiveServerInteractive):
       import params
       return params.hive_user
 
-    def get_pid_files(self):
-      import status_params
-      return [status_params.hive_interactive_pid]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class HiveServerInteractiveWindows(HiveServerInteractive):
 
@@ -401,4 +398,4 @@ class HiveServerInteractiveWindows(HiveServerInteractive):
     pass
 
 if __name__ == "__main__":
-  HiveServerInteractive().execute()
+  HiveServerInteractive().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index 01aab1d..0a3d921 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -54,13 +54,12 @@ def hive_service(name, action='start', upgrade_type=None):
 def hive_service(name, action='start', upgrade_type=None):
 
   import params
-  import status_params
 
   if name == 'metastore':
-    pid_file = status_params.hive_metastore_pid
+    pid_file = format("{hive_pid_dir}/{hive_metastore_pid}")
     cmd = format("{start_metastore_path} {hive_log_dir}/hive.out {hive_log_dir}/hive.err {pid_file} {hive_server_conf_dir} {hive_log_dir}")
   elif name == 'hiveserver2':
-    pid_file = status_params.hive_pid
+    pid_file = format("{hive_pid_dir}/{hive_pid}")
     cmd = format("{start_hiveserver2_path} {hive_log_dir}/hive-server2.out {hive_log_dir}/hive-server2.err {pid_file} {hive_server_conf_dir} {hive_log_dir}")
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service_interactive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service_interactive.py
index 9d8f615..1edcdca 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service_interactive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service_interactive.py
@@ -41,9 +41,8 @@ def hive_service_interactive(name, action='start', upgrade_type=None):
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def hive_service_interactive(name, action='start', upgrade_type=None):
   import params
-  import status_params
 
-  pid_file = status_params.hive_interactive_pid
+  pid_file = format("{hive_pid_dir}/{hive_interactive_pid}")
   cmd = format("{start_hiveserver2_interactive_path} {hive_pid_dir}/hive-server2-interactive.out {hive_log_dir}/hive-server2-interactive.err {pid_file} {hive_server_interactive_conf_dir} {hive_log_dir}")
 
   pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.hive_user, is_checked_call=False)[1]

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
index 4fe5248..b148849 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
@@ -61,9 +61,9 @@ if OSCheck.is_windows_family():
   webhcat_server_win_service_name = "templeton"
 else:
   hive_pid_dir = config['configurations']['hive-env']['hive_pid_dir']
-  hive_pid = format("{hive_pid_dir}/hive-server.pid")
-  hive_interactive_pid = format("{hive_pid_dir}/hive-interactive.pid")
-  hive_metastore_pid = format("{hive_pid_dir}/hive.pid")
+  hive_pid = 'hive-server.pid'
+  hive_interactive_pid = 'hive-interactive.pid'
+  hive_metastore_pid = 'hive.pid'
 
   hcat_pid_dir = config['configurations']['hive-env']['hcat_pid_dir'] #hcat_pid_dir
   webhcat_pid_file = format('{hcat_pid_dir}/webhcat.pid')
@@ -118,4 +118,4 @@ else:
   if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE", "HIVE_SERVER_INTERACTIVE"]:
     hive_config_dir = hive_server_conf_dir
     
-stack_name = default("/hostLevelParams/stack_name", None)
+stack_name = default("/hostLevelParams/stack_name", None)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
index 86ecec6..ea76876 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
@@ -161,9 +161,5 @@ class WebHCatServerDefault(WebHCatServer):
     import params
     return params.webhcat_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.webhcat_pid_file]
-
 if __name__ == "__main__":
   WebHCatServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
index 0901730..024da4a 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
@@ -125,9 +125,5 @@ class KafkaBroker(Script):
     import params
     return params.kafka_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.kafka_pid_file]
-
 if __name__ == "__main__":
   KafkaBroker().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
index 31e54e5..c571a8f 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py
@@ -272,10 +272,6 @@ class KnoxGatewayDefault(KnoxGateway):
     import params
     return params.knox_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.knox_pid_file]
-
 
 if __name__ == "__main__":
   KnoxGateway().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
index 02eb192..66bcdd7 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
@@ -206,10 +206,6 @@ class OozieServerDefault(OozieServer):
     import params
     return params.oozie_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_file]
-
 
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class OozieServerWindows(OozieServer):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
index 9c6e142..1efa7e9 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
@@ -92,9 +92,5 @@ class RangerTagsync(Script):
     import params
     return params.unix_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.tagsync_pid_file]
-
 if __name__ == "__main__":
   RangerTagsync().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/job_history_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/job_history_server.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/job_history_server.py
index 2825f35..e96edd4 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/job_history_server.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/job_history_server.py
@@ -98,9 +98,5 @@ class JobHistoryServer(Script):
     import params
     return params.spark_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.spark_history_server_pid_file]
-
 if __name__ == "__main__":
   JobHistoryServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py
index fd5d67c..7587ab5 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/livy_server.py
@@ -57,10 +57,6 @@ class LivyServer(Script):
 
     check_process_status(status_params.livy_server_pid_file)
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.livy_server_pid_file]
-
 
   def get_component_name(self):
     return "livy-server"
@@ -69,4 +65,4 @@ class LivyServer(Script):
     pass
 
 if __name__ == "__main__":
-  LivyServer().execute()
+  LivyServer().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_thrift_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_thrift_server.py
index 37b4ae7..a0f000c 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_thrift_server.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/spark_thrift_server.py
@@ -82,9 +82,5 @@ class SparkThriftServer(Script):
     import params
     return params.hive_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.spark_thrift_server_pid_file]
-
 if __name__ == "__main__":
   SparkThriftServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/job_history_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/job_history_server.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/job_history_server.py
index 3a0cff5..611c063 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/job_history_server.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/job_history_server.py
@@ -98,9 +98,5 @@ class JobHistoryServer(Script):
     import params
     return params.spark_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.spark_history_server_pid_file]
-
 if __name__ == "__main__":
   JobHistoryServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_thrift_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_thrift_server.py
index 426c05c..7f33939 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_thrift_server.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/spark_thrift_server.py
@@ -82,9 +82,5 @@ class SparkThriftServer(Script):
     import params
     return params.hive_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.spark_thrift_server_pid_file]
-
 if __name__ == "__main__":
   SparkThriftServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/drpc_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/drpc_server.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/drpc_server.py
index 178c043..b156578 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/drpc_server.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/drpc_server.py
@@ -135,9 +135,5 @@ class DrpcServer(Script):
     import params
     return params.storm_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_drpc]
-
 if __name__ == "__main__":
   DrpcServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
index a974103..b2148a5 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/nimbus.py
@@ -135,10 +135,6 @@ class NimbusDefault(Nimbus):
     import params
     return params.storm_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_nimbus]
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class NimbusWindows(Nimbus):
   def start(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/pacemaker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/pacemaker.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/pacemaker.py
index a56c0cd..2ea02e8 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/pacemaker.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/pacemaker.py
@@ -134,9 +134,5 @@ class PaceMaker(Script):
       import params
       return params.storm_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_pacemaker]
-
 if __name__ == "__main__":
     PaceMaker().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py
index f9b3b80..26fdb27 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py
@@ -76,10 +76,6 @@ class StormRestApi(Script):
   def get_user(self):
     import params
     return params.storm_user
-
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_rest_api]
   
 if __name__ == "__main__":
   StormRestApi().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/supervisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/supervisor.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/supervisor.py
index ec3f533..da900f9 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/supervisor.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/supervisor.py
@@ -108,10 +108,6 @@ class SupervisorDefault(Supervisor):
     import params
     return params.storm_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_supervisor]
-
 if __name__ == "__main__":
   Supervisor().execute()
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/ui_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/ui_server.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/ui_server.py
index ec0865e..6551067 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/ui_server.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/ui_server.py
@@ -176,9 +176,5 @@ class UiServerDefault(UiServer):
     import params
     return params.storm_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.pid_ui]
-
 if __name__ == "__main__":
   UiServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py
index 372f34d..81fc94f 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/application_timeline_server.py
@@ -154,11 +154,5 @@ class ApplicationTimelineServerDefault(ApplicationTimelineServer):
     import params
     return params.yarn_user
 
-  def get_pid_files(self):
-    import status_params
-    Execute(format("mv {status_params.yarn_historyserver_pid_file_old} {status_params.yarn_historyserver_pid_file}"),
-            only_if = format("test -e {status_params.yarn_historyserver_pid_file_old}", user=status_params.yarn_user))
-    return [status_params.yarn_historyserver_pid_file]
-
 if __name__ == "__main__":
   ApplicationTimelineServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py
index d5bdc6b..8fe55a3 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py
@@ -184,9 +184,5 @@ class HistoryServerDefault(HistoryServer):
     import params
     return params.mapred_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.mapred_historyserver_pid_file]
-
 if __name__ == "__main__":
   HistoryServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py
index ad67393..106b734 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/nodemanager.py
@@ -168,9 +168,5 @@ class NodemanagerDefault(Nodemanager):
     import params
     return params.yarn_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.nodemanager_pid_file]
-
 if __name__ == "__main__":
   Nodemanager().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py
index b3448cb..0b80dc6 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/resourcemanager.py
@@ -282,10 +282,6 @@ class ResourcemanagerDefault(Resourcemanager):
   def get_user(self):
     import params
     return params.yarn_user
-
-  def get_pid_files(self):
-    import status_params
-    return [status_params.resourcemanager_pid_file]
   
 if __name__ == "__main__":
   Resourcemanager().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
index 63aa13e..8a8bb11 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/package/scripts/zookeeper_server.py
@@ -170,10 +170,6 @@ class ZookeeperServerLinux(ZookeeperServer):
     import params
     return params.zk_user
 
-  def get_pid_files(self):
-    import status_params
-    return [status_params.zk_pid_file]
-
 
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class ZookeeperServerWindows(ZookeeperServer):

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index d03ade3..3c224a8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -736,11 +736,10 @@ class TestHiveServer(RMFTestCase):
     except:
       self.assert_configure_default()
 
-  @patch("resource_management.libraries.script.Script.post_start")
   @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs")
   @patch("os.path.exists", new = MagicMock(return_value=True))
   @patch("platform.linux_distribution", new = MagicMock(return_value="Linux"))
-  def test_stop_during_upgrade(self, copy_to_hdfs_mock, post_start_mock):
+  def test_stop_during_upgrade(self, copy_to_hdfs_mock):
 
     hiveServerVersionOutput = """WARNING: Use "yarn jar" to launch YARN applications.
 Hive 1.2.1.2.3.0.0-2434
@@ -763,9 +762,8 @@ From source with checksum 150f554beae04f76f814f59549dead8b"""
       tries=1, user='hive')
 
 
-  @patch("resource_management.libraries.script.Script.post_start")
   @patch("resource_management.libraries.functions.copy_tarball.copy_to_hdfs")
-  def test_stop_during_upgrade_with_default_conf_server(self, copy_to_hdfs_mock, post_start_mock):
+  def test_stop_during_upgrade_with_default_conf_server(self, copy_to_hdfs_mock):
     hiveServerVersionOutput = """WARNING: Use "yarn jar" to launch YARN applications.
 Hive 1.2.1.2.3.0.0-2434
 Subversion git://ip-10-0-0-90.ec2.internal/grid/0/jenkins/workspace/HDP-dal-centos6/bigtop/build/hive/rpm/BUILD/hive-1.2.1.2.3.0.0 -r a77a00ae765a73b2957337e96ed5a0dbb2e60dfb

http://git-wip-us.apache.org/repos/asf/ambari/blob/accc96db/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
index e9365a0..ceedb67 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
@@ -42,9 +42,6 @@
     "taskId": 152, 
     "public_hostname": "c6401.ambari.apache.org", 
     "configurations": {
-        "ams-grafana-env" : {
-            "metrics_grafana_pid_dir" : "/var/run/ambari-metrics-monitor"
-        },
         "mapred-site": {
             "mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020", 
             "mapreduce.cluster.administrators": " hadoop", 


Mime
View raw message