ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [32/50] [abbrv] ambari git commit: AMBARI-21765. Missing hdfs_scheme variable in params.py file for Apache Knox (Sandeep More via smohanty)
Date Mon, 09 Oct 2017 18:34:46 GMT
AMBARI-21765. Missing hdfs_scheme variable in params.py file for Apache Knox (Sandeep More
via smohanty)

(cherry picked from commit ca6ce335d7bd3d50e5892a3169d90acbdada963d)

Change-Id: I60d15f356f462123df9ace2b4244e16d0d196e89


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/688258b0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/688258b0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/688258b0

Branch: refs/heads/2.5-maint
Commit: 688258b09ebf13ae5982ebda5ca364110b817fc0
Parents: 9277090
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Mon Aug 21 14:00:40 2017 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Mon Aug 21 17:09:29 2017 -0700

----------------------------------------------------------------------
 .../0.5.0.2.2/package/scripts/params_linux.py   | 27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/688258b0/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index 9b0bbfc..f54abef 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -157,17 +157,30 @@ else:
 
 has_namenode = not namenode_host == None
 namenode_http_port = "50070"
+namenode_https_port = "50470"
 namenode_rpc_port = "8020"
 
 if has_namenode:
   if 'dfs.namenode.http-address' in config['configurations']['hdfs-site']:
     namenode_http_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.http-address'])
+  if 'dfs.namenode.https-address' in config['configurations']['hdfs-site']:
+    namenode_https_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.https-address'])
   if dfs_ha_enabled and namenode_rpc:
     namenode_rpc_port = get_port_from_url(namenode_rpc)
   else:
     if 'dfs.namenode.rpc-address' in config['configurations']['hdfs-site']:
       namenode_rpc_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.rpc-address'])
 
+dfs_http_policy = default('/configurations/hdfs-site/dfs.http.policy', None)
+
+hdfs_https_on = False
+hdfs_scheme = 'http'
+if dfs_http_policy  !=  None :
+   hdfs_https_on = (dfs_http_policy.upper() == 'HTTPS_ONLY')
+   hdfs_scheme = 'http' if not hdfs_https_on else 'https'
+   hdfs_port = str(namenode_http_port)  if not hdfs_https_on else str(namenode_https_port)
+   namenode_http_port = hdfs_port
+
 webhdfs_service_urls = ""
 
 def buildUrlElement(protocol, hdfs_host, port, servicePath) :
@@ -188,6 +201,13 @@ else:
   webhdfs_service_urls = buildUrlElement("http", namenode_host, namenode_http_port, "/webhdfs")
 
 
+yarn_http_policy = default('/configurations/yarn-site/yarn.http.policy', None )
+yarn_https_on = False
+yarn_scheme = 'http'
+if yarn_http_policy !=  None :
+   yarn_https_on = ( yarn_http_policy.upper() == 'HTTPS_ONLY')
+   yarn_scheme = 'http' if not yarn_https_on else 'https'
+   
 rm_hosts = default("/clusterHostInfo/rm_host", None)
 if type(rm_hosts) is list:
   rm_host = rm_hosts[0]
@@ -227,17 +247,24 @@ if type(hbase_master_hosts) is list:
 else:
   hbase_master_host = hbase_master_hosts
 
+oozie_https_port = None
 oozie_server_hosts = default("/clusterHostInfo/oozie_server", None)
 if type(oozie_server_hosts) is list:
   oozie_server_host = oozie_server_hosts[0]
 else:
   oozie_server_host = oozie_server_hosts
 
+oozie_scheme = 'http'
 has_oozie = not oozie_server_host == None
 oozie_server_port = "11000"
 
 if has_oozie:
   oozie_server_port = get_port_from_url(config['configurations']['oozie-site']['oozie.base.url'])
+  oozie_https_port = default("/configurations/oozie-site/oozie.https.port", None)
+  
+if oozie_https_port is not None:
+   oozie_scheme = 'https'
+   oozie_server_port = oozie_https_port
 
 # Knox managed properties
 knox_managed_pid_symlink= format('{stack_root}/current/knox-server/pids')


Mime
View raw message