You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/01/10 16:41:32 UTC

git commit: AMBARI-4261. Enable running Falcon and Storm service checks (aonishuk)

Updated Branches:
  refs/heads/trunk 7b8a705ca -> 63a08d09c


AMBARI-4261. Enable running Falcon and Storm service checks (aonishuk)


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

Branch: refs/heads/trunk
Commit: 63a08d09ca07dc1ba28ce1d3a22c79787c67253e
Parents: 7b8a705
Author: Andrew Onischuk <ao...@hortonworks.com>
Authored: Fri Jan 10 07:40:46 2014 -0800
Committer: Andrew Onischuk <ao...@hortonworks.com>
Committed: Fri Jan 10 07:40:46 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/Role.java     |  2 ++
 .../ambari/server/metadata/ActionMetadata.java  |  6 ++++
 .../STORM/package/scripts/service_check.py      | 31 ++++++++++++++++++++
 ambari-web/app/utils/helper.js                  |  4 +++
 4 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/63a08d09/ambari-server/src/main/java/org/apache/ambari/server/Role.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/Role.java b/ambari-server/src/main/java/org/apache/ambari/server/Role.java
index a91771f..f579062 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/Role.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/Role.java
@@ -101,6 +101,8 @@ public class Role {
   public static final Role ZOOKEEPER_CLIENT = valueOf("ZOOKEEPER_CLIENT");
   public static final Role ZOOKEEPER_QUORUM_SERVICE_CHECK = valueOf("ZOOKEEPER_QUORUM_SERVICE_CHECK");
   public static final Role ZOOKEEPER_SERVER = valueOf("ZOOKEEPER_SERVER");
+  public static final Role FALCON_SERVICE_CHECK = valueOf("FALCON_SERVICE_CHECK");
+  public static final Role STORM_SERVICE_CHECK = valueOf("STORM_SERVICE_CHECK");
   
 
   private String name = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/63a08d09/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java b/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
index d6bd198..ea97524 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/metadata/ActionMetadata.java
@@ -76,6 +76,8 @@ public class ActionMetadata {
     serviceActions.put("pig"        , Arrays.asList(Role.PIG_SERVICE_CHECK.toString()));
     serviceActions.put("sqoop"      , Arrays.asList(Role.SQOOP_SERVICE_CHECK.toString()));
     serviceActions.put("webhcat"  , Arrays.asList(Role.WEBHCAT_SERVICE_CHECK.toString()));
+    serviceActions.put("storm"  , Arrays.asList(Role.STORM_SERVICE_CHECK.toString()));
+    serviceActions.put("falcon"  , Arrays.asList(Role.FALCON_SERVICE_CHECK.toString()));
   }
 
   private void fillServiceCheckActions() {
@@ -97,6 +99,10 @@ public class ActionMetadata {
     serviceCheckActions.put("sqoop", Role.SQOOP_SERVICE_CHECK.toString());
     serviceCheckActions.put("webhcat",
         Role.WEBHCAT_SERVICE_CHECK.toString());
+    serviceCheckActions.put("storm",
+            Role.STORM_SERVICE_CHECK.toString());
+    serviceCheckActions.put("falcon",
+            Role.FALCON_SERVICE_CHECK.toString());
   }
 
   public List<String> getActions(String serviceName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/63a08d09/ambari-server/src/main/resources/stacks/HDP/2.0.8/services/STORM/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.8/services/STORM/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.8/services/STORM/package/scripts/service_check.py
new file mode 100644
index 0000000..582ea55
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.8/services/STORM/package/scripts/service_check.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+"""
+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.
+
+"""
+
+from resource_management import *
+
+class ServiceCheck(Script):
+  def service_check(self, env):
+    import params
+    env.set_params(params)
+
+    print "Service check."
+
+if __name__ == "__main__":
+  ServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/63a08d09/ambari-web/app/utils/helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index aca32dd..3023b10 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -326,6 +326,10 @@ App.format = {
         return 'WebHCat Server';
       case 'WEBHCAT_SERVICE_CHECK':
         return 'WebHCat Service Check';
+      case 'STORM_SERVICE_CHECK':
+          return 'Storm Service Check';
+      case 'FALCON_SERVICE_CHECK':
+          return 'Falcon Service Check';
       case 'NAGIOS_SERVER':
         return 'Nagios Server';
       case 'GANGLIA_SERVER':