Repository: ambari Updated Branches: refs/heads/branch-2.1 bf021133b -> d51882511
Revert "AMBARI-12410. Leverage atlas configured port properties for server (Jon Maron via smohanty)" This reverts commit 973831b1ddd16bee25b5bfef4099817a8a14eece. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5188251 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5188251 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5188251 Branch: refs/heads/branch-2.1 Commit: d5188251147b985e8382210fc8037635c52d80d9 Parents: bf02113 Author: Sumit Mohanty <[email protected]> Authored: Mon Sep 14 11:12:37 2015 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Mon Sep 14 11:12:37 2015 -0700 ---------------------------------------------------------------------- .../resources/common-services/ATLAS/0.1.0.2.3/alerts.json | 6 +++--- .../0.1.0.2.3/configuration/application-properties.xml | 10 ---------- .../ATLAS/0.1.0.2.3/configuration/atlas-env.xml | 5 +++++ .../ATLAS/0.1.0.2.3/package/scripts/metadata_server.py | 2 +- .../ATLAS/0.1.0.2.3/package/scripts/params.py | 7 +------ .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 8 ++------ .../HDP/2.2/services/HIVE/configuration/hive-site.xml | 8 ++------ .../resources/stacks/HDP/2.3/services/stack_advisor.py | 9 ++++----- .../test/python/stacks/2.3/ATLAS/test_metadata_server.py | 2 +- .../src/test/python/stacks/2.3/configs/default.json | 3 +-- ambari-web/app/models/quick_links.js | 6 +++--- 11 files changed, 23 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 5eaaace..f324707 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 @@ -10,7 +10,7 @@ "scope": "ANY", "source": { "type": "PORT", - "uri": "{{application-properties/atlas.server.http.port}}", + "uri": "{{atlas-env/metadata_port}}", "default_port": 21000, "reporting": { "ok": { @@ -37,8 +37,8 @@ "source": { "type": "WEB", "uri": { - "http": "{{hostname}}:{{application-properties/atlas.server.http.port}}", - "https": "{{hostname}}:{{application-properties/atlas.server.https.port}}", + "http": "{{hostname}}:{{atlas-env/metadata_port}}", + "https": "{{hostname}}:21443", "https_property": "{{application-properties/atlas.enableTLS}}", "https_property_value": "true", "default_port": 21000, http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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..386fbdc 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 @@ -130,15 +130,5 @@ DEFAULT</value> <description></description> </property> - <property> - <name>atlas.server.http.port</name> - <value>21000</value> - <description></description> - </property> - <property> - <name>atlas.server.https.port</name> - <value>21443</value> - <description></description> - </property> </configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 0ca741c..991d7fe 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 @@ -20,6 +20,11 @@ --> <configuration> <property require-input="false"> + <name>metadata_port</name> + <value>21000</value> + <description>Listening port of the Atlas server.</description> + </property> + <property require-input="false"> <name>metadata_log_dir</name> <value>/var/log/atlas</value> <description>Atlas log directory.</description> http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 d4a7837..6c5a87e 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 @@ -46,7 +46,7 @@ class MetadataServer(Script): env.set_params(params) self.configure(env) - daemon_cmd = format('source {params.conf_dir}/atlas-env.sh ; {params.metadata_start_script}') + daemon_cmd = format('source {params.conf_dir}/atlas-env.sh ; {params.metadata_start_script} --port {params.metadata_port}') no_op_test = format('ls {params.pid_file} >/dev/null 2>&1 && ps -p `cat {params.pid_file}` >/dev/null 2>&1') Execute(daemon_cmd, user=params.metadata_user, http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 15028c0..a7c6d7a 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 @@ -62,12 +62,7 @@ env_sh_template = config['configurations']['atlas-env']['content'] credential_provider = format( "jceks://file@{conf_dir}/atlas-site.jceks") # command line args -ssl_enabled = config['configurations']['application-properties']['atlas.enableTLS'] -if ssl_enabled: - metadata_port = config['configurations']['application-properties']['atlas.server.https.port'] -else: - metadata_port = config['configurations']['application-properties']['atlas.server.http.port'] - +metadata_port = config['configurations']['atlas-env']['metadata_port'] metadata_host = config['hostname'] # application properties http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 a040ac5..2783b78 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 @@ -387,12 +387,8 @@ limitations under the License. <name>atlas.enableTLS</name> </property> <property> - <type>application-properties</type> - <name>atlas.server.http.port</name> - </property> - <property> - <type>application-properties</type> - <name>atlas.server.https.port</name> + <type>atlas-env</type> + <name>metadata_port</name> </property> </depends-on> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml index c3ad55a..5811e4f 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-site.xml @@ -230,12 +230,8 @@ limitations under the License. <name>hive_timeline_logging_enabled</name> </property> <property> - <type>application-properties</type> - <name>atlas.server.http.port</name> - </property> - <property> - <type>application-properties</type> - <name>atlas.server.https.port</name> + <type>atlast-env</type> + <name>metadata_port</name> </property> </depends-on> </property> http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 ca07ac9..dd287b2 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 @@ -222,17 +222,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor): cluster_name = '' putHiveSiteProperty('atlas.cluster.name', cluster_name) + metadata_port = "21000" + if 'atlas-env' in services['configurations']: + metadata_port = services['configurations']['atlas-env']['properties']['metadata_port'] metadata_host_info = self.getHostWithComponent("ATLAS", "ATLAS_SERVER", services, hosts) metadata_host = metadata_host_info['Hosts']['host_name'] scheme = "http" - metadata_port = "21000" - tls_enabled = "false" if 'application-properties' in services['configurations']: tls_enabled = services['configurations']['application-properties']['properties']['atlas.enableTLS'] - metadata_port = services['configurations']['application-properties']['properties']['atlas.server.http.port'] - if tls_enabled.lower() == "true": + if tls_enabled.lower() == 'true': scheme = "https" - metadata_port = services['configurations']['application-properties']['properties']['atlas.server.https.port'] putHiveSiteProperty('atlas.rest.address', '{0}://{1}:{2}'.format(scheme, metadata_host, metadata_port)) else: putHiveSitePropertyAttribute('atlas.cluster.name', 'delete', 'true') http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 7435fb9..cff446f 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 @@ -115,7 +115,7 @@ class TestMetadataServer(RMFTestCase): target = RMFTestCase.TARGET_COMMON_SERVICES ) self.configureResourcesCalled() - self.assertResourceCalled('Execute', 'source /etc/atlas/conf/atlas-env.sh ; /usr/hdp/current/atlas-server/bin/atlas_start.py', + self.assertResourceCalled('Execute', 'source /etc/atlas/conf/atlas-env.sh ; /usr/hdp/current/atlas-server/bin/atlas_start.py --port 21000', not_if = 'ls /var/run/atlas/atlas.pid >/dev/null 2>&1 && ps -p `cat /var/run/atlas/atlas.pid` >/dev/null 2>&1', user = 'atlas', ) http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/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 d78f517..688065c 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 @@ -181,8 +181,7 @@ "atlas.http.authentication.type": "simple", "atlas.http.authentication.kerberos.principal": "HTTP/[email protected]", "atlas.http.authentication.kerberos.keytab": "/etc/security/keytabs/spnego.service.keytab", - "atlas.http.authentication.kerberos.name.rules": "DEFAULT", - "atlas.server.http.port" : "21000" + "atlas.http.authentication.kerberos.name.rules": "DEFAULT" }, "atlas-env": { "content": "# The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path\nexport JAVA_HOME={{java64_home}}\n# any additional java opts you want to set. This will apply to both client and server operations\nexport METADATA_OPTS={{metadata_opts}}\n# metadata configuration directory\nexport METADATA_CONF={{conf_dir}}\n# Where log files are stored. Defatult is logs directory under the base install location\nexport METADATA_LOG_DIR={{log_dir}}\n# additional classpath entries\nexport METADATACPPATH={{metadata_classpath}}\n# data dir\nexport METADATA_DATA_DIR={{data_dir}}\n# Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.\nexport METADATA_EXPANDED_WEBAPP_DIR={{expanded_war_dir}}", http://git-wip-us.apache.org/repos/asf/ambari/blob/d5188251/ambari-web/app/models/quick_links.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/quick_links.js b/ambari-web/app/models/quick_links.js index 8fe6be6..b1f95d6 100644 --- a/ambari-web/app/models/quick_links.js +++ b/ambari-web/app/models/quick_links.js @@ -337,9 +337,9 @@ App.QuickLinks.FIXTURES = [ url:'%@://%@:%@/#!/search?user.name=%@', service_id: 'ATLAS', template:'%@://%@:%@/#!/search?user.name=%@', - http_config: 'atlas.server.http.port', - https_config: 'atlas.server.https.port', - site: 'application-properties', + http_config: 'metadata_port', + https_config: 'metadata_port', + site: 'atlas-env', regex: '^(\\d+)$', default_http_port: 21000, default_https_port: 21443
