ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-15854. Slider View Controller needs to set a System Property (Gour Saha via smohanty)
Date Tue, 19 Apr 2016 19:07:05 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2.2 633cc659d -> 8e821e028


AMBARI-15854. Slider View Controller needs to set a System Property (Gour Saha via smohanty)


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

Branch: refs/heads/branch-2.2.2
Commit: 8e821e028675593e92acd65e2a1a5bce7b0a5d4c
Parents: 633cc65
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Tue Apr 19 11:34:09 2016 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Tue Apr 19 12:06:53 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/8e821e02/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 72fb09f..42bd3ba 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
@@ -53,6 +53,7 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipFile;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.filefilter.RegexFileFilter;
+import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -1189,6 +1190,8 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
       final boolean securityEnabled = Boolean.valueOf(getHadoopConfigs().get("security_enabled"));
       final boolean twoWaySSlEnabled = json.has("twoWaySSLEnabled") ? Boolean.valueOf(json.get("twoWaySSLEnabled").getAsString())
: false;
       JsonObject configs = json.get("typeConfigs").getAsJsonObject();
+      final String hdpVersion = configs.has("env.HDP_VERSION") ? configs.get(
+          "env.HDP_VERSION").getAsString() : null;
       JsonObject resourcesObj = json.get("resources").getAsJsonObject();
       JsonArray componentsArray = resourcesObj.get("components").getAsJsonArray();
       String appsCreateFolderPath = getAppsCreateFolderPath();
@@ -1268,6 +1271,10 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController
{
               sliderClient.actionInstallKeytab(keytabArgs);
             }
           }
+          if (StringUtils.isNotEmpty(hdpVersion)) {
+            System.setProperty("HDP_VERSION", hdpVersion);
+            logger.info("Setting system property HDP_VERSION=" + hdpVersion);
+          }
           sliderClient.actionInstallPkg(installArgs);
           sliderClient.actionCreate(appName, createArgs);
           ApplicationId applicationId = sliderClient.applicationId;


Mime
View raw message