falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [1/5] git commit: FALCON-482 Concurrent requests made using Proxy Oozie client fail. Contributed by Sowmya Ramesh
Date Thu, 16 Oct 2014 21:40:37 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 688fc4557 -> 1caadaf20


FALCON-482 Concurrent requests made using Proxy Oozie client fail. Contributed by Sowmya Ramesh


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/78e486c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/78e486c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/78e486c2

Branch: refs/heads/master
Commit: 78e486c263048dad66e7ef979b223614b0919e8e
Parents: 688fc45
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Thu Oct 16 13:41:11 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Thu Oct 16 13:41:11 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |   3 +
 .../apache/oozie/client/ProxyOozieClient.java   | 122 +++++++++++++------
 2 files changed, 87 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/78e486c2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e4354a7..8b4ab1e 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+   FALCON-482 Concurrent requests made using Proxy Oozie client fail
+   (Sowmya Ramesh via Venkatesh Seetharam)
+
    FALCON-764 Falcon retry of failed process/feed instances broken during restart
    (Shaik Idris via Suhas Vasu)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/78e486c2/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java b/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
index c3ab765..a7c6960 100644
--- a/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
+++ b/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
@@ -22,9 +22,7 @@ import org.apache.commons.codec.CharEncoding;
 import org.apache.falcon.security.CurrentUser;
 import org.apache.falcon.security.SecurityUtil;
 import org.apache.falcon.util.RuntimeProperties;
-import org.apache.hadoop.hdfs.web.KerberosUgiAuthenticator;
 import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.hadoop.security.authentication.client.Authenticator;
 import org.apache.oozie.client.rest.RestConstants;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
@@ -52,8 +50,6 @@ public class ProxyOozieClient extends AuthOozieClient {
     private static final Logger LOG = LoggerFactory.getLogger(ProxyOozieClient.class);
     private static final Map<String, String> NONE = new HashMap<String, String>();
 
-    private final Authenticator authenticator = new KerberosUgiAuthenticator();
-
     public ProxyOozieClient(String oozieUrl) {
         super(oozieUrl, SecurityUtil.getAuthenticationType());
 
@@ -71,11 +67,6 @@ public class ProxyOozieClient extends AuthOozieClient {
     }
 
     @Override
-    protected Authenticator getAuthenticator() throws OozieClientException {
-        return authenticator;
-    }
-
-    @Override
     protected HttpURLConnection createConnection(URL url, final String method)
         throws IOException, OozieClientException {
 
@@ -153,8 +144,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getSystemMode();
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -167,8 +160,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.submit(conf);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -181,10 +176,11 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.dryrun(conf);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
-
     }
 
     @Override
@@ -197,8 +193,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -211,8 +209,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.run(conf);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -226,8 +226,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -241,8 +243,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -256,8 +260,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -271,8 +277,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -286,8 +294,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -300,8 +310,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobInfo(jobId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -315,8 +327,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobInfo(jobId, start, len);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -330,8 +344,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getWorkflowActionInfo(actionId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -344,8 +360,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobLog(jobId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -361,8 +379,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -375,8 +395,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobDefinition(jobId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -389,8 +411,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getBundleJobInfo(jobId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -403,8 +427,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getCoordJobInfo(jobId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -419,8 +445,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getCoordJobInfo(jobId, filter, start, len);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -433,8 +461,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getCoordActionInfo(actionId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -450,8 +480,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.reRunCoord(jobId, rerunType, scope, refresh,
noCleanup);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -466,8 +498,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.reRunBundle(jobId, coordScope, dateScope,
refresh, noCleanup);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -481,8 +515,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobsInfo(filter, start, len);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -495,8 +531,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobsInfo(filter);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -510,8 +548,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return null;
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -524,8 +564,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getJobId(externalId);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -539,8 +581,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getCoordJobsInfo(filter, start, len);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 
@@ -553,8 +597,10 @@ public class ProxyOozieClient extends AuthOozieClient {
                     return ProxyOozieClient.super.getBundleJobsInfo(filter, start, len);
                 }
             });
+        } catch (OozieClientException e) {
+            throw e;
         } catch (Exception e) {
-            throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+            throw new OozieClientException(e.toString(), e);
         }
     }
 }


Mime
View raw message