ambari git commit: AMBARI-17262 - Remove {{atlas_conf_dir}} from HADOOP_CLASSPATH in hive-env.
Repository: ambari Updated Branches: refs/heads/trunk eec84460f -> 6950a8a94 AMBARI-17262 - Remove {{atlas_conf_dir}} from HADOOP_CLASSPATH in hive-env. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6950a8a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6950a8a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6950a8a9 Branch: refs/heads/trunk Commit: 6950a8a942e47892bcf094df08d0f8d5aab9ae2b Parents: eec8446 Author: tbeerbower Authored: Thu Jun 16 14:21:55 2016 -0400 Committer: tbeerbower Committed: Thu Jun 16 14:21:55 2016 -0400 -- .../stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6950a8a9/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml index 0c9aeaf..7122c3d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml @@ -69,7 +69,7 @@ export METASTORE_PORT={{hive_metastore_port}} - export HADOOP_CLASSPATH={{atlas_conf_dir}}:{{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH} + export HADOOP_CLASSPATH={{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH} {% if sqla_db_used or lib_dir_available %} export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:{{jdbc_libs_dir}}"
ambari git commit: AMBARI-17262 - Remove {{atlas_conf_dir}} from HADOOP_CLASSPATH in hive-env.
Repository: ambari Updated Branches: refs/heads/branch-2.4 beca88047 -> 9ddb9b778 AMBARI-17262 - Remove {{atlas_conf_dir}} from HADOOP_CLASSPATH in hive-env. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9ddb9b77 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9ddb9b77 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9ddb9b77 Branch: refs/heads/branch-2.4 Commit: 9ddb9b7783242f82f22ed8c022f9f9fb8869502f Parents: beca880 Author: tbeerbower Authored: Thu Jun 16 14:21:55 2016 -0400 Committer: tbeerbower Committed: Thu Jun 16 14:22:38 2016 -0400 -- .../stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9ddb9b77/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml index 0c9aeaf..7122c3d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-env.xml @@ -69,7 +69,7 @@ export METASTORE_PORT={{hive_metastore_port}} - export HADOOP_CLASSPATH={{atlas_conf_dir}}:{{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH} + export HADOOP_CLASSPATH={{atlas_home_dir}}/hook/hive:${HADOOP_CLASSPATH} {% if sqla_db_used or lib_dir_available %} export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:{{jdbc_libs_dir}}"
ambari git commit: AMBARI-17273 - With Atlas HA enabled, atlas instance fails to come up with Unable to find IDs matching any local host and port binding among id1
Repository: ambari Updated Branches: refs/heads/branch-2.4 4d082dd51 -> beca88047 AMBARI-17273 - With Atlas HA enabled, atlas instance fails to come up with Unable to find IDs matching any local host and port binding among id1 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/beca8804 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/beca8804 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/beca8804 Branch: refs/heads/branch-2.4 Commit: beca88047d412f139614a61811e9831963729574 Parents: 4d082dd Author: tbeerbower Authored: Thu Jun 16 14:07:05 2016 -0400 Committer: tbeerbower Committed: Thu Jun 16 14:08:15 2016 -0400 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 22 ++- .../configuration/application-properties.xml| 4 +- .../stacks/HDP/2.5/services/stack_advisor.py| 41 +--- .../stacks/2.5/common/test_stack_advisor.py | 2 - 4 files changed, 24 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/beca8804/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 581c0e2..d77facb 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -130,6 +130,26 @@ else: # hbase hbase_conf_dir = "/etc/hbase/conf" +# atlas HA +atlas_hosts = sorted(default('/clusterHostInfo/atlas_server_hosts', [])) + +id = 1 +server_ids = "" +server_hosts = "" +first_id = True +for host in atlas_hosts: + server_id = "id" + str(id) + server_host = host + ":" + metadata_port + if first_id: +server_ids = server_id +server_hosts = server_host + else: +server_ids += "," + server_id +server_hosts += "\n" + "atlas.server.address." + server_id + "=" + server_host + + id += 1 + first_id = False + atlas_search_backend = default("/configurations/application-properties/atlas.graph.index.search.backend", "") search_backend_solr = atlas_search_backend.startswith('solr') @@ -251,4 +271,4 @@ if has_ranger_admin and stack_supports_atlas_ranger_plugin: 'description': 'atlas repo', 'name': repo_name, 'type': 'atlas', -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/beca8804/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index a5a63ba..8b523d3 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -28,7 +28,7 @@ atlas.server.ids - +{{server_ids}} List of Atlas server ids for HA feature. false @@ -38,7 +38,7 @@ atlas.server.address.id1 - +{{server_hosts}} Mapping of Atlas server ids to hosts. false http://git-wip-us.apache.org/repos/asf/ambari/blob/beca8804/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 35ad34b..01522b2 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 @@ -241,45 +241,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): servicesList = [service["StackServices"]["service_name"] for service in services["services"]] -# HA -atlas_hosts = self.getHostNamesWithComponent("ATLAS", "ATLAS_SERVER", services) - -if 'atlas.enableTLS' in services['configurations']['application-properties']['properties']: - ssl_enabled
ambari git commit: AMBARI-17273 - With Atlas HA enabled, atlas instance fails to come up with Unable to find IDs matching any local host and port binding among id1
Repository: ambari Updated Branches: refs/heads/trunk f674a5678 -> eec84460f AMBARI-17273 - With Atlas HA enabled, atlas instance fails to come up with Unable to find IDs matching any local host and port binding among id1 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eec84460 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eec84460 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eec84460 Branch: refs/heads/trunk Commit: eec84460f391ece3d9018ecf552ef66b6b270159 Parents: f674a56 Author: tbeerbower Authored: Thu Jun 16 14:07:05 2016 -0400 Committer: tbeerbower Committed: Thu Jun 16 14:07:14 2016 -0400 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 22 ++- .../configuration/application-properties.xml| 4 +- .../stacks/HDP/2.5/services/stack_advisor.py| 41 +--- .../stacks/2.5/common/test_stack_advisor.py | 2 - 4 files changed, 24 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eec84460/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 37236fe..614fa6b 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -131,6 +131,26 @@ else: # hbase hbase_conf_dir = "/etc/hbase/conf" +# atlas HA +atlas_hosts = sorted(default('/clusterHostInfo/atlas_server_hosts', [])) + +id = 1 +server_ids = "" +server_hosts = "" +first_id = True +for host in atlas_hosts: + server_id = "id" + str(id) + server_host = host + ":" + metadata_port + if first_id: +server_ids = server_id +server_hosts = server_host + else: +server_ids += "," + server_id +server_hosts += "\n" + "atlas.server.address." + server_id + "=" + server_host + + id += 1 + first_id = False + atlas_search_backend = default("/configurations/application-properties/atlas.graph.index.search.backend", "") search_backend_solr = atlas_search_backend.startswith('solr') @@ -252,4 +272,4 @@ if has_ranger_admin and stack_supports_atlas_ranger_plugin: 'description': 'atlas repo', 'name': repo_name, 'type': 'atlas', -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ambari/blob/eec84460/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index a5a63ba..8b523d3 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -28,7 +28,7 @@ atlas.server.ids - +{{server_ids}} List of Atlas server ids for HA feature. false @@ -38,7 +38,7 @@ atlas.server.address.id1 - +{{server_hosts}} Mapping of Atlas server ids to hosts. false http://git-wip-us.apache.org/repos/asf/ambari/blob/eec84460/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 35ad34b..01522b2 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 @@ -241,45 +241,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): servicesList = [service["StackServices"]["service_name"] for service in services["services"]] -# HA -atlas_hosts = self.getHostNamesWithComponent("ATLAS", "ATLAS_SERVER", services) - -if 'atlas.enableTLS' in services['configurations']['application-properties']['properties']: - ssl_enabled = services['configu
ambari git commit: BUG-60090 - atlas.authentication.principal should be set to atlas/_h...@example.com
Repository: ambari Updated Branches: refs/heads/branch-2.4 c7bceb1b9 -> 24b653d0f BUG-60090 - atlas.authentication.principal should be set to atlas/_h...@example.com Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/24b653d0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/24b653d0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/24b653d0 Branch: refs/heads/branch-2.4 Commit: 24b653d0f53579689915da48c147792c1843146e Parents: c7bceb1 Author: tbeerbower Authored: Tue Jun 14 21:20:31 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 21:21:41 2016 -0400 -- .../resources/stacks/HDP/2.5/services/ATLAS/kerberos.json | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/24b653d0/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json index 78ad6ea..35addc4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json @@ -45,6 +45,15 @@ } }, { + "name": "/ATLAS/ATLAS_SERVER/atlas", + "principal": { +"configuration": "application-properties/atlas.authentication.principal" + }, + "keytab": { +"configuration": "application-properties/atlas.authentication.keytab" + } +}, +{ "name": "/spnego", "principal": { "value": "HTTP/_HOST@${realm}",
ambari git commit: BUG-60090 - atlas.authentication.principal should be set to atlas/_h...@example.com
Repository: ambari Updated Branches: refs/heads/trunk b13eca9a5 -> b5f5ce510 BUG-60090 - atlas.authentication.principal should be set to atlas/_h...@example.com Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5f5ce51 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5f5ce51 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5f5ce51 Branch: refs/heads/trunk Commit: b5f5ce510a86dc9bacba9700b3719d3b840f2c22 Parents: b13eca9 Author: tbeerbower Authored: Tue Jun 14 21:20:31 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 21:20:40 2016 -0400 -- .../resources/stacks/HDP/2.5/services/ATLAS/kerberos.json | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b5f5ce51/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json index 78ad6ea..35addc4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json @@ -45,6 +45,15 @@ } }, { + "name": "/ATLAS/ATLAS_SERVER/atlas", + "principal": { +"configuration": "application-properties/atlas.authentication.principal" + }, + "keytab": { +"configuration": "application-properties/atlas.authentication.keytab" + } +}, +{ "name": "/spnego", "principal": { "value": "HTTP/_HOST@${realm}",
ambari git commit: AMBARI-17005 - Atlas Server Web UI alert
Repository: ambari Updated Branches: refs/heads/branch-2.4 3acccee8e -> 3bce44b17 AMBARI-17005 - Atlas Server Web UI alert Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3bce44b1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3bce44b1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3bce44b1 Branch: refs/heads/branch-2.4 Commit: 3bce44b179db068480d76521d1b98fa02d5a6d90 Parents: 3acccee Author: tbeerbower Authored: Tue Jun 14 18:10:26 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 18:12:59 2016 -0400 -- .../main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3bce44b1/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json index e65b5c1..acc7982 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json @@ -37,8 +37,8 @@ "source": { "type": "WEB", "uri": { -"http": "{{application-properties/atlas.server.http.port}}", -"https": "{{application-properties/atlas.server.https.port}}", +"http": "{{application-properties/atlas.server.bind.address}}:{{application-properties/atlas.server.http.port}}/api/atlas/admin/status", +"https": "{{application-properties/atlas.server.bind.address}}:{{application-properties/atlas.server.https.port}}/api/atlas/admin/status", "https_property": "{{application-properties/atlas.enableTLS}}", "https_property_value": "true", "default_port": 21000,
ambari git commit: AMBARI-17005 - Atlas Server Web UI alert
Repository: ambari Updated Branches: refs/heads/trunk ceb2a24c6 -> 2555de727 AMBARI-17005 - Atlas Server Web UI alert Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2555de72 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2555de72 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2555de72 Branch: refs/heads/trunk Commit: 2555de727e7b69f76b319bb5ed45b306fed91b28 Parents: ceb2a24 Author: tbeerbower Authored: Tue Jun 14 18:10:26 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 18:10:26 2016 -0400 -- .../main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2555de72/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json index e65b5c1..acc7982 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/alerts.json @@ -37,8 +37,8 @@ "source": { "type": "WEB", "uri": { -"http": "{{application-properties/atlas.server.http.port}}", -"https": "{{application-properties/atlas.server.https.port}}", +"http": "{{application-properties/atlas.server.bind.address}}:{{application-properties/atlas.server.http.port}}/api/atlas/admin/status", +"https": "{{application-properties/atlas.server.bind.address}}:{{application-properties/atlas.server.https.port}}/api/atlas/admin/status", "https_property": "{{application-properties/atlas.enableTLS}}", "https_property_value": "true", "default_port": 21000,
ambari git commit: AMBARI-17203 - ATLAS conf dir needs to be present in all ATLAS hook deployed hosts
Repository: ambari Updated Branches: refs/heads/branch-2.4 8066e074b -> 7d7926754 AMBARI-17203 - ATLAS conf dir needs to be present in all ATLAS hook deployed hosts Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d792675 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d792675 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d792675 Branch: refs/heads/branch-2.4 Commit: 7d792675414a4f327e88adf9dc3c5e9ea4a16319 Parents: 8066e07 Author: tbeerbower Authored: Tue Jun 14 04:54:23 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 04:56:19 2016 -0400 -- .../FALCON/0.5.0.2.1/package/scripts/params_linux.py | 3 ++- .../0.5.0.2.1/package/scripts/setup_atlas_falcon.py | 8 .../HIVE/0.12.0.2.0/configuration/hive-env.xml| 2 +- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 9 ++--- .../0.12.0.2.0/package/scripts/setup_atlas_hive.py| 4 ++-- .../SQOOP/1.4.4.2.0/package/scripts/params_linux.py | 3 ++- .../1.4.4.2.0/package/scripts/setup_atlas_sqoop.py| 11 --- .../STORM/0.9.1/package/scripts/params_linux.py | 2 ++ .../STORM/0.9.1/package/scripts/setup_atlas_storm.py | 8 .../stacks/HDP/2.5/services/FALCON/metainfo.xml | 3 +++ .../stacks/HDP/2.5/services/HIVE/metainfo.xml | 3 +++ .../stacks/HDP/2.5/services/SQOOP/metainfo.xml| 3 +++ .../stacks/HDP/2.5/services/STORM/metainfo.xml| 3 +++ .../stacks/HDP/2.5/services/stack_advisor.py | 14 +- 14 files changed, 56 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7d792675/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py index 441f0da..86d76ff 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py @@ -138,10 +138,11 @@ atlas_plugin_package = "atlas-metadata*-hive-plugin" atlas_ubuntu_plugin_package = "atlas-metadata.*-hive-plugin" if has_atlas: - atlas_conf_file = config['configurations']['atlas-env']['metadata_conf_file'] + atlas_conf_file = default('/configurations/atlas-env/metadata_conf_file', 'atlas-application.properties') atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf' atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server') atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook", "falcon", "*") + os.pathsep + atlas_props = default('/configurations/application-properties', {}) hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7d792675/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py index 67077c4..1dce515 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py @@ -18,7 +18,9 @@ limitations under the License. """ +from resource_management.libraries.resources.properties_file import PropertiesFile from resource_management.core.resources.packaging import Package +from resource_management.libraries.functions.format import format from ambari_commons import OSCheck import os @@ -31,3 +33,9 @@ def setup_atlas_falcon(): if not params.host_sys_prepped: Package(params.atlas_ubuntu_plugin_package if OSCheck.is_ubuntu_family() else params.atlas_plugin_package, retry_on_repo_unavailability=params.agent_stack_retry_on_unavailability, retry_count=params.agent_stack_retry_count) + +PropertiesFile(forma
ambari git commit: AMBARI-17203 - ATLAS conf dir needs to be present in all ATLAS hook deployed hosts
Repository: ambari Updated Branches: refs/heads/trunk bc465f1b1 -> 0e426b0d9 AMBARI-17203 - ATLAS conf dir needs to be present in all ATLAS hook deployed hosts Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e426b0d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e426b0d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e426b0d Branch: refs/heads/trunk Commit: 0e426b0d9e2b4034fc1df64fd5c2a1769a235e7d Parents: bc465f1 Author: tbeerbower Authored: Tue Jun 14 04:54:23 2016 -0400 Committer: tbeerbower Committed: Tue Jun 14 04:54:39 2016 -0400 -- .../FALCON/0.5.0.2.1/package/scripts/params_linux.py | 3 ++- .../0.5.0.2.1/package/scripts/setup_atlas_falcon.py | 8 .../HIVE/0.12.0.2.0/configuration/hive-env.xml| 2 +- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 9 ++--- .../0.12.0.2.0/package/scripts/setup_atlas_hive.py| 4 ++-- .../SQOOP/1.4.4.2.0/package/scripts/params_linux.py | 3 ++- .../1.4.4.2.0/package/scripts/setup_atlas_sqoop.py| 11 --- .../STORM/0.9.1/package/scripts/params_linux.py | 2 ++ .../STORM/0.9.1/package/scripts/setup_atlas_storm.py | 8 .../stacks/HDP/2.5/services/FALCON/metainfo.xml | 3 +++ .../stacks/HDP/2.5/services/HIVE/metainfo.xml | 3 +++ .../stacks/HDP/2.5/services/SQOOP/metainfo.xml| 3 +++ .../stacks/HDP/2.5/services/STORM/metainfo.xml| 3 +++ .../stacks/HDP/2.5/services/stack_advisor.py | 14 +- 14 files changed, 56 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0e426b0d/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py index 441f0da..86d76ff 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py @@ -138,10 +138,11 @@ atlas_plugin_package = "atlas-metadata*-hive-plugin" atlas_ubuntu_plugin_package = "atlas-metadata.*-hive-plugin" if has_atlas: - atlas_conf_file = config['configurations']['atlas-env']['metadata_conf_file'] + atlas_conf_file = default('/configurations/atlas-env/metadata_conf_file', 'atlas-application.properties') atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf' atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server') atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook", "falcon", "*") + os.pathsep + atlas_props = default('/configurations/application-properties', {}) hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] http://git-wip-us.apache.org/repos/asf/ambari/blob/0e426b0d/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py index 67077c4..1dce515 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py @@ -18,7 +18,9 @@ limitations under the License. """ +from resource_management.libraries.resources.properties_file import PropertiesFile from resource_management.core.resources.packaging import Package +from resource_management.libraries.functions.format import format from ambari_commons import OSCheck import os @@ -31,3 +33,9 @@ def setup_atlas_falcon(): if not params.host_sys_prepped: Package(params.atlas_ubuntu_plugin_package if OSCheck.is_ubuntu_family() else params.atlas_plugin_package, retry_on_repo_unavailability=params.agent_stack_retry_on_unavailability, retry_count=params.agent_stack_retry_count) + +PropertiesFile(forma
ambari git commit: AMBARI-17166 - Atlas Integration : HBase table name 'titan' to be configurable via Atlas properties
Repository: ambari Updated Branches: refs/heads/branch-2.4 99d3b5041 -> 4d8bf4a4e AMBARI-17166 - Atlas Integration : HBase table name 'titan' to be configurable via Atlas properties Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d8bf4a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d8bf4a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d8bf4a4 Branch: refs/heads/branch-2.4 Commit: 4d8bf4a4e1c1179aea6a53c29e0144e5f901fa37 Parents: 99d3b50 Author: tbeerbower Authored: Fri Jun 10 10:53:44 2016 -0400 Committer: tbeerbower Committed: Fri Jun 10 10:54:59 2016 -0400 -- .../ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml | 6 +++--- .../services/ATLAS/configuration/application-properties.xml| 6 ++ 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4d8bf4a4/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml index 640fce2..372fd31 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml @@ -22,7 +22,7 @@ atlas_log_level -debug +info Log level for atlas logging @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + http://git-wip-us.apache.org/repos/asf/ambari/blob/4d8bf4a4/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 985b4cf..11e636f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -53,6 +53,12 @@ +atlas.graph.storage.hbase.table +atlas_titan + + + + atlas.graph.storage.hostname
ambari git commit: AMBARI-17166 - Atlas Integration : HBase table name 'titan' to be configurable via Atlas properties
Repository: ambari Updated Branches: refs/heads/trunk adb1ca450 -> 08f1365a4 AMBARI-17166 - Atlas Integration : HBase table name 'titan' to be configurable via Atlas properties Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08f1365a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08f1365a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08f1365a Branch: refs/heads/trunk Commit: 08f1365a470b1bf508c82fb6ec77641f5bbdcb7e Parents: adb1ca4 Author: tbeerbower Authored: Fri Jun 10 10:53:44 2016 -0400 Committer: tbeerbower Committed: Fri Jun 10 10:53:53 2016 -0400 -- .../ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml | 6 +++--- .../services/ATLAS/configuration/application-properties.xml| 6 ++ 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08f1365a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml index 640fce2..372fd31 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml @@ -22,7 +22,7 @@ atlas_log_level -debug +info Log level for atlas logging @@ -68,7 +68,7 @@ - + @@ -77,7 +77,7 @@ - + http://git-wip-us.apache.org/repos/asf/ambari/blob/08f1365a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 985b4cf..11e636f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -53,6 +53,12 @@ +atlas.graph.storage.hbase.table +atlas_titan + + + + atlas.graph.storage.hostname
ambari git commit: AMBARI-17144 - Atlas Integration : Required changes for atlas-application.properties
Repository: ambari Updated Branches: refs/heads/branch-2.4 ed6a88f80 -> 20c8adb8b AMBARI-17144 - Atlas Integration : Required changes for atlas-application.properties Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/20c8adb8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20c8adb8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20c8adb8 Branch: refs/heads/branch-2.4 Commit: 20c8adb8b02aa4c7ea7e7cb726fba1885aa4bc8f Parents: ed6a88f Author: tbeerbower Authored: Thu Jun 9 15:31:04 2016 -0400 Committer: tbeerbower Committed: Thu Jun 9 15:31:57 2016 -0400 -- .../configuration/application-properties.xml| 35 +-- .../stacks/HDP/2.5/services/ATLAS/kerberos.json | 62 2 files changed, 93 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/20c8adb8/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 97c3e6a..985b4cf 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -83,18 +83,45 @@ -atlas.login.method -file -Atlas login method (e.g. file). +atlas.authentication.method.kerberos +false +Indicates whether or not Kerberos is enabled. -atlas.login.credentials.file +atlas.authentication.method.file +true +Indicates whether or not file based authentication is enabled. + + + +atlas.authentication.method.ldap +false +Indicates whether or not LDAP authentication is enabled. + + + +atlas.authentication.method.file.filename {{conf_dir}}/users-credentials.properties File path for file based login. +atlas.authentication.method.ldap.type +ldap +The LDAP type (ldap or ad). + + + +atlas.authentication.method.ldap.url + +The LDAP URL. + + true + + + + atlas.auth.policy.file {{conf_dir}}/policy-store.txt Path for the Atlas policy file. http://git-wip-us.apache.org/repos/asf/ambari/blob/20c8adb8/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json new file mode 100644 index 000..78ad6ea --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json @@ -0,0 +1,62 @@ +{ + "services": [ +{ + "name": "ATLAS", + "configurations": [ +{ + "application-properties": { +"atlas.authentication.method.kerberos": "true", +"atlas.kafka.sasl.kerberos.service.name": "${kafka-env/kafka_user}", +"atlas.kafka.security.protocol": "SASL_PLAINTEXT", +"atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", +"atlas.jaas.KafkaClient.loginModuleControlFlag": "required", +"atlas.jaas.KafkaClient.option.useKeyTab": "true", +"atlas.jaas.KafkaClient.option.storeKey": "true", +"atlas.jaas.KafkaClient.option.serviceName": "${kafka-env/kafka_user}" + } +} + ], + "auth_to_local_properties" : [ + "application-properties/atlas.authentication.method.kerberos.name.rules|new_lines_escaped" + ], + "components": [ +{ + "name": "ATLAS_SERVER", + "identities": [ +{ + "name": "atlas", + "principal": { +"value": "atlas/_HOST@${realm}", +"type" : "service", +"configuration": "application-properties/atlas.jaas.KafkaClient.option.principal", +"local_username" : "${atlas-env/metadata_user}" + }, + "keytab": { +
ambari git commit: AMBARI-17144 - Atlas Integration : Required changes for atlas-application.properties
Repository: ambari Updated Branches: refs/heads/trunk f4fbab135 -> f42b25804 AMBARI-17144 - Atlas Integration : Required changes for atlas-application.properties Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f42b2580 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f42b2580 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f42b2580 Branch: refs/heads/trunk Commit: f42b258042dd51b030dcb7d21815234c37da9474 Parents: f4fbab1 Author: tbeerbower Authored: Thu Jun 9 15:31:04 2016 -0400 Committer: tbeerbower Committed: Thu Jun 9 15:31:04 2016 -0400 -- .../configuration/application-properties.xml| 35 +-- .../stacks/HDP/2.5/services/ATLAS/kerberos.json | 62 2 files changed, 93 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f42b2580/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 97c3e6a..985b4cf 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -83,18 +83,45 @@ -atlas.login.method -file -Atlas login method (e.g. file). +atlas.authentication.method.kerberos +false +Indicates whether or not Kerberos is enabled. -atlas.login.credentials.file +atlas.authentication.method.file +true +Indicates whether or not file based authentication is enabled. + + + +atlas.authentication.method.ldap +false +Indicates whether or not LDAP authentication is enabled. + + + +atlas.authentication.method.file.filename {{conf_dir}}/users-credentials.properties File path for file based login. +atlas.authentication.method.ldap.type +ldap +The LDAP type (ldap or ad). + + + +atlas.authentication.method.ldap.url + +The LDAP URL. + + true + + + + atlas.auth.policy.file {{conf_dir}}/policy-store.txt Path for the Atlas policy file. http://git-wip-us.apache.org/repos/asf/ambari/blob/f42b2580/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json new file mode 100644 index 000..78ad6ea --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/kerberos.json @@ -0,0 +1,62 @@ +{ + "services": [ +{ + "name": "ATLAS", + "configurations": [ +{ + "application-properties": { +"atlas.authentication.method.kerberos": "true", +"atlas.kafka.sasl.kerberos.service.name": "${kafka-env/kafka_user}", +"atlas.kafka.security.protocol": "SASL_PLAINTEXT", +"atlas.jaas.KafkaClient.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule", +"atlas.jaas.KafkaClient.loginModuleControlFlag": "required", +"atlas.jaas.KafkaClient.option.useKeyTab": "true", +"atlas.jaas.KafkaClient.option.storeKey": "true", +"atlas.jaas.KafkaClient.option.serviceName": "${kafka-env/kafka_user}" + } +} + ], + "auth_to_local_properties" : [ + "application-properties/atlas.authentication.method.kerberos.name.rules|new_lines_escaped" + ], + "components": [ +{ + "name": "ATLAS_SERVER", + "identities": [ +{ + "name": "atlas", + "principal": { +"value": "atlas/_HOST@${realm}", +"type" : "service", +"configuration": "application-properties/atlas.jaas.KafkaClient.option.principal", +"local_username" : "${atlas-env/metadata_user}" + }, + "keytab": { +
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt (fix test)
Repository: ambari Updated Branches: refs/heads/branch-2.4 4d0fca3a7 -> d9d79cd71 AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt (fix test) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d9d79cd7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d9d79cd7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d9d79cd7 Branch: refs/heads/branch-2.4 Commit: d9d79cd71fae9e0d1bf4427f825619f2ad239ae5 Parents: 4d0fca3 Author: tbeerbower Authored: Tue Jun 7 17:58:18 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 17:59:18 2016 -0400 -- .../BlueprintConfigurationProcessorTest.java| 326 --- 1 file changed, 326 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d9d79cd7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index b678a84..9ec0a09 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -4904,332 +4904,6 @@ public class BlueprintConfigurationProcessorTest { } @Test - public void testAtlas() throws Exception { -final String expectedHostGroupName = "host_group_1"; -final String host1 = "c6401.ambari.apache.org"; -final String host2 = "c6402.ambari.apache.org"; -final String host3 = "c6403.ambari.apache.org"; - -Map> properties = new HashMap>(); -Map atlasProperties = new HashMap(); -properties.put("application-properties", atlasProperties); - -// setup properties that include host information -atlasProperties.put("atlas.kafka.bootstrap.servers", "localhost:6667"); -atlasProperties.put("atlas.kafka.zookeeper.connect", "localhost:2181"); -atlasProperties.put("atlas.graph.index.search.solr.zookeeper-url", "localhost:2181/ambari-solr"); -atlasProperties.put("atlas.graph.storage.hostname", "localhost"); -atlasProperties.put("atlas.audit.hbase.zookeeper.quorum", "localhost"); - - -Configuration clusterConfig = new Configuration(properties, Collections.>>emptyMap()); - -Collection hgComponents = new HashSet(); -hgComponents.add("KAFKA_BROKER"); -hgComponents.add("ZOOKEEPER_SERVER"); -hgComponents.add("HBASE_MASTER"); -List hosts = new ArrayList(); -hosts.add(host1); -hosts.add(host2); -hosts.add(host3); -TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, hgComponents, hosts); - -Collection hostGroups = new HashSet(); -hostGroups.add(group1); - -ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups); -BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology); - -// call top-level cluster config update method -updater.doUpdateForClusterCreate(); - -List hostArray = - Arrays.asList(atlasProperties.get("atlas.kafka.bootstrap.servers").split(",")); -List expected = - Arrays.asList("c6401.ambari.apache.org:6667","c6402.ambari.apache.org:6667", "c6403.ambari.apache.org:6667"); - -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - -hostArray = Arrays.asList(atlasProperties.get("atlas.kafka.zookeeper.connect").split(",")); -expected = - Arrays.asList("c6401.ambari.apache.org:2181","c6402.ambari.apache.org:2181", "c6403.ambari.apache.org:2181"); -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - - -hostArray = Arrays.asList(atlasProperties.get("atlas.graph.index.search.solr.zookeeper-url").split(",")); -expected = - Arrays.asList("c6401.ambari.apache.org:2181/ambari-solr","c6402.ambari.apache.org:2181/ambari-solr", "c6403.ambari.apache.org:2181/ambari-solr"); -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - -hostArray = Arrays.asList(atlasProperties.get("at
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt (fix test)
Repository: ambari Updated Branches: refs/heads/trunk edf85a383 -> b71109eed AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt (fix test) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b71109ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b71109ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b71109ee Branch: refs/heads/trunk Commit: b71109eeda4a892e8d41dad16cc6134f647d0ba7 Parents: edf85a3 Author: tbeerbower Authored: Tue Jun 7 17:58:18 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 17:58:33 2016 -0400 -- .../BlueprintConfigurationProcessorTest.java| 326 --- 1 file changed, 326 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b71109ee/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index b678a84..9ec0a09 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -4904,332 +4904,6 @@ public class BlueprintConfigurationProcessorTest { } @Test - public void testAtlas() throws Exception { -final String expectedHostGroupName = "host_group_1"; -final String host1 = "c6401.ambari.apache.org"; -final String host2 = "c6402.ambari.apache.org"; -final String host3 = "c6403.ambari.apache.org"; - -Map> properties = new HashMap>(); -Map atlasProperties = new HashMap(); -properties.put("application-properties", atlasProperties); - -// setup properties that include host information -atlasProperties.put("atlas.kafka.bootstrap.servers", "localhost:6667"); -atlasProperties.put("atlas.kafka.zookeeper.connect", "localhost:2181"); -atlasProperties.put("atlas.graph.index.search.solr.zookeeper-url", "localhost:2181/ambari-solr"); -atlasProperties.put("atlas.graph.storage.hostname", "localhost"); -atlasProperties.put("atlas.audit.hbase.zookeeper.quorum", "localhost"); - - -Configuration clusterConfig = new Configuration(properties, Collections.>>emptyMap()); - -Collection hgComponents = new HashSet(); -hgComponents.add("KAFKA_BROKER"); -hgComponents.add("ZOOKEEPER_SERVER"); -hgComponents.add("HBASE_MASTER"); -List hosts = new ArrayList(); -hosts.add(host1); -hosts.add(host2); -hosts.add(host3); -TestHostGroup group1 = new TestHostGroup(expectedHostGroupName, hgComponents, hosts); - -Collection hostGroups = new HashSet(); -hostGroups.add(group1); - -ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups); -BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology); - -// call top-level cluster config update method -updater.doUpdateForClusterCreate(); - -List hostArray = - Arrays.asList(atlasProperties.get("atlas.kafka.bootstrap.servers").split(",")); -List expected = - Arrays.asList("c6401.ambari.apache.org:6667","c6402.ambari.apache.org:6667", "c6403.ambari.apache.org:6667"); - -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - -hostArray = Arrays.asList(atlasProperties.get("atlas.kafka.zookeeper.connect").split(",")); -expected = - Arrays.asList("c6401.ambari.apache.org:2181","c6402.ambari.apache.org:2181", "c6403.ambari.apache.org:2181"); -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - - -hostArray = Arrays.asList(atlasProperties.get("atlas.graph.index.search.solr.zookeeper-url").split(",")); -expected = - Arrays.asList("c6401.ambari.apache.org:2181/ambari-solr","c6402.ambari.apache.org:2181/ambari-solr", "c6403.ambari.apache.org:2181/ambari-solr"); -Assert.assertTrue(hostArray.containsAll(expected) && expected.containsAll(hostArray)); - -hostArray = Arrays.asList(atlasProperties.get("atlas.graph.storage.hostnam
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt
Repository: ambari Updated Branches: refs/heads/branch-2.4 8eddba90e -> 5666d2523 AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5666d252 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5666d252 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5666d252 Branch: refs/heads/branch-2.4 Commit: 5666d2523d27184c35ed086114418df2262c Parents: 8eddba9 Author: tbeerbower Authored: Tue Jun 7 16:04:54 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 16:06:15 2016 -0400 -- .../0.1.0.2.3/package/files/policy-store.txt| 26 -- .../package/files/users-credentials.properties | 22 -- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 14 - .../ATLAS/0.1.0.2.3/package/scripts/params.py | 3 - .../configuration/application-properties.xml| 4 +- .../BlueprintConfigurationProcessorTest.java| 326 +++ .../stacks/2.3/ATLAS/test_metadata_server.py| 12 - .../stacks/2.5/ATLAS/test_atlas_server.py | 12 - 8 files changed, 328 insertions(+), 91 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5666d252/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt deleted file mode 100644 index 4b3b126..000 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt +++ /dev/null @@ -1,26 +0,0 @@ -## -## 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. -## -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -typeReadPolicy;;nixon:rwtype:*,entity:* -classReadPolicy;;saqeeb:rtype:*,entity:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/ambari/blob/5666d252/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties deleted file mode 100644 index 33b326f..000 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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. -# - -#username=group::sha256-password -admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt
Repository: ambari Updated Branches: refs/heads/trunk ea2cbfcf3 -> 62e124c98 AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/62e124c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/62e124c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/62e124c9 Branch: refs/heads/trunk Commit: 62e124c9817e6400c71c775a45f388a2c8c18cb0 Parents: ea2cbfc Author: tbeerbower Authored: Tue Jun 7 16:04:54 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 16:04:54 2016 -0400 -- .../0.1.0.2.3/package/files/policy-store.txt| 26 -- .../package/files/users-credentials.properties | 22 -- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 14 - .../ATLAS/0.1.0.2.3/package/scripts/params.py | 3 - .../configuration/application-properties.xml| 4 +- .../BlueprintConfigurationProcessorTest.java| 326 +++ .../stacks/2.3/ATLAS/test_metadata_server.py| 12 - .../stacks/2.5/ATLAS/test_atlas_server.py | 12 - 8 files changed, 328 insertions(+), 91 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/62e124c9/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt deleted file mode 100644 index 4b3b126..000 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt +++ /dev/null @@ -1,26 +0,0 @@ -## -## 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. -## -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -typeReadPolicy;;nixon:rwtype:*,entity:* -classReadPolicy;;saqeeb:rtype:*,entity:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/ambari/blob/62e124c9/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties deleted file mode 100644 index 33b326f..000 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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. -# - -#username=group::sha256-password -admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 -michael=DATA_SCIENTIST::95bfb24de17d285d734b9eaa910
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt
Repository: ambari Updated Branches: refs/heads/branch-2.4 d81fce8df -> 8eddba90e AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8eddba90 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8eddba90 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8eddba90 Branch: refs/heads/branch-2.4 Commit: 8eddba90e87ae480af18a073177daabd77cd5bcd Parents: d81fce8 Author: tbeerbower Authored: Tue Jun 7 15:53:13 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 15:54:16 2016 -0400 -- .../BlueprintConfigurationProcessor.java| 61 +++ .../ATLAS/0.1.0.2.3/package/scripts/params.py | 37 - .../configuration/application-properties.xml| 14 +- .../stacks/HDP/2.5/services/stack_advisor.py| 91 ++- .../BlueprintConfigurationProcessorTest.java| 163 +++ .../stacks/2.5/common/test_stack_advisor.py | 133 +-- 6 files changed, 435 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8eddba90/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 43ac1e9..de70a2c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -2097,6 +2097,59 @@ public class BlueprintConfigurationProcessor { } } + /** + * Custom PropertyUpdater that handles the updating of the Atlas HA related properties. + */ + private static class AtlasHAPropertyUpdater extends MultipleHostTopologyUpdater { + +public AtlasHAPropertyUpdater() { + super("ATLAS_SERVER"); +} + +@Override +public String updateForClusterCreate(String propertyName, String origValue, Map> properties, ClusterTopology topology) { + + int serverId = 1; + + StringBuilder sb = new StringBuilder(); + + Collection hosts = topology.getHostAssignmentsForComponent("ATLAS_SERVER"); + + switch (propertyName) { +case "atlas.server.address.id1": + + Map applicationProperties = properties.get("application-properties"); + + Boolean ssl_enabled = Boolean.parseBoolean(applicationProperties.get("atlas.enableTLS")); + + String port = ssl_enabled ? applicationProperties.get("atlas.server.https.port") : + applicationProperties.get("atlas.server.http.port"); + + for (String host : hosts) { + +if (serverId > 1) { + sb.append("\n").append("atlas.server.address.id").append(serverId).append("="); +} +sb.append(host).append(":").append(port); +++serverId; + } + break; +case "atlas.server.ids": + + while (serverId <= hosts.size()) { +if (serverId > 1) { + sb.append(","); +} +sb.append("id" + serverId++); + } + break; +default: + return origValue; + } + return sb.toString(); +} + } /** * Custom PropertyUpdater that handles the parsing and updating of the @@ -2576,6 +2629,14 @@ public class BlueprintConfigurationProcessor { // ATLAS atlasPropsMap.put("atlas.server.bind.address", new SingleHostTopologyUpdater("ATLAS_SERVER")); +PropertyUpdater atlasHAUpdater = new AtlasHAPropertyUpdater(); +atlasPropsMap.put("atlas.server.ids", atlasHAUpdater); +atlasPropsMap.put("atlas.server.address.id1", atlasHAUpdater); +atlasPropsMap.put("atlas.kafka.bootstrap.servers", new MultipleHostTopologyUpdater("KAFKA_BROKER")); +atlasPropsMap.put("atlas.kafka.zookeeper.connect", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); +atlasPropsMap.put("atlas.graph.index.search.solr.zookeeper-url", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER", ',', false, true, true)); +atlasPropsMap.put("atlas.graph.storage.hostname", new MultipleHostTopologyUpdater("HBASE_MASTER")); +atlasPropsMap.put("atlas.audit.
ambari git commit: AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt
Repository: ambari Updated Branches: refs/heads/trunk 8edd1869e -> ea2cbfcf3 AMBARI-17098 - Atlas Integration : Ambari overwrites users-credentials.properties and policy-store.txt Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea2cbfcf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea2cbfcf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea2cbfcf Branch: refs/heads/trunk Commit: ea2cbfcf3957258501e04583776b346adc478d96 Parents: 8edd186 Author: tbeerbower Authored: Tue Jun 7 15:53:13 2016 -0400 Committer: tbeerbower Committed: Tue Jun 7 15:53:22 2016 -0400 -- .../BlueprintConfigurationProcessor.java| 61 +++ .../ATLAS/0.1.0.2.3/package/scripts/params.py | 37 - .../configuration/application-properties.xml| 14 +- .../stacks/HDP/2.5/services/stack_advisor.py| 91 ++- .../BlueprintConfigurationProcessorTest.java| 163 +++ .../stacks/2.5/common/test_stack_advisor.py | 133 +-- 6 files changed, 435 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea2cbfcf/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index 43ac1e9..de70a2c 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -2097,6 +2097,59 @@ public class BlueprintConfigurationProcessor { } } + /** + * Custom PropertyUpdater that handles the updating of the Atlas HA related properties. + */ + private static class AtlasHAPropertyUpdater extends MultipleHostTopologyUpdater { + +public AtlasHAPropertyUpdater() { + super("ATLAS_SERVER"); +} + +@Override +public String updateForClusterCreate(String propertyName, String origValue, Map> properties, ClusterTopology topology) { + + int serverId = 1; + + StringBuilder sb = new StringBuilder(); + + Collection hosts = topology.getHostAssignmentsForComponent("ATLAS_SERVER"); + + switch (propertyName) { +case "atlas.server.address.id1": + + Map applicationProperties = properties.get("application-properties"); + + Boolean ssl_enabled = Boolean.parseBoolean(applicationProperties.get("atlas.enableTLS")); + + String port = ssl_enabled ? applicationProperties.get("atlas.server.https.port") : + applicationProperties.get("atlas.server.http.port"); + + for (String host : hosts) { + +if (serverId > 1) { + sb.append("\n").append("atlas.server.address.id").append(serverId).append("="); +} +sb.append(host).append(":").append(port); +++serverId; + } + break; +case "atlas.server.ids": + + while (serverId <= hosts.size()) { +if (serverId > 1) { + sb.append(","); +} +sb.append("id" + serverId++); + } + break; +default: + return origValue; + } + return sb.toString(); +} + } /** * Custom PropertyUpdater that handles the parsing and updating of the @@ -2576,6 +2629,14 @@ public class BlueprintConfigurationProcessor { // ATLAS atlasPropsMap.put("atlas.server.bind.address", new SingleHostTopologyUpdater("ATLAS_SERVER")); +PropertyUpdater atlasHAUpdater = new AtlasHAPropertyUpdater(); +atlasPropsMap.put("atlas.server.ids", atlasHAUpdater); +atlasPropsMap.put("atlas.server.address.id1", atlasHAUpdater); +atlasPropsMap.put("atlas.kafka.bootstrap.servers", new MultipleHostTopologyUpdater("KAFKA_BROKER")); +atlasPropsMap.put("atlas.kafka.zookeeper.connect", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); +atlasPropsMap.put("atlas.graph.index.search.solr.zookeeper-url", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER", ',', false, true, true)); +atlasPropsMap.put("atlas.graph.storage.hostname", new MultipleHostTopologyUpdater("HBASE_MASTER")); +atlasPropsMap.put("atlas.audit.hbase.zook
ambari git commit: AMBARI-16730 - Rename atlas lineage configurations
Repository: ambari Updated Branches: refs/heads/branch-2.4 196455948 -> 742a623b9 AMBARI-16730 - Rename atlas lineage configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/742a623b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/742a623b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/742a623b Branch: refs/heads/branch-2.4 Commit: 742a623b9cd11aaba5b0d7f021b7b294b883e792 Parents: 1964559 Author: tbeerbower Authored: Tue May 31 10:02:02 2016 -0400 Committer: tbeerbower Committed: Tue May 31 10:03:55 2016 -0400 -- .../2.5/services/ATLAS/configuration/application-properties.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/742a623b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 1b4d0ea..0430721 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -118,11 +118,11 @@ Kafka auto commit setting for Atlas notifications. -atlas.lineage.table.schema.query.hive_table +atlas.lineage.schema.query.hive_table hive_table where __guid='%s'\, columns -atlas.lineage.table.schema.query.Table +atlas.lineage.schema.query.Table Table where __guid='%s'\, columns
ambari git commit: AMBARI-16730 - Rename atlas lineage configurations
Repository: ambari Updated Branches: refs/heads/trunk 4020d34dc -> b5793f687 AMBARI-16730 - Rename atlas lineage configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b5793f68 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b5793f68 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b5793f68 Branch: refs/heads/trunk Commit: b5793f687c1c4be3e36671f25d62249392de0aed Parents: 4020d34 Author: tbeerbower Authored: Tue May 31 10:02:02 2016 -0400 Committer: tbeerbower Committed: Tue May 31 10:02:02 2016 -0400 -- .../2.5/services/ATLAS/configuration/application-properties.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b5793f68/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 1b4d0ea..0430721 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -118,11 +118,11 @@ Kafka auto commit setting for Atlas notifications. -atlas.lineage.table.schema.query.hive_table +atlas.lineage.schema.query.hive_table hive_table where __guid='%s'\, columns -atlas.lineage.table.schema.query.Table +atlas.lineage.schema.query.Table Table where __guid='%s'\, columns
ambari git commit: AMBARI-16932 - Atlas server start failed after Ambari upgrade due to missing solrCloudCli.sh script
Repository: ambari Updated Branches: refs/heads/branch-2.4 9f93ea6bc -> cc9fb0859 AMBARI-16932 - Atlas server start failed after Ambari upgrade due to missing solrCloudCli.sh script Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cc9fb085 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cc9fb085 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cc9fb085 Branch: refs/heads/branch-2.4 Commit: cc9fb0859e5ba4f835d66aa3ceeb099e1036e658 Parents: 9f93ea6 Author: tbeerbower Authored: Fri May 27 20:45:42 2016 -0400 Committer: tbeerbower Committed: Fri May 27 20:47:07 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py | 2 +- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 3 +++ ambari-server/src/test/python/stacks/2.3/configs/default.json | 5 - ambari-server/src/test/python/stacks/2.3/configs/secure.json| 5 - ambari-server/src/test/python/stacks/2.5/configs/default.json | 5 - 5 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9fb085/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py index f633618..1a6efe1 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py @@ -107,7 +107,7 @@ def metadata(type='server'): content=StaticFile('policy-store.txt') ) -if type == 'server': +if type == 'server' and params.search_backend_solr and params.has_logsearch_solr: random_num = random.random() upload_conf_set('basic_configs', random_num) http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9fb085/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index edbb527..33e5d9e 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -161,6 +161,9 @@ for host in atlas_hosts: id += 1 first_id = False +atlas_search_backend = default("/configurations/application-properties/atlas.graph.index.search.backend", "") +search_backend_solr = atlas_search_backend.startswith('solr') + # logsearch solr logsearch_solr_znode = default("/configurations/logsearch-solr-env/logsearch_solr_znode", None) logsearch_solr_dir = '/usr/lib/ambari-logsearch-solr' http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9fb085/ambari-server/src/test/python/stacks/2.3/configs/default.json -- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/default.json b/ambari-server/src/test/python/stacks/2.3/configs/default.json index ef04248..157fd7e 100644 --- a/ambari-server/src/test/python/stacks/2.3/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.3/configs/default.json @@ -178,7 +178,7 @@ "atlas.cluster.name" : "c2", "atlas.graph.storage.backend": "berkeleyje", "atlas.graph.storage.directory": "data/berkley", -"atlas.graph.index.search.backend": "elasticsearch", +"atlas.graph.index.search.backend": "solr5", "atlas.graph.index.search.directory": "data/es", "atlas.graph.index.search.elasticsearch.client-only": false, "atlas.graph.index.search.elasticsearch.local-mode": true, @@ -333,6 +333,9 @@ "kafka_broker_hosts": [ "c6401.ambari.apache.org" ], + "logsearch_solr_hosts": [ +"c6401.ambari.apache.org" + ], "zookeeper_hosts": [ "c6401.ambari.apache.org" ] http://git-wip-us.apache.org/repos/asf/ambari/blob/cc9fb085/ambari-server/src/test/python/stacks/2.3/configs/secure.json -
ambari git commit: AMBARI-16932 - Atlas server start failed after Ambari upgrade due to missing solrCloudCli.sh script
Repository: ambari Updated Branches: refs/heads/trunk 03600fa75 -> d97f396d6 AMBARI-16932 - Atlas server start failed after Ambari upgrade due to missing solrCloudCli.sh script Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d97f396d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d97f396d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d97f396d Branch: refs/heads/trunk Commit: d97f396d65f3eed069dc2e0d6ecdeee12aad8b78 Parents: 03600fa Author: tbeerbower Authored: Fri May 27 20:45:42 2016 -0400 Committer: tbeerbower Committed: Fri May 27 20:45:54 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py | 2 +- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 3 +++ ambari-server/src/test/python/stacks/2.3/configs/default.json | 5 - ambari-server/src/test/python/stacks/2.3/configs/secure.json| 5 - ambari-server/src/test/python/stacks/2.5/configs/default.json | 5 - 5 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d97f396d/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py index 6f287dc..a2d78a9 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py @@ -109,7 +109,7 @@ def metadata(type='server'): content=StaticFile('policy-store.txt') ) -if type == 'server': +if type == 'server' and params.search_backend_solr and params.has_logsearch_solr: random_num = random.random() upload_conf_set('basic_configs', random_num) http://git-wip-us.apache.org/repos/asf/ambari/blob/d97f396d/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 3a9c614..573857b 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -162,6 +162,9 @@ for host in atlas_hosts: id += 1 first_id = False +atlas_search_backend = default("/configurations/application-properties/atlas.graph.index.search.backend", "") +search_backend_solr = atlas_search_backend.startswith('solr') + # logsearch solr logsearch_solr_znode = default("/configurations/logsearch-solr-env/logsearch_solr_znode", None) logsearch_solr_dir = '/usr/lib/ambari-logsearch-solr' http://git-wip-us.apache.org/repos/asf/ambari/blob/d97f396d/ambari-server/src/test/python/stacks/2.3/configs/default.json -- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/default.json b/ambari-server/src/test/python/stacks/2.3/configs/default.json index ef04248..157fd7e 100644 --- a/ambari-server/src/test/python/stacks/2.3/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.3/configs/default.json @@ -178,7 +178,7 @@ "atlas.cluster.name" : "c2", "atlas.graph.storage.backend": "berkeleyje", "atlas.graph.storage.directory": "data/berkley", -"atlas.graph.index.search.backend": "elasticsearch", +"atlas.graph.index.search.backend": "solr5", "atlas.graph.index.search.directory": "data/es", "atlas.graph.index.search.elasticsearch.client-only": false, "atlas.graph.index.search.elasticsearch.local-mode": true, @@ -333,6 +333,9 @@ "kafka_broker_hosts": [ "c6401.ambari.apache.org" ], + "logsearch_solr_hosts": [ +"c6401.ambari.apache.org" + ], "zookeeper_hosts": [ "c6401.ambari.apache.org" ] http://git-wip-us.apache.org/repos/asf/ambari/blob/d97f396d/ambari-server/src/test/python/stacks/2.3/configs/secure.json -
ambari git commit: AMBARI-16853 - Atlas Integration : Atlas support for Logsearch
Repository: ambari Updated Branches: refs/heads/branch-2.4 ce4a8c241 -> 92c89bbfb AMBARI-16853 - Atlas Integration : Atlas support for Logsearch Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/92c89bbf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/92c89bbf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/92c89bbf Branch: refs/heads/branch-2.4 Commit: 92c89bbfbc4c398b2daf6ea36604baa2c1e62a22 Parents: ce4a8c2 Author: tbeerbower Authored: Thu May 26 10:24:59 2016 -0400 Committer: tbeerbower Committed: Thu May 26 10:29:44 2016 -0400 -- .../configuration/application-properties.xml| 30 - .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 2 +- .../configuration/atlas-hbase-site.xml | 58 - .../ATLAS/0.1.0.2.3/metainfo.xml| 15 - .../0.1.0.2.3/package/scripts/atlas_client.py | 2 +- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 65 .../ATLAS/0.1.0.2.3/package/scripts/params.py | 26 +--- .../configuration/application-properties.xml| 33 +- .../services/ATLAS/configuration/atlas-env.xml | 19 +++--- .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 16 - .../stacks/HDP/2.5/services/stack_advisor.py| 58 - .../stacks/2.3/ATLAS/test_metadata_server.py| 28 +++-- .../test/python/stacks/2.3/configs/default.json | 6 +- .../test/python/stacks/2.3/configs/secure.json | 6 +- .../stacks/2.5/ATLAS/test_atlas_server.py | 29 +++-- .../stacks/2.5/common/test_stack_advisor.py | 16 - .../test/python/stacks/2.5/configs/default.json | 6 +- 17 files changed, 211 insertions(+), 204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/92c89bbf/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index bf0467e..ca8e4c5 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -136,31 +136,6 @@ Indicates whether or not the notification service should be embedded. -atlas.kafka.data -{{metadata_home}}/data/kafka -The Kafka data directory. - - -atlas.kafka.bootstrap.servers -{{kafka_bootstrap_servers}} -Comma separated list of Kafka broker endpoints in host:port form - - -atlas.kafka.zookeeper.connect -{{kafka_zookeeper_connect}} -Comma separated list of servers forming Zookeeper quorum used by Kafka. - - -atlas.kafka.hook.group.id -atlas -Kafka group id for the hook topic. - - -atlas.kafka.entities.group.id -entities -Kafka group id for the entity topic. - - atlas.cluster.name {{cluster_name}} The cluster name. @@ -220,9 +195,4 @@ 1000 - -atlas.audit.hbase.zookeeper.quorum -localhost:{{atlas_hbase_zk_port}} - - http://git-wip-us.apache.org/repos/asf/ambari/blob/92c89bbf/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index dd4b3e2..d52d1a3 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -103,7 +103,7 @@ export METADATA_DATA_DIR={{data_dir}} export METADATA_PID_DIR={{pid_dir}} # hbase conf dir -export HBASE_CONF_DIR={{atlas_hbase_conf_dir}} +export HBASE_CONF_DIR={{hbase_conf_dir}} # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. export METADATA_EXPANDED_WEBAPP_DIR={{expanded_war_dir}} http://git-wip-us.apache.org/repos/asf/ambari/blob/92c89bbf/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hb
ambari git commit: AMBARI-16853 - Atlas Integration : Atlas support for Logsearch
Repository: ambari Updated Branches: refs/heads/trunk 754291661 -> 14e4956f1 AMBARI-16853 - Atlas Integration : Atlas support for Logsearch Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14e4956f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14e4956f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14e4956f Branch: refs/heads/trunk Commit: 14e4956f14d10b0ac37400b5d954ce08296df835 Parents: 7542916 Author: tbeerbower Authored: Thu May 26 10:24:59 2016 -0400 Committer: tbeerbower Committed: Thu May 26 10:24:59 2016 -0400 -- .../configuration/application-properties.xml| 30 - .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 2 +- .../configuration/atlas-hbase-site.xml | 58 .../ATLAS/0.1.0.2.3/metainfo.xml| 15 - .../0.1.0.2.3/package/scripts/atlas_client.py | 2 +- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 70 +++- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 26 +--- .../configuration/application-properties.xml| 33 - .../services/ATLAS/configuration/atlas-env.xml | 19 +++--- .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 16 - .../stacks/HDP/2.5/services/stack_advisor.py| 58 +++- .../stacks/2.3/ATLAS/test_metadata_server.py| 28 ++-- .../test/python/stacks/2.3/configs/default.json | 6 +- .../test/python/stacks/2.3/configs/secure.json | 6 +- .../stacks/2.5/ATLAS/test_atlas_server.py | 29 +++- .../stacks/2.5/common/test_stack_advisor.py | 16 - .../test/python/stacks/2.5/configs/default.json | 6 +- 17 files changed, 212 insertions(+), 208 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/14e4956f/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index bf0467e..ca8e4c5 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -136,31 +136,6 @@ Indicates whether or not the notification service should be embedded. -atlas.kafka.data -{{metadata_home}}/data/kafka -The Kafka data directory. - - -atlas.kafka.bootstrap.servers -{{kafka_bootstrap_servers}} -Comma separated list of Kafka broker endpoints in host:port form - - -atlas.kafka.zookeeper.connect -{{kafka_zookeeper_connect}} -Comma separated list of servers forming Zookeeper quorum used by Kafka. - - -atlas.kafka.hook.group.id -atlas -Kafka group id for the hook topic. - - -atlas.kafka.entities.group.id -entities -Kafka group id for the entity topic. - - atlas.cluster.name {{cluster_name}} The cluster name. @@ -220,9 +195,4 @@ 1000 - -atlas.audit.hbase.zookeeper.quorum -localhost:{{atlas_hbase_zk_port}} - - http://git-wip-us.apache.org/repos/asf/ambari/blob/14e4956f/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index dd4b3e2..d52d1a3 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -103,7 +103,7 @@ export METADATA_DATA_DIR={{data_dir}} export METADATA_PID_DIR={{pid_dir}} # hbase conf dir -export HBASE_CONF_DIR={{atlas_hbase_conf_dir}} +export HBASE_CONF_DIR={{hbase_conf_dir}} # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. export METADATA_EXPANDED_WEBAPP_DIR={{expanded_war_dir}} http://git-wip-us.apache.org/repos/asf/ambari/blob/14e4956f/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml dele
ambari git commit: AMBARI-16781 - Atlas HA configuration Property Changed
Repository: ambari Updated Branches: refs/heads/branch-2.4 2e07edf22 -> 76a2eeef4 AMBARI-16781 - Atlas HA configuration Property Changed Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76a2eeef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76a2eeef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76a2eeef Branch: refs/heads/branch-2.4 Commit: 76a2eeef4eb1a1590aaae806b5bef9ac53b94356 Parents: 2e07edf Author: tbeerbower Authored: Fri May 20 06:49:32 2016 -0400 Committer: tbeerbower Committed: Fri May 20 06:50:55 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 2 +- .../services/ATLAS/configuration/application-properties.xml| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76a2eeef/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 9e22808..1ce9cda 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -158,7 +158,7 @@ for host in atlas_hosts: server_hosts = server_host else: server_ids += "," + server_id -server_hosts += "\n" + "atlas.server.host." + server_id + "=" + server_host +server_hosts += "\n" + "atlas.server.address." + server_id + "=" + server_host id += 1 first_id = False http://git-wip-us.apache.org/repos/asf/ambari/blob/76a2eeef/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 53c1369..0631b7d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -34,7 +34,7 @@ -atlas.server.host.id1 +atlas.server.address.id1 {{server_hosts}} Mapping of Atlas server ids to hosts. @@ -88,11 +88,11 @@ atlas.lineage.table.schema.query.hive_table -hive_table where name='%s'\, columns +hive_table where __guid='%s'\, columns atlas.lineage.table.schema.query.Table -Table where name='%s'\, columns +Table where __guid='%s'\, columns atlas.lineage.hive.table.type.name
ambari git commit: AMBARI-16781 - Atlas HA configuration Property Changed
Repository: ambari Updated Branches: refs/heads/trunk 9fb75ef6e -> 2d310cf0e AMBARI-16781 - Atlas HA configuration Property Changed Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2d310cf0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2d310cf0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2d310cf0 Branch: refs/heads/trunk Commit: 2d310cf0ebd730da8f0fe0facdecafb0edf81bbd Parents: 9fb75ef Author: tbeerbower Authored: Fri May 20 06:49:32 2016 -0400 Committer: tbeerbower Committed: Fri May 20 06:49:41 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 2 +- .../services/ATLAS/configuration/application-properties.xml| 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2d310cf0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 21bc0c5..f172b79 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -159,7 +159,7 @@ for host in atlas_hosts: server_hosts = server_host else: server_ids += "," + server_id -server_hosts += "\n" + "atlas.server.host." + server_id + "=" + server_host +server_hosts += "\n" + "atlas.server.address." + server_id + "=" + server_host id += 1 first_id = False http://git-wip-us.apache.org/repos/asf/ambari/blob/2d310cf0/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 53c1369..0631b7d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -34,7 +34,7 @@ -atlas.server.host.id1 +atlas.server.address.id1 {{server_hosts}} Mapping of Atlas server ids to hosts. @@ -88,11 +88,11 @@ atlas.lineage.table.schema.query.hive_table -hive_table where name='%s'\, columns +hive_table where __guid='%s'\, columns atlas.lineage.table.schema.query.Table -Table where name='%s'\, columns +Table where __guid='%s'\, columns atlas.lineage.hive.table.type.name
ambari git commit: AMBARI-16730 - Rename atlas lineage configurations
Repository: ambari Updated Branches: refs/heads/branch-2.4 0f0e4f42f -> 5d2f14d73 AMBARI-16730 - Rename atlas lineage configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5d2f14d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5d2f14d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5d2f14d7 Branch: refs/heads/branch-2.4 Commit: 5d2f14d73a82947e7bfecb96cc4e7306ec0eaaef Parents: 0f0e4f4 Author: tbeerbower Authored: Thu May 19 10:46:45 2016 -0400 Committer: tbeerbower Committed: Thu May 19 10:47:52 2016 -0400 -- .../configuration/application-properties.xml| 32 1 file changed, 32 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5d2f14d7/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 2dab35a..53c1369 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -86,4 +86,36 @@ false Kafka auto commit setting for Atlas notifications. + +atlas.lineage.table.schema.query.hive_table +hive_table where name='%s'\, columns + + +atlas.lineage.table.schema.query.Table +Table where name='%s'\, columns + + +atlas.lineage.hive.table.type.name +true + + +atlas.lineage.hive.table.schema.query.hive_table +true + + +atlas.lineage.hive.table.schema.query.Table +true + + +atlas.lineage.hive.process.type.name +true + + +atlas.lineage.hive.process.inputs.name +true + + +atlas.lineage.hive.process.outputs.name +true +
ambari git commit: AMBARI-16730 - Rename atlas lineage configurations
Repository: ambari Updated Branches: refs/heads/trunk 785dd318f -> 9a5f012d2 AMBARI-16730 - Rename atlas lineage configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9a5f012d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9a5f012d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9a5f012d Branch: refs/heads/trunk Commit: 9a5f012d20f554fd4fbc817902ee1124291d7551 Parents: 785dd31 Author: tbeerbower Authored: Thu May 19 10:46:45 2016 -0400 Committer: tbeerbower Committed: Thu May 19 10:46:54 2016 -0400 -- .../configuration/application-properties.xml| 32 1 file changed, 32 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9a5f012d/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 2dab35a..53c1369 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -86,4 +86,36 @@ false Kafka auto commit setting for Atlas notifications. + +atlas.lineage.table.schema.query.hive_table +hive_table where name='%s'\, columns + + +atlas.lineage.table.schema.query.Table +Table where name='%s'\, columns + + +atlas.lineage.hive.table.type.name +true + + +atlas.lineage.hive.table.schema.query.hive_table +true + + +atlas.lineage.hive.table.schema.query.Table +true + + +atlas.lineage.hive.process.type.name +true + + +atlas.lineage.hive.process.inputs.name +true + + +atlas.lineage.hive.process.outputs.name +true +
ambari git commit: AMBARI-16690 - Atlas Integration : Change default expanded web app directory
Repository: ambari Updated Branches: refs/heads/branch-2.4 9201b6498 -> 2f89a707c AMBARI-16690 - Atlas Integration : Change default expanded web app directory Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2f89a707 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f89a707 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f89a707 Branch: refs/heads/branch-2.4 Commit: 2f89a707cb33fc52fef6f0d9374e29a466ce499f Parents: 9201b64 Author: tbeerbower Authored: Wed May 18 09:14:28 2016 -0400 Committer: tbeerbower Committed: Wed May 18 09:15:42 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 6 +++--- .../services/ATLAS/configuration/application-properties.xml| 5 + .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py | 6 +++--- .../src/test/python/stacks/2.5/ATLAS/test_atlas_server.py | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2f89a707/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 21199d8..9e22808 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -111,8 +111,8 @@ metadata_env_content = config['configurations']['atlas-env']['content'] metadata_opts = config['configurations']['atlas-env']['metadata_opts'] metadata_classpath = config['configurations']['atlas-env']['metadata_classpath'] -data_dir = config['configurations']['atlas-env']['metadata_data_dir'] -expanded_war_dir = os.environ['METADATA_EXPANDED_WEBAPP_DIR'] if 'METADATA_EXPANDED_WEBAPP_DIR' in os.environ else '/var/lib/atlas/server/webapp' +data_dir = format("{stack_root}/current/atlas-server/data") +expanded_war_dir = os.environ['METADATA_EXPANDED_WEBAPP_DIR'] if 'METADATA_EXPANDED_WEBAPP_DIR' in os.environ else format("{stack_root}/current/atlas-server/server/webapp") metadata_log4j_content = config['configurations']['atlas-log4j']['content'] @@ -182,4 +182,4 @@ for host in zookeeper_hosts: index += 1 if index < len(zookeeper_hosts): zookeeper_quorum += "," -solr_zookeeper_url += "," \ No newline at end of file +solr_zookeeper_url += "," http://git-wip-us.apache.org/repos/asf/ambari/blob/2f89a707/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 03f825b..2dab35a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -81,4 +81,9 @@ {{atlas_policy_store_file}} Path for the Atlas policy file. + +atlas.kafka.auto.commit.enable +false +Kafka auto commit setting for Atlas notifications. + http://git-wip-us.apache.org/repos/asf/ambari/blob/2f89a707/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py index 80a345e..98fc678 100644 --- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py +++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py @@ -66,21 +66,21 @@ class TestMetadataServer(RMFTestCase): cd_access='a', mode=0755 ) - self.assertResourceCalled('Directory', '/var/lib/atlas/data', + self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/data', owner='atlas',
ambari git commit: AMBARI-16690 - Atlas Integration : Change default expanded web app directory
Repository: ambari Updated Branches: refs/heads/trunk 7d516272c -> c418de5cd AMBARI-16690 - Atlas Integration : Change default expanded web app directory Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c418de5c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c418de5c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c418de5c Branch: refs/heads/trunk Commit: c418de5cd602d259da8476b414646b6ce744f3b2 Parents: 7d51627 Author: tbeerbower Authored: Wed May 18 09:14:28 2016 -0400 Committer: tbeerbower Committed: Wed May 18 09:14:37 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 6 +++--- .../services/ATLAS/configuration/application-properties.xml| 5 + .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py | 6 +++--- .../src/test/python/stacks/2.5/ATLAS/test_atlas_server.py | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c418de5c/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index b33a956..21bc0c5 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -112,8 +112,8 @@ metadata_env_content = config['configurations']['atlas-env']['content'] metadata_opts = config['configurations']['atlas-env']['metadata_opts'] metadata_classpath = config['configurations']['atlas-env']['metadata_classpath'] -data_dir = config['configurations']['atlas-env']['metadata_data_dir'] -expanded_war_dir = os.environ['METADATA_EXPANDED_WEBAPP_DIR'] if 'METADATA_EXPANDED_WEBAPP_DIR' in os.environ else '/var/lib/atlas/server/webapp' +data_dir = format("{stack_root}/current/atlas-server/data") +expanded_war_dir = os.environ['METADATA_EXPANDED_WEBAPP_DIR'] if 'METADATA_EXPANDED_WEBAPP_DIR' in os.environ else format("{stack_root}/current/atlas-server/server/webapp") metadata_log4j_content = config['configurations']['atlas-log4j']['content'] @@ -183,4 +183,4 @@ for host in zookeeper_hosts: index += 1 if index < len(zookeeper_hosts): zookeeper_quorum += "," -solr_zookeeper_url += "," \ No newline at end of file +solr_zookeeper_url += "," http://git-wip-us.apache.org/repos/asf/ambari/blob/c418de5c/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 03f825b..2dab35a 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -81,4 +81,9 @@ {{atlas_policy_store_file}} Path for the Atlas policy file. + +atlas.kafka.auto.commit.enable +false +Kafka auto commit setting for Atlas notifications. + http://git-wip-us.apache.org/repos/asf/ambari/blob/c418de5c/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py index 80a345e..98fc678 100644 --- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py +++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py @@ -66,21 +66,21 @@ class TestMetadataServer(RMFTestCase): cd_access='a', mode=0755 ) - self.assertResourceCalled('Directory', '/var/lib/atlas/data', + self.assertResourceCalled('Directory', '/usr/hdp/current/atlas-server/data', owner='atlas', grou
ambari git commit: AMBARI-16693 - Atlas Server script error during upgrade.
Repository: ambari Updated Branches: refs/heads/branch-2.4 4538a0dd9 -> 8e69f3f86 AMBARI-16693 - Atlas Server script error during upgrade. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e69f3f8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e69f3f8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e69f3f8 Branch: refs/heads/branch-2.4 Commit: 8e69f3f86a52c1ad72bc22c335fb203eb5caaa3f Parents: 4538a0d Author: tbeerbower Authored: Tue May 17 09:13:39 2016 -0400 Committer: tbeerbower Committed: Tue May 17 09:14:59 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8e69f3f8/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index f9422ee..21199d8 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -135,7 +135,8 @@ else: # kafka kafka_bootstrap_servers = "" -kafka_broker_hosts = config['clusterHostInfo']['kafka_broker_hosts'] +kafka_broker_hosts = default('/clusterHostInfo/kafka_broker_hosts', []) + if not len(kafka_broker_hosts) == 0: kafka_broker_port = default("/configurations/kafka-broker/port", 6667) kafka_bootstrap_servers = kafka_broker_hosts[0] + ":" + str(kafka_broker_port)
ambari git commit: AMBARI-16693 - Atlas Server script error during upgrade.
Repository: ambari Updated Branches: refs/heads/trunk 0d5b881c4 -> ea08b971c AMBARI-16693 - Atlas Server script error during upgrade. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea08b971 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea08b971 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea08b971 Branch: refs/heads/trunk Commit: ea08b971c370a784e47977cc4f6358d86f6b6f7d Parents: 0d5b881 Author: tbeerbower Authored: Tue May 17 09:13:39 2016 -0400 Committer: tbeerbower Committed: Tue May 17 09:13:55 2016 -0400 -- .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea08b971/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index fb4a55f..b33a956 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -136,7 +136,8 @@ else: # kafka kafka_bootstrap_servers = "" -kafka_broker_hosts = config['clusterHostInfo']['kafka_broker_hosts'] +kafka_broker_hosts = default('/clusterHostInfo/kafka_broker_hosts', []) + if not len(kafka_broker_hosts) == 0: kafka_broker_port = default("/configurations/kafka-broker/port", 6667) kafka_bootstrap_servers = kafka_broker_hosts[0] + ":" + str(kafka_broker_port)
ambari git commit: AMBARI-16263 - Falcon server start fails
Repository: ambari Updated Branches: refs/heads/branch-2.4 a9f512e6f -> d6685f9e7 AMBARI-16263 - Falcon server start fails Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d6685f9e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d6685f9e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d6685f9e Branch: refs/heads/branch-2.4 Commit: d6685f9e71269e3999b52b11a8734b6ff69c56d6 Parents: a9f512e Author: tbeerbower Authored: Thu May 12 13:54:13 2016 -0400 Committer: tbeerbower Committed: Thu May 12 17:42:30 2016 -0400 -- .../0.5.0.2.1/configuration/falcon-env.xml | 3 +++ .../0.5.0.2.1/package/scripts/params_linux.py| 1 + .../package/scripts/setup_atlas_falcon.py| 19 --- 3 files changed, 4 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d6685f9e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml index 3fdf2e6..9c1e85f 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml @@ -157,6 +157,9 @@ export FALCON_DATA_DIR={{falcon_embeddedmq_data}} # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. #export FALCON_EXPANDED_WEBAPP_DIR= + +# Add the Atlas Falcon hook to the Falcon classpath +export FALCON_EXTRA_CLASS_PATH={{atlas_hook_cp}}${FALCON_EXTRA_CLASS_PATH} content http://git-wip-us.apache.org/repos/asf/ambari/blob/d6685f9e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py index bf7f437..8e666ac 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py @@ -123,6 +123,7 @@ if has_atlas: atlas_conf_file = config['configurations']['atlas-env']['metadata_conf_file'] atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf' atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server') + atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook", "falcon", "*") + os.pathsep hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] http://git-wip-us.apache.org/repos/asf/ambari/blob/d6685f9e/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py index 4b7c0c3..67077c4 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py @@ -19,8 +19,6 @@ limitations under the License. """ from resource_management.core.resources.packaging import Package -from resource_management.core.resources.system import Directory -from resource_management.core.resources.system import Link from ambari_commons import OSCheck import os @@ -33,20 +31,3 @@ def setup_atlas_falcon(): if not params.host_sys_prepped: Package(params.atlas_ubuntu_plugin_package if OSCheck.is_ubuntu_family() else params.atlas_plugin_package, retry_on_repo_unavailability=params.agent_stack_retry_on_unavailability, retry_count=params.agent_stack_retry_count) - -atlas_falcon_hook_dir = os.path.join(params.atlas_home_dir, "hook", "falcon") -if os.path.exists
ambari git commit: AMBARI-16464 - Atlas fails to come up with solr as indexing search when the zookeeper quorum has more than one host
Repository: ambari Updated Branches: refs/heads/branch-2.4 e02110f16 -> a9f512e6f AMBARI-16464 - Atlas fails to come up with solr as indexing search when the zookeeper quorum has more than one host Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a9f512e6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a9f512e6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a9f512e6 Branch: refs/heads/branch-2.4 Commit: a9f512e6f337c967809ba0c9107e50e0516e5b0a Parents: e02110f Author: tbeerbower Authored: Thu May 12 13:58:19 2016 -0400 Committer: tbeerbower Committed: Thu May 12 17:41:10 2016 -0400 -- .../0.1.0.2.3/package/files/policy-store.txt| 26 .../package/files/users-credentials.properties | 7 +++--- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 7 ++ .../ATLAS/0.1.0.2.3/package/scripts/params.py | 21 .../configuration/application-properties.xml| 7 ++ .../stacks/HDP/2.5/services/stack_advisor.py| 5 ++-- .../stacks/2.3/ATLAS/test_metadata_server.py| 6 + .../stacks/2.5/ATLAS/test_atlas_server.py | 6 + .../stacks/2.5/common/test_stack_advisor.py | 2 +- 9 files changed, 75 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f512e6/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt new file mode 100644 index 000..4b3b126 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt @@ -0,0 +1,26 @@ +## +## 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. +## +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +typeReadPolicy;;nixon:rwtype:*,entity:* +classReadPolicy;;saqeeb:rtype:*,entity:* +dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f512e6/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties index 4d264a0..33b326f 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties @@ -16,6 +16,7 @@ # limitations under the License. # -#username=password -admin=admin -user=user123 \ No newline at end of file +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +michael=DATA_SCIENTIST::95bfb24de17d285d734b9eaa9109bfe922adc85f20d2e5e66a78bddb4a4ebddb +paul=DATA_STEWARD::e7c0dcf5f8a93e93791e9bac1ae454a691c1d2a902fc4256d489e96c1b9ac68c http://git-wip-us.apache.org/repos/asf/ambari/blob/a9f512e6/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.
ambari git commit: AMBARI-16464 - Atlas fails to come up with solr as indexing search when the zookeeper quorum has more than one host
Repository: ambari Updated Branches: refs/heads/trunk 76785453b -> 8f67e1c80 AMBARI-16464 - Atlas fails to come up with solr as indexing search when the zookeeper quorum has more than one host Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8f67e1c8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8f67e1c8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8f67e1c8 Branch: refs/heads/trunk Commit: 8f67e1c80bfd11de34af763b98103183fbb0177a Parents: 7678545 Author: tbeerbower Authored: Thu May 12 13:58:19 2016 -0400 Committer: tbeerbower Committed: Thu May 12 13:58:19 2016 -0400 -- .../0.1.0.2.3/package/files/policy-store.txt| 26 .../package/files/users-credentials.properties | 7 +++--- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 7 ++ .../ATLAS/0.1.0.2.3/package/scripts/params.py | 21 .../configuration/application-properties.xml| 7 ++ .../stacks/HDP/2.5/services/stack_advisor.py| 5 ++-- .../stacks/2.3/ATLAS/test_metadata_server.py| 6 + .../stacks/2.5/ATLAS/test_atlas_server.py | 6 + .../stacks/2.5/common/test_stack_advisor.py | 2 +- 9 files changed, 75 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8f67e1c8/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt new file mode 100644 index 000..4b3b126 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/policy-store.txt @@ -0,0 +1,26 @@ +## +## 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. +## +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +typeReadPolicy;;nixon:rwtype:*,entity:* +classReadPolicy;;saqeeb:rtype:*,entity:* +dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/ambari/blob/8f67e1c8/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties index 4d264a0..33b326f 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties @@ -16,6 +16,7 @@ # limitations under the License. # -#username=password -admin=admin -user=user123 \ No newline at end of file +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +michael=DATA_SCIENTIST::95bfb24de17d285d734b9eaa9109bfe922adc85f20d2e5e66a78bddb4a4ebddb +paul=DATA_STEWARD::e7c0dcf5f8a93e93791e9bac1ae454a691c1d2a902fc4256d489e96c1b9ac68c http://git-wip-us.apache.org/repos/asf/ambari/blob/8f67e1c8/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/pack
ambari git commit: AMBARI-16263 - Falcon server start fails
Repository: ambari Updated Branches: refs/heads/trunk 392e57dc5 -> 76785453b AMBARI-16263 - Falcon server start fails Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/76785453 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/76785453 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/76785453 Branch: refs/heads/trunk Commit: 76785453ba0b63464088c34aac1ad61ee99dd797 Parents: 392e57d Author: tbeerbower Authored: Thu May 12 13:54:13 2016 -0400 Committer: tbeerbower Committed: Thu May 12 13:54:13 2016 -0400 -- .../0.5.0.2.1/configuration/falcon-env.xml | 3 +++ .../0.5.0.2.1/package/scripts/params_linux.py| 1 + .../package/scripts/setup_atlas_falcon.py| 19 --- 3 files changed, 4 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/76785453/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml index 3fdf2e6..9c1e85f 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml @@ -157,6 +157,9 @@ export FALCON_DATA_DIR={{falcon_embeddedmq_data}} # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. #export FALCON_EXPANDED_WEBAPP_DIR= + +# Add the Atlas Falcon hook to the Falcon classpath +export FALCON_EXTRA_CLASS_PATH={{atlas_hook_cp}}${FALCON_EXTRA_CLASS_PATH} content http://git-wip-us.apache.org/repos/asf/ambari/blob/76785453/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py index bf7f437..8e666ac 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py @@ -123,6 +123,7 @@ if has_atlas: atlas_conf_file = config['configurations']['atlas-env']['metadata_conf_file'] atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf' atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server') + atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook", "falcon", "*") + os.pathsep hdfs_site = config['configurations']['hdfs-site'] default_fs = config['configurations']['core-site']['fs.defaultFS'] http://git-wip-us.apache.org/repos/asf/ambari/blob/76785453/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py index 4b7c0c3..67077c4 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/setup_atlas_falcon.py @@ -19,8 +19,6 @@ limitations under the License. """ from resource_management.core.resources.packaging import Package -from resource_management.core.resources.system import Directory -from resource_management.core.resources.system import Link from ambari_commons import OSCheck import os @@ -33,20 +31,3 @@ def setup_atlas_falcon(): if not params.host_sys_prepped: Package(params.atlas_ubuntu_plugin_package if OSCheck.is_ubuntu_family() else params.atlas_plugin_package, retry_on_repo_unavailability=params.agent_stack_retry_on_unavailability, retry_count=params.agent_stack_retry_count) - -atlas_falcon_hook_dir = os.path.join(params.atlas_home_dir, "hook", "falcon") -if os.path.exists
ambari git commit: AMBARI-16204 - Atlas Integration : Atlas start failed after removing old version of the atlas and installing new one
Repository: ambari Updated Branches: refs/heads/trunk 1fce0cabb -> b571e4a0b AMBARI-16204 - Atlas Integration : Atlas start failed after removing old version of the atlas and installing new one Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b571e4a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b571e4a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b571e4a0 Branch: refs/heads/trunk Commit: b571e4a0b05d813adfcbbfe7f90563555844ca28 Parents: 1fce0ca Author: tbeerbower Authored: Tue May 3 06:03:56 2016 -0400 Committer: tbeerbower Committed: Tue May 3 06:04:28 2016 -0400 -- .../configuration/application-properties.xml| 6 ++--- .../ATLAS/0.1.0.2.3/metainfo.xml| 6 ++--- .../package/files/users-credentials.properties | 21 + .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 24 +--- .../package/scripts/metadata_server.py | 9 .../ATLAS/0.1.0.2.3/package/scripts/params.py | 2 ++ .../configuration/application-properties.xml| 10 .../services/ATLAS/configuration/atlas-env.xml | 10 .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 4 ++-- .../stacks/2.3/ATLAS/test_metadata_server.py| 6 + .../test/python/stacks/2.3/configs/default.json | 3 ++- .../test/python/stacks/2.3/configs/secure.json | 3 ++- .../stacks/2.5/ATLAS/test_atlas_server.py | 6 + .../test/python/stacks/2.5/configs/default.json | 3 ++- 14 files changed, 94 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b571e4a0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index f3ea36f..bf0467e 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -21,12 +21,12 @@ atlas.graph.storage.backend -hbase +berkeleyje -atlas.graph.storage.hostname -localhost:{{atlas_hbase_zk_port}} +atlas.graph.storage.directory +/var/lib/atlas/data/berkeley http://git-wip-us.apache.org/repos/asf/ambari/blob/b571e4a0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml index 5d7766b..f4115f7 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml @@ -46,7 +46,7 @@ properties -application.properties.xml +application.properties application-properties @@ -61,7 +61,7 @@ xml -atlas-hbase-site.xml +hbase-site.xml atlas-hbase-site @@ -80,7 +80,7 @@ properties -application.properties.xml +application.properties application-properties http://git-wip-us.apache.org/repos/asf/ambari/blob/b571e4a0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties new file mode 100644 index 000..4d264a0 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/users-credentials.properties @@ -0,0 +1,21 @@ +# +# 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 +
ambari git commit: AMBARI-16089 - Atlas Integration : set atlas.cluster.name in hive-site
Repository: ambari Updated Branches: refs/heads/trunk 025b3446f -> 4104f2f9d AMBARI-16089 - Atlas Integration : set atlas.cluster.name in hive-site Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4104f2f9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4104f2f9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4104f2f9 Branch: refs/heads/trunk Commit: 4104f2f9d61dbc3d01ea8dfcbfe9faa6ece2b03c Parents: 025b344 Author: tbeerbower Authored: Wed Apr 27 13:57:34 2016 -0400 Committer: tbeerbower Committed: Wed Apr 27 13:57:47 2016 -0400 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 2 + .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 2 +- .../0.12.0.2.0/package/scripts/params_linux.py | 2 + .../stacks/HDP/2.3/services/stack_advisor.py| 2 - .../configuration/application-properties.xml| 8 + .../stacks/2.3/common/test_stack_advisor.py | 268 +++ 6 files changed, 281 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4104f2f9/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index c86dbf9..defd6f0 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -61,6 +61,8 @@ log_dir = config['configurations']['atlas-env']['metadata_log_dir'] conf_dir = status_params.conf_dir # "/etc/metadata/conf" conf_file = status_params.conf_file +atlas_login_credentials_file = os.path.join(conf_dir, "users-credentials.properties") + atlas_hbase_conf_dir = os.path.join(metadata_home, "hbase", "conf") atlas_hbase_log_dir = os.path.join(metadata_home, "hbase", "logs") atlas_hbase_data_dir = os.path.join(metadata_home, "data") http://git-wip-us.apache.org/repos/asf/ambari/blob/4104f2f9/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index e56c3e9..2a2bb23 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -442,7 +442,7 @@ limitations under the License. atlas.cluster.name DONT_ADD_ON_UPGRADE -primary +{{cluster_name}} application-properties http://git-wip-us.apache.org/repos/asf/ambari/blob/4104f2f9/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py index 3d6c096..d0c3b3a 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py @@ -52,6 +52,8 @@ stack_name_uppercase = stack_name.upper() agent_stack_retry_on_unavailability = config['hostLevelParams']['agent_stack_retry_on_unavailability'] agent_stack_retry_count = expect("/hostLevelParams/agent_stack_retry_count", int) +cluster_name = config['clusterName'] + # node hostname hostname = config["hostname"] http://git-wip-us.apache.org/repos/asf/ambari/blob/4104f2f9/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index f2e9924..9f77129 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -342,8 +342,6 @@ class HDP23StackAdvisor(HDP22StackAdvisor): atlas_server_host_inf
ambari git commit: AMBARI-16043: version_builder.py fails to run against Python 2.6 (dili)
Repository: ambari Updated Branches: refs/heads/trunk cda7f2a3e -> 134a15daf AMBARI-16043: version_builder.py fails to run against Python 2.6 (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/134a15da Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/134a15da Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/134a15da Branch: refs/heads/trunk Commit: 134a15daf10bf1ca6079480a68acf9949424b125 Parents: cda7f2a Author: Di Li Authored: Mon Apr 25 10:20:32 2016 -0400 Committer: tbeerbower Committed: Mon Apr 25 11:38:57 2016 -0400 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 11 ++ .../configuration/application-properties.xml| 14 +++ .../stacks/HDP/2.5/services/stack_advisor.py| 13 ++- .../stacks/2.5/common/test_stack_advisor.py | 102 ++- 4 files changed, 138 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/134a15da/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 4191212..c86dbf9 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -156,3 +156,14 @@ for host in atlas_hosts: id += 1 first_id = False + +zookeeper_port = default('/configurations/zoo.cfg/clientPort', None) +# get comma separated list of zookeeper hosts from clusterHostInfo +index = 0 +zookeeper_quorum = "" +for host in config['clusterHostInfo']['zookeeper_hosts']: + zookeeper_quorum += host + ":" + str(zookeeper_port) + index += 1 + if index < len(config['clusterHostInfo']['zookeeper_hosts']): +zookeeper_quorum += "," + http://git-wip-us.apache.org/repos/asf/ambari/blob/134a15da/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml index 09cb987..99fd20f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/application-properties.xml @@ -42,4 +42,18 @@ false + +atlas.graph.index.search.backend +solr5 +The Atlas indexing backend (e.g. solr5). + + +atlas.graph.index.search.solr.mode +cloud +The Solr mode (e.g. cloud). + + +atlas.graph.index.search.solr.zookeeper-url +The ZooKeeper quorum setup for Solr as comma separated value. + http://git-wip-us.apache.org/repos/asf/ambari/blob/134a15da/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 0dc92b1..7f63d0c 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 @@ -116,11 +116,22 @@ class HDP25StackAdvisor(HDP24StackAdvisor): parentRecommendConfDict = super(HDP25StackAdvisor, self).getServiceConfigurationRecommenderDict() childRecommendConfDict = { "RANGER": self.recommendRangerConfigurations, - "HIVE": self.recommendHIVEConfigurations + "HIVE": self.recommendHIVEConfigurations, + "ATLAS": self.recommendAtlasConfigurations } parentRecommendConfDict.update(childRecommendConfDict) return parentRecommendConfDict + def recommendAtlasConfigurations(self, configurations, clusterData, services, hosts): +putAtlasApplicationProperty = self.putProperty(configurations, "application-properties", services) + +servicesList = [service["StackServices"]["service_name"] for service in services["services"]] + +include_logsearch = "LOGSEARCH" in servicesList +if include_logsearch: + logsearch_solr_znode = services["configurations"]["logsear
ambari git commit: AMBARI-15981 - Atlas Integration : Make default Atlas configuration for embedded Hbase
Repository: ambari Updated Branches: refs/heads/trunk 1734b5c7b -> 5db6f1d21 AMBARI-15981 - Atlas Integration : Make default Atlas configuration for embedded Hbase Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5db6f1d2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5db6f1d2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5db6f1d2 Branch: refs/heads/trunk Commit: 5db6f1d21f05b61d9da1240da693350021984001 Parents: 1734b5c Author: tbeerbower Authored: Fri Apr 22 07:20:06 2016 -0400 Committer: tbeerbower Committed: Fri Apr 22 07:20:20 2016 -0400 -- .../configuration/application-properties.xml| 21 ++- .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 2 +- .../configuration/atlas-hbase-site.xml | 58 .../ATLAS/0.1.0.2.3/metainfo.xml| 15 - .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 27 - .../ATLAS/0.1.0.2.3/package/scripts/params.py | 5 ++ .../services/ATLAS/configuration/atlas-env.xml | 2 +- .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 4 +- .../stacks/2.3/ATLAS/test_metadata_server.py| 21 +++ .../test/python/stacks/2.3/configs/default.json | 4 ++ .../test/python/stacks/2.3/configs/secure.json | 4 ++ .../stacks/2.5/ATLAS/test_atlas_server.py | 21 +++ .../test/python/stacks/2.5/configs/default.json | 4 ++ 13 files changed, 178 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5db6f1d2/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index 95141ca..f3ea36f 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -21,12 +21,12 @@ atlas.graph.storage.backend -berkeleyje +hbase -atlas.graph.storage.directory -/var/lib/atlas/data/berkeley +atlas.graph.storage.hostname +localhost:{{atlas_hbase_zk_port}} @@ -210,4 +210,19 @@ 1000 + +atlas.audit.hbase.tablename +ATLAS_ENTITY_AUDIT_EVENTS + + + +atlas.audit.zookeeper.session.timeout.ms +1000 + + + +atlas.audit.hbase.zookeeper.quorum +localhost:{{atlas_hbase_zk_port}} + + http://git-wip-us.apache.org/repos/asf/ambari/blob/5db6f1d2/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index d64d48c..90eabef 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -102,7 +102,7 @@ export METADATA_DATA_DIR={{data_dir}} export METADATA_PID_DIR={{pid_dir}} # hbase conf dir -export HBASE_CONF_DIR=/etc/hbase/conf +export HBASE_CONF_DIR={{atlas_hbase_conf_dir}} # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. export METADATA_EXPANDED_WEBAPP_DIR={{expanded_war_dir}} http://git-wip-us.apache.org/repos/asf/ambari/blob/5db6f1d2/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml new file mode 100644 index 000..3c4826d --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-hbase-site.xml @@ -0,0 +1,58 @@ + + + + +hbase.rootdir +file://{{metadata_home}}/data/root + + +hbase.zookeeper.property.dataDir +{{metadata_home}}/data/zookeeper-data + + +hbase.master.info.port +61510 + + +hbase.regionserver.info.port +61530 + + +hbase.master.port +61500 + + +hbase.regionserver.port +61520 + + +hbase.zookeeper.property.clientPort +61
ambari git commit: AMBARI-15939 - Atlas Integration :Use stack advisor to suggest correct integration related configs
Repository: ambari Updated Branches: refs/heads/trunk 381ace20d -> 89fd30b40 AMBARI-15939 - Atlas Integration :Use stack advisor to suggest correct integration related configs Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/89fd30b4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/89fd30b4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/89fd30b4 Branch: refs/heads/trunk Commit: 89fd30b40f3108bfcbcc73eb2d74c94a2ba14a7a Parents: 381ace2 Author: tbeerbower Authored: Tue Apr 19 09:21:40 2016 -0400 Committer: tbeerbower Committed: Tue Apr 19 09:21:40 2016 -0400 -- .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 19 +- .../0.5.0.2.1/package/scripts/params_linux.py | 25 +- .../package/scripts/setup_atlas_falcon.py | 52 .../1.4.4.2.0/configuration/sqoop-site.xml | 7 - .../1.4.4.2.0/package/scripts/params_linux.py | 6 + .../package/scripts/setup_atlas_sqoop.py| 47 .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py| 16 +- .../0.9.1.2.1/configuration/storm-site.xml | 7 - .../0.9.1.2.1/package/scripts/params_linux.py | 6 + .../package/scripts/setup_atlas_storm.py| 45 .../STORM/0.9.1.2.1/package/scripts/storm.py| 13 +- .../configuration/falcon-startup.properties.xml | 10 +- .../stacks/HDP/2.3/services/stack_advisor.py| 70 - .../stacks/2.3/common/test_stack_advisor.py | 258 +++ 14 files changed, 505 insertions(+), 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/89fd30b4/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py index 46457ad..6e2e678 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py @@ -27,7 +27,6 @@ from resource_management.core.resources.service import Service from resource_management.core.resources.service import ServiceConfig from resource_management.core.resources.system import Directory from resource_management.core.resources.system import File -from resource_management.core.resources.system import Link from resource_management.libraries.script import Script from resource_management.libraries.resources import PropertiesFile from resource_management.libraries.functions import format @@ -35,6 +34,7 @@ from resource_management.libraries.functions.show_logs import show_logs from ambari_commons import OSConst from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl +from setup_atlas_falcon import setup_atlas_falcon @OsFamilyFuncImpl(os_family = OsFamilyImpl.DEFAULT) def falcon(type, action = None, upgrade_type=None): @@ -108,12 +108,7 @@ def falcon(type, action = None, upgrade_type=None): create_parents = True, cd_access = "a") -if params.has_atlas: - atlas_falcon_hook_dir = os.path.join(params.atlas_home_dir, "hook", "falcon") - if os.path.exists(atlas_falcon_hook_dir): -Link(os.path.join(params.falcon_conf_dir, params.atlas_conf_file), - to = os.path.join(params.atlas_conf_dir, params.atlas_conf_file) - ) +setup_atlas_falcon() if type == 'server': if action == 'config': @@ -189,16 +184,6 @@ def falcon(type, action = None, upgrade_type=None): show_logs(params.falcon_log_dir, params.falcon_user) raise - if params.has_atlas: -atlas_falcon_hook_dir = os.path.join(params.atlas_home_dir, "hook", "falcon") -if os.path.exists(atlas_falcon_hook_dir): - src_files = os.listdir(atlas_falcon_hook_dir) - for file_name in src_files: -atlas_falcon_hook_file_name = os.path.join(atlas_falcon_hook_dir, file_name) -falcon_lib_file_name = os.path.join(params.falcon_webinf_lib, file_name) -if (os.path.isfile(atlas_falcon_hook_file_name)): - Link(falcon_lib_file_name, to = atlas_falcon_hook_file_name) - if action == 'stop': try: Execute(format('{falcon_home}/bin/falcon-stop'), http://git-wip-us.apache.org/repos/asf/ambari/blob/89fd30b4/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0
ambari git commit: AMBARI-15818 - Ambari should manage Atlas log4j.xml
Repository: ambari Updated Branches: refs/heads/trunk a8f1279ba -> 081b48d41 AMBARI-15818 - Ambari should manage Atlas log4j.xml Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/081b48d4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/081b48d4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/081b48d4 Branch: refs/heads/trunk Commit: 081b48d41bc224d7ef880a844b1f228bf4852549 Parents: a8f1279 Author: tbeerbower Authored: Thu Apr 14 10:13:33 2016 -0400 Committer: tbeerbower Committed: Thu Apr 14 10:13:52 2016 -0400 -- .../ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml| 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/081b48d4/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml index 81f8e07..7fb1a0f 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml @@ -37,9 +37,7 @@ content Custom log4j.properties - -
ambari git commit: AMBARI-15818 - Ambari should manage Atlas log4j.xml
Repository: ambari Updated Branches: refs/heads/trunk 5dddc529f -> 49e91c38a AMBARI-15818 - Ambari should manage Atlas log4j.xml Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49e91c38 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49e91c38 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49e91c38 Branch: refs/heads/trunk Commit: 49e91c38a42f4929442a34f156a6ab54c7bfab63 Parents: 5dddc52 Author: tbeerbower Authored: Tue Apr 12 13:59:31 2016 -0400 Committer: tbeerbower Committed: Tue Apr 12 13:59:31 2016 -0400 -- .../0.1.0.2.3/configuration/atlas-log4j.xml | 134 +++ .../ATLAS/0.1.0.2.3/metainfo.xml| 11 ++ .../0.1.0.2.3/package/files/atlas-log4j.xml | 84 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 2 +- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 5 + .../stacks/2.3/ATLAS/test_metadata_server.py| 4 +- .../test/python/stacks/2.3/configs/default.json | 5 + .../test/python/stacks/2.3/configs/secure.json | 5 + .../stacks/2.5/ATLAS/test_atlas_server.py | 4 +- .../test/python/stacks/2.5/configs/default.json | 5 + 10 files changed, 172 insertions(+), 87 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49e91c38/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml new file mode 100644 index 000..81f8e07 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-log4j.xml @@ -0,0 +1,134 @@ + + + + + + + +atlas_log_level +debug +Log level for atlas logging + + + +audit_log_level +OFF +Log level for audit logging + + + +content +Custom log4j.properties + + + + + content + false + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/49e91c38/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml index bad9e95..3172af3 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml @@ -53,6 +53,11 @@ atlas-env.sh atlas-env + +env +atlas-log4j.xml +atlas-log4j + @@ -77,6 +82,11 @@ atlas-env.sh atlas-env + +env +atlas-log4j.xml +atlas-log4j + @@ -104,6 +114,7 @@ application-properties atlas-env +atlas-log4j http://git-wip-us.apache.org/repos/asf/ambari/blob/49e91c38/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/atlas-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/atlas-log4j.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/atlas-log4j.xml deleted file mode 100644 index 42d3c47..000 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/files/atlas-log4j.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - -http://jakarta.apache.org/log4j/";> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/49e91c38/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py index 91629e0..041e04e 100644 --- a/ambari
ambari git commit: AMBARI-14920 - Support Atlas / Storm integration
Repository: ambari Updated Branches: refs/heads/trunk 7b64e964d -> 55e5a785f AMBARI-14920 - Support Atlas / Storm integration Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55e5a785 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55e5a785 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55e5a785 Branch: refs/heads/trunk Commit: 55e5a785fea5cff8dceb5dc1d43371b68726b848 Parents: 7b64e96 Author: tbeerbower Authored: Sun Apr 10 17:36:22 2016 -0400 Committer: tbeerbower Committed: Sun Apr 10 17:36:38 2016 -0400 -- .../0.9.1.2.1/configuration/storm-site.xml | 20 + .../0.9.1.2.1/package/scripts/params_linux.py | 14 + .../STORM/0.9.1.2.1/package/scripts/storm.py| 15 +- .../services/STORM/configuration/storm-env.xml | 31 4 files changed, 74 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/55e5a785/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml index aada363..cf702c0 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml @@ -727,4 +727,24 @@ true + +atlas.cluster.name +{{cluster_name}} + + +application-properties +atlas.cluster.name + + + + +storm.topology.submission.notifier.plugin.class +org.apache.atlas.storm.hook.StormAtlasHook + + +application-properties +atlas.cluster.name + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/55e5a785/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py index e9e8ce5..101ca46 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py @@ -17,6 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. """ +import os import re import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. @@ -43,6 +44,8 @@ tmp_dir = Script.get_tmp_dir() stack_root = status_params.stack_root sudo = AMBARI_SUDO_BINARY +cluster_name = config['clusterName'] + stack_name = default("/hostLevelParams/stack_name", None) upgrade_direction = default("/commandParams/upgrade_direction", Direction.UPGRADE) version = default("/commandParams/version", None) @@ -182,6 +185,17 @@ metrics_report_interval = default("/configurations/ams-site/timeline.metrics.sin metrics_collection_period = default("/configurations/ams-site/timeline.metrics.sink.collection.period", 10) metric_collector_sink_jar = "/usr/lib/storm/lib/ambari-metrics-storm-sink*.jar" +jar_jvm_opts = '' + +# Atlas related params +atlas_hosts = default('/clusterHostInfo/atlas_server_hosts', []) +has_atlas = len(atlas_hosts) > 0 + +if has_atlas: + atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else stack_root + '/current/atlas-server' + atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf' + jar_jvm_opts = '-Datlas.conf=' + atlas_conf_dir + # ranger host ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", []) has_ranger_admin = not len(ranger_admin_hosts) == 0 http://git-wip-us.apache.org/repos/asf/ambari/blob/55e5a785/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py index d2fafa6..74050d8 100644 --- a/ambari-server/src/main
ambari git commit: AMBARI-15733 - Atlas Integration : Support Atlas HA
Repository: ambari Updated Branches: refs/heads/trunk 2817ce67e -> 84214c5ae AMBARI-15733 - Atlas Integration : Support Atlas HA Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84214c5a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84214c5a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84214c5a Branch: refs/heads/trunk Commit: 84214c5ae1ba107931a735a685951239fc0c9a1e Parents: 2817ce6 Author: tbeerbower Authored: Fri Apr 8 14:44:43 2016 -0400 Committer: tbeerbower Committed: Fri Apr 8 14:44:43 2016 -0400 -- .../internal/AbstractProviderModule.java| 15 ++ .../AtlasServerHttpPropertyRequest.java | 72 ++ .../internal/HostComponentResourceProvider.java | 26 -- .../internal/HttpPropertyProvider.java | 212 +++ .../internal/HttpProxyPropertyProvider.java | 256 --- .../internal/JsonHttpPropertyRequest.java | 97 +++ .../ResourceManagerHttpPropertyRequest.java | 122 + .../ATLAS/0.1.0.2.3/package/scripts/params.py | 20 ++ .../configuration/application-properties.xml| 45 .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 1 + .../AtlasServerHttpPropertyRequestTest.java | 81 ++ .../internal/HttpPropertyProviderTest.java | 160 12 files changed, 777 insertions(+), 330 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/84214c5a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java index b77fda2..ca491f2 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java @@ -93,6 +93,8 @@ public abstract class AbstractProviderModule implements ProviderModule, private static final Map> serviceDesiredProperties = new EnumMap>(Service.Type.class); private static final Map componentServiceMap = new HashMap(); + private static final Map> HTTP_PROPERTY_REQUESTS = new HashMap<>(); + private static final String PROPERTY_HDFS_HTTP_POLICY_VALUE_HTTPS_ONLY = "HTTPS_ONLY"; private static final String COLLECTOR_DEFAULT_PORT = "6188"; @@ -171,6 +173,12 @@ public abstract class AbstractProviderModule implements ProviderModule, initPropMap.put("datanode", new String[]{"dfs.namenode.servicerpc-address.%s.%s"}); initPropMap.put("healthcheck", new String[]{"dfs.namenode.lifeline.rpc-address.%s.%s"}); jmxDesiredRpcSuffixProperties.put("NAMENODE-HA", initPropMap); + +HTTP_PROPERTY_REQUESTS.put("RESOURCEMANAGER", + Collections.singletonList(new ResourceManagerHttpPropertyRequest())); + +HTTP_PROPERTY_REQUESTS.put("ATLAS_SERVER", + Collections.singletonList(new AtlasServerHttpPropertyRequest())); } /** @@ -790,6 +798,13 @@ public abstract class AbstractProviderModule implements ProviderModule, PropertyHelper.getPropertyId("HostRoles", "state"), jpp, gpp)); + + providers.add(new HttpPropertyProvider(streamProvider, + managementController.getClusters(), + PropertyHelper.getPropertyId("HostRoles", "cluster_name"), + PropertyHelper.getPropertyId("HostRoles", "host_name"), + PropertyHelper.getPropertyId("HostRoles", "component_name"), + HTTP_PROPERTY_REQUESTS)); } break; case RootServiceComponent: http://git-wip-us.apache.org/repos/asf/ambari/blob/84214c5a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AtlasServerHttpPropertyRequest.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AtlasServerHttpPropertyRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AtlasServerHttpPropertyRequest.java new file mode 100644 index 000..e94e01b --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AtlasServerHttpPropertyRequest.java @@ -0,0 +1,72 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See th
ambari git commit: AMBARI-15431 - Atlas Integration : Rename Atlas Configurations - fix for 2.5
Repository: ambari Updated Branches: refs/heads/trunk 1fbf7f15d -> c5c5da75a AMBARI-15431 - Atlas Integration : Rename Atlas Configurations - fix for 2.5 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c5c5da75 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c5c5da75 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c5c5da75 Branch: refs/heads/trunk Commit: c5c5da75af617637ea91a29528ac9cc8f6113ab1 Parents: 1fbf7f1 Author: tbeerbower Authored: Wed Mar 23 18:48:58 2016 -0400 Committer: tbeerbower Committed: Wed Mar 23 18:49:17 2016 -0400 -- .../services/ATLAS/configuration/atlas-env.xml | 114 +++ .../stacks/HDP/2.5/services/ATLAS/metainfo.xml | 19 ++ .../services/ATLAS/configuration/atlas-env.xml | 114 --- .../stacks/HDP/2.6/services/ATLAS/metainfo.xml | 19 -- .../stacks/2.5/ATLAS/test_atlas_server.py | 107 ++ .../test/python/stacks/2.5/configs/default.json | 329 +++ .../stacks/2.6/ATLAS/test_atlas_server.py | 107 -- .../test/python/stacks/2.6/configs/default.json | 329 --- 8 files changed, 569 insertions(+), 569 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c5c5da75/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/atlas-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/atlas-env.xml new file mode 100644 index 000..42503b5 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/atlas-env.xml @@ -0,0 +1,114 @@ + + + + +metadata_log_dir +/var/log/atlas +Atlas log directory. + + +metadata_pid_dir +/var/run/atlas +Atlas pid-file directory. + + +metadata_user +Metadata User +atlas +USER +Metadata User Name. + + user + false + + + +metadata_opts +-Xmx1024m -Dlog4j.configuration=atlas-log4j.xml +Metadata Server command line options. + + +metadata_classpath + +Metadata Server additional classpath. + + +metadata_data_dir +/var/lib/atlas/data +Atlas data directory. + + +metadata_expanded_war_dir +./server/webapp +Atlas expanded WAR directory. + + +metadata_conf_file +atlas-application.properties +Atlas configuration file + + true + false + false + + + + + +content +This is the jinja template for metadata-env.sh file + + # The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path + export JAVA_HOME={{java64_home}} + + # any additional java opts you want to set. This will apply to both client and server operations + {% if security_enabled %} + export ATLAS_OPTS="{{metadata_opts}} -Djava.security.auth.login.config={{atlas_jaas_file}}" + {% else %} + export ATLAS_OPTS="{{metadata_opts}}" + {% endif %} + + # metadata configuration directory + export ATLAS_CONF={{conf_dir}} + + # Where log files are stored. Defatult is logs directory under the base install location + export ATLAS_LOG_DIR={{log_dir}} + + # additional classpath entries + export ATLASCPPATH={{metadata_classpath}} + + # data dir + export ATLAS_DATA_DIR={{data_dir}} + + # pid dir + export ATLAS_PID_DIR={{pid_dir}} + + # hbase conf dir + export HBASE_CONF_DIR=/etc/hbase/conf + + # Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir. + export ATLAS_EXPANDED_WEBAPP_DIR={{expanded_war_dir}} + + + content + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/c5c5da75/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/metainfo.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/metainfo.xml index 66aea9d..7061d6b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/metainfo.xml @@ -21,6 +21,25 @@ ATLAS 0.5.0.2.5 + + + ATLAS_SERVER + +properties +atlas-application.properties +application-properties + + + + + ATLAS_CLIENT + +properties +atlas-application.properties +
ambari git commit: AMBARI-15500 - Atlas alert present when WE is enabled
Repository: ambari Updated Branches: refs/heads/trunk 42b7b3f44 -> 3508a7ef6 AMBARI-15500 - Atlas alert present when WE is enabled Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3508a7ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3508a7ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3508a7ef Branch: refs/heads/trunk Commit: 3508a7ef60369fb6aac7b40efd69a08ba490530f Parents: 42b7b3f Author: tbeerbower Authored: Tue Mar 22 11:03:58 2016 -0400 Committer: tbeerbower Committed: Tue Mar 22 11:04:25 2016 -0400 -- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 6 +- .../stacks/2.3/ATLAS/test_service_check.py | 63 .../test/python/stacks/2.3/configs/secure.json | 15 - 3 files changed, 80 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3508a7ef/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index c5059dd..681e3ee 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -85,8 +85,10 @@ http_port = default("/configurations/application-properties/atlas.server.http.po https_port = default("/configurations/application-properties/atlas.server.https.port", 21443) if ssl_enabled: metadata_port = https_port + metadata_protocol = 'https' else: metadata_port = http_port + metadata_protocol = 'http' metadata_host = config['hostname'] @@ -112,9 +114,9 @@ kinit_path_local = status_params.kinit_path_local security_check_status_file = format('{log_dir}/security_check.status') if security_enabled: -smoke_cmd = format('curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{{http_code}}" http://{metadata_host}:{metadata_port}/') +smoke_cmd = format('curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') else: -smoke_cmd = format('curl -s -o /dev/null -w "%{{http_code}}" http://{metadata_host}:{metadata_port}/') +smoke_cmd = format('curl -s -o /dev/null -w "%{{http_code}}" {metadata_protocol}://{metadata_host}:{metadata_port}/') # kafka kafka_bootstrap_servers = "" http://git-wip-us.apache.org/repos/asf/ambari/blob/3508a7ef/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 new file mode 100644 index 000..49395a7 --- /dev/null +++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +''' +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' + +from stacks.utils.RMFTestCase import * + + +class TestAtlasCheck(RMFTestCase): + COMMON_SERVICES_PACKAGE_DIR = "ATLAS/0.1.0.2.3/package" + STACK_VERSION = "2.3" + + def test_service_check(self): +self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py", + classname="AtlasServiceCheck", + command="service_check", + config_file="default.json", + stack_version = self.STACK_VERSION, + target = RMFTestCase.TARGET_COMMON_SERVICES + ) +
ambari git commit: AMBARI-15431 - Atlas Integration : Rename Atlas Configurations
Repository: ambari Updated Branches: refs/heads/trunk 1e673420e -> 9c53f4399 AMBARI-15431 - Atlas Integration : Rename Atlas Configurations Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c53f439 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c53f439 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c53f439 Branch: refs/heads/trunk Commit: 9c53f439973f106f92b82b64eeb3de583f3daeae Parents: 1e67342 Author: tbeerbower Authored: Wed Mar 16 20:11:41 2016 -0400 Committer: tbeerbower Committed: Wed Mar 16 20:11:53 2016 -0400 -- .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 10 + .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 2 +- .../package/scripts/metadata_server.py | 2 +- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 1 + .../0.1.0.2.3/package/scripts/status_params.py | 1 + .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 23 +- .../0.5.0.2.1/package/scripts/params_linux.py | 1 + .../1.4.4.2.0/package/scripts/params_linux.py | 1 + .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py| 21 +- .../services/ATLAS/configuration/atlas-env.xml | 114 +++ .../stacks/HDP/2.6/services/ATLAS/metainfo.xml | 19 ++ .../test/python/stacks/2.3/configs/default.json | 3 +- .../test/python/stacks/2.3/configs/secure.json | 3 +- .../stacks/2.6/ATLAS/test_atlas_server.py | 107 ++ .../test/python/stacks/2.6/configs/default.json | 329 +++ 15 files changed, 613 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c53f439/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index 8500488..d64d48c 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -60,6 +60,16 @@ ./server/webapp Atlas expanded WAR directory. + +metadata_conf_file +application.properties +Atlas configuration file + + true + false + false + + http://git-wip-us.apache.org/repos/asf/ambari/blob/9c53f439/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py index 6df47b0..91629e0 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py @@ -70,7 +70,7 @@ def metadata(): content = StaticFile(format('{metadata_home}/server/webapp/atlas.war')) ) -PropertiesFile(format('{conf_dir}/application.properties'), +PropertiesFile(format('{conf_dir}/{conf_file}'), properties = params.application_properties, mode=0644, owner=params.metadata_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/9c53f439/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py index 5a39278..b6374f9 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata_server.py @@ -96,7 +96,7 @@ class MetadataServer(Script): atlas_expectations.update(atlas_site_expectations) security_params = get_params_from_filesystem(status_params.conf_dir, - {'application.properties': FILE_TYPE_PROPERTIES}) + {status_params.conf_file: FILE_TYPE_PROPERTIES}) result_issues = validate_security_config_properties(security_params, atlas_expectations) if not result_issues: # If all validations passed successfully try: http://git-wip-us.apache.org/repos/asf/ambari/blob/9c53f439/ambari-server/src/mai
ambari git commit: AMBARI-15192 - Atlas Integration : Atlas Server fails to properly start if Zookeeper isn't started first
Repository: ambari Updated Branches: refs/heads/trunk d68235871 -> 8b6fa3931 AMBARI-15192 - Atlas Integration : Atlas Server fails to properly start if Zookeeper isn't started first Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b6fa393 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b6fa393 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b6fa393 Branch: refs/heads/trunk Commit: 8b6fa3931470ff7ddaedbdf4f6a4ca25426006d6 Parents: d682358 Author: tbeerbower Authored: Mon Feb 29 21:11:56 2016 -0500 Committer: tbeerbower Committed: Mon Feb 29 21:11:56 2016 -0500 -- .../src/main/resources/stacks/HDP/2.3/role_command_order.json | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b6fa393/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json index 5b3882f..b28f2a9 100755 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json @@ -9,6 +9,7 @@ "RANGER_KMS_SERVICE_CHECK-SERVICE_CHECK" : ["RANGER_KMS_SERVER-START"], "PHOENIX_QUERY_SERVER-START": ["HBASE_MASTER-START"], "ATLAS_SERVICE_CHECK-SERVICE_CHECK": ["ATLAS_SERVER-START"], +"ATLAS_SERVER-START": ["KAFKA_BROKER-START"], "SPARK_THRIFTSERVER-START" : ["NAMENODE-START", "HIVE_METASTORE-START"], "HAWQMASTER-START" : ["NAMENODE-START", "DATANODE-START", "NODEMANAGER-START"], "HAWQSTANDBY-START" : ["HAWQMASTER-START"],
ambari git commit: AMBARI-14922 - Atlas Integration: Support Atlas / Falcon integration
Repository: ambari Updated Branches: refs/heads/trunk 46b4a797e -> efb4b8778 AMBARI-14922 - Atlas Integration: Support Atlas / Falcon integration Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/efb4b877 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/efb4b877 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/efb4b877 Branch: refs/heads/trunk Commit: efb4b877850ca5d56153afe278d48a459b0f07b3 Parents: 46b4a79 Author: tbeerbower Authored: Thu Feb 25 09:50:37 2016 -0500 Committer: tbeerbower Committed: Thu Feb 25 09:50:37 2016 -0500 -- .../configuration/application-properties.xml| 35 .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 15 + .../0.5.0.2.1/package/scripts/params_linux.py | 29 +++- .../configuration/falcon-startup.properties.xml | 10 +- 4 files changed, 79 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/efb4b877/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index ed9f1bc..a6deda1 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -176,4 +176,39 @@ 21443 + +atlas.http.authentication.type +simple + + + +atlas.hook.falcon.synchronous +false + + + +atlas.hook.falcon.numRetries +3 + + + +atlas.hook.falcon.minThreads +5 + + + +atlas.hook.falcon.maxThreads +5 + + + +atlas.hook.falcon.keepAliveTime +10 + + + +atlas.hook.falcon.queueSize +1000 + + http://git-wip-us.apache.org/repos/asf/ambari/blob/efb4b877/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py -- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py index 81ea39e..ca967b0 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py @@ -27,6 +27,7 @@ from resource_management.core.resources.service import Service from resource_management.core.resources.service import ServiceConfig from resource_management.core.resources.system import Directory from resource_management.core.resources.system import File +from resource_management.core.resources.system import Link from resource_management.libraries.script import Script from resource_management.libraries.resources import PropertiesFile from resource_management.libraries.functions import format @@ -106,6 +107,11 @@ def falcon(type, action = None, upgrade_type=None): create_parents = True, cd_access = "a") +if params.has_atlas: + Link(params.falcon_conf_dir + "/application.properties", + to = params.atlas_conf_dir + "/application.properties" + ) + if type == 'server': if action == 'config': if params.store_uri[0:4] == "hdfs": @@ -176,6 +182,15 @@ def falcon(type, action = None, upgrade_type=None): path = params.hadoop_bin_dir, environment=environment_dictionary) + if params.has_atlas: +atlas_falcon_hook_dir = params.atlas_home_dir + "/hook/falcon" +src_files = os.listdir(atlas_falcon_hook_dir) +for file_name in src_files: + atlas_falcon_hook_file_name = os.path.join(atlas_falcon_hook_dir, file_name) + falcon_lib_file_name = os.path.join(params.falcon_webinf_lib, file_name) + if (os.path.isfile(atlas_falcon_hook_file_name)): +Link(falcon_lib_file_name, to = atlas_falcon_hook_file_name) + if action == 'stop': Execute(format('{falcon_home}/bin/falcon-stop'), user = params.falcon_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/efb4b877/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resource
ambari git commit: AMBARI-14921 - Atlas Integration : Support Atlas / Sqoop integration
Repository: ambari Updated Branches: refs/heads/trunk 0a9101e97 -> 260419bb8 AMBARI-14921 - Atlas Integration : Support Atlas / Sqoop integration Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/260419bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/260419bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/260419bb Branch: refs/heads/trunk Commit: 260419bb848ce962bbc238379221096eb2a31a58 Parents: 0a9101e Author: tbeerbower Authored: Thu Feb 18 11:22:03 2016 -0500 Committer: tbeerbower Committed: Thu Feb 18 12:15:55 2016 -0500 -- .../1.4.4.2.0/configuration/sqoop-site.xml | 43 .../SQOOP/1.4.4.2.0/metainfo.xml| 6 +++ .../1.4.4.2.0/package/scripts/params_linux.py | 20 - .../SQOOP/1.4.4.2.0/package/scripts/sqoop.py| 26 .../python/stacks/2.0.6/SQOOP/test_sqoop.py | 12 ++ .../python/stacks/2.0.6/configs/default.json| 5 +++ .../python/stacks/2.0.6/configs/secured.json| 5 +++ .../test/python/stacks/2.3/configs/default.json | 5 +++ 8 files changed, 121 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml new file mode 100644 index 000..dd299fe --- /dev/null +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml @@ -0,0 +1,43 @@ + + + + + +atlas.cluster.name +{{cluster_name}} + + +application-properties +atlas.cluster.name + + + + +sqoop.job.data.publish.class +{{job_data_publish_class}} + + +application-properties +atlas.cluster.name + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml index b5db91b..2c9d881 100644 --- a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/metainfo.xml @@ -55,6 +55,11 @@ + xml + squoop-site.xml + squoop-site + + env sqoop-env.sh sqoop-env @@ -89,6 +94,7 @@ sqoop-env +sqoop-site http://git-wip-us.apache.org/repos/asf/ambari/blob/260419bb/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py index 3a3f93e..0006078 100644 --- a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/package/scripts/params_linux.py @@ -21,6 +21,7 @@ from resource_management.libraries.functions.version import format_hdp_stack_ver from resource_management.libraries.functions.default import default from resource_management.libraries.functions.get_kinit_path import get_kinit_path from resource_management.libraries.script import Script +import os # a map of the Ambari role to the component name # for use with /usr/hdp/current/ @@ -31,6 +32,9 @@ SERVER_ROLE_DIRECTORY_MAP = { component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "SQOOP") config = Script.get_config() + +cluster_name = config['clusterName'] + ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] stack_name = default("/hostLevelParams/stack_name", None) @@ -103,4 +107,18 @@ if "jdbc_drivers" in config['configurations']['sqoop-env']: continue sqoop_jdbc_drivers_dict[jdbc_jar_name] = jdbc_symlink_name sqoop_jdbc_drivers_name_dict[jdbc_jar_name] = jdbc_driver_name -jdk_location = config['hostLevelParams']['jdk_location'] \ No new
ambari git commit: AMBARI-14853 - Atlas Integration: Support deploying latest Atlas(which depends on kafka) using Ambari (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 18463c86a -> 1d9f1bb06 AMBARI-14853 - Atlas Integration: Support deploying latest Atlas(which depends on kafka) using Ambari (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1d9f1bb0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1d9f1bb0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1d9f1bb0 Branch: refs/heads/trunk Commit: 1d9f1bb069895d6dbc344a5cf0d81e56ff0b7371 Parents: 18463c8 Author: tbeerbower Authored: Wed Feb 3 09:20:46 2016 -0500 Committer: tbeerbower Committed: Wed Feb 3 09:57:36 2016 -0500 -- .../configuration/application-properties.xml| 36 +++- .../ATLAS/0.1.0.2.3/metainfo.xml| 4 +++ .../ATLAS/0.1.0.2.3/package/scripts/params.py | 11 ++ .../HIVE/0.12.0.2.0/configuration/hive-env.xml | 2 ++ .../0.12.0.2.0/package/scripts/params_linux.py | 2 ++ .../services/HIVE/configuration/hive-env.xml| 2 ++ .../test/python/stacks/2.3/configs/default.json | 9 - 7 files changed, 64 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9f1bb0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml index 82dacb6..74b1537 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/application-properties.xml @@ -131,6 +131,41 @@ +atlas.notification.embedded +false +Indicates whether or not the notification service should be embedded. + + +atlas.kafka.data +{{metadata_home}}/data/kafka +The Kafka data directory. + + +atlas.kafka.bootstrap.servers +{{kafka_bootstrap_servers}} +Comma separated list of Kafka broker endpoints in host:port form + + +atlas.kafka.zookeeper.connect +{{kafka_zookeeper_connect}} +Comma separated list of servers forming Zookeeper quorum used by Kafka. + + +atlas.kafka.hook.group.id +atlas +Kafka group id for the hook topic. + + +atlas.kafka.entities.group.id +entities +Kafka group id for the entity topic. + + +atlas.cluster.name +{{cluster_name}} +The cluster name. + + atlas.server.http.port 21000 @@ -140,5 +175,4 @@ 21443 - http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9f1bb0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml index 2600fc4..719f92c 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/metainfo.xml @@ -92,6 +92,10 @@ 300 + +KAFKA + + application-properties atlas-env http://git-wip-us.apache.org/repos/asf/ambari/blob/1d9f1bb0/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index 1a0c67b..eb2d816 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -28,6 +28,8 @@ import status_params # server configurations config = Script.get_config() +cluster_name = config['clusterName'] + # security enabled security_enabled = status_params.security_enabled @@ -112,3 +114,12 @@ if security_enabled: smoke_cmd = format('curl --negotiate -u : -b ~/cookiejar.txt -c ~/cookiejar.txt -s -o /dev/null -w "%{{http_code}}" http://{metadata_host}:{metadata_port}/') else: smoke_cmd = format('curl -s -o /dev/null -w "%{{http_code}}" http://{metadata_host}:{metadata_port}/') + +# kafka +kafka_bootstrap_servers = "" +kafka_broker_hosts = config['clusterH
ambari git commit: AMBARI-14628 - Create JAAS config for Atlas. (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk b641d5216 -> 7cacc4093 AMBARI-14628 - Create JAAS config for Atlas. (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7cacc409 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7cacc409 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7cacc409 Branch: refs/heads/trunk Commit: 7cacc4093285db5a7271df2d8939c767556fda46 Parents: b641d52 Author: tbeerbower Authored: Wed Jan 13 16:26:28 2016 -0500 Committer: tbeerbower Committed: Wed Jan 13 16:26:28 2016 -0500 -- .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 6 +- .../ATLAS/0.1.0.2.3/package/scripts/metadata.py | 5 + .../ATLAS/0.1.0.2.3/package/scripts/params.py | 9 + .../package/templates/atlas_jaas.conf.j2| 26 ++ .../stacks/2.3/ATLAS/test_metadata_server.py| 15 + .../test/python/stacks/2.3/configs/secure.json | 308 +++ 6 files changed, 368 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7cacc409/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index 2935e8f..c3cb367 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -69,9 +69,13 @@ export JAVA_HOME={{java64_home}} # any additional java opts you want to set. This will apply to both client and server operations +{% if security_enabled %} +export METADATA_OPTS="{{metadata_opts}} -Djava.security.auth.login.config={{atlas_jaas_file}}" +{% else %} export METADATA_OPTS="{{metadata_opts}}" +{% endif %} -# metadata configuration directory +# metadata configuration directory export METADATA_CONF={{conf_dir}} # Where log files are stored. Defatult is logs directory under the base install location http://git-wip-us.apache.org/repos/asf/ambari/blob/7cacc409/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py index 8c17214..6df47b0 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management import Directory, Fail, Logger, File, \ InlineTemplate, PropertiesFile, StaticFile from resource_management.libraries.functions import format +from resource_management.libraries.resources.template_config import TemplateConfig def metadata(): @@ -89,3 +90,7 @@ def metadata(): group=params.user_group, content=StaticFile('atlas-log4j.xml') ) + +if params.security_enabled: +TemplateConfig(format(params.atlas_jaas_file), + owner=params.metadata_user) http://git-wip-us.apache.org/repos/asf/ambari/blob/7cacc409/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py index df8b772..1a0c67b 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py @@ -31,6 +31,12 @@ config = Script.get_config() # security enabled security_enabled = status_params.security_enabled +if security_enabled: + _hostname_lowercase = config['hostname'].lower() + _atlas_principal_name = config['configurations']['application-properties']['atlas.authentication.principal'] + atlas_jaas_principal = _atlas_principal_name.replace('_HOST',_hostname_lowercase) + atlas_keytab_path = config['configurations']['application-properties']['atlas.authentication.keytab'] + stack_name = default("/hostLevelParams/stack_name", None) # New Cluster Stack
ambari git commit: AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3344bb805 -> 494f954d6 AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/494f954d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/494f954d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/494f954d Branch: refs/heads/branch-2.1 Commit: 494f954d6e9ab9d58167926d448460a4bded2cfe Parents: 3344bb8 Author: tbeerbower Authored: Wed Jul 8 17:22:42 2015 -0400 Committer: tbeerbower Committed: Wed Jul 8 17:24:24 2015 -0400 -- .../stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py | 3 +-- .../src/test/python/stacks/2.0.6/configs/secured.json | 10 +- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 9 + 3 files changed, 19 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py index a3fdef9..f21e4b1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py @@ -33,8 +33,7 @@ class BeforeStartHook(Hook): setup_hadoop() setup_configs() create_javahome_symlink() -if params.refresh_topology : - create_topology_script_and_mapping() +create_topology_script_and_mapping() if __name__ == "__main__": BeforeStartHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 5da1679..c9e20e2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -944,7 +944,15 @@ "all_hosts": [ "c6401.ambari.apache.org", "c6402.ambari.apache.org" -], +], +"all_racks": [ +"/default/rack_01", +"/default/rack_02" +], +"all_ipv4_ips": [ +"127.0.0.1", +"127.0.0.1" +], "storm_ui_server_hosts": [ "c6401.ambari.apache.org" ], http://git-wip-us.apache.org/repos/asf/ambari/blob/494f954d/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 0895b7e..df39d2f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -158,6 +158,15 @@ class TestHookBeforeStart(RMFTestCase): owner = 'hdfs', group = 'hadoop', ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data', + owner = 'hdfs', + content = Template('topology_mappings.data.j2'), + group = 'hadoop', + ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py', + content = StaticFile('topology_script.py'), + mode = 0755, + ) self.assertNoMoreResources() def test_hook_default_hdfs(self):
ambari git commit: AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk eb323fa80 -> fb0ee419c AMBARI-12342 - Rack Awareness : topology_script.py is not available on HMaster machine (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb0ee419 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb0ee419 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb0ee419 Branch: refs/heads/trunk Commit: fb0ee419cfc11b4347d0a9ec43cca306ae8abafc Parents: eb323fa Author: tbeerbower Authored: Wed Jul 8 17:22:42 2015 -0400 Committer: tbeerbower Committed: Wed Jul 8 17:22:59 2015 -0400 -- .../stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py | 3 +-- .../src/test/python/stacks/2.0.6/configs/secured.json | 10 +- .../stacks/2.0.6/hooks/before-START/test_before_start.py | 9 + 3 files changed, 19 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py index a3fdef9..f21e4b1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py @@ -33,8 +33,7 @@ class BeforeStartHook(Hook): setup_hadoop() setup_configs() create_javahome_symlink() -if params.refresh_topology : - create_topology_script_and_mapping() +create_topology_script_and_mapping() if __name__ == "__main__": BeforeStartHook().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 5da1679..c9e20e2 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -944,7 +944,15 @@ "all_hosts": [ "c6401.ambari.apache.org", "c6402.ambari.apache.org" -], +], +"all_racks": [ +"/default/rack_01", +"/default/rack_02" +], +"all_ipv4_ips": [ +"127.0.0.1", +"127.0.0.1" +], "storm_ui_server_hosts": [ "c6401.ambari.apache.org" ], http://git-wip-us.apache.org/repos/asf/ambari/blob/fb0ee419/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py index 0895b7e..df39d2f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py +++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-START/test_before_start.py @@ -158,6 +158,15 @@ class TestHookBeforeStart(RMFTestCase): owner = 'hdfs', group = 'hadoop', ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_mappings.data', + owner = 'hdfs', + content = Template('topology_mappings.data.j2'), + group = 'hadoop', + ) +self.assertResourceCalled('File', '/etc/hadoop/conf/topology_script.py', + content = StaticFile('topology_script.py'), + mode = 0755, + ) self.assertNoMoreResources() def test_hook_default_hdfs(self):
ambari git commit: AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c679234d3 -> 21cef44b3 AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/21cef44b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/21cef44b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/21cef44b Branch: refs/heads/branch-2.1 Commit: 21cef44b3e49f6d6ee4eb15fbf567c9fcf43eb5d Parents: c679234 Author: tbeerbower Authored: Wed Jul 8 08:34:41 2015 -0400 Committer: tbeerbower Committed: Wed Jul 8 08:35:57 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 21 - .../view/persistence/DataStoreImplTest.java | 81 2 files changed, 100 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/21cef44b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 6d31a08..333ff19 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,6 +25,7 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -117,7 +118,12 @@ public class DataStoreImpl implements DataStore { /** * Max length of entity string field. */ - protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 3200; + + /** + * Max total length of all the fields of an entity. + */ + protected static final int MAX_ENTITY_FIELD_LENGTH_TOTAL = 65000; /** * Table / column name prefix. @@ -286,6 +292,8 @@ public class DataStoreImpl implements DataStore { Map descriptorMap = getDescriptorMap(clazz); + long totalLength = 0L; + for (Map.Entry descriptorEntry : descriptorMap.entrySet()) { String fieldName = descriptorEntry.getKey(); @@ -302,9 +310,18 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DatabaseField field = mapping.getField(); + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); +field.setLength(MAX_ENTITY_STRING_FIELD_LENGTH); + } + totalLength += field.getLength(); + if (totalLength > MAX_ENTITY_FIELD_LENGTH_TOTAL) { +String msg = String.format("The total length of the fields of the %s entity can not exceed %d characters.", +clazz.getSimpleName(), MAX_ENTITY_FIELD_LENGTH_TOTAL); +LOG.error(msg); +throw new IllegalStateException(msg); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/21cef44b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java index 1b4758d..9be6e4f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java @@ -189,6 +189,46 @@ public class DataStoreImplTest { } @Test + public void testStore_create_largeEntity() throws Exception { +DynamicClassLoader classLoader = new DynamicClassLoader(DataStoreImplTest.class.getClassLoader()); + +// create mocks +EntityManagerFactory entityManagerFactory = createMock(EntityManagerFactory.class); +EntityManager entityManager = createMock(EntityManager.class); +JPADynamicHelper jpaDynamicHelper = createNiceMock(JPADyn
ambari git commit: AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 877141d78 -> b490df785 AMBARI-12319 - Views : S020 Data storage error for Hive view (Mysql db) (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b490df78 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b490df78 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b490df78 Branch: refs/heads/trunk Commit: b490df785e19e2c59c1c90c5b9586aaacd3163a9 Parents: 877141d Author: tbeerbower Authored: Wed Jul 8 08:34:41 2015 -0400 Committer: tbeerbower Committed: Wed Jul 8 08:34:50 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 21 - .../view/persistence/DataStoreImplTest.java | 81 2 files changed, 100 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b490df78/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 6d31a08..333ff19 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,6 +25,7 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -117,7 +118,12 @@ public class DataStoreImpl implements DataStore { /** * Max length of entity string field. */ - protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 3200; + + /** + * Max total length of all the fields of an entity. + */ + protected static final int MAX_ENTITY_FIELD_LENGTH_TOTAL = 65000; /** * Table / column name prefix. @@ -286,6 +292,8 @@ public class DataStoreImpl implements DataStore { Map descriptorMap = getDescriptorMap(clazz); + long totalLength = 0L; + for (Map.Entry descriptorEntry : descriptorMap.entrySet()) { String fieldName = descriptorEntry.getKey(); @@ -302,9 +310,18 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DatabaseField field = mapping.getField(); + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); +field.setLength(MAX_ENTITY_STRING_FIELD_LENGTH); + } + totalLength += field.getLength(); + if (totalLength > MAX_ENTITY_FIELD_LENGTH_TOTAL) { +String msg = String.format("The total length of the fields of the %s entity can not exceed %d characters.", +clazz.getSimpleName(), MAX_ENTITY_FIELD_LENGTH_TOTAL); +LOG.error(msg); +throw new IllegalStateException(msg); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/b490df78/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java index 1b4758d..9be6e4f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/persistence/DataStoreImplTest.java @@ -189,6 +189,46 @@ public class DataStoreImplTest { } @Test + public void testStore_create_largeEntity() throws Exception { +DynamicClassLoader classLoader = new DynamicClassLoader(DataStoreImplTest.class.getClassLoader()); + +// create mocks +EntityManagerFactory entityManagerFactory = createMock(EntityManagerFactory.class); +EntityManager entityManager = createMock(EntityManager.class); +JPADynamicHelper jpaDynamicHelper = createNiceMock(JPADyn
ambari git commit: AMBARI-12298 - Ambari does not setup tez.tez-ui.history-url.base for stack version HDP 2.2 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 ef96429a9 -> 7e06bfcc3 AMBARI-12298 - Ambari does not setup tez.tez-ui.history-url.base for stack version HDP 2.2 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7e06bfcc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7e06bfcc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7e06bfcc Branch: refs/heads/branch-2.1 Commit: 7e06bfcc3b45322278cefc78b6b7c305490428c3 Parents: ef96429 Author: tbeerbower Authored: Mon Jul 6 17:38:47 2015 -0400 Committer: tbeerbower Committed: Mon Jul 6 17:39:43 2015 -0400 -- .../stacks/HDP/2.2/services/stack_advisor.py| 40 .../stacks/2.2/common/test_stack_advisor.py | 36 +++--- 2 files changed, 71 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7e06bfcc/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index f238d44..864b5cc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -20,6 +20,9 @@ limitations under the License. import math from math import floor from urlparse import urlparse +import os +import fnmatch +import socket class HDP22StackAdvisor(HDP21StackAdvisor): @@ -602,6 +605,43 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putTezProperty("tez.runtime.unordered.output.buffer.size-mb", int(taskResourceMemory * 0.075)) putTezProperty("tez.session.am.dag.submit.timeout.secs", "600") +serverProperties = services["ambari-server-properties"] +latest_tez_jar_version = None + +server_host = socket.getfqdn() +server_port = '8080' +server_protocol = 'http' +views_dir = '/var/lib/ambari-server/resources/views/' + +if serverProperties: + if 'client.api.port' in serverProperties: +server_port = serverProperties['client.api.port'] + if 'views.dir' in serverProperties: +views_dir = serverProperties['views.dir'] + if 'api.ssl' in serverProperties: +if serverProperties['api.ssl'].lower() == 'true': + server_protocol = 'https' + + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): +last_version = '0.0.0' +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: + latest_tez_jar_version = current_version + last_version = current_version +pass +pass + pass +pass + +if latest_tez_jar_version: + tez_url = '{0}://{1}:{2}/#/main/views/TEZ/{3}/TEZ_CLUSTER_INSTANCE'.format(server_protocol, server_host, server_port, latest_tez_jar_version) + putTezProperty("tez.tez-ui.history-url.base", tez_url) +pass + def getServiceConfigurationValidators(self): parentValidators = super(HDP22StackAdvisor, self).getServiceConfigurationValidators() childValidators = { http://git-wip-us.apache.org/repos/asf/ambari/blob/7e06bfcc/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index f26c08f..8149f91 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -19,7 +19,7 @@ limitations under the License. import os from unittest import TestCase from mock.mock import patch, MagicMock - +import socket class TestHDP22StackAdvisor(TestCase): @@ -67,7 +67,15 @@ class TestHDP22StackAdvisor(TestCase): open_mock.return_value = MagicFile() return self.get_system_min_uid_real() - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.list
ambari git commit: AMBARI-12298 - Ambari does not setup tez.tez-ui.history-url.base for stack version HDP 2.2 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 113d6565d -> 3d78a7ef3 AMBARI-12298 - Ambari does not setup tez.tez-ui.history-url.base for stack version HDP 2.2 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d78a7ef Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d78a7ef Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d78a7ef Branch: refs/heads/trunk Commit: 3d78a7ef3811314ff1e16f58290e3071df196499 Parents: 113d656 Author: tbeerbower Authored: Mon Jul 6 17:38:47 2015 -0400 Committer: tbeerbower Committed: Mon Jul 6 17:38:55 2015 -0400 -- .../stacks/HDP/2.2/services/stack_advisor.py| 40 .../stacks/2.2/common/test_stack_advisor.py | 36 +++--- 2 files changed, 71 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d78a7ef/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py index f238d44..864b5cc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/stack_advisor.py @@ -20,6 +20,9 @@ limitations under the License. import math from math import floor from urlparse import urlparse +import os +import fnmatch +import socket class HDP22StackAdvisor(HDP21StackAdvisor): @@ -602,6 +605,43 @@ class HDP22StackAdvisor(HDP21StackAdvisor): putTezProperty("tez.runtime.unordered.output.buffer.size-mb", int(taskResourceMemory * 0.075)) putTezProperty("tez.session.am.dag.submit.timeout.secs", "600") +serverProperties = services["ambari-server-properties"] +latest_tez_jar_version = None + +server_host = socket.getfqdn() +server_port = '8080' +server_protocol = 'http' +views_dir = '/var/lib/ambari-server/resources/views/' + +if serverProperties: + if 'client.api.port' in serverProperties: +server_port = serverProperties['client.api.port'] + if 'views.dir' in serverProperties: +views_dir = serverProperties['views.dir'] + if 'api.ssl' in serverProperties: +if serverProperties['api.ssl'].lower() == 'true': + server_protocol = 'https' + + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): +last_version = '0.0.0' +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: + latest_tez_jar_version = current_version + last_version = current_version +pass +pass + pass +pass + +if latest_tez_jar_version: + tez_url = '{0}://{1}:{2}/#/main/views/TEZ/{3}/TEZ_CLUSTER_INSTANCE'.format(server_protocol, server_host, server_port, latest_tez_jar_version) + putTezProperty("tez.tez-ui.history-url.base", tez_url) +pass + def getServiceConfigurationValidators(self): parentValidators = super(HDP22StackAdvisor, self).getServiceConfigurationValidators() childValidators = { http://git-wip-us.apache.org/repos/asf/ambari/blob/3d78a7ef/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py index f26c08f..8149f91 100644 --- a/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.2/common/test_stack_advisor.py @@ -19,7 +19,7 @@ limitations under the License. import os from unittest import TestCase from mock.mock import patch, MagicMock - +import socket class TestHDP22StackAdvisor(TestCase): @@ -67,7 +67,15 @@ class TestHDP22StackAdvisor(TestCase): open_mock.return_value = MagicFile() return self.get_system_min_uid_real() - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.listdir') + def test_recomm
ambari git commit: AMBARI-12262 - ConcurrentModificationException during add host to config group (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 295b1ec8a -> 369637ab4 AMBARI-12262 - ConcurrentModificationException during add host to config group (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/369637ab Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/369637ab Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/369637ab Branch: refs/heads/branch-2.1 Commit: 369637ab43b19319dd579a60e0c5a778d9bd0ba5 Parents: 295b1ec Author: tbeerbower Authored: Thu Jul 2 17:53:14 2015 -0400 Committer: tbeerbower Committed: Thu Jul 2 17:54:15 2015 -0400 -- .../server/state/configgroup/ConfigGroupImpl.java| 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/369637ab/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java index f347eb6..a01f4d4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java @@ -365,7 +365,6 @@ public class ConfigGroupImpl implements ConfigGroup { if (isPersisted) { // Delete existing mappings and create new ones configGroupHostMappingDAO.removeAllByGroup(configGroupEntity.getGroupId()); - configGroupDAO.refresh(configGroupEntity); configGroupEntity.setConfigGroupHostMappingEntities(new HashSet()); } @@ -402,7 +401,6 @@ public class ConfigGroupImpl implements ConfigGroup { void persistConfigMapping(ClusterEntity clusterEntity) { if (isPersisted) { configGroupConfigMappingDAO.removeAllByGroup(configGroupEntity.getGroupId()); - configGroupDAO.refresh(configGroupEntity); configGroupEntity.setConfigGroupConfigMappingEntities(new HashSet()); } @@ -452,17 +450,18 @@ public class ConfigGroupImpl implements ConfigGroup { } } - @Transactional void saveIfPersisted() { -ClusterEntity clusterEntity = clusterDAO.findById(cluster.getClusterId()); - if (isPersisted) { - configGroupEntity = configGroupDAO.merge(configGroupEntity); - persistHostMapping(); - persistConfigMapping(clusterEntity); + save(clusterDAO.findById(cluster.getClusterId())); } } + @Transactional + private void save(ClusterEntity clusterEntity) { +persistHostMapping(); +persistConfigMapping(clusterEntity); + } + @Override @Transactional public void delete() {
ambari git commit: AMBARI-12262 - ConcurrentModificationException during add host to config group (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 32d5e8da1 -> d5f7b69fc AMBARI-12262 - ConcurrentModificationException during add host to config group (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5f7b69f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5f7b69f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5f7b69f Branch: refs/heads/trunk Commit: d5f7b69fc1b412d3a1b7c69ffa8bd8ee7db7738e Parents: 32d5e8d Author: tbeerbower Authored: Thu Jul 2 17:53:14 2015 -0400 Committer: tbeerbower Committed: Thu Jul 2 17:53:22 2015 -0400 -- .../server/state/configgroup/ConfigGroupImpl.java| 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d5f7b69f/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java index f347eb6..a01f4d4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java @@ -365,7 +365,6 @@ public class ConfigGroupImpl implements ConfigGroup { if (isPersisted) { // Delete existing mappings and create new ones configGroupHostMappingDAO.removeAllByGroup(configGroupEntity.getGroupId()); - configGroupDAO.refresh(configGroupEntity); configGroupEntity.setConfigGroupHostMappingEntities(new HashSet()); } @@ -402,7 +401,6 @@ public class ConfigGroupImpl implements ConfigGroup { void persistConfigMapping(ClusterEntity clusterEntity) { if (isPersisted) { configGroupConfigMappingDAO.removeAllByGroup(configGroupEntity.getGroupId()); - configGroupDAO.refresh(configGroupEntity); configGroupEntity.setConfigGroupConfigMappingEntities(new HashSet()); } @@ -452,17 +450,18 @@ public class ConfigGroupImpl implements ConfigGroup { } } - @Transactional void saveIfPersisted() { -ClusterEntity clusterEntity = clusterDAO.findById(cluster.getClusterId()); - if (isPersisted) { - configGroupEntity = configGroupDAO.merge(configGroupEntity); - persistHostMapping(); - persistConfigMapping(clusterEntity); + save(clusterDAO.findById(cluster.getClusterId())); } } + @Transactional + private void save(ClusterEntity clusterEntity) { +persistHostMapping(); +persistConfigMapping(clusterEntity); + } + @Override @Transactional public void delete() {
ambari git commit: AMBARI-12223 - Views: Don't cache URL stream provider in view context (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 a79b4815e -> e01774a09 AMBARI-12223 - Views: Don't cache URL stream provider in view context (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e01774a0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e01774a0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e01774a0 Branch: refs/heads/branch-2.1 Commit: e01774a095f66582b803ffdfe7533746958fe7d9 Parents: a79b481 Author: tbeerbower Authored: Tue Jun 30 13:54:16 2015 -0400 Committer: tbeerbower Committed: Tue Jun 30 13:56:27 2015 -0400 -- .../controller/internal/URLStreamProvider.java | 2 +- .../ambari/server/view/ViewContextImpl.java | 30 +++- .../ambari/server/view/ViewContextImplTest.java | 4 +++ 3 files changed, 9 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e01774a0/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java index bc11646..4e60b5f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java @@ -185,7 +185,7 @@ public class URLStreamProvider implements StreamProvider { headers = new HashMap>(headers); List cookieList = headers.get(COOKIE); -String cookies= cookieList.isEmpty() ? null : cookieList.get(0); +String cookies= cookieList == null || cookieList.isEmpty() ? null : cookieList.get(0); headers.put(COOKIE, Collections.singletonList(appendCookie(cookies, appCookie))); } http://git-wip-us.apache.org/repos/asf/ambari/blob/e01774a0/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java index 8788346..a22c514 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java @@ -87,16 +87,6 @@ public class ViewContextImpl implements ViewContext, ViewController { private final ViewRegistry viewRegistry; /** - * The URL stream provider. - */ - private ViewURLStreamProvider streamProvider; - - /** - * The Ambari stream provider. - */ - private ViewAmbariStreamProvider ambariStreamProvider; - - /** * The data store. */ private DataStore dataStore = null; @@ -259,22 +249,17 @@ public class ViewContextImpl implements ViewContext, ViewController { @Override public org.apache.ambari.view.URLStreamProvider getURLStreamProvider() { -ensureURLStreamProvider(); -return streamProvider; +return viewRegistry.createURLStreamProvider(this); } @Override public URLConnectionProvider getURLConnectionProvider() { -ensureURLStreamProvider(); -return streamProvider; +return viewRegistry.createURLStreamProvider(this); } @Override public synchronized AmbariStreamProvider getAmbariStreamProvider() { -if (ambariStreamProvider == null) { - ambariStreamProvider = viewRegistry.createAmbariStreamProvider(); -} -return ambariStreamProvider; +return viewRegistry.createAmbariStreamProvider(); } @Override @@ -309,7 +294,6 @@ public class ViewContextImpl implements ViewContext, ViewController { @Override public HttpImpersonatorImpl getHttpImpersonator() { -ensureURLStreamProvider(); return new HttpImpersonatorImpl(this); } @@ -355,14 +339,8 @@ public class ViewContextImpl implements ViewContext, ViewController { viewRegistry.unregisterListener(listener, viewName, viewVersion); } - // - helper methods - // ensure that the URL stream provider has been created - private synchronized void ensureURLStreamProvider() { -if (streamProvider == null) { - streamProvider = viewRegistry.createURLStreamProvider(this); -} - } + // - helper methods // check for an associated instance private void checkInstance() { http://git-wip-us.apache.org/repos/asf/ambari/blob/e01774a0/ambari-server/src/test/java/org/ap
ambari git commit: AMBARI-12223 - Views: Don't cache URL stream provider in view context (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk bf5fe282b -> c74443d9f AMBARI-12223 - Views: Don't cache URL stream provider in view context (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c74443d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c74443d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c74443d9 Branch: refs/heads/trunk Commit: c74443d9fb593bd0fecc3d64f92b334f7687f6b1 Parents: bf5fe28 Author: tbeerbower Authored: Tue Jun 30 13:54:16 2015 -0400 Committer: tbeerbower Committed: Tue Jun 30 13:55:41 2015 -0400 -- .../controller/internal/URLStreamProvider.java | 2 +- .../ambari/server/view/ViewContextImpl.java | 30 +++- .../ambari/server/view/ViewContextImplTest.java | 4 +++ 3 files changed, 9 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c74443d9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java index bc11646..4e60b5f 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java @@ -185,7 +185,7 @@ public class URLStreamProvider implements StreamProvider { headers = new HashMap>(headers); List cookieList = headers.get(COOKIE); -String cookies= cookieList.isEmpty() ? null : cookieList.get(0); +String cookies= cookieList == null || cookieList.isEmpty() ? null : cookieList.get(0); headers.put(COOKIE, Collections.singletonList(appendCookie(cookies, appCookie))); } http://git-wip-us.apache.org/repos/asf/ambari/blob/c74443d9/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java index 8788346..a22c514 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java @@ -87,16 +87,6 @@ public class ViewContextImpl implements ViewContext, ViewController { private final ViewRegistry viewRegistry; /** - * The URL stream provider. - */ - private ViewURLStreamProvider streamProvider; - - /** - * The Ambari stream provider. - */ - private ViewAmbariStreamProvider ambariStreamProvider; - - /** * The data store. */ private DataStore dataStore = null; @@ -259,22 +249,17 @@ public class ViewContextImpl implements ViewContext, ViewController { @Override public org.apache.ambari.view.URLStreamProvider getURLStreamProvider() { -ensureURLStreamProvider(); -return streamProvider; +return viewRegistry.createURLStreamProvider(this); } @Override public URLConnectionProvider getURLConnectionProvider() { -ensureURLStreamProvider(); -return streamProvider; +return viewRegistry.createURLStreamProvider(this); } @Override public synchronized AmbariStreamProvider getAmbariStreamProvider() { -if (ambariStreamProvider == null) { - ambariStreamProvider = viewRegistry.createAmbariStreamProvider(); -} -return ambariStreamProvider; +return viewRegistry.createAmbariStreamProvider(); } @Override @@ -309,7 +294,6 @@ public class ViewContextImpl implements ViewContext, ViewController { @Override public HttpImpersonatorImpl getHttpImpersonator() { -ensureURLStreamProvider(); return new HttpImpersonatorImpl(this); } @@ -355,14 +339,8 @@ public class ViewContextImpl implements ViewContext, ViewController { viewRegistry.unregisterListener(listener, viewName, viewVersion); } - // - helper methods - // ensure that the URL stream provider has been created - private synchronized void ensureURLStreamProvider() { -if (streamProvider == null) { - streamProvider = viewRegistry.createURLStreamProvider(this); -} - } + // - helper methods // check for an associated instance private void checkInstance() { http://git-wip-us.apache.org/repos/asf/ambari/blob/c74443d9/ambari-server/src/test/java/org/apache/ambari/
ambari git commit: AMBARI-12214 - Default ATLAS JVM options getting overwritten by empty space when deployed via Ambari (Jonathan Maron via tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b86c5758f -> ac6e99ee5 AMBARI-12214 - Default ATLAS JVM options getting overwritten by empty space when deployed via Ambari (Jonathan Maron via tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ac6e99ee Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac6e99ee Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac6e99ee Branch: refs/heads/branch-2.1 Commit: ac6e99ee573bd8eded77cefe00836fe63fdd63bc Parents: b86c575 Author: tbeerbower Authored: Tue Jun 30 08:35:14 2015 -0400 Committer: tbeerbower Committed: Tue Jun 30 08:37:03 2015 -0400 -- .../common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ac6e99ee/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index aed76ff..98b1a47 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -42,7 +42,7 @@ metadata_opts - +-Xmx1024m Metadata Server command line options.
ambari git commit: AMBARI-12214 - Default ATLAS JVM options getting overwritten by empty space when deployed via Ambari (Jonathan Maron via tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 67f52acee -> df9c51073 AMBARI-12214 - Default ATLAS JVM options getting overwritten by empty space when deployed via Ambari (Jonathan Maron via tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df9c5107 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df9c5107 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df9c5107 Branch: refs/heads/trunk Commit: df9c510732a8dab6bfc14936e0241683f5b0eb4e Parents: 67f52ac Author: tbeerbower Authored: Tue Jun 30 08:35:14 2015 -0400 Committer: tbeerbower Committed: Tue Jun 30 08:35:14 2015 -0400 -- .../common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df9c5107/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml index aed76ff..98b1a47 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/configuration/atlas-env.xml @@ -42,7 +42,7 @@ metadata_opts - +-Xmx1024m Metadata Server command line options.
ambari git commit: AMBARI-12176 - LDAP sync needs to distinguish group vs user membership (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 0d5cb02de -> aa283e6a9 AMBARI-12176 - LDAP sync needs to distinguish group vs user membership (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa283e6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa283e6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa283e6a Branch: refs/heads/branch-2.1 Commit: aa283e6a9041171210f7c1b9b222fc07b99c954c Parents: 0d5cb02 Author: tbeerbower Authored: Fri Jun 26 21:07:33 2015 -0400 Committer: tbeerbower Committed: Fri Jun 26 21:08:24 2015 -0400 -- .../security/ldap/AmbariLdapDataPopulator.java | 60 +--- .../ldap/AmbariLdapDataPopulatorTest.java | 29 +- 2 files changed, 53 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/aa283e6a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java index ada4171..1d8fca1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java @@ -184,7 +184,7 @@ public class AmbariLdapDataPopulator { } else { batchInfo.getGroupsToBeCreated().add(groupName); } - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } for (Entry internalGroup : internalGroupsMap.entrySet()) { if (internalGroup.getValue().isLdapGroup()) { @@ -258,7 +258,7 @@ public class AmbariLdapDataPopulator { } else { batchInfo.getGroupsToBeCreated().add(groupName); } - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } return batchInfo; @@ -316,7 +316,7 @@ public class AmbariLdapDataPopulator { batchInfo.getGroupsToBeRemoved().add(group.getGroupName()); } else { LdapGroupDto groupDto = groupDtos.iterator().next(); - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } } } @@ -350,15 +350,31 @@ public class AmbariLdapDataPopulator { * @param batchInfo batch update object * @param group ldap group * @param internalUsers map of internal users + * @param groupMemberAttributes set of group member attributes that have already been refreshed * @throws AmbariException if group refresh failed */ - protected void refreshGroupMembers(LdapBatchDto batchInfo, LdapGroupDto group, Map internalUsers) + protected void refreshGroupMembers(LdapBatchDto batchInfo, LdapGroupDto group, Map internalUsers, Set groupMemberAttributes) throws AmbariException { Set externalMembers = new HashSet(); + +if (groupMemberAttributes == null) { + groupMemberAttributes = new HashSet(); +} + for (String memberAttributeValue: group.getMemberAttributes()) { LdapUserDto groupMember = getLdapUserByMemberAttr(memberAttributeValue); if (groupMember != null) { externalMembers.add(groupMember.getUserName()); + } else { +// if we haven't already processed this group +if (!groupMemberAttributes.contains(memberAttributeValue)) { + // if the member is another group then add all of its members + LdapGroupDto subGroup = getLdapGroupByMemberAttr(memberAttributeValue); + if (subGroup != null) { +groupMemberAttributes.add(memberAttributeValue); +refreshGroupMembers(batchInfo, subGroup, internalUsers, groupMemberAttributes); + } +} } } String groupName = group.getGroupName(); @@ -419,22 +435,33 @@ public class AmbariLdapDataPopulator { } /** - * Get the LDAP member for the given member attribute. + * Get the LDAP user member for the given member attribute. * * @param memberAttributeValue the member attribute value * * @return the user for the given member attribute; null if not found */ protected LdapUserDto getLdapUserByMemberAttr(String memberAttributeValue) { -LdapUserDto dto = getLdapUser(memberAttributeValue); -if (dto == null) { - Set filteredLdapUsers = getFilteredLdapUsers( - new EqualsFilter(OBJECT_CLASS_ATTRIBUTE, ldapServerProperties.getUserObj
ambari git commit: AMBARI-12176 - LDAP sync needs to distinguish group vs user membership (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk f09c55528 -> ea29042ed AMBARI-12176 - LDAP sync needs to distinguish group vs user membership (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ea29042e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ea29042e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ea29042e Branch: refs/heads/trunk Commit: ea29042edacb9c4c9f97b0fd92b877e0327147b2 Parents: f09c555 Author: tbeerbower Authored: Fri Jun 26 21:07:33 2015 -0400 Committer: tbeerbower Committed: Fri Jun 26 21:07:47 2015 -0400 -- .../security/ldap/AmbariLdapDataPopulator.java | 60 +--- .../ldap/AmbariLdapDataPopulatorTest.java | 29 +- 2 files changed, 53 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ea29042e/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java index ada4171..1d8fca1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulator.java @@ -184,7 +184,7 @@ public class AmbariLdapDataPopulator { } else { batchInfo.getGroupsToBeCreated().add(groupName); } - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } for (Entry internalGroup : internalGroupsMap.entrySet()) { if (internalGroup.getValue().isLdapGroup()) { @@ -258,7 +258,7 @@ public class AmbariLdapDataPopulator { } else { batchInfo.getGroupsToBeCreated().add(groupName); } - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } return batchInfo; @@ -316,7 +316,7 @@ public class AmbariLdapDataPopulator { batchInfo.getGroupsToBeRemoved().add(group.getGroupName()); } else { LdapGroupDto groupDto = groupDtos.iterator().next(); - refreshGroupMembers(batchInfo, groupDto, internalUsersMap); + refreshGroupMembers(batchInfo, groupDto, internalUsersMap, null); } } } @@ -350,15 +350,31 @@ public class AmbariLdapDataPopulator { * @param batchInfo batch update object * @param group ldap group * @param internalUsers map of internal users + * @param groupMemberAttributes set of group member attributes that have already been refreshed * @throws AmbariException if group refresh failed */ - protected void refreshGroupMembers(LdapBatchDto batchInfo, LdapGroupDto group, Map internalUsers) + protected void refreshGroupMembers(LdapBatchDto batchInfo, LdapGroupDto group, Map internalUsers, Set groupMemberAttributes) throws AmbariException { Set externalMembers = new HashSet(); + +if (groupMemberAttributes == null) { + groupMemberAttributes = new HashSet(); +} + for (String memberAttributeValue: group.getMemberAttributes()) { LdapUserDto groupMember = getLdapUserByMemberAttr(memberAttributeValue); if (groupMember != null) { externalMembers.add(groupMember.getUserName()); + } else { +// if we haven't already processed this group +if (!groupMemberAttributes.contains(memberAttributeValue)) { + // if the member is another group then add all of its members + LdapGroupDto subGroup = getLdapGroupByMemberAttr(memberAttributeValue); + if (subGroup != null) { +groupMemberAttributes.add(memberAttributeValue); +refreshGroupMembers(batchInfo, subGroup, internalUsers, groupMemberAttributes); + } +} } } String groupName = group.getGroupName(); @@ -419,22 +435,33 @@ public class AmbariLdapDataPopulator { } /** - * Get the LDAP member for the given member attribute. + * Get the LDAP user member for the given member attribute. * * @param memberAttributeValue the member attribute value * * @return the user for the given member attribute; null if not found */ protected LdapUserDto getLdapUserByMemberAttr(String memberAttributeValue) { -LdapUserDto dto = getLdapUser(memberAttributeValue); -if (dto == null) { - Set filteredLdapUsers = getFilteredLdapUsers( - new EqualsFilter(OBJECT_CLASS_ATTRIBUTE, ldapServerProperties.getUserObj
ambari git commit: AMBARI-12129 - Views: Use VARCHAR for DataStore entity String fields (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 b665fb511 -> 6c7443801 AMBARI-12129 - Views: Use VARCHAR for DataStore entity String fields (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6c744380 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6c744380 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6c744380 Branch: refs/heads/branch-2.1 Commit: 6c74438018ea46de2a0b4b682182398c5a2022f3 Parents: b665fb5 Author: tbeerbower Authored: Wed Jun 24 15:41:13 2015 -0400 Committer: tbeerbower Committed: Wed Jun 24 15:43:06 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 32 +--- .../view/persistence/DataStoreImplTest.java | 52 +++- 2 files changed, 41 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6c744380/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 69328e7..6d31a08 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,7 +25,6 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; -import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -44,8 +43,6 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; -import java.sql.Clob; -import java.sql.Types; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -118,6 +115,11 @@ public class DataStoreImpl implements DataStore { protected final static Logger LOG = LoggerFactory.getLogger(DataStoreImpl.class); /** + * Max length of entity string field. + */ + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + + /** * Table / column name prefix. */ private static final String NAME_PREFIX = "DS_"; @@ -300,12 +302,9 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); - // explicitly set the type of string fields + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -DatabaseField field = mapping.getField(); - -field.setSqlType(Types.CLOB); -field.setType(Clob.class); +mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); } } } @@ -427,6 +426,10 @@ public class DataStoreImpl implements DataStore { value = persistEntity(value, em, persistSet); } if (value != null) { +if (String.class.isAssignableFrom(valueClass)) { + // String values can not exceed MAX_ENTITY_STRING_FIELD_LENGTH + checkStringValue(entity, fieldName, (String) value); +} dynamicEntity.set(attributeName, value); } } @@ -602,6 +605,19 @@ public class DataStoreImpl implements DataStore { return (Class) parameterizedType.getActualTypeArguments()[0]; } + // make sure that a string field value doesn't exceed MAX_STRING_LENGTH + private static void checkStringValue(Object entity, String fieldName, String value) { +if (value.length() > MAX_ENTITY_STRING_FIELD_LENGTH) { + + String msg = String.format("The value for the %s field of the %s entity can not exceed %d characters. " + + "Given value = %s", fieldName, entity.getClass().getSimpleName(), MAX_ENTITY_STRING_FIELD_LENGTH, value); + + LOG.error(msg); + + throw new IllegalStateException(msg); +} + } + // rollback the given transaction if it is active private static void rollbackTransaction(EntityTransaction transaction) { if (transaction != null && transaction.isActive()) { http://git-wip-us.apache.org/repos/asf/ambari/blob/6c744380/amb
ambari git commit: AMBARI-12129 - Views: Use VARCHAR for DataStore entity String fields (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 4b82c38de -> 10f7f42c7 AMBARI-12129 - Views: Use VARCHAR for DataStore entity String fields (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/10f7f42c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/10f7f42c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/10f7f42c Branch: refs/heads/trunk Commit: 10f7f42c74578a655a728075f23423db970a5253 Parents: 4b82c38 Author: tbeerbower Authored: Wed Jun 24 15:41:13 2015 -0400 Committer: tbeerbower Committed: Wed Jun 24 15:42:17 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 32 +--- .../view/persistence/DataStoreImplTest.java | 52 +++- 2 files changed, 41 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/10f7f42c/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 69328e7..6d31a08 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,7 +25,6 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; -import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; import org.eclipse.persistence.mappings.DirectToFieldMapping; @@ -44,8 +43,6 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; -import java.sql.Clob; -import java.sql.Types; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -118,6 +115,11 @@ public class DataStoreImpl implements DataStore { protected final static Logger LOG = LoggerFactory.getLogger(DataStoreImpl.class); /** + * Max length of entity string field. + */ + protected static final int MAX_ENTITY_STRING_FIELD_LENGTH = 4000; + + /** * Table / column name prefix. */ private static final String NAME_PREFIX = "DS_"; @@ -300,12 +302,9 @@ public class DataStoreImpl implements DataStore { if (isDirectMappingType(propertyType)) { DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); - // explicitly set the type of string fields + // explicitly set the length of string fields if (String.class.isAssignableFrom(propertyType)) { -DatabaseField field = mapping.getField(); - -field.setSqlType(Types.CLOB); -field.setType(Clob.class); +mapping.getField().setLength(MAX_ENTITY_STRING_FIELD_LENGTH); } } } @@ -427,6 +426,10 @@ public class DataStoreImpl implements DataStore { value = persistEntity(value, em, persistSet); } if (value != null) { +if (String.class.isAssignableFrom(valueClass)) { + // String values can not exceed MAX_ENTITY_STRING_FIELD_LENGTH + checkStringValue(entity, fieldName, (String) value); +} dynamicEntity.set(attributeName, value); } } @@ -602,6 +605,19 @@ public class DataStoreImpl implements DataStore { return (Class) parameterizedType.getActualTypeArguments()[0]; } + // make sure that a string field value doesn't exceed MAX_STRING_LENGTH + private static void checkStringValue(Object entity, String fieldName, String value) { +if (value.length() > MAX_ENTITY_STRING_FIELD_LENGTH) { + + String msg = String.format("The value for the %s field of the %s entity can not exceed %d characters. " + + "Given value = %s", fieldName, entity.getClass().getSimpleName(), MAX_ENTITY_STRING_FIELD_LENGTH, value); + + LOG.error(msg); + + throw new IllegalStateException(msg); +} + } + // rollback the given transaction if it is active private static void rollbackTransaction(EntityTransaction transaction) { if (transaction != null && transaction.isActive()) { http://git-wip-us.apache.org/repos/asf/ambari/blob/10f7f42c/ambari-s
ambari git commit: AMBARI-12104 - ambari-server setup-security changes truststore permissions to 600 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 1b7bcf583 -> dbd97e82c AMBARI-12104 - ambari-server setup-security changes truststore permissions to 600 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dbd97e82 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dbd97e82 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dbd97e82 Branch: refs/heads/branch-2.1 Commit: dbd97e82c35aca912e5cd620acc45fcbeea2429b Parents: 1b7bcf5 Author: tbeerbower Authored: Tue Jun 23 17:26:48 2015 -0400 Committer: tbeerbower Committed: Tue Jun 23 17:28:30 2015 -0400 -- ambari-server/src/main/python/ambari-server.py | 3 ++- .../src/main/python/ambari_server/serverConfiguration.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/dbd97e82/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index f323487..1b02162 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -191,7 +191,8 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], - ['Import certificate to truststore.', UserActionRestart(setup_truststore)], + ['Setup truststore.', UserActionRestart(setup_truststore)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore, True)], ] return action_list http://git-wip-us.apache.org/repos/asf/ambari/blob/dbd97e82/ambari-server/src/main/python/ambari_server/serverConfiguration.py -- diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py index 2f6e3e5..49cb5a6 100644 --- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py +++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py @@ -192,9 +192,9 @@ class ServerConfigDefaults(object): self.NR_CHANGE_OWNERSHIP_LIST = [] self.NR_USERADD_CMD = "" -self.MASTER_KEY_FILE_PERMISSIONS = "600" -self.CREDENTIALS_STORE_FILE_PERMISSIONS = "600" -self.TRUST_STORE_LOCATION_PERMISSIONS = "600" +self.MASTER_KEY_FILE_PERMISSIONS = "640" +self.CREDENTIALS_STORE_FILE_PERMISSIONS = "640" +self.TRUST_STORE_LOCATION_PERMISSIONS = "640" self.DEFAULT_DB_NAME = "ambari"
ambari git commit: AMBARI-12104 - ambari-server setup-security changes truststore permissions to 600 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 637e5ad92 -> 925a393b8 AMBARI-12104 - ambari-server setup-security changes truststore permissions to 600 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/925a393b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/925a393b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/925a393b Branch: refs/heads/trunk Commit: 925a393b81a945c3012de992e5c7cc5f4a842751 Parents: 637e5ad Author: tbeerbower Authored: Tue Jun 23 17:26:48 2015 -0400 Committer: tbeerbower Committed: Tue Jun 23 17:26:58 2015 -0400 -- ambari-server/src/main/python/ambari-server.py | 3 ++- .../src/main/python/ambari_server/serverConfiguration.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/925a393b/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index f323487..1b02162 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -191,7 +191,8 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], - ['Import certificate to truststore.', UserActionRestart(setup_truststore)], + ['Setup truststore.', UserActionRestart(setup_truststore)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore, True)], ] return action_list http://git-wip-us.apache.org/repos/asf/ambari/blob/925a393b/ambari-server/src/main/python/ambari_server/serverConfiguration.py -- diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py index 2f6e3e5..49cb5a6 100644 --- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py +++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py @@ -192,9 +192,9 @@ class ServerConfigDefaults(object): self.NR_CHANGE_OWNERSHIP_LIST = [] self.NR_USERADD_CMD = "" -self.MASTER_KEY_FILE_PERMISSIONS = "600" -self.CREDENTIALS_STORE_FILE_PERMISSIONS = "600" -self.TRUST_STORE_LOCATION_PERMISSIONS = "600" +self.MASTER_KEY_FILE_PERMISSIONS = "640" +self.CREDENTIALS_STORE_FILE_PERMISSIONS = "640" +self.TRUST_STORE_LOCATION_PERMISSIONS = "640" self.DEFAULT_DB_NAME = "ambari"
ambari git commit: AMBARI-12079 - Views : resource type may not be persisted on view deployment. (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 651cecfaf -> 94de4812f AMBARI-12079 - Views : resource type may not be persisted on view deployment. (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/94de4812 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/94de4812 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/94de4812 Branch: refs/heads/branch-2.1 Commit: 94de4812fc796e9fc886cc212ecb77fc66f2953c Parents: 651cecf Author: tbeerbower Authored: Tue Jun 23 11:07:43 2015 -0400 Committer: tbeerbower Committed: Tue Jun 23 11:08:43 2015 -0400 -- .../apache/ambari/server/view/ViewRegistry.java | 21 ++-- .../ambari/server/view/ViewRegistryTest.java| 4 +--- 2 files changed, 7 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/94de4812/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 29b9000..7b32898 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -518,11 +518,9 @@ public class ViewRegistry { instanceEntity.validate(viewEntity, Validator.ValidationContext.PRE_CREATE); -ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findByName(ViewEntity.getViewName(viewName, version)); - setPersistenceEntities(instanceEntity); -ViewInstanceEntity persistedInstance = mergeViewInstance(instanceEntity, resourceTypeEntity); +ViewInstanceEntity persistedInstance = mergeViewInstance(instanceEntity, viewEntity.getResourceType()); instanceEntity.setViewInstanceId(persistedInstance.getViewInstanceId()); syncViewInstance(instanceEntity, persistedInstance); @@ -1275,9 +1273,8 @@ public class ViewRegistry { Set instanceDefinitions) throws Exception { -String viewName = view.getName(); -ViewEntity persistedView = viewDAO.findByName(viewName); -ResourceTypeEntity resourceType = view.getResourceType(); +String viewName = view.getName(); +ViewEntity persistedView = viewDAO.findByName(viewName); if (LOG.isDebugEnabled()) { LOG.debug("Syncing view " + viewName + "."); @@ -1289,20 +1286,14 @@ public class ViewRegistry { LOG.debug("Creating view " + viewName + "."); } - // get or create an admin resource type to represent this view - ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findByName(viewName); - if (resourceTypeEntity == null) { -resourceTypeEntity = resourceType; -if (LOG.isDebugEnabled()) { - LOG.debug("Creating resource type for " + viewName + "."); -} -resourceTypeDAO.create(resourceTypeEntity); - } + // create an admin resource type to represent this view + ResourceTypeEntity resourceType = resourceTypeDAO.merge(view.getResourceType()); for( ViewInstanceEntity instance : view.getInstances()) { instance.setResource(createViewInstanceResource(resourceType)); } // ... merge the view + view.setResourceType(resourceType); persistedView = viewDAO.merge(view); } http://git-wip-us.apache.org/repos/asf/ambari/blob/94de4812/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java index 4d2c8e2..f9dadcd 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java @@ -815,10 +815,8 @@ public class ViewRegistryTest { ViewConfig config = ViewConfigTest.getConfig(XML_VALID_INSTANCE); ViewEntity viewEntity = getViewEntity(config, ambariConfig, getClass().getClassLoader(), ""); ViewInstanceEntity viewInstanceEntity = getViewInstanceEntity(viewEntity, config.getInstances().get(0)); -ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity(); expect(viewInstanceDAO.merge(viewInstanceEntity)).andReturn(viewInstanceEntity); - expect(resourceTypeDAO.findByName("MY_VIEW{1.0.0}")).andReturn(resourceTypeEntity);
ambari git commit: AMBARI-12079 - Views : resource type may not be persisted on view deployment. (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk bd3d83fdc -> 3e1bd89b6 AMBARI-12079 - Views : resource type may not be persisted on view deployment. (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e1bd89b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e1bd89b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e1bd89b Branch: refs/heads/trunk Commit: 3e1bd89b6b5c11a9f2902c4f4a844293fb29859e Parents: bd3d83f Author: tbeerbower Authored: Tue Jun 23 11:07:43 2015 -0400 Committer: tbeerbower Committed: Tue Jun 23 11:08:00 2015 -0400 -- .../apache/ambari/server/view/ViewRegistry.java | 21 ++-- .../ambari/server/view/ViewRegistryTest.java| 4 +--- 2 files changed, 7 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3e1bd89b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 29b9000..7b32898 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -518,11 +518,9 @@ public class ViewRegistry { instanceEntity.validate(viewEntity, Validator.ValidationContext.PRE_CREATE); -ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findByName(ViewEntity.getViewName(viewName, version)); - setPersistenceEntities(instanceEntity); -ViewInstanceEntity persistedInstance = mergeViewInstance(instanceEntity, resourceTypeEntity); +ViewInstanceEntity persistedInstance = mergeViewInstance(instanceEntity, viewEntity.getResourceType()); instanceEntity.setViewInstanceId(persistedInstance.getViewInstanceId()); syncViewInstance(instanceEntity, persistedInstance); @@ -1275,9 +1273,8 @@ public class ViewRegistry { Set instanceDefinitions) throws Exception { -String viewName = view.getName(); -ViewEntity persistedView = viewDAO.findByName(viewName); -ResourceTypeEntity resourceType = view.getResourceType(); +String viewName = view.getName(); +ViewEntity persistedView = viewDAO.findByName(viewName); if (LOG.isDebugEnabled()) { LOG.debug("Syncing view " + viewName + "."); @@ -1289,20 +1286,14 @@ public class ViewRegistry { LOG.debug("Creating view " + viewName + "."); } - // get or create an admin resource type to represent this view - ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findByName(viewName); - if (resourceTypeEntity == null) { -resourceTypeEntity = resourceType; -if (LOG.isDebugEnabled()) { - LOG.debug("Creating resource type for " + viewName + "."); -} -resourceTypeDAO.create(resourceTypeEntity); - } + // create an admin resource type to represent this view + ResourceTypeEntity resourceType = resourceTypeDAO.merge(view.getResourceType()); for( ViewInstanceEntity instance : view.getInstances()) { instance.setResource(createViewInstanceResource(resourceType)); } // ... merge the view + view.setResourceType(resourceType); persistedView = viewDAO.merge(view); } http://git-wip-us.apache.org/repos/asf/ambari/blob/3e1bd89b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java index 4d2c8e2..f9dadcd 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java @@ -815,10 +815,8 @@ public class ViewRegistryTest { ViewConfig config = ViewConfigTest.getConfig(XML_VALID_INSTANCE); ViewEntity viewEntity = getViewEntity(config, ambariConfig, getClass().getClassLoader(), ""); ViewInstanceEntity viewInstanceEntity = getViewInstanceEntity(viewEntity, config.getInstances().get(0)); -ResourceTypeEntity resourceTypeEntity = new ResourceTypeEntity(); expect(viewInstanceDAO.merge(viewInstanceEntity)).andReturn(viewInstanceEntity); - expect(resourceTypeDAO.findByName("MY_VIEW{1.0.0}")).andReturn(resourceTypeEntity);
ambari git commit: AMBARI-12032 - Add setup truststore and import certificate option to ambari-server setup-security (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 116cd6e67 -> df305f470 AMBARI-12032 - Add setup truststore and import certificate option to ambari-server setup-security (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/df305f47 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/df305f47 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/df305f47 Branch: refs/heads/trunk Commit: df305f47035b63d6e2877396ab600f4fe0e0226d Parents: 116cd6e Author: tbeerbower Authored: Sat Jun 20 13:35:49 2015 -0400 Committer: tbeerbower Committed: Mon Jun 22 11:34:09 2015 -0400 -- ambari-server/src/main/python/ambari-server.py | 5 +- .../src/main/python/ambari_server/setupHttps.py | 42 +++-- .../src/test/python/TestAmbariServer.py | 49 +--- 3 files changed, 44 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/df305f47/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 19b7138..f323487 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -35,7 +35,7 @@ from ambari_server.serverConfiguration import configDefaults, get_ambari_propert from ambari_server.serverUtils import is_server_runing, refresh_stack_hash from ambari_server.serverSetup import reset, setup, setup_jce_policy from ambari_server.serverUpgrade import upgrade, upgrade_stack, set_current -from ambari_server.setupHttps import setup_https +from ambari_server.setupHttps import setup_https, setup_truststore from ambari_server.setupActions import BACKUP_ACTION, LDAP_SETUP_ACTION, LDAP_SYNC_ACTION, PSTART_ACTION, \ REFRESH_STACK_HASH_ACTION, RESET_ACTION, RESTORE_ACTION, SETUP_ACTION, SETUP_SECURITY_ACTION, START_ACTION, \ @@ -191,6 +191,7 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore)], ] return action_list @@ -200,6 +201,8 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], + ['Setup truststore.', UserActionRestart(setup_truststore)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore, True)], ] return action_list http://git-wip-us.apache.org/repos/asf/ambari/blob/df305f47/ambari-server/src/main/python/ambari_server/setupHttps.py -- diff --git a/ambari-server/src/main/python/ambari_server/setupHttps.py b/ambari-server/src/main/python/ambari_server/setupHttps.py index fb0f725..c9fe421 100644 --- a/ambari-server/src/main/python/ambari_server/setupHttps.py +++ b/ambari-server/src/main/python/ambari_server/setupHttps.py @@ -450,7 +450,7 @@ def setup_https(args): raise NonFatalException(warning) -def setup_component_https(component, command, property, alias): +def setup_truststore(import_cert=False): if not get_silent(): jdk_path = find_jdk() if jdk_path is None: @@ -461,38 +461,30 @@ def setup_component_https(component, command, property, alias): properties = get_ambari_properties() -use_https = properties.get_property(property) in ['true'] +if get_YN_input("Do you want to configure a truststore [y/n] (y)? ", True): + truststore_type = get_truststore_type(properties) + truststore_path = get_truststore_path(properties) + truststore_password = get_truststore_password(properties) -if use_https: - if get_YN_input("Do you want to disable HTTPS for " + component + " [y/n] (n)? ", False): -truststore_path = get_truststore_path(properties) -truststore_password = get_truststore_password(properties) + if import_cert: -run_component_https_cmd(get_delete_cert_command(jdk_path, alias, truststore_path, truststore_password)) +if get_YN_input("Do you want to import a certificate [y/n] (y)? ", True): -properties.process_pair(property, &q
ambari git commit: AMBARI-12048 - Views : Error deploying all non-system views (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 61a108799 -> d26a505d4 AMBARI-12048 - Views : Error deploying all non-system views (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d26a505d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d26a505d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d26a505d Branch: refs/heads/branch-2.1 Commit: d26a505d4de8b95ab93270121c35b54f9729fa74 Parents: 61a1087 Author: tbeerbower Authored: Sat Jun 20 17:12:42 2015 -0400 Committer: tbeerbower Committed: Sat Jun 20 17:14:11 2015 -0400 -- .../ambari/server/orm/entities/ViewEntity.java | 15 +++ .../ambari/server/view/ViewArchiveUtility.java | 46 +--- .../apache/ambari/server/view/ViewRegistry.java | 13 +++--- .../ambari/server/view/ViewRegistryTest.java| 46 ++-- 4 files changed, 55 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/d26a505d/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java index c7630ed..29dc2a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java @@ -327,6 +327,11 @@ public class ViewEntity implements ViewDefinition { return statusDetail; } + @Override + public String getMask() { +return mask; + } + // - ViewEntity @@ -798,16 +803,6 @@ public class ViewEntity implements ViewDefinition { } /** - * Get the mask class name. - * - * @return the mask class name. - */ - @Override - public String getMask() { -return mask; - } - - /** * Determine whether or not the view is a system view. * * @return true if the view is a system view http://git-wip-us.apache.org/repos/asf/ambari/blob/d26a505d/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java index 0472756..d1ead32 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java @@ -34,7 +34,6 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.jar.JarInputStream; @@ -64,26 +63,27 @@ public class ViewArchiveUtility { * @throws JAXBException if xml is malformed */ public ViewConfig getViewConfigFromArchive(File archiveFile) - throws MalformedURLException, JAXBException, IOException { -ViewConfig res = null; -InputStream configStream = null; -try { + throws JAXBException, IOException { ClassLoader cl = URLClassLoader.newInstance(new URL[]{archiveFile.toURI().toURL()}); -configStream = cl.getResourceAsStream(VIEW_XML); +InputStream configStream = cl.getResourceAsStream(VIEW_XML); if (configStream == null) { configStream = cl.getResourceAsStream(WEB_INF_VIEW_XML); + if (configStream == null) { +throw new IllegalStateException( +String.format("Archive %s doesn't contain a view descriptor.", archiveFile.getAbsolutePath())); + } } -JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); -Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); -res = (ViewConfig) jaxbUnmarshaller.unmarshal(configStream); +try { + + JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); + Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + + return (ViewConfig) jaxbUnmarshaller.unmarshal(configStream); } finally { - if (configStream != null) { -configStream.close(); - } + configStream.close(); } -return res; } /** @@ -100,9 +100,6 @@ public class ViewArchiveUtility { */ public ViewConfig getViewConfigFromExtractedArchive(String archivePath, boolean validate) throws JAXBException, IOException, SAXException { -ViewConfig res = null; -InputStream configStrea
ambari git commit: AMBARI-12048 - Views : Error deploying all non-system views (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk f7220786b -> e858b20be AMBARI-12048 - Views : Error deploying all non-system views (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e858b20b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e858b20b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e858b20b Branch: refs/heads/trunk Commit: e858b20bee3119fb1e97077cfd76223e3107fc11 Parents: f722078 Author: tbeerbower Authored: Sat Jun 20 17:12:42 2015 -0400 Committer: tbeerbower Committed: Sat Jun 20 17:12:56 2015 -0400 -- .../ambari/server/orm/entities/ViewEntity.java | 15 +++ .../ambari/server/view/ViewArchiveUtility.java | 46 +--- .../apache/ambari/server/view/ViewRegistry.java | 13 +++--- .../ambari/server/view/ViewRegistryTest.java| 46 ++-- 4 files changed, 55 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e858b20b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java index c7630ed..29dc2a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java @@ -327,6 +327,11 @@ public class ViewEntity implements ViewDefinition { return statusDetail; } + @Override + public String getMask() { +return mask; + } + // - ViewEntity @@ -798,16 +803,6 @@ public class ViewEntity implements ViewDefinition { } /** - * Get the mask class name. - * - * @return the mask class name. - */ - @Override - public String getMask() { -return mask; - } - - /** * Determine whether or not the view is a system view. * * @return true if the view is a system view http://git-wip-us.apache.org/repos/asf/ambari/blob/e858b20b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java index 0472756..d1ead32 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java @@ -34,7 +34,6 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.jar.JarInputStream; @@ -64,26 +63,27 @@ public class ViewArchiveUtility { * @throws JAXBException if xml is malformed */ public ViewConfig getViewConfigFromArchive(File archiveFile) - throws MalformedURLException, JAXBException, IOException { -ViewConfig res = null; -InputStream configStream = null; -try { + throws JAXBException, IOException { ClassLoader cl = URLClassLoader.newInstance(new URL[]{archiveFile.toURI().toURL()}); -configStream = cl.getResourceAsStream(VIEW_XML); +InputStream configStream = cl.getResourceAsStream(VIEW_XML); if (configStream == null) { configStream = cl.getResourceAsStream(WEB_INF_VIEW_XML); + if (configStream == null) { +throw new IllegalStateException( +String.format("Archive %s doesn't contain a view descriptor.", archiveFile.getAbsolutePath())); + } } -JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); -Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); -res = (ViewConfig) jaxbUnmarshaller.unmarshal(configStream); +try { + + JAXBContext jaxbContext = JAXBContext.newInstance(ViewConfig.class); + Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + + return (ViewConfig) jaxbUnmarshaller.unmarshal(configStream); } finally { - if (configStream != null) { -configStream.close(); - } + configStream.close(); } -return res; } /** @@ -100,9 +100,6 @@ public class ViewArchiveUtility { */ public ViewConfig getViewConfigFromExtractedArchive(String archivePath, boolean validate) throws JAXBException, IOException, SAXException { -ViewConfig res = null; -InputStream configStream = null; -
ambari git commit: AMBARI-12032 - Add setup truststore and import certificate option to ambari-server setup-security (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 80440d2b5 -> 92151c9a2 AMBARI-12032 - Add setup truststore and import certificate option to ambari-server setup-security (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/92151c9a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/92151c9a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/92151c9a Branch: refs/heads/branch-2.1 Commit: 92151c9a247babed9e089cca50f209a6ea5e0e14 Parents: 80440d2 Author: tbeerbower Authored: Sat Jun 20 13:35:49 2015 -0400 Committer: tbeerbower Committed: Sat Jun 20 13:37:21 2015 -0400 -- ambari-server/src/main/python/ambari-server.py | 5 +- .../src/main/python/ambari_server/setupHttps.py | 42 +++-- .../src/test/python/TestAmbariServer.py | 49 +--- 3 files changed, 44 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/92151c9a/ambari-server/src/main/python/ambari-server.py -- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 19b7138..f323487 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -35,7 +35,7 @@ from ambari_server.serverConfiguration import configDefaults, get_ambari_propert from ambari_server.serverUtils import is_server_runing, refresh_stack_hash from ambari_server.serverSetup import reset, setup, setup_jce_policy from ambari_server.serverUpgrade import upgrade, upgrade_stack, set_current -from ambari_server.setupHttps import setup_https +from ambari_server.setupHttps import setup_https, setup_truststore from ambari_server.setupActions import BACKUP_ACTION, LDAP_SETUP_ACTION, LDAP_SYNC_ACTION, PSTART_ACTION, \ REFRESH_STACK_HASH_ACTION, RESET_ACTION, RESTORE_ACTION, SETUP_ACTION, SETUP_SECURITY_ACTION, START_ACTION, \ @@ -191,6 +191,7 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore)], ] return action_list @@ -200,6 +201,8 @@ def create_setup_security_actions(args): ['Enable HTTPS for Ambari server.', UserActionRestart(setup_https, args)], ['Encrypt passwords stored in ambari.properties file.', UserAction(setup_master_key)], ['Setup Ambari kerberos JAAS configuration.', UserAction(setup_ambari_krb5_jaas)], + ['Setup truststore.', UserActionRestart(setup_truststore)], + ['Import certificate to truststore.', UserActionRestart(setup_truststore, True)], ] return action_list http://git-wip-us.apache.org/repos/asf/ambari/blob/92151c9a/ambari-server/src/main/python/ambari_server/setupHttps.py -- diff --git a/ambari-server/src/main/python/ambari_server/setupHttps.py b/ambari-server/src/main/python/ambari_server/setupHttps.py index fb0f725..c9fe421 100644 --- a/ambari-server/src/main/python/ambari_server/setupHttps.py +++ b/ambari-server/src/main/python/ambari_server/setupHttps.py @@ -450,7 +450,7 @@ def setup_https(args): raise NonFatalException(warning) -def setup_component_https(component, command, property, alias): +def setup_truststore(import_cert=False): if not get_silent(): jdk_path = find_jdk() if jdk_path is None: @@ -461,38 +461,30 @@ def setup_component_https(component, command, property, alias): properties = get_ambari_properties() -use_https = properties.get_property(property) in ['true'] +if get_YN_input("Do you want to configure a truststore [y/n] (y)? ", True): + truststore_type = get_truststore_type(properties) + truststore_path = get_truststore_path(properties) + truststore_password = get_truststore_password(properties) -if use_https: - if get_YN_input("Do you want to disable HTTPS for " + component + " [y/n] (n)? ", False): -truststore_path = get_truststore_path(properties) -truststore_password = get_truststore_password(properties) + if import_cert: -run_component_https_cmd(get_delete_cert_command(jdk_path, alias, truststore_path, truststore_password)) +if get_YN_input("Do you want to import a certificate [y/n] (y)? ", True): -properties.process_pair(pr
ambari git commit: AMBARI-12006 - Provide meaningful error message for URLStreamProvider (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 516c4c312 -> 7cb438b21 AMBARI-12006 - Provide meaningful error message for URLStreamProvider (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7cb438b2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7cb438b2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7cb438b2 Branch: refs/heads/branch-2.1 Commit: 7cb438b21f4136f691d8508b8d621a0c1f4d7f24 Parents: 516c4c3 Author: tbeerbower Authored: Thu Jun 18 20:13:53 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 20:15:16 2015 -0400 -- .../controller/internal/URLStreamProvider.java | 50 .../AmbariManagementControllerTest.java | 7 ++- .../internal/URLStreamProviderTest.java | 27 +++ 3 files changed, 60 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7cb438b2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java index 1a8b085..94940e6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java @@ -54,9 +54,9 @@ public class URLStreamProvider implements StreamProvider { private final int connTimeout; private final int readTimeout; - private final String path; - private final String password; - private final String type; + private final String trustStorePath; + private final String trustStorePassword; + private final String trustStoreType; private volatile SSLSocketFactory sslSocketFactory = null; private AppCookieManager appCookieManager = null; @@ -83,19 +83,20 @@ public class URLStreamProvider implements StreamProvider { /** * Provide the connection timeout for the underlying connection. * - * @param connectionTimeout - * time, in milliseconds, to attempt a connection - * @param readTimeout - * the read timeout in milliseconds + * @param connectionTimeout time, in milliseconds, to attempt a connection + * @param readTimeout the read timeout in milliseconds + * @param trustStorePath the path to the truststore required for secure connections + * @param trustStorePassword the truststore password + * @param trustStoreType the truststore type (e.g. "JKS") */ - public URLStreamProvider(int connectionTimeout, int readTimeout, String path, - String password, String type) { - -this.connTimeout = connectionTimeout; -this.readTimeout = readTimeout; -this.path= path; // truststroe path -this.password= password; // truststore password -this.type= type; // truststroe type + public URLStreamProvider(int connectionTimeout, int readTimeout, String trustStorePath, + String trustStorePassword, String trustStoreType) { + +this.connTimeout= connectionTimeout; +this.readTimeout= readTimeout; +this.trustStorePath = trustStorePath; +this.trustStorePassword = trustStorePassword; +this.trustStoreType = trustStoreType; } @@ -271,17 +272,26 @@ public class URLStreamProvider implements StreamProvider { } // Get an ssl connection - protected HttpsURLConnection getSSLConnection(String spec) throws IOException { + protected HttpsURLConnection getSSLConnection(String spec) throws IOException, IllegalStateException { if (sslSocketFactory == null) { synchronized (this) { if (sslSocketFactory == null) { + + if (trustStorePath == null || trustStorePassword == null) { +String msg = +String.format("Can't get secure connection to %s. Truststore path or password is not set.", spec); + +LOG.error(msg); +throw new IllegalStateException(msg); + } + try { -FileInputStream in = new FileInputStream(new File(path)); -KeyStore store = KeyStore.getInstance(type == null ? KeyStore -.getDefaultType() : type); +FileInputStream in = new FileInputStream(new File(trustStorePath)); +KeyStore store = KeyStore.getInstance(trustStoreType == null ? +KeyStore.getDefaultType() : trustStoreType); -store.load(in, password.toCharArray()); +store.load(in, tr
ambari git commit: AMBARI-12006 - Provide meaningful error message for URLStreamProvider (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk f0559128d -> cf842a05a AMBARI-12006 - Provide meaningful error message for URLStreamProvider (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cf842a05 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cf842a05 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cf842a05 Branch: refs/heads/trunk Commit: cf842a05a7de4e6755e2aaef03eb36052495a824 Parents: f055912 Author: tbeerbower Authored: Thu Jun 18 20:13:53 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 20:14:24 2015 -0400 -- .../controller/internal/URLStreamProvider.java | 50 .../AmbariManagementControllerTest.java | 7 ++- .../internal/URLStreamProviderTest.java | 27 +++ 3 files changed, 60 insertions(+), 24 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cf842a05/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java index 1a8b085..94940e6 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java @@ -54,9 +54,9 @@ public class URLStreamProvider implements StreamProvider { private final int connTimeout; private final int readTimeout; - private final String path; - private final String password; - private final String type; + private final String trustStorePath; + private final String trustStorePassword; + private final String trustStoreType; private volatile SSLSocketFactory sslSocketFactory = null; private AppCookieManager appCookieManager = null; @@ -83,19 +83,20 @@ public class URLStreamProvider implements StreamProvider { /** * Provide the connection timeout for the underlying connection. * - * @param connectionTimeout - * time, in milliseconds, to attempt a connection - * @param readTimeout - * the read timeout in milliseconds + * @param connectionTimeout time, in milliseconds, to attempt a connection + * @param readTimeout the read timeout in milliseconds + * @param trustStorePath the path to the truststore required for secure connections + * @param trustStorePassword the truststore password + * @param trustStoreType the truststore type (e.g. "JKS") */ - public URLStreamProvider(int connectionTimeout, int readTimeout, String path, - String password, String type) { - -this.connTimeout = connectionTimeout; -this.readTimeout = readTimeout; -this.path= path; // truststroe path -this.password= password; // truststore password -this.type= type; // truststroe type + public URLStreamProvider(int connectionTimeout, int readTimeout, String trustStorePath, + String trustStorePassword, String trustStoreType) { + +this.connTimeout= connectionTimeout; +this.readTimeout= readTimeout; +this.trustStorePath = trustStorePath; +this.trustStorePassword = trustStorePassword; +this.trustStoreType = trustStoreType; } @@ -271,17 +272,26 @@ public class URLStreamProvider implements StreamProvider { } // Get an ssl connection - protected HttpsURLConnection getSSLConnection(String spec) throws IOException { + protected HttpsURLConnection getSSLConnection(String spec) throws IOException, IllegalStateException { if (sslSocketFactory == null) { synchronized (this) { if (sslSocketFactory == null) { + + if (trustStorePath == null || trustStorePassword == null) { +String msg = +String.format("Can't get secure connection to %s. Truststore path or password is not set.", spec); + +LOG.error(msg); +throw new IllegalStateException(msg); + } + try { -FileInputStream in = new FileInputStream(new File(path)); -KeyStore store = KeyStore.getInstance(type == null ? KeyStore -.getDefaultType() : type); +FileInputStream in = new FileInputStream(new File(trustStorePath)); +KeyStore store = KeyStore.getInstance(trustStoreType == null ? +KeyStore.getDefaultType() : trustStoreType); -store.load(in, password.toCharArray()); +store.load(in, tr
ambari git commit: AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3b4e83824 -> 516c4c312 AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/516c4c31 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/516c4c31 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/516c4c31 Branch: refs/heads/branch-2.1 Commit: 516c4c312c264eb9d6ecf66cce61df57a51a7d43 Parents: 3b4e838 Author: tbeerbower Authored: Thu Jun 18 20:10:57 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 20:12:02 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 18 -- .../stacks/2.3/common/test_stack_advisor.py | 17 - 2 files changed, 28 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/516c4c31/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index b1f4fb0..4c14b83 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -55,6 +55,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): server_host = socket.getfqdn() server_port = '8080' +server_protocol = 'http' views_dir = '/var/lib/ambari-server/resources/views/' if serverProperties: @@ -62,13 +63,18 @@ class HDP23StackAdvisor(HDP22StackAdvisor): server_port = serverProperties['client.api.port'] if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] + if 'api.ssl' in serverProperties: +if serverProperties['api.ssl'].lower() == 'true': + server_protocol = 'https' - if os.path.exists(views_dir) and os.path.isdir(views_dir): + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): last_version = '0.0.0' -for file in os.listdir(views_dir): - if fnmatch.fnmatch(file, 'tez-view*.jar'): -current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar -if self.versionCompare(current_version, last_version) >= 0: +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -77,7 +83,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = '{0}://{1}:{2}/#/main/views/TEZ/{3}/TEZ_CLUSTER_INSTANCE'.format(server_protocol, server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/516c4c31/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index fd35f1c..dedadeb 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -17,6 +17,7 @@ limitations under the License. ''' import os +import socket from unittest import TestCase from mock.mock import patch, MagicMock @@ -489,7 +490,15 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.listdir') + def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock,
ambari git commit: AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 55758cdeb -> f0559128d AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f0559128 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f0559128 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f0559128 Branch: refs/heads/trunk Commit: f0559128d27dc97501a66528167d3f6eeb4b463d Parents: 55758cd Author: tbeerbower Authored: Thu Jun 18 20:10:57 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 20:11:05 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 18 -- .../stacks/2.3/common/test_stack_advisor.py | 17 - 2 files changed, 28 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f0559128/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index b1f4fb0..4c14b83 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -55,6 +55,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): server_host = socket.getfqdn() server_port = '8080' +server_protocol = 'http' views_dir = '/var/lib/ambari-server/resources/views/' if serverProperties: @@ -62,13 +63,18 @@ class HDP23StackAdvisor(HDP22StackAdvisor): server_port = serverProperties['client.api.port'] if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] + if 'api.ssl' in serverProperties: +if serverProperties['api.ssl'].lower() == 'true': + server_protocol = 'https' - if os.path.exists(views_dir) and os.path.isdir(views_dir): + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): last_version = '0.0.0' -for file in os.listdir(views_dir): - if fnmatch.fnmatch(file, 'tez-view*.jar'): -current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar -if self.versionCompare(current_version, last_version) >= 0: +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -77,7 +83,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = '{0}://{1}:{2}/#/main/views/TEZ/{3}/TEZ_CLUSTER_INSTANCE'.format(server_protocol, server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/f0559128/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index fd35f1c..dedadeb 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -17,6 +17,7 @@ limitations under the License. ''' import os +import socket from unittest import TestCase from mock.mock import patch, MagicMock @@ -489,7 +490,15 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.listdir') + def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock): + +os_exists_mock.return_valu
ambari git commit: Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)"
Repository: ambari Updated Branches: refs/heads/branch-2.1 9cd5429e2 -> fc6b7169b Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)" This reverts commit f122348f01cbb9b5cefe572cfa7c1b4bd5b22b01. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc6b7169 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc6b7169 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc6b7169 Branch: refs/heads/branch-2.1 Commit: fc6b7169bec9aca9695e4749b22af6f90aabe20b Parents: 9cd5429 Author: tbeerbower Authored: Thu Jun 18 17:24:11 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 17:24:11 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 14 ++ .../python/stacks/2.3/common/test_stack_advisor.py| 13 + 2 files changed, 7 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc6b7169/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 1075a06..d65d711 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -63,14 +63,12 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] - views_work_dir = os.path.join(views_dir, 'work') - - if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): + if os.path.exists(views_dir) and os.path.isdir(views_dir): last_version = '0.0.0' -for file in os.listdir(views_work_dir): - if fnmatch.fnmatch(file, 'TEZ{*}'): -current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} -if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: +for file in os.listdir(views_dir): + if fnmatch.fnmatch(file, 'tez-view*.jar'): +current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar +if self.versionCompare(current_version, last_version) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -79,7 +77,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/#/main/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/fc6b7169/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index da85cfc..2f73f18 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -480,15 +480,7 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - @patch('os.path.exists') - @patch('os.path.isdir') - @patch('os.listdir') - def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock): - -os_exists_mock.return_value = True -os_isdir_mock.return_value = True -os_listdir_mock.return_value = ['TEZ{0.7.0.2.3.0.0-2155}'] - + def test_recommendTezConfigurations(self): self.maxDiff = None configurations = { "yarn-site": { @@ -656,7 +648,6 @@ class TestHDP23StackAdvisor(TestCase): # Test JDK1.7 services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'} -expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"; self.stac
ambari git commit: Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)"
Repository: ambari Updated Branches: refs/heads/trunk 4bff675a8 -> 2c5ecc39e Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)" This reverts commit 59a74cfda17bd3ad559f64fd967aa2dd13398e72. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2c5ecc39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2c5ecc39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2c5ecc39 Branch: refs/heads/trunk Commit: 2c5ecc39ec919af7e911237635382e6fe9a18abb Parents: 4bff675 Author: tbeerbower Authored: Thu Jun 18 17:22:35 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 17:22:35 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 14 ++ .../python/stacks/2.3/common/test_stack_advisor.py| 13 + 2 files changed, 7 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5ecc39/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index 1075a06..d65d711 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -63,14 +63,12 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] - views_work_dir = os.path.join(views_dir, 'work') - - if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): + if os.path.exists(views_dir) and os.path.isdir(views_dir): last_version = '0.0.0' -for file in os.listdir(views_work_dir): - if fnmatch.fnmatch(file, 'TEZ{*}'): -current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} -if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: +for file in os.listdir(views_dir): + if fnmatch.fnmatch(file, 'tez-view*.jar'): +current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar +if self.versionCompare(current_version, last_version) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -79,7 +77,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/#/main/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5ecc39/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index da85cfc..2f73f18 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -480,15 +480,7 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - @patch('os.path.exists') - @patch('os.path.isdir') - @patch('os.listdir') - def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock): - -os_exists_mock.return_value = True -os_isdir_mock.return_value = True -os_listdir_mock.return_value = ['TEZ{0.7.0.2.3.0.0-2155}'] - + def test_recommendTezConfigurations(self): self.maxDiff = None configurations = { "yarn-site": { @@ -656,7 +648,6 @@ class TestHDP23StackAdvisor(TestCase): # Test JDK1.7 services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'} -expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"; self.stac
ambari git commit: AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 bdb1be025 -> f122348f0 AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f122348f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f122348f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f122348f Branch: refs/heads/branch-2.1 Commit: f122348f01cbb9b5cefe572cfa7c1b4bd5b22b01 Parents: bdb1be0 Author: tbeerbower Authored: Thu Jun 18 09:14:49 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 09:16:04 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 14 -- .../python/stacks/2.3/common/test_stack_advisor.py| 13 - 2 files changed, 20 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/f122348f/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index d65d711..1075a06 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -63,12 +63,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] - if os.path.exists(views_dir) and os.path.isdir(views_dir): + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): last_version = '0.0.0' -for file in os.listdir(views_dir): - if fnmatch.fnmatch(file, 'tez-view*.jar'): -current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar -if self.versionCompare(current_version, last_version) >= 0: +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -77,7 +79,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = 'http://{0}:{1}/#/main/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/f122348f/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index 2f73f18..da85cfc 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -480,7 +480,15 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.listdir') + def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock): + +os_exists_mock.return_value = True +os_isdir_mock.return_value = True +os_listdir_mock.return_value = ['TEZ{0.7.0.2.3.0.0-2155}'] + self.maxDiff = None configurations = { "yarn-site": { @@ -648,6 +656,7 @@ class TestHDP23StackAdvisor(TestCase): # Test JDK1.7 services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'} +expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"; self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services,
ambari git commit: AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 82cfc3ee2 -> 59a74cfda AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59a74cfd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59a74cfd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59a74cfd Branch: refs/heads/trunk Commit: 59a74cfda17bd3ad559f64fd967aa2dd13398e72 Parents: 82cfc3e Author: tbeerbower Authored: Thu Jun 18 09:14:49 2015 -0400 Committer: tbeerbower Committed: Thu Jun 18 09:15:03 2015 -0400 -- .../stacks/HDP/2.3/services/stack_advisor.py | 14 -- .../python/stacks/2.3/common/test_stack_advisor.py| 13 - 2 files changed, 20 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/59a74cfd/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py index d65d711..1075a06 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py @@ -63,12 +63,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor): if 'views.dir' in serverProperties: views_dir = serverProperties['views.dir'] - if os.path.exists(views_dir) and os.path.isdir(views_dir): + views_work_dir = os.path.join(views_dir, 'work') + + if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir): last_version = '0.0.0' -for file in os.listdir(views_dir): - if fnmatch.fnmatch(file, 'tez-view*.jar'): -current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar -if self.versionCompare(current_version, last_version) >= 0: +for file in os.listdir(views_work_dir): + if fnmatch.fnmatch(file, 'TEZ{*}'): +current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154} +if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0: latest_tez_jar_version = current_version last_version = current_version pass @@ -77,7 +79,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor): pass if latest_tez_jar_version: - tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) + tez_url = 'http://{0}:{1}/#/main/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version) putTezProperty("tez.tez-ui.history-url.base", tez_url) pass http://git-wip-us.apache.org/repos/asf/ambari/blob/59a74cfd/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py -- diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py index 2f73f18..da85cfc 100644 --- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py +++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py @@ -480,7 +480,15 @@ class TestHDP23StackAdvisor(TestCase): self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts) self.assertEquals(configurations, expected) - def test_recommendTezConfigurations(self): + @patch('os.path.exists') + @patch('os.path.isdir') + @patch('os.listdir') + def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock): + +os_exists_mock.return_value = True +os_isdir_mock.return_value = True +os_listdir_mock.return_value = ['TEZ{0.7.0.2.3.0.0-2155}'] + self.maxDiff = None configurations = { "yarn-site": { @@ -648,6 +656,7 @@ class TestHDP23StackAdvisor(TestCase): # Test JDK1.7 services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'} +expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"; self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts) self
ambari git commit: AMBARI-11957 - Views : DataStore persistence error (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 9b972abdc -> 48557ec18 AMBARI-11957 - Views : DataStore persistence error (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/48557ec1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/48557ec1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/48557ec1 Branch: refs/heads/branch-2.1 Commit: 48557ec1870807d27e87c5be3c942f4a1ad23226 Parents: 9b972ab Author: tbeerbower Authored: Tue Jun 16 17:36:51 2015 -0400 Committer: tbeerbower Committed: Tue Jun 16 17:37:43 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 30 +++-- .../view/persistence/DataStoreImplTest.java | 121 +++ 2 files changed, 144 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/48557ec1/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 8353d63..69328e7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,14 +25,17 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; +import org.eclipse.persistence.mappings.DirectToFieldMapping; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.inject.Inject; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; +import javax.persistence.EntityTransaction; import javax.persistence.Query; import java.beans.IntrospectionException; import java.beans.Introspector; @@ -41,6 +44,8 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; +import java.sql.Clob; +import java.sql.Types; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -131,9 +136,7 @@ public class DataStoreImpl implements DataStore { persistEntity(entity, em, new HashSet()); em.getTransaction().commit(); } catch (Exception e) { -if (em.getTransaction()!= null) { - em.getTransaction().rollback(); -} +rollbackTransaction(em.getTransaction()); throwPersistenceException("Caught exception trying to store view entity " + entity, e); } } finally { @@ -162,9 +165,7 @@ public class DataStoreImpl implements DataStore { em.remove(dynamicEntity); em.getTransaction().commit(); } catch (Exception e) { - if (em.getTransaction()!= null) { -em.getTransaction().rollback(); - } + rollbackTransaction(em.getTransaction()); throwPersistenceException("Caught exception trying to remove view entity " + entity, e); } } @@ -297,7 +298,15 @@ public class DataStoreImpl implements DataStore { Class propertyType = descriptor.getPropertyType(); if (isDirectMappingType(propertyType)) { - typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + + // explicitly set the type of string fields + if (String.class.isAssignableFrom(propertyType)) { +DatabaseField field = mapping.getField(); + +field.setSqlType(Types.CLOB); +field.setType(Clob.class); + } } } } @@ -593,6 +602,13 @@ public class DataStoreImpl implements DataStore { return (Class) parameterizedType.getActualTypeArguments()[0]; } + // rollback the given transaction if it is active + private static void rollbackTransaction(EntityTransaction transaction) { +if (transaction != null && transaction.isActive()) { + transaction.rollback(); +} + } + // throw a new persistence exception and log the error private static void throwPersistenceException(String msg, Exception e) throws PersistenceException { LOG.error(msg, e); http://
ambari git commit: AMBARI-11957 - Views : DataStore persistence error (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk ac508b8df -> 1cdf8864c AMBARI-11957 - Views : DataStore persistence error (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1cdf8864 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1cdf8864 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1cdf8864 Branch: refs/heads/trunk Commit: 1cdf8864c1d52d44a910b836e31acf6f6ded161d Parents: ac508b8 Author: tbeerbower Authored: Tue Jun 16 17:36:51 2015 -0400 Committer: tbeerbower Committed: Tue Jun 16 17:36:59 2015 -0400 -- .../server/view/persistence/DataStoreImpl.java | 30 +++-- .../view/persistence/DataStoreImplTest.java | 121 +++ 2 files changed, 144 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1cdf8864/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java index 8353d63..69328e7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java @@ -25,14 +25,17 @@ import org.apache.ambari.view.PersistenceException; import org.eclipse.persistence.dynamic.DynamicClassLoader; import org.eclipse.persistence.dynamic.DynamicEntity; import org.eclipse.persistence.dynamic.DynamicType; +import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.jpa.dynamic.JPADynamicHelper; import org.eclipse.persistence.jpa.dynamic.JPADynamicTypeBuilder; +import org.eclipse.persistence.mappings.DirectToFieldMapping; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.inject.Inject; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; +import javax.persistence.EntityTransaction; import javax.persistence.Query; import java.beans.IntrospectionException; import java.beans.Introspector; @@ -41,6 +44,8 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; +import java.sql.Clob; +import java.sql.Types; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -131,9 +136,7 @@ public class DataStoreImpl implements DataStore { persistEntity(entity, em, new HashSet()); em.getTransaction().commit(); } catch (Exception e) { -if (em.getTransaction()!= null) { - em.getTransaction().rollback(); -} +rollbackTransaction(em.getTransaction()); throwPersistenceException("Caught exception trying to store view entity " + entity, e); } } finally { @@ -162,9 +165,7 @@ public class DataStoreImpl implements DataStore { em.remove(dynamicEntity); em.getTransaction().commit(); } catch (Exception e) { - if (em.getTransaction()!= null) { -em.getTransaction().rollback(); - } + rollbackTransaction(em.getTransaction()); throwPersistenceException("Caught exception trying to remove view entity " + entity, e); } } @@ -297,7 +298,15 @@ public class DataStoreImpl implements DataStore { Class propertyType = descriptor.getPropertyType(); if (isDirectMappingType(propertyType)) { - typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + DirectToFieldMapping mapping = typeBuilder.addDirectMapping(attributeName, propertyType, attributeName); + + // explicitly set the type of string fields + if (String.class.isAssignableFrom(propertyType)) { +DatabaseField field = mapping.getField(); + +field.setSqlType(Types.CLOB); +field.setType(Clob.class); + } } } } @@ -593,6 +602,13 @@ public class DataStoreImpl implements DataStore { return (Class) parameterizedType.getActualTypeArguments()[0]; } + // rollback the given transaction if it is active + private static void rollbackTransaction(EntityTransaction transaction) { +if (transaction != null && transaction.isActive()) { + transaction.rollback(); +} + } + // throw a new persistence exception and log the error private static void throwPersistenceException(String msg, Exception e) throws PersistenceException { LOG.error(msg, e); http://git-wip
ambari git commit: AMBARI-11938 - Namenode log contains:javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 abd3b4719 -> 1e4f33764 AMBARI-11938 - Namenode log contains:javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e4f3376 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e4f3376 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e4f3376 Branch: refs/heads/branch-2.1 Commit: 1e4f337640b6964fe2f4adf1fd312ecff006c997 Parents: abd3b47 Author: tbeerbower Authored: Mon Jun 15 21:47:31 2015 -0400 Committer: tbeerbower Committed: Mon Jun 15 21:48:50 2015 -0400 -- .../resource_management/libraries/functions/curl_krb_request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e4f3376/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index 5e7f795..b0b1dca 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -87,12 +87,12 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, krb_exe error_msg = None try: if return_only_http_code: - curl = subprocess.Popen(['curl', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', + curl = subprocess.Popen(['curl', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', '%{http_code}', url, '--connect-timeout', str(CONNECTION_TIMEOUT),'-o', '/dev/null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=kerberos_env) else: # returns response body - curl = subprocess.Popen(['curl', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, + curl = subprocess.Popen(['curl', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, url, '--connect-timeout', str(CONNECTION_TIMEOUT)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=kerberos_env)
ambari git commit: AMBARI-11938 - Namenode log contains:javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 776a45d2a -> 296ad04c8 AMBARI-11938 - Namenode log contains:javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/296ad04c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/296ad04c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/296ad04c Branch: refs/heads/trunk Commit: 296ad04c8f61d54bc99de011eb49af6c2356e9b1 Parents: 776a45d Author: tbeerbower Authored: Mon Jun 15 21:47:31 2015 -0400 Committer: tbeerbower Committed: Mon Jun 15 21:47:31 2015 -0400 -- .../resource_management/libraries/functions/curl_krb_request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/296ad04c/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py index 5e7f795..b0b1dca 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py @@ -87,12 +87,12 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix, krb_exe error_msg = None try: if return_only_http_code: - curl = subprocess.Popen(['curl', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', + curl = subprocess.Popen(['curl', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, '-w', '%{http_code}', url, '--connect-timeout', str(CONNECTION_TIMEOUT),'-o', '/dev/null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=kerberos_env) else: # returns response body - curl = subprocess.Popen(['curl', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, + curl = subprocess.Popen(['curl', '-k', '--negotiate', '-u', ':', '-b', cookie_file, '-c', cookie_file, url, '--connect-timeout', str(CONNECTION_TIMEOUT)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=kerberos_env)
ambari git commit: AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 bf45b0a4f -> 08f99fdfe AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08f99fdf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08f99fdf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08f99fdf Branch: refs/heads/branch-2.1 Commit: 08f99fdfefb393fcc65b0ac7dd9b4e4d1377bf3f Parents: bf45b0a Author: tbeerbower Authored: Wed Jun 10 08:39:02 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:45:12 2015 -0400 -- .../org/apache/ambari/server/orm/entities/ViewInstanceEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08f99fdf/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index c1400d7..5044267 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -148,7 +148,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { * Indicates whether or not to alter the names of the data store entities to * avoid db reserved word conflicts. */ - @Column(name = "alter_names") + @Column(name = "alter_names", nullable = false) @Basic private Integer alterNames; @@ -216,6 +216,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { public ViewInstanceEntity() { instanceConfig = null; +this.alterNames = 1; } /**
ambari git commit: AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 87d95d299 -> 4c6f74aa7 AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c6f74aa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c6f74aa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c6f74aa Branch: refs/heads/trunk Commit: 4c6f74aa7e307ce80171216d6392829cf95aa3c6 Parents: 87d95d2 Author: tbeerbower Authored: Wed Jun 10 08:39:02 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:42:53 2015 -0400 -- .../org/apache/ambari/server/orm/entities/ViewInstanceEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c6f74aa/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index c1400d7..5044267 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -148,7 +148,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { * Indicates whether or not to alter the names of the data store entities to * avoid db reserved word conflicts. */ - @Column(name = "alter_names") + @Column(name = "alter_names", nullable = false) @Basic private Integer alterNames; @@ -216,6 +216,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { public ViewInstanceEntity() { instanceConfig = null; +this.alterNames = 1; } /**
ambari git commit: AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3d536e5b8 -> bf45b0a4f AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bf45b0a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bf45b0a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bf45b0a4 Branch: refs/heads/branch-2.1 Commit: bf45b0a4fe365959e6a0c1290f37feee9d75fbbd Parents: 3d536e5 Author: tbeerbower Authored: Wed Jun 10 08:34:05 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:35:11 2015 -0400 -- .../server/configuration/Configuration.java | 12 +++- .../apache/ambari/server/view/ViewRegistry.java | 2 +- .../server/configuration/ConfigurationTest.java | 19 +++ .../ambari/server/view/ViewRegistryTest.java | 18 -- 4 files changed, 43 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 318e8b3..69d48e3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -69,6 +69,8 @@ public class Configuration { public static final String VIEWS_DIR_DEFAULT = "/var/lib/ambari-server/resources/views"; public static final String VIEWS_VALIDATE = "views.validate"; public static final String VIEWS_VALIDATE_DEFAULT = "false"; + public static final String VIEWS_REMOVE_UNDEPLOYED = "views.remove.undeployed"; + public static final String VIEWS_REMOVE_UNDEPLOYED_DEFAULT = "false"; public static final String WEBAPP_DIR = "webapp.dir"; public static final String BOOTSTRAP_SCRIPT = "bootstrap.script"; public static final String BOOTSTRAP_SCRIPT_DEFAULT = "/usr/bin/ambari_bootstrap"; @@ -734,9 +736,17 @@ public class Configuration { * @return true if view validation is enabled */ public boolean isViewValidationEnabled() { -return "true".equalsIgnoreCase(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); +return Boolean.parseBoolean(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); } + /** + * Determine whether or not a view that has been undeployed (archive deleted) should be removed from the database. + * + * @return true if undeployed views should be removed + */ + public boolean isViewRemoveUndeployedEnabled() { +return Boolean.parseBoolean(properties.getProperty(VIEWS_REMOVE_UNDEPLOYED, VIEWS_REMOVE_UNDEPLOYED_DEFAULT)); + } /** * @return conventional Java version number, e.g. 7. http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 3ee2c5a..61b9327 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -1510,7 +1510,7 @@ public class ViewRegistry { } } - if (removeUndeployed) { + if (configuration.isViewRemoveUndeployedEnabled()) { removeUndeployedViews(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 0823f99..70ab3b6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -341,6 +341,25 @@ public class ConfigurationTest { } @Test + public void testIsViewRemoveUndeployedEnabled() throws Exception { +final Properties ambariProperties = new Properties(); +
ambari git commit: AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 9d9ec5e21 -> 87d95d299 AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/87d95d29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/87d95d29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/87d95d29 Branch: refs/heads/trunk Commit: 87d95d299b19ed4f2bcb15e0e39e14b5661ce5b0 Parents: 9d9ec5e Author: tbeerbower Authored: Wed Jun 10 08:34:05 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:34:05 2015 -0400 -- .../server/configuration/Configuration.java | 12 +++- .../apache/ambari/server/view/ViewRegistry.java | 2 +- .../server/configuration/ConfigurationTest.java | 19 +++ .../ambari/server/view/ViewRegistryTest.java | 18 -- 4 files changed, 43 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index f62ab64..dc6089a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -69,6 +69,8 @@ public class Configuration { public static final String VIEWS_DIR_DEFAULT = "/var/lib/ambari-server/resources/views"; public static final String VIEWS_VALIDATE = "views.validate"; public static final String VIEWS_VALIDATE_DEFAULT = "false"; + public static final String VIEWS_REMOVE_UNDEPLOYED = "views.remove.undeployed"; + public static final String VIEWS_REMOVE_UNDEPLOYED_DEFAULT = "false"; public static final String WEBAPP_DIR = "webapp.dir"; public static final String BOOTSTRAP_SCRIPT = "bootstrap.script"; public static final String BOOTSTRAP_SCRIPT_DEFAULT = "/usr/bin/ambari_bootstrap"; @@ -730,9 +732,17 @@ public class Configuration { * @return true if view validation is enabled */ public boolean isViewValidationEnabled() { -return "true".equalsIgnoreCase(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); +return Boolean.parseBoolean(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); } + /** + * Determine whether or not a view that has been undeployed (archive deleted) should be removed from the database. + * + * @return true if undeployed views should be removed + */ + public boolean isViewRemoveUndeployedEnabled() { +return Boolean.parseBoolean(properties.getProperty(VIEWS_REMOVE_UNDEPLOYED, VIEWS_REMOVE_UNDEPLOYED_DEFAULT)); + } /** * @return conventional Java version number, e.g. 7. http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 3ee2c5a..61b9327 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -1510,7 +1510,7 @@ public class ViewRegistry { } } - if (removeUndeployed) { + if (configuration.isViewRemoveUndeployedEnabled()) { removeUndeployedViews(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 0823f99..70ab3b6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -341,6 +341,25 @@ public class ConfigurationTest { } @Test + public void testIsViewRemoveUndeployedEnabled() throws Exception { +final Properties ambariProperties = new Properties(); +Configuration configuration = new Configu
ambari git commit: AMBARI-11814 - Views : Update view.xml xsd to allow for optional build-number (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 2552deba3 -> 0fa830d92 AMBARI-11814 - Views : Update view.xml xsd to allow for optional build-number (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0fa830d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0fa830d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0fa830d9 Branch: refs/heads/branch-2.1 Commit: 0fa830d922a1174c5ffb247ee0eb175a45e8ecf0 Parents: 2552deb Author: tbeerbower Authored: Tue Jun 9 12:08:26 2015 -0400 Committer: tbeerbower Committed: Tue Jun 9 12:09:54 2015 -0400 -- .../internal/ViewVersionResourceProvider.java | 6 +++--- .../ambari/server/orm/entities/ViewEntity.java | 22 .../server/upgrade/UpgradeCatalog210.java | 3 +++ .../server/view/configuration/ViewConfig.java | 14 + .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 1 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 1 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 1 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 1 + .../server/orm/entities/ViewEntityTest.java | 6 ++ .../server/upgrade/UpgradeCatalog210Test.java | 11 ++ .../view/configuration/ViewConfigTest.java | 7 +++ .../phone-list-view/src/main/resources/view.xml | 1 + .../org/apache/ambari/view/ViewDefinition.java | 7 +++ ambari-views/src/main/resources/view.xsd| 5 + 15 files changed, 84 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0fa830d9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java index 6352817..570766d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java @@ -46,9 +46,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { */ public static final String VIEW_NAME_PROPERTY_ID = "ViewVersionInfo/view_name"; public static final String VIEW_VERSION_PROPERTY_ID = "ViewVersionInfo/version"; + public static final String VIEW_BUILD_PROPERTY_ID = "ViewVersionInfo/build_number"; public static final String LABEL_PROPERTY_ID = "ViewVersionInfo/label"; public static final String DESCRIPTION_PROPERTY_ID= "ViewVersionInfo/description"; - public static final String VERSION_PROPERTY_ID= "ViewVersionInfo/version"; public static final String MIN_AMBARI_VERSION_PROPERTY_ID = "ViewVersionInfo/min_ambari_version"; public static final String MAX_AMBARI_VERSION_PROPERTY_ID = "ViewVersionInfo/max_ambari_version"; public static final String PARAMETERS_PROPERTY_ID = "ViewVersionInfo/parameters"; @@ -75,9 +75,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { static { propertyIds.add(VIEW_NAME_PROPERTY_ID); propertyIds.add(VIEW_VERSION_PROPERTY_ID); +propertyIds.add(VIEW_BUILD_PROPERTY_ID); propertyIds.add(LABEL_PROPERTY_ID); propertyIds.add(DESCRIPTION_PROPERTY_ID); -propertyIds.add(VERSION_PROPERTY_ID); propertyIds.add(MIN_AMBARI_VERSION_PROPERTY_ID); propertyIds.add(MAX_AMBARI_VERSION_PROPERTY_ID); propertyIds.add(PARAMETERS_PROPERTY_ID); @@ -134,9 +134,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewDefinition.getCommonName(), requestedIds); setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewDefinition.getVersion(), requestedIds); +setResourceProperty(resource, VIEW_BUILD_PROPERTY_ID, viewDefinition.getBuild(), requestedIds); setResourceProperty(resource, LABEL_PROPERTY_ID, viewDefinition.getLabel(), requestedIds); setResourceProperty(resource, DESCRIPTION_PROPERTY_ID, viewDefinition.getDescription(), requestedIds); -setResourceProperty(resource, VERSION_PROPERTY_ID, viewDefinition.getVersion(), requestedIds); setResourceProperty(resource, MIN_AMBARI_VERSION_PROPERTY_ID, viewDefinition.getConfiguration().getMinAmbariVersion(), requeste
ambari git commit: AMBARI-11814 - Views : Update view.xml xsd to allow for optional build-number (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 97bf29a35 -> 5240ca45e AMBARI-11814 - Views : Update view.xml xsd to allow for optional build-number (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5240ca45 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5240ca45 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5240ca45 Branch: refs/heads/trunk Commit: 5240ca45e65a01f4006226aee9a4f6b4e95f9e8d Parents: 97bf29a Author: tbeerbower Authored: Tue Jun 9 12:08:26 2015 -0400 Committer: tbeerbower Committed: Tue Jun 9 12:08:44 2015 -0400 -- .../internal/ViewVersionResourceProvider.java | 6 +++--- .../ambari/server/orm/entities/ViewEntity.java | 22 .../server/upgrade/UpgradeCatalog210.java | 3 +++ .../server/view/configuration/ViewConfig.java | 14 + .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 1 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 1 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 1 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 1 + .../server/orm/entities/ViewEntityTest.java | 6 ++ .../server/upgrade/UpgradeCatalog210Test.java | 11 ++ .../view/configuration/ViewConfigTest.java | 7 +++ .../phone-list-view/src/main/resources/view.xml | 1 + .../org/apache/ambari/view/ViewDefinition.java | 7 +++ ambari-views/src/main/resources/view.xsd| 5 + 15 files changed, 84 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5240ca45/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java index 6352817..570766d 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java @@ -46,9 +46,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { */ public static final String VIEW_NAME_PROPERTY_ID = "ViewVersionInfo/view_name"; public static final String VIEW_VERSION_PROPERTY_ID = "ViewVersionInfo/version"; + public static final String VIEW_BUILD_PROPERTY_ID = "ViewVersionInfo/build_number"; public static final String LABEL_PROPERTY_ID = "ViewVersionInfo/label"; public static final String DESCRIPTION_PROPERTY_ID= "ViewVersionInfo/description"; - public static final String VERSION_PROPERTY_ID= "ViewVersionInfo/version"; public static final String MIN_AMBARI_VERSION_PROPERTY_ID = "ViewVersionInfo/min_ambari_version"; public static final String MAX_AMBARI_VERSION_PROPERTY_ID = "ViewVersionInfo/max_ambari_version"; public static final String PARAMETERS_PROPERTY_ID = "ViewVersionInfo/parameters"; @@ -75,9 +75,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { static { propertyIds.add(VIEW_NAME_PROPERTY_ID); propertyIds.add(VIEW_VERSION_PROPERTY_ID); +propertyIds.add(VIEW_BUILD_PROPERTY_ID); propertyIds.add(LABEL_PROPERTY_ID); propertyIds.add(DESCRIPTION_PROPERTY_ID); -propertyIds.add(VERSION_PROPERTY_ID); propertyIds.add(MIN_AMBARI_VERSION_PROPERTY_ID); propertyIds.add(MAX_AMBARI_VERSION_PROPERTY_ID); propertyIds.add(PARAMETERS_PROPERTY_ID); @@ -134,9 +134,9 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider { setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewDefinition.getCommonName(), requestedIds); setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewDefinition.getVersion(), requestedIds); +setResourceProperty(resource, VIEW_BUILD_PROPERTY_ID, viewDefinition.getBuild(), requestedIds); setResourceProperty(resource, LABEL_PROPERTY_ID, viewDefinition.getLabel(), requestedIds); setResourceProperty(resource, DESCRIPTION_PROPERTY_ID, viewDefinition.getDescription(), requestedIds); -setResourceProperty(resource, VERSION_PROPERTY_ID, viewDefinition.getVersion(), requestedIds); setResourceProperty(resource, MIN_AMBARI_VERSION_PROPERTY_ID, viewDefinition.getConfiguration().getMinAmbariVersion(), requestedIds
ambari git commit: AMBARI-11788 - Views : Data storage error when try to execute some query in hive view (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 0699ee9e7 -> 094da61f1 AMBARI-11788 - Views : Data storage error when try to execute some query in hive view (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/094da61f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/094da61f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/094da61f Branch: refs/heads/branch-2.1 Commit: 094da61f123d5cca1c55d20044a97dc7d7d71e48 Parents: 0699ee9 Author: tbeerbower Authored: Mon Jun 8 13:37:28 2015 -0400 Committer: tbeerbower Committed: Mon Jun 8 13:38:45 2015 -0400 -- .../server/orm/entities/ViewInstanceEntity.java | 30 + .../server/upgrade/UpgradeCatalog210.java | 16 ++- .../apache/ambari/server/view/ViewRegistry.java | 10 +- .../server/view/persistence/DataStoreImpl.java | 96 - .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 1 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 1 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 1 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 1 + .../orm/entities/ViewInstanceEntityTest.java| 14 ++ .../server/upgrade/UpgradeCatalog210Test.java | 12 +- .../view/persistence/DataStoreImplTest.java | 133 ++- 12 files changed, 247 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/094da61f/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index dc3876c..c1400d7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -145,6 +145,14 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { private char xmlDriven = 'N'; /** + * Indicates whether or not to alter the names of the data store entities to + * avoid db reserved word conflicts. + */ + @Column(name = "alter_names") + @Basic + private Integer alterNames; + + /** * The instance properties. */ @OneToMany(cascade = CascadeType.ALL, mappedBy = "viewInstance") @@ -224,6 +232,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { this.description = instanceConfig.getDescription(); this.clusterHandle = null; this.visible = instanceConfig.isVisible() ? 'Y' : 'N'; +this.alterNames = 1; String label = instanceConfig.getLabel(); this.label = (label == null || label.length() == 0) ? view.getLabel() : label; @@ -260,6 +269,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { this.description = null; this.clusterHandle = null; this.visible = 'Y'; +this.alterNames = 1; this.label = label; } @@ -472,6 +482,26 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { } /** + * Determine whether or not to alter the names of the + * data store entities to avoid db reserved word conflicts. + * + * @return true if the view is a system view + */ + public boolean alterNames() { +return alterNames == 1; + } + + /** + * Set the flag which indicates whether or not to alter the names of the + * data store entities to avoid db reserved word conflicts. + * + * @param alterNames the alterNames flag; true if the data store names should be altered + */ + public void setAlterNames(boolean alterNames) { +this.alterNames = alterNames ? 1 : 0; + } + + /** * Get the instance properties. * * @return the instance properties http://git-wip-us.apache.org/repos/asf/ambari/blob/094da61f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 9b51d2d..e32e3aa 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -171,6 +171,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { executeWidgetDDLUpdates(); executeStackDDLUpdates(); executeTopologyDDLUpdates(); +executeViewDDLUpdat
ambari git commit: AMBARI-11788 - Views : Data storage error when try to execute some query in hive view (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 562021efc -> 59fa63f18 AMBARI-11788 - Views : Data storage error when try to execute some query in hive view (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/59fa63f1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/59fa63f1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/59fa63f1 Branch: refs/heads/trunk Commit: 59fa63f1837bd3a19b2e0a903334cbf0e8c7dd68 Parents: 562021e Author: tbeerbower Authored: Mon Jun 8 13:37:28 2015 -0400 Committer: tbeerbower Committed: Mon Jun 8 13:37:44 2015 -0400 -- .../server/orm/entities/ViewInstanceEntity.java | 30 + .../server/upgrade/UpgradeCatalog210.java | 16 ++- .../apache/ambari/server/view/ViewRegistry.java | 10 +- .../server/view/persistence/DataStoreImpl.java | 96 - .../main/resources/Ambari-DDL-MySQL-CREATE.sql | 1 + .../main/resources/Ambari-DDL-Oracle-CREATE.sql | 1 + .../resources/Ambari-DDL-Postgres-CREATE.sql| 1 + .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql | 1 + .../resources/Ambari-DDL-SQLServer-CREATE.sql | 1 + .../orm/entities/ViewInstanceEntityTest.java| 14 ++ .../server/upgrade/UpgradeCatalog210Test.java | 12 +- .../view/persistence/DataStoreImplTest.java | 133 ++- 12 files changed, 247 insertions(+), 69 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/59fa63f1/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index dc3876c..c1400d7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -145,6 +145,14 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { private char xmlDriven = 'N'; /** + * Indicates whether or not to alter the names of the data store entities to + * avoid db reserved word conflicts. + */ + @Column(name = "alter_names") + @Basic + private Integer alterNames; + + /** * The instance properties. */ @OneToMany(cascade = CascadeType.ALL, mappedBy = "viewInstance") @@ -224,6 +232,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { this.description = instanceConfig.getDescription(); this.clusterHandle = null; this.visible = instanceConfig.isVisible() ? 'Y' : 'N'; +this.alterNames = 1; String label = instanceConfig.getLabel(); this.label = (label == null || label.length() == 0) ? view.getLabel() : label; @@ -260,6 +269,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { this.description = null; this.clusterHandle = null; this.visible = 'Y'; +this.alterNames = 1; this.label = label; } @@ -472,6 +482,26 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { } /** + * Determine whether or not to alter the names of the + * data store entities to avoid db reserved word conflicts. + * + * @return true if the view is a system view + */ + public boolean alterNames() { +return alterNames == 1; + } + + /** + * Set the flag which indicates whether or not to alter the names of the + * data store entities to avoid db reserved word conflicts. + * + * @param alterNames the alterNames flag; true if the data store names should be altered + */ + public void setAlterNames(boolean alterNames) { +this.alterNames = alterNames ? 1 : 0; + } + + /** * Get the instance properties. * * @return the instance properties http://git-wip-us.apache.org/repos/asf/ambari/blob/59fa63f1/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 9b51d2d..e32e3aa 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -171,6 +171,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { executeWidgetDDLUpdates(); executeStackDDLUpdates(); executeTopologyDDLUpdates(); +executeViewDDLUpdat
ambari git commit: AMBARI-11774 - Views : NPE accessing view that includes velocity. (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c8bfa4e8d -> a34b112f9 AMBARI-11774 - Views : NPE accessing view that includes velocity. (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a34b112f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a34b112f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a34b112f Branch: refs/heads/branch-2.1 Commit: a34b112f966502c285e3ef7d721f1fd5c6106818 Parents: c8bfa4e Author: tbeerbower Authored: Mon Jun 8 06:00:55 2015 -0400 Committer: tbeerbower Committed: Mon Jun 8 10:07:45 2015 -0400 -- .../java/org/apache/ambari/server/view/ViewClassLoader.java| 1 + .../org/apache/ambari/server/view/ViewClassLoaderTest.java | 6 ++ 2 files changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a34b112f/ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java index c90bcaa..692f728 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java @@ -81,6 +81,7 @@ public class ViewClassLoader extends WebAppClassLoader { // add as system classes to avoid conflicts and linkage errors webAppContext.addSystemClass("org.slf4j."); webAppContext.addSystemClass("com.sun.jersey."); +webAppContext.addSystemClass("org.apache.velocity."); // set the class loader settings from the configuration if (viewConfig != null) { http://git-wip-us.apache.org/repos/asf/ambari/blob/a34b112f/ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java index f831989..d2f0c8f 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java @@ -80,6 +80,7 @@ public class ViewClassLoaderTest { expect(parentClassLoader.loadClass("com.google.inject.AbstractModule")).andReturn(parentClass).once(); expect(parentClassLoader.loadClass("org.slf4j.LoggerFactory")).andReturn(parentClass).once(); expect(parentClassLoader.loadClass("com.sun.jersey.api.ConflictException")).andReturn(parentClass).once(); + expect(parentClassLoader.loadClass("org.apache.velocity.VelocityContext")).andReturn(parentClass).once(); replay(parentClassLoader, viewConfig); @@ -126,6 +127,11 @@ public class ViewClassLoaderTest { Assert.assertNotNull(clazz); Assert.assertSame(parentClass, clazz); +clazz = classLoader.loadClass("org.apache.velocity.VelocityContext"); + +Assert.assertNotNull(clazz); +Assert.assertSame(parentClass, clazz); + verify(parentClassLoader, viewConfig); }