You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/11/03 02:22:36 UTC

git commit: AMBARI-8113. Slider View: Stopped YARN service needs appropriate message (srimanth)

Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 010efd759 -> e52e4f855


AMBARI-8113. Slider View: Stopped YARN service needs appropriate message (srimanth)


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

Branch: refs/heads/branch-1.7.0
Commit: e52e4f8556c02093240d37f05f49e69325a93bf3
Parents: 010efd7
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Sun Nov 2 17:10:39 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Sun Nov 2 17:21:25 2014 -0800

----------------------------------------------------------------------
 .../org/apache/ambari/view/slider/SliderAppsViewController.java  | 1 +
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java  | 2 +-
 .../src/main/resources/ui/app/controllers/slider_controller.js   | 4 ++++
 contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js   | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e52e4f85/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
index 4cdecf7..25b0b89 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewController.java
@@ -42,6 +42,7 @@ public interface SliderAppsViewController {
   public static final String PROPERTY_GANGLIA_SERVER_HOSTNAME = "ganglia.server.hostname";
   public static final String PROPERTY_GANGLIA_CUSTOM_CLUSTERS = "ganglia.additional.clusters";
   public static final String PROPERTY_YARN_RM_WEBAPP_URL = "yarn.rm.webapp.url";
+  public static final String PROPERTY_SLIDER_USER = "view.slider.user";
   public static final String PROPERTY_SLIDER_SECURITY_ENABLED = "slider.security.enabled";
 
   public static final String METRICS_API_NAME = "Metrics API";

http://git-wip-us.apache.org/repos/asf/ambari/blob/e52e4f85/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
index afeaab7..0370372 100644
--- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
+++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java
@@ -27,7 +27,6 @@ import java.lang.reflect.UndeclaredThrowableException;
 import java.net.URI;
 import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -218,6 +217,7 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController {
               newHadoopConfigs.put("yarn_user", yarnUser); // YARN service user
             }
             newHadoopConfigs.put("slider.user", getUserToRunAs(newHadoopConfigs)); // Slider user
+            status.getParameters().put(PROPERTY_SLIDER_USER, newHadoopConfigs.get("slider.user"));
             if (newHadoopConfigs.containsKey("security_enabled")) {
               boolean securityEnabled = Boolean.valueOf(newHadoopConfigs.get("security_enabled"));
               if (securityEnabled) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e52e4f85/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
index 2e9db6d..9e6d1c8 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js
@@ -96,6 +96,10 @@ App.SliderController = Ember.Controller.extend(App.RunPeriodically, {
       var key = model.get('viewConfigName');
       model.set('value', properties[key]);
     });
+    if (properties['view.slider.user'] != null
+        && properties['view.slider.user'] != App.get('sliderUser')) {
+      App.set('sliderUser', properties['view.slider.user']);
+    }
     this.initGangliaProperties();
     this.finishSliderConfiguration(data);
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/e52e4f85/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
index ed9575b..b622992 100644
--- a/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
+++ b/contrib/views/slider/src/main/resources/ui/app/helpers/ajax.js
@@ -31,7 +31,7 @@
 var urls = {
 
   'slider.getViewParams': {
-    real: '',
+    real: '?fields=ViewInstanceInfo',
     mock: '/data/resource/slider-properties.json',
     headers: {
       Accept: "text/plain; charset=utf-8",