浏览代码

AMBARI-15387: Pxf service status is red (gowtam tadi via bhuvnesh2703)

Bhuvnesh Chaudhary 9 年之前
父节点
当前提交
40a906ec26

+ 3 - 3
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py

@@ -17,7 +17,7 @@ limitations under the License.
 """
 
 import functools
-
+import pxf_constants
 from resource_management import Script
 from resource_management.libraries.functions.default import default
 from resource_management.libraries.functions import get_kinit_path
@@ -27,11 +27,11 @@ from resource_management.libraries.functions.get_not_managed_resources import ge
 
 config = Script.get_config()
 
-pxf_service_name = "pxf-service"
+pxf_service_name = pxf_constants.pxf_service_name
 stack_name = str(config["hostLevelParams"]["stack_name"])
 
 # Users and Groups
-pxf_user = "pxf"
+pxf_user = pxf_constants.pxf_user
 pxf_group = pxf_user
 hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
 hdfs_superuser_group = config["configurations"]["hdfs-site"]["dfs.permissions.superusergroup"]

+ 3 - 3
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py

@@ -70,9 +70,9 @@ class Pxf(Script):
 
 
   def __execute_service_command(self, command):
-    import params
-    Execute("service {0} {1}".format(params.pxf_service_name, command),
-              timeout=params.default_exec_timeout,
+    import pxf_constants
+    Execute("service {0} {1}".format(pxf_constants.pxf_service_name, command),
+              timeout=pxf_constants.default_exec_timeout,
               logoutput=True)
 
 

+ 3 - 0
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf_constants.py

@@ -28,3 +28,6 @@ hbase_populate_data_script = "hbase-populate-data.sh"
 hbase_cleanup_data_script = "hbase-cleanup-data.sh"
 pxf_hive_test_table = "pxf_hive_smoke_test_table"
 hive_populate_data_script = "hive-populate-data.hql"
+pxf_service_name = "pxf-service"
+pxf_user = "pxf"
+default_exec_timeout = 600