You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2015/09/14 20:11:38 UTC
ambari git commit: Revert "AMBARI-12410. Leverage atlas configured
port properties for server (Jon Maron via smohanty)"
Repository: ambari
Updated Branches:
refs/heads/trunk 535e33a82 -> b4fdcf87a
Revert "AMBARI-12410. Leverage atlas configured port properties for server (Jon Maron via smohanty)"
This reverts commit 91885add8113782a3c399fca8715065d02419d4e.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b4fdcf87
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b4fdcf87
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b4fdcf87
Branch: refs/heads/trunk
Commit: b4fdcf87a07a22eeefc72503879a087c5e3d5217
Parents: 535e33a
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Sep 14 11:11:28 2015 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Sep 14 11:11:28 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/b4fdcf87/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/b4fdcf87/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/b4fdcf87/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/b4fdcf87/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/b4fdcf87/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/b4fdcf87/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 e7ed235..6803ee8 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
@@ -416,12 +416,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/b4fdcf87/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 236c4e8..aa21e53 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
@@ -233,12 +233,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/b4fdcf87/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/b4fdcf87/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 2644b4e..8dbb1fa 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
@@ -117,7 +117,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/b4fdcf87/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/_HOST@EXAMPLE.COM",
"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/b4fdcf87/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