You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2016/04/07 01:30:03 UTC

ambari git commit: AMBARI-15748. Restart LLAP action should be shown only when Hive Interactive Server is present in the cluster. (jaimin)

Repository: ambari
Updated Branches:
  refs/heads/trunk 548ed9fda -> df00fd6e4


AMBARI-15748. Restart LLAP action should be shown only when Hive Interactive Server is present in the cluster. (jaimin)


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

Branch: refs/heads/trunk
Commit: df00fd6e4b769276a72373980aa819c26465b12f
Parents: 548ed9f
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Apr 6 16:29:24 2016 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Apr 6 16:30:00 2016 -0700

----------------------------------------------------------------------
 ambari-web/app/views/main/service/item.js       | 5 +++--
 ambari-web/test/views/main/service/item_test.js | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/df00fd6e/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 790c0dc..913987d 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -40,7 +40,7 @@ App.MainServiceItemView = Em.View.extend({
     'HAWQMASTER': ['IMMEDIATE_STOP_HAWQ_SERVICE', 'RUN_HAWQ_CHECK', 'HAWQ_CLEAR_CACHE', 'REMOVE_HAWQ_STANDBY'],
     'HAWQSEGMENT': ['IMMEDIATE_STOP_HAWQ_SEGMENT'],
     'HAWQSTANDBY': ['RESYNC_HAWQ_STANDBY','ACTIVATE_HAWQ_STANDBY'],
-    'HIVE_SERVER_INTERACTIVE' : ["RESTART_LLAP"],
+    'HIVE_SERVER_INTERACTIVE' : ["RESTART_LLAP"]
   },
 
    addActionMap: function() {
@@ -201,7 +201,8 @@ App.MainServiceItemView = Em.View.extend({
 
       if (serviceName === 'HIVE') {
         var hiveServerInteractiveComponent = App.StackServiceComponent.find().findProperty('componentName', 'HIVE_SERVER_INTERACTIVE');
-        if (hiveServerInteractiveComponent) {
+        var isHiveInteractiveServerPresent = allMasters.contains('HIVE_SERVER_INTERACTIVE');
+        if (hiveServerInteractiveComponent && isHiveInteractiveServerPresent) {
           var LLAPCustomCommands = hiveServerInteractiveComponent.get('customCommands');
           LLAPCustomCommands.forEach(function (command) {
             if (actionMap[command]) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/df00fd6e/ambari-web/test/views/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/item_test.js b/ambari-web/test/views/main/service/item_test.js
index 3c0e6aa..085eaad 100644
--- a/ambari-web/test/views/main/service/item_test.js
+++ b/ambari-web/test/views/main/service/item_test.js
@@ -498,13 +498,14 @@ describe('App.MainServiceItemView', function () {
             return Em.Object.create({ customCommands: ["DECOMMISSION"] });
           case 'KNOX_GATEWAY':
             return Em.Object.create({ customCommands: ["STARTDEMOLDAP", "STOPDEMOLDAP"] });
+          case 'HIVE_SERVER_INTERACTIVE':
+            return Em.Object.create({ customCommands: ["RESTART_LLAP"] });
           case 'HISTORYSERVER':
           case 'SECONDARY_NAMENODE':
           case 'ZOOKEEPER_SERVER':
           case 'APP_TIMELINE_SERVER':
           case 'KAFKA_BROKER':
           case 'OOZIE_SERVER':
-          case 'HIVE_SERVER_INTERACTIVE':
           case 'NIMBUS':
             return Em.Object.create({ customCommands: [] });
           default: