You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ni...@apache.org on 2017/01/06 12:58:10 UTC
ambari git commit: AMBARI-19398 : Namenode not resolved while
submitting workflow in certain environments (Padma Priya via nitirajrathore)
Repository: ambari
Updated Branches:
refs/heads/trunk d9b3d288e -> 67bf7a6aa
AMBARI-19398 : Namenode not resolved while submitting workflow in certain environments (Padma Priya via nitirajrathore)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/67bf7a6a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/67bf7a6a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/67bf7a6a
Branch: refs/heads/trunk
Commit: 67bf7a6aa26ce9b2ce34824f9b14ad8283b1dc75
Parents: d9b3d28
Author: Nitiraj Rathore <ni...@gmail.com>
Authored: Fri Jan 6 18:26:09 2017 +0530
Committer: Nitiraj Rathore <ni...@gmail.com>
Committed: Fri Jan 6 18:27:11 2017 +0530
----------------------------------------------------------------------
.../apache/oozie/ambari/view/AmbariIOUtil.java | 7 +++----
.../apache/oozie/ambari/view/OozieDelegate.java | 13 +++++++------
.../views/wfmanager/src/main/resources/view.xml | 19 ++++++++++++++++++-
3 files changed, 28 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/67bf7a6a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AmbariIOUtil.java
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AmbariIOUtil.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AmbariIOUtil.java
index 93447b7..4338fe8 100644
--- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AmbariIOUtil.java
+++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/AmbariIOUtil.java
@@ -57,9 +57,8 @@ public class AmbariIOUtil {
}
private boolean isSecurityEnabled() {
- String authType = viewContext.getCluster().getConfigurationValue(
- "core-site", "hadoop.security.authentication");
- LOGGER.info("Auth Type=" + authType);
- return !"simple".equalsIgnoreCase(authType);
+ String securityEnbaled = viewContext.getProperties()
+ .get("hadoop.security.authentication");
+ return !"simple".equalsIgnoreCase(securityEnbaled);
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/67bf7a6a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java
index 2779f05..55c4312 100644
--- a/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java
+++ b/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieDelegate.java
@@ -65,9 +65,11 @@ public class OozieDelegate {
public String submitWorkflowJobToOozie(HttpHeaders headers,
String filePath, MultivaluedMap<String, String> queryParams,
JobType jobType) {
- String nameNode = "hdfs://"
- + viewContext.getCluster().getConfigurationValue("hdfs-site",
- "dfs.namenode.rpc-address");
+ String nameNode = viewContext.getProperties().get("webhdfs.url");
+ if (nameNode == null) {
+ LOGGER.error("Name Node couldn't be determined automatically.");
+ throw new RuntimeException("Name Node couldn't be determined automatically.");
+ }
if (!queryParams.containsKey("config.nameNode")) {
ArrayList<String> nameNodes = new ArrayList<String>();
@@ -148,9 +150,8 @@ public class OozieDelegate {
HashMap<String, String> workflowConigs = new HashMap<String, String>();
if (queryParams.containsKey("resourceManager")
&& "useDefault".equals(queryParams.getFirst("resourceManager"))) {
- String jobTrackerNode = viewContext.getCluster()
- .getConfigurationValue("yarn-site",
- "yarn.resourcemanager.address");
+ String jobTrackerNode = viewContext.getProperties()
+ .get("yarn.resourcemanager.address");
LOGGER.info("jobTrackerNode===" + jobTrackerNode);
workflowConigs.put("resourceManager", jobTrackerNode);
workflowConigs.put("jobTracker", jobTrackerNode);
http://git-wip-us.apache.org/repos/asf/ambari/blob/67bf7a6a/contrib/views/wfmanager/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/view.xml b/contrib/views/wfmanager/src/main/resources/view.xml
index b8e2fcc..c5d4a5b 100644
--- a/contrib/views/wfmanager/src/main/resources/view.xml
+++ b/contrib/views/wfmanager/src/main/resources/view.xml
@@ -24,7 +24,7 @@
<name>proxy</name>
<service-class>org.apache.oozie.ambari.view.OozieProxyImpersonator</service-class>
</resource>
-
+
<parameter>
<name>oozie.service.uri</name>
<description>Oozie service URI for the Oozie API.</description>
@@ -119,6 +119,23 @@
<label>WebHDFS Authorization</label>
<required>false</required>
</parameter>
+ <parameter>
+ <name>hadoop.security.authentication</name>
+ <description>Security Authentication (simple/kerberos).</description>
+ <label>Security Authentication Type</label>
+ <placeholder>simple</placeholder>
+ <cluster-config>core-site/hadoop.security.authentication</cluster-config>
+ <default-value>simple</default-value>
+ <required>true</required>
+ </parameter>
+ <parameter>
+ <name>yarn.resourcemanager.address</name>
+ <description>yarn.resourcemanager.address</description>
+ <label>yarn.resourcemanager.address</label>
+ <placeholder>http://sandbox.hortonworks.com:8050</placeholder>
+ <cluster-config>yarn-site/yarn.resourcemanager.address</cluster-config>
+ <required>true</required>
+ </parameter>
<persistence>
<!--