You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ba...@apache.org on 2015/12/02 20:55:11 UTC
falcon git commit: FALCON-1595 In secure cluster,
Falcon server loses ability to communicate with HDFS over time (Balu
Vellanki)
Repository: falcon
Updated Branches:
refs/heads/master 4c10e3cab -> e77e4d7ab
FALCON-1595 In secure cluster, Falcon server loses ability to communicate with HDFS over time (Balu Vellanki)
Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/e77e4d7a
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/e77e4d7a
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/e77e4d7a
Branch: refs/heads/master
Commit: e77e4d7abcd86ca2172175d7276df7b1ce6e75c1
Parents: 4c10e3c
Author: bvellanki <bv...@hortonworks.com>
Authored: Wed Dec 2 11:55:00 2015 -0800
Committer: bvellanki <bv...@hortonworks.com>
Committed: Wed Dec 2 11:55:00 2015 -0800
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../falcon/hadoop/HadoopClientFactory.java | 31 ++++++++++++++------
2 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/falcon/blob/e77e4d7a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 814e8a4..193a26e 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -58,6 +58,8 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-1595 In secure cluster, Falcon server loses ability to communicate with HDFS over time (Balu Vellanki)
+
FALCON-1490 Fixing inconsistencies in filterBy behavior (Narayan Periwal via Balu Vellanki)
FALCON-1604 Status API Not working in case of Falcon Native Scheduler(Pavan Kumar Kolamuri via Ajay Yadava)
http://git-wip-us.apache.org/repos/asf/falcon/blob/e77e4d7a/common/src/main/java/org/apache/falcon/hadoop/HadoopClientFactory.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/hadoop/HadoopClientFactory.java b/common/src/main/java/org/apache/falcon/hadoop/HadoopClientFactory.java
index 9534ff2..e33d353 100644
--- a/common/src/main/java/org/apache/falcon/hadoop/HadoopClientFactory.java
+++ b/common/src/main/java/org/apache/falcon/hadoop/HadoopClientFactory.java
@@ -173,18 +173,17 @@ public final class HadoopClientFactory {
Validate.notNull(ugi, "ugi cannot be null");
Validate.notNull(conf, "configuration cannot be null");
- String nameNode = uri.getAuthority();
- if (nameNode == null) {
- nameNode = getNameNode(conf);
- if (nameNode != null) {
- try {
- new URI(nameNode).getAuthority();
- } catch (URISyntaxException ex) {
- throw new FalconException("Exception while getting FileSystem", ex);
- }
+ try {
+ if (UserGroupInformation.isSecurityEnabled()) {
+ ugi.checkTGTAndReloginFromKeytab();
}
+ } catch (IOException ioe) {
+ throw new FalconException("Exception while getting FileSystem. Unable to check TGT for user "
+ + ugi.getShortUserName(), ioe);
}
+ validateNameNode(uri, conf);
+
try {
// prevent falcon impersonating falcon, no need to use doas
final String proxyUserName = ugi.getShortUserName();
@@ -258,4 +257,18 @@ public final class HadoopClientFactory {
throw new IOException("mkdir failed for " + path);
}
}
+
+ private void validateNameNode(URI uri, Configuration conf) throws FalconException {
+ String nameNode = uri.getAuthority();
+ if (nameNode == null) {
+ nameNode = getNameNode(conf);
+ if (nameNode != null) {
+ try {
+ new URI(nameNode).getAuthority();
+ } catch (URISyntaxException ex) {
+ throw new FalconException("Exception while getting FileSystem", ex);
+ }
+ }
+ }
+ }
}