ambari git commit: AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (pallavkul)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ae20bbedc -> d408a3f0e AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d408a3f0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d408a3f0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d408a3f0 Branch: refs/heads/branch-2.5 Commit: d408a3f0e72aa7e0864e34dedf18ce08cad38122 Parents: ae20bbe Author: pallavkul Authored: Sat Feb 11 08:46:11 2017 +0530 Committer: pallavkul Committed: Sat Feb 11 08:49:24 2017 +0530 -- .../src/main/resources/ui/app/components/query-editor.js| 8 .../views/hive20/src/main/resources/ui/app/styles/app.scss | 9 + contrib/views/hive20/src/main/resources/ui/bower.json | 1 + .../views/hive20/src/main/resources/ui/ember-cli-build.js | 2 ++ 4 files changed, 20 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d408a3f0/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js index 27d43d5..7bfe223 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js @@ -74,6 +74,14 @@ export default Ember.Component.extend({ }); }); +this.$('.CodeMirror').resizable({ + handles: 's', + + resize: function () { +Ember.run.debounce(this, updateSize, 150); + } +}).find('.ui-resizable-s').addClass('grip fa fa-reorder'); + }.on('didInsertElement'), http://git-wip-us.apache.org/repos/asf/ambari/blob/d408a3f0/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss index 0dae396..1dc86d7 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss +++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss @@ -223,6 +223,15 @@ pre { overflow-y: scroll; } +.grip { + height: 20px; + border: 0 1px 1px solid #ddd; + background-color: #f5f5f5; + color: #bbb; + text-align: center; + font-size: inherit; +} + .hv-dropdown { position: absolute; .dropdown-menu { http://git-wip-us.apache.org/repos/asf/ambari/blob/d408a3f0/contrib/views/hive20/src/main/resources/ui/bower.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json b/contrib/views/hive20/src/main/resources/ui/bower.json index f4d9aa0..9fa7076 100644 --- a/contrib/views/hive20/src/main/resources/ui/bower.json +++ b/contrib/views/hive20/src/main/resources/ui/bower.json @@ -6,6 +6,7 @@ "ember-cli-shims": "~0.1.1", "ember-qunit-notifications": "0.1.0", "font-awesome": "~4.5.0", +"jquery-ui": "~1.12.1", "codemirror": "~5.15.0", "bootstrap-treeview": "~1.2.0", "blob": "*" http://git-wip-us.apache.org/repos/asf/ambari/blob/d408a3f0/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js b/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js index 10e0402..d53cdac 100644 --- a/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js +++ b/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js @@ -55,6 +55,8 @@ module.exports = function(defaults) { app.import('bower_components/codemirror/addon/hint/show-hint.js'); app.import('bower_components/d3/d3.js'); app.import('bower_components/codemirror/lib/codemirror.css'); + app.import('bower_components/jquery-ui/jquery-ui.js'); + app.import('bower_components/jquery-ui/themes/base/jquery-ui.css'); app.import('bower_components/codemirror/addon/hint/show-hint.css'); /*
ambari git commit: AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (pallavkul)
Repository: ambari Updated Branches: refs/heads/trunk b00cf74f6 -> d96d209c1 AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d96d209c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d96d209c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d96d209c Branch: refs/heads/trunk Commit: d96d209c1ad8aeefd9ab1c02fbe621c7dfd02ffa Parents: b00cf74 Author: pallavkul Authored: Sat Feb 11 08:46:11 2017 +0530 Committer: pallavkul Committed: Sat Feb 11 08:46:11 2017 +0530 -- .../src/main/resources/ui/app/components/query-editor.js| 8 .../views/hive20/src/main/resources/ui/app/styles/app.scss | 9 + contrib/views/hive20/src/main/resources/ui/bower.json | 1 + .../views/hive20/src/main/resources/ui/ember-cli-build.js | 2 ++ 4 files changed, 20 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d96d209c/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js index 27d43d5..7bfe223 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js @@ -74,6 +74,14 @@ export default Ember.Component.extend({ }); }); +this.$('.CodeMirror').resizable({ + handles: 's', + + resize: function () { +Ember.run.debounce(this, updateSize, 150); + } +}).find('.ui-resizable-s').addClass('grip fa fa-reorder'); + }.on('didInsertElement'), http://git-wip-us.apache.org/repos/asf/ambari/blob/d96d209c/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss index 0dae396..1dc86d7 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss +++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss @@ -223,6 +223,15 @@ pre { overflow-y: scroll; } +.grip { + height: 20px; + border: 0 1px 1px solid #ddd; + background-color: #f5f5f5; + color: #bbb; + text-align: center; + font-size: inherit; +} + .hv-dropdown { position: absolute; .dropdown-menu { http://git-wip-us.apache.org/repos/asf/ambari/blob/d96d209c/contrib/views/hive20/src/main/resources/ui/bower.json -- diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json b/contrib/views/hive20/src/main/resources/ui/bower.json index f4d9aa0..9fa7076 100644 --- a/contrib/views/hive20/src/main/resources/ui/bower.json +++ b/contrib/views/hive20/src/main/resources/ui/bower.json @@ -6,6 +6,7 @@ "ember-cli-shims": "~0.1.1", "ember-qunit-notifications": "0.1.0", "font-awesome": "~4.5.0", +"jquery-ui": "~1.12.1", "codemirror": "~5.15.0", "bootstrap-treeview": "~1.2.0", "blob": "*" http://git-wip-us.apache.org/repos/asf/ambari/blob/d96d209c/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js b/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js index 10e0402..d53cdac 100644 --- a/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js +++ b/contrib/views/hive20/src/main/resources/ui/ember-cli-build.js @@ -55,6 +55,8 @@ module.exports = function(defaults) { app.import('bower_components/codemirror/addon/hint/show-hint.js'); app.import('bower_components/d3/d3.js'); app.import('bower_components/codemirror/lib/codemirror.css'); + app.import('bower_components/jquery-ui/jquery-ui.js'); + app.import('bower_components/jquery-ui/themes/base/jquery-ui.css'); app.import('bower_components/codemirror/addon/hint/show-hint.css'); /*
ambari git commit: AMBARI-19968. Control Log Level for all Hive components for log4j (Madhuvanthi Radhakrishnan via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 6ce29a45a -> ae20bbedc AMBARI-19968. Control Log Level for all Hive components for log4j (Madhuvanthi Radhakrishnan via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae20bbed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae20bbed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae20bbed Branch: refs/heads/branch-2.5 Commit: ae20bbedcbd6d31d1e704391d8e653278d402559 Parents: 6ce29a4 Author: Sumit Mohanty Authored: Fri Feb 10 18:05:44 2017 -0800 Committer: Sumit Mohanty Committed: Fri Feb 10 18:05:44 2017 -0800 -- .../ambari/server/state/theme/TabLayout.java| 8 +- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 2 +- .../package/scripts/hive_interactive.py | 4 +- .../0.12.0.2.0/package/scripts/params_linux.py | 1 + .../HIVE/configuration/beeline-log4j2.xml | 2 +- .../services/HIVE/configuration/hive-env.xml| 29 + .../HIVE/configuration/hive-exec-log4j.xml | 114 + .../HIVE/configuration/hive-exec-log4j2.xml | 2 +- .../services/HIVE/configuration/hive-log4j.xml | 126 +++ .../services/HIVE/configuration/hive-log4j2.xml | 2 +- .../HIVE/configuration/llap-cli-log4j2.xml | 2 +- .../HIVE/configuration/llap-daemon-log4j.xml| 2 +- .../HIVE/configuration/webhcat-log4j.xml| 83 .../HDP/2.5/services/HIVE/themes/theme.json | 48 +++ .../stacks/2.0.6/HIVE/test_hive_client.py | 4 +- .../stacks/2.0.6/HIVE/test_hive_metastore.py| 6 +- .../stacks/2.0.6/HIVE/test_hive_server.py | 4 +- .../stacks/2.5/HIVE/test_hive_server_int.py | 8 +- 18 files changed, 426 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ae20bbed/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java index d92c04d..4f6cf8f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java @@ -91,8 +91,12 @@ public class TabLayout { if (childSection.isRemoved()) { mergedSections.remove(childSection.getName()); } else { - Section parentSection = mergedSections.get(childSection.getName()); - childSection.mergeWithParent(parentSection); + if(mergedSections.containsKey(childSection.getName())) { +Section parentSection = mergedSections.get(childSection.getName()); +childSection.mergeWithParent(parentSection); + }else{ +childSection.mergeWithParent(childSection); + } mergedSections.put(childSection.getName(), childSection); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/ae20bbed/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py index a2879da..6cd6d35 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py @@ -418,7 +418,7 @@ def fill_conf_dir(component_conf_dir): mode=mode_identified_for_file, group=params.user_group, owner=params.hive_user, - content=params.log4j_exec_props + content=InlineTemplate(params.log4j_exec_props) ) elif (os.path.exists("{component_conf_dir}/{log4j_exec_filename}.template")): File(format("{component_conf_dir}/{log4j_exec_filename}"), http://git-wip-us.apache.org/repos/asf/ambari/blob/ae20bbed/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py index b4e4a03..1ca65fe 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package
ambari git commit: AMBARI-19577. Add Livy session recovery configurations in Ambari - fix merge issue (Saisai Shao via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk e7d0e781b -> b00cf74f6 AMBARI-19577. Add Livy session recovery configurations in Ambari - fix merge issue (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b00cf74f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b00cf74f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b00cf74f Branch: refs/heads/trunk Commit: b00cf74f6cecb984381eeed9e464ad1db6461a18 Parents: e7d0e78 Author: Sumit Mohanty Authored: Fri Feb 10 16:53:45 2017 -0800 Committer: Sumit Mohanty Committed: Fri Feb 10 16:53:45 2017 -0800 -- .../stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b00cf74f/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml index c8a65bd..c21a5e6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/livy2-conf.xml @@ -85,8 +85,8 @@ Whether to enable HiveContext in livy interpreter - + livy.server.recovery.mode recovery
ambari git commit: AMBARI-19886. Update ambari managed llap queue to set preemption policy. (Siddharth Seth via Swapan Shridhar).
Repository: ambari Updated Branches: refs/heads/branch-2.5 e76215059 -> 6ce29a45a AMBARI-19886. Update ambari managed llap queue to set preemption policy. (Siddharth Seth via Swapan Shridhar). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6ce29a45 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ce29a45 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ce29a45 Branch: refs/heads/branch-2.5 Commit: 6ce29a45aec92307e575dad8cf75e226b32ec6b3 Parents: e762150 Author: Swapan Shridhar Authored: Fri Feb 10 16:10:19 2017 -0800 Committer: Swapan Shridhar Committed: Fri Feb 10 16:19:15 2017 -0800 -- .../stacks/HDP/2.5/services/stack_advisor.py| 15 +++- .../stacks/2.5/common/test_stack_advisor.py | 36 +--- 2 files changed, 45 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6ce29a45/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py index 44037e9..078f04f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py @@ -1565,13 +1565,18 @@ class HDP25StackAdvisor(HDP24StackAdvisor): elif prop == 'yarn.scheduler.capacity.root.default.maximum-capacity': updated_cap_sched_configs_str = updated_cap_sched_configs_str \ + prop + "=" + adjusted_default_queue_cap + "\n" + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't put this in again. We're re-writing the llap section. +pass elif prop.startswith('yarn.') and '.llap.' not in prop: updated_cap_sched_configs_str = updated_cap_sched_configs_str + prop + "=" + val + "\n" # Now, append the 'llap' queue related properties - updated_cap_sched_configs_str += """yarn.scheduler.capacity.root.{0}.user-limit-factor=1 + updated_cap_sched_configs_str += """yarn.scheduler.capacity.root.ordering-policy=priority-utilization +yarn.scheduler.capacity.root.{0}.user-limit-factor=1 yarn.scheduler.capacity.root.{0}.state=RUNNING yarn.scheduler.capacity.root.{0}.ordering-policy=fifo +yarn.scheduler.capacity.root.{0}.priority=10 yarn.scheduler.capacity.root.{0}.minimum-user-limit-percent=100 yarn.scheduler.capacity.root.{0}.maximum-capacity={1} yarn.scheduler.capacity.root.{0}.capacity={1} @@ -1593,13 +1598,18 @@ yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu putCapSchedProperty(prop, adjusted_default_queue_cap) elif prop == 'yarn.scheduler.capacity.root.default.maximum-capacity': putCapSchedProperty(prop, adjusted_default_queue_cap) + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't put this in again. We're re-writing the llap section. +pass elif prop.startswith('yarn.') and '.llap.' not in prop: putCapSchedProperty(prop, val) # Add new 'llap' queue related configs. + putCapSchedProperty("yarn.scheduler.capacity.root.ordering-policy", "priority-utilization") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".user-limit-factor", "1") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".state", "RUNNING") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".ordering-policy", "fifo") + putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".priority", "10") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".minimum-user-limit-percent", "100") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".maximum-capacity", llap_queue_cap_perc) putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".capacity", llap_queue_cap_perc) @@ -1667,6 +1677,9 @@ yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu # Set 'default' max. capacity back to maximum val updated_default_queue_configs = updated_default_queue_configs \ + prop + "="+DEFAULT_MAX_CAPACITY + "\n" + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't set this property. The default will be picked up. +
ambari git commit: AMBARI-19886. Update ambari managed llap queue to set preemption policy. (Siddharth Seth via Swapan Shridhar).
Repository: ambari Updated Branches: refs/heads/trunk f4c838436 -> e7d0e781b AMBARI-19886. Update ambari managed llap queue to set preemption policy. (Siddharth Seth via Swapan Shridhar). Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7d0e781 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7d0e781 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7d0e781 Branch: refs/heads/trunk Commit: e7d0e781b3506d20806f521b30ce4629e67641f5 Parents: f4c8384 Author: Swapan Shridhar Authored: Fri Feb 10 16:10:19 2017 -0800 Committer: Swapan Shridhar Committed: Fri Feb 10 16:10:25 2017 -0800 -- .../stacks/HDP/2.5/services/stack_advisor.py| 15 +++- .../stacks/2.5/common/test_stack_advisor.py | 36 +--- 2 files changed, 45 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7d0e781/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py index 9fe8fc3..4de9a41 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py @@ -1532,13 +1532,18 @@ class HDP25StackAdvisor(HDP24StackAdvisor): elif prop == 'yarn.scheduler.capacity.root.default.maximum-capacity': updated_cap_sched_configs_str = updated_cap_sched_configs_str \ + prop + "=" + adjusted_default_queue_cap + "\n" + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't put this in again. We're re-writing the llap section. +pass elif prop.startswith('yarn.') and '.llap.' not in prop: updated_cap_sched_configs_str = updated_cap_sched_configs_str + prop + "=" + val + "\n" # Now, append the 'llap' queue related properties - updated_cap_sched_configs_str += """yarn.scheduler.capacity.root.{0}.user-limit-factor=1 + updated_cap_sched_configs_str += """yarn.scheduler.capacity.root.ordering-policy=priority-utilization +yarn.scheduler.capacity.root.{0}.user-limit-factor=1 yarn.scheduler.capacity.root.{0}.state=RUNNING yarn.scheduler.capacity.root.{0}.ordering-policy=fifo +yarn.scheduler.capacity.root.{0}.priority=10 yarn.scheduler.capacity.root.{0}.minimum-user-limit-percent=100 yarn.scheduler.capacity.root.{0}.maximum-capacity={1} yarn.scheduler.capacity.root.{0}.capacity={1} @@ -1560,13 +1565,18 @@ yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu putCapSchedProperty(prop, adjusted_default_queue_cap) elif prop == 'yarn.scheduler.capacity.root.default.maximum-capacity': putCapSchedProperty(prop, adjusted_default_queue_cap) + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't put this in again. We're re-writing the llap section. +pass elif prop.startswith('yarn.') and '.llap.' not in prop: putCapSchedProperty(prop, val) # Add new 'llap' queue related configs. + putCapSchedProperty("yarn.scheduler.capacity.root.ordering-policy", "priority-utilization") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".user-limit-factor", "1") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".state", "RUNNING") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".ordering-policy", "fifo") + putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".priority", "10") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".minimum-user-limit-percent", "100") putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".maximum-capacity", llap_queue_cap_perc) putCapSchedProperty("yarn.scheduler.capacity.root." + llap_queue_name + ".capacity", llap_queue_cap_perc) @@ -1634,6 +1644,9 @@ yarn.scheduler.capacity.root.{0}.maximum-am-resource-percent=1""".format(llap_qu # Set 'default' max. capacity back to maximum val updated_default_queue_configs = updated_default_queue_configs \ + prop + "="+DEFAULT_MAX_CAPACITY + "\n" + elif prop == 'yarn.scheduler.capacity.root.ordering-policy': +# Don't set this property. The default will be picked up. +
ambari git commit: AMBARI-19971. HiveServerInteractive. (1). Use the correct value for Node(s) used for running LLAP Daemon(s). (2). Set 'num_llap_nodes' calculated value only for non Ambari managed q
Repository: ambari Updated Branches: refs/heads/branch-2.5 309b6ebf1 -> e76215059 AMBARI-19971. HiveServerInteractive. (1). Use the correct value for Node(s) used for running LLAP Daemon(s). (2). Set 'num_llap_nodes' calculated value only for non Ambari managed queue. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e7621505 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e7621505 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e7621505 Branch: refs/heads/branch-2.5 Commit: e7621505938cfb0b643ce045d0a473093e45a8fb Parents: 309b6eb Author: Swapan Shridhar Authored: Fri Feb 10 13:29:41 2017 -0800 Committer: Swapan Shridhar Committed: Fri Feb 10 15:15:26 2017 -0800 -- .../package/scripts/hive_server_interactive.py | 12 ++--- .../0.12.0.2.0/package/scripts/params_linux.py | 2 + .../HIVE/configuration/hive-interactive-env.xml | 4 +- .../stacks/HDP/2.5/services/stack_advisor.py| 9 +++- .../HIVE/configuration/hive-interactive-env.xml | 31 - .../stacks/2.5/common/test_stack_advisor.py | 49 ++-- 6 files changed, 83 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e7621505/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index 6fca766..db165fc 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -282,10 +282,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive): unique_name = "llap-slider%s" % datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S') - cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service llap --instances {params.num_llap_nodes}" - " --slider-am-container-mb {params.slider_am_container_mb} --size {params.llap_daemon_container_size}m" - " --cache {params.hive_llap_io_mem_size}m --xmx {params.llap_heap_size}m --loglevel {params.llap_log_level}" - " {params.llap_extra_slider_opts} --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}") + cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service llap --slider-am-container-mb {params.slider_am_container_mb} " + "--size {params.llap_daemon_container_size}m --cache {params.hive_llap_io_mem_size}m --xmx {params.llap_heap_size}m " + "--loglevel {params.llap_log_level} {params.llap_extra_slider_opts} --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}") # Append params that are supported from Hive llap GA version. if params.stack_supports_hive_interactive_ga: @@ -301,11 +300,12 @@ class HiveServerInteractiveDefault(HiveServerInteractive): else: Logger.info("Setting slider_placement: 4, as llap_daemon_container_size : {0} <= 0.5 * " "YARN NodeManager Memory({1})".format(params.llap_daemon_container_size, params.yarn_nm_mem)) -cmd += format(" --slider-placement {slider_placement} --skiphadoopversion --skiphbasecp") +cmd += format(" --slider-placement {slider_placement} --skiphadoopversion --skiphbasecp --instances {params.num_llap_daemon_running_nodes}") # Setup the logger for the ga version only cmd += format(" --logger {params.llap_logger}") - + else: +cmd += format(" --instances {params.num_llap_nodes}") if params.security_enabled: llap_keytab_splits = params.hive_llap_keytab_file.split("/") Logger.debug("llap_keytab_splits : {0}".format(llap_keytab_splits)) http://git-wip-us.apache.org/repos/asf/ambari/blob/e7621505/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 928bf06..902b435 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -684,6 +684,8 @@ if has_hive_interactive: num_retries_for_checking_llap_status = default
ambari git commit: AMBARI-19971. HiveServerInteractive. (1). Use the correct value for Node(s) used for running LLAP Daemon(s). (2). Set 'num_llap_nodes' calculated value only for non Ambari managed q
Repository: ambari Updated Branches: refs/heads/trunk 38a17a7fb -> f4c838436 AMBARI-19971. HiveServerInteractive. (1). Use the correct value for Node(s) used for running LLAP Daemon(s). (2). Set 'num_llap_nodes' calculated value only for non Ambari managed queue. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f4c83843 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f4c83843 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f4c83843 Branch: refs/heads/trunk Commit: f4c83843674764918bd50443705af1fce9852a2b Parents: 38a17a7 Author: Swapan Shridhar Authored: Fri Feb 10 13:29:41 2017 -0800 Committer: Swapan Shridhar Committed: Fri Feb 10 15:13:48 2017 -0800 -- .../package/scripts/hive_server_interactive.py | 12 ++--- .../0.12.0.2.0/package/scripts/params_linux.py | 2 + .../HIVE/configuration/hive-interactive-env.xml | 4 +- .../stacks/HDP/2.5/services/stack_advisor.py| 9 +++- .../HIVE/configuration/hive-interactive-env.xml | 31 - .../stacks/2.5/common/test_stack_advisor.py | 49 ++-- 6 files changed, 83 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f4c83843/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py index 1f1d9a8..2ab48ae 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py @@ -281,10 +281,9 @@ class HiveServerInteractiveDefault(HiveServerInteractive): unique_name = "llap-slider%s" % datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S') - cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service llap --instances {params.num_llap_nodes}" - " --slider-am-container-mb {params.slider_am_container_mb} --size {params.llap_daemon_container_size}m" - " --cache {params.hive_llap_io_mem_size}m --xmx {params.llap_heap_size}m --loglevel {params.llap_log_level}" - " {params.llap_extra_slider_opts} --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}") + cmd = format("{stack_root}/current/hive-server2-hive2/bin/hive --service llap --slider-am-container-mb {params.slider_am_container_mb} " + "--size {params.llap_daemon_container_size}m --cache {params.hive_llap_io_mem_size}m --xmx {params.llap_heap_size}m " + "--loglevel {params.llap_log_level} {params.llap_extra_slider_opts} --output {LLAP_PACKAGE_CREATION_PATH}/{unique_name}") # Append params that are supported from Hive llap GA version. if params.stack_supports_hive_interactive_ga: @@ -300,11 +299,12 @@ class HiveServerInteractiveDefault(HiveServerInteractive): else: Logger.info("Setting slider_placement: 4, as llap_daemon_container_size : {0} <= 0.5 * " "YARN NodeManager Memory({1})".format(params.llap_daemon_container_size, params.yarn_nm_mem)) -cmd += format(" --slider-placement {slider_placement} --skiphadoopversion --skiphbasecp") +cmd += format(" --slider-placement {slider_placement} --skiphadoopversion --skiphbasecp --instances {params.num_llap_daemon_running_nodes}") # Setup the logger for the ga version only cmd += format(" --logger {params.llap_logger}") - + else: +cmd += format(" --instances {params.num_llap_nodes}") if params.security_enabled: llap_keytab_splits = params.hive_llap_keytab_file.split("/") Logger.debug("llap_keytab_splits : {0}".format(llap_keytab_splits)) http://git-wip-us.apache.org/repos/asf/ambari/blob/f4c83843/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index a5618ca..936b194 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -685,6 +685,8 @@ if has_hive_interactive: num_retries_for_checking_llap_status = default('/configu
ambari git commit: AMBARI-19357. Flume metrics can't show if hostname of flume agent is not lowercase. (Yao Lei via swagle)
Repository: ambari Updated Branches: refs/heads/trunk 4381561f9 -> 38a17a7fb AMBARI-19357. Flume metrics can't show if hostname of flume agent is not lowercase. (Yao Lei via swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/38a17a7f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/38a17a7f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/38a17a7f Branch: refs/heads/trunk Commit: 38a17a7fb4a27c7ab2bd3d4e87d8ffd0f4150079 Parents: 4381561 Author: Siddharth Wagle Authored: Fri Feb 10 13:31:39 2017 -0800 Committer: Siddharth Wagle Committed: Fri Feb 10 13:31:39 2017 -0800 -- .../hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/38a17a7f/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java -- diff --git a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java index 86e092a..3fdf3f4 100644 --- a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java +++ b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java @@ -88,6 +88,8 @@ public class FlumeTimelineMetricsSink extends AbstractTimelineMetricsSink implem if ((hostname == null) || (!hostname.contains("."))) { hostname = InetAddress.getLocalHost().getCanonicalHostName(); } + hostname = hostname.toLowerCase(); + } catch (UnknownHostException e) { LOG.error("Could not identify hostname."); throw new FlumeException("Could not identify hostname.", e);
ambari git commit: AMBARI-19831. ADDENDUM. HDP 3.0 TP - Support changed configs and scripts for YARN/MR (alejandro)
Repository: ambari Updated Branches: refs/heads/trunk e8a996184 -> 4381561f9 AMBARI-19831. ADDENDUM. HDP 3.0 TP - Support changed configs and scripts for YARN/MR (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4381561f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4381561f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4381561f Branch: refs/heads/trunk Commit: 4381561f92aeb91b1a2b3cafff4a860efde81dff Parents: e8a9961 Author: Alejandro Fernandez Authored: Fri Feb 10 13:09:12 2017 -0800 Committer: Alejandro Fernandez Committed: Fri Feb 10 13:16:34 2017 -0800 -- .../common-services/YARN/3.0.0.3.0/package/scripts/service.py| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4381561f/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py index 78b2428..e0d6475 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py @@ -44,7 +44,7 @@ def service(componentName, action='start', serviceName='yarn'): if serviceName == 'mapreduce' and componentName == 'historyserver': delete_pid_file = True daemon = format("{mapred_bin}/mr-jobhistory-daemon.sh") -pid_file = format("{mapred_pid_dir}/mapred-{mapred_user}-{componentName}.pid") +pid_file = format("{mapred_pid_dir}/hadoop-{mapred_user}-{componentName}.pid") usr = params.mapred_user log_dir = params.mapred_log_dir else: @@ -52,7 +52,7 @@ def service(componentName, action='start', serviceName='yarn'): # may not work correctly when stopping the service delete_pid_file = False daemon = format("{yarn_bin}/yarn-daemon.sh") -pid_file = format("{yarn_pid_dir}/yarn-{yarn_user}-{componentName}.pid") +pid_file = format("{yarn_pid_dir}/hadoop-{yarn_user}-{componentName}.pid") usr = params.yarn_user log_dir = params.yarn_log_dir
ambari git commit: AMBARI-19964 Set recommended tooltip appears in front of icon (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-2.5 07f30c550 -> 309b6ebf1 AMBARI-19964 Set recommended tooltip appears in front of icon (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/309b6ebf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/309b6ebf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/309b6ebf Branch: refs/heads/branch-2.5 Commit: 309b6ebf178a495e49eba0d0a9ad699c98829b32 Parents: 07f30c5 Author: Aleksandr Kovalenko Authored: Fri Feb 10 18:29:31 2017 +0200 Committer: Aleksandr Kovalenko Committed: Fri Feb 10 21:44:43 2017 +0200 -- ambari-web/app/app.js | 1 + .../common/configs/widgets/controls.hbs | 6 +++-- ambari-web/app/utils/bootstrap_reopen.js| 24 .../configs/service_configs_by_category_view.js | 2 +- .../configs/widgets/config_widget_view.js | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/app.js -- diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js index 53394a0..86c4045 100644 --- a/ambari-web/app/app.js +++ b/ambari-web/app/app.js @@ -19,6 +19,7 @@ // Application bootstrapper require('utils/ember_reopen'); require('utils/ember_computed'); +require('utils/bootstrap_reopen'); var stringUtils = require('utils/string_utils'); module.exports = Em.Application.create({ http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/templates/common/configs/widgets/controls.hbs -- diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs b/ambari-web/app/templates/common/configs/widgets/controls.hbs index 52cccd4..886c01f 100644 --- a/ambari-web/app/templates/common/configs/widgets/controls.hbs +++ b/ambari-web/app/templates/common/configs/widgets/controls.hbs @@ -48,8 +48,9 @@ {{#if view.isWidgetViewAllowed}} + {{else}} + {{/unless}} {{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/utils/bootstrap_reopen.js -- diff --git a/ambari-web/app/utils/bootstrap_reopen.js b/ambari-web/app/utils/bootstrap_reopen.js new file mode 100644 index 000..65acf55 --- /dev/null +++ b/ambari-web/app/utils/bootstrap_reopen.js @@ -0,0 +1,24 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$.fn.tooltip.Constructor.prototype.getPosition = function (inside) { + return $.extend({}, (inside ? this.$element.position() : this.$element.offset()), { +width: this.$element[0].offsetWidth, +height: this.$element[0].offsetHeight + }) +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/views/common/configs/service_configs_by_category_view.js -- diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js index f4f35c8..a0fb2aa 100644 --- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js +++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js @@ -95,7 +95,7 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri } $('#serviceConfig').tooltip({ selector: '[data-toggle=tooltip]', -placement: 'top' +placement: 'in top' }); self.filteredCategoryConfigs(); self.updateReadOnlyFlags(); http://git-wip-us.apache.org/repos/asf/ambari/blob/309b6ebf/ambari-web/app/views/common/configs/widgets/config_widget_view.js -- diff --git a/ambari-web/app/
ambari git commit: AMBARI-19962 Clicking on the login button (or hitting page refresh) to seeing the dashboard takes a while on a 1000-node cluster. (atkach)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ac1444db7 -> 07f30c550 AMBARI-19962 Clicking on the login button (or hitting page refresh) to seeing the dashboard takes a while on a 1000-node cluster. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/07f30c55 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/07f30c55 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/07f30c55 Branch: refs/heads/branch-2.5 Commit: 07f30c550f2d3f5c68f2f4898d0605bc4244600c Parents: ac1444d Author: Andrii Tkach Authored: Fri Feb 10 17:59:58 2017 +0200 Committer: Andrii Tkach Committed: Fri Feb 10 21:38:26 2017 +0200 -- ambari-web/app/router.js | 37 ++ ambari-web/app/utils/ajax/ajax.js | 2 +- 2 files changed, 30 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/07f30c55/ambari-web/app/router.js -- diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index d367ce3..dfe19b5 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -256,16 +256,35 @@ App.Router = Em.Router.extend({ displayLoginName: Em.computed.truncate('loginName', 10, 10), + /** + * @type {$.ajax|null} + */ + clusterDataRequest: null, + + /** + * If request was already sent on login then use saved clusterDataRequest and don't make second call + * @returns {$.ajax} + */ + getClusterDataRequest: function() { +var clusterDataRequest = this.get('clusterDataRequest'); +if (clusterDataRequest) { + this.set('clusterDataRequest', null); + return clusterDataRequest; +} else { + return App.ajax.send({ +name: 'router.login.clusters', +sender: this, +success: 'onAuthenticationSuccess', +error: 'onAuthenticationError' + }); +} + }, + getAuthenticated: function () { var dfd = $.Deferred(); var self = this; var auth = App.db.getAuthenticated(); -App.ajax.send({ - name: 'router.login.clusters', - sender: this, - success: 'onAuthenticationSuccess', - error: 'onAuthenticationError' -}).complete(function (xhr) { +this.getClusterDataRequest().complete(function (xhr) { if (xhr.isResolved()) { // if server knows the user and user authenticated by UI if (auth) { @@ -535,12 +554,12 @@ App.Router = Em.Router.extend({ this.loginGetClustersSuccessCallback(self.get('clusterData'), {}, requestData); } else { - App.ajax.send({ + this.set('clusterDataRequest', App.ajax.send({ name: 'router.login.clusters', sender: self, data: requestData, success: 'loginGetClustersSuccessCallback' - }); + })); } }, @@ -584,6 +603,8 @@ App.Router = Em.Router.extend({ router.transitionToAdminView(); } } +// set cluster name and security type +App.router.get('clusterController').reloadSuccessCallback(clustersData); App.set('isPermissionDataLoaded', true); App.router.get('userSettingsController').dataLoading(); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/07f30c55/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 2ea6113..8881d7a 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2279,7 +2279,7 @@ var urls = { mock: '/data/users/privileges_{userName}.json' }, 'router.login.clusters': { -'real': '/clusters?fields=Clusters/provisioning_state', +'real': '/clusters?fields=Clusters/provisioning_state,Clusters/security_type', 'mock': '/data/clusters/info.json' }, 'router.login.message': {
ambari git commit: AMBARI-19962 Clicking on the login button (or hitting page refresh) to seeing the dashboard takes a while on a 1000-node cluster. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk fe1704e12 -> e8a996184 AMBARI-19962 Clicking on the login button (or hitting page refresh) to seeing the dashboard takes a while on a 1000-node cluster. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e8a99618 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e8a99618 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e8a99618 Branch: refs/heads/trunk Commit: e8a9961841e0eaac2b471526068afabf37d10a35 Parents: fe1704e Author: Andrii Tkach Authored: Fri Feb 10 17:59:58 2017 +0200 Committer: Andrii Tkach Committed: Fri Feb 10 21:37:29 2017 +0200 -- ambari-web/app/router.js | 37 ++ ambari-web/app/utils/ajax/ajax.js | 2 +- 2 files changed, 30 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e8a99618/ambari-web/app/router.js -- diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index d671e86..df54303 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -256,16 +256,35 @@ App.Router = Em.Router.extend({ displayLoginName: Em.computed.truncate('loginName', 10, 10), + /** + * @type {$.ajax|null} + */ + clusterDataRequest: null, + + /** + * If request was already sent on login then use saved clusterDataRequest and don't make second call + * @returns {$.ajax} + */ + getClusterDataRequest: function() { +var clusterDataRequest = this.get('clusterDataRequest'); +if (clusterDataRequest) { + this.set('clusterDataRequest', null); + return clusterDataRequest; +} else { + return App.ajax.send({ +name: 'router.login.clusters', +sender: this, +success: 'onAuthenticationSuccess', +error: 'onAuthenticationError' + }); +} + }, + getAuthenticated: function () { var dfd = $.Deferred(); var self = this; var auth = App.db.getAuthenticated(); -App.ajax.send({ - name: 'router.login.clusters', - sender: this, - success: 'onAuthenticationSuccess', - error: 'onAuthenticationError' -}).complete(function (xhr) { +this.getClusterDataRequest().complete(function (xhr) { if (xhr.state() === 'resolved') { // if server knows the user and user authenticated by UI if (auth) { @@ -535,12 +554,12 @@ App.Router = Em.Router.extend({ this.loginGetClustersSuccessCallback(self.get('clusterData'), {}, requestData); } else { - App.ajax.send({ + this.set('clusterDataRequest', App.ajax.send({ name: 'router.login.clusters', sender: self, data: requestData, success: 'loginGetClustersSuccessCallback' - }); + })); } }, @@ -584,6 +603,8 @@ App.Router = Em.Router.extend({ router.transitionToAdminView(); } } +// set cluster name and security type +App.router.get('clusterController').reloadSuccessCallback(clustersData); App.set('isPermissionDataLoaded', true); App.router.get('loginController').postLogin(true, true); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/e8a99618/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index e344128..ae3947f 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -2290,7 +2290,7 @@ var urls = { mock: '/data/users/privileges_{userName}.json' }, 'router.login.clusters': { -'real': '/clusters?fields=Clusters/provisioning_state', +'real': '/clusters?fields=Clusters/provisioning_state,Clusters/security_type', 'mock': '/data/clusters/info.json' }, 'router.login.message': {
ambari git commit: AMBARI-19963 Deviation alerts fail with "No JSON object could be decoded" (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.5 3a1f0df87 -> ac1444db7 AMBARI-19963 Deviation alerts fail with "No JSON object could be decoded" (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac1444db Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac1444db Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac1444db Branch: refs/heads/branch-2.5 Commit: ac1444db78ca2d13493fd92ce3f70f7036587f38 Parents: 3a1f0df Author: Dmytro Sen Authored: Fri Feb 10 19:56:50 2017 +0200 Committer: Dmytro Sen Committed: Fri Feb 10 19:56:50 2017 +0200 -- .../src/main/python/ambari_commons/network.py | 39 .../package/scripts/metrics_grafana_util.py | 2 +- .../0.1.0/package/scripts/network.py| 39 .../0.1.0/package/scripts/service_check.py | 2 +- .../package/alerts/alert_metrics_deviation.py | 14 +-- .../2.0.6/HDFS/test_alert_metrics_deviation.py | 2 + 6 files changed, 54 insertions(+), 44 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac1444db/ambari-common/src/main/python/ambari_commons/network.py -- diff --git a/ambari-common/src/main/python/ambari_commons/network.py b/ambari-common/src/main/python/ambari_commons/network.py new file mode 100644 index 000..b5b1cd6 --- /dev/null +++ b/ambari-common/src/main/python/ambari_commons/network.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +""" + +import httplib +import ssl + +from resource_management.core.exceptions import Fail + +def get_http_connection(host, port, https_enabled=False, ca_certs=None): + if https_enabled: +if ca_certs: + check_ssl_certificate(host, port, ca_certs) +return httplib.HTTPSConnection(host, port) + else: +return httplib.HTTPConnection(host, port) + +def check_ssl_certificate(host, port, ca_certs): + try: +ssl.get_server_certificate((host, port), ssl_version=ssl.PROTOCOL_SSLv23, ca_certs=ca_certs) + except (ssl.SSLError) as ssl_error: +raise Fail("Failed to verify the SSL certificate for https://{0}:{1} with CA certificate in {2}" + .format(host, port, ca_certs)) http://git-wip-us.apache.org/repos/asf/ambari/blob/ac1444db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py index f8b0011..ea2158a 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py @@ -31,7 +31,7 @@ import random import time import socket import ambari_simplejson as json -import network +import ambari_commons.network as network import os GRAFANA_CONNECT_TRIES = 15 http://git-wip-us.apache.org/repos/asf/ambari/blob/ac1444db/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py deleted file mode 100644 index 672ee53..000 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -""" -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The A
ambari git commit: AMBARI-19963 Deviation alerts fail with "No JSON object could be decoded" (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 33caec24a -> fe1704e12 AMBARI-19963 Deviation alerts fail with "No JSON object could be decoded" (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fe1704e1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fe1704e1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fe1704e1 Branch: refs/heads/trunk Commit: fe1704e12287685f8ca0fed179eb471556eee37b Parents: 33caec2 Author: Dmytro Sen Authored: Fri Feb 10 19:52:40 2017 +0200 Committer: Dmytro Sen Committed: Fri Feb 10 19:52:40 2017 +0200 -- .../src/main/python/ambari_commons/network.py | 39 .../package/scripts/metrics_grafana_util.py | 2 +- .../0.1.0/package/scripts/network.py| 39 .../0.1.0/package/scripts/service_check.py | 2 +- .../package/alerts/alert_metrics_deviation.py | 14 +-- .../package/alerts/alert_metrics_deviation.py | 14 +-- .../2.0.6/HDFS/test_alert_metrics_deviation.py | 2 + 7 files changed, 65 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fe1704e1/ambari-common/src/main/python/ambari_commons/network.py -- diff --git a/ambari-common/src/main/python/ambari_commons/network.py b/ambari-common/src/main/python/ambari_commons/network.py new file mode 100644 index 000..b5b1cd6 --- /dev/null +++ b/ambari-common/src/main/python/ambari_commons/network.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +""" +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +""" + +import httplib +import ssl + +from resource_management.core.exceptions import Fail + +def get_http_connection(host, port, https_enabled=False, ca_certs=None): + if https_enabled: +if ca_certs: + check_ssl_certificate(host, port, ca_certs) +return httplib.HTTPSConnection(host, port) + else: +return httplib.HTTPConnection(host, port) + +def check_ssl_certificate(host, port, ca_certs): + try: +ssl.get_server_certificate((host, port), ssl_version=ssl.PROTOCOL_SSLv23, ca_certs=ca_certs) + except (ssl.SSLError) as ssl_error: +raise Fail("Failed to verify the SSL certificate for https://{0}:{1} with CA certificate in {2}" + .format(host, port, ca_certs)) http://git-wip-us.apache.org/repos/asf/ambari/blob/fe1704e1/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py index 84dcd99..a751330 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py @@ -31,7 +31,7 @@ import random import time import socket import ambari_simplejson as json -import network +import ambari_commons.network as network import os GRAFANA_CONNECT_TRIES = 15 http://git-wip-us.apache.org/repos/asf/ambari/blob/fe1704e1/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py -- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py deleted file mode 100644 index 672ee53..000 --- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/network.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python -""" -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additiona
ambari git commit: AMBARI-19904. Upgrade: Package Install stuck in Installing state forever. (stoader)
Repository: ambari Updated Branches: refs/heads/trunk a0ba7fbe7 -> 33caec24a AMBARI-19904. Upgrade: Package Install stuck in Installing state forever. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/33caec24 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/33caec24 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/33caec24 Branch: refs/heads/trunk Commit: 33caec24a8742666a7190f38f5ebd71c54b2a405 Parents: a0ba7fb Author: Toader, Sebastian Authored: Fri Feb 10 18:38:37 2017 +0100 Committer: Toader, Sebastian Committed: Fri Feb 10 18:38:37 2017 +0100 -- .../server/actionmanager/ActionDBAccessor.java | 5 +- .../actionmanager/ActionDBAccessorImpl.java | 6 +- .../server/actionmanager/ActionScheduler.java | 15 ++--- .../actionmanager/TestActionScheduler.java | 65 +++- 4 files changed, 66 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/33caec24/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 8aef70d..217fe0a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -24,6 +24,7 @@ import java.util.Map; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.agent.CommandReport; import org.apache.ambari.server.agent.ExecutionCommand; +import org.apache.ambari.server.orm.entities.HostRoleCommandEntity; import org.apache.ambari.server.orm.entities.RequestEntity; public interface ActionDBAccessor { @@ -58,8 +59,10 @@ public interface ActionDBAccessor { * Abort all outstanding operations associated with the given request. This * method uses the {@link HostRoleStatus#SCHEDULED_STATES} to determine which * {@link HostRoleCommand} instances to abort. + * + * Returns the list of the aborted operations. */ - public void abortOperation(long requestId); + public Collection abortOperation(long requestId); /** * Mark the task as to have timed out http://git-wip-us.apache.org/repos/asf/ambari/blob/33caec24/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 7837a7b..7881a4b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -202,7 +202,7 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { * {@inheritDoc} */ @Override - public void abortOperation(long requestId) { + public Collection abortOperation(long requestId) { long now = System.currentTimeMillis(); endRequest(requestId); @@ -226,8 +226,10 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { // no need to merge if there's nothing to merge if (!commands.isEmpty()) { - hostRoleCommandDAO.mergeAll(commands); + return hostRoleCommandDAO.mergeAll(commands); } + +return Collections.emptyList(); } /* (non-Javadoc) http://git-wip-us.apache.org/repos/asf/ambari/blob/33caec24/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index fa2ad4f..680c0a6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -929,15 +929,16 @@ class ActionScheduler implements Runnable { ExecutionCommand c = wrapper.getExecutionCommand(); transitionToFailedState(stage.getClusterName(), c.getServiceName(), c.getRole(), hostName, now, true); -if (c.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) { - String clusterName = c.getClusterName(); - processActionDeath(clusterName, - c.getHostname(), -
ambari git commit: AMBARI-19577. Add Livy session recovery configurations in Ambari (Saisai Shao via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk eecb5a311 -> a0ba7fbe7 AMBARI-19577. Add Livy session recovery configurations in Ambari (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a0ba7fbe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0ba7fbe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0ba7fbe Branch: refs/heads/trunk Commit: a0ba7fbe7f80332bcff1cab9ea7dbe27ca59a003 Parents: eecb5a3 Author: Sumit Mohanty Authored: Fri Feb 10 08:36:58 2017 -0800 Committer: Sumit Mohanty Committed: Fri Feb 10 08:42:42 2017 -0800 -- .../SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/setup_livy.py | 8 + .../SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/setup_livy2.py | 8 + .../services/SPARK/configuration/livy-conf.xml | 24 +++ .../SPARK2/configuration/livy2-conf.xml | 24 +++ .../python/stacks/2.5/SPARK/test_spark_livy.py | 31 .../stacks/2.6/SPARK2/test_spark_livy2.py | 31 8 files changed, 128 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ba7fbe/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py index 82cd0b2..6a59caf 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py @@ -222,6 +222,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac user_group = status_params.user_group livy_hdfs_user_dir = format("/user/{livy_user}") livy_server_pid_file = status_params.livy_server_pid_file + livy_recovery_dir = default("/configurations/livy-conf/livy.server.recovery.state-store.url", "/livy-recovery") livy_server_start = format("{livy_home}/bin/livy-server start") livy_server_stop = format("{livy_home}/bin/livy-server stop") http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ba7fbe/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py index 07b704f..32615c3 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py @@ -40,6 +40,14 @@ def setup_livy(env, type, upgrade_type = None, action = None): ) params.HdfsResource(None, action="execute") +params.HdfsResource(params.livy_recovery_dir, + type="directory", + action="create_on_execute", + owner=params.livy_user, + mode=0775 +) +params.HdfsResource(None, action="execute") + # create livy-env.sh in etc/conf dir File(os.path.join(params.livy_conf, 'livy-env.sh'), owner=params.livy_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ba7fbe/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py index c19f88c..b6889e4 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py @@ -207,6 +207,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, sta user_group = status_params.user_group livy2_hdfs_user_dir = format("/user/{livy2_user}") livy2_server_pid_file = status_params.livy2_server_pid_file + livy2_recovery_dir = default("/configurations/livy2-conf/livy.server.recovery.state-store.url", "/livy2-recovery") livy2_server_start = format("{livy2_home}/bin/livy-server start") livy2_server_stop = format("{livy2_home}/bin/livy-server stop") http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ba7fbe/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_
ambari git commit: AMBARI-19577. Add Livy session recovery configurations in Ambari (Saisai Shao via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 e80e86c8c -> 3a1f0df87 AMBARI-19577. Add Livy session recovery configurations in Ambari (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3a1f0df8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3a1f0df8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3a1f0df8 Branch: refs/heads/branch-2.5 Commit: 3a1f0df87480eb8ad4dff6336057ce4da3905f18 Parents: e80e86c Author: Sumit Mohanty Authored: Fri Feb 10 08:36:58 2017 -0800 Committer: Sumit Mohanty Committed: Fri Feb 10 08:36:58 2017 -0800 -- .../SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/setup_livy.py | 8 + .../SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/setup_livy2.py | 8 + .../services/SPARK/configuration/livy-conf.xml | 24 +++ .../SPARK2/configuration/livy2-conf.xml | 24 +++ .../python/stacks/2.5/SPARK/test_spark_livy.py | 31 .../stacks/2.6/SPARK2/test_spark_livy2.py | 31 8 files changed, 128 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1f0df8/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py index 2ae67c4..cd556d7 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py @@ -223,6 +223,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac user_group = status_params.user_group livy_hdfs_user_dir = format("/user/{livy_user}") livy_server_pid_file = status_params.livy_server_pid_file + livy_recovery_dir = default("/configurations/livy-conf/livy.server.recovery.state-store.url", "/livy-recovery") livy_server_start = format("{livy_home}/bin/livy-server start") livy_server_stop = format("{livy_home}/bin/livy-server stop") http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1f0df8/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py index 07b704f..32615c3 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py @@ -40,6 +40,14 @@ def setup_livy(env, type, upgrade_type = None, action = None): ) params.HdfsResource(None, action="execute") +params.HdfsResource(params.livy_recovery_dir, + type="directory", + action="create_on_execute", + owner=params.livy_user, + mode=0775 +) +params.HdfsResource(None, action="execute") + # create livy-env.sh in etc/conf dir File(os.path.join(params.livy_conf, 'livy-env.sh'), owner=params.livy_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1f0df8/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py index 3a70011..66c6100 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py @@ -211,6 +211,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, sta user_group = status_params.user_group livy2_hdfs_user_dir = format("/user/{livy2_user}") livy2_server_pid_file = status_params.livy2_server_pid_file + livy2_recovery_dir = default("/configurations/livy2-conf/livy.server.recovery.state-store.url", "/livy2-recovery") livy2_server_start = format("{livy2_home}/bin/livy-server start") livy2_server_stop = format("{livy2_home}/bin/livy-server stop") http://git-wip-us.apache.org/repos/asf/ambari/blob/3a1f0df8/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scri
ambari git commit: AMBARI-19960 No config properties are changed after deleting service if it's performed after service page refresh. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 6b50e2b96 -> e80e86c8c AMBARI-19960 No config properties are changed after deleting service if it's performed after service page refresh. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e80e86c8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e80e86c8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e80e86c8 Branch: refs/heads/branch-2.5 Commit: e80e86c8cd46438de7ff239b59787eb427d7df1c Parents: 6b50e2b Author: ababiichuk Authored: Fri Feb 10 16:04:21 2017 +0200 Committer: ababiichuk Committed: Fri Feb 10 16:04:21 2017 +0200 -- ambari-web/app/controllers/main/service/item.js | 55 +++- .../test/controllers/main/service/item_test.js | 48 - 2 files changed, 77 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e80e86c8/ambari-web/app/controllers/main/service/item.js -- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index 6f1efd8..11df45a 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -142,8 +142,9 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow * @type {String[]} */ dependentServiceNames: function() { -return App.StackService.find(this.get('content.serviceName')).get('dependentServiceNames'); - }.property('content.serviceName'), +return App.get('router.clusterController.isConfigsPropertiesLoaded') ? + App.StackService.find(this.get('content.serviceName')).get('dependentServiceNames') : []; + }.property('content.serviceName', 'App.router.clusterController.isConfigsPropertiesLoaded'), /** * List of service names that could be deleted @@ -202,32 +203,35 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow */ onLoadConfigsTags: function (data) { var self = this; -var sitesToLoad = this.get('sitesToLoad'), allConfigs = []; -var loadedSites = data.Clusters.desired_configs; -var siteTagsToLoad = []; -for (var site in loadedSites) { - if (sitesToLoad.contains(site)) { -siteTagsToLoad.push({ - siteName: site, - tagName: loadedSites[site].tag -}); + App.get('router.mainController.isLoading').call(App.get('router.clusterController'), 'isConfigsPropertiesLoaded').done(function () { + var sitesToLoad = self.get('sitesToLoad'), +allConfigs = [], +loadedSites = data.Clusters.desired_configs, +siteTagsToLoad = []; + for (var site in loadedSites) { +if (sitesToLoad.contains(site)) { + siteTagsToLoad.push({ +siteName: site, +tagName: loadedSites[site].tag + }); +} } -} - App.router.get('configurationController').getConfigsByTags(siteTagsToLoad).done(function (configs) { - configs.forEach(function (site) { -self.get('configs')[site.type] = site.properties; -allConfigs = allConfigs.concat(App.config.getConfigsFromJSON(site, true)); - }); + App.router.get('configurationController').getConfigsByTags(siteTagsToLoad).done(function (configs) { +configs.forEach(function (site) { + self.get('configs')[site.type] = site.properties; + allConfigs = allConfigs.concat(App.config.getConfigsFromJSON(site, true)); +}); - self.get('dependentServiceNames').forEach(function(serviceName) { -var configTypes = App.StackService.find(serviceName).get('configTypeList'); -var configsByService = allConfigs.filter(function (c) { - return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename'))); +self.get('dependentServiceNames').forEach(function(serviceName) { + var configTypes = App.StackService.find(serviceName).get('configTypeList'); + var configsByService = allConfigs.filter(function (c) { +return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename'))); + }); + self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService)); }); - self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService)); - }); - self.set('isServiceConfigsLoaded', true); +self.set('isServiceConfigsLoaded', true); + }); }); }, @@ -1585,7 +1589,8 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow if (params.servicesToDeleteNext) { this.deleteServiceCall(
ambari git commit: AMBARI-19960 No config properties are changed after deleting service if it's performed after service page refresh. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk c9bea4ab8 -> eecb5a311 AMBARI-19960 No config properties are changed after deleting service if it's performed after service page refresh. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eecb5a31 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eecb5a31 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eecb5a31 Branch: refs/heads/trunk Commit: eecb5a311626f2bab09688d37949f0ccedde86a8 Parents: c9bea4a Author: ababiichuk Authored: Fri Feb 10 16:02:12 2017 +0200 Committer: ababiichuk Committed: Fri Feb 10 18:22:30 2017 +0200 -- ambari-web/app/controllers/main/service/item.js | 67 +++- .../test/controllers/main/service/item_test.js | 46 +- 2 files changed, 81 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eecb5a31/ambari-web/app/controllers/main/service/item.js -- diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js index 7010ab5..a7ed493 100644 --- a/ambari-web/app/controllers/main/service/item.js +++ b/ambari-web/app/controllers/main/service/item.js @@ -144,8 +144,9 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow * @type {String[]} */ dependentServiceNames: function() { -return App.StackService.find(this.get('content.serviceName')).get('dependentServiceNames'); - }.property('content.serviceName'), +return App.get('router.clusterController.isConfigsPropertiesLoaded') ? + App.StackService.find(this.get('content.serviceName')).get('dependentServiceNames') : []; + }.property('content.serviceName', 'App.router.clusterController.isConfigsPropertiesLoaded'), /** * List of service names that could be deleted @@ -204,32 +205,35 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow */ onLoadConfigsTags: function (data) { var self = this; -var sitesToLoad = this.get('sitesToLoad'), allConfigs = []; -var loadedSites = data.Clusters.desired_configs; -var siteTagsToLoad = []; -for (var site in loadedSites) { - if (sitesToLoad.contains(site)) { -siteTagsToLoad.push({ - siteName: site, - tagName: loadedSites[site].tag -}); + App.get('router.mainController.isLoading').call(App.get('router.clusterController'), 'isConfigsPropertiesLoaded').done(function () { + var sitesToLoad = self.get('sitesToLoad'), +allConfigs = [], +loadedSites = data.Clusters.desired_configs, +siteTagsToLoad = []; + for (var site in loadedSites) { +if (sitesToLoad.contains(site)) { + siteTagsToLoad.push({ +siteName: site, +tagName: loadedSites[site].tag + }); +} } -} - App.router.get('configurationController').getConfigsByTags(siteTagsToLoad).done(function (configs) { - configs.forEach(function (site) { -self.get('configs')[site.type] = site.properties; -allConfigs = allConfigs.concat(App.config.getConfigsFromJSON(site, true)); - }); + App.router.get('configurationController').getConfigsByTags(siteTagsToLoad).done(function (configs) { +configs.forEach(function (site) { + self.get('configs')[site.type] = site.properties; + allConfigs = allConfigs.concat(App.config.getConfigsFromJSON(site, true)); +}); - self.get('dependentServiceNames').forEach(function(serviceName) { -var configTypes = App.StackService.find(serviceName).get('configTypeList'); -var configsByService = allConfigs.filter(function (c) { - return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename'))); +self.get('dependentServiceNames').forEach(function(serviceName) { + var configTypes = App.StackService.find(serviceName).get('configTypeList'); + var configsByService = allConfigs.filter(function (c) { +return configTypes.contains(App.config.getConfigTagFromFileName(c.get('filename'))); + }); + self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService)); }); - self.get('stepConfigs').pushObject(App.config.createServiceConfig(serviceName, [], configsByService)); - }); - self.set('isServiceConfigsLoaded', true); +self.set('isServiceConfigsLoaded', true); + }); }); }, @@ -1290,7 +1294,13 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow popupHeader = Em.I18n.t('services.service.delete.popup.header'), pop
ambari git commit: AMBARI-19930. The service check status was set to TIMEOUT even if service check was failed. (mpapirkovskyy)
Repository: ambari Updated Branches: refs/heads/trunk fc9788af1 -> c9bea4ab8 AMBARI-19930. The service check status was set to TIMEOUT even if service check was failed. (mpapirkovskyy) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c9bea4ab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c9bea4ab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c9bea4ab Branch: refs/heads/trunk Commit: c9bea4ab8f8a042e60103e8bb8880fc718fa3cf3 Parents: fc9788a Author: Myroslav Papirkovskyi Authored: Thu Feb 9 20:11:26 2017 +0200 Committer: Myroslav Papirkovskyi Committed: Fri Feb 10 16:00:21 2017 +0200 -- .../server/actionmanager/ActionScheduler.java | 38 +++--- .../actionmanager/TestActionScheduler.java | 54 2 files changed, 53 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c9bea4ab/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index dabcb98..fa2ad4f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -845,6 +845,28 @@ class ActionScheduler implements Runnable { commandsToSchedule.add(c); LOG.trace("===> commandsToSchedule(reschedule)=" + commandsToSchedule.size()); } +} else if (isHostStateUnknown(s, hostObj, roleStr)) { + String message = "Action was aborted due agent is not heartbeating or was restarted."; + LOG.warn("Host: {}, role: {}, actionId: {} . {}", host, roleStr, +s.getActionId(), message); + + db.abortHostRole(host, s.getRequestId(), s.getStageId(), c.getRole(), message); + + if (null != cluster) { +if (!RoleCommand.CUSTOM_COMMAND.equals(c.getRoleCommand()) + && !RoleCommand.SERVICE_CHECK.equals(c.getRoleCommand()) + && !RoleCommand.ACTIONEXECUTE.equals(c.getRoleCommand())) { + //commands above don't affect host component state (e.g. no in_progress state in process), transition will fail + transitionToFailedState(cluster.getClusterName(), c.getServiceName(), roleStr, host, now, false); +} +if (c.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) { + processActionDeath(cluster.getClusterName(), c.getHostname(), roleStr); +} + } + + // Dequeue command + LOG.info("Removing command from queue, host={}, commandId={} ", host, c.getCommandId()); + actionQueue.dequeue(host, c.getCommandId()); } else if (status.equals(HostRoleStatus.PENDING)) { // in case of DEPENDENCY_ORDERED stage command can be scheduled only if all of it's dependencies are // already finished @@ -1030,13 +1052,6 @@ class ActionScheduler implements Runnable { return false; } -// Fast fail task if host state is unknown -if (null != host && - (host.getState().equals(HostState.HEARTBEAT_LOST) || wasAgentRestartedDuringOperation(host, stage, role))) { - LOG.debug("Timing out action since agent is not heartbeating or agent was restarted."); - return true; -} - // tasks are held in a variety of in-memory maps that require a hostname key // host being null is ok - that means it's a server-side task String hostName = (null == host) ? null : host.getHostName(); @@ -1053,6 +1068,15 @@ class ActionScheduler implements Runnable { return false; } + private boolean isHostStateUnknown(Stage stage, Host host, String role) { +if (null != host && + (host.getState().equals(HostState.HEARTBEAT_LOST) || wasAgentRestartedDuringOperation(host, stage, role))) { + LOG.debug("Abort action since agent is not heartbeating or agent was restarted."); + return true; +} +return false; + } + private boolean hasCommandInProgress(Stage stage, String host) { List commandWrappers = stage.getExecutionCommands(host); for (ExecutionCommandWrapper wrapper : commandWrappers) { http://git-wip-us.apache.org/repos/asf/ambari/blob/c9bea4ab/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionScheduler.java b/ambari-server/src/test/java/org/apache/am
[2/3] ambari git commit: AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnich
AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc9788af Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc9788af Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc9788af Branch: refs/heads/trunk Commit: fc9788af1d5c9533de5961e5bc97cf46b2a98b44 Parents: 41034aa Author: Lisnichenko Dmitro Authored: Fri Feb 10 15:16:53 2017 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 10 15:16:53 2017 +0200 -- .../main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml| 6 ++ .../main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml| 1 + .../main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml| 7 +++ .../main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml| 1 + .../main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml| 7 +++ .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml| 1 + 9 files changed, 44 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index eac318e..478f9b4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -511,6 +511,13 @@ yarn-env + +yarn-site + + http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml index 8da11ff..0d4e3b8 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml @@ -319,6 +319,12 @@ + + + Updating underutilized_preemption setting + + + Verifying LZO codec path for mapreduce http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml index 01fc102..58db4a9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml @@ -762,6 +762,7 @@ + http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml index cc50ac5..18f5fa1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml @@ -297,6 +297,13 @@ yarn-env + +yarn-site + + http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml index 046904b..eedf98c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HD
[3/3] ambari git commit: AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnich
AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b50e2b9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b50e2b9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b50e2b9 Branch: refs/heads/branch-2.5 Commit: 6b50e2b960ea8f1225279e34efb99188ba80978d Parents: 0593c87 Author: Lisnichenko Dmitro Authored: Fri Feb 10 15:16:53 2017 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 10 15:17:37 2017 +0200 -- .../main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml| 6 ++ .../main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml| 1 + .../main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml| 7 +++ .../main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml| 1 + .../main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 7 +++ .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml| 7 +++ .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml| 1 + 9 files changed, 44 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml index f86b03d..54072ad 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml @@ -513,6 +513,13 @@ yarn-env + +yarn-site + + http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml index 8b7451e..c64d6ed 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml @@ -319,6 +319,12 @@ + + + Updating underutilized_preemption setting + + + Verifying LZO codec path for mapreduce http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml index 01fc102..58db4a9 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml @@ -762,6 +762,7 @@ + http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml index 57227f6..44a9b7c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml @@ -297,6 +297,13 @@ yarn-env + +yarn-site + + http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml index 5661641..92c5902 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml +++ b/ambari-server/src/main/resources/stac
[1/3] ambari git commit: AMBARI-19768. Broken kill_process_with_children shell single liner (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.5 0593c8792 -> 6b50e2b96 refs/heads/trunk 59545f7fd -> fc9788af1 AMBARI-19768. Broken kill_process_with_children shell single liner (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/41034aa1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/41034aa1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/41034aa1 Branch: refs/heads/trunk Commit: 41034aa157cc7b36f1635064055b83deb5f542bc Parents: 59545f7 Author: Lisnichenko Dmitro Authored: Fri Feb 10 15:15:20 2017 +0200 Committer: Lisnichenko Dmitro Committed: Fri Feb 10 15:15:20 2017 +0200 -- .../python/ambari_agent/TestProcessUtils.py | 224 +++ .../src/test/python/ambari_agent/TestShell.py | 5 +- .../main/python/ambari_commons/process_utils.py | 100 + .../src/main/python/ambari_commons/shell.py | 54 ++--- 4 files changed, 346 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/41034aa1/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py -- diff --git a/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py b/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py new file mode 100644 index 000..8331910 --- /dev/null +++ b/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py @@ -0,0 +1,224 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +''' +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' + +from ambari_agent import main + +main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out" +import unittest +import signal +import subprocess, time +from mock.mock import patch, MagicMock, PropertyMock, call +from ambari_commons import process_utils + +process_tree = {"111": "222\n 22", +"222": "333\n 33", +"22": "44\n 444",} + + +class TestProcessUtils(unittest.TestCase): + @patch("subprocess.Popen") + def test_kill(self, popen_mock): +process_mock = MagicMock() +process_mock.communicate.return_value = (None, None) +returncode_mock = PropertyMock() +returncode_mock.return_value = 0 +type(process_mock).returncode = returncode_mock +popen_mock.return_value = process_mock +process_utils.kill_pids(["12321113230", "2312415453"], signal.SIGTERM) +expected = [call(['kill', '-15', '12321113230', '2312415453'], stderr=-1, stdout=-1)] +self.assertEquals(popen_mock.call_args_list, expected) + + @patch("subprocess.Popen") + def test_get_children(self, popen_mock): + +process_mock = MagicMock() +process_mock.communicate.return_value = ("123 \n \n 321\n", None) +popen_mock.return_value = process_mock +returncode_mock = PropertyMock() +returncode_mock.return_value = 0 +type(process_mock).returncode = returncode_mock +result = process_utils.get_children("2312415453") + +self.assertEquals(result, ["123", "321"]) + +expected = [ + call(['ps', '-o', 'pid', '--no-headers', '--ppid', '2312415453'], stderr=subprocess.PIPE, stdout=subprocess.PIPE)] +self.assertEquals(popen_mock.call_args_list, expected) + + @patch("subprocess.Popen") + def test_get_flat_process_tree(self, popen_mock): +def side_effect(*args, **kwargs): + process_mock = MagicMock() + returncode_mock = PropertyMock() + returncode_mock.return_value = 0 + type(process_mock).returncode = returncode_mock + if args[0][5] in process_tree.keys(): +process_mock.communicate.return_value = (process_tree[args[0][5]], None) + else: +process_mock.communicate.return_value = ("", None) + return process_mock + +popen_mock.side_effect = side_effect +result = process_utils.get_flat_process_tree("111") +self.assertEquals(result, ['111', '222', '333', '33', '22', '44', '444']) + +expected = [call(['ps', '-o', 'pid', '--no-headers', '--ppid', '111'], stderr=-1, stdout=-1), +call(['ps', '-o', 'pid', '--no-headers', '--ppid', '222'], stderr=-1,
ambari git commit: AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true when YARN preemption is enabled.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 8ab8fb8ed -> 0593c8792 AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true when YARN preemption is enabled.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0593c879 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0593c879 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0593c879 Branch: refs/heads/branch-2.5 Commit: 0593c87926582fbcc967e936dce0c89f345f4dc0 Parents: 8ab8fb8 Author: Vitaly Brodetskyi Authored: Fri Feb 10 14:46:10 2017 +0200 Committer: Vitaly Brodetskyi Committed: Fri Feb 10 14:46:10 2017 +0200 -- .../HDP/2.6/services/YARN/configuration/yarn-site.xml | 12 .../resources/stacks/HDP/2.6/services/stack_advisor.py | 12 2 files changed, 24 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0593c879/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml index 58b528e..70a2cbe 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml @@ -23,4 +23,16 @@ When HA is enabled, the class to be used by Clients, AMs and NMs to failover to the Active RM. It should extend org.apache.hadoop.yarn.client.RMFailoverProxyProvider + + yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled +false +This property need to be set to make preemption can happen under a fragmented cluster. + + +yarn-site +yarn.resourcemanager.scheduler.monitor.enable + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/0593c879/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py index e6ebd6f..969c3dd 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py @@ -138,6 +138,18 @@ class HDP26StackAdvisor(HDP25StackAdvisor): elif superset_database_type == "postgresql": putSupersetProperty("SUPERSET_DATABASE_PORT", "5432") + def recommendYARNConfigurations(self, configurations, clusterData, services, hosts): +super(HDP26StackAdvisor, self).recommendYARNConfigurations(configurations, clusterData, services, hosts) +putYarnSiteProperty = self.putProperty(configurations, "yarn-site", services) + +if "yarn-site" in services["configurations"] and \ +"yarn.resourcemanager.scheduler.monitor.enable" in services["configurations"]["yarn-site"]["properties"]: + scheduler_monitor_enabled = services["configurations"]["yarn-site"]["properties"]["yarn.resourcemanager.scheduler.monitor.enable"] + if scheduler_monitor_enabled.lower() == 'true': + putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled', "true") + else: + putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled', "false") + def getMetadataConnectionString(self, database_type): driverDict = { 'mysql': 'jdbc:mysql://{0}:{2}/{1}?createDatabaseIfNotExist=true',
ambari git commit: AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true when YARN preemption is enabled.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk b15b60646 -> 59545f7fd AMBARI-19947. To make sure LLAP preemption happens correctly, should enable priority-utilization.underutilized-preemption.enabled=true when YARN preemption is enabled.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59545f7f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59545f7f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59545f7f Branch: refs/heads/trunk Commit: 59545f7fde971c352c7f7f44a19f436887fcdfe7 Parents: b15b606 Author: Vitaly Brodetskyi Authored: Fri Feb 10 14:41:12 2017 +0200 Committer: Vitaly Brodetskyi Committed: Fri Feb 10 14:41:12 2017 +0200 -- .../YARN/3.0.0.3.0/service_advisor.py| 15 ++- .../2.6/services/YARN/configuration/yarn-site.xml| 12 .../stacks/HDP/2.6/services/stack_advisor.py | 12 .../3.0/services/YARN/configuration/yarn-site.xml| 13 + 4 files changed, 51 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/59545f7f/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py index 30dd474..aecf1e3 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py @@ -130,6 +130,7 @@ class YARNServiceAdvisor(service_advisor.ServiceAdvisor): recommender.recommendYARNConfigurationsFromHDP22(configurations, clusterData, services, hosts) recommender.recommendYARNConfigurationsFromHDP23(configurations, clusterData, services, hosts) recommender.recommendYARNConfigurationsFromHDP25(configurations, clusterData, services, hosts) +recommender.recommendYARNConfigurationsFromHDP26(configurations, clusterData, services, hosts) def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts): """ @@ -435,6 +436,18 @@ class YARNRecommender(service_advisor.ServiceAdvisor): putYarnSiteProperty('yarn.timeline-service.entity-group-fs-store.group-id-plugin-classes', ",".join(timeline_plugin_classes_values)) putYarnSiteProperty('yarn.timeline-service.entity-group-fs-store.group-id-plugin-classpath', ":".join(timeline_plugin_classpath_values)) + + def recommendYARNConfigurationsFromHDP26(self, configurations, clusterData, services, hosts): +putYarnSiteProperty = self.putProperty(configurations, "yarn-site", services) + +if "yarn-site" in services["configurations"] and \ +"yarn.resourcemanager.scheduler.monitor.enable" in services["configurations"]["yarn-site"]["properties"]: + scheduler_monitor_enabled = services["configurations"]["yarn-site"]["properties"]["yarn.resourcemanager.scheduler.monitor.enable"] + if scheduler_monitor_enabled.lower() == 'true': + putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled', "true") + else: + putYarnSiteProperty('yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled', "false") + #region LLAP def updateLlapConfigs(self, configurations, services, hosts, llap_queue_name): """ @@ -1787,4 +1800,4 @@ class MAPREDUCE2Validator(service_advisor.ServiceAdvisor): if yarnAppMapreduceAmCommandOpts > yarnAppMapreduceAmResourceMb: validationItems.append({"config-name": 'yarn.app.mapreduce.am.command-opts', "item": self.getWarnItem("yarn.app.mapreduce.am.command-opts Xmx should be less than yarn.app.mapreduce.am.resource.mb ({0})".format(yarnAppMapreduceAmResourceMb))}) -return self.toConfigurationValidationProblems(validationItems, "mapred-site") \ No newline at end of file +return self.toConfigurationValidationProblems(validationItems, "mapred-site") http://git-wip-us.apache.org/repos/asf/ambari/blob/59545f7f/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml index 58b528e..70a2cbe 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/YAR
ambari git commit: AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and error node (Madhan Mohan Reddy via gauravn7).
Repository: ambari Updated Branches: refs/heads/branch-2.5 bde00d939 -> 8ab8fb8ed AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and error node (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/8ab8fb8e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ab8fb8e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ab8fb8e Branch: refs/heads/branch-2.5 Commit: 8ab8fb8ed698e469c37be3d31f9ee88ae0798a29 Parents: bde00d9 Author: Gaurav Nagar Authored: Fri Feb 10 16:50:55 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 16:51:37 2017 +0530 -- .../resources/ui/app/components/job-details.js | 43 1 file changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ab8fb8e/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js index 6507c49..d1343b0 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js @@ -192,7 +192,7 @@ export default Ember.Component.extend({ var dataNodes = []; var self=this; workflow.nodeVisitor.process(workflow.startNode, function(node) { - if (node.type === 'kill') { + if (node.type === 'kill' && !(node.forceRenderNode || self.getActionNode(node.name, node.type))) { return; } var nodeActionStatus = self.getActionStatus(node.name, node.type); @@ -206,18 +206,28 @@ export default Ember.Component.extend({ }); if (node.transitions.length > 0) { node.transitions.forEach(function(tran){ -if (tran.targetNode.type === 'kill') { - return; -} var transitionBorderColor; var actionNode = self.getActionNode(node.name, node.type); -if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*')){ - transitionBorderColor = Constants.successfulFlowColor;//green +if (tran.targetNode.type === 'kill' && + !((actionNode && actionNode.transition===tran.targetNode.name) || (node.isPlaceholder( { + return; +} + if (tran.getTargetNode(true).isKillNode() && !tran.isOnError()){ + tran.targetNode.forceRenderNode = true; + } +if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*' || (tran.targetNode.isPlaceholder() && actionNode.transition===tran.getTargetNode(true).name))) { + transitionBorderColor = Constants.successfulFlowColor; + if (tran.targetNode.isPlaceholder()) { +tran.targetNode.successfulFlow = true; + } }else{ - transitionBorderColor = Constants.defaultFlowColor;//grey + transitionBorderColor = Constants.defaultFlowColor; } if (!actionNode){ - transitionBorderColor = Constants.defaultFlowColor;//grey + transitionBorderColor = Constants.defaultFlowColor; + if (node.isPlaceholder() && node.successfulFlow) { +transitionBorderColor = Constants.successfulFlowColor; + } } dataNodes.push( { @@ -225,6 +235,7 @@ export default Ember.Component.extend({ id: tran.sourceNodeId + '_to_' + tran.targetNode.id, source:tran.sourceNodeId, target: tran.targetNode.id, + transition: tran, borderColor: transitionBorderColor } } @@ -268,6 +279,14 @@ export default Ember.Component.extend({ } }, { +selector: 'node[type = "placeholder"]', +style: { + width: 1, + height: 1, + label: '' +} + }, + { selector: 'node[shape = "roundrectangle"]', style: { width: 100, @@ -294,7 +313,13 @@ export default Ember.Component.extend({ width: 1, 'line-color': 'data(borderColor)', 'curve-style': 'bezier', - 'target-arrow-shape': 'triangle', + 'target-arrow-shape': function(target){ +if (target.data().transition && target.data().transition.getTargetNode(false) &&
ambari git commit: AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and error node (Madhan Mohan Reddy via gauravn7).
Repository: ambari Updated Branches: refs/heads/trunk 1339d52bb -> b15b60646 AMBARI-19956. Workflow Manager Flow Graph should show line transition to decision path and error node (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/b15b6064 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b15b6064 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b15b6064 Branch: refs/heads/trunk Commit: b15b60646c3d8a0b39579718f48e0076c26a6142 Parents: 1339d52 Author: Gaurav Nagar Authored: Fri Feb 10 16:50:55 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 16:50:55 2017 +0530 -- .../resources/ui/app/components/job-details.js | 43 1 file changed, 34 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b15b6064/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js index 6507c49..d1343b0 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/job-details.js @@ -192,7 +192,7 @@ export default Ember.Component.extend({ var dataNodes = []; var self=this; workflow.nodeVisitor.process(workflow.startNode, function(node) { - if (node.type === 'kill') { + if (node.type === 'kill' && !(node.forceRenderNode || self.getActionNode(node.name, node.type))) { return; } var nodeActionStatus = self.getActionStatus(node.name, node.type); @@ -206,18 +206,28 @@ export default Ember.Component.extend({ }); if (node.transitions.length > 0) { node.transitions.forEach(function(tran){ -if (tran.targetNode.type === 'kill') { - return; -} var transitionBorderColor; var actionNode = self.getActionNode(node.name, node.type); -if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*')){ - transitionBorderColor = Constants.successfulFlowColor;//green +if (tran.targetNode.type === 'kill' && + !((actionNode && actionNode.transition===tran.targetNode.name) || (node.isPlaceholder( { + return; +} + if (tran.getTargetNode(true).isKillNode() && !tran.isOnError()){ + tran.targetNode.forceRenderNode = true; + } +if (actionNode && (actionNode.transition===tran.targetNode.name ||actionNode.transition==='*' || (tran.targetNode.isPlaceholder() && actionNode.transition===tran.getTargetNode(true).name))) { + transitionBorderColor = Constants.successfulFlowColor; + if (tran.targetNode.isPlaceholder()) { +tran.targetNode.successfulFlow = true; + } }else{ - transitionBorderColor = Constants.defaultFlowColor;//grey + transitionBorderColor = Constants.defaultFlowColor; } if (!actionNode){ - transitionBorderColor = Constants.defaultFlowColor;//grey + transitionBorderColor = Constants.defaultFlowColor; + if (node.isPlaceholder() && node.successfulFlow) { +transitionBorderColor = Constants.successfulFlowColor; + } } dataNodes.push( { @@ -225,6 +235,7 @@ export default Ember.Component.extend({ id: tran.sourceNodeId + '_to_' + tran.targetNode.id, source:tran.sourceNodeId, target: tran.targetNode.id, + transition: tran, borderColor: transitionBorderColor } } @@ -268,6 +279,14 @@ export default Ember.Component.extend({ } }, { +selector: 'node[type = "placeholder"]', +style: { + width: 1, + height: 1, + label: '' +} + }, + { selector: 'node[shape = "roundrectangle"]', style: { width: 100, @@ -294,7 +313,13 @@ export default Ember.Component.extend({ width: 1, 'line-color': 'data(borderColor)', 'curve-style': 'bezier', - 'target-arrow-shape': 'triangle', + 'target-arrow-shape': function(target){ +if (target.data().transition && target.data().transition.getTargetNode(false) && !target.d
ambari git commit: AMBARI-19954.Workflow designer is getting hung while importing the workflow.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 ab8af8c40 -> bde00d939 AMBARI-19954.Workflow designer is getting hung while importing the workflow.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bde00d93 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bde00d93 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bde00d93 Branch: refs/heads/branch-2.5 Commit: bde00d939b894a38942ded8487a84efaaa6aed94 Parents: ab8af8c Author: Gaurav Nagar Authored: Fri Feb 10 16:48:56 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 16:48:56 2017 +0530 -- .../ui/app/components/decision-add-branch.js| 3 +- .../ui/app/components/flow-designer.js | 25 ++--- .../ui/app/components/transition-config.js | 2 +- .../ui/app/domain/cytoscape-flow-renderer.js| 38 ++-- .../app/templates/components/flow-designer.hbs | 2 +- 5 files changed, 49 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bde00d93/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js index e4b2224..65d0974 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js @@ -54,8 +54,9 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ } self.set("isInsertAction",false); this.set("newNodeType",null); +this.get('flowRenderer').populateOkToandErrorTONodes(node); var commonTarget=this.findCommonTargetNode(this.workflow.startNode,this.get('node')); -var descendantNodes=this.getDesendantNodes(this.get('node')); +var descendantNodes= this.get('node.validOkToNodes'); if (commonTarget){ descendantNodes.removeObject(commonTarget); descendantNodes.unshiftObject(commonTarget); http://git-wip-us.apache.org/repos/asf/ambari/blob/bde00d93/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 fd7a258..83a1b27 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 @@ -60,7 +60,8 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { previewXml:"", supportedActionTypes:["java", "hive", "pig", "sqoop", "shell", "spark", "map-reduce", "hive2", "sub-workflow", "distcp", "ssh", "FS"], workflow:null, - hoveredWidget:null,/**/ + flowRenderer:null, + hoveredWidget:null, showingConfirmationNewWorkflow:false, showingWorkflowConfigProps:false, workflowSubmitConfigs:{}, @@ -107,16 +108,12 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { var id = 'cy-' + Math.ceil(Math.random() * 1000); this.set('cyId', id); this.sendAction('register', this.get('tabInfo'), this); +this.set('flowRenderer',CytoscapeRenderer.create()); +this.set('workflow',Workflow.create({})); CommonUtils.setTestContext(this); }.on('init'), elementsInserted :function(){ -if (this.useCytoscape){ - this.flowRenderer=CytoscapeRenderer.create({id : this.get('cyId')}); -}else{ - this.flowRenderer=JSPlumbRenderer.create({}); -} this.setConentWidth(); -this.set('workflow',Workflow.create({})); if(this.get("xmlAppPath")){ this.showExistingWorkflow(); return; @@ -241,14 +238,13 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }, nodeRendered: function(){ this.doValidation(); -if(this.get('renderNodeTransitions')){ - this.flowRenderer.onDidUpdate(this,this.get("workflow").startNode,this.get("workflow")); - this.layout(); - this.set('renderNodeTransitions',false); -} this.resize(); this.persistWorkInProgress(); }.on('didUpdate'), + renderTransitions : function(){ + this.flowRenderer.onDidUpdate(this,this.get("workflow").startNode,this.get("workflow")); +this.layout(); + }, resize(){ this.flowRenderer.resize(); }, @@ -261,12 +257,13 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { var canvasHeight=Ember.$(window).hei
ambari git commit: AMBARI-19954.Workflow designer is getting hung while importing the workflow.(Padma Priya N via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk d7e11e9ab -> 1339d52bb AMBARI-19954.Workflow designer is getting hung while importing the workflow.(Padma Priya N via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1339d52b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1339d52b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1339d52b Branch: refs/heads/trunk Commit: 1339d52bb1e685bb363157ac949e52da970113b8 Parents: d7e11e9 Author: Gaurav Nagar Authored: Fri Feb 10 16:48:56 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 16:49:45 2017 +0530 -- .../ui/app/components/decision-add-branch.js| 3 +- .../ui/app/components/flow-designer.js | 25 ++--- .../ui/app/components/transition-config.js | 2 +- .../ui/app/domain/cytoscape-flow-renderer.js| 38 ++-- .../app/templates/components/flow-designer.hbs | 2 +- 5 files changed, 49 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1339d52b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js index e4b2224..65d0974 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/decision-add-branch.js @@ -54,8 +54,9 @@ export default Ember.Component.extend(Validations, FindNodeMixin,{ } self.set("isInsertAction",false); this.set("newNodeType",null); +this.get('flowRenderer').populateOkToandErrorTONodes(node); var commonTarget=this.findCommonTargetNode(this.workflow.startNode,this.get('node')); -var descendantNodes=this.getDesendantNodes(this.get('node')); +var descendantNodes= this.get('node.validOkToNodes'); if (commonTarget){ descendantNodes.removeObject(commonTarget); descendantNodes.unshiftObject(commonTarget); http://git-wip-us.apache.org/repos/asf/ambari/blob/1339d52b/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 fd7a258..83a1b27 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 @@ -60,7 +60,8 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { previewXml:"", supportedActionTypes:["java", "hive", "pig", "sqoop", "shell", "spark", "map-reduce", "hive2", "sub-workflow", "distcp", "ssh", "FS"], workflow:null, - hoveredWidget:null,/**/ + flowRenderer:null, + hoveredWidget:null, showingConfirmationNewWorkflow:false, showingWorkflowConfigProps:false, workflowSubmitConfigs:{}, @@ -107,16 +108,12 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { var id = 'cy-' + Math.ceil(Math.random() * 1000); this.set('cyId', id); this.sendAction('register', this.get('tabInfo'), this); +this.set('flowRenderer',CytoscapeRenderer.create()); +this.set('workflow',Workflow.create({})); CommonUtils.setTestContext(this); }.on('init'), elementsInserted :function(){ -if (this.useCytoscape){ - this.flowRenderer=CytoscapeRenderer.create({id : this.get('cyId')}); -}else{ - this.flowRenderer=JSPlumbRenderer.create({}); -} this.setConentWidth(); -this.set('workflow',Workflow.create({})); if(this.get("xmlAppPath")){ this.showExistingWorkflow(); return; @@ -241,14 +238,13 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { }, nodeRendered: function(){ this.doValidation(); -if(this.get('renderNodeTransitions')){ - this.flowRenderer.onDidUpdate(this,this.get("workflow").startNode,this.get("workflow")); - this.layout(); - this.set('renderNodeTransitions',false); -} this.resize(); this.persistWorkInProgress(); }.on('didUpdate'), + renderTransitions : function(){ + this.flowRenderer.onDidUpdate(this,this.get("workflow").startNode,this.get("workflow")); +this.layout(); + }, resize(){ this.flowRenderer.resize(); }, @@ -261,12 +257,13 @@ export default Ember.Component.extend(FindNodeMixin, Validations, { var canvasHeight=Ember.$(window).height()-pane
ambari git commit: AMBARI-19955 : added the is first row header functionality to upload table (nitirajrathore)
Repository: ambari Updated Branches: refs/heads/branch-2.5 5c0aa2fec -> ab8af8c40 AMBARI-19955 : added the is first row header functionality to upload table (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab8af8c4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab8af8c4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab8af8c4 Branch: refs/heads/branch-2.5 Commit: ab8af8c407efa859ef410ca10c96d20dd8b17fd1 Parents: 5c0aa2f Author: Nitiraj Singh Rathore Authored: Fri Feb 10 16:15:59 2017 +0530 Committer: Nitiraj Singh Rathore Committed: Fri Feb 10 16:15:59 2017 +0530 -- .../ui/app/components/csv-format-params.js | 1 - .../src/main/resources/ui/app/models/column.js | 8 +- .../databases/database/tables/upload-table.js | 199 +++ .../ui/app/services/table-operations.js | 4 +- .../templates/components/csv-format-params.hbs | 12 ++ 5 files changed, 49 insertions(+), 175 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8af8c4/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js b/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js index 7a14ba8..5a8f00d 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js @@ -25,7 +25,6 @@ export default Ember.Component.extend({ DEFAULT_CSV_QUOTE: '"', DEFAULT_CSV_ESCAPE: '\\', DEFAULT_FILE_TYPE: 'CSV', - isFirstRowHeader: false, // is first row header csvParams: Ember.Object.create(), inputFileTypes: Ember.computed(function () { return Helpers.getUploadFileTypes(); http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8af8c4/contrib/views/hive20/src/main/resources/ui/app/models/column.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/models/column.js b/contrib/views/hive20/src/main/resources/ui/app/models/column.js index f38309b..73a9824 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/models/column.js +++ b/contrib/views/hive20/src/main/resources/ui/app/models/column.js @@ -90,9 +90,11 @@ let Column = Ember.Object.extend(Ember.Copyable,{ } else if(this.get('type.hasScale') && this.get('scale') && (this.get('precision') < this.get('scale'))) { this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than scale"}); } - +}else{ + delete this.precision; } + if(this.get('type.hasScale')) { if(Ember.isEmpty(this.get('scale'))) { this.get('errors').pushObject({type: 'scale', error: "Scale cannot be empty"}); @@ -101,8 +103,10 @@ let Column = Ember.Object.extend(Ember.Copyable,{ } else if(this.get('scale') <= 0) { this.get('errors').pushObject({type: 'scale', error: "Scale can only be greater than zero"}); } - +}else{ + delete this.scale; } + return this.get('errors.length') === 0; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8af8c4/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js index ba3260c..0e61905 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js @@ -21,44 +21,31 @@ import NewTable from './new'; import constants from '../../../../utils/constants'; import Column from '../../../../models/column'; import datatypes from '../../../../configs/datatypes'; +import Helpers from '../../../../configs/helpers'; export default NewTable.extend({ COLUMN_NAME_REGEX: "^[a-zA-Z]{1}[a-zA-Z0-9_]*$", TABLE_NAME_REGEX: "^[a-zA-Z]{1}[a-zA-Z0-9_]*$", HDFS_PATH_REGEX: "^[/]{1}.+", // unix path allows everything but here we have to mention full path so starts with / - init: function () { -this._super(); - }, - - COLUMN_NAME_PREFIX : "column", - i18n : Ember.inject.service('i18n'), + i18n : Ember.inject.service("i18n"), jobService: Ember.inject.service(constants.services.jobs), notifyService: Ember.inject.service(constants.services.alertMessages), showErrors: false, - bas
ambari git commit: AMBARI-19955 : added the is first row header functionality to upload table (nitirajrathore)
Repository: ambari Updated Branches: refs/heads/trunk 97994e23f -> d7e11e9ab AMBARI-19955 : added the is first row header functionality to upload table (nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7e11e9a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7e11e9a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7e11e9a Branch: refs/heads/trunk Commit: d7e11e9abfde98618ff90f96b8a0952c30c6bef1 Parents: 97994e2 Author: Nitiraj Singh Rathore Authored: Fri Feb 10 16:15:59 2017 +0530 Committer: Nitiraj Singh Rathore Committed: Fri Feb 10 16:17:49 2017 +0530 -- .../ui/app/components/csv-format-params.js | 1 - .../src/main/resources/ui/app/models/column.js | 8 +- .../databases/database/tables/upload-table.js | 199 +++ .../ui/app/services/table-operations.js | 4 +- .../templates/components/csv-format-params.hbs | 12 ++ 5 files changed, 49 insertions(+), 175 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d7e11e9a/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js b/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js index 7a14ba8..5a8f00d 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/csv-format-params.js @@ -25,7 +25,6 @@ export default Ember.Component.extend({ DEFAULT_CSV_QUOTE: '"', DEFAULT_CSV_ESCAPE: '\\', DEFAULT_FILE_TYPE: 'CSV', - isFirstRowHeader: false, // is first row header csvParams: Ember.Object.create(), inputFileTypes: Ember.computed(function () { return Helpers.getUploadFileTypes(); http://git-wip-us.apache.org/repos/asf/ambari/blob/d7e11e9a/contrib/views/hive20/src/main/resources/ui/app/models/column.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/models/column.js b/contrib/views/hive20/src/main/resources/ui/app/models/column.js index f38309b..73a9824 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/models/column.js +++ b/contrib/views/hive20/src/main/resources/ui/app/models/column.js @@ -90,9 +90,11 @@ let Column = Ember.Object.extend(Ember.Copyable,{ } else if(this.get('type.hasScale') && this.get('scale') && (this.get('precision') < this.get('scale'))) { this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than scale"}); } - +}else{ + delete this.precision; } + if(this.get('type.hasScale')) { if(Ember.isEmpty(this.get('scale'))) { this.get('errors').pushObject({type: 'scale', error: "Scale cannot be empty"}); @@ -101,8 +103,10 @@ let Column = Ember.Object.extend(Ember.Copyable,{ } else if(this.get('scale') <= 0) { this.get('errors').pushObject({type: 'scale', error: "Scale can only be greater than zero"}); } - +}else{ + delete this.scale; } + return this.get('errors.length') === 0; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/d7e11e9a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js index ba3260c..0e61905 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js +++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js @@ -21,44 +21,31 @@ import NewTable from './new'; import constants from '../../../../utils/constants'; import Column from '../../../../models/column'; import datatypes from '../../../../configs/datatypes'; +import Helpers from '../../../../configs/helpers'; export default NewTable.extend({ COLUMN_NAME_REGEX: "^[a-zA-Z]{1}[a-zA-Z0-9_]*$", TABLE_NAME_REGEX: "^[a-zA-Z]{1}[a-zA-Z0-9_]*$", HDFS_PATH_REGEX: "^[/]{1}.+", // unix path allows everything but here we have to mention full path so starts with / - init: function () { -this._super(); - }, - - COLUMN_NAME_PREFIX : "column", - i18n : Ember.inject.service('i18n'), + i18n : Ember.inject.service("i18n"), jobService: Ember.inject.service(constants.services.jobs), notifyService: Ember.inject.service(constants.services.alertMessages), showErrors: false, - baseUrl: "/re
ambari git commit: AMBARI-19418. Support setup queue priority in Ambari - Capacity scheduler view. (Akhil PB via gauravn7)
Repository: ambari Updated Branches: refs/heads/branch-2.5 cd31e0ccf -> 5c0aa2fec AMBARI-19418. Support setup queue priority in Ambari - Capacity scheduler view. (Akhil PB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c0aa2fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c0aa2fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c0aa2fe Branch: refs/heads/branch-2.5 Commit: 5c0aa2fecd67d0c0200555efa3a392a937dff247 Parents: cd31e0c Author: Gaurav Nagar Authored: Fri Feb 10 15:46:59 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 15:47:55 2017 +0530 -- .../main/resources/ui/app/controllers/queue.js | 103 ++- .../main/resources/ui/app/controllers/queues.js | 2 +- .../src/main/resources/ui/app/models/queue.js | 11 ++ .../src/main/resources/ui/app/serializers.js| 5 + .../src/main/resources/ui/app/store.js | 9 ++ .../main/resources/ui/app/templates/queue.hbs | 55 +++--- 6 files changed, 171 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c0aa2fe/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js -- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js index 589dcd0..d3adeb4 100644 --- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js @@ -23,9 +23,9 @@ var _stopState = 'STOPPED'; App.QueueController = Ember.ObjectController.extend({ needs:['queues','configs'], + isPriorityUtilizationSupported: Ember.computed.alias('store.isPriorityUtilizationSupported'), isRangerEnabledForYarn : function() { var isRanger = this.get('controllers.configs.isRangerEnabledForYarn'); -console.log("controllers.queue : isRanger : ", isRanger); if (isRanger == null || typeof isRanger == 'undefined') { return false; } @@ -159,6 +159,16 @@ App.QueueController = Ember.ObjectController.extend({ */ orderingPolicyValues: [null,'fifo', 'fair'], + /** + * Possible array of options for ordering policy + * @type {Array} + */ + orderingPolicyOptions: [ +{label: '', value: null}, +{label: 'FIFO', value: 'fifo'}, +{label: 'Fair', value: 'fair'} + ], + // COMPUTED PROPERTIES @@ -344,6 +354,16 @@ App.QueueController = Ember.ObjectController.extend({ return this.get('content.ordering_policy'); }.property('content.ordering_policy'), + currentLeafQueueOP: function(key, val) { +if (arguments.length > 1 && this.get('content.isLeafQ')) { + if (!this.get('isFairOP')) { +this.send('rollbackProp', 'enable_size_based_weight', this.get('content')); + } + this.set('content.ordering_policy', val || null); +} +return this.get('content.ordering_policy'); + }.property('content.ordering_policy'), + /** * Does ordering policy is equal to 'fair' * @type {Boolean} @@ -372,6 +392,87 @@ App.QueueController = Ember.ObjectController.extend({ }.bind(this)); }.observes('content'), + /** + * Add observer for queue priority. + * Sets ordering_policy=priority-utilization to parent queue if children queues have different priorities + * Also reset back t0 original ordering_policy if children have same zero priorities + * @method priorityObserver + */ + priorityObserver: function() { +if (!this.get('isPriorityUtilizationSupported')) { + return; +} +var parentQueue = this.get('parentQueue'); +if (parentQueue) { + var hasDifferent = this.isChildrenPrioritiesDifferent(parentQueue); + if (hasDifferent) { +this.setOrderingPolicyConfigs(parentQueue); + } else { +this.rollbackOrderingPolicyConfigs(parentQueue); + } +} + }.observes('content.priority'), + + /** + * Returns boolean if children queues have different priorities for a given queue + * @method isChildrenPrioritiesDifferent + */ + isChildrenPrioritiesDifferent: function(queue) { +var hasDifferent = false; +var children = queue.get('childrenQueues'); +var priorities = children.map(function(que) { + return que.get('priority'); +}); +hasDifferent = priorities.some(function(prio) { + return prio > 0; +}); +return hasDifferent; + }, + + /** + * Sets queue ordering_policy=priority-utilization when children queues have different priorities + * @method setOrderingPolicyConfigs + */ + setOrderingPolicyConfigs: function(queue) { +queue.set('ordering_policy', 'priority-utilization');
ambari git commit: AMBARI-19418. Support setup queue priority in Ambari - Capacity scheduler view. (Akhil PB via gauravn7)
Repository: ambari Updated Branches: refs/heads/trunk 92cf56152 -> 97994e23f AMBARI-19418. Support setup queue priority in Ambari - Capacity scheduler view. (Akhil PB via gauravn7) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/97994e23 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97994e23 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97994e23 Branch: refs/heads/trunk Commit: 97994e23f3b6ec71ff9911e43d9c4b135487acba Parents: 92cf561 Author: Gaurav Nagar Authored: Fri Feb 10 15:46:59 2017 +0530 Committer: Gaurav Nagar Committed: Fri Feb 10 15:46:59 2017 +0530 -- .../main/resources/ui/app/controllers/queue.js | 103 ++- .../main/resources/ui/app/controllers/queues.js | 2 +- .../src/main/resources/ui/app/models/queue.js | 11 ++ .../src/main/resources/ui/app/serializers.js| 5 + .../src/main/resources/ui/app/store.js | 9 ++ .../main/resources/ui/app/templates/queue.hbs | 55 +++--- 6 files changed, 171 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/97994e23/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js -- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js index 589dcd0..d3adeb4 100644 --- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js @@ -23,9 +23,9 @@ var _stopState = 'STOPPED'; App.QueueController = Ember.ObjectController.extend({ needs:['queues','configs'], + isPriorityUtilizationSupported: Ember.computed.alias('store.isPriorityUtilizationSupported'), isRangerEnabledForYarn : function() { var isRanger = this.get('controllers.configs.isRangerEnabledForYarn'); -console.log("controllers.queue : isRanger : ", isRanger); if (isRanger == null || typeof isRanger == 'undefined') { return false; } @@ -159,6 +159,16 @@ App.QueueController = Ember.ObjectController.extend({ */ orderingPolicyValues: [null,'fifo', 'fair'], + /** + * Possible array of options for ordering policy + * @type {Array} + */ + orderingPolicyOptions: [ +{label: '', value: null}, +{label: 'FIFO', value: 'fifo'}, +{label: 'Fair', value: 'fair'} + ], + // COMPUTED PROPERTIES @@ -344,6 +354,16 @@ App.QueueController = Ember.ObjectController.extend({ return this.get('content.ordering_policy'); }.property('content.ordering_policy'), + currentLeafQueueOP: function(key, val) { +if (arguments.length > 1 && this.get('content.isLeafQ')) { + if (!this.get('isFairOP')) { +this.send('rollbackProp', 'enable_size_based_weight', this.get('content')); + } + this.set('content.ordering_policy', val || null); +} +return this.get('content.ordering_policy'); + }.property('content.ordering_policy'), + /** * Does ordering policy is equal to 'fair' * @type {Boolean} @@ -372,6 +392,87 @@ App.QueueController = Ember.ObjectController.extend({ }.bind(this)); }.observes('content'), + /** + * Add observer for queue priority. + * Sets ordering_policy=priority-utilization to parent queue if children queues have different priorities + * Also reset back t0 original ordering_policy if children have same zero priorities + * @method priorityObserver + */ + priorityObserver: function() { +if (!this.get('isPriorityUtilizationSupported')) { + return; +} +var parentQueue = this.get('parentQueue'); +if (parentQueue) { + var hasDifferent = this.isChildrenPrioritiesDifferent(parentQueue); + if (hasDifferent) { +this.setOrderingPolicyConfigs(parentQueue); + } else { +this.rollbackOrderingPolicyConfigs(parentQueue); + } +} + }.observes('content.priority'), + + /** + * Returns boolean if children queues have different priorities for a given queue + * @method isChildrenPrioritiesDifferent + */ + isChildrenPrioritiesDifferent: function(queue) { +var hasDifferent = false; +var children = queue.get('childrenQueues'); +var priorities = children.map(function(que) { + return que.get('priority'); +}); +hasDifferent = priorities.some(function(prio) { + return prio > 0; +}); +return hasDifferent; + }, + + /** + * Sets queue ordering_policy=priority-utilization when children queues have different priorities + * @method setOrderingPolicyConfigs + */ + setOrderingPolicyConfigs: function(queue) { +queue.set('ordering_policy', 'priority-utilization'); + }, + +
ambari git commit: AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk 232b585bd -> 92cf56152 AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/92cf5615 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/92cf5615 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/92cf5615 Branch: refs/heads/trunk Commit: 92cf561520572ac65ca6e593729bb13a3edff8e1 Parents: 232b585 Author: Dipayan Bhowmick Authored: Fri Feb 10 15:13:26 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:14:37 2017 +0530 -- .../main/resources/ui/app/components/table-advanced-settings.js | 5 + .../ui/app/templates/components/table-advanced-settings.hbs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/92cf5615/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js index 99a9bb6..5e58cd8 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js @@ -31,6 +31,7 @@ export default Ember.Component.extend({ errors: [], editMode: false, disableTransactionInput: false, + disableNumBucketsInput: false, settings: {}, @@ -72,6 +73,10 @@ export default Ember.Component.extend({ if(!Ember.isEmpty(this.get('settings.transactional')) && this.get('settings.transactional') && this.get('editMode')) { this.set('disableTransactionInput', true); } + +if(!Ember.isEmpty(this.get('settings.numBuckets')) && this.get('settings.numBuckets') && this.get('editMode')) { + this.set('disableNumBucketsInput', true); +} }, locationInputObserver: Ember.observer('showLocationInput', function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/92cf5615/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs index f7a92ce..4aca56d 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs @@ -39,7 +39,7 @@ Number of buckets - {{input type="number" class="form-control" value=settings.numBuckets}} + {{input type="number" class="form-control" value=settings.numBuckets disabled=disableNumBucketsInput}} {{#if hasNumBucketError}} {{numBucketErrorText}} {{/if}}
ambari git commit: AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb)
Repository: ambari Updated Branches: refs/heads/branch-2.5 9fb94ade5 -> cd31e0ccf AMBARI-19950. Hive View 2.0: Restrict user to change the bucket while editing a clustered table. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd31e0cc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd31e0cc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd31e0cc Branch: refs/heads/branch-2.5 Commit: cd31e0ccf21001b7add6e7283ccf719de7b25c80 Parents: 9fb94ad Author: Dipayan Bhowmick Authored: Fri Feb 10 15:13:26 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:13:26 2017 +0530 -- .../main/resources/ui/app/components/table-advanced-settings.js | 5 + .../ui/app/templates/components/table-advanced-settings.hbs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd31e0cc/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js index 99a9bb6..5e58cd8 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/table-advanced-settings.js @@ -31,6 +31,7 @@ export default Ember.Component.extend({ errors: [], editMode: false, disableTransactionInput: false, + disableNumBucketsInput: false, settings: {}, @@ -72,6 +73,10 @@ export default Ember.Component.extend({ if(!Ember.isEmpty(this.get('settings.transactional')) && this.get('settings.transactional') && this.get('editMode')) { this.set('disableTransactionInput', true); } + +if(!Ember.isEmpty(this.get('settings.numBuckets')) && this.get('settings.numBuckets') && this.get('editMode')) { + this.set('disableNumBucketsInput', true); +} }, locationInputObserver: Ember.observer('showLocationInput', function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/cd31e0cc/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs index f7a92ce..4aca56d 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/table-advanced-settings.hbs @@ -39,7 +39,7 @@ Number of buckets - {{input type="number" class="form-control" value=settings.numBuckets}} + {{input type="number" class="form-control" value=settings.numBuckets disabled=disableNumBucketsInput}} {{#if hasNumBucketError}} {{numBucketErrorText}} {{/if}}
ambari git commit: AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk 09e35e1e3 -> 232b585bd AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/232b585b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/232b585b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/232b585b Branch: refs/heads/trunk Commit: 232b585bdd0350f5b2fb8c2c7ebf200cd3286fa7 Parents: 09e35e1 Author: Dipayan Bhowmick Authored: Fri Feb 10 15:09:29 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:10:17 2017 +0530 -- contrib/views/hive20/src/main/resources/ui/app/models/column.js | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/232b585b/contrib/views/hive20/src/main/resources/ui/app/models/column.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/models/column.js b/contrib/views/hive20/src/main/resources/ui/app/models/column.js index 1d9ccce..f38309b 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/models/column.js +++ b/contrib/views/hive20/src/main/resources/ui/app/models/column.js @@ -87,6 +87,8 @@ let Column = Ember.Object.extend(Ember.Copyable,{ this.get('errors').pushObject({type: 'precision', error: "Precision can only be a number"}); } else if(this.get('precision') <= 0) { this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than zero"}); + } else if(this.get('type.hasScale') && this.get('scale') && (this.get('precision') < this.get('scale'))) { +this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than scale"}); } }
ambari git commit: AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb)
Repository: ambari Updated Branches: refs/heads/branch-2.5 20a224cec -> 9fb94ade5 AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9fb94ade Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9fb94ade Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9fb94ade Branch: refs/heads/branch-2.5 Commit: 9fb94ade5fc47aa8731e6cfdfdf9559f29bcb364 Parents: 20a224c Author: Dipayan Bhowmick Authored: Fri Feb 10 15:09:29 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:09:29 2017 +0530 -- contrib/views/hive20/src/main/resources/ui/app/models/column.js | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9fb94ade/contrib/views/hive20/src/main/resources/ui/app/models/column.js -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/models/column.js b/contrib/views/hive20/src/main/resources/ui/app/models/column.js index 1d9ccce..f38309b 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/models/column.js +++ b/contrib/views/hive20/src/main/resources/ui/app/models/column.js @@ -87,6 +87,8 @@ let Column = Ember.Object.extend(Ember.Copyable,{ this.get('errors').pushObject({type: 'precision', error: "Precision can only be a number"}); } else if(this.get('precision') <= 0) { this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than zero"}); + } else if(this.get('type.hasScale') && this.get('scale') && (this.get('precision') < this.get('scale'))) { +this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater than scale"}); } }
ambari git commit: AMBARI-19940. Hive View 2.0: Remove aria tags from templates. (dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk 2ce104231 -> 09e35e1e3 AMBARI-19940. Hive View 2.0: Remove aria tags from templates. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09e35e1e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09e35e1e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09e35e1e Branch: refs/heads/trunk Commit: 09e35e1e3de0206edbf139ed5cbf9a33b470c7f1 Parents: 2ce1042 Author: Dipayan Bhowmick Authored: Fri Feb 10 15:06:13 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:06:46 2017 +0530 -- .../main/resources/ui/app/templates/components/alert-message.hbs | 2 +- .../main/resources/ui/app/templates/components/column-item.hbs | 2 +- .../resources/ui/app/templates/components/confirm-dialog.hbs | 2 +- .../main/resources/ui/app/templates/components/export-result.hbs | 2 +- .../resources/ui/app/templates/components/hdfs-viewer-modal.hbs | 2 +- .../main/resources/ui/app/templates/components/info-dialog.hbs | 2 +- .../resources/ui/app/templates/components/query-result-table.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/databases.hbs | 2 +- .../ui/app/templates/databases/database/tables/table.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/queries/query.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/savedqueries.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/service-check.hbs | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/09e35e1e/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs index ce8d941..2f114f9 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs @@ -17,7 +17,7 @@ }} - × + × {{#fa-stack size=2}} {{fa-icon "circle-thin" stack=2}} http://git-wip-us.apache.org/repos/asf/ambari/blob/09e35e1e/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs index b649d5b..21418c1 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs @@ -75,7 +75,7 @@ container-class="modal-dialog"}} - × + × {{fa-icon "cog" size="lg"}} Advance Column Options http://git-wip-us.apache.org/repos/asf/ambari/blob/09e35e1e/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs index d940237..b62e98b 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs @@ -24,7 +24,7 @@ {{#if closable}} -× +× {{/if}} {{#if titleIcon}}{{fa-icon titleIcon size="lg"}}{{/if}} {{title}} http://git-wip-us.apache.org/repos/asf/ambari/blob/09e35e1e/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs index 0b462cb..69991f1 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs @@ -23,7 +23,7 @@ container-class="modal-dialog"}} -× +× {{#if labelIcon}}{{fa-icon labelIcon size="lg"}}{{/if}} {{label}} http://git-wip-us.apache.org/repos/asf/ambari/blob/09e35e1e/contrib/views/hive20/src/main/resources/ui/app/templates/components/hdfs-viewer-modal
ambari git commit: AMBARI-19940. Hive View 2.0: Remove aria tags from templates. (dipayanb)
Repository: ambari Updated Branches: refs/heads/branch-2.5 13e30b393 -> 20a224cec AMBARI-19940. Hive View 2.0: Remove aria tags from templates. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/20a224ce Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20a224ce Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20a224ce Branch: refs/heads/branch-2.5 Commit: 20a224cecedbda9fe042867cf061ef0d8e8d5172 Parents: 13e30b3 Author: Dipayan Bhowmick Authored: Fri Feb 10 15:06:13 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:06:13 2017 +0530 -- .../main/resources/ui/app/templates/components/alert-message.hbs | 2 +- .../main/resources/ui/app/templates/components/column-item.hbs | 2 +- .../resources/ui/app/templates/components/confirm-dialog.hbs | 2 +- .../main/resources/ui/app/templates/components/export-result.hbs | 2 +- .../resources/ui/app/templates/components/hdfs-viewer-modal.hbs | 2 +- .../main/resources/ui/app/templates/components/info-dialog.hbs | 2 +- .../resources/ui/app/templates/components/query-result-table.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/databases.hbs | 2 +- .../ui/app/templates/databases/database/tables/table.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/queries/query.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/savedqueries.hbs | 4 ++-- .../hive20/src/main/resources/ui/app/templates/service-check.hbs | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/20a224ce/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs index ce8d941..2f114f9 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/alert-message.hbs @@ -17,7 +17,7 @@ }} - × + × {{#fa-stack size=2}} {{fa-icon "circle-thin" stack=2}} http://git-wip-us.apache.org/repos/asf/ambari/blob/20a224ce/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs index b649d5b..21418c1 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/column-item.hbs @@ -75,7 +75,7 @@ container-class="modal-dialog"}} - × + × {{fa-icon "cog" size="lg"}} Advance Column Options http://git-wip-us.apache.org/repos/asf/ambari/blob/20a224ce/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs index d940237..b62e98b 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/confirm-dialog.hbs @@ -24,7 +24,7 @@ {{#if closable}} -× +× {{/if}} {{#if titleIcon}}{{fa-icon titleIcon size="lg"}}{{/if}} {{title}} http://git-wip-us.apache.org/repos/asf/ambari/blob/20a224ce/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs index 0b462cb..69991f1 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/export-result.hbs @@ -23,7 +23,7 @@ container-class="modal-dialog"}} -× +× {{#if labelIcon}}{{fa-icon labelIcon size="lg"}}{{/if}} {{label}} http://git-wip-us.apache.org/repos/asf/ambari/blob/20a224ce/contrib/views/hive20/src/main/resources/ui/app/templates/components/hdfs-vi
ambari git commit: AMBARI-19935. Details of multi-condition Ranger Access policy are not visible in Hive View - Table Authorizations column. (dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk bc8066599 -> 2ce104231 AMBARI-19935. Details of multi-condition Ranger Access policy are not visible in Hive View - Table Authorizations column. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ce10423 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ce10423 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ce10423 Branch: refs/heads/trunk Commit: 2ce10423190f999b794140a270601a62dc6b7f95 Parents: bc80665 Author: Dipayan Bhowmick Authored: Fri Feb 10 14:59:33 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 15:00:03 2017 +0530 -- .../resources/system/ranger/RangerService.java | 32 ++- .../databases/database/tables/table/auth.hbs| 41 2 files changed, 47 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce10423/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java index 9debe42..d300d9a 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java @@ -137,8 +137,9 @@ public class RangerService { JSONArray policyItems = (JSONArray) policyJson.get("policyItems"); Policy policy = new Policy(name); -if (policyItems.size() > 0) { - JSONObject policyItem = (JSONObject) policyItems.get(0); +for(Object item: policyItems) { + PolicyCondition condition = new PolicyCondition(); + JSONObject policyItem = (JSONObject) item; JSONArray usersJson = (JSONArray) policyItem.get("users"); JSONArray groupsJson = (JSONArray) policyItem.get("groups"); JSONArray accesses = (JSONArray) policyItem.get("accesses"); @@ -148,19 +149,20 @@ public class RangerService { JSONObject access = (JSONObject) accessJson; Boolean isAllowed = (Boolean) access.get("isAllowed"); if (isAllowed) { - policy.addAccess((String) access.get("type")); + condition.addAccess((String) access.get("type")); } } for (Object user : usersJson) { -policy.addUser((String) user); +condition.addUser((String) user); } for (Object group : groupsJson) { -policy.addGroup((String) group); +condition.addGroup((String) group); } -} + policy.addCondition(condition); +} return policy; } @@ -266,9 +268,7 @@ public class RangerService { */ public static class Policy { private String name; -private List users = new ArrayList<>(); -private List groups = new ArrayList<>(); -private List accesses = new ArrayList<>(); +private List conditions = new ArrayList<>(); public Policy(String name) { this.name = name; @@ -282,6 +282,20 @@ public class RangerService { this.name = name; } +public List getConditions() { + return conditions; +} + +public void addCondition(PolicyCondition condition) { + this.conditions.add(condition); +} + } + + public static class PolicyCondition { +private List users = new ArrayList<>(); +private List groups = new ArrayList<>(); +private List accesses = new ArrayList<>(); + public List getUsers() { return users; } http://git-wip-us.apache.org/repos/asf/ambari/blob/2ce10423/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs index 416f12f..e00eeb8 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs @@ -25,7 +25,7 @@ - POLICY NAME + USERS GROUPS ACCESS @@ -34,23 +34,30 @@ {{#each model.policies as |policy|}} -{{policy.name}} - - {{#each policy.users as |user|}} -{{user}} - {{/each}} - - - {{#each policy.groups as |group|}}
ambari git commit: AMBARI-19935. Details of multi-condition Ranger Access policy are not visible in Hive View - Table Authorizations column. (dipayanb)
Repository: ambari Updated Branches: refs/heads/branch-2.5 711a92dfa -> 13e30b393 AMBARI-19935. Details of multi-condition Ranger Access policy are not visible in Hive View - Table Authorizations column. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/13e30b39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/13e30b39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/13e30b39 Branch: refs/heads/branch-2.5 Commit: 13e30b393ffefa0bf40422f22498649f0e3bc418 Parents: 711a92d Author: Dipayan Bhowmick Authored: Fri Feb 10 14:59:33 2017 +0530 Committer: Dipayan Bhowmick Committed: Fri Feb 10 14:59:33 2017 +0530 -- .../resources/system/ranger/RangerService.java | 32 ++- .../databases/database/tables/table/auth.hbs| 41 2 files changed, 47 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/13e30b39/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java -- diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java index 9debe42..d300d9a 100644 --- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java +++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/system/ranger/RangerService.java @@ -137,8 +137,9 @@ public class RangerService { JSONArray policyItems = (JSONArray) policyJson.get("policyItems"); Policy policy = new Policy(name); -if (policyItems.size() > 0) { - JSONObject policyItem = (JSONObject) policyItems.get(0); +for(Object item: policyItems) { + PolicyCondition condition = new PolicyCondition(); + JSONObject policyItem = (JSONObject) item; JSONArray usersJson = (JSONArray) policyItem.get("users"); JSONArray groupsJson = (JSONArray) policyItem.get("groups"); JSONArray accesses = (JSONArray) policyItem.get("accesses"); @@ -148,19 +149,20 @@ public class RangerService { JSONObject access = (JSONObject) accessJson; Boolean isAllowed = (Boolean) access.get("isAllowed"); if (isAllowed) { - policy.addAccess((String) access.get("type")); + condition.addAccess((String) access.get("type")); } } for (Object user : usersJson) { -policy.addUser((String) user); +condition.addUser((String) user); } for (Object group : groupsJson) { -policy.addGroup((String) group); +condition.addGroup((String) group); } -} + policy.addCondition(condition); +} return policy; } @@ -266,9 +268,7 @@ public class RangerService { */ public static class Policy { private String name; -private List users = new ArrayList<>(); -private List groups = new ArrayList<>(); -private List accesses = new ArrayList<>(); +private List conditions = new ArrayList<>(); public Policy(String name) { this.name = name; @@ -282,6 +282,20 @@ public class RangerService { this.name = name; } +public List getConditions() { + return conditions; +} + +public void addCondition(PolicyCondition condition) { + this.conditions.add(condition); +} + } + + public static class PolicyCondition { +private List users = new ArrayList<>(); +private List groups = new ArrayList<>(); +private List accesses = new ArrayList<>(); + public List getUsers() { return users; } http://git-wip-us.apache.org/repos/asf/ambari/blob/13e30b39/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs -- diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs index 416f12f..e00eeb8 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs +++ b/contrib/views/hive20/src/main/resources/ui/app/templates/databases/database/tables/table/auth.hbs @@ -25,7 +25,7 @@ - POLICY NAME + USERS GROUPS ACCESS @@ -34,23 +34,30 @@ {{#each model.policies as |policy|}} -{{policy.name}} - - {{#each policy.users as |user|}} -{{user}} - {{/each}} - - - {{#each policy.groups as
ambari git commit: AMBARI-19904. Upgrade: Package Install stuck in Installing state forever. (stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 f4e65c276 -> 711a92dfa AMBARI-19904. Upgrade: Package Install stuck in Installing state forever. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/711a92df Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/711a92df Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/711a92df Branch: refs/heads/branch-2.5 Commit: 711a92dfa60e58d11def0b3fdb2d7c1d1e28 Parents: f4e65c2 Author: Toader, Sebastian Authored: Fri Feb 10 09:57:35 2017 +0100 Committer: Toader, Sebastian Committed: Fri Feb 10 09:58:29 2017 +0100 -- .../server/actionmanager/ActionDBAccessor.java | 5 +- .../actionmanager/ActionDBAccessorImpl.java | 6 +- .../server/actionmanager/ActionScheduler.java | 15 ++--- .../actionmanager/TestActionScheduler.java | 66 +++- 4 files changed, 67 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/711a92df/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java index 8aef70d..217fe0a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessor.java @@ -24,6 +24,7 @@ import java.util.Map; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.agent.CommandReport; import org.apache.ambari.server.agent.ExecutionCommand; +import org.apache.ambari.server.orm.entities.HostRoleCommandEntity; import org.apache.ambari.server.orm.entities.RequestEntity; public interface ActionDBAccessor { @@ -58,8 +59,10 @@ public interface ActionDBAccessor { * Abort all outstanding operations associated with the given request. This * method uses the {@link HostRoleStatus#SCHEDULED_STATES} to determine which * {@link HostRoleCommand} instances to abort. + * + * Returns the list of the aborted operations. */ - public void abortOperation(long requestId); + public Collection abortOperation(long requestId); /** * Mark the task as to have timed out http://git-wip-us.apache.org/repos/asf/ambari/blob/711a92df/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java index 7837a7b..7881a4b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java @@ -202,7 +202,7 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { * {@inheritDoc} */ @Override - public void abortOperation(long requestId) { + public Collection abortOperation(long requestId) { long now = System.currentTimeMillis(); endRequest(requestId); @@ -226,8 +226,10 @@ public class ActionDBAccessorImpl implements ActionDBAccessor { // no need to merge if there's nothing to merge if (!commands.isEmpty()) { - hostRoleCommandDAO.mergeAll(commands); + return hostRoleCommandDAO.mergeAll(commands); } + +return Collections.emptyList(); } /* (non-Javadoc) http://git-wip-us.apache.org/repos/asf/ambari/blob/711a92df/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java index dabcb98..edf182e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java @@ -907,15 +907,16 @@ class ActionScheduler implements Runnable { ExecutionCommand c = wrapper.getExecutionCommand(); transitionToFailedState(stage.getClusterName(), c.getServiceName(), c.getRole(), hostName, now, true); -if (c.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) { - String clusterName = c.getClusterName(); - processActionDeath(clusterName, - c.getHostname(),