ambari git commit: AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-18901 ed6add2f4 -> 7963f5483 AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7963f548 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7963f548 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7963f548 Branch: refs/heads/branch-feature-AMBARI-18901 Commit: 7963f5483d321a7ee9022337f7e35a17e511718a Parents: ed6add2 Author: Vitaly Brodetskyi Authored: Sat Dec 24 00:30:47 2016 +0200 Committer: Vitaly Brodetskyi Committed: Sat Dec 24 00:30:47 2016 +0200 -- .../common-services/HIVE/0.12.0.2.0/package/scripts/hive.py | 8 +--- .../src/test/python/stacks/2.0.6/HIVE/test_hive_client.py| 8 2 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7963f548/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 459105f..67138a4 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 @@ -106,7 +106,9 @@ def hive(name=None): @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def hive(name=None): import params - + hive_client_conf_path = format("{stack_root}/current/{component_directory}/conf") + # Permissions 644 for conf dir (client) files, and 600 for conf.server + mode_identified = 0644 if params.hive_config_dir == hive_client_conf_path else 0600 if name == 'hiveserver2': # copy tarball to HDFS feature not supported if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): @@ -226,7 +228,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0600) +mode=mode_identified) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: @@ -254,7 +256,7 @@ def hive(name=None): File(format("{hive_config_dir}/hive-env.sh"), owner=params.hive_user, group=params.user_group, - mode=0600, + mode=mode_identified, content=InlineTemplate(params.hive_env_sh_template) ) http://git-wip-us.apache.org/repos/asf/ambari/blob/7963f548/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py index 1a7256f..265f040 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py @@ -75,7 +75,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], owner = 'hive', configurations = self.getConfig()['configurations']['hive-site'], @@ -84,7 +84,7 @@ class TestHiveClient(RMFTestCase): content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']), owner = 'hive', group = 'hadoop', - mode = 0600, + mode = 0644, ) self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', @@ -155,7 +155,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConf
ambari git commit: AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 050caf012 -> c2d9c1b72 AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c2d9c1b7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c2d9c1b7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c2d9c1b7 Branch: refs/heads/branch-2.5 Commit: c2d9c1b72a2546b718f00ff5bd300a069cd9366b Parents: 050caf0 Author: Vitaly Brodetskyi Authored: Sat Dec 24 00:20:21 2016 +0200 Committer: Vitaly Brodetskyi Committed: Sat Dec 24 00:20:21 2016 +0200 -- .../common-services/HIVE/0.12.0.2.0/package/scripts/hive.py | 8 +--- .../src/test/python/stacks/2.0.6/HIVE/test_hive_client.py| 8 2 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c2d9c1b7/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 459105f..67138a4 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 @@ -106,7 +106,9 @@ def hive(name=None): @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def hive(name=None): import params - + hive_client_conf_path = format("{stack_root}/current/{component_directory}/conf") + # Permissions 644 for conf dir (client) files, and 600 for conf.server + mode_identified = 0644 if params.hive_config_dir == hive_client_conf_path else 0600 if name == 'hiveserver2': # copy tarball to HDFS feature not supported if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): @@ -226,7 +228,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0600) +mode=mode_identified) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: @@ -254,7 +256,7 @@ def hive(name=None): File(format("{hive_config_dir}/hive-env.sh"), owner=params.hive_user, group=params.user_group, - mode=0600, + mode=mode_identified, content=InlineTemplate(params.hive_env_sh_template) ) http://git-wip-us.apache.org/repos/asf/ambari/blob/c2d9c1b7/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py index 1a7256f..265f040 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py @@ -75,7 +75,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], owner = 'hive', configurations = self.getConfig()['configurations']['hive-site'], @@ -84,7 +84,7 @@ class TestHiveClient(RMFTestCase): content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']), owner = 'hive', group = 'hadoop', - mode = 0600, + mode = 0644, ) self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', @@ -155,7 +155,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConfig()['configuration_attributes']['
ambari git commit: AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 0a1d7c2a9 -> ecaf9b88d AMBARI-19119. Fix hive-site.xml and hive-env.sh permissions for /etc/hive/conf (client) folder from 600 to 644.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ecaf9b88 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ecaf9b88 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ecaf9b88 Branch: refs/heads/trunk Commit: ecaf9b88d4c219e658aad95ec79d8294620ca145 Parents: 0a1d7c2 Author: Vitaly Brodetskyi Authored: Sat Dec 24 00:13:49 2016 +0200 Committer: Vitaly Brodetskyi Committed: Sat Dec 24 00:13:49 2016 +0200 -- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 10 +++--- .../src/test/python/stacks/2.0.6/HIVE/test_hive_client.py | 8 2 files changed, 11 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ecaf9b88/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 6344ed7..ea21c49 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 @@ -48,7 +48,11 @@ from ambari_commons import OSConst @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def hive(name=None): import params - + + hive_client_conf_path = format("{stack_root}/current/{component_directory}/conf") + # Permissions 644 for conf dir (client) files, and 600 for conf.server + mode_identified = 0644 if params.hive_config_dir == hive_client_conf_path else 0600 + Directory(params.hive_etc_dir_prefix, mode=0755 ) @@ -65,7 +69,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0600) +mode=mode_identified) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: @@ -76,7 +80,7 @@ def hive(name=None): owner=params.hive_user, group=params.user_group, content=InlineTemplate(params.hive_env_sh_template), - mode=0600 + mode=mode_identified ) # On some OS this folder could be not exists, so we will create it before pushing there files http://git-wip-us.apache.org/repos/asf/ambari/blob/ecaf9b88/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py index 1a7256f..265f040 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py @@ -75,7 +75,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], owner = 'hive', configurations = self.getConfig()['configurations']['hive-site'], @@ -84,7 +84,7 @@ class TestHiveClient(RMFTestCase): content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']), owner = 'hive', group = 'hadoop', - mode = 0600, + mode = 0644, ) self.assertResourceCalled('Directory', '/etc/security/limits.d', owner = 'root', @@ -155,7 +155,7 @@ class TestHiveClient(RMFTestCase): self.assertResourceCalled('XmlConfig', 'hive-site.xml', group = 'hadoop', conf_dir = '/usr/hdp/current/hive-client/conf', - mode = 0600, + mode = 0644, configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'], owner = 'hive', configurations =
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 972b23fe2 -> 050caf012 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/050caf01 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/050caf01 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/050caf01 Branch: refs/heads/branch-2.5 Commit: 050caf012fffa6101a23ae2c1f18a9c6cc1fd8f7 Parents: 972b23f Author: Balazs Bence Sari Authored: Fri Dec 23 22:15:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 22:16:55 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 203 +++ .../QuickLinksProfileEvaluatorTest.java | 168 +++ .../QuickLinksProfileParserTest.java| 4 +- .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 21 files changed, 841 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f7c14f3..c26eda9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/050caf01/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java -
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 680661193 -> 0a1d7c2a9 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a1d7c2a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a1d7c2a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a1d7c2a Branch: refs/heads/trunk Commit: 0a1d7c2a947a143d94c7338b509809d261625217 Parents: 6806611 Author: Balazs Bence Sari Authored: Fri Dec 23 22:15:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 22:15:18 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 203 +++ .../QuickLinksProfileEvaluatorTest.java | 168 +++ .../QuickLinksProfileParserTest.java| 4 +- .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 21 files changed, 841 insertions(+), 218 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index 72ad764..f589f5d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/0a1d7c2a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/Component.java ---
ambari git commit: AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c91ad2b37 -> 972b23fe2 AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/972b23fe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/972b23fe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/972b23fe Branch: refs/heads/branch-2.5 Commit: 972b23fe224fb918608c460cc57c83fbb03298ef Parents: c91ad2b Author: Attila Magyar Authored: Fri Dec 23 20:15:00 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 20:15:00 2016 +0100 -- .../YARN/2.1.0.2.0/kerberos.json| 3 ++- .../2.1.0.2.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 17 ++--- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../stacks/HDP/2.2/services/YARN/kerberos.json | 3 ++- .../HDP/2.3.ECS/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.3/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.5/services/YARN/kerberos.json | 3 ++- .../stacks/2.0.6/YARN/test_historyserver.py | 8 +- .../stacks/2.0.6/YARN/test_mapreduce2_client.py | 8 +- .../stacks/2.0.6/YARN/test_nodemanager.py | 8 +- .../stacks/2.0.6/YARN/test_resourcemanager.py | 8 +- .../stacks/2.0.6/YARN/test_yarn_client.py | 8 +- 14 files changed, 97 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/972b23fe/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json index 4093431..a8379ee 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json @@ -31,7 +31,8 @@ "yarn.resourcemanager.proxyusers.*.hosts": "", "yarn.resourcemanager.proxyusers.*.users": "", "yarn.resourcemanager.proxy-user-privileges.enabled": "true", -"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "" +"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "", +"yarn.resourcemanager.zk-acl" : "sasl:rm:rwcda" } }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/972b23fe/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 0496995..aa0c4f5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -171,6 +171,7 @@ rm_nodes_exclude_path = default("/configurations/yarn-site/yarn.resourcemanager. rm_nodes_exclude_dir = os.path.dirname(rm_nodes_exclude_path) java64_home = config['hostLevelParams']['java_home'] +java_exec = format("{java64_home}/bin/java") hadoop_ssl_enabled = default("/configurations/core-site/hadoop.ssl.enabled", False) yarn_heapsize = config['configurations']['yarn-env']['yarn_heapsize'] @@ -244,11 +245,17 @@ rm_kinit_cmd = "" yarn_timelineservice_kinit_cmd = "" nodemanager_kinit_cmd = "" +rm_zk_address = config['configurations']['yarn-site']['yarn.resourcemanager.zk-address'] +rm_zk_znode = config['configurations']['yarn-site']['yarn.resourcemanager.zk-state-store.parent-path'] +rm_zk_store_class = config['configurations']['yarn-site']['yarn.resourcemanager.store.class'] + if security_enabled: rm_principal_name = config['configurations']['yarn-site']['yarn.resourcemanager.principal'] rm_principal_name = rm_principal_name.replace('_HOST',hostname.lower()) rm_keytab = config['configurations']['yarn-site']['yarn.resourcemanager.keytab'] rm_kinit_cmd = format("{kinit_path_local} -kt {rm_keytab} {rm_principal_name};") + yarn_jaas_file = os.path.join(config_dir, 'yarn_jaas.conf') + yarn_env_sh_template += format('\nYARN_OPTS="$YARN_OPTS -Dzookeeper.sasl.client=true -Dzookeeper.sasl.client.username=zookeeper -Djava.security.auth.login.config={yarn_jaas_file} -Dzookeeper.sasl.clientconfig=Client"\n') # YARN timeline security options if has_ats: http://git-wi
ambari git commit: AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2051d58a8 -> 680661193 AMBARI-19269. Zookeeper and RM connection is not secure. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/68066119 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/68066119 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/68066119 Branch: refs/heads/trunk Commit: 68066119360dd34a9fc5b4bd52e708fbf7f6b081 Parents: 2051d58 Author: Attila Magyar Authored: Fri Dec 23 19:30:29 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 20:11:03 2016 +0100 -- .../YARN/2.1.0.2.0/kerberos.json| 3 ++- .../2.1.0.2.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 17 ++--- .../YARN/2.1.0.2.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../YARN/3.0.0.3.0/kerberos.json| 3 ++- .../3.0.0.3.0/package/scripts/params_linux.py | 7 ++ .../package/scripts/resourcemanager.py | 16 +++- .../YARN/3.0.0.3.0/package/scripts/yarn.py | 5 .../package/templates/yarn_jaas.conf.j2 | 26 .../stacks/HDP/2.2/services/YARN/kerberos.json | 3 ++- .../HDP/2.3.ECS/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.3/services/YARN/kerberos.json | 3 ++- .../stacks/HDP/2.5/services/YARN/kerberos.json | 3 ++- .../stacks/2.0.6/YARN/test_historyserver.py | 8 +- .../stacks/2.0.6/YARN/test_mapreduce2_client.py | 8 +- .../stacks/2.0.6/YARN/test_nodemanager.py | 8 +- .../stacks/2.0.6/YARN/test_resourcemanager.py | 8 +- .../stacks/2.0.6/YARN/test_yarn_client.py | 8 +- 19 files changed, 152 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/68066119/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json index 4093431..a8379ee 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/kerberos.json @@ -31,7 +31,8 @@ "yarn.resourcemanager.proxyusers.*.hosts": "", "yarn.resourcemanager.proxyusers.*.users": "", "yarn.resourcemanager.proxy-user-privileges.enabled": "true", -"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "" +"yarn.nodemanager.linux-container-executor.cgroups.mount-path": "", +"yarn.resourcemanager.zk-acl" : "sasl:rm:rwcda" } }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/68066119/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 6bf2927..53ea4d6 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -171,6 +171,7 @@ rm_nodes_exclude_path = default("/configurations/yarn-site/yarn.resourcemanager. rm_nodes_exclude_dir = os.path.dirname(rm_nodes_exclude_path) java64_home = config['hostLevelParams']['java_home'] +java_exec = format("{java64_home}/bin/java") hadoop_ssl_enabled = default("/configurations/core-site/hadoop.ssl.enabled", False) yarn_heapsize = config['configurations']['yarn-env']['yarn_heapsize'] @@ -251,11 +252,17 @@ rm_kinit_cmd = "" yarn_timelineservice_kinit_cmd = "" nodemanager_kinit_cmd = "" +rm_zk_address = config['configurations']['yarn-site']['yarn.resourcemanager.zk-address'] +rm_zk_znode = config['configurations']['yarn-site']['yarn.resourcemanager.zk-state-store.parent-path'] +rm_zk_store_class = config['configurations']['yarn-site']['yarn.resourcemanager.store.class'] + if security_enabled: rm_principal_name = config['configurations']['yarn-site']['yarn.resourcemanager.principal'] rm_principal_name = rm_principal_name.replace('_HOST',hostname.lower()) rm_keytab = config['configurations']['yarn-site']['yarn.resourcemanager.keytab'] rm_kinit_cmd = format("{kinit_path_local} -kt {rm_keytab} {rm_principal_name};") + yarn_jaas_file = os.path.join(config_dir, '
ambari git commit: AMBARI-19294. Background Operations popup: no name for operations (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 7c2c14d97 -> 2051d58a8 AMBARI-19294. Background Operations popup: no name for operations (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2051d58a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2051d58a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2051d58a Branch: refs/heads/trunk Commit: 2051d58a8e38b21f1b3e2ce49ca4475e22d89f9c Parents: 7c2c14d Author: Aleksandr Kovalenko Authored: Fri Dec 23 18:39:47 2016 +0200 Committer: Aleksandr Kovalenko Committed: Fri Dec 23 20:21:02 2016 +0200 -- .../controllers/global/background_operations_controller.js | 4 ++-- .../test/controllers/global/background_operations_test.js| 8 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2051d58a/ambari-web/app/controllers/global/background_operations_controller.js -- diff --git a/ambari-web/app/controllers/global/background_operations_controller.js b/ambari-web/app/controllers/global/background_operations_controller.js index 3a011f5..d833661 100644 --- a/ambari-web/app/controllers/global/background_operations_controller.js +++ b/ambari-web/app/controllers/global/background_operations_controller.js @@ -329,10 +329,10 @@ App.BackgroundOperationsController = Em.Controller.extend({ if (requestContext.indexOf(App.BackgroundOperationsController.CommandContexts.PREFIX) !== -1) { context = this.getRequestContextWithPrefix(requestContext); } else { -context.parsedRequestContext = requestContext; +context.requestContext = requestContext; } } else { - context.parsedRequestContext = Em.I18n.t('requestInfo.unspecified'); + context.requestContext = Em.I18n.t('requestInfo.unspecified'); } return context; }, http://git-wip-us.apache.org/repos/asf/ambari/blob/2051d58a/ambari-web/test/controllers/global/background_operations_test.js -- diff --git a/ambari-web/test/controllers/global/background_operations_test.js b/ambari-web/test/controllers/global/background_operations_test.js index 323f090..5517b1e 100644 --- a/ambari-web/test/controllers/global/background_operations_test.js +++ b/ambari-web/test/controllers/global/background_operations_test.js @@ -830,7 +830,7 @@ describe('App.BackgroundOperationsController', function () { beforeEach(function() { sinon.stub(controller, 'getRequestContextWithPrefix').returns({ -parsedRequestContext: 'CTX_WITH_PREFIX' +requestContext: 'CTX_WITH_PREFIX' }); }); @@ -840,19 +840,19 @@ describe('App.BackgroundOperationsController', function () { it("no requestContext specified", function() { expect(controller.parseRequestContext()).to.be.eql({ -parsedRequestContext: Em.I18n.t('requestInfo.unspecified') +requestContext: Em.I18n.t('requestInfo.unspecified') }); }); it("requestContext specified", function() { expect(controller.parseRequestContext('CTX')).to.be.eql({ -parsedRequestContext: 'CTX' +requestContext: 'CTX' }); }); it("requestContext specified with prefix", function() { expect(controller.parseRequestContext(App.BackgroundOperationsController.CommandContexts.PREFIX)).to.be.eql({ -parsedRequestContext: 'CTX_WITH_PREFIX' +requestContext: 'CTX_WITH_PREFIX' }); }); });
ambari git commit: AMBARI-18442. Python UT fail on trunk (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.5 003cebcc8 -> c91ad2b37 AMBARI-18442. Python UT fail on trunk (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c91ad2b3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c91ad2b3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c91ad2b3 Branch: refs/heads/branch-2.5 Commit: c91ad2b37351696d6553a75a29f9480d9c658087 Parents: 003cebc Author: Andrew Onishuk Authored: Thu Sep 22 13:56:14 2016 +0300 Committer: Toader, Sebastian Committed: Fri Dec 23 19:06:23 2016 +0100 -- .../src/test/python/stacks/2.3/ATLAS/test_service_check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c91ad2b3/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py index b9dd736..43ce520 100644 --- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py +++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py @@ -34,7 +34,7 @@ class TestAtlasCheck(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) -self.assertResourceCalled('Execute', 'curl -s -o /dev/null -w "%{http_code}" http://c6401.ambari.apache.org:21000/', +self.assertResourceCalled('Execute', 'curl -k -s -o /dev/null -w "%{http_code}" http://c6401.ambari.apache.org:21000/', user = 'ambari-qa', tries = 5, try_sleep = 10) @@ -54,7 +54,7 @@ class TestAtlasCheck(RMFTestCase): '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com', user = 'ambari-qa') -self.assertResourceCalled('Execute', 'curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{http_code}" https://c6401.ambari.apache.org:21443/', +self.assertResourceCalled('Execute', 'curl -k --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{http_code}" https://c6401.ambari.apache.org:21443/', user = 'ambari-qa', tries = 5, try_sleep = 10)
ambari git commit: AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-18901 354280307 -> ed6add2f4 AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ed6add2f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ed6add2f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ed6add2f Branch: refs/heads/branch-feature-AMBARI-18901 Commit: ed6add2f45bbc59d37fa5cc274214472c8435b9f Parents: 35428030 Author: Vitaly Brodetskyi Authored: Fri Dec 23 19:54:12 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Dec 23 19:54:12 2016 +0200 -- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 38 ++-- .../package/scripts/hive_interactive.py | 20 +- .../stacks/2.0.6/HIVE/test_hive_client.py | 12 +- .../stacks/2.0.6/HIVE/test_hive_metastore.py| 33 ++- .../stacks/2.0.6/HIVE/test_hive_server.py | 22 +- .../stacks/2.1/HIVE/test_hive_metastore.py | 18 +- .../stacks/2.5/HIVE/test_hive_server_int.py | 206 +-- 7 files changed, 241 insertions(+), 108 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ed6add2f/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 792aac3..459105f 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 @@ -109,7 +109,7 @@ def hive(name=None): if name == 'hiveserver2': # copy tarball to HDFS feature not supported -if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): +if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): params.HdfsResource(params.webhcat_apps_dir, type="directory", action="create_on_execute", @@ -226,13 +226,13 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0644) +mode=0600) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: atlas_hook_filepath = os.path.join(params.hive_config_dir, params.atlas_hook_filename) setup_atlas_hook(SERVICE.HIVE, params.hive_atlas_application_properties, atlas_hook_filepath, params.hive_user, params.user_group) - + if name == 'hiveserver2': XmlConfig("hiveserver2-site.xml", conf_dir=params.hive_server_conf_dir, @@ -240,7 +240,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hiveserver2-site'], owner=params.hive_user, group=params.user_group, - mode=0644) + mode=0600) if params.hive_metastore_site_supported and name == 'metastore': XmlConfig("hivemetastore-site.xml", @@ -249,11 +249,12 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hivemetastore-site'], owner=params.hive_user, group=params.user_group, - mode=0644) - + mode=0600) + File(format("{hive_config_dir}/hive-env.sh"), owner=params.hive_user, group=params.user_group, + mode=0600, content=InlineTemplate(params.hive_env_sh_template) ) @@ -286,6 +287,7 @@ def hive(name=None): File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hivemetastore.properties"), owner=params.hive_user, group=params.user_group, + mode=0600, content=Template("hadoop-metrics2-hivemetastore.properties.j2") ) @@ -328,6 +330,7 @@ def hive(name=None): File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hiveserver2.properties"), owner=params.hive_user, group=params.user_group, + mode=0600, content=Template("hadoop-metrics2-hiveserver2.properties.j2") ) @@ -356,11 +359,16 @@ Writes configuration files required by Hive. """ def fill_conf_dir(component_conf_dir): import params + hive_client_conf_path = os.path.realpath(format("{stack_root}/cur
ambari git commit: AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 d146df7ee -> 003cebcc8 AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/003cebcc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/003cebcc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/003cebcc Branch: refs/heads/branch-2.5 Commit: 003cebcc87a0e9e905728ad04d30a93b083ca8e4 Parents: d146df7 Author: Vitaly Brodetskyi Authored: Fri Dec 23 19:47:21 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Dec 23 19:47:21 2016 +0200 -- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 38 ++-- .../package/scripts/hive_interactive.py | 20 +- .../stacks/2.0.6/HIVE/test_hive_client.py | 12 +- .../stacks/2.0.6/HIVE/test_hive_metastore.py| 33 ++- .../stacks/2.0.6/HIVE/test_hive_server.py | 22 +- .../stacks/2.1/HIVE/test_hive_metastore.py | 18 +- .../stacks/2.5/HIVE/test_hive_server_int.py | 206 +-- 7 files changed, 241 insertions(+), 108 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/003cebcc/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 792aac3..459105f 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 @@ -109,7 +109,7 @@ def hive(name=None): if name == 'hiveserver2': # copy tarball to HDFS feature not supported -if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): +if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): params.HdfsResource(params.webhcat_apps_dir, type="directory", action="create_on_execute", @@ -226,13 +226,13 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0644) +mode=0600) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: atlas_hook_filepath = os.path.join(params.hive_config_dir, params.atlas_hook_filename) setup_atlas_hook(SERVICE.HIVE, params.hive_atlas_application_properties, atlas_hook_filepath, params.hive_user, params.user_group) - + if name == 'hiveserver2': XmlConfig("hiveserver2-site.xml", conf_dir=params.hive_server_conf_dir, @@ -240,7 +240,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hiveserver2-site'], owner=params.hive_user, group=params.user_group, - mode=0644) + mode=0600) if params.hive_metastore_site_supported and name == 'metastore': XmlConfig("hivemetastore-site.xml", @@ -249,11 +249,12 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hivemetastore-site'], owner=params.hive_user, group=params.user_group, - mode=0644) - + mode=0600) + File(format("{hive_config_dir}/hive-env.sh"), owner=params.hive_user, group=params.user_group, + mode=0600, content=InlineTemplate(params.hive_env_sh_template) ) @@ -286,6 +287,7 @@ def hive(name=None): File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hivemetastore.properties"), owner=params.hive_user, group=params.user_group, + mode=0600, content=Template("hadoop-metrics2-hivemetastore.properties.j2") ) @@ -328,6 +330,7 @@ def hive(name=None): File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hiveserver2.properties"), owner=params.hive_user, group=params.user_group, + mode=0600, content=Template("hadoop-metrics2-hiveserver2.properties.j2") ) @@ -356,11 +359,16 @@ Writes configuration files required by Hive. """ def fill_conf_dir(component_conf_dir): import params + hive_client_conf_path = os.path.realpath(format("{stack_root}/current/{component_directory}/conf"))
ambari git commit: AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk b536a9cbc -> 7c2c14d97 AMBARI-19005. "conf.server" dir for HIVE1 and HIVE2 should have 700 permission and files in it should have 600 permission.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7c2c14d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7c2c14d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7c2c14d9 Branch: refs/heads/trunk Commit: 7c2c14d976b2099876f1e801a8ddd60c7549c0fc Parents: b536a9c Author: Vitaly Brodetskyi Authored: Fri Dec 23 19:38:41 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Dec 23 19:39:22 2016 +0200 -- .../HIVE/0.12.0.2.0/package/scripts/hive.py | 39 ++-- .../package/scripts/hive_interactive.py | 20 +- .../stacks/2.0.6/HIVE/test_hive_client.py | 12 +- .../stacks/2.0.6/HIVE/test_hive_metastore.py| 33 ++- .../stacks/2.0.6/HIVE/test_hive_server.py | 28 ++- .../stacks/2.1/HIVE/test_hive_metastore.py | 21 +- .../stacks/2.5/HIVE/test_hive_server_int.py | 208 +-- 7 files changed, 248 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7c2c14d9/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 ffc996c..6344ed7 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 @@ -65,7 +65,7 @@ def hive(name=None): configuration_attributes=params.config['configuration_attributes']['hive-site'], owner=params.hive_user, group=params.user_group, -mode=0644) +mode=0600) # Generate atlas-application.properties.xml file if params.enable_atlas_hook: @@ -75,7 +75,8 @@ def hive(name=None): File(format("{hive_config_dir}/hive-env.sh"), owner=params.hive_user, group=params.user_group, - content=InlineTemplate(params.hive_env_sh_template) + content=InlineTemplate(params.hive_env_sh_template), + mode=0600 ) # On some OS this folder could be not exists, so we will create it before pushing there files @@ -115,7 +116,8 @@ def setup_hiveserver2(): File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hiveserver2.properties"), owner=params.hive_user, group=params.user_group, - content=Template("hadoop-metrics2-hiveserver2.properties.j2") + content=Template("hadoop-metrics2-hiveserver2.properties.j2"), + mode=0600 ) XmlConfig("hiveserver2-site.xml", conf_dir=params.hive_server_conf_dir, @@ -123,7 +125,7 @@ def setup_hiveserver2(): configuration_attributes=params.config['configuration_attributes']['hiveserver2-site'], owner=params.hive_user, group=params.user_group, -mode=0644) +mode=0600) # copy tarball to HDFS feature not supported if not (params.stack_version_formatted_major and check_stack_feature(StackFeature.COPY_TARBALL_TO_HDFS, params.stack_version_formatted_major)): @@ -264,12 +266,13 @@ def setup_metastore(): configuration_attributes=params.config['configuration_attributes']['hivemetastore-site'], owner=params.hive_user, group=params.user_group, - mode=0644) + mode=0600) File(os.path.join(params.hive_server_conf_dir, "hadoop-metrics2-hivemetastore.properties"), owner=params.hive_user, group=params.user_group, - content=Template("hadoop-metrics2-hivemetastore.properties.j2") + content=Template("hadoop-metrics2-hivemetastore.properties.j2"), + mode=0600 ) File(params.start_metastore_path, @@ -308,11 +311,15 @@ Writes configuration files required by Hive. """ def fill_conf_dir(component_conf_dir): import params - + hive_client_conf_path = os.path.realpath(format("{stack_root}/current/{component_directory}/conf")) + component_conf_dir = os.path.realpath(component_conf_dir) + mode_identified_for_file = 0644 if component_conf_dir == hive_client_conf_path else 0600 + mode_identified_for_dir = 0755 if component_conf_dir == hive_client_conf_path else 0700 Directory(component_conf_dir, owner=params.hive_user, group=params.user_group, -create_parents = True +create_parents = True, +mode=mode_identified_for_
ambari git commit: AMBARI-19283 - Ambari agent doesn't find alert scripts in a stack extension (Diego Santesteban via tthorpe)
Repository: ambari Updated Branches: refs/heads/trunk c4d8f2dc8 -> b536a9cbc AMBARI-19283 - Ambari agent doesn't find alert scripts in a stack extension (Diego Santesteban via tthorpe) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b536a9cb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b536a9cb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b536a9cb Branch: refs/heads/trunk Commit: b536a9cbcc92be34958b563b395b57ab2ff5ef4b Parents: c4d8f2d Author: Tim Thorpe Authored: Fri Dec 23 09:38:50 2016 -0800 Committer: Tim Thorpe Committed: Fri Dec 23 09:38:50 2016 -0800 -- .../ambari_agent/AlertSchedulerHandler.py | 17 +++--- .../src/main/python/ambari_agent/Controller.py | 12 ++-- .../src/main/python/ambari_agent/FileCache.py | 1 + .../python/ambari_agent/alerts/script_alert.py | 8 +++ .../ambari_agent/TestAlertSchedulerHandler.py | 51 +++- .../src/test/python/ambari_agent/TestAlerts.py | 61 6 files changed, 99 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b536a9cb/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index 65cc8b0..026a5ed 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -48,12 +48,14 @@ class AlertSchedulerHandler(): TYPE_WEB = 'WEB' TYPE_RECOVERY = 'RECOVERY' - def __init__(self, cachedir, stacks_dir, common_services_dir, host_scripts_dir, - cluster_configuration, config, recovery_manager, in_minutes=True): + def __init__(self, cachedir, stacks_dir, common_services_dir, extensions_dir, + host_scripts_dir, cluster_configuration, config, recovery_manager, + in_minutes=True): self.cachedir = cachedir self.stacks_dir = stacks_dir self.common_services_dir = common_services_dir +self.extensions_dir = extensions_dir self.host_scripts_dir = host_scripts_dir self._cluster_configuration = cluster_configuration @@ -308,6 +310,7 @@ class AlertSchedulerHandler(): elif source_type == AlertSchedulerHandler.TYPE_SCRIPT: source['stacks_directory'] = self.stacks_dir source['common_services_directory'] = self.common_services_dir +source['extensions_directory'] = self.extensions_dir source['host_scripts_directory'] = self.host_scripts_dir alert = ScriptAlert(json_definition, source, self.config) elif source_type == AlertSchedulerHandler.TYPE_WEB: @@ -401,10 +404,10 @@ def main(): args = list(sys.argv) del args[0] - + ash = AlertSchedulerHandler(args[0], args[1], args[2], False) ash.start() - + i = 0 try: while i < 10: @@ -412,12 +415,10 @@ def main(): i += 1 except KeyboardInterrupt: pass - + print str(ash.collector().alerts()) - + ash.stop() if __name__ == "__main__": main() - - http://git-wip-us.apache.org/repos/asf/ambari/blob/b536a9cb/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 234795b..a762d3f 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -101,6 +101,7 @@ class Controller(threading.Thread): stacks_cache_dir = os.path.join(cache_dir, FileCache.STACKS_CACHE_DIRECTORY) common_services_cache_dir = os.path.join(cache_dir, FileCache.COMMON_SERVICES_DIRECTORY) +extensions_cache_dir = os.path.join(cache_dir, FileCache.EXTENSIONS_CACHE_DIRECTORY) host_scripts_cache_dir = os.path.join(cache_dir, FileCache.HOST_SCRIPTS_CACHE_DIRECTORY) alerts_cache_dir = os.path.join(cache_dir, FileCache.ALERTS_CACHE_DIRECTORY) cluster_config_cache_dir = os.path.join(cache_dir, FileCache.CLUSTER_CONFIGURATION_CACHE_DIRECTORY) @@ -124,8 +125,9 @@ class Controller(threading.Thread): self.move_data_dir_mount_file() self.alert_scheduler_handler = AlertSchedulerHandler(alerts_cache_dir, - stacks_cache_dir, common_services_cache_dir, host_scripts_cache_dir, - self.cluster_configuration, config, self.recovery_manager) + stacks_cache_dir, common_services_cache_dir, extensions_cache_dir, + host_scripts_cache_dir, self.cluster_configuration, config, + self.recovery_manager) self.alert_scheduler_handler.start() @@
ambari git commit: AMBARI-19283 - Ambari agent doesn't find alert scripts in a stack extension (Diego Santesteban via tthorpe)
Repository: ambari Updated Branches: refs/heads/branch-2.5 f941c6f49 -> d146df7ee AMBARI-19283 - Ambari agent doesn't find alert scripts in a stack extension (Diego Santesteban via tthorpe) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d146df7e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d146df7e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d146df7e Branch: refs/heads/branch-2.5 Commit: d146df7ee8639d5586bd3545adfcafafd5e01d86 Parents: f941c6f Author: Tim Thorpe Authored: Fri Dec 23 09:36:03 2016 -0800 Committer: Tim Thorpe Committed: Fri Dec 23 09:36:03 2016 -0800 -- .../ambari_agent/AlertSchedulerHandler.py | 17 +++--- .../src/main/python/ambari_agent/Controller.py | 12 ++-- .../src/main/python/ambari_agent/FileCache.py | 1 + .../python/ambari_agent/alerts/script_alert.py | 8 +++ .../ambari_agent/TestAlertSchedulerHandler.py | 51 +++- .../src/test/python/ambari_agent/TestAlerts.py | 61 6 files changed, 99 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d146df7e/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py index 65cc8b0..026a5ed 100644 --- a/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py +++ b/ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py @@ -48,12 +48,14 @@ class AlertSchedulerHandler(): TYPE_WEB = 'WEB' TYPE_RECOVERY = 'RECOVERY' - def __init__(self, cachedir, stacks_dir, common_services_dir, host_scripts_dir, - cluster_configuration, config, recovery_manager, in_minutes=True): + def __init__(self, cachedir, stacks_dir, common_services_dir, extensions_dir, + host_scripts_dir, cluster_configuration, config, recovery_manager, + in_minutes=True): self.cachedir = cachedir self.stacks_dir = stacks_dir self.common_services_dir = common_services_dir +self.extensions_dir = extensions_dir self.host_scripts_dir = host_scripts_dir self._cluster_configuration = cluster_configuration @@ -308,6 +310,7 @@ class AlertSchedulerHandler(): elif source_type == AlertSchedulerHandler.TYPE_SCRIPT: source['stacks_directory'] = self.stacks_dir source['common_services_directory'] = self.common_services_dir +source['extensions_directory'] = self.extensions_dir source['host_scripts_directory'] = self.host_scripts_dir alert = ScriptAlert(json_definition, source, self.config) elif source_type == AlertSchedulerHandler.TYPE_WEB: @@ -401,10 +404,10 @@ def main(): args = list(sys.argv) del args[0] - + ash = AlertSchedulerHandler(args[0], args[1], args[2], False) ash.start() - + i = 0 try: while i < 10: @@ -412,12 +415,10 @@ def main(): i += 1 except KeyboardInterrupt: pass - + print str(ash.collector().alerts()) - + ash.stop() if __name__ == "__main__": main() - - http://git-wip-us.apache.org/repos/asf/ambari/blob/d146df7e/ambari-agent/src/main/python/ambari_agent/Controller.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Controller.py b/ambari-agent/src/main/python/ambari_agent/Controller.py index 090938a..672885e 100644 --- a/ambari-agent/src/main/python/ambari_agent/Controller.py +++ b/ambari-agent/src/main/python/ambari_agent/Controller.py @@ -99,6 +99,7 @@ class Controller(threading.Thread): stacks_cache_dir = os.path.join(cache_dir, FileCache.STACKS_CACHE_DIRECTORY) common_services_cache_dir = os.path.join(cache_dir, FileCache.COMMON_SERVICES_DIRECTORY) +extensions_cache_dir = os.path.join(cache_dir, FileCache.EXTENSIONS_CACHE_DIRECTORY) host_scripts_cache_dir = os.path.join(cache_dir, FileCache.HOST_SCRIPTS_CACHE_DIRECTORY) alerts_cache_dir = os.path.join(cache_dir, FileCache.ALERTS_CACHE_DIRECTORY) cluster_config_cache_dir = os.path.join(cache_dir, FileCache.CLUSTER_CONFIGURATION_CACHE_DIRECTORY) @@ -122,8 +123,9 @@ class Controller(threading.Thread): self.move_data_dir_mount_file() self.alert_scheduler_handler = AlertSchedulerHandler(alerts_cache_dir, - stacks_cache_dir, common_services_cache_dir, host_scripts_cache_dir, - self.cluster_configuration, config, self.recovery_manager) + stacks_cache_dir, common_services_cache_dir, extensions_cache_dir, + host_scripts_cache_dir, self.cluster_configuration, config, + self.recovery_manager) self.alert_scheduler_handler.star
ambari git commit: AMBARI-19258 - Extension directories are not properly sync'd to agent nodes
Repository: ambari Updated Branches: refs/heads/branch-2.5 7cd6755db -> f941c6f49 AMBARI-19258 - Extension directories are not properly sync'd to agent nodes Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f941c6f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f941c6f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f941c6f4 Branch: refs/heads/branch-2.5 Commit: f941c6f49158ab1d35d3d4b721db38e4180da14f Parents: 7cd6755 Author: Tim Thorpe Authored: Fri Dec 23 09:22:22 2016 -0800 Committer: Tim Thorpe Committed: Fri Dec 23 09:22:22 2016 -0800 -- .../python/ambari_server/resourceFilesKeeper.py | 20 +- .../src/test/python/TestResourceFilesKeeper.py | 11 +- .../HIVE/configuration/hive-site.xml| 259 +++ .../dummy_extension/HIVE/metainfo.xml | 47 .../dummy_extension/HIVE/package/.hash | 1 + .../HIVE/package/files/startHiveserver2.sh | 22 ++ .../HIVE/package/scripts/status_params.py | 30 +++ .../HIVE/package/templates/hcat-env.sh.j2 | 25 ++ 8 files changed, 413 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f941c6f4/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py -- diff --git a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py index 8047e7d..188f3ff 100644 --- a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py +++ b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py @@ -30,7 +30,7 @@ class KeeperException(Exception): class ResourceFilesKeeper(): """ - This class incapsulates all utility methods for resource files maintenance. + This class encapsulates all utility methods for resource files maintenance. """ HOOKS_DIR="hooks" @@ -40,6 +40,7 @@ class ResourceFilesKeeper(): CUSTOM_ACTIONS_DIR="custom_actions" HOST_SCRIPTS_DIR="host_scripts" DASHBOARDS_DIR="dashboards" + EXTENSIONS_DIR="extensions" # For these directories archives are created ARCHIVABLE_DIRS = [HOOKS_DIR, PACKAGE_DIR] @@ -107,6 +108,14 @@ class ResourceFilesKeeper(): # Iterate over common services directories self._iter_update_directory_archive(valid_common_services) +# archive extensions +extensions_root = os.path.join(self.resources_dir, self.EXTENSIONS_DIR) +self.dbg_out("Updating archives for extensions dirs at {0}...".format(extensions_root)) +valid_extensions = self.list_extensions(extensions_root) +self.dbg_out("Extensions: {0}".format(pprint.pformat(valid_extensions))) +# Iterate over extension directories +self._iter_update_directory_archive(valid_extensions) + # custom actions self._update_resources_subdir_archive(self.CUSTOM_ACTIONS_DIR) @@ -145,6 +154,15 @@ class ResourceFilesKeeper(): except Exception, err: raise KeeperException("Can not list common services: {0}".format(str(err))) + def list_extensions(self, root_dir): +""" +Builds a list of extension directories +""" +try: + return self._list_metainfo_dirs(root_dir) +except Exception, err: + raise KeeperException("Can not list extensions: {0}".format(str(err))) + def update_directory_archive(self, directory): """ If hash sum for directory is not present or differs from saved value, http://git-wip-us.apache.org/repos/asf/ambari/blob/f941c6f4/ambari-server/src/test/python/TestResourceFilesKeeper.py -- diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py index 4801fad..4f7dc52 100644 --- a/ambari-server/src/test/python/TestResourceFilesKeeper.py +++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py @@ -46,6 +46,9 @@ class TestResourceFilesKeeper(TestCase): DUMMY_UNCHANGEABLE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ "dummy_stack" + os.sep + "HIVE" + DUMMY_UNCHANGEABLE_EXTENSION = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ + "dummy_extension" + os.sep + "HIVE" + DUMMY_ACTIVE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ "active_stack" @@ -81,6 +84,7 @@ class TestResourceFilesKeeper(TestCase): "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \ "call('../resources/TestAmbaryServer.samples/" \ "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \ + "call('../resources/TestAmbarySer
ambari git commit: AMBARI-19257 BE changes needed for SNMP Ambari MIB support (dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.5 df52e537c -> 7cd6755db AMBARI-19257 BE changes needed for SNMP Ambari MIB support (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7cd6755d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7cd6755d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7cd6755d Branch: refs/heads/branch-2.5 Commit: 7cd6755dbbe9ec2c7e39e119b55371fbe3cc802a Parents: df52e53 Author: Dmytro Sen Authored: Fri Dec 23 18:55:17 2016 +0200 Committer: Dmytro Sen Committed: Fri Dec 23 18:56:33 2016 +0200 -- .../dispatchers/AmbariSNMPDispatcher.java | 5 +++-- .../apache/ambari/server/state/AlertState.java | 20 +++- .../dispatchers/AmbariSNMPDispatcherTest.java | 8 3 files changed, 22 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7cd6755d/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java index 77e55a4..dcc8aac 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java @@ -56,6 +56,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { public static final String BASE_AMBARI_OID = "1.3.6.1.4.1.18060.16"; public static final String APACHE_AMBARI_TRAPS_OID = BASE_AMBARI_OID + ".0"; +public static final String AMBARI_ALERT_TRAP_OID = APACHE_AMBARI_TRAPS_OID + ".1"; public static final String AMBARI_ALERTS_OID = BASE_AMBARI_OID + ".1"; public static final String AMBARI_ALERT_TABLE_OID = AMBARI_ALERTS_OID + ".1"; public static final String AMBARI_ALERT_ENTRY_OID = AMBARI_ALERT_TABLE_OID + ".1"; @@ -108,7 +109,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { pdu.setType(snmpVersion.getTrapType()); // Set trap oid for PDU -pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(APACHE_AMBARI_TRAPS_OID))); +pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(AMBARI_ALERT_TRAP_OID))); // Set notification body and subject for PDU objects with identifiers specified in dispatch properties. AlertNoticeDispatchService.AlertInfo alertInfo = alertNotification.getAlertInfo(); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_DEFINITION_ID_OID, alertInfo.getAlertDefinitionId()); @@ -116,7 +117,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { addVariableBindingCheckForNull(pdu, AMBARI_ALERT_DEFINITION_HASH_OID, alertInfo.getAlertDefinitionHash()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_NAME_OID, alertInfo.getAlertName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_TEXT_OID, alertInfo.getAlertText()); -addVariableBindingCheckForNull(pdu, AMBARI_ALERT_STATE_OID, alertInfo.getAlertState()); +addVariableBindingCheckForNull(pdu, AMBARI_ALERT_STATE_OID, alertInfo.getAlertState().getIntValue()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_HOST_NAME_OID, alertInfo.getHostName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_SERVICE_NAME_OID, alertInfo.getServiceName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_COMPONENT_NAME_OID, alertInfo.getComponentName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/7cd6755d/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java b/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java index 3bb70e2..8e04eb1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java @@ -24,27 +24,37 @@ public enum AlertState { /** * Alert does not need to be distributed. Normal Operation. */ - OK, + OK(0), /** * Alert indicates there may be an issue. The component may be operating * normally but may be in danger of becoming CRITICAL. */ - WARNING, + WARNING(2), /** * Indicates there is a critical situation that needs to be addressed. */ - CRITICAL, + CRITICAL(3), /** * The state of the alert is not known. */ - UNKNOWN, +
ambari git commit: AMBARI-19257 BE changes needed for SNMP Ambari MIB support (dsen)
Repository: ambari Updated Branches: refs/heads/trunk 50c770ab9 -> c4d8f2dc8 AMBARI-19257 BE changes needed for SNMP Ambari MIB support (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c4d8f2dc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c4d8f2dc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c4d8f2dc Branch: refs/heads/trunk Commit: c4d8f2dc8d28fe6eb42b3bfa102383e089a502f3 Parents: 50c770a Author: Dmytro Sen Authored: Fri Dec 23 18:55:17 2016 +0200 Committer: Dmytro Sen Committed: Fri Dec 23 18:55:17 2016 +0200 -- .../dispatchers/AmbariSNMPDispatcher.java | 5 +++-- .../apache/ambari/server/state/AlertState.java | 20 +++- .../dispatchers/AmbariSNMPDispatcherTest.java | 8 3 files changed, 22 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c4d8f2dc/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java index 62ef31a..86ef07c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AmbariSNMPDispatcher.java @@ -59,6 +59,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { public static final String BASE_AMBARI_OID = "1.3.6.1.4.1.18060.16"; public static final String APACHE_AMBARI_TRAPS_OID = BASE_AMBARI_OID + ".0"; +public static final String AMBARI_ALERT_TRAP_OID = APACHE_AMBARI_TRAPS_OID + ".1"; public static final String AMBARI_ALERTS_OID = BASE_AMBARI_OID + ".1"; public static final String AMBARI_ALERT_TABLE_OID = AMBARI_ALERTS_OID + ".1"; public static final String AMBARI_ALERT_ENTRY_OID = AMBARI_ALERT_TABLE_OID + ".1"; @@ -111,7 +112,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { pdu.setType(snmpVersion.getTrapType()); // Set trap oid for PDU -pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(APACHE_AMBARI_TRAPS_OID))); +pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID, new OID(AMBARI_ALERT_TRAP_OID))); // Set notification body and subject for PDU objects with identifiers specified in dispatch properties. AlertNoticeDispatchService.AlertInfo alertInfo = alertNotification.getAlertInfo(); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_DEFINITION_ID_OID, alertInfo.getAlertDefinitionId()); @@ -119,7 +120,7 @@ public class AmbariSNMPDispatcher extends SNMPDispatcher { addVariableBindingCheckForNull(pdu, AMBARI_ALERT_DEFINITION_HASH_OID, alertInfo.getAlertDefinitionHash()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_NAME_OID, alertInfo.getAlertName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_TEXT_OID, alertInfo.getAlertText()); -addVariableBindingCheckForNull(pdu, AMBARI_ALERT_STATE_OID, alertInfo.getAlertState()); +addVariableBindingCheckForNull(pdu, AMBARI_ALERT_STATE_OID, alertInfo.getAlertState().getIntValue()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_HOST_NAME_OID, alertInfo.getHostName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_SERVICE_NAME_OID, alertInfo.getServiceName()); addVariableBindingCheckForNull(pdu, AMBARI_ALERT_COMPONENT_NAME_OID, alertInfo.getComponentName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/c4d8f2dc/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java b/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java index 3bb70e2..8e04eb1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/AlertState.java @@ -24,27 +24,37 @@ public enum AlertState { /** * Alert does not need to be distributed. Normal Operation. */ - OK, + OK(0), /** * Alert indicates there may be an issue. The component may be operating * normally but may be in danger of becoming CRITICAL. */ - WARNING, + WARNING(2), /** * Indicates there is a critical situation that needs to be addressed. */ - CRITICAL, + CRITICAL(3), /** * The state of the alert is not known. */ - UNKNOWN, + UNKNOWN(1
ambari git commit: AMBARI-19258 - Extension directories are not properly sync'd to agent nodes
Repository: ambari Updated Branches: refs/heads/trunk a934c0315 -> 50c770ab9 AMBARI-19258 - Extension directories are not properly sync'd to agent nodes Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/50c770ab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/50c770ab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/50c770ab Branch: refs/heads/trunk Commit: 50c770ab9edeba6ad72881c4e3dd8d494828e7b4 Parents: a934c03 Author: Tim Thorpe Authored: Fri Dec 23 08:40:25 2016 -0800 Committer: Tim Thorpe Committed: Fri Dec 23 08:40:25 2016 -0800 -- .../python/ambari_server/resourceFilesKeeper.py | 20 +- .../src/test/python/TestResourceFilesKeeper.py | 11 +- .../HIVE/configuration/hive-site.xml| 259 +++ .../dummy_extension/HIVE/metainfo.xml | 47 .../dummy_extension/HIVE/package/.hash | 1 + .../HIVE/package/files/startHiveserver2.sh | 22 ++ .../HIVE/package/scripts/status_params.py | 30 +++ .../HIVE/package/templates/hcat-env.sh.j2 | 25 ++ 8 files changed, 413 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py -- diff --git a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py index 8047e7d..188f3ff 100644 --- a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py +++ b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py @@ -30,7 +30,7 @@ class KeeperException(Exception): class ResourceFilesKeeper(): """ - This class incapsulates all utility methods for resource files maintenance. + This class encapsulates all utility methods for resource files maintenance. """ HOOKS_DIR="hooks" @@ -40,6 +40,7 @@ class ResourceFilesKeeper(): CUSTOM_ACTIONS_DIR="custom_actions" HOST_SCRIPTS_DIR="host_scripts" DASHBOARDS_DIR="dashboards" + EXTENSIONS_DIR="extensions" # For these directories archives are created ARCHIVABLE_DIRS = [HOOKS_DIR, PACKAGE_DIR] @@ -107,6 +108,14 @@ class ResourceFilesKeeper(): # Iterate over common services directories self._iter_update_directory_archive(valid_common_services) +# archive extensions +extensions_root = os.path.join(self.resources_dir, self.EXTENSIONS_DIR) +self.dbg_out("Updating archives for extensions dirs at {0}...".format(extensions_root)) +valid_extensions = self.list_extensions(extensions_root) +self.dbg_out("Extensions: {0}".format(pprint.pformat(valid_extensions))) +# Iterate over extension directories +self._iter_update_directory_archive(valid_extensions) + # custom actions self._update_resources_subdir_archive(self.CUSTOM_ACTIONS_DIR) @@ -145,6 +154,15 @@ class ResourceFilesKeeper(): except Exception, err: raise KeeperException("Can not list common services: {0}".format(str(err))) + def list_extensions(self, root_dir): +""" +Builds a list of extension directories +""" +try: + return self._list_metainfo_dirs(root_dir) +except Exception, err: + raise KeeperException("Can not list extensions: {0}".format(str(err))) + def update_directory_archive(self, directory): """ If hash sum for directory is not present or differs from saved value, http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/python/TestResourceFilesKeeper.py -- diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py index 4801fad..4f7dc52 100644 --- a/ambari-server/src/test/python/TestResourceFilesKeeper.py +++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py @@ -46,6 +46,9 @@ class TestResourceFilesKeeper(TestCase): DUMMY_UNCHANGEABLE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ "dummy_stack" + os.sep + "HIVE" + DUMMY_UNCHANGEABLE_EXTENSION = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ + "dummy_extension" + os.sep + "HIVE" + DUMMY_ACTIVE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \ "active_stack" @@ -81,6 +84,7 @@ class TestResourceFilesKeeper(TestCase): "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \ "call('../resources/TestAmbaryServer.samples/" \ "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \ + "call('../resources/TestAmbaryServer.sample
[1/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
Repository: ambari Updated Branches: refs/heads/branch-2.5 675a02bf1 -> df52e537c http://git-wip-us.apache.org/repos/asf/ambari/blob/df52e537/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index 8865b70..6b29bc3 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -829,7 +829,7 @@ class DefaultStackAdvisor(StackAdvisor): if len(hostsList) != 1: scheme = self.getComponentLayoutSchemes().get(componentName, None) if scheme is not None: -hostIndex = next((index for key, index in scheme.iteritems() if isinstance(key, ( int, long )) and len(hostsList) < key), scheme['else']) +hostIndex = next((index for key, index in scheme.iteritems() if isinstance(key, (int, long)) and len(hostsList) < key), scheme['else']) else: hostIndex = 0 for host in hostsList[hostIndex:]: @@ -864,16 +864,16 @@ class DefaultStackAdvisor(StackAdvisor): """ return {} - """ - Utility method used for validation warnings. - """ def getWarnItem(self, message): +""" +Utility method used for validation warnings. +""" return {"level": "WARN", "message": message} - """ - Utility method used for validation errors. - """ def getErrorItem(self, message): +""" +Utility method used for validation errors. +""" return {"level": "ERROR", "message": message} def getComponentHostNames(self, servicesDict, serviceName, componentName): @@ -1076,6 +1076,49 @@ class DefaultStackAdvisor(StackAdvisor): hostNamesList = [component["hostnames"] for component in componentsList if component["component_name"] == componentName] return hostNamesList[0] if len(hostNamesList) > 0 else [] + def getServiceComponents(self, services, serviceName): +""" +Return list of components for serviceName service + +:type services dict +:type serviceName str +:rtype list +""" +components = [] + +if not services or not serviceName: + return components + +for service in services["services"]: + if service["StackServices"]["service_name"] == serviceName: +components.extend(service["components"]) +break + +return components + + def getHostsForComponent(self, services, serviceName, componentName): +""" +Returns the host(s) on which a requested service's component is hosted. + +:argument services Configuration information for the cluster +:argument serviceName Passed-in service in consideration +:argument componentName Passed-in component in consideration + +:type services dict +:type serviceName str +:type componentName str +:rtype list +""" +hosts_for_component = [] +components = self.getServiceComponents(services, serviceName) + +for component in components: + if component["StackServiceComponents"]["component_name"] == componentName: + hosts_for_component.extend(component["StackServiceComponents"]["hostnames"]) +break + +return hosts_for_component + def getMountPoints(self, hosts): """ Return list of mounts available on the hosts http://git-wip-us.apache.org/repos/asf/ambari/blob/df52e537/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 88dac74..aece4c2 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -254,9 +254,6 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP var changedConfigIds = this.get('changedProperties').map(function(changed) { return App.config.configId(changed.propertyName, changed.propertyFileName); }); -if (this.get('currentlyChangedConfig')) { - return changedConfigIds.contains(App.config.configId(this.get('currentlyChangedConfig.name'), this.get('currentlyChangedConfig.fileName'))); -} return !changedConfigIds.contains(App.config.configId(c.get('name'), c.get('filename'))); }, this).length; }, this).length;
[3/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df52e537 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df52e537 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df52e537 Branch: refs/heads/branch-2.5 Commit: df52e537c11c60363dc80bef778c5016d5b811de Parents: 675a02b Author: Dmytro Sen Authored: Fri Dec 23 18:23:07 2016 +0200 Committer: Dmytro Sen Committed: Fri Dec 23 18:23:07 2016 +0200 -- .../stacks/HDP/2.5/services/stack_advisor.py| 1447 -- .../src/main/resources/stacks/stack_advisor.py | 57 +- .../mixins/common/configs/enhanced_configs.js |3 - 3 files changed, 685 insertions(+), 822 deletions(-) --
[2/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
http://git-wip-us.apache.org/repos/asf/ambari/blob/df52e537/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 50f7b7f..a130566 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 @@ -18,13 +18,13 @@ limitations under the License. """ import math -import traceback from ambari_commons.str_utils import string_set_equals from resource_management.core.logger import Logger from resource_management.core.exceptions import Fail from resource_management.libraries.functions.get_bare_principal import get_bare_principal + class HDP25StackAdvisor(HDP24StackAdvisor): def __init__(self): @@ -94,7 +94,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor): parentItems = super(HDP25StackAdvisor, self).getComponentLayoutValidations(services, hosts) childItems = [] -hsi_hosts = self.__getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") +hsi_hosts = self.getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") if len(hsi_hosts) > 1: message = "Only one host can install HIVE_SERVER_INTERACTIVE. " childItems.append( @@ -139,14 +139,12 @@ class HDP25StackAdvisor(HDP24StackAdvisor): "item": self.getWarnItem( "Should be set to recommended value to report metrics to Ambari Metrics service.")}) - return self.toConfigurationValidationProblems(validationItems, "storm-site") def validateAtlasConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): -application_properties = getSiteProperties(configurations, "application-properties") +application_properties = self.getSiteProperties(configurations, "application-properties") validationItems = [] -# auth_type = application_properties['atlas.authentication.method.ldap.type'] auth_ldap_enable = application_properties['atlas.authentication.method.ldap'].lower() == 'true' Logger.info("Validating Atlas configs, authentication type: %s" % str(auth_type)) @@ -183,7 +181,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): if prop not in application_properties or application_properties[prop] is None or application_properties[prop].strip() == "": validationItems.append({"config-name": prop, "item": self.getErrorItem("If authentication type is %s, this property is required." % auth_type)}) -# if application_properties['atlas.graph.index.search.backend'] == 'solr5' and \ not application_properties['atlas.graph.index.search.solr.zookeeper-url']: @@ -252,13 +249,13 @@ class HDP25StackAdvisor(HDP24StackAdvisor): def validateYarnConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): parentValidationProblems = super(HDP25StackAdvisor, self).validateYARNConfigurations(properties, recommendedDefaults, configurations, services, hosts) -yarn_site_properties = getSiteProperties(configurations, "yarn-site") +yarn_site_properties = self.getSiteProperties(configurations, "yarn-site") servicesList = [service["StackServices"]["service_name"] for service in services["services"]] componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] validationItems = [] -hsi_hosts = self.__getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") +hsi_hosts = self.getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") if len(hsi_hosts) > 0: # HIVE_SERVER_INTERACTIVE is mapped to a host if 'yarn.resourcemanager.work-preserving-recovery.enabled' not in yarn_site_properties or \ @@ -271,124 +268,116 @@ class HDP25StackAdvisor(HDP24StackAdvisor): validationProblems.extend(parentValidationProblems) return validationProblems - """ - Does the following validation checks for HIVE_SERVER_INTERACTIVE's hive-interactive-site configs. - 1. Queue selected in 'hive.llap.daemon.queue.name' config should be sized >= to minimum required to run LLAP - and Hive2 app. - 2. Queue selected in 'hive.llap.daemon.queue.name' config state should not be 'STOPPED'. - 3. 'hive.server2.enable.doAs' config should be set to 'false' for Hive2. - 4. 'Maximum Total Concurrent Queries'(hive.server2.tez.sessions.per.default.queue) should not consume more that 50% of selected queue for LLAP. - 5. if 'llap' queue is selected, in order to run Service Checks, 'remaining available capacity' in c
[1/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
Repository: ambari Updated Branches: refs/heads/trunk 2304971d0 -> a934c0315 http://git-wip-us.apache.org/repos/asf/ambari/blob/a934c031/ambari-server/src/main/resources/stacks/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/stack_advisor.py b/ambari-server/src/main/resources/stacks/stack_advisor.py index 8865b70..6b29bc3 100644 --- a/ambari-server/src/main/resources/stacks/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/stack_advisor.py @@ -829,7 +829,7 @@ class DefaultStackAdvisor(StackAdvisor): if len(hostsList) != 1: scheme = self.getComponentLayoutSchemes().get(componentName, None) if scheme is not None: -hostIndex = next((index for key, index in scheme.iteritems() if isinstance(key, ( int, long )) and len(hostsList) < key), scheme['else']) +hostIndex = next((index for key, index in scheme.iteritems() if isinstance(key, (int, long)) and len(hostsList) < key), scheme['else']) else: hostIndex = 0 for host in hostsList[hostIndex:]: @@ -864,16 +864,16 @@ class DefaultStackAdvisor(StackAdvisor): """ return {} - """ - Utility method used for validation warnings. - """ def getWarnItem(self, message): +""" +Utility method used for validation warnings. +""" return {"level": "WARN", "message": message} - """ - Utility method used for validation errors. - """ def getErrorItem(self, message): +""" +Utility method used for validation errors. +""" return {"level": "ERROR", "message": message} def getComponentHostNames(self, servicesDict, serviceName, componentName): @@ -1076,6 +1076,49 @@ class DefaultStackAdvisor(StackAdvisor): hostNamesList = [component["hostnames"] for component in componentsList if component["component_name"] == componentName] return hostNamesList[0] if len(hostNamesList) > 0 else [] + def getServiceComponents(self, services, serviceName): +""" +Return list of components for serviceName service + +:type services dict +:type serviceName str +:rtype list +""" +components = [] + +if not services or not serviceName: + return components + +for service in services["services"]: + if service["StackServices"]["service_name"] == serviceName: +components.extend(service["components"]) +break + +return components + + def getHostsForComponent(self, services, serviceName, componentName): +""" +Returns the host(s) on which a requested service's component is hosted. + +:argument services Configuration information for the cluster +:argument serviceName Passed-in service in consideration +:argument componentName Passed-in component in consideration + +:type services dict +:type serviceName str +:type componentName str +:rtype list +""" +hosts_for_component = [] +components = self.getServiceComponents(services, serviceName) + +for component in components: + if component["StackServiceComponents"]["component_name"] == componentName: + hosts_for_component.extend(component["StackServiceComponents"]["hostnames"]) +break + +return hosts_for_component + def getMountPoints(self, hosts): """ Return list of mounts available on the hosts http://git-wip-us.apache.org/repos/asf/ambari/blob/a934c031/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index f92aac1..071b056 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -316,9 +316,6 @@ App.EnhancedConfigsMixin = Em.Mixin.create(App.ConfigWithOverrideRecommendationP var changedConfigIds = this.get('changedProperties').map(function(changed) { return App.config.configId(changed.propertyName, changed.propertyFileName); }); -if (this.get('currentlyChangedConfig')) { - return changedConfigIds.contains(App.config.configId(this.get('currentlyChangedConfig.name'), this.get('currentlyChangedConfig.fileName'))); -} return !changedConfigIds.contains(App.config.configId(c.get('name'), c.get('filename'))); }, this).length; }, this).length);
[2/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
http://git-wip-us.apache.org/repos/asf/ambari/blob/a934c031/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 50f7b7f..a130566 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 @@ -18,13 +18,13 @@ limitations under the License. """ import math -import traceback from ambari_commons.str_utils import string_set_equals from resource_management.core.logger import Logger from resource_management.core.exceptions import Fail from resource_management.libraries.functions.get_bare_principal import get_bare_principal + class HDP25StackAdvisor(HDP24StackAdvisor): def __init__(self): @@ -94,7 +94,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor): parentItems = super(HDP25StackAdvisor, self).getComponentLayoutValidations(services, hosts) childItems = [] -hsi_hosts = self.__getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") +hsi_hosts = self.getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") if len(hsi_hosts) > 1: message = "Only one host can install HIVE_SERVER_INTERACTIVE. " childItems.append( @@ -139,14 +139,12 @@ class HDP25StackAdvisor(HDP24StackAdvisor): "item": self.getWarnItem( "Should be set to recommended value to report metrics to Ambari Metrics service.")}) - return self.toConfigurationValidationProblems(validationItems, "storm-site") def validateAtlasConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): -application_properties = getSiteProperties(configurations, "application-properties") +application_properties = self.getSiteProperties(configurations, "application-properties") validationItems = [] -# auth_type = application_properties['atlas.authentication.method.ldap.type'] auth_ldap_enable = application_properties['atlas.authentication.method.ldap'].lower() == 'true' Logger.info("Validating Atlas configs, authentication type: %s" % str(auth_type)) @@ -183,7 +181,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): if prop not in application_properties or application_properties[prop] is None or application_properties[prop].strip() == "": validationItems.append({"config-name": prop, "item": self.getErrorItem("If authentication type is %s, this property is required." % auth_type)}) -# if application_properties['atlas.graph.index.search.backend'] == 'solr5' and \ not application_properties['atlas.graph.index.search.solr.zookeeper-url']: @@ -252,13 +249,13 @@ class HDP25StackAdvisor(HDP24StackAdvisor): def validateYarnConfigurations(self, properties, recommendedDefaults, configurations, services, hosts): parentValidationProblems = super(HDP25StackAdvisor, self).validateYARNConfigurations(properties, recommendedDefaults, configurations, services, hosts) -yarn_site_properties = getSiteProperties(configurations, "yarn-site") +yarn_site_properties = self.getSiteProperties(configurations, "yarn-site") servicesList = [service["StackServices"]["service_name"] for service in services["services"]] componentsListList = [service["components"] for service in services["services"]] componentsList = [item["StackServiceComponents"] for sublist in componentsListList for item in sublist] validationItems = [] -hsi_hosts = self.__getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") +hsi_hosts = self.getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") if len(hsi_hosts) > 0: # HIVE_SERVER_INTERACTIVE is mapped to a host if 'yarn.resourcemanager.work-preserving-recovery.enabled' not in yarn_site_properties or \ @@ -271,124 +268,116 @@ class HDP25StackAdvisor(HDP24StackAdvisor): validationProblems.extend(parentValidationProblems) return validationProblems - """ - Does the following validation checks for HIVE_SERVER_INTERACTIVE's hive-interactive-site configs. - 1. Queue selected in 'hive.llap.daemon.queue.name' config should be sized >= to minimum required to run LLAP - and Hive2 app. - 2. Queue selected in 'hive.llap.daemon.queue.name' config state should not be 'STOPPED'. - 3. 'hive.server2.enable.doAs' config should be set to 'false' for Hive2. - 4. 'Maximum Total Concurrent Queries'(hive.server2.tez.sessions.per.default.queue) should not consume more that 50% of selected queue for LLAP. - 5. if 'llap' queue is selected, in order to run Service Checks, 'remaining available capacity' in c
[3/3] ambari git commit: AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen)
AMBARI-19171 Configuring YARN with custom queues leads to misleading errors in Stack Advisor (dgrinenko via dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a934c031 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a934c031 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a934c031 Branch: refs/heads/trunk Commit: a934c03153afe1cb1d464ad6e9c22107025935ca Parents: 2304971 Author: Dmytro Sen Authored: Fri Dec 23 18:16:11 2016 +0200 Committer: Dmytro Sen Committed: Fri Dec 23 18:16:11 2016 +0200 -- .../stacks/HDP/2.5/services/stack_advisor.py| 1447 -- .../src/main/resources/stacks/stack_advisor.py | 57 +- .../mixins/common/configs/enhanced_configs.js |3 - 3 files changed, 685 insertions(+), 822 deletions(-) --
ambari git commit: AMBARI-19285 - HOU pre-checks indicate HA as a requirement (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/branch-2.5 0878b7e5f -> 675a02bf1 AMBARI-19285 - HOU pre-checks indicate HA as a requirement (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/675a02bf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/675a02bf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/675a02bf Branch: refs/heads/branch-2.5 Commit: 675a02bf1898cab0c9e31b7d0cfde8dbf59a9540 Parents: 0878b7e5 Author: Jonathan Hurley Authored: Thu Dec 22 12:07:25 2016 -0500 Committer: Jonathan Hurley Committed: Fri Dec 23 11:05:00 2016 -0500 -- .../server/checks/AbstractCheckDescriptor.java | 22 +++- .../ambari/server/checks/CheckDescription.java | 6 -- .../server/checks/ClientRetryPropertyCheck.java | 5 +- .../checks/ComponentsInstallationCheck.java | 6 +- .../server/checks/ConfigurationMergeCheck.java | 5 +- .../HardcodedStackVersionPropertiesCheck.java | 6 +- .../ambari/server/checks/HealthCheck.java | 5 +- .../HiveDynamicServiceDiscoveryCheck.java | 6 +- .../server/checks/HiveNotRollingWarning.java| 2 +- .../server/checks/HostMaintenanceModeCheck.java | 5 +- .../server/checks/HostsHeartbeatCheck.java | 6 +- .../checks/HostsMasterMaintenanceCheck.java | 7 +- .../checks/HostsRepositoryVersionCheck.java | 5 +- .../server/checks/InstallPackagesCheck.java | 6 +- .../server/checks/PreviousUpgradeCompleted.java | 32 +++--- .../server/checks/RangerPasswordCheck.java | 6 +- .../checks/ServiceCheckValidityCheck.java | 5 +- .../checks/ServicesMaintenanceModeCheck.java| 8 +- .../ambari/server/checks/ServicesUpCheck.java | 6 +- .../server/checks/StormRestAPIDeletedCheck.java | 108 --- .../server/checks/StormShutdownWarning.java | 2 +- .../ambari/server/checks/UpgradeCheck.java | 14 ++- .../server/checks/UpgradeCheckRegistry.java | 2 +- .../server/checks/VersionMismatchCheck.java | 6 +- .../HDP/2.5/upgrades/host-upgrade-2.5.xml | 12 --- .../checks/AbstractCheckDescriptorTest.java | 70 26 files changed, 189 insertions(+), 174 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/675a02bf/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java index 4bc64d4..27fc2c0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java @@ -38,7 +38,9 @@ import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.PrereqCheckType; import org.apache.ambari.server.state.stack.PrerequisiteCheck; +import org.apache.ambari.server.state.stack.UpgradePack; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; +import org.apache.ambari.server.state.stack.upgrade.UpgradeType; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -284,13 +286,23 @@ public abstract class AbstractCheckDescriptor { } /** - * Return the optionality flag of the Upgrade Check - * @return + * Gets whether this upgrade check is required for the specified + * {@link UpgradeType}. Checks which are marked as required do not need to be + * explicitely declared in the {@link UpgradePack} to be run. + * + * @return {@code true} if it is required, {@code false} otherwise. */ - public Boolean isRequired(){ - return getClass().getAnnotation(UpgradeCheck.class).required(); + public boolean isRequired(UpgradeType upgradeType) { +UpgradeType[] upgradeTypes = getClass().getAnnotation(UpgradeCheck.class).required(); +for (UpgradeType requiredType : upgradeTypes) { + if (upgradeType == requiredType) { +return true; + } +} + +return false; } - + /** * Return a boolean indicating whether or not configs allow bypassing errors during the RU/EU PreChecks. * @return http://git-wip-us.apache.org/repos/asf/ambari/blob/675a02bf/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java index 45497b5..a
ambari git commit: AMBARI-19285 - HOU pre-checks indicate HA as a requirement (jonathanhurley)
Repository: ambari Updated Branches: refs/heads/trunk 163fa4c9c -> 2304971d0 AMBARI-19285 - HOU pre-checks indicate HA as a requirement (jonathanhurley) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2304971d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2304971d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2304971d Branch: refs/heads/trunk Commit: 2304971d09f3c525ebd2b1cf864d82ee9b858d5e Parents: 163fa4c Author: Jonathan Hurley Authored: Thu Dec 22 12:07:25 2016 -0500 Committer: Jonathan Hurley Committed: Fri Dec 23 10:50:25 2016 -0500 -- .../server/checks/AbstractCheckDescriptor.java | 22 +++- .../ambari/server/checks/CheckDescription.java | 6 - .../server/checks/ClientRetryPropertyCheck.java | 5 +- .../checks/ComponentsInstallationCheck.java | 6 +- .../server/checks/ConfigurationMergeCheck.java | 5 +- .../HardcodedStackVersionPropertiesCheck.java | 5 +- .../ambari/server/checks/HealthCheck.java | 5 +- .../HiveDynamicServiceDiscoveryCheck.java | 6 +- .../server/checks/HiveNotRollingWarning.java| 2 +- .../server/checks/HostMaintenanceModeCheck.java | 5 +- .../server/checks/HostsHeartbeatCheck.java | 6 +- .../checks/HostsMasterMaintenanceCheck.java | 7 +- .../checks/HostsRepositoryVersionCheck.java | 5 +- .../server/checks/InstallPackagesCheck.java | 6 +- .../server/checks/PreviousUpgradeCompleted.java | 8 +- .../server/checks/RangerPasswordCheck.java | 6 +- .../checks/ServiceCheckValidityCheck.java | 5 +- .../checks/ServicesMaintenanceModeCheck.java| 8 +- .../ambari/server/checks/ServicesUpCheck.java | 6 +- .../server/checks/StormRestAPIDeletedCheck.java | 109 --- .../server/checks/StormShutdownWarning.java | 2 +- .../ambari/server/checks/UpgradeCheck.java | 14 ++- .../server/checks/UpgradeCheckRegistry.java | 2 +- .../server/checks/VersionMismatchCheck.java | 6 +- .../HDP/2.5/upgrades/host-ordered-upgrade.xml | 12 -- .../checks/AbstractCheckDescriptorTest.java | 70 26 files changed, 181 insertions(+), 158 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2304971d/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java index 3fc8650..36467c9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java @@ -37,7 +37,9 @@ import org.apache.ambari.server.state.DesiredConfig; import org.apache.ambari.server.state.ServiceInfo; import org.apache.ambari.server.state.stack.PrereqCheckType; import org.apache.ambari.server.state.stack.PrerequisiteCheck; +import org.apache.ambari.server.state.stack.UpgradePack; import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper; +import org.apache.ambari.server.state.stack.upgrade.UpgradeType; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -283,13 +285,23 @@ public abstract class AbstractCheckDescriptor { } /** - * Return the optionality flag of the Upgrade Check - * @return + * Gets whether this upgrade check is required for the specified + * {@link UpgradeType}. Checks which are marked as required do not need to be + * explicitely declared in the {@link UpgradePack} to be run. + * + * @return {@code true} if it is required, {@code false} otherwise. */ - public Boolean isRequired(){ - return getClass().getAnnotation(UpgradeCheck.class).required(); + public boolean isRequired(UpgradeType upgradeType) { +UpgradeType[] upgradeTypes = getClass().getAnnotation(UpgradeCheck.class).required(); +for (UpgradeType requiredType : upgradeTypes) { + if (upgradeType == requiredType) { +return true; + } +} + +return false; } - + /** * Return a boolean indicating whether or not configs allow bypassing errors during the RU/EU PreChecks. * @return http://git-wip-us.apache.org/repos/asf/ambari/blob/2304971d/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java index 45497b5..a204ada 1006
ambari git commit: Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/trunk 2f2c9cc58 -> 163fa4c9c Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)" This reverts commit 83f3b6fb0fb98bc99e74b0d1f2c55e5229c697ac. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/163fa4c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/163fa4c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/163fa4c9 Branch: refs/heads/trunk Commit: 163fa4c9c2e076ca16bf1a6f05d5e695af86b7d0 Parents: 2f2c9cc Author: Toader, Sebastian Authored: Fri Dec 23 16:14:12 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:14:12 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 - .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 -- .../state/quicklinksprofile/PropertyFilter.java | 60 ++ .../quicklinksprofile/QuickLinksProfile.java| 7 - .../QuickLinksProfileEvaluator.java | 202 -- .../QuickLinksProfileEvaluatorException.java| 27 --- .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 - .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 --- .../QuickLinksProfileEvaluatorTest.java | 167 --- .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 + .../dummy_stack/HIVE/package/.hash | 1 + .../child_quicklinks_with_attributes.json | 64 -- .../child_quicklinks_with_properties.json | 64 ++ .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 -- .../parent_quicklinks_with_properties.json | 65 ++ 23 files changed, 220 insertions(+), 841 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/163fa4c9/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f589f5d..72ad764 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("attributes") - private List attributes; + @JsonProperty("properties") + private List properties; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getAttributes() { -return attributes; + public List getProperties() { +return properties; } - public void setAttributes(List attributes) { -this.attributes = attributes; + public void setProperties(List properties) { +this.properties = properties; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == attributes && null != parentLink.attributes) { - attributes = parentLink.attributes; +if (null == properties && null != parentLink.properties) { + properties = parentLink.properties; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/163fa4c9/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index d784a22..5124241 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter {
ambari git commit: Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)"
Repository: ambari Updated Branches: refs/heads/branch-2.5 a12f05487 -> 0878b7e5f Revert "AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)" This reverts commit 8c79bd168aaad4cc185e258ee29513bb4f9def74. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0878b7e5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0878b7e5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0878b7e5 Branch: refs/heads/branch-2.5 Commit: 0878b7e5faf44a60564d8c694a7f80b6e5f541f3 Parents: a12f054 Author: Toader, Sebastian Authored: Fri Dec 23 16:11:38 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:11:38 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 - .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 -- .../state/quicklinksprofile/PropertyFilter.java | 60 ++ .../quicklinksprofile/QuickLinksProfile.java| 7 - .../QuickLinksProfileEvaluator.java | 202 -- .../QuickLinksProfileEvaluatorException.java| 27 --- .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 - .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 --- .../QuickLinksProfileEvaluatorTest.java | 167 --- .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 + .../dummy_stack/HIVE/package/.hash | 1 + .../child_quicklinks_with_attributes.json | 64 -- .../child_quicklinks_with_properties.json | 64 ++ .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 -- .../parent_quicklinks_with_properties.json | 65 ++ 23 files changed, 220 insertions(+), 841 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0878b7e5/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index c26eda9..f7c14f3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("attributes") - private List attributes; + @JsonProperty("properties") + private List properties; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getAttributes() { -return attributes; + public List getProperties() { +return properties; } - public void setAttributes(List attributes) { -this.attributes = attributes; + public void setProperties(List properties) { +this.properties = properties; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == attributes && null != parentLink.attributes) { - attributes = parentLink.attributes; +if (null == properties && null != parentLink.properties) { + properties = parentLink.properties; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0878b7e5/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index d784a22..5124241 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. */ public class AcceptAllFilter extends
ambari git commit: AMBARI-19187. Disable security hook. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 899d1eaa5 -> a12f05487 AMBARI-19187. Disable security hook. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a12f0548 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a12f0548 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a12f0548 Branch: refs/heads/branch-2.5 Commit: a12f05487993e2fcd9be1211af3df579cd9b1fab Parents: 899d1ea Author: Attila Magyar Authored: Fri Dec 23 16:10:09 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:10:37 2016 +0100 -- ambari-agent/pom.xml| 64 +++- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 107 + .../apache/ambari/tools/zk/ZkConnection.java| 53 +++ .../org/apache/ambari/tools/zk/ZkMigrator.java | 86 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 154 +++ .../core/resources/zkmigrator.py| 44 ++ .../libraries/script/script.py | 6 + ambari-server/pom.xml | 1 + .../server/controller/KerberosHelperImpl.java | 81 ++ .../ambari/server/metadata/ActionMetadata.java | 1 + .../server/controller/KerberosHelperTest.java | 23 ++- .../main/admin/kerberos/disable_controller.js | 10 +- ambari-web/app/messages.js | 10 +- 13 files changed, 628 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a12f0548/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 96e342c..510f6f6 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -25,7 +25,6 @@ 4.0.0 org.apache.ambari ambari-agent - pom 2.5.0.0.0 Ambari Agent Ambari Agent @@ -52,6 +51,41 @@ ${target.cache.dir}/custom_actions src/packages/tarball + + + org.apache.zookeeper + zookeeper + 3.4.9 + + + commons-cli + commons-cli + 1.3.1 + + + org.apache.curator + curator-test + 2.9.0 + test + + + org.apache.curator + curator-framework + 2.7.1 + test + + + utility + utility + test + 1.0.0.0-SNAPSHOT + + + junit + junit + test + + @@ -84,12 +118,39 @@ maven-compiler-plugin 3.0 + + 1.7 + 1.7 + + + +org.apache.maven.plugins +maven-shade-plugin +2.3 + + +package + + shade + + + + + org.apache.ambari.tools.zk.ZkMigrator + + + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/lib/ambari-agent/tools/zkmigrator.jar + + + org.apache.maven.plugins maven-surefire-plugin ${skipSurefireTests} + + ${testcase.groups} @@ -462,6 +523,7 @@ **/*.json **/*.pydevproject src/main/package/choco/ambari-agent.nuspec +**/dependency-reduced-pom.xml http://git-wip-us.apache.org/repos/asf/ambari/blob/a12f0548/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java new file mode 100644 index 000..420ab0a --- /dev/null +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -0,0 +1,107 @@ +/** + * 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. + */ + +package org.apache.ambari.tools.zk; + +import static j
ambari git commit: AMBARI-19187. Disable security hook. (Attila Magyar via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 2f311bedd -> 2f2c9cc58 AMBARI-19187. Disable security hook. (Attila Magyar via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f2c9cc5 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f2c9cc5 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f2c9cc5 Branch: refs/heads/trunk Commit: 2f2c9cc588fca9522a159902d3e7db560877ff98 Parents: 2f311be Author: Attila Magyar Authored: Fri Dec 23 16:03:31 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 16:03:51 2016 +0100 -- ambari-agent/pom.xml| 64 +++- .../java/org/apache/ambari/tools/zk/ZkAcl.java | 107 + .../apache/ambari/tools/zk/ZkConnection.java| 53 +++ .../org/apache/ambari/tools/zk/ZkMigrator.java | 86 +++ .../apache/ambari/tools/zk/ZkMigratorTest.java | 154 +++ .../core/resources/zkmigrator.py| 44 ++ .../libraries/script/script.py | 6 + ambari-server/pom.xml | 1 + .../server/controller/KerberosHelperImpl.java | 81 ++ .../ambari/server/metadata/ActionMetadata.java | 1 + .../server/controller/KerberosHelperTest.java | 23 ++- .../main/admin/kerberos/disable_controller.js | 10 +- ambari-web/app/messages.js | 10 +- 13 files changed, 628 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2c9cc5/ambari-agent/pom.xml -- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index a8ed7f1..35fba19 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -25,7 +25,6 @@ 4.0.0 org.apache.ambari ambari-agent - pom 2.0.0.0-SNAPSHOT Ambari Agent Ambari Agent @@ -52,6 +51,41 @@ ${target.cache.dir}/custom_actions src/packages/tarball + + + org.apache.zookeeper + zookeeper + 3.4.9 + + + commons-cli + commons-cli + 1.3.1 + + + org.apache.curator + curator-test + 2.9.0 + test + + + org.apache.curator + curator-framework + 2.7.1 + test + + + utility + utility + test + 1.0.0.0-SNAPSHOT + + + junit + junit + test + + @@ -84,12 +118,39 @@ maven-compiler-plugin 3.0 + + 1.7 + 1.7 + + + +org.apache.maven.plugins +maven-shade-plugin +2.3 + + +package + + shade + + + + + org.apache.ambari.tools.zk.ZkMigrator + + + ${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/lib/ambari-agent/tools/zkmigrator.jar + + + org.apache.maven.plugins maven-surefire-plugin ${skipSurefireTests} + + ${testcase.groups} @@ -462,6 +523,7 @@ **/*.json **/*.pydevproject src/main/package/choco/ambari-agent.nuspec +**/dependency-reduced-pom.xml http://git-wip-us.apache.org/repos/asf/ambari/blob/2f2c9cc5/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java -- diff --git a/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java new file mode 100644 index 000..420ab0a --- /dev/null +++ b/ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java @@ -0,0 +1,107 @@ +/** + * 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. + */ + +package org.apache.ambari.tools.zk; + +import static java
ambari git commit: AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 4.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk dc408b355 -> 2f311bedd AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 4.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f311bed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f311bed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f311bed Branch: refs/heads/trunk Commit: 2f311bedd9a7e03e220088a1a7b458f9107af56c Parents: dc408b3 Author: Vitaly Brodetskyi Authored: Fri Dec 23 15:13:54 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Dec 23 15:13:54 2016 +0200 -- contrib/utils/perf/deploy-gce-perf-cluster.py | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f311bed/contrib/utils/perf/deploy-gce-perf-cluster.py -- diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py b/contrib/utils/perf/deploy-gce-perf-cluster.py index 73c353e..8ba7e42 100644 --- a/contrib/utils/perf/deploy-gce-perf-cluster.py +++ b/contrib/utils/perf/deploy-gce-perf-cluster.py @@ -338,6 +338,7 @@ def create_server_script(server_host_name): "\n" + \ "yum install mysql-connector-java* -y\n" + \ "yum install mysql-server -y\n" + \ + "sed -i -e 's/mysqld]/mysqld]\\nmax_allowed_packet=16M/1' /etc/my.cnf\n" + \ "service mysqld start\n" + \ "mysql -uroot -e \"CREATE DATABASE ambari;\"\n" + \ "mysql -uroot -e \"SOURCE /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;\" ambari\n" + \ @@ -366,6 +367,7 @@ def create_server_script(server_host_name): "echo 'server.jdbc.port=3306' >> /etc/ambari-server/conf/ambari.properties\n" + \ "echo 'server.jdbc.hostname=localhost' >> /etc/ambari-server/conf/ambari.properties\n" + \ "echo 'server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar' >> /etc/ambari-server/conf/ambari.properties\n" + \ + "echo 'security.temporary.keystore.retention.minutes=180' >> /etc/ambari-server/conf/ambari.properties\n" + \ "\n" + \ "ambari-server start --skip-database-check\n" + \ "exit 0"
ambari git commit: AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 4.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.5 0a62d19a7 -> 899d1eaa5 AMBARI-19058. Perf: Deploy 3000 Agent cluster and find perf bugs. Part 4.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/899d1eaa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/899d1eaa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/899d1eaa Branch: refs/heads/branch-2.5 Commit: 899d1eaa5b776df49286f7d9d94206746ae75e43 Parents: 0a62d19 Author: Vitaly Brodetskyi Authored: Fri Dec 23 15:11:17 2016 +0200 Committer: Vitaly Brodetskyi Committed: Fri Dec 23 15:11:17 2016 +0200 -- contrib/utils/perf/deploy-gce-perf-cluster.py | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/899d1eaa/contrib/utils/perf/deploy-gce-perf-cluster.py -- diff --git a/contrib/utils/perf/deploy-gce-perf-cluster.py b/contrib/utils/perf/deploy-gce-perf-cluster.py index 73c353e..8ba7e42 100644 --- a/contrib/utils/perf/deploy-gce-perf-cluster.py +++ b/contrib/utils/perf/deploy-gce-perf-cluster.py @@ -338,6 +338,7 @@ def create_server_script(server_host_name): "\n" + \ "yum install mysql-connector-java* -y\n" + \ "yum install mysql-server -y\n" + \ + "sed -i -e 's/mysqld]/mysqld]\\nmax_allowed_packet=16M/1' /etc/my.cnf\n" + \ "service mysqld start\n" + \ "mysql -uroot -e \"CREATE DATABASE ambari;\"\n" + \ "mysql -uroot -e \"SOURCE /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;\" ambari\n" + \ @@ -366,6 +367,7 @@ def create_server_script(server_host_name): "echo 'server.jdbc.port=3306' >> /etc/ambari-server/conf/ambari.properties\n" + \ "echo 'server.jdbc.hostname=localhost' >> /etc/ambari-server/conf/ambari.properties\n" + \ "echo 'server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar' >> /etc/ambari-server/conf/ambari.properties\n" + \ + "echo 'security.temporary.keystore.retention.minutes=180' >> /etc/ambari-server/conf/ambari.properties\n" + \ "\n" + \ "ambari-server start --skip-database-check\n" + \ "exit 0"
ambari git commit: AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.5 8c79bd168 -> 0a62d19a7 AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a62d19a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a62d19a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a62d19a Branch: refs/heads/branch-2.5 Commit: 0a62d19a7aad69ae97ea918223252d6b40d3bef7 Parents: 8c79bd1 Author: Alex Antonenko Authored: Thu Dec 22 19:15:33 2016 +0200 Committer: Alex Antonenko Committed: Fri Dec 23 15:23:08 2016 +0200 -- ambari-web/app/templates/main/admin/service_auto_start.hbs | 2 +- ambari-web/app/views/main/admin/service_auto_start.js | 2 +- .../views/main/admin/service_auto_start/component_auto_start.js| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/templates/main/admin/service_auto_start.hbs -- diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs b/ambari-web/app/templates/main/admin/service_auto_start.hbs index a14add2..87fc915 100644 --- a/ambari-web/app/templates/main/admin/service_auto_start.hbs +++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs @@ -63,7 +63,7 @@ {{/each}} -{{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} +{{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} {{t common.enableAll}} | {{t common.disableAll}} http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/views/main/admin/service_auto_start.js -- diff --git a/ambari-web/app/views/main/admin/service_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start.js index 51512a2..be928ed 100644 --- a/ambari-web/app/views/main/admin/service_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start.js @@ -34,7 +34,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({ didInsertElement: function () { var self = this; -this.set('isDisabled', !App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS')); +this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START')); this.get('controller').loadClusterConfig().done(function (data) { var tag = [ { http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js -- diff --git a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js index 9794d6f..6874f49 100644 --- a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js @@ -56,7 +56,7 @@ App.MainAdminServiceAutoStartComponentView = Em.View.extend({ offText: Em.I18n.t('common.disabled'), offColor: 'default', onColor: 'success', -disabled: this.get('parentView.isDisabled'), +disabled: !App.isAuthorized('SERVICE.MANAGE_AUTO_START'), handleWidth: Math.max(Em.I18n.t('common.enabled').length, Em.I18n.t('common.disabled').length) * 8, onSwitchChange: function (event, state) { self.set('tab.enabledComponents', self.get('tab.enabledComponents') + (state ? 1 : -1));
ambari git commit: AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk a98bd6b79 -> dc408b355 AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dc408b35 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc408b35 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc408b35 Branch: refs/heads/trunk Commit: dc408b3552ef503c845d62759c27dd32c4f291e7 Parents: a98bd6b Author: Alex Antonenko Authored: Thu Dec 22 19:18:13 2016 +0200 Committer: Alex Antonenko Committed: Fri Dec 23 15:22:23 2016 +0200 -- ambari-web/app/templates/main/admin/service_auto_start.hbs | 2 +- ambari-web/app/views/main/admin/service_auto_start.js | 2 +- .../views/main/admin/service_auto_start/component_auto_start.js| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dc408b35/ambari-web/app/templates/main/admin/service_auto_start.hbs -- diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs b/ambari-web/app/templates/main/admin/service_auto_start.hbs index c5a92cf..0de7d40 100644 --- a/ambari-web/app/templates/main/admin/service_auto_start.hbs +++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs @@ -80,7 +80,7 @@ {{/each}} -{{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} +{{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} http://git-wip-us.apache.org/repos/asf/ambari/blob/dc408b35/ambari-web/app/views/main/admin/service_auto_start.js -- diff --git a/ambari-web/app/views/main/admin/service_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start.js index 1af9845..317b029 100644 --- a/ambari-web/app/views/main/admin/service_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start.js @@ -32,7 +32,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({ didInsertElement: function () { var self = this; -this.set('isDisabled', !App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS')); +this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START')); this.get('controller').load().then(function() { self.set('isLoaded', true); self.initSwitcher(); http://git-wip-us.apache.org/repos/asf/ambari/blob/dc408b35/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js -- diff --git a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js index a1e09f2..b8ad812 100644 --- a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js @@ -45,7 +45,7 @@ App.MainAdminServiceAutoStartComponentView = Em.View.extend({ offText: Em.I18n.t('common.disabled'), offColor: 'default', onColor: 'success', -disabled: this.get('parentView.isDisabled'), +disabled: !App.isAuthorized('SERVICE.MANAGE_AUTO_START'), handleWidth: Math.max(Em.I18n.t('common.enabled').length, Em.I18n.t('common.disabled').length) * 8, onSwitchChange: function (event, state) { self.set('tab.enabledComponents', self.get('tab.enabledComponents') + (state ? 1 : -1));
ambari git commit: AMBARI-19284. Zeppelin Notebook start fails after reboot (aonishuk)
Repository: ambari Updated Branches: refs/heads/trunk 83f3b6fb0 -> a98bd6b79 AMBARI-19284. Zeppelin Notebook start fails after reboot (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a98bd6b7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a98bd6b7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a98bd6b7 Branch: refs/heads/trunk Commit: a98bd6b791573da3dc73ec56ea07dc6de191fc0f Parents: 83f3b6f Author: Andrew Onishuk Authored: Fri Dec 23 15:02:35 2016 +0200 Committer: Andrew Onishuk Committed: Fri Dec 23 15:02:35 2016 +0200 -- .../stacks/2.5/ZEPPELIN/test_zeppelin_master.py | 28 1 file changed, 28 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a98bd6b7/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py -- diff --git a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py index 24cf271..aea4ba8 100644 --- a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py +++ b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py @@ -39,6 +39,20 @@ class TestZeppelinMaster(RMFTestCase): mode = 0755, cd_access = 'a', ) +self.assertResourceCalled('Directory', '/var/run/zeppelin', +owner = 'zeppelin', +create_parents = True, +group = 'zeppelin', +mode = 0755, +cd_access = 'a', +) +self.assertResourceCalled('Directory', '/usr/hdp/current/zeppelin-server', +owner = 'zeppelin', +group = 'zeppelin', +create_parents = True, +mode = 0755, +cd_access = 'a', +) self.assertResourceCalled('XmlConfig', 'zeppelin-site.xml', owner = 'zeppelin', group = 'zeppelin', @@ -74,6 +88,20 @@ class TestZeppelinMaster(RMFTestCase): mode = 0755, cd_access = 'a', ) +self.assertResourceCalled('Directory', '/var/run/zeppelin', +owner = 'zeppelin', +create_parents = True, +group = 'zeppelin', +mode = 0755, +cd_access = 'a', +) +self.assertResourceCalled('Directory', '/usr/hdp/current/zeppelin-server', +owner = 'zeppelin', +group = 'zeppelin', +create_parents = True, +mode = 0755, +cd_access = 'a', +) self.assertResourceCalled('XmlConfig', 'zeppelin-site.xml', owner = 'zeppelin', group = 'zeppelin',
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 e1ce1dfe7 -> 8c79bd168 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8c79bd16 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8c79bd16 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8c79bd16 Branch: refs/heads/branch-2.5 Commit: 8c79bd168aaad4cc185e258ee29513bb4f9def74 Parents: e1ce1df Author: Balazs Bence Sari Authored: Fri Dec 23 13:27:56 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:28:52 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 +++ .../QuickLinksProfileEvaluatorTest.java | 167 +++ .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 - .../dummy_stack/HIVE/package/.hash | 1 - .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 23 files changed, 841 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8c79bd16/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index f7c14f3..c26eda9 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -51,8 +51,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -111,12 +111,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -149,8 +149,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/8c79bd16/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/8c79bd16
ambari git commit: AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 564b8f775 -> 83f3b6fb0 AMBARI-19244. Create profile evaluator. (Balazs Bence Sari via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83f3b6fb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83f3b6fb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83f3b6fb Branch: refs/heads/trunk Commit: 83f3b6fb0fb98bc99e74b0d1f2c55e5229c697ac Parents: 564b8f7 Author: Balazs Bence Sari Authored: Fri Dec 23 13:27:56 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:27:56 2016 +0100 -- .../ambari/server/state/quicklinks/Link.java| 16 +- .../quicklinksprofile/AcceptAllFilter.java | 2 +- .../state/quicklinksprofile/Component.java | 7 + .../server/state/quicklinksprofile/Filter.java | 10 +- .../quicklinksprofile/LinkAttributeFilter.java | 61 ++ .../state/quicklinksprofile/PropertyFilter.java | 60 -- .../quicklinksprofile/QuickLinksProfile.java| 7 + .../QuickLinksProfileEvaluator.java | 202 ++ .../QuickLinksProfileEvaluatorException.java| 27 +++ .../QuickLinksProfileParser.java| 10 +- .../server/state/quicklinksprofile/Service.java | 8 + .../QuickLinksConfigurationModuleTest.java | 10 +- .../state/quicklinksprofile/EvaluatorTest.java | 204 +++ .../QuickLinksProfileEvaluatorTest.java | 167 +++ .../QuickLinksProfileParserTest.java| 4 +- .../HIVE/0.11.0.2.0.5.0/package/.hash | 1 - .../dummy_stack/HIVE/package/.hash | 1 - .../child_quicklinks_with_attributes.json | 64 ++ .../child_quicklinks_with_properties.json | 64 -- .../resources/example_quicklinks_profile.json | 4 +- .../inconsistent_quicklinks_profile.json| 2 +- .../parent_quicklinks_with_attributes.json | 65 ++ .../parent_quicklinks_with_properties.json | 65 -- 23 files changed, 841 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/83f3b6fb/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java index 72ad764..f589f5d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinks/Link.java @@ -50,8 +50,8 @@ public class Link{ @JsonProperty("protocol") private Protocol protocol; - @JsonProperty("properties") - private List properties; + @JsonProperty("attributes") + private List attributes; public String getName() { return name; @@ -110,12 +110,12 @@ public class Link{ } @Nullable - public List getProperties() { -return properties; + public List getAttributes() { +return attributes; } - public void setProperties(List properties) { -this.properties = properties; + public void setAttributes(List attributes) { +this.attributes = attributes; } public boolean isRemoved(){ @@ -148,8 +148,8 @@ public class Link{ port.mergetWithParent(parentLink.getPort()); } -if (null == properties && null != parentLink.properties) { - properties = parentLink.properties; +if (null == attributes && null != parentLink.attributes) { + attributes = parentLink.attributes; } } http://git-wip-us.apache.org/repos/asf/ambari/blob/83f3b6fb/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java index 5124241..d784a22 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/quicklinksprofile/AcceptAllFilter.java @@ -22,7 +22,7 @@ import org.apache.ambari.server.state.quicklinks.Link; /** * A filter that accepts all links. It is useful to specify a general rule while the more specific - * ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases. + * ({@link LinkNameFilter} and {@link LinkAttributeFilter}) filters handle more special cases. */ public class AcceptAllFilter extends Filter { http://git-wip-us.apache.org/repos/asf/ambari/blob/83f3b6fb/ambari-se
ambari git commit: AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 cf708d65d -> e1ce1dfe7 AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1ce1dfe Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1ce1dfe Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1ce1dfe Branch: refs/heads/branch-2.5 Commit: e1ce1dfe7bae68c9d17b84af835f33c452df7abc Parents: cf708d6 Author: Attila Doroszlai Authored: Fri Dec 23 13:16:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:18:28 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/FileCache.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1ce1dfe/ambari-agent/src/main/python/ambari_agent/FileCache.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/FileCache.py b/ambari-agent/src/main/python/ambari_agent/FileCache.py index a9ea8f6..0cd629b 100644 --- a/ambari-agent/src/main/python/ambari_agent/FileCache.py +++ b/ambari-agent/src/main/python/ambari_agent/FileCache.py @@ -167,6 +167,7 @@ class FileCache(): self.invalidate_directory(full_path) self.unpack_archive(membuffer, full_path) self.write_hash_sum(full_path, remote_hash) +logger.info("Updated directory {0}".format(full_path)) else: logger.warn("Skipping empty archive: {0}. " "Expected archive was not found. Cached copy will be used.".format(download_url))
ambari git commit: AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk 47a988245 -> 564b8f775 AMBARI-19270. Log successful agent cache update at info level. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/564b8f77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/564b8f77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/564b8f77 Branch: refs/heads/trunk Commit: 564b8f775959670259693c064b6d9025aec40760 Parents: 47a9882 Author: Attila Doroszlai Authored: Fri Dec 23 13:16:18 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 13:16:18 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/FileCache.py | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/564b8f77/ambari-agent/src/main/python/ambari_agent/FileCache.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/FileCache.py b/ambari-agent/src/main/python/ambari_agent/FileCache.py index a9ea8f6..0cd629b 100644 --- a/ambari-agent/src/main/python/ambari_agent/FileCache.py +++ b/ambari-agent/src/main/python/ambari_agent/FileCache.py @@ -167,6 +167,7 @@ class FileCache(): self.invalidate_directory(full_path) self.unpack_archive(membuffer, full_path) self.write_hash_sum(full_path, remote_hash) +logger.info("Updated directory {0}".format(full_path)) else: logger.warn("Skipping empty archive: {0}. " "Expected archive was not found. Cached copy will be used.".format(download_url))
[1/2] ambari git commit: AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore)
Repository: ambari Updated Branches: refs/heads/branch-2.5 d1aed2612 -> cf708d65d http://git-wip-us.apache.org/repos/asf/ambari/blob/cf708d65/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java new file mode 100644 index 000..0622971 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java @@ -0,0 +1,197 @@ +/** + * 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. + */ +package org.apache.oozie.ambari.view.assets; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import org.apache.ambari.view.ViewContext; +import org.apache.oozie.ambari.view.*; +import org.apache.oozie.ambari.view.assets.model.ActionAsset; +import org.apache.oozie.ambari.view.assets.model.ActionAssetDefinition; +import org.apache.oozie.ambari.view.assets.model.AssetDefintion; +import org.apache.oozie.ambari.view.model.APIResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.*; +import javax.ws.rs.core.*; +import javax.ws.rs.core.Response.Status; +import java.io.IOException; +import java.util.*; + +import static org.apache.oozie.ambari.view.Constants.*; + +public class AssetResource { + + private final static Logger LOGGER = LoggerFactory +.getLogger(AssetResource.class); + private final AssetService assetService; + private final ViewContext viewContext; + private final HDFSFileUtils hdfsFileUtils; + private OozieUtils oozieUtils = new OozieUtils(); + private final OozieDelegate oozieDelegate; + + + public AssetResource(ViewContext viewContext) { +this.viewContext = viewContext; +this.assetService = new AssetService(viewContext); +hdfsFileUtils = new HDFSFileUtils(viewContext); +oozieDelegate = new OozieDelegate(viewContext); + } + + @GET + public Response getAssets() { +try { + Collection assets = assetService.getAssets(); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + result.getPaging().setTotal(assets != null ? assets.size() : 0L); + result.setData(assets); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + + @GET + @Path("/mine") + public Response getMyAssets() { +try { + Collection assets = assetService.getMyAssets(); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + result.getPaging().setTotal(assets != null ? assets.size() : 0L); + result.setData(assets); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + @POST + public Response saveAsset(@Context HttpHeaders headers, +@QueryParam("id") String id, @Context UriInfo ui, String body) { +try { + Gson gson = new Gson(); + AssetDefintion assetDefinition = gson.fromJson(body, +AssetDefintion.class); + Map validateAsset = validateAsset(headers, +assetDefinition.getDefinition(), ui.getQueryParameters()); + if (!STATUS_OK.equals(validateAsset.get(STATUS_KEY))) { +return Response.status(Status.BAD_REQUEST).build(); + } + assetService.saveAsset(id, viewContext.getUsername(), assetDefinition); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + + private List getAsList(String string) { +ArrayList li = new ArrayList<>(1); +li.add(string); +return li; + } + + public Map validateAsset(HttpHeaders headers, + String postBody, MultivaluedMap queryParams) { +String workflowXml = oozieUtils.generateWorkflowXml(postBody); +try { + Map result = ne
[2/2] ambari git commit: AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore)
AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf708d65 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf708d65 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf708d65 Branch: refs/heads/branch-2.5 Commit: cf708d65d071db81fa47837bf9bf26392a056fce Parents: d1aed26 Author: Nitiraj Rathore Authored: Fri Dec 23 16:11:12 2016 +0530 Committer: Nitiraj Rathore Committed: Fri Dec 23 16:11:12 2016 +0530 -- .../ambari/view/AssetDefinitionRefType.java | 23 + .../org/apache/oozie/ambari/view/Constants.java | 25 + .../apache/oozie/ambari/view/EntityStatus.java | 23 + .../apache/oozie/ambari/view/OozieDelegate.java | 243 .../ambari/view/OozieProxyImpersonator.java | 1087 -- .../apache/oozie/ambari/view/OozieUtils.java| 226 ++-- .../ambari/view/ServiceFormattedException.java | 53 + .../oozie/ambari/view/WorkflowFilesService.java | 176 +-- .../ambari/view/assets/AssetDefinitionRepo.java | 29 + .../oozie/ambari/view/assets/AssetRepo.java | 37 +- .../oozie/ambari/view/assets/AssetResource.java | 197 .../oozie/ambari/view/assets/AssetService.java | 102 +- .../ambari/view/assets/model/ActionAsset.java | 112 +- .../assets/model/ActionAssetDefinition.java | 42 + .../view/assets/model/AssetDefintion.java | 69 ++ .../oozie/ambari/view/model/APIResult.java | 63 + .../oozie/ambari/view/model/BaseModel.java | 61 +- .../apache/oozie/ambari/view/model/Indexed.java | 24 + .../apache/oozie/ambari/view/model/Paging.java | 30 + .../apache/oozie/ambari/view/model/When.java| 28 + .../apache/oozie/ambari/view/repo/BaseRepo.java | 113 ++ .../workflowmanager/WorkflowManagerService.java | 94 +- .../WorkflowsManagerResource.java |8 +- .../view/workflowmanager/WorkflowsRepo.java | 63 +- .../view/workflowmanager/model/Workflow.java| 133 +-- .../views/wfmanager/src/main/resources/view.xml | 17 + 26 files changed, 2006 insertions(+), 1072 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cf708d65/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java new file mode 100644 index 000..8c96504 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java @@ -0,0 +1,23 @@ +/** + * 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. + */ +package org.apache.oozie.ambari.view; + +public enum AssetDefinitionRefType { + HDFS, + DB +} http://git-wip-us.apache.org/repos/asf/ambari/blob/cf708d65/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java new file mode 100644 index 000..238b002 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java @@ -0,0 +1,25 @@ +/** + * 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 Lic
[1/2] ambari git commit: AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore)
Repository: ambari Updated Branches: refs/heads/trunk e90009310 -> 47a988245 http://git-wip-us.apache.org/repos/asf/ambari/blob/47a98824/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java new file mode 100644 index 000..0622971 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/assets/AssetResource.java @@ -0,0 +1,197 @@ +/** + * 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. + */ +package org.apache.oozie.ambari.view.assets; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import org.apache.ambari.view.ViewContext; +import org.apache.oozie.ambari.view.*; +import org.apache.oozie.ambari.view.assets.model.ActionAsset; +import org.apache.oozie.ambari.view.assets.model.ActionAssetDefinition; +import org.apache.oozie.ambari.view.assets.model.AssetDefintion; +import org.apache.oozie.ambari.view.model.APIResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.*; +import javax.ws.rs.core.*; +import javax.ws.rs.core.Response.Status; +import java.io.IOException; +import java.util.*; + +import static org.apache.oozie.ambari.view.Constants.*; + +public class AssetResource { + + private final static Logger LOGGER = LoggerFactory +.getLogger(AssetResource.class); + private final AssetService assetService; + private final ViewContext viewContext; + private final HDFSFileUtils hdfsFileUtils; + private OozieUtils oozieUtils = new OozieUtils(); + private final OozieDelegate oozieDelegate; + + + public AssetResource(ViewContext viewContext) { +this.viewContext = viewContext; +this.assetService = new AssetService(viewContext); +hdfsFileUtils = new HDFSFileUtils(viewContext); +oozieDelegate = new OozieDelegate(viewContext); + } + + @GET + public Response getAssets() { +try { + Collection assets = assetService.getAssets(); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + result.getPaging().setTotal(assets != null ? assets.size() : 0L); + result.setData(assets); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + + @GET + @Path("/mine") + public Response getMyAssets() { +try { + Collection assets = assetService.getMyAssets(); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + result.getPaging().setTotal(assets != null ? assets.size() : 0L); + result.setData(assets); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + @POST + public Response saveAsset(@Context HttpHeaders headers, +@QueryParam("id") String id, @Context UriInfo ui, String body) { +try { + Gson gson = new Gson(); + AssetDefintion assetDefinition = gson.fromJson(body, +AssetDefintion.class); + Map validateAsset = validateAsset(headers, +assetDefinition.getDefinition(), ui.getQueryParameters()); + if (!STATUS_OK.equals(validateAsset.get(STATUS_KEY))) { +return Response.status(Status.BAD_REQUEST).build(); + } + assetService.saveAsset(id, viewContext.getUsername(), assetDefinition); + APIResult result = new APIResult(); + result.setStatus(APIResult.Status.SUCCESS); + return Response.ok(result).build(); +} catch (Exception e) { + throw new ServiceFormattedException(e); +} + } + + private List getAsList(String string) { +ArrayList li = new ArrayList<>(1); +li.add(string); +return li; + } + + public Map validateAsset(HttpHeaders headers, + String postBody, MultivaluedMap queryParams) { +String workflowXml = oozieUtils.generateWorkflowXml(postBody); +try { + Map result = new Has
[2/2] ambari git commit: AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore)
AMBARI-19256 : Asset support Rest API (Belliraj HB via nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/47a98824 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/47a98824 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/47a98824 Branch: refs/heads/trunk Commit: 47a98824566ad3015b9c9655a53b34e171f43ae9 Parents: e900093 Author: Nitiraj Rathore Authored: Fri Dec 23 16:11:12 2016 +0530 Committer: Nitiraj Rathore Committed: Fri Dec 23 16:12:35 2016 +0530 -- .../ambari/view/AssetDefinitionRefType.java | 23 + .../org/apache/oozie/ambari/view/Constants.java | 25 + .../apache/oozie/ambari/view/EntityStatus.java | 23 + .../apache/oozie/ambari/view/OozieDelegate.java | 243 .../ambari/view/OozieProxyImpersonator.java | 1087 -- .../apache/oozie/ambari/view/OozieUtils.java| 226 ++-- .../ambari/view/ServiceFormattedException.java | 53 + .../oozie/ambari/view/WorkflowFilesService.java | 176 +-- .../ambari/view/assets/AssetDefinitionRepo.java | 29 + .../oozie/ambari/view/assets/AssetRepo.java | 37 +- .../oozie/ambari/view/assets/AssetResource.java | 197 .../oozie/ambari/view/assets/AssetService.java | 102 +- .../ambari/view/assets/model/ActionAsset.java | 112 +- .../assets/model/ActionAssetDefinition.java | 42 + .../view/assets/model/AssetDefintion.java | 69 ++ .../oozie/ambari/view/model/APIResult.java | 63 + .../oozie/ambari/view/model/BaseModel.java | 61 +- .../apache/oozie/ambari/view/model/Indexed.java | 24 + .../apache/oozie/ambari/view/model/Paging.java | 30 + .../apache/oozie/ambari/view/model/When.java| 28 + .../apache/oozie/ambari/view/repo/BaseRepo.java | 113 ++ .../workflowmanager/WorkflowManagerService.java | 94 +- .../WorkflowsManagerResource.java |8 +- .../view/workflowmanager/WorkflowsRepo.java | 63 +- .../view/workflowmanager/model/Workflow.java| 133 +-- .../views/wfmanager/src/main/resources/view.xml | 17 + 26 files changed, 2006 insertions(+), 1072 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/47a98824/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java new file mode 100644 index 000..8c96504 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AssetDefinitionRefType.java @@ -0,0 +1,23 @@ +/** + * 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. + */ +package org.apache.oozie.ambari.view; + +public enum AssetDefinitionRefType { + HDFS, + DB +} http://git-wip-us.apache.org/repos/asf/ambari/blob/47a98824/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java -- diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java new file mode 100644 index 000..238b002 --- /dev/null +++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/Constants.java @@ -0,0 +1,25 @@ +/** + * 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
ambari git commit: AMBARI-19254 : Prompting for underlying workflow job properties in a coordinator and coordinator job properties in bundle during job submission (Padma Priya via nitirajrathore)
Repository: ambari Updated Branches: refs/heads/branch-2.5 c27fab37d -> d1aed2612 AMBARI-19254 : Prompting for underlying workflow job properties in a coordinator and coordinator job properties in bundle during job submission (Padma Priya via nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d1aed261 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d1aed261 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d1aed261 Branch: refs/heads/branch-2.5 Commit: d1aed261288e1c267d2f089e7305c57958ce31b1 Parents: c27fab3 Author: Nitiraj Rathore Authored: Fri Dec 23 14:31:19 2016 +0530 Committer: Nitiraj Rathore Committed: Fri Dec 23 14:35:17 2016 +0530 -- .../ui/app/components/bundle-config.js | 51 +--- .../resources/ui/app/components/coord-config.js | 40 ++- .../ui/app/components/flow-designer.js | 2 +- .../ui/app/services/property-extractor.js | 3 +- .../src/main/resources/ui/app/styles/app.less | 2 +- .../app/templates/components/bundle-config.hbs | 3 ++ .../app/templates/components/coord-config.hbs | 3 ++ .../main/resources/ui/app/utils/constants.js| 3 ++ 8 files changed, 86 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d1aed261/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js index 4a8ac90..4ef0ac3 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js @@ -132,7 +132,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { importBundle (filePath){ this.set("bundleFilePath", filePath); this.set("isImporting", false); -var deferred = this.getBundleFromHdfs(filePath); +var deferred = this.getFromHdfs(filePath); deferred.promise.then(function(data){ this.getBundleFromXml(data); this.set("isImporting", false); @@ -141,7 +141,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.set("isImportingSuccess", false); }.bind(this)); }, - getBundleFromHdfs(filePath){ + getFromHdfs(filePath){ var url = Ember.ENV.API_URL + "/readWorkflowXml?workflowXmlPath="+filePath; var deferred = Ember.RSVP.defer(); Ember.$.ajax({ @@ -154,7 +154,8 @@ export default Ember.Component.extend(Ember.Evented, Validations, { } }).done(function(data){ deferred.resolve(data); -}).fail(function(){ +}).fail(function(e){ + console.error(e); deferred.reject(); }); return deferred; @@ -166,6 +167,22 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.get("errors").clear(); this.get("errors").pushObjects(bundleObj.errors); }, + getJobProperties(coordinatorPath){ +var deferred = Ember.RSVP.defer(); +this.getFromHdfs(coordinatorPath).promise.then((coordinatorXml)=>{ + var x2js = new X2JS(); + var coordProps = this.get('propertyExtractor').getDynamicProperties(coordinatorXml); + var coordinatorJson = x2js.xml_str2json(coordinatorXml); + var workflowPath = coordinatorJson['coordinator-app']['action']['workflow']['app-path']; + this.getFromHdfs(workflowPath).promise.then((workflowXml)=>{ +var workflowProps = this.get('propertyExtractor').getDynamicProperties(workflowXml); + deferred.resolve(Array.from(coordProps.values()).concat(Array.from(workflowProps.values(; + }); +}.bind(this)).catch((e)=>{ + deferred.reject({trace :e, path: coordinatorPath}); +}); +return deferred; + }, actions : { closeFileBrowser(){ this.set("showingFileBrowser", false); @@ -238,10 +255,30 @@ export default Ember.Component.extend(Ember.Evented, Validations, { } var bundleGenerator = BundleGenerator.create({bundle:this.get("bundle")}); var bundleXml = bundleGenerator.process(); - var dynamicProperties = this.get('propertyExtractor').getDynamicProperties(bundleXml); - var configForSubmit = {props : dynamicProperties, xml : bundleXml, params : this.get('bundle.parameters')}; - this.set("bundleConfigs", configForSubmit); - this.set("showingJobConfig", true); + var propertyPromises = []; + this.$('#loading').show(); + this.get('bundle.coordinators').forEach((coordinator) =>{ +var deferred = this.getJobProperties(coordinator.appPath); +propertyPromises.push(deferred.promise); +
ambari git commit: AMBARI-19254 : Prompting for underlying workflow job properties in a coordinator and coordinator job properties in bundle during job submission (Padma Priya via nitirajrathore)
Repository: ambari Updated Branches: refs/heads/trunk 2f123f0ae -> e90009310 AMBARI-19254 : Prompting for underlying workflow job properties in a coordinator and coordinator job properties in bundle during job submission (Padma Priya via nitirajrathore) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e9000931 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e9000931 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e9000931 Branch: refs/heads/trunk Commit: e900093107475b765ac2d02edf1c28e61d6250bd Parents: 2f123f0 Author: Nitiraj Rathore Authored: Fri Dec 23 14:31:19 2016 +0530 Committer: Nitiraj Rathore Committed: Fri Dec 23 14:31:19 2016 +0530 -- .../ui/app/components/bundle-config.js | 51 +--- .../resources/ui/app/components/coord-config.js | 40 ++- .../ui/app/components/flow-designer.js | 2 +- .../ui/app/services/property-extractor.js | 3 +- .../src/main/resources/ui/app/styles/app.less | 2 +- .../app/templates/components/bundle-config.hbs | 3 ++ .../app/templates/components/coord-config.hbs | 3 ++ .../main/resources/ui/app/utils/constants.js| 3 ++ 8 files changed, 86 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e9000931/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js -- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js index 4a8ac90..4ef0ac3 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js +++ b/contrib/views/wfmanager/src/main/resources/ui/app/components/bundle-config.js @@ -132,7 +132,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { importBundle (filePath){ this.set("bundleFilePath", filePath); this.set("isImporting", false); -var deferred = this.getBundleFromHdfs(filePath); +var deferred = this.getFromHdfs(filePath); deferred.promise.then(function(data){ this.getBundleFromXml(data); this.set("isImporting", false); @@ -141,7 +141,7 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.set("isImportingSuccess", false); }.bind(this)); }, - getBundleFromHdfs(filePath){ + getFromHdfs(filePath){ var url = Ember.ENV.API_URL + "/readWorkflowXml?workflowXmlPath="+filePath; var deferred = Ember.RSVP.defer(); Ember.$.ajax({ @@ -154,7 +154,8 @@ export default Ember.Component.extend(Ember.Evented, Validations, { } }).done(function(data){ deferred.resolve(data); -}).fail(function(){ +}).fail(function(e){ + console.error(e); deferred.reject(); }); return deferred; @@ -166,6 +167,22 @@ export default Ember.Component.extend(Ember.Evented, Validations, { this.get("errors").clear(); this.get("errors").pushObjects(bundleObj.errors); }, + getJobProperties(coordinatorPath){ +var deferred = Ember.RSVP.defer(); +this.getFromHdfs(coordinatorPath).promise.then((coordinatorXml)=>{ + var x2js = new X2JS(); + var coordProps = this.get('propertyExtractor').getDynamicProperties(coordinatorXml); + var coordinatorJson = x2js.xml_str2json(coordinatorXml); + var workflowPath = coordinatorJson['coordinator-app']['action']['workflow']['app-path']; + this.getFromHdfs(workflowPath).promise.then((workflowXml)=>{ +var workflowProps = this.get('propertyExtractor').getDynamicProperties(workflowXml); + deferred.resolve(Array.from(coordProps.values()).concat(Array.from(workflowProps.values(; + }); +}.bind(this)).catch((e)=>{ + deferred.reject({trace :e, path: coordinatorPath}); +}); +return deferred; + }, actions : { closeFileBrowser(){ this.set("showingFileBrowser", false); @@ -238,10 +255,30 @@ export default Ember.Component.extend(Ember.Evented, Validations, { } var bundleGenerator = BundleGenerator.create({bundle:this.get("bundle")}); var bundleXml = bundleGenerator.process(); - var dynamicProperties = this.get('propertyExtractor').getDynamicProperties(bundleXml); - var configForSubmit = {props : dynamicProperties, xml : bundleXml, params : this.get('bundle.parameters')}; - this.set("bundleConfigs", configForSubmit); - this.set("showingJobConfig", true); + var propertyPromises = []; + this.$('#loading').show(); + this.get('bundle.coordinators').forEach((coordinator) =>{ +var deferred = this.getJobProperties(coordinator.appPath); +propertyPromises.push(deferred.promise); + }, th
ambari git commit: AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/trunk f77ba790c -> 2f123f0ae AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f123f0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f123f0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f123f0a Branch: refs/heads/trunk Commit: 2f123f0ae969fc7304f04fc1f07abc3ff2498db2 Parents: f77ba79 Author: Attila Doroszlai Authored: Fri Dec 23 09:27:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 09:28:26 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f123f0a/ambari-agent/src/main/python/ambari_agent/Hardware.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0d431a3..2233b0a 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -163,9 +163,9 @@ class Hardware: else: ignored_mounts.append(mount) - if len(ignored_mounts) > 0: -ignore_list = [el["mountpoint"] for el in ignored_mounts] -logger.info("Some mount points was ignored: {0}".format(', '.join(ignore_list))) +if len(ignored_mounts) > 0: + ignore_list = [el["mountpoint"] for el in ignored_mounts] + logger.info("Some mount points were ignored: {0}".format(', '.join(ignore_list))) return result_mounts
ambari git commit: AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader)
Repository: ambari Updated Branches: refs/heads/branch-2.5 238bbe58d -> c27fab37d AMBARI-19272. Ignored mount points logged for each mount. (Attila Doroszlai via stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c27fab37 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c27fab37 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c27fab37 Branch: refs/heads/branch-2.5 Commit: c27fab37d8f0b65dfc3047043c144f34c379f749 Parents: 238bbe5 Author: Attila Doroszlai Authored: Fri Dec 23 09:27:07 2016 +0100 Committer: Toader, Sebastian Committed: Fri Dec 23 09:27:07 2016 +0100 -- ambari-agent/src/main/python/ambari_agent/Hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c27fab37/ambari-agent/src/main/python/ambari_agent/Hardware.py -- diff --git a/ambari-agent/src/main/python/ambari_agent/Hardware.py b/ambari-agent/src/main/python/ambari_agent/Hardware.py index 0d431a3..2233b0a 100644 --- a/ambari-agent/src/main/python/ambari_agent/Hardware.py +++ b/ambari-agent/src/main/python/ambari_agent/Hardware.py @@ -163,9 +163,9 @@ class Hardware: else: ignored_mounts.append(mount) - if len(ignored_mounts) > 0: -ignore_list = [el["mountpoint"] for el in ignored_mounts] -logger.info("Some mount points was ignored: {0}".format(', '.join(ignore_list))) +if len(ignored_mounts) > 0: + ignore_list = [el["mountpoint"] for el in ignored_mounts] + logger.info("Some mount points were ignored: {0}".format(', '.join(ignore_list))) return result_mounts