You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/01/05 13:38:34 UTC
[01/15] ambari git commit: AMBARI-19320 : Additional query support
for HDFS TopN metrics (Commit 2) (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-dev-patch-upgrade 608f0b55e -> b1bb2890a
AMBARI-19320 : Additional query support for HDFS TopN metrics (Commit 2) (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a7bc003
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a7bc003
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a7bc003
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 7a7bc003f8d9f3eb1a84b66685e9036bcc92679a
Parents: 82a64e4
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Wed Jan 4 15:31:05 2017 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Wed Jan 4 15:31:05 2017 -0800
----------------------------------------------------------------------
.../metrics/timeline/PhoenixHBaseAccessor.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7a7bc003/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
index 3ced17d..3add411 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
@@ -1149,8 +1149,11 @@ public class PhoenixHBaseAccessor {
for (String metricNameEntry : metricFunctions.keySet()) {
String metricRegEx;
- if (metricNameEntry.contains("*")) {
- String metricNameWithEscSeq = metricNameEntry.replace("*","\\*");
+ //Special case handling for metric name with * and __%.
+ //For example, dfs.NNTopUserOpCounts.windowMs=300000.op=*.user=%.count
+ // or dfs.NNTopUserOpCounts.windowMs=300000.op=__%.user=%.count
+ if (metricNameEntry.contains("*") || metricNameEntry.contains("__%")) {
+ String metricNameWithEscSeq = metricNameEntry.replace("*", "\\*").replace("__%", "..%");
metricRegEx = metricNameWithEscSeq.replace("%", ".*");
} else {
metricRegEx = metricNameEntry.replace("%", ".*");
[03/15] ambari git commit: AMBARI-19291. User should be shown proper
error message in file browser page (Madhan Mohan Reddy via pallavkul)
Posted by nc...@apache.org.
AMBARI-19291. User should be shown proper error message in file browser page (Madhan Mohan Reddy via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/567ce62a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/567ce62a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/567ce62a
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 567ce62ac51e82249f22f7c29a1593bc4c2ac5ca
Parents: dcffaed
Author: pallavkul <pa...@gmail.com>
Authored: Thu Jan 5 12:17:52 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Thu Jan 5 12:17:52 2017 +0530
----------------------------------------------------------------------
.../src/main/resources/ui/app/components/hdfs-browser.js | 5 ++++-
.../resources/ui/app/templates/components/hdfs-browser.hbs | 6 ++++--
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/567ce62a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js
index c9be41a..47e7983 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/hdfs-browser.js
@@ -53,7 +53,10 @@ export default Ember.Component.extend({
this.set("alertMessage",data.message);
},
actions: {
- viewerError() {
+ viewerError(error) {
+ if (error.responseJSON && error.responseJSON.message && error.responseJSON.message.includes("Permission")) {
+ this.showNotification({"type": "error", "message": "Permission denied"});
+ }
},
createFolder(){
var self=this;
http://git-wip-us.apache.org/repos/asf/ambari/blob/567ce62a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs
index 437640d..4f9b4ce 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs
@@ -53,8 +53,10 @@
<div>
{{#if alertMessage}}
<div class="alert alert-{{alertType}} col-xs-24">
- {{alertMessage}}-
- {{alertDetails}}
+ {{alertMessage}}
+ {{#if alertDetails}}
+ -{{alertDetails}}
+ {{/if}}
</div>
{{/if}}
[05/15] ambari git commit: AMBARI-19341. Not able to update the role
for a given user (onechiporenko)
Posted by nc...@apache.org.
AMBARI-19341. Not able to update the role for a given user (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0777ae56
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0777ae56
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0777ae56
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 0777ae5634c25e7b8bed03f872e17759e4e80f73
Parents: 1c14889
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Jan 4 18:39:05 2017 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Thu Jan 5 10:32:12 2017 +0200
----------------------------------------------------------------------
.../app/scripts/controllers/clusters/UserAccessListCtrl.js | 7 ++++---
.../ui/admin-web/app/views/clusters/userAccessList.html | 2 +-
.../ui/admin-web/test/unit/services/PermissionSaver_test.js | 5 +++++
3 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 4f00aeb..9869d0b 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -166,9 +166,10 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams, Permissio
// Process when it's NONE privilege or higher than current effective group privilege
if (userIndex <= groupIndex || user.permission_name == $scope.NONE_ROLE.permission_name) {
- var privilege_ids = [];
- privilegesOfTypeUser.forEach(function(privilegeOfTypeUser) {
- privilege_ids.push(privilegeOfTypeUser.privilege_id);
+ var privilege_ids = privilegesOfTypeUser.filter(function(privilegeOfTypeUser) {
+ return privilegeOfTypeUser.principal_type !== 'ROLE';
+ }).map(function (privilegeOfTypeUser) {
+ return privilegeOfTypeUser.privilege_id;
});
// Purge existing user level privileges if there is any
http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
index 7b54f9f..8b29157 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
@@ -68,7 +68,7 @@
</td>
<td>
<div ng-show="!user.editable">{{user.permission_label}}</div>
- <select class="role-select" ng-show="user.editable" ng-model="user.permission_name"
+ <select class="form-control role-select" ng-show="user.editable" ng-model="user.permission_name"
ng-options="role.permission_name as role.permission_label for role in roleValueOptions">
</select>
<span ng-show="user.principal_type != $parent.currentTypeFilter.value"> {{'common.fromGroupMark' | translate}}</span>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
index 6c662f2..6a409e4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
@@ -40,6 +40,7 @@ describe('PermissionSaver Service', function () {
PermissionInfo: {
permission_name: 'CLUSTER.ADMINISTRATOR'
},
+ ROLE: {},
USER: ['u0', 'u1', 'g0'],
GROUP: ['g0', 'g1', 'u0']
},
@@ -47,6 +48,7 @@ describe('PermissionSaver Service', function () {
PermissionInfo: {
permission_name: 'CLUSTER.OPERATOR'
},
+ ROLE: {},
USER: ['g1'],
GROUP: ['u1']
}
@@ -118,6 +120,7 @@ describe('PermissionSaver Service', function () {
PermissionInfo: {
permission_name: 'CLUSTER.ADMINISTRATOR'
},
+ ROLE: {},
USER: ['u0', 'u1'],
GROUP: ['g0', 'g1']
},
@@ -125,6 +128,7 @@ describe('PermissionSaver Service', function () {
PermissionInfo: {
permission_name: 'CLUSTER.OPERATOR'
},
+ ROLE: {},
USER: ['u0'],
GROUP: ['g2']
},
@@ -132,6 +136,7 @@ describe('PermissionSaver Service', function () {
PermissionInfo: {
permission_name: 'CLUSTER.USER'
},
+ ROLE: {},
USER: ['u2'],
GROUP: ['g0']
}
[10/15] ambari git commit: AMBARI-19367.Not able to save FS action
node after populating job xml value. (Venkata Sairam via gauravn7)
Posted by nc...@apache.org.
AMBARI-19367.Not able to save FS action node after populating job xml value. (Venkata Sairam via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e2b4715
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e2b4715
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e2b4715
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 5e2b471516ae60ff2a14d3ed2f4cad3a3408aec2
Parents: 2a2252c
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 15:01:24 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 15:03:07 2017 +0530
----------------------------------------------------------------------
contrib/views/wfmanager/.gitignore | 20 ++++++++++++++++++++
.../resources/ui/app/components/fs-action.js | 3 +++
2 files changed, 23 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e2b4715/contrib/views/wfmanager/.gitignore
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/.gitignore b/contrib/views/wfmanager/.gitignore
new file mode 100644
index 0000000..ae354e7
--- /dev/null
+++ b/contrib/views/wfmanager/.gitignore
@@ -0,0 +1,20 @@
+# Numerous always-ignore extensions
+*.swp
+*.bak
+*.log
+*.patch
+
+# OS or Editor folders
+.DS_Store
+
+# Installation and build tools
+src/main/resources/ui/node/
+src/main/resources/ui/node_modules/
+src/main/resources/ui/bower_components/
+_generators/
+
+# Output directory
+src/main/resources/ui/dist/
+
+# Brunch folder for temporary files.
+src/main/resources/ui/tmp/
http://git-wip-us.apache.org/repos/asf/ambari/blob/5e2b4715/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
index 6233b62..40ac43d 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
@@ -38,6 +38,9 @@ export default Ember.Component.extend(Validations, {
this.set("actionModel.configuration", {});
this.set("actionModel.configuration.property", Ember.A([]));
}
+ if(this.get('actionModel.jobXml') === undefined){
+ this.set("actionModel.jobXml", Ember.A([]));
+ }
var field = 'validations.attrs.actionModel.fsOps.isInvalid';
this.set(field, false);
this.sendAction('register', 'fsAction', this);
[04/15] ambari git commit: AMBARI-19306. User is not able to
validate/submit the workflow after browsing workflow path (Madhan Mohan Reddy
via pallavkul)
Posted by nc...@apache.org.
AMBARI-19306. User is not able to validate/submit the workflow after browsing workflow path (Madhan Mohan Reddy via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1c148894
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1c148894
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1c148894
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1c1488941c4e260585a29203b3963d46eb4da36d
Parents: 567ce62
Author: pallavkul <pa...@gmail.com>
Authored: Thu Jan 5 12:22:37 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Thu Jan 5 12:22:37 2017 +0530
----------------------------------------------------------------------
.../views/wfmanager/src/main/resources/ui/app/styles/app.less | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1c148894/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
index 4e8d82a..0468875 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
@@ -572,6 +572,12 @@ input:invalid {
position: relative;
}
+#configureJob .modal-body {
+ max-height: @defaultPropertiesEditorHeight;
+ overflow-y: scroll;
+ overflow-x: hidden;
+}
+
#action_properties_dialog .modal-dialog,
#workflow_sla_dialog .modal-dialog,
#global_properties_dialog .modal-dialog,
[12/15] ambari git commit: AMBARI-19380. Workflow Draft Save-Not
working. (Madhan Mohan Reddy via gauravn7)
Posted by nc...@apache.org.
AMBARI-19380. Workflow Draft Save-Not working. (Madhan Mohan Reddy via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/773d155c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/773d155c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/773d155c
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 773d155c86f65beaddfcc4950550555ad0ed9069
Parents: ae71336
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 17:01:37 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 17:02:50 2017 +0530
----------------------------------------------------------------------
.../ui/app/components/flow-designer.js | 41 +++++---------------
.../main/resources/ui/app/components/save-wf.js | 13 ++++---
.../app/templates/components/flow-designer.hbs | 8 ++--
3 files changed, 20 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/773d155c/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
index b02e021..3454374 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
@@ -465,7 +465,7 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
request.setRequestHeader("X-XSRF-HEADER", Math.round(Math.random()*100000));
request.setRequestHeader("X-Requested-By", "workflow-designer");
},
- data: self.persistWorkflowAsDraft(),
+ data: self.getWorkflowAsJson(),
success: function(response) {
//deferred.resolve(response);
}.bind(this),
@@ -511,9 +511,6 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
}
return detect(obj);
},
- persistWorkflowAsDraft(){
-
- },
getDraftWorkflowData(path){
var deferred = Ember.RSVP.defer();
//var path = encodeURIComponent("/user/ambari-qa/examples/demo/draft");
@@ -612,25 +609,23 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
scrollTop: scroll+200
}, 1000);
},
- openSaveWorkflow (isWfPathSet){
+ openSaveWorkflow() {
this.get('workflowContext').clearErrors();
var workflowGenerator=WorkflowGenerator.create({workflow:this.get("workflow"),
workflowContext:this.get('workflowContext')});
var workflowXml=workflowGenerator.process();
if(this.get('workflowContext').hasErrors()){
this.set('errors',this.get('workflowContext').getErrors());
- this.set("jobXmlJSONStr", this.persistWorkflowAsDraft());
+ this.set("jobXmlJSONStr", this.getWorkflowAsJson());
this.set("isDraft", true);
}else{
- this.set("jobXmlJSONStr", "");
+ this.set("jobXmlJSONStr", this.getWorkflowAsJson());
var dynamicProperties = this.get('propertyExtractor').getDynamicProperties(workflowXml);
var configForSubmit={props:dynamicProperties,xml:workflowXml,params:this.get('workflow.parameters')};
this.set("workflowSubmitConfigs",configForSubmit);
this.set("isDraft", false);
}
- if(isWfPathSet) {
- this.set("showingSaveWorkflow",true);
- }
+ this.set("showingSaveWorkflow",true);
},
openJobConfig (){
this.get('workflowContext').clearErrors();
@@ -866,26 +861,9 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
this.openJobConfig();
},
saveWorkflow(action){
- if(this.get("fileInfo").get("path") && action === "save"){
- this.openSaveWorkflow();
- var url = Ember.ENV.API_URL + "/saveWorkflow?app.path=" + this.get("fileInfo").get("path") + "&overwrite=" + this.get("fileInfo").get("overWritePath");
- var self = this, workflowData;
-
- if(this.get('isDraft')){
- url = Ember.ENV.API_URL + "/saveWorkflowDraft?app.path=" + this.get("fileInfo").get("path") + "&overwrite=" + this.get("fileInfo").get("overWritePath");;
- workflowData = this.get("jobXmlJSONStr");
- } else {
- url = Ember.ENV.API_URL + "/saveWorkflow?app.path=" + this.get("fileInfo").get("path") + "&overwrite=" + this.get("fileInfo").get("overWritePath");;
- workflowData = this.get("workflowSubmitConfigs").xml;
- }
-
- this.get("saveJobService").saveWorkflow(url, workflowData).promise.then(function(data){
- }.bind(this)).catch(function(data){
- self.set("errorMsg", "There is some problem while saving workflow.Please try again.");
- self.showingErrorMsgInDesigner(data);
- });
- } else {
- this.openSaveWorkflow(true);
+ this.openSaveWorkflow();
+ if(action === "saveDraft"){
+ this.set("isDraft", true);
}
this.set('dryrun', false);
},
@@ -942,9 +920,8 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
var draftData = JSON.parse(data);
if(draftData.draftExists && draftData.isDraftCurrent){
self.getDraftWorkflowData(path).promise.then(function(data){
- var drafWorkflowJson = self.get('workspaceManager').restoreWorkInProgress(data);
var workflowImporter=WorkflowJsonImporter.create({});
- var workflow=workflowImporter.importWorkflow(drafWorkflowJson);
+ var workflow=workflowImporter.importWorkflow(data);
self.resetDesigner();
self.set("workflow",workflow);
http://git-wip-us.apache.org/repos/asf/ambari/blob/773d155c/contrib/views/wfmanager/src/main/resources/ui/app/components/save-wf.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/save-wf.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/save-wf.js
index 8514cb0..d91c52a 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/save-wf.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/save-wf.js
@@ -78,15 +78,16 @@ export default Ember.Component.extend(Validations, {
}
},
saveJob(){
- var url, workflowData;
- if(this.get('isDraft')){
- url = Ember.ENV.API_URL + "/saveWorkflowDraft?app.path=" + this.get("filePath") + "&overwrite=" + this.get("overwritePath");
- workflowData = this.get("jobXmlJSONStr");
- } else {
+ var url = Ember.ENV.API_URL + "/saveWorkflowDraft?app.path=" + this.get("filePath") + "&overwrite=" + this.get("overwritePath");
+ var workflowData = this.get("jobXmlJSONStr");
+ this.saveWfJob(url, workflowData);
+ if(!this.get('isDraft')){
url = Ember.ENV.API_URL + "/saveWorkflow?app.path=" + this.get("filePath") + "&overwrite=" + this.get("overwritePath");
workflowData = this.get("jobXml");
+ this.saveWfJob(url, workflowData);
}
-
+ },
+ saveWfJob(url, workflowData) {
var self = this;
this.get("saveJobService").saveWorkflow(url, workflowData).promise.then(function(response){
self.showNotification({
http://git-wip-us.apache.org/repos/asf/ambari/blob/773d155c/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
index 6e1b054..42da448 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
@@ -48,12 +48,12 @@
<i class="fa fa-download marginright5"></i>Import from Local FS
{{/file-picker}}
</a>
- <!--a class="pointer" title="Save workflow" {{action "saveWorkflow" "save"}}>
+ <a class="pointer" title="Save workflow" {{action "saveWorkflow" "save"}}>
<i class="fa fa-floppy-o marginright5"></i>Save
</a>
- <a class="pointer" title="Save workflow" {{action "saveWorkflow" }}>
- <i class="fa fa-floppy-o marginright5"></i>Save As
- </a-->
+ <a class="pointer" title="Save as draft" {{action "saveWorkflow" "saveDraft"}}>
+ <i class="fa fa-floppy-o marginright5"></i>Save As Draft
+ </a>
</li>
<li>
<a class="pointer" data-toggle="modal" title="Save workflow to local file system" {{action "downloadWorkflowXml"}}>
[14/15] ambari git commit: AMBARI-19383 Configs changes after
adding/deleting host component: value shouldn't be changed if it differs in
host names order only. (ababiichuk)
Posted by nc...@apache.org.
AMBARI-19383 Configs changes after adding/deleting host component: value shouldn't be changed if it differs in host names order only. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1527bd15
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1527bd15
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1527bd15
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1527bd15c6226fbb8e690c64f68b593ac5088c2b
Parents: 6b198cc
Author: ababiichuk <ab...@hortonworks.com>
Authored: Thu Jan 5 13:57:21 2017 +0200
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Thu Jan 5 14:34:46 2017 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/host/details.js | 94 ++++++------
ambari-web/app/utils/config.js | 42 +++++-
.../configs/add_component_config_initializer.js | 5 +-
.../configs/hosts_based_initializer_mixin.js | 2 +-
.../test/controllers/main/host/details_test.js | 12 +-
ambari-web/test/utils/config_test.js | 147 ++++++++++++++++++-
6 files changed, 244 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 4a7cce4..7df2c4e 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -923,10 +923,10 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
fileName: fileName,
name: propertyName,
value: currentValue
- };
- var configProperty = initializer.initialValue(propertyDef, hostComponentsTopology, dependencies);
+ },
+ configProperty = initializer.initialValue(propertyDef, hostComponentsTopology, dependencies);
initializer.updateSiteObj(configs[fileName], configProperty);
- if (this.get('isReconfigureRequired') && currentValue !== propertyDef.value) {
+ if (this.get('isReconfigureRequired') && currentValue !== configs[fileName][propertyName]) {
var service = App.config.get('serviceByConfigTypeMap')[fileName];
propertiesToChange.pushObject({
propertyFileName: fileName,
@@ -1101,9 +1101,10 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
fileName: fileName,
name: propertyName,
value: currentValue
- };
- configs[fileName][propertyName] = Em.get(initializer.initialValue(propertyDef, localDB, dependencies), 'value');
- if (this.get('isReconfigureRequired') && propertyDef.value !== currentValue) {
+ },
+ configProperty = initializer.initialValue(propertyDef, localDB, dependencies);
+ initializer.updateSiteObj(configs[fileName], configProperty);
+ if (this.get('isReconfigureRequired') && currentValue !== configs[fileName][propertyName]) {
var service = App.config.get('serviceByConfigTypeMap')[fileName];
propertiesToChange.pushObject({
propertyFileName: fileName,
@@ -1286,50 +1287,55 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow
*/
onLoadRangerConfigs: function (data) {
var properties = [
- {
- type: 'core-site',
- name: 'hadoop.security.key.provider.path'
- },
- {
- type: 'hdfs-site',
- name: 'dfs.encryption.key.provider.uri'
- }
- ];
- var hostToInstall = this.get('rangerKMSServerHost');
- var rkmsHosts = this.getRangerKMSServerHosts();
- var rkmsPort = data.items.findProperty('type', 'kms-env').properties['kms_port'];
- var newValue = 'kms://http@' + rkmsHosts.join(';') + ':' + rkmsPort + '/kms';
- var coreSiteConfigs = data.items.findProperty('type', 'core-site');
- var hdfsSiteConfigs = data.items.findProperty('type', 'hdfs-site');
- var groups = [
- {
- properties: {
- 'core-site': coreSiteConfigs.properties,
- 'hdfs-site': hdfsSiteConfigs.properties
+ {
+ type: 'core-site',
+ name: 'hadoop.security.key.provider.path'
},
- properties_attributes: {
- 'core-site': coreSiteConfigs.properties_attributes,
- 'hdfs-site': hdfsSiteConfigs.properties_attributes
+ {
+ type: 'hdfs-site',
+ name: 'dfs.encryption.key.provider.uri'
}
- }
- ];
- var propertiesToChange = this.get('allPropertiesToChange');
+ ],
+ hostToInstall = this.get('rangerKMSServerHost'),
+ rkmsHosts = this.getRangerKMSServerHosts().join(';'),
+ rkmsPort = data.items.findProperty('type', 'kms-env').properties['kms_port'],
+ newValue = 'kms://http@' + rkmsHosts + ':' + rkmsPort + '/kms',
+ coreSiteConfigs = data.items.findProperty('type', 'core-site'),
+ hdfsSiteConfigs = data.items.findProperty('type', 'hdfs-site'),
+ groups = [
+ {
+ properties: {
+ 'core-site': coreSiteConfigs.properties,
+ 'hdfs-site': hdfsSiteConfigs.properties
+ },
+ properties_attributes: {
+ 'core-site': coreSiteConfigs.properties_attributes,
+ 'hdfs-site': hdfsSiteConfigs.properties_attributes
+ }
+ }
+ ],
+ propertiesToChange = this.get('allPropertiesToChange');
properties.forEach(function (property) {
var typeConfigs = data.items.findProperty('type', property.type).properties,
- currentValue = typeConfigs[property.name];
- if (this.get('isReconfigureRequired') && currentValue !== newValue) {
- var service = App.config.get('serviceByConfigTypeMap')[property.type];
- propertiesToChange.pushObject({
- propertyFileName: property.type,
- propertyName: property.name,
- serviceDisplayName: service && service.get('displayName'),
- initialValue: currentValue,
- recommendedValue: newValue,
- saveRecommended: true
- });
+ currentValue = typeConfigs[property.name],
+ pattern = new RegExp('^kms:\\/\\/http@(.+):' + rkmsPort + '\\/kms$'),
+ patternMatch = currentValue && currentValue.match(pattern),
+ currentHostsList = patternMatch && patternMatch[1].split(';').sort().join(';');
+ if (currentHostsList !== rkmsHosts) {
+ typeConfigs[property.name] = newValue;
+ if (this.get('isReconfigureRequired')) {
+ var service = App.config.get('serviceByConfigTypeMap')[property.type];
+ propertiesToChange.pushObject({
+ propertyFileName: property.type,
+ propertyName: property.name,
+ serviceDisplayName: service && service.get('displayName'),
+ initialValue: currentValue,
+ recommendedValue: newValue,
+ saveRecommended: true
+ });
+ }
}
- typeConfigs[property.name] = newValue;
}, this);
if (this.get('isReconfigureRequired')) {
this.setConfigsChanges(groups);
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index d0dbb69..8eeca5f 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -37,6 +37,17 @@ App.config = Em.Object.create({
preDefinedServiceConfigs: [],
/**
+ * Map for methods used to parse hosts lists from certain config properties
+ */
+ uniqueHostsListParsers: [
+ {
+ propertyName: 'templeton.hive.properties',
+ type: 'webhcat-site',
+ method: 'getTempletonHiveHosts'
+ }
+ ],
+
+ /**
*
* Returns file name version that stored on server.
*
@@ -1234,6 +1245,12 @@ App.config = Em.Object.create({
return false;
},
+ getTempletonHiveHosts: function (value) {
+ var pattern = /thrift:\/\/.+:\d+/,
+ patternMatch = value.match(pattern);
+ return patternMatch ? patternMatch[0].split('\\,') : value;
+ },
+
/**
* Update config property value based on its current value and list of zookeeper server hosts.
* Used to prevent sort order issues.
@@ -1251,14 +1268,31 @@ App.config = Em.Object.create({
*
* @method updateHostsListValue
* @param {Object} siteConfigs - prepared site config object to store
+ * @param {String} propertyType - type of the property to update
* @param {String} propertyName - name of the property to update
* @param {String} hostsList - list of ZooKeeper Server names to set as config property value
+ * @param {Boolean} isArray - determines whether value string is formatted as array
* @return {String} - result value
*/
- updateHostsListValue: function(siteConfigs, propertyName, hostsList) {
- var value = hostsList;
- var propertyHosts = (siteConfigs[propertyName] || '').split(',');
- var hostsToSet = hostsList.split(',');
+ updateHostsListValue: function(siteConfigs, propertyType, propertyName, hostsList, isArray) {
+ var value = hostsList,
+ propertyHosts = (siteConfigs[propertyName] || ''),
+ hostsToSet = hostsList,
+ parser = this.get('uniqueHostsListParsers').find(function (property) {
+ return property.type === propertyType && property.propertyName === propertyName;
+ });
+ if (parser) {
+ propertyHosts = this.get(parser.method)(propertyHosts);
+ hostsToSet = this.get(parser.method)(hostsToSet);
+ } else {
+ if (isArray) {
+ var pattern = /(^\[|]$)/g;
+ propertyHosts = propertyHosts.replace(pattern, '');
+ hostsToSet = hostsToSet.replace(pattern, '');
+ }
+ propertyHosts = propertyHosts.split(',');
+ hostsToSet = hostsToSet.split(',');
+ }
if (!Em.isEmpty(siteConfigs[propertyName])) {
var diffLength = propertyHosts.filter(function(hostName) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/app/utils/configs/add_component_config_initializer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/add_component_config_initializer.js b/ambari-web/app/utils/configs/add_component_config_initializer.js
index 7e3fedf..21fb6b4 100644
--- a/ambari-web/app/utils/configs/add_component_config_initializer.js
+++ b/ambari-web/app/utils/configs/add_component_config_initializer.js
@@ -146,7 +146,10 @@ App.AddComponentConfigInitializer = App.HaConfigInitializerClass.extend(App.Host
*/
updateSiteObj: function(siteConfigs, configProperty) {
if (!siteConfigs || !configProperty) return false;
- App.config.updateHostsListValue(siteConfigs, configProperty.name, configProperty.value);
+ var initializer = this.get('initializers')[configProperty.name],
+ isArray = !!(initializer && (initializer.type === 'json_stringified_value'
+ || Em.isArray(initializer) && initializer.someProperty('type', 'json_stringified_value')));
+ App.config.updateHostsListValue(siteConfigs, configProperty.fileName, configProperty.name, configProperty.value, isArray);
return true;
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/app/utils/configs/hosts_based_initializer_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/hosts_based_initializer_mixin.js b/ambari-web/app/utils/configs/hosts_based_initializer_mixin.js
index d0d2503..086ad4a 100644
--- a/ambari-web/app/utils/configs/hosts_based_initializer_mixin.js
+++ b/ambari-web/app/utils/configs/hosts_based_initializer_mixin.js
@@ -371,7 +371,7 @@ App.HostsBasedInitializerMixin = Em.Mixin.create({
component: component,
componentExists: componentExists,
modifier: {
- delmitier: Em.isNone(delimiter) ? ',' : delimiter
+ delimiter: Em.isNone(delimiter) ? ',' : delimiter
}
};
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index a4cb177..03dadc6 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -3247,7 +3247,7 @@ describe('App.MainHostDetailsController', function () {
'result': [
{
properties: {
- 'core-site': {'hadoop.security.key.provider.path': 'kms://http@host1;host2:port/kms'},
+ 'core-site': {'hadoop.security.key.provider.path': 'kms://http@host2;host1:port/kms'},
'hdfs-site': {'dfs.encryption.key.provider.uri': 'kms://http@host1;host2:port/kms'}
},
properties_attributes: {
@@ -3278,11 +3278,15 @@ describe('App.MainHostDetailsController', function () {
},
{
type: 'core-site',
- properties: {}
+ properties: {
+ 'hadoop.security.key.provider.path': 'kms://http@host2;host1:port/kms'
+ }
},
{
type: 'hdfs-site',
- properties: {}
+ properties: {
+ 'dfs.encryption.key.provider.uri': 'kms://http@host2:port/kms'
+ }
}
]
};
@@ -3290,7 +3294,7 @@ describe('App.MainHostDetailsController', function () {
beforeEach(function () {
controller.set('rangerKMSServerHost', item.hostToInstall);
sinon.stub(controller, 'getRangerKMSServerHosts').returns(item.kmsHosts);
- controller.onLoadRangerConfigs(data, null, {});
+ controller.onLoadRangerConfigs(data);
});
it('saveConfigsBatch is called with valid arguments', function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/1527bd15/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index 8c450ed..7c2515a 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -1060,6 +1060,7 @@ describe('App.config', function() {
'hadoop.registry.zk.quorum': 'host1,host2'
},
propertyName: 'hadoop.registry.zk.quorum',
+ propertyType: 'yarn-site',
hostsList: 'host1',
e: 'host1'
},
@@ -1068,6 +1069,7 @@ describe('App.config', function() {
'hadoop.registry.zk.quorum': 'host1:10,host2:10'
},
propertyName: 'hadoop.registry.zk.quorum',
+ propertyType: 'yarn-site',
hostsList: 'host2:10,host1:10',
e: 'host1:10,host2:10'
},
@@ -1076,6 +1078,7 @@ describe('App.config', function() {
'hadoop.registry.zk.quorum': 'host1:10,host2:10,host3:10'
},
propertyName: 'hadoop.registry.zk.quorum',
+ propertyType: 'yarn-site',
hostsList: 'host2:10,host1:10',
e: 'host2:10,host1:10'
},
@@ -1084,6 +1087,7 @@ describe('App.config', function() {
'hadoop.registry.zk.quorum': 'host1:10,host2:10,host3:10'
},
propertyName: 'hadoop.registry.zk.quorum',
+ propertyType: 'yarn-site',
hostsList: 'host2:10,host1:10,host3:10,host4:11',
e: 'host2:10,host1:10,host3:10,host4:11'
},
@@ -1092,15 +1096,114 @@ describe('App.config', function() {
'hive.zookeeper.quorum': 'host1'
},
propertyName: 'some.new.property',
+ propertyType: 'hive-site',
hostsList: 'host2,host1:10',
e: 'host2,host1:10'
+ },
+ {
+ siteConfigs: {
+ 'some.new.property': '[\'host1\',\'host2\']'
+ },
+ propertyName: 'some.new.property',
+ propertyType: 'property-type',
+ hostsList: '[\'host1\',\'host2\']',
+ isArray: true,
+ e: '[\'host1\',\'host2\']',
+ message: 'array-formatted property value with no changes'
+ },
+ {
+ siteConfigs: {
+ 'some.new.property': '[\'host2\',\'host1\']'
+ },
+ propertyName: 'some.new.property',
+ propertyType: 'property-type',
+ hostsList: '[\'host1\',\'host2\']',
+ isArray: true,
+ e: '[\'host2\',\'host1\']',
+ message: 'array-formatted property value with different hosts order'
+ },
+ {
+ siteConfigs: {
+ 'some.new.property': '[\'host1\',\'host2\']'
+ },
+ propertyName: 'some.new.property',
+ propertyType: 'property-type',
+ hostsList: '[\'host3\',\'host4\']',
+ isArray: true,
+ e: '[\'host3\',\'host4\']',
+ message: 'array-formatted property value with changes'
+ },
+ {
+ siteConfigs: {
+ 'templeton.hive.properties': 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true'
+ },
+ propertyName: 'templeton.hive.properties',
+ propertyType: 'webhcat-site',
+ hostsList: 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ e: 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ message: 'templeton.hive.properties, no changes'
+ },
+ {
+ siteConfigs: {
+ 'templeton.hive.properties': 'hive.metastore.local=false,hive.metastore.uris=thrift://host2:9083\\,thrift://host1:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true'
+ },
+ propertyName: 'templeton.hive.properties',
+ propertyType: 'webhcat-site',
+ hostsList: 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ e: 'hive.metastore.local=false,hive.metastore.uris=thrift://host2:9083\\,thrift://host1:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ message: 'templeton.hive.properties, different hosts order'
+ },
+ {
+ siteConfigs: {
+ 'templeton.hive.properties': 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9082\\,thrift://host2:9082,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true'
+ },
+ propertyName: 'templeton.hive.properties',
+ propertyType: 'webhcat-site',
+ hostsList: 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ e: 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ message: 'templeton.hive.properties, different ports'
+ },
+ {
+ siteConfigs: {
+ 'templeton.hive.properties': 'hive.metastore.local=false,hive.metastore.uris=thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true'
+ },
+ propertyName: 'templeton.hive.properties',
+ propertyType: 'webhcat-site',
+ hostsList: 'hive.metastore.local=false,hive.metastore.uris=thrift://host3:9083\\,thrift://host4:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ e: 'hive.metastore.local=false,hive.metastore.uris=thrift://host3:9083\\,thrift://host4:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ message: 'templeton.hive.properties, different hosts'
+ },
+ {
+ siteConfigs: {
+ 'templeton.hive.properties': 'hive.metastore.local=false'
+ },
+ propertyName: 'templeton.hive.properties',
+ propertyType: 'hive-site',
+ hostsList: 'hive.metastore.local=true',
+ e: 'hive.metastore.local=true',
+ message: 'custom templeton.hive.properties'
}
];
+
tests.forEach(function(test) {
- it('ZK located on {0}, current prop value is "{1}" "{2}" value should be "{3}"'.format(test.hostsList, ''+test.siteConfigs[test.propertyName], test.propertyName, test.e), function() {
- var result = App.config.updateHostsListValue(test.siteConfigs, test.propertyName, test.hostsList);
- expect(result).to.be.eql(test.e);
- expect(test.siteConfigs[test.propertyName]).to.be.eql(test.e);
+ var message = test.message
+ || 'ZK located on {0}, current prop value is "{1}" "{2}" value should be "{3}"'
+ .format(test.hostsList, ''+test.siteConfigs[test.propertyName], test.propertyName, test.e);
+
+ describe(message, function () {
+ var result;
+
+ beforeEach(function () {
+ result = App.config.updateHostsListValue(test.siteConfigs, test.propertyType, test.propertyName, test.hostsList, test.isArray);
+ });
+
+ it('returned value', function() {
+ expect(result).to.be.eql(test.e);
+ });
+
+ it('value in configs object', function() {
+ expect(test.siteConfigs[test.propertyName]).to.be.eql(test.e);
+ });
});
});
});
@@ -1312,6 +1415,42 @@ describe('App.config', function() {
});
});
+ describe('#getTempletonHiveHosts', function () {
+ var testCases = [
+ {
+ value: 'hive.metastore.local=false,hive.metastore.uris=thrift://host0:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ result: ['thrift://host0:9083'],
+ message: 'one host'
+ },
+ {
+ value: 'hive.metastore.local=false,hive.metastore.uris=thrift://host0:9083\\,thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ result: ['thrift://host0:9083', 'thrift://host1:9083', 'thrift://host2:9083'],
+ message: 'several hosts'
+ },
+ {
+ value: 'thrift://host0:9083\\,thrift://host1:9083\\,thrift://host2:9083,hive.metastore.sasl.enabled=false,hive.metastore.execute.setugi=true',
+ result: ['thrift://host0:9083', 'thrift://host1:9083', 'thrift://host2:9083'],
+ message: 'no leading text'
+ },
+ {
+ value: 'hive.metastore.local=false,hive.metastore.uris=thrift://host0:9083\\,thrift://host1:9083\\,thrift://host2:9083',
+ result: ['thrift://host0:9083', 'thrift://host1:9083', 'thrift://host2:9083'],
+ message: 'no trailing text'
+ },
+ {
+ value: 'hive.metastore.local=false',
+ result: 'hive.metastore.local=false',
+ message: 'no hosts list'
+ }
+ ];
+
+ testCases.forEach(function (test) {
+ it(test.message, function () {
+ expect(App.config.getTempletonHiveHosts(test.value)).to.eql(test.result);
+ });
+ });
+ });
+
describe('#isDirHeterogeneous', function () {
it ('retruns true for dfs.datanode.data.dir', function () {
expect(App.config.isDirHeterogeneous('dfs.datanode.data.dir')).to.be.true;
[06/15] ambari git commit: AMBARI-19371 Migration report is not
visible on Hue To Ambari Migration View. (Ishan Bhatt via gauravn7)
Posted by nc...@apache.org.
AMBARI-19371 Migration report is not visible on Hue To Ambari Migration View. (Ishan Bhatt via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b3f0398
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b3f0398
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b3f0398
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 1b3f039811c31cac667f6521c87644efbe99099b
Parents: 0777ae5
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 14:22:45 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 14:22:45 2017 +0530
----------------------------------------------------------------------
.../resources/scripts/models/MigrationResponse.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1b3f0398/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/resources/scripts/models/MigrationResponse.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/resources/scripts/models/MigrationResponse.java b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/resources/scripts/models/MigrationResponse.java
index 8e7a7ad..3581149 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/resources/scripts/models/MigrationResponse.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/resources/scripts/models/MigrationResponse.java
@@ -39,7 +39,7 @@ public class MigrationResponse implements Serializable,PersonalResource{
private String intanceName="";
private String userNameofhue="";
private int totalNoQuery;
- private int ProgressPercentage;
+ private int progressPercentage;
private String owner = "";
private String totalTimeTaken="";
private String jobtype="";
@@ -126,11 +126,11 @@ public class MigrationResponse implements Serializable,PersonalResource{
public int getProgressPercentage() {
- return ProgressPercentage;
+ return progressPercentage;
}
public void setProgressPercentage(int progressPercentage) {
- ProgressPercentage = progressPercentage;
+ this.progressPercentage = progressPercentage;
}
public String getOwner() {
[08/15] ambari git commit: AMBARI-19367.Not able to save FS action
node after populating job xml value. (Venkata Sairam via gauravn7)
Posted by nc...@apache.org.
AMBARI-19367.Not able to save FS action node after populating job xml value. (Venkata Sairam via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/176c3b0f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/176c3b0f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/176c3b0f
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 176c3b0f1abf4368ba9d35cb83ab09160b642944
Parents: 25a5967
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 14:46:29 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 14:48:00 2017 +0530
----------------------------------------------------------------------
AMBARI-19367_branch-2.5.patch | 55 ++++++++++++++++++++
contrib/views/wfmanager/.gitignore | 20 +++++++
.../resources/ui/app/components/fs-action.js | 3 ++
3 files changed, 78 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/176c3b0f/AMBARI-19367_branch-2.5.patch
----------------------------------------------------------------------
diff --git a/AMBARI-19367_branch-2.5.patch b/AMBARI-19367_branch-2.5.patch
new file mode 100644
index 0000000..f8c5cb1
--- /dev/null
+++ b/AMBARI-19367_branch-2.5.patch
@@ -0,0 +1,55 @@
+From 286890d1e4db29ebe1c43dd26034ca242de4cdef Mon Sep 17 00:00:00 2001
+From: Venkata Sairam <ve...@gmail.com>
+Date: Thu, 5 Jan 2017 12:30:04 +0530
+Subject: [PATCH] AMBARI-19367.Not able to save FS action node after populating
+ job xml value(venkatasairam.lanka)
+
+---
+ contrib/views/wfmanager/.gitignore | 20 ++++++++++++++++++++
+ .../main/resources/ui/app/components/fs-action.js | 3 +++
+ 2 files changed, 23 insertions(+)
+ create mode 100644 contrib/views/wfmanager/.gitignore
+
+diff --git a/contrib/views/wfmanager/.gitignore b/contrib/views/wfmanager/.gitignore
+new file mode 100644
+index 0000000..ae354e7
+--- /dev/null
++++ b/contrib/views/wfmanager/.gitignore
+@@ -0,0 +1,20 @@
++# Numerous always-ignore extensions
++*.swp
++*.bak
++*.log
++*.patch
++
++# OS or Editor folders
++.DS_Store
++
++# Installation and build tools
++src/main/resources/ui/node/
++src/main/resources/ui/node_modules/
++src/main/resources/ui/bower_components/
++_generators/
++
++# Output directory
++src/main/resources/ui/dist/
++
++# Brunch folder for temporary files.
++src/main/resources/ui/tmp/
+diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
+index 6233b62..40ac43d 100644
+--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
++++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
+@@ -38,6 +38,9 @@ export default Ember.Component.extend(Validations, {
+ this.set("actionModel.configuration", {});
+ this.set("actionModel.configuration.property", Ember.A([]));
+ }
++ if(this.get('actionModel.jobXml') === undefined){
++ this.set("actionModel.jobXml", Ember.A([]));
++ }
+ var field = 'validations.attrs.actionModel.fsOps.isInvalid';
+ this.set(field, false);
+ this.sendAction('register', 'fsAction', this);
+--
+2.7.4 (Apple Git-66)
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/176c3b0f/contrib/views/wfmanager/.gitignore
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/.gitignore b/contrib/views/wfmanager/.gitignore
new file mode 100644
index 0000000..ae354e7
--- /dev/null
+++ b/contrib/views/wfmanager/.gitignore
@@ -0,0 +1,20 @@
+# Numerous always-ignore extensions
+*.swp
+*.bak
+*.log
+*.patch
+
+# OS or Editor folders
+.DS_Store
+
+# Installation and build tools
+src/main/resources/ui/node/
+src/main/resources/ui/node_modules/
+src/main/resources/ui/bower_components/
+_generators/
+
+# Output directory
+src/main/resources/ui/dist/
+
+# Brunch folder for temporary files.
+src/main/resources/ui/tmp/
http://git-wip-us.apache.org/repos/asf/ambari/blob/176c3b0f/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
index 6233b62..40ac43d 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
@@ -38,6 +38,9 @@ export default Ember.Component.extend(Validations, {
this.set("actionModel.configuration", {});
this.set("actionModel.configuration.property", Ember.A([]));
}
+ if(this.get('actionModel.jobXml') === undefined){
+ this.set("actionModel.jobXml", Ember.A([]));
+ }
var field = 'validations.attrs.actionModel.fsOps.isInvalid';
this.set(field, false);
this.sendAction('register', 'fsAction', this);
[11/15] ambari git commit: AMBARI-19359.UI elements misalignment in
dashboard screen of WFD. (Venkata Sairam via gauravn7)
Posted by nc...@apache.org.
AMBARI-19359.UI elements misalignment in dashboard screen of WFD. (Venkata Sairam via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae713367
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae713367
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae713367
Branch: refs/heads/branch-dev-patch-upgrade
Commit: ae7133674f5cdeefa55b4a938a227bec662170a8
Parents: 5e2b471
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 15:06:52 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 15:06:52 2017 +0530
----------------------------------------------------------------------
contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ae713367/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
index 0468875..a5b0b4a 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/styles/app.less
@@ -1583,3 +1583,6 @@ input:invalid {
border-top-right-radius: 0px;
border-top: 0px;
}
+#search-table td:first-child {
+ width:5%;
+}
\ No newline at end of file
[13/15] ambari git commit: AMBARI-19363. Log Search: external
authentication roles are hard coded (oleewere)
Posted by nc...@apache.org.
AMBARI-19363. Log Search: external authentication roles are hard coded (oleewere)
Change-Id: Ic3d67d22f4a82e09ed940160e1fa1099937ca049
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b198cc7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b198cc7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b198cc7
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 6b198cc71ffd5b1ee5332ee036eb1272ee767c8b
Parents: 773d155
Author: oleewere <ol...@gmail.com>
Authored: Wed Jan 4 20:24:29 2017 +0100
Committer: oleewere <ol...@gmail.com>
Committed: Thu Jan 5 13:14:38 2017 +0100
----------------------------------------------------------------------
.../configuration/logsearch-properties.xml | 7 +++++++
.../LOGSEARCH/0.5.0/package/scripts/params.py | 1 -
.../stacks/2.4/LOGSEARCH/test_logsearch.py | 2 +-
.../test/python/stacks/2.4/configs/default.json | 3 ++-
.../configs/services/logsearch_properties.js | 21 +++++++++++++-------
5 files changed, 24 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6b198cc7/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
index 8fc71d5..47872ee 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
@@ -174,6 +174,13 @@
<on-ambari-upgrade add="true"/>
</property>
<property>
+ <name>logsearch.roles.allowed</name>
+ <value>AMBARI.ADMINISTRATOR,CLUSTER.ADMINISTRATOR</value>
+ <display-name>Roles allowed</display-name>
+ <description>Comma separated roles for external authentication</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
<name>logsearch.auth.jwt.enabled</name>
<value>false</value>
<display-name>JWT authentication enabled</display-name>
http://git-wip-us.apache.org/repos/asf/ambari/blob/6b198cc7/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
index 811b3ea..5ffd5e6 100644
--- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
@@ -218,7 +218,6 @@ logsearch_properties['logsearch.login.credentials.file'] = logsearch_admin_crede
logsearch_properties['logsearch.auth.file.enabled'] = 'true'
logsearch_properties['logsearch.auth.ldap.enabled'] = 'false'
logsearch_properties['logsearch.auth.simple.enabled'] = 'false'
-logsearch_properties['logsearch.roles.allowed'] = 'AMBARI.ADMINISTRATOR'
logsearch_properties['logsearch.protocol'] = logsearch_ui_protocol
http://git-wip-us.apache.org/repos/asf/ambari/blob/6b198cc7/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
index 00dd641..33ac715 100644
--- a/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
+++ b/ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py
@@ -105,7 +105,7 @@ class TestLogSearch(RMFTestCase):
'logsearch.collection.service.logs.replication.factor': '1',
'logsearch.login.credentials.file': 'logsearch-admin.json',
'logsearch.protocol': 'http',
- 'logsearch.roles.allowed': 'AMBARI.ADMINISTRATOR',
+ 'logsearch.roles.allowed': 'AMBARI.ADMINISTRATOR,CLUSTER.ADMINISTRATOR',
'logsearch.service.logs.split.interval.mins': '1',
'logsearch.solr.audit.logs.zk_connect_string': 'c6401.ambari.apache.org:2181/infra-solr',
'logsearch.solr.collection.audit.logs': 'audit_logs',
http://git-wip-us.apache.org/repos/asf/ambari/blob/6b198cc7/ambari-server/src/test/python/stacks/2.4/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.4/configs/default.json b/ambari-server/src/test/python/stacks/2.4/configs/default.json
index a601f0b..30e12e9 100644
--- a/ambari-server/src/test/python/stacks/2.4/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.4/configs/default.json
@@ -302,7 +302,8 @@
"logsearch.solr.metrics.collector.hosts" : "{metrics_collector_hosts}",
"logsearch.auth.external_auth.enabled" : "false",
"logsearch.auth.external_auth.host_url" : "{ambari_server_auth_host_url}",
- "logsearch.auth.external_auth.login_url" : "/api/v1/users/$USERNAME/privileges?fields=*"
+ "logsearch.auth.external_auth.login_url" : "/api/v1/users/$USERNAME/privileges?fields=*",
+ "logsearch.roles.allowed": "AMBARI.ADMINISTRATOR,CLUSTER.ADMINISTRATOR"
},
"logfeeder-properties": {
"logfeeder.checkpoint.folder" : "/etc/ambari-logsearch-logfeeder/conf/checkpoints",
http://git-wip-us.apache.org/repos/asf/ambari/blob/6b198cc7/ambari-web/app/data/configs/services/logsearch_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/configs/services/logsearch_properties.js b/ambari-web/app/data/configs/services/logsearch_properties.js
index 94588ef..f003d04 100644
--- a/ambari-web/app/data/configs/services/logsearch_properties.js
+++ b/ambari-web/app/data/configs/services/logsearch_properties.js
@@ -431,52 +431,59 @@ module.exports = [
"serviceName": "LOGSEARCH"
},
{
- "name": "logsearch.auth.jwt.audiances",
+ "name": "logsearch.roles.allowed",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 12
},
{
- "name": "logsearch.auth.jwt.cookie.name",
+ "name": "logsearch.auth.jwt.audiances",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 13
},
{
- "name": "logsearch.auth.jwt.query.param.original_url",
+ "name": "logsearch.auth.jwt.cookie.name",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 14
},
{
- "name": "logsearch.spnego.kerberos.enabled",
+ "name": "logsearch.auth.jwt.query.param.original_url",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 15
},
{
- "name": "logsearch.spnego.kerberos.keytab",
+ "name": "logsearch.spnego.kerberos.enabled",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 16
},
{
- "name": "logsearch.spnego.kerberos.principal",
+ "name": "logsearch.spnego.kerberos.keytab",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 17
},
{
- "name": "logsearch.spnego.kerberos.host",
+ "name": "logsearch.spnego.kerberos.principal",
"serviceName": "LOGSEARCH",
"filename": "logsearch-properties.xml",
"category": "Advanced logsearch-properties",
"index": 18
+ },
+ {
+ "name": "logsearch.spnego.kerberos.host",
+ "serviceName": "LOGSEARCH",
+ "filename": "logsearch-properties.xml",
+ "category": "Advanced logsearch-properties",
+ "index": 19
}
];
[07/15] ambari git commit: AMBARI-19316 Zeppelin stop failed during
EU while deleting pid file with customized service user (r-kamath)
Posted by nc...@apache.org.
AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with customized service user (r-kamath)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/25a59676
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25a59676
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25a59676
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 25a596769c7c420dc28e3a7178bf7f02dca5880f
Parents: 1b3f039
Author: Renjith Kamath <re...@gmail.com>
Authored: Thu Jan 5 14:30:21 2017 +0530
Committer: Renjith Kamath <re...@gmail.com>
Committed: Thu Jan 5 14:31:28 2017 +0530
----------------------------------------------------------------------
.../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/25a59676/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 04089ce..d3d494d 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -104,12 +104,19 @@ class Master(Script):
mode=0755
)
+ def chown_zeppelin_pid_dir(self, env):
+ import params
+ env.set_params(params)
+ Execute(("chown", "-R", format("{zeppelin_user}") + ":" + format("{zeppelin_group}"), params.zeppelin_pid_dir),
+ sudo=True)
+
def configure(self, env):
import params
import status_params
env.set_params(params)
env.set_params(status_params)
self.create_zeppelin_log_dir(env)
+ self.chown_zeppelin_pid_dir(env)
# create the pid and zeppelin dirs
Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
@@ -154,6 +161,7 @@ class Master(Script):
def stop(self, env, upgrade_type=None):
import params
self.create_zeppelin_log_dir(env)
+ self.chown_zeppelin_pid_dir(env)
Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + params.zeppelin_log_file,
user=params.zeppelin_user)
[02/15] ambari git commit: AMBARI-19352. Designer should always pick
latest version for an action node (Padma Priya via pallavkul)
Posted by nc...@apache.org.
AMBARI-19352. Designer should always pick latest version for an action node (Padma Priya via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dcffaeda
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dcffaeda
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dcffaeda
Branch: refs/heads/branch-dev-patch-upgrade
Commit: dcffaeda04ff0348bcb1927f4e1de6a045ddf93a
Parents: 7a7bc00
Author: pallavkul <pa...@gmail.com>
Authored: Thu Jan 5 12:08:08 2017 +0530
Committer: pallavkul <pa...@gmail.com>
Committed: Thu Jan 5 12:08:08 2017 +0530
----------------------------------------------------------------------
.../ui/app/components/bundle-config.js | 11 +-
.../app/components/bundle-version-settings.js | 12 +-
.../resources/ui/app/components/coord-config.js | 12 +-
.../ui/app/components/coord-version-settings.js | 12 +-
.../ui/app/components/flow-designer.js | 5 +-
.../ui/app/components/version-settings.js | 28 +--
.../ui/app/domain/actionjob_hanlder.js | 2 +-
.../ui/app/domain/bundle/bundle-xml-importer.js | 18 +-
.../coordinator/coordinator-xml-importer.js | 17 +-
.../resources/ui/app/domain/schema-versions.js | 208 ++++++++-----------
.../ui/app/domain/workflow-importer.js | 27 ++-
.../ui/app/domain/workflow-json-importer.js | 2 +
.../ui/app/domain/workflow-xml-generator.js | 2 +-
.../main/resources/ui/app/domain/workflow.js | 12 +-
.../src/main/resources/ui/app/routes/design.js | 42 ++++
.../app/templates/components/bundle-config.hbs | 2 +-
.../components/bundle-version-settings.hbs | 4 +-
.../app/templates/components/coord-config.hbs | 2 +-
.../components/coord-version-settings.hbs | 4 +-
.../templates/components/designer-errors.hbs | 2 +-
.../app/templates/components/flow-designer.hbs | 2 +-
.../templates/components/version-settings.hbs | 4 +-
.../main/resources/ui/app/templates/design.hbs | 3 +-
23 files changed, 235 insertions(+), 198 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
index 4ef0ac3..122b956 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js
@@ -111,7 +111,9 @@ export default Ember.Component.extend(Ember.Evented, Validations, {
type : 'date'
},
coordinators : null,
- schemaVersions : this.get("schemaVersions")
+ schemaVersions : {
+ bundleVersion : this.get('schemaVersions').getDefaultVersion('bundle')
+ }
});
},
importSampleBundle (){
@@ -136,9 +138,10 @@ export default Ember.Component.extend(Ember.Evented, Validations, {
deferred.promise.then(function(data){
this.getBundleFromXml(data);
this.set("isImporting", false);
- }.bind(this)).catch(function(){
+ }.bind(this)).catch(function(e){
this.set("isImporting", false);
this.set("isImportingSuccess", false);
+ throw new Error(e);
}.bind(this));
},
getFromHdfs(filePath){
@@ -161,8 +164,8 @@ export default Ember.Component.extend(Ember.Evented, Validations, {
return deferred;
},
getBundleFromXml(bundleXml){
- var bundleXmlImporter = BundleXmlImporter.create({schemaVersions: this.get("schemaVersions")});
- var bundleObj = bundleXmlImporter.importBundle(bundleXml, this.get("errors"));
+ var bundleXmlImporter = BundleXmlImporter.create();
+ var bundleObj = bundleXmlImporter.importBundle(bundleXml);
this.set("bundle", bundleObj.bundle);
this.get("errors").clear();
this.get("errors").pushObjects(bundleObj.errors);
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js
index 3bd6653..7067cb9 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-version-settings.js
@@ -17,16 +17,14 @@
import Ember from 'ember';
import Constants from '../utils/constants';
+import SchemaVersions from '../domain/schema-versions';
export default Ember.Component.extend({
+ schemaVersions : SchemaVersions.create({}),
initialize : function(){
- this.set('currentBundleVersion', this.get('schemaVersions').getCurrentBundleVersion());
- this.set('bundleSchemaVersions', this.get('schemaVersions').getBundleVersions());
- this.get('schemaVersions').createCopy();
+ this.set('bundleSchemaVersions', this.get('schemaVersions').getSupportedVersions('bundle'));
+ this.set('selectedBundleVersion', this.get('bundle').schemaVersions.bundleVersion);
}.on('init'),
- BundleVersionObserver : Ember.observer('currentBundleVersion',function(){
- this.get('schemaVersions').setCurrentBundleVersion(this.get('currentBundleVersion'));
- }),
rendered : function(){
this.$('#version-settings-dialog').modal({
backdrop: 'static',
@@ -39,10 +37,10 @@ export default Ember.Component.extend({
}.on('didInsertElement'),
actions : {
save (){
+ this.get('bundle').schemaVersions.bundleVersion = this.get('selectedBundleVersion');
this.$('#version-settings-dialog').modal('hide');
},
cancel (){
- this.get('schemaVersions').rollBack();
this.$('#version-settings-dialog').modal('hide');
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
index 1d7f435..904901c 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-config.js
@@ -208,7 +208,9 @@ export default Ember.Component.extend(Validations, Ember.Evented, {
},
controls : Ember.A([]),
slainfo : SlaInfo.create({}),
- schemaVersions : this.get("schemaVersions")
+ schemaVersions : {
+ coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator')
+ }
});
},
importSampleCoordinator (){
@@ -219,8 +221,8 @@ export default Ember.Component.extend(Validations, Ember.Evented, {
dataType: "text",
cache:false,
success: function(data) {
- var coordinatorXmlImporter = CoordinatorXmlImporter.create({schemaVersions: self.schemaVersions});
- var coordinator = coordinatorXmlImporter.importCoordinator(data, self.errors);
+ var coordinatorXmlImporter = CoordinatorXmlImporter.create({});
+ var coordinator = coordinatorXmlImporter.importCoordinator(data);
deferred.resolve(coordinator);
}.bind(this),
failure : function(data){
@@ -276,8 +278,8 @@ export default Ember.Component.extend(Validations, Ember.Evented, {
return deferred;
},
getCoordinatorFromXml(coordinatorXml){
- var coordinatorXmlImporter = CoordinatorXmlImporter.create({schemaVersions: this.get("schemaVersions")});
- var coordinatorObj = coordinatorXmlImporter.importCoordinator(coordinatorXml, this.errors);
+ var coordinatorXmlImporter = CoordinatorXmlImporter.create({});
+ var coordinatorObj = coordinatorXmlImporter.importCoordinator(coordinatorXml);
var coordinator = coordinatorObj.coordinator;
this.set("coordinator", coordinator);
this.get("errors").clear();
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js
index 6385a44..ebb1b0b 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/coord-version-settings.js
@@ -17,16 +17,14 @@
import Ember from 'ember';
import Constants from '../utils/constants';
+import SchemaVersions from '../domain/schema-versions';
export default Ember.Component.extend({
+ schemaVersions : SchemaVersions.create({}),
initialize : function(){
- this.set('currentCoordinatorVersion', this.get('schemaVersions').getCurrentCoordinatorVersion());
- this.set('coordinatorSchemaVersions', this.get('schemaVersions').getCoordinatorVersions());
- this.get('schemaVersions').createCopy();
+ this.set('coordinatorSchemaVersions', this.get('schemaVersions').getSupportedVersions('coordinator'));
+ this.set('selectedCoordinatorVersion', this.get('coordinator').schemaVersions.coordinatorVersion);
}.on('init'),
- CoordinatorVersionObserver : Ember.observer('currentCoordinatorVersion',function(){
- this.get('schemaVersions').setCurrentCoordinatorVersion(this.get('currentCoordinatorVersion'));
- }),
rendered : function(){
this.$('#version-settings-dialog').modal({
backdrop: 'static',
@@ -39,10 +37,10 @@ export default Ember.Component.extend({
}.on('didInsertElement'),
actions : {
save (){
+ this.get('coordinator').schemaVersions.coordinatorVersion = this.get('selectedCoordinatorVersion');
this.$('#version-settings-dialog').modal('hide');
},
cancel (){
- this.get('schemaVersions').rollBack();
this.$('#version-settings-dialog').modal('hide');
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
index c6264ba..b02e021 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
@@ -481,8 +481,11 @@ export default Ember.Component.extend(FindNodeMixin, Validations, {
getWorkflowAsJson(){
try{
var json=JSON.stringify(this.get("workflow")), self = this;
+ var actionVersions = JSON.stringify([...this.get("workflow").schemaVersions.actionVersions]);
+ var workflow = JSON.parse(json);
+ workflow.schemaVersions.actionVersions = actionVersions
//this.get('workspaceManager').saveWorkInProgress(this.get('tabInfo.id'), json);
- return json;
+ return JSON.stringify(workflow);
}catch(err){
console.error(err);
this.isCyclic(this.get("workflow"));
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js
index 9103314..966313f 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/version-settings.js
@@ -17,25 +17,23 @@
import Ember from 'ember';
import Constants from '../utils/constants';
+import SchemaVersions from '../domain/schema-versions';
export default Ember.Component.extend({
+ schemaVersions : SchemaVersions.create({}),
initialize : function(){
- this.set('currentWorkflowVersion', this.get('schemaVersions').getCurrentWorkflowVersion());
- this.set('workflowSchemaVersions', this.get('schemaVersions').getWorkflowVersions());
- this.get('schemaVersions').createCopy();
- this.set('actionSchemaVersions', Constants.actions);
+ this.set('workflowSchemaVersions', this.get('schemaVersions').getSupportedVersions('workflow'));
+ this.set('selectedWorkflowVersion', this.get('workflow').schemaVersions.workflowVersion);
var actionVersions = Ember.A([]);
- Object.keys(this.get('actionSchemaVersions')).forEach((key)=>{
- var action = this.get('actionSchemaVersions')[key];
+ Object.keys(Constants.actions).forEach((key)=>{
+ var action = Constants.actions[key];
if(action.supportsSchema){
- actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getActionVersions(action.name),selectedVersion:this.get('schemaVersions').getActionVersion(action.name)});
+ actionVersions.push({name:action.name, supporedVersions :this.get('schemaVersions').getSupportedVersions(action.name),
+ selectedVersion: this.get('workflow').schemaVersions.actionVersions.get(action.name)});
}
});
this.set('actionVersions',actionVersions);
}.on('init'),
- WorkflowVersionObserver : Ember.observer('currentWorkflowVersion',function(){
- this.get('schemaVersions').setCurrentWorkflowVersion(this.get('currentWorkflowVersion'));
- }),
rendered : function(){
this.$('#version-settings-dialog').modal({
backdrop: 'static',
@@ -48,13 +46,19 @@ export default Ember.Component.extend({
}.on('didInsertElement'),
actions : {
versionChanged : function(actionName, version){
- this.get('schemaVersions').setActionVersion(actionName, version);
+ var action = this.get('actionVersions').findBy('name', actionName);
+ Ember.set(action, 'selectedVersion', version);
},
save (){
+ var actionVersions = new Map();
+ this.get('actionVersions').forEach(versionSetting =>{
+ actionVersions.set(versionSetting.name, versionSetting.selectedVersion);
+ });
+ this.get('workflow').schemaVersions.workflowVersion = this.get('selectedWorkflowVersion');
+ this.get('workflow').schemaVersions.actionVersions = actionVersions;
this.$('#version-settings-dialog').modal('hide');
},
cancel (){
- this.get('schemaVersions').rollBack();
this.$('#version-settings-dialog').modal('hide');
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
index b0453e2..99d96ac 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
@@ -33,7 +33,7 @@ var ActionJobHandler=Ember.Object.extend(MappingMixin,{
var actionObj={};
nodeObj[this.get("actionType")]=actionObj;
if (this.get("nameSpace")){
- var schemaVersion=this.schemaVersions.getActionVersion(this.get("actionType"));
+ var schemaVersion=this.schemaVersions.actionVersions.get(this.get("actionType"));
if (this.get("nameSpace")){
var schema=this.get("nameSpace");
if (schemaVersion){
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
index 2714ca1..a2053c9 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/bundle/bundle-xml-importer.js
@@ -21,10 +21,10 @@ import CommonUtils from "../../utils/common-utils";
var BundleXmlImporter= Ember.Object.extend({
x2js : new X2JS(),
- schemaVersions : null,
- importBundle (xml, errors){
+ schemaVersions : SchemaVersions.create({}),
+ importBundle (xml){
var bundleJson = this.get("x2js").xml_str2json(xml);
- return this.processBundleXML(bundleJson, errors);
+ return this.processBundleXML(bundleJson);
},
processBundleXML(bundleJson){
var errors=Ember.A([]);
@@ -36,16 +36,18 @@ var BundleXmlImporter= Ember.Object.extend({
type : 'date'
},
coordinators : Ember.A([]),
- schemaVersions : this.get("schemaVersions")
+ schemaVersions : {
+ bundleVersion : this.get("schemaVersions").getDefaultVersion('bundle')
+ }
});
var bundleApp=bundleJson["bundle-app"];
bundle.name = bundleApp._name;
var bundleVersion=CommonUtils.extractSchemaVersion(bundleApp._xmlns);
- var maxBundleVersion = Math.max.apply(Math, bundle.schemaVersions.getBundleVersions());
- if (bundleVersion < maxBundleVersion) {
- bundle.schemaVersions.setCurrentBundleVersion(bundleVersion);
- } else {
+ var maxBundleVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('bundle'));
+ if (bundleVersion > maxBundleVersion) {
errors.push({message: "Unsupported bundle version - " + bundleVersion});
+ } else {
+ bundle.schemaVersions.bundleVersion = bundleVersion;
}
if(bundleApp.control && bundleApp.control["kick-off-time"]) {
bundle.kickOffTime = this.extractDateField(bundleApp["control"]["kick-off-time"]);
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js
index 76da535..9b54495 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/coordinator/coordinator-xml-importer.js
@@ -21,10 +21,10 @@ import CommonUtils from "../../utils/common-utils";
var CoordinatorXmlImporter= Ember.Object.extend({
x2js : new X2JS(),
- schemaVersions: null,
- importCoordinator (xml, errors){
+ schemaVersions: SchemaVersions.create({}),
+ importCoordinator (xml){
var coordinatorJson = this.get("x2js").xml_str2json(xml);
- return this.processCoordinatorXML(coordinatorJson, errors);
+ return this.processCoordinatorXML(coordinatorJson);
},
createNewCoordinator(){
return Coordinator.create({
@@ -59,7 +59,9 @@ var CoordinatorXmlImporter= Ember.Object.extend({
}
},
controls : Ember.A([]),
- schemaVersions : this.get("schemaVersions")
+ schemaVersions : {
+ coordinatorVersion : this.get('schemaVersions').getDefaultVersion('coordinator')
+ }
});
},
processCoordinatorXML(coordinatorJson){
@@ -68,12 +70,11 @@ var CoordinatorXmlImporter= Ember.Object.extend({
var coordinator = this.createNewCoordinator();
coordinator.name = coordinatorApp._name;
var coordinatorVersion=CommonUtils.extractSchemaVersion(coordinatorApp._xmlns);
- var maxCoordinatorVersion = Math.max.apply(Math, coordinator.schemaVersions.getCoordinatorVersions());
- if (coordinatorVersion < maxCoordinatorVersion) {
- coordinator.schemaVersions.setCurrentCoordinatorVersion(coordinatorVersion);
- } else {
+ var maxCoordinatorVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('coordinator'));
+ if (coordinatorVersion > maxCoordinatorVersion) {
errors.push({message: "Unsupported coordinator version - " + coordinatorVersion});
}
+ coordinator.schemaVersions.coordinatorVersion = coordinatorVersion;
var frequency = coordinatorApp._frequency;
if(frequency.startsWith('${coord:')){
coordinator.frequency.type = frequency.substring(frequency.indexOf(':')+1, frequency.indexOf('('));
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js
index 0a5083f..67605ae 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/schema-versions.js
@@ -16,16 +16,15 @@
*/
import Ember from 'ember';
export default Ember.Object.extend({
- actionVersions: Ember.Map.create(),
- currentActionVersion:Ember.Map.create(),
- workflowVersions: [],
- workflowVersion: null,
- bundleVersions: [],
- bundleVersion: null,
- coordinatorVersions: [],
- coordinatorVersion: null,
- clone : {},
- actionSchemaMap:{
+
+ supportedVersions : new Map(),
+ defaultVersions : new Map(),
+ actionVersions: new Map(),
+ currentActionVersion:new Map(),
+ workflowVersions: ["0.5","0.4.5","0.4","0.3","0.2.5","0.2","0.1"],
+ bundleVersions: ["0.2","0.1"],
+ coordinatorVersions: ["0.5", "0.4","0.3", "0.2","0.1"],
+ actionSchemas:{
"hive":["0.6","0.5","0.4","0.3","0.2","0.1"],
"hive2":["0.2","0.1"],
"sqoop":["0.3","0.2","0.1"],
@@ -34,39 +33,62 @@ export default Ember.Object.extend({
"distcp":["0.2","0.1"],
"email":["0.2","0.1"]
},
- createCopy(){
- this.clone.workflowVersion = this.workflowVersion;
- this.clone.currentActionVersion = this.currentActionVersion.copy();
- this.clone.coordinatorVersion = this.coordinatorVersion;
- this.clone.bundleVersion = this.bundleVersion;
+ init(){
+ if(this.supportedVersions.size === 0 && !this.useDefaultSettings){
+ this.parseWorkflowSchemaConfig();
+ this.parseCoordSchemaConfig();
+ this.parseBundleSchemaConfig();
+ this.initializeDefaultVersions();
+ }else if(this.supportedVersions.size === 0 && this.useDefaultSettings){
+ this.loadDefaultSettings()
+ this.initializeDefaultVersions();
+ }
+ },
+ loadDefaultSettings(){
+ this.supportedVersions.set('workflow', []);
+ this.supportedVersions.set('coordinator', []);
+ this.supportedVersions.set('bundle', []);
+ this.workflowVersions.forEach((value)=>{
+ this.supportedVersions.get('workflow').pushObject(value);
+ }, this);
+ this.coordinatorVersions.forEach((value)=>{
+ this.supportedVersions.get('coordinator').pushObject(value);
+ }, this);
+ this.bundleVersions.forEach((value)=>{
+ this.supportedVersions.get('bundle').pushObject(value);
+ }, this);
+ Object.keys(this.actionSchemas).forEach((key)=>{
+ this.supportedVersions.set(key , this.actionSchemas[key]);
+ }, this);
+ },
+ getSupportedVersions(type){
+ return this.supportedVersions.get(type);
},
- rollBack(){
- this.workflowVersion = this.clone.workflowVersion;
- this.currentActionVersion = this.clone.currentActionVersion.copy();
+
+ getDefaultVersion(type){
+ return this.defaultVersions.get(type);
},
- importAdminConfigs(){
- var url = Ember.ENV.API_URL + "/v1/admin/configuration";
- var deferred = Ember.RSVP.defer();
- Ember.$.ajax({
- url: url,
- method: "GET",
- dataType: "text",
- contentType: "text/plain;charset=utf-8",
- beforeSend: function(request) {
- request.setRequestHeader("X-Requested-By", "workflow-designer");
- },
- success: function(response) {
- deferred.resolve(response);
- }.bind(this),
- error: function(response) {
- deferred.reject(response);
- }.bind(this)
- });
- return deferred;
+
+ setDefaultVersion(type, version){
+ this.defaultVersions.set(type, version);
},
- setWfSchemaVersions(configSettings) {
+
+ restoreDefaultVersionSettings(){
+ this.initializeDefaultVersions();
+ },
+
+ initializeDefaultVersions(){
+ this.supportedVersions.forEach((value, key) =>{
+ var max = Math.max(...value)
+ if(isNaN(max)){
+ max = value.reduce((a, b) => a > b?a:b);
+ }
+ this.defaultVersions.set(key, String(max));
+ }, this);
+ },
+ parseWorkflowSchemaConfig() {
this.workflowVersions = [];
- var wfSchemaVersions = configSettings["oozie.service.SchemaService.wf.schemas"].trim().split(",");
+ var wfSchemaVersions = this.adminConfig["oozie.service.SchemaService.wf.schemas"].trim().split(",");
wfSchemaVersions = wfSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort();
wfSchemaVersions.forEach(function(wfSchemaVersion) {
var wfSchema = wfSchemaVersion.split("-");
@@ -74,67 +96,51 @@ export default Ember.Object.extend({
var wfSchemaType = wfSchema[1];
var wfSchemaVersionNumber = wfSchema[2].replace(".xsd", "");
if (wfSchemaType === "action") {
- if (this.actionVersions.get(wfSchemaName)) {
- this.actionVersions.get(wfSchemaName).push(wfSchemaVersionNumber);
- this.currentActionVersion.set(wfSchemaName, wfSchemaVersionNumber);
- } else {
- this.actionVersions.set(wfSchemaName, [wfSchemaVersionNumber]);
- this.currentActionVersion.set(wfSchemaName, wfSchemaVersionNumber);
+ if(this.supportedVersions.get(wfSchemaName)){
+ this.supportedVersions.get(wfSchemaName).pushObject(wfSchemaVersionNumber);
+ }else{
+ this.supportedVersions.set(wfSchemaName, [wfSchemaVersionNumber]);
}
} else if (wfSchemaType === "workflow") {
- this.workflowVersions.push(wfSchemaVersionNumber);
- this.workflowVersion = wfSchemaVersionNumber;
+ if(this.supportedVersions.get(wfSchemaType)){
+ this.supportedVersions.get(wfSchemaType).pushObject(wfSchemaVersionNumber);
+ }else{
+ this.supportedVersions.set(wfSchemaType, [wfSchemaVersionNumber]);
+ }
}
}.bind(this));
},
- setCoordSchemaVersions(configSettings) {
- this.coordinatorVersions = [];
- var coordSchemaVersions = configSettings["oozie.service.SchemaService.coord.schemas"].trim().split(",");
+ parseCoordSchemaConfig() {
+ var coordSchemaVersions = this.adminConfig["oozie.service.SchemaService.coord.schemas"].trim().split(",");
coordSchemaVersions = coordSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort();
coordSchemaVersions.forEach(function(coordSchemaVersion) {
var coordSchema = coordSchemaVersion.split("-");
var coordSchemaType = coordSchema[1];
var coordSchemaVersionNumber = coordSchema[2].replace(".xsd", "");
if (coordSchemaType === "coordinator") {
- this.coordinatorVersions.push(coordSchemaVersionNumber);
- this.coordinatorVersion = coordSchemaVersionNumber;
+ if(this.supportedVersions.get('coordinator')){
+ this.supportedVersions.get('coordinator').pushObject(coordSchemaVersionNumber);
+ }else{
+ this.supportedVersions.set('coordinator', [coordSchemaVersionNumber]);
+ }
}
}.bind(this));
},
- setBundleSchemaVersions(configSettings) {
+ parseBundleSchemaConfig() {
this.bundleVersions = [];
- var bundleSchemaVersions = configSettings["oozie.service.SchemaService.bundle.schemas"].trim().split(",");
+ var bundleSchemaVersions = this.adminConfig["oozie.service.SchemaService.bundle.schemas"].trim().split(",");
bundleSchemaVersions = bundleSchemaVersions.map(Function.prototype.call, String.prototype.trim).sort();
bundleSchemaVersions.forEach(function(bundleSchemaVersion) {
var bundleSchema = bundleSchemaVersion.split("-");
var bundleSchemaType = bundleSchema[1];
var bundleSchemaVersionNumber = bundleSchema[2].replace(".xsd", "");
if (bundleSchemaType === "bundle") {
- this.bundleVersions.push(bundleSchemaVersionNumber);
- this.bundleVersion = bundleSchemaVersionNumber;
- }
- }.bind(this));
- },
- init(){
- var importAdminConfigsDefered=this.importAdminConfigs();
- importAdminConfigsDefered.promise.then(function(data){
- var configSettings = JSON.parse(data);
- if (!(configSettings instanceof Object)) {
- configSettings = JSON.parse(configSettings);
+ if(this.supportedVersions.get('bundle')){
+ this.supportedVersions.get('bundle').pushObject(bundleSchemaVersionNumber);
+ }else{
+ this.supportedVersions.set('bundle', [bundleSchemaVersionNumber]);
+ }
}
- this.setWfSchemaVersions(configSettings);
- this.setCoordSchemaVersions(configSettings);
- this.setBundleSchemaVersions(configSettings);
- this.setDefaultActionVersions();
- }.bind(this)).catch(function(){
- this.setWorkflowVersions(["0.5","0.4.5","0.4","0.3","0.2.5","0.2","0.1"]);
- this.setCurrentWorkflowVersion("0.5");
- this.setCoordinatorVersions(["0.4","0.3", "0.2","0.1"]);
- this.setCurrentCoordinatorVersion("0.4");
- this.setBundleVersions(["0.2","0.1"]);
- this.setCurrentBundleVersion("0.2");
- this.setDefaultActionVersions();
- console.error("There is some problem while importing schema versions. defaulting to known versions.");
}.bind(this));
},
setDefaultActionVersions(){
@@ -145,51 +151,5 @@ export default Ember.Object.extend({
self.currentActionVersion.set(key,self.actionSchemaMap[key][0]);
}
});
- },
- getActionVersions(type){
- return this.actionVersions.get(type);
- },
- getActionVersion(type){
- return this.currentActionVersion.get(type);
- },
- getCurrentWorkflowVersion(){
- return this.workflowVersion;
- },
- getWorkflowVersions(){
- return this.workflowVersions;
- },
- getCurrentCoordinatorVersion(){
- return this.coordinatorVersion;
- },
- getCoordinatorVersions(){
- return this.coordinatorVersions;
- },
- getCurrentBundleVersion(){
- return this.bundleVersion;
- },
- getBundleVersions(){
- return this.bundleVersions;
- },
- setActionVersion(type, version){
- this.currentActionVersion.set(type, version);
- },
- setCurrentWorkflowVersion(version){
- this.workflowVersion = version;
- },
- setCurrentCoordinatorVersion(version){
- this.coordinatorVersion = version;
- },
- setCurrentBundleVersion(version){
- this.bundleVersion = version;
- },
- setWorkflowVersions(versions){
- this.workflowVersions = versions;
- },
- setCoordinatorVersions(versions){
- this.coordinatorVersions = versions;
- },
- setBundleVersions(versions){
- this.bundleVersions = versions;
}
-
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
index d001f38..ff75e7e 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-importer.js
@@ -19,9 +19,12 @@ import Ember from 'ember';
import CommonUtils from "../utils/common-utils";
import {Workflow} from '../domain/workflow';
import {WorkflowXmlMapper} from '../domain/workflow_xml_mapper';
+import SchemaVersions from '../domain/schema-versions';
+
var WorkflowImporter= Ember.Object.extend({
workflowMapper:null,
x2js : new X2JS(),
+ schemaVersions : SchemaVersions.create({}),
importWorkflow(workflowXml){
var workflow=Workflow.create({});
var errors=[];
@@ -36,7 +39,12 @@ var WorkflowImporter= Ember.Object.extend({
}
var workflowAppJson=workflowJson["workflow-app"];
var workflowVersion=CommonUtils.extractSchemaVersion(workflowAppJson._xmlns);
- workflow.schemaVersions.setCurrentWorkflowVersion(workflowVersion);
+ var maxWorkflowVersion = Math.max.apply(Math, this.get('schemaVersions').getSupportedVersions('workflow'));
+ if (workflowVersion > maxWorkflowVersion) {
+ errors.push({message: "Unsupported workflow version - " + workflowVersion});
+ } else {
+ workflow.schemaVersions.workflowVersion = workflowVersion;
+ }
this.processWorkflowActionVersions(workflowAppJson, workflow, errors);
if (workflowAppJson.info && workflowAppJson.info.__prefix==="sla") {
@@ -69,13 +77,16 @@ var WorkflowImporter= Ember.Object.extend({
});
importedWfActionVersions._keys.forEach(function(wfActionType){
- var maxImportedActionVersion = Math.max.apply(Math, importedWfActionVersions.get(wfActionType))
- if (workflow.schemaVersions.getActionVersion(wfActionType) < maxImportedActionVersion) {
- errors.push({message: "Unsupported " + wfActionType + " version - " + maxImportedActionVersion});
- } else {
- workflow.schemaVersions.setActionVersion(wfActionType, maxImportedActionVersion.toString());
- }
- });
+ var maxImportedActionVersion = Math.max(...importedWfActionVersions.get(wfActionType));
+ var supportedVersions = this.get('schemaVersions').getSupportedVersions(wfActionType);
+ importedWfActionVersions.get(wfActionType).forEach((version)=>{
+ if(supportedVersions.indexOf(version) === -1){
+ errors.push({message: "Unsupported " + wfActionType + " version - " + maxImportedActionVersion});
+ }else{
+ workflow.schemaVersions.actionVersions.set(wfActionType, maxImportedActionVersion);
+ }
+ }, this);
+ }, this);
},
processActionNode(nodeMap,action){
var actionMapper=this.get("workflowMapper").getNodeHandler("action");
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js
index fa428bb..527badf 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-json-importer.js
@@ -28,6 +28,8 @@ var WorkflowJsonImporter= Ember.Object.extend({
var workflow=Workflow.create({});
workflow.initialize();
workflow.set("name",workflowJson.name);
+ workflow.schemaVersions.workflowVersion = workflowJson.schemaVersions.workflowVersion;
+ workflow.schemaVersions.actionVersions = new Map(JSON.parse(workflowJson.schemaVersions.actionVersions));
this.restoreKillNodes(workflowJson.killNodes,workflow);
var nodeMap= new Map();
var startNode=this.visitNode(workflowJson.startNode,nodeMap);
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
index 012e7ac..b9e4307 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow-xml-generator.js
@@ -51,7 +51,7 @@ var WorkflowGenerator= Ember.Object.extend({
var targetWorkflowApp=reordered["workflow-app"];
targetWorkflowApp["_name"]=this.workflow.get("name");
this.copyProp(srcWorkflowApp,targetWorkflowApp,["parameters","global","credentials","start","decision","fork","join","action","kill","end","info"]);
- targetWorkflowApp["_xmlns"]="uri:oozie:workflow:"+this.workflow.get("schemaVersions").getCurrentWorkflowVersion();
+ targetWorkflowApp["_xmlns"]="uri:oozie:workflow:"+this.workflow.schemaVersions.workflowVersion;
if (this.slaInfoExists(targetWorkflowApp)){
targetWorkflowApp["_xmlns:sla"]="uri:oozie:sla:0.2";
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
index f4fc20d..3c89f5c 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/domain/workflow.js
@@ -31,11 +31,21 @@ var Workflow= Ember.Object.extend(FindNodeMixin,{
killNodes : null,
nodeVisitor : null,
nodeFactory:NodeFactory.create({}),
- schemaVersions:SchemaVersions.create({}),
sla : SlaInfo.create({}),
credentials : Ember.A([]),
initialize(){
this.nodeVisitor=NodeVisitor.create({});
+ var schemaVersions=SchemaVersions.create({});
+ this.schemaVersions = {};
+ this.schemaVersions.workflowVersion = schemaVersions.getDefaultVersion('workflow');
+ var actionsMap = new Map();
+ Object.keys(Constants.actions).forEach((key)=>{
+ var action = Constants.actions[key];
+ if(action.supportsSchema){
+ actionsMap.set(action.name, schemaVersions.getDefaultVersion(action.name));
+ }
+ });
+ this.schemaVersions.actionVersions = actionsMap;
var src =this.nodeFactory.createStartNode();
var dest =this.nodeFactory.createEndNode("end");
this.set("startNode", src);
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js
index 10f745a..d557625 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/routes/design.js
@@ -16,6 +16,7 @@
*/
import Ember from 'ember';
+import SchemaVersions from '../domain/schema-versions';
export default Ember.Route.extend(Ember.Evented, {
@@ -23,7 +24,48 @@ export default Ember.Route.extend(Ember.Evented, {
this.set("xmlAppPath", transition.queryParams.appPath);
this.controllerFor('design').set("xmlAppPath", transition.queryParams.appPath);
},
+ model(){
+ if(!this.get('failedSchemaVersions')){
+ return this.importAdminConfigs();
+ }else{
+ return [];
+ }
+ },
+ afterModel(model){
+ if(!this.get('failedSchemaVersions')){
+ SchemaVersions.reopen({
+ adminConfig : JSON.parse(model)
+ });
+ }
+ },
+ importAdminConfigs(){
+ return new Ember.RSVP.Promise((resolve, reject) => {
+ var url = Ember.ENV.API_URL + "/v1/admin/configuration";
+ var deferred = Ember.$.ajax({
+ url: url,
+ method: "GET",
+ dataType: "text",
+ contentType: "text/plain;charset=utf-8",
+ beforeSend: function(request) {
+ request.setRequestHeader("X-Requested-By", "workflow-designer");
+ },
+ success : function(response){
+ resolve(JSON.parse(response));
+ },
+ error : function(response){
+ reject(response);
+ }
+ });
+ });
+ },
actions : {
+ error(error, transition){
+ SchemaVersions.reopen({
+ useDefaultSettings : true
+ });
+ this.set('failedSchemaVersions', true);
+ transition.retry();
+ },
editWorkflow(path){
this.trigger('openNewTab', path);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs
index 93a0541..249877b 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-config.hbs
@@ -130,5 +130,5 @@
{{#preview-dialog title="Bundle XML Preview" previewXml=previewXml closePreview="closePreview"}}{{/preview-dialog}}
{{/if}}
{{#if showVersionSettings}}
- {{bundle-version-settings schemaVersions=bundle.schemaVersions showVersionSettings="showVersionSettings" }}
+ {{bundle-version-settings bundle=bundle showVersionSettings="showVersionSettings" }}
{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs
index 6d6f675..242b89f 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/bundle-version-settings.hbs
@@ -27,9 +27,9 @@
<div class="form-group">
<label class="control-label col-xs-3"> Bundle Version</label>
<div class="col-xs-7">
- <select onchange={{action (mut currentBundleVersion) value="target.value"}} name="select-version" class="form-control">
+ <select onchange={{action (mut selectedBundleVersion) value="target.value"}} name="select-version" class="form-control">
{{#each bundleSchemaVersions as |version index|}}
- <option value={{version}} selected={{eq currentBundleVersion version}}>{{version}}</option>
+ <option value={{version}} selected={{eq selectedBundleVersion version}}>{{version}}</option>
{{/each}}
</select>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs
index fff8c8c..5b5cd68 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-config.hbs
@@ -329,7 +329,7 @@ okBtnText="Continue" cancelBtnText="Cancel" onOk="resetCoordinator"}}{{/confirma
{{#workflow-parameters type='coord' closeWorkFlowParam="closeWorkFlowParam" saveWorkFlowParam="saveWorkFlowParam" parameters=parameters}}{{/workflow-parameters}}
{{/if}}
{{#if showVersionSettings}}
- {{coord-version-settings schemaVersions=coordinator.schemaVersions showVersionSettings="showVersionSettings" }}
+ {{coord-version-settings coordinator=coordinator showVersionSettings="showVersionSettings" }}
{{/if}}
{{#if showControlConfig}}
<div id="control-dialog" class="modal fade" role="dialog">
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs
index be862ac..b1b192d 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/coord-version-settings.hbs
@@ -27,9 +27,9 @@
<div class="form-group">
<label class="control-label col-xs-3"> Coordinator Version</label>
<div class="col-xs-7">
- <select onchange={{action (mut currentCoordinatorVersion) value="target.value"}} name="select-version" class="form-control">
+ <select onchange={{action (mut selectedCoordinatorVersion) value="target.value"}} name="select-version" class="form-control">
{{#each coordinatorSchemaVersions as |version index|}}
- <option value={{version}} selected={{eq currentCoordinatorVersion version}}>{{version}}</option>
+ <option value={{version}} selected={{eq selectedCoordinatorVersion version}}>{{version}}</option>
{{/each}}
</select>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs
index 8438255..8b2911b 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-errors.hbs
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-<div id="designer-errors">
+<div id="designer-errors" class="paddingtop10">
{{#if (or (gt errors.length 0) (gt validationErrors.length 0))}}
<div id="alert"class="alert alert-danger alert-dismissible fade in workflow-error" role="alert">
{{#if (gt errors.length 0)}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
index 7449f27..6e1b054 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs
@@ -402,7 +402,7 @@
{{#workflow-sla showWorkflowSla="showWorkflowSla" workflowSla=workflow.sla workflowSlaEnabled=workflow.slaEnabled}}{{/workflow-sla}}
{{/if}}
{{#if showVersionSettings}}
- {{version-settings schemaVersions=workflow.schemaVersions showVersionSettings="showVersionSettings" }}
+ {{version-settings showVersionSettings="showVersionSettings" workflow=workflow}}
{{/if}}
{{#if showCredentials}}
{{#workflow-credentials showCredentials="showCredentials" workflowCredentials=workflow.credentials}}{{/workflow-credentials}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
index 145f81b..4548258 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
@@ -27,9 +27,9 @@
<div class="form-group">
<label class="control-label col-xs-3"> Workflow Version</label>
<div class="col-xs-7">
- <select onchange={{action (mut currentWorkflowVersion) value="target.value"}} name="select-version" class="form-control">
+ <select onchange={{action (mut selectedWorkflowVersion) value="target.value"}} name="select-version" class="form-control">
{{#each workflowSchemaVersions as |version index|}}
- <option value={{version}} selected={{eq currentWorkflowVersion version}}>{{version}}</option>
+ <option value={{version}} selected={{eq selectedWorkflowVersion version}}>{{version}}</option>
{{/each}}
</select>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/dcffaeda/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
index d52c893..e39ba8d 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
@@ -15,4 +15,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-{{designer-workspace xmlAppPath=xmlAppPath showDashboard="showDashboard" hideDashboard="hideDashboard"}}
+{{designer-workspace xmlAppPath=xmlAppPath showDashboard="showDashboard"
+ hideDashboard="hideDashboard" adminConfig=model.adminConfig}}
[09/15] ambari git commit: Revert "AMBARI-19367.Not able to save FS
action node after populating job xml value. (Venkata Sairam via gauravn7)"
Posted by nc...@apache.org.
Revert "AMBARI-19367.Not able to save FS action node after populating job xml value. (Venkata Sairam via gauravn7)"
This reverts commit 176c3b0f1abf4368ba9d35cb83ab09160b642944.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2a2252cc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2a2252cc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2a2252cc
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2a2252cc94231e25e76b4362aff165f0f62ac829
Parents: 176c3b0
Author: Gaurav Nagar <gr...@gmail.com>
Authored: Thu Jan 5 14:56:41 2017 +0530
Committer: Gaurav Nagar <gr...@gmail.com>
Committed: Thu Jan 5 14:56:41 2017 +0530
----------------------------------------------------------------------
AMBARI-19367_branch-2.5.patch | 55 --------------------
contrib/views/wfmanager/.gitignore | 20 -------
.../resources/ui/app/components/fs-action.js | 3 --
3 files changed, 78 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2252cc/AMBARI-19367_branch-2.5.patch
----------------------------------------------------------------------
diff --git a/AMBARI-19367_branch-2.5.patch b/AMBARI-19367_branch-2.5.patch
deleted file mode 100644
index f8c5cb1..0000000
--- a/AMBARI-19367_branch-2.5.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 286890d1e4db29ebe1c43dd26034ca242de4cdef Mon Sep 17 00:00:00 2001
-From: Venkata Sairam <ve...@gmail.com>
-Date: Thu, 5 Jan 2017 12:30:04 +0530
-Subject: [PATCH] AMBARI-19367.Not able to save FS action node after populating
- job xml value(venkatasairam.lanka)
-
----
- contrib/views/wfmanager/.gitignore | 20 ++++++++++++++++++++
- .../main/resources/ui/app/components/fs-action.js | 3 +++
- 2 files changed, 23 insertions(+)
- create mode 100644 contrib/views/wfmanager/.gitignore
-
-diff --git a/contrib/views/wfmanager/.gitignore b/contrib/views/wfmanager/.gitignore
-new file mode 100644
-index 0000000..ae354e7
---- /dev/null
-+++ b/contrib/views/wfmanager/.gitignore
-@@ -0,0 +1,20 @@
-+# Numerous always-ignore extensions
-+*.swp
-+*.bak
-+*.log
-+*.patch
-+
-+# OS or Editor folders
-+.DS_Store
-+
-+# Installation and build tools
-+src/main/resources/ui/node/
-+src/main/resources/ui/node_modules/
-+src/main/resources/ui/bower_components/
-+_generators/
-+
-+# Output directory
-+src/main/resources/ui/dist/
-+
-+# Brunch folder for temporary files.
-+src/main/resources/ui/tmp/
-diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
-index 6233b62..40ac43d 100644
---- a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
-+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
-@@ -38,6 +38,9 @@ export default Ember.Component.extend(Validations, {
- this.set("actionModel.configuration", {});
- this.set("actionModel.configuration.property", Ember.A([]));
- }
-+ if(this.get('actionModel.jobXml') === undefined){
-+ this.set("actionModel.jobXml", Ember.A([]));
-+ }
- var field = 'validations.attrs.actionModel.fsOps.isInvalid';
- this.set(field, false);
- this.sendAction('register', 'fsAction', this);
---
-2.7.4 (Apple Git-66)
-
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2252cc/contrib/views/wfmanager/.gitignore
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/.gitignore b/contrib/views/wfmanager/.gitignore
deleted file mode 100644
index ae354e7..0000000
--- a/contrib/views/wfmanager/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-# Numerous always-ignore extensions
-*.swp
-*.bak
-*.log
-*.patch
-
-# OS or Editor folders
-.DS_Store
-
-# Installation and build tools
-src/main/resources/ui/node/
-src/main/resources/ui/node_modules/
-src/main/resources/ui/bower_components/
-_generators/
-
-# Output directory
-src/main/resources/ui/dist/
-
-# Brunch folder for temporary files.
-src/main/resources/ui/tmp/
http://git-wip-us.apache.org/repos/asf/ambari/blob/2a2252cc/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
index 40ac43d..6233b62 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/fs-action.js
@@ -38,9 +38,6 @@ export default Ember.Component.extend(Validations, {
this.set("actionModel.configuration", {});
this.set("actionModel.configuration.property", Ember.A([]));
}
- if(this.get('actionModel.jobXml') === undefined){
- this.set("actionModel.jobXml", Ember.A([]));
- }
var field = 'validations.attrs.actionModel.fsOps.isInvalid';
this.set(field, false);
this.sendAction('register', 'fsAction', this);
[15/15] ambari git commit: Merge branch 'trunk' into
branch-dev-patch-upgrade
Posted by nc...@apache.org.
Merge branch 'trunk' into branch-dev-patch-upgrade
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b1bb2890
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b1bb2890
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b1bb2890
Branch: refs/heads/branch-dev-patch-upgrade
Commit: b1bb2890aa3bc0e6ad67375808e8b4028a74bedc
Parents: 608f0b5 1527bd1
Author: Nate Cole <nc...@hortonworks.com>
Authored: Thu Jan 5 08:38:22 2017 -0500
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Thu Jan 5 08:38:22 2017 -0500
----------------------------------------------------------------------
.../controllers/clusters/UserAccessListCtrl.js | 7 +-
.../app/views/clusters/userAccessList.html | 2 +-
.../test/unit/services/PermissionSaver_test.js | 5 +
.../metrics/timeline/PhoenixHBaseAccessor.java | 7 +-
.../configuration/logsearch-properties.xml | 7 +
.../LOGSEARCH/0.5.0/package/scripts/params.py | 1 -
.../0.6.0.2.5/package/scripts/master.py | 8 +
.../stacks/2.4/LOGSEARCH/test_logsearch.py | 2 +-
.../test/python/stacks/2.4/configs/default.json | 3 +-
ambari-web/app/controllers/main/host/details.js | 94 +++++----
.../configs/services/logsearch_properties.js | 21 +-
ambari-web/app/utils/config.js | 42 +++-
.../configs/add_component_config_initializer.js | 5 +-
.../configs/hosts_based_initializer_mixin.js | 2 +-
.../test/controllers/main/host/details_test.js | 12 +-
ambari-web/test/utils/config_test.js | 147 ++++++++++++-
.../scripts/models/MigrationResponse.java | 6 +-
contrib/views/wfmanager/.gitignore | 20 ++
.../ui/app/components/bundle-config.js | 11 +-
.../app/components/bundle-version-settings.js | 12 +-
.../resources/ui/app/components/coord-config.js | 12 +-
.../ui/app/components/coord-version-settings.js | 12 +-
.../ui/app/components/flow-designer.js | 46 ++--
.../resources/ui/app/components/fs-action.js | 3 +
.../resources/ui/app/components/hdfs-browser.js | 5 +-
.../main/resources/ui/app/components/save-wf.js | 13 +-
.../ui/app/components/version-settings.js | 28 +--
.../ui/app/domain/actionjob_hanlder.js | 2 +-
.../ui/app/domain/bundle/bundle-xml-importer.js | 18 +-
.../coordinator/coordinator-xml-importer.js | 17 +-
.../resources/ui/app/domain/schema-versions.js | 208 ++++++++-----------
.../ui/app/domain/workflow-importer.js | 27 ++-
.../ui/app/domain/workflow-json-importer.js | 2 +
.../ui/app/domain/workflow-xml-generator.js | 2 +-
.../main/resources/ui/app/domain/workflow.js | 12 +-
.../src/main/resources/ui/app/routes/design.js | 42 ++++
.../src/main/resources/ui/app/styles/app.less | 9 +
.../app/templates/components/bundle-config.hbs | 2 +-
.../components/bundle-version-settings.hbs | 4 +-
.../app/templates/components/coord-config.hbs | 2 +-
.../components/coord-version-settings.hbs | 4 +-
.../templates/components/designer-errors.hbs | 2 +-
.../app/templates/components/flow-designer.hbs | 10 +-
.../app/templates/components/hdfs-browser.hbs | 6 +-
.../templates/components/version-settings.hbs | 4 +-
.../main/resources/ui/app/templates/design.hbs | 3 +-
46 files changed, 589 insertions(+), 320 deletions(-)
----------------------------------------------------------------------