ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject ambari git commit: AMBARI-16008. Restart Phoenix Query Server intermittently fails on SLES 11 SP3 (ncole)
Date Thu, 21 Apr 2016 14:25:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 2bc94a04b -> b4bf253c9


AMBARI-16008. Restart Phoenix Query Server intermittently fails on SLES 11 SP3 (ncole)


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

Branch: refs/heads/branch-2.2
Commit: b4bf253c98d503f389114832fed1a89ac0a1b5eb
Parents: 2bc94a0
Author: Nate Cole <ncole@hortonworks.com>
Authored: Thu Apr 21 10:25:18 2016 -0400
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Thu Apr 21 10:25:18 2016 -0400

----------------------------------------------------------------------
 .../0.96.0.2.0/package/scripts/phoenix_service.py      | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4bf253c/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 e155cec..02b6993 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
@@ -18,6 +18,8 @@ limitations under the License.
 
 """
 
+import errno
+from resource_management.core.logger import Logger
 from resource_management.core.resources.system import Execute
 from resource_management.core.resources.system import File
 from resource_management.libraries.functions import check_process_status, format
@@ -45,6 +47,11 @@ def phoenix_service(action = 'start'): # 'start', 'stop', 'status'
                 user=format("{hbase_user}"),
                 environment=env
         )
-        File(pid_file,
-             action = "delete"
-        )
+        try:
+          File(pid_file, action = "delete")
+        except OSError as exc:
+          # OSError: [Errno 2] No such file or directory
+          if exc.errno == errno.ENOENT:
+            Logger.info("Did not remove '{0}' as it did not exist".format(pid_file))
+          else:
+            raise


Mime
View raw message