ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-8267. Slider View: Slider AM keytab has missing principal name. (srimanth)
Date Tue, 11 Nov 2014 01:24:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 fc87882dc -> 9ffbd05bc


AMBARI-8267. Slider View: Slider AM keytab has missing principal name. (srimanth)


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

Branch: refs/heads/branch-1.7.0
Commit: 9ffbd05bca664ee360d262614ef3e884ff741917
Parents: fc87882
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Mon Nov 10 17:15:01 2014 -0800
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Mon Nov 10 17:15:01 2014 -0800

----------------------------------------------------------------------
 .../apache/ambari/view/slider/SliderAppsViewControllerImpl.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ffbd05b/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 5184628..1ca168c 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
@@ -1370,6 +1370,11 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
       JsonObject appMasterComponent = new JsonObject();
       String userToRunAsKeytab = getUserToRunAsKeytabs(appType).get(0);
       String fileName = userToRunAsKeytab.substring(userToRunAsKeytab.lastIndexOf('/') +
1);
+      String userName = fileName.substring(0, fileName.indexOf('.'));
+      String viewPrincipalName = getViewParameterValue(PARAM_VIEW_PRINCIPAL);
+      int atIndex = viewPrincipalName.lastIndexOf('@');
+      String viewPrincipalDomain = atIndex > -1 ? viewPrincipalName.substring(atIndex+1)
: "";
+      appMasterComponent.add("slider.keytab.principal.name", new JsonPrimitive(userName +
"@" + viewPrincipalDomain));
       appMasterComponent.add("slider.am.login.keytab.name", new JsonPrimitive(fileName));
       appMasterComponent.add("slider.hdfs.keytab.dir", new JsonPrimitive(".slider/keytabs/"
+ appName));
       componentsObj.add("slider-appmaster", appMasterComponent);


Mime
View raw message