You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2013/09/24 14:06:29 UTC
[3/9] git commit: 6463 Frontend changes to pass user-specified JCE
path
6463 Frontend changes to pass user-specified JCE path
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/420f16be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/420f16be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/420f16be
Branch: refs/heads/trunk
Commit: 420f16be96ddb9ec85efb7cbaf5a1bf390e02794
Parents: 533d15c
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Sep 6 19:50:35 2013 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Sep 24 14:26:57 2013 +0300
----------------------------------------------------------------------
ambari-web/app/config.js | 1 +
ambari-web/app/controllers/installer.js | 1 +
.../app/controllers/wizard/step2_controller.js | 19 -------------------
.../app/controllers/wizard/step8_controller.js | 6 +++++-
ambari-web/app/data/HDP2/global_properties.js | 14 ++++++++++++++
ambari-web/app/data/global_properties.js | 14 ++++++++++++++
6 files changed, 35 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 96a4cdd..7a141f9 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -28,6 +28,7 @@ App.apiPrefix = '/api/v1';
App.defaultStackVersion = 'HDP-2.0.5';
App.defaultLocalStackVersion = 'HDPLocal-2.0.5';
App.defaultJavaHome = '/usr/jdk/jdk1.6.0_31';
+App.defaultJCE = 'http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-6.zip';
App.timeout = 180000; // default AJAX timeout
App.maxRetries = 3; // max number of retries for certain AJAX calls
App.bgOperationsUpdateInterval = 6000;
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 2fe4f5e..f5c50c2 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -104,6 +104,7 @@ App.InstallerController = App.WizardController.extend({
} else {
console.log("Failed to load Services");
}
+ App.router.get('clusterController').loadAmbariProperties();
},
stacks: [],
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/controllers/wizard/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step2_controller.js b/ambari-web/app/controllers/wizard/step2_controller.js
index c30bd01..03cf616 100644
--- a/ambari-web/app/controllers/wizard/step2_controller.js
+++ b/ambari-web/app/controllers/wizard/step2_controller.js
@@ -350,27 +350,8 @@ App.WizardStep2Controller = Em.Controller.extend({
return (this.get('hostsError') || this.get('sshKeyError') || this.get('sshUserError')) ;
}.property('hostsError', 'sshKeyError', 'sshUserError'),
- setAmbariJavaHome: function(){
- App.ajax.send({
- name: 'ambari.service',
- sender: this,
- success: 'onGetAmbariJavaHomeSuccess',
- error: 'onGetAmbariJavaHomeError'
- });
- },
-
- onGetAmbariJavaHomeSuccess: function(data) {
- this.set('content.installOptions.javaHome',data.RootServiceComponents.properties['java.home']);
- },
-
- onGetAmbariJavaHomeError: function() {
- console.warn('can\'t get java.home value from server');
- this.set('content.installOptions.javaHome',App.defaultJavaHome);
- },
-
saveHosts: function(){
this.set('content.hosts', this.getHostInfo());
- this.setAmbariJavaHome();
App.router.send('next');
}
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 2850375..3024a89 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1365,6 +1365,7 @@ App.WizardStep8Controller = Em.Controller.extend({
var globalSiteProperties = {};
var globalSiteObj = this.get('globals');
var isHCFSSelected = this.get('selectedServices').someProperty('serviceName', 'HCFS');
+ var ambariProperties = App.router.get('clusterController.ambariProperties');
// screen out the HCFS-specific global config entries when they are not required
if (!isHCFSSelected) {
@@ -1387,7 +1388,10 @@ App.WizardStep8Controller = Em.Controller.extend({
console.log("STEP8: value of the global property is: " + _globalSiteObj.value);
}
if (_globalSiteObj.name == 'java64_home') {
- globalSiteProperties['java64_home'] = this.get('content.installOptions.javaHome');
+ globalSiteProperties['java64_home'] = ambariProperties['java.home'] ? ambariProperties['java.home'] : App.defaultJavaHome ;
+ }
+ if (_globalSiteObj.name == 'jce_policy_url') {
+ globalSiteProperties['jce_policy_url'] = ambariProperties['jce_policy.url'] ? ambariProperties['jce_policy.url'] : App.defaultJCE ;
}
this._recordHostOverrideFromObj(_globalSiteObj, 'global', 'version1', this);
}, this);
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/data/HDP2/global_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/global_properties.js b/ambari-web/app/data/HDP2/global_properties.js
index 3e35e2f..8f43d2d 100644
--- a/ambari-web/app/data/HDP2/global_properties.js
+++ b/ambari-web/app/data/HDP2/global_properties.js
@@ -2056,6 +2056,20 @@ module.exports =
},
{
"id": "puppet var",
+ "name": "jce_policy_url",
+ "displayName": "jce_policy_url",
+ "description": " ",
+ "defaultValue": " ",
+ "isRequired": true,
+ "isReconfigurable": false,
+ "displayType": "advanced",
+ "isVisible": false,
+ "domain": "global",
+ "serviceName": "MISC",
+ "belongsToService":[]
+ },
+ {
+ "id": "puppet var",
"name": "run_dir",
"displayName": "Hadoop run directory",
"description": "",
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/420f16be/ambari-web/app/data/global_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/global_properties.js b/ambari-web/app/data/global_properties.js
index 5b3e3fc..e8248b9 100644
--- a/ambari-web/app/data/global_properties.js
+++ b/ambari-web/app/data/global_properties.js
@@ -2369,6 +2369,20 @@ module.exports =
},
{
"id": "puppet var",
+ "name": "jce_policy_url",
+ "displayName": "jce_policy_url",
+ "description": " ",
+ "defaultValue": " ",
+ "isRequired": true,
+ "isReconfigurable": false,
+ "displayType": "advanced",
+ "isVisible": false,
+ "domain": "global",
+ "serviceName": "MISC",
+ "belongsToService":[]
+ },
+ {
+ "id": "puppet var",
"name": "run_dir",
"displayName": "Hadoop run directory",
"description": "",