Repository: falcon Updated Branches: refs/heads/master 7a1ef4d27 -> 4da2dc90b
FALCON-1465 Cluster submission fails with java.lang.IllegalArgumentException in distributed mode. Contributed by Ajay Yadava. Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/4da2dc90 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/4da2dc90 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/4da2dc90 Branch: refs/heads/master Commit: 4da2dc90b8cee3b56f59873b9901d4934a5e4722 Parents: 7a1ef4d Author: Sowmya Ramesh <[email protected]> Authored: Fri Sep 18 15:09:02 2015 -0700 Committer: Sowmya Ramesh <[email protected]> Committed: Fri Sep 18 15:09:02 2015 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../org/apache/falcon/resource/channel/HTTPChannel.java | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/4da2dc90/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 61665e8..1492f5b 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,8 @@ Trunk (Unreleased) FALCON-1403 Revisit IT cleanup and teardown(Narayan Periwal via Pallavi Rao) BUG FIXES + FALCON-1465 Cluster submission fails with java.lang.IllegalArgumentException in distributed mode(Ajay Yadava via Sowmya Ramesh) + FALCON-1331 Update Failed for an entity and further updates are not possible as lock is not released(Pavan Kumar Kolamuri via Ajay Yadava) FALCON-1408 Add more logging information for failing ClusterEntityValidationIT(Pavan Kumar Kolamuri via Ajay Yadava) http://git-wip-us.apache.org/repos/asf/falcon/blob/4da2dc90/prism/src/main/java/org/apache/falcon/resource/channel/HTTPChannel.java ---------------------------------------------------------------------- diff --git a/prism/src/main/java/org/apache/falcon/resource/channel/HTTPChannel.java b/prism/src/main/java/org/apache/falcon/resource/channel/HTTPChannel.java index 5bf084b..6801398 100644 --- a/prism/src/main/java/org/apache/falcon/resource/channel/HTTPChannel.java +++ b/prism/src/main/java/org/apache/falcon/resource/channel/HTTPChannel.java @@ -20,6 +20,7 @@ package org.apache.falcon.resource.channel; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.config.DefaultClientConfig; import org.apache.falcon.FalconException; import org.apache.falcon.resource.proxy.BufferedRequest; @@ -99,11 +100,13 @@ public class HTTPChannel extends AbstractChannel { String doAsUser = incomingRequest.getParameter(DO_AS_PARAM); - ClientResponse response = getClient() + WebResource resource = getClient() .resource(UriBuilder.fromUri(url).build().normalize()) - .queryParam("user.name", user) - .queryParam("doAs", doAsUser) - .accept(accept).type(mimeType) + .queryParam("user.name", user); + if (doAsUser != null) { + resource = resource.queryParam("doAs", doAsUser); + } + ClientResponse response = resource.accept(accept).type(mimeType) .method(httpMethod, ClientResponse.class, (isPost(httpMethod) ? incomingRequest.getInputStream() : null)); incomingRequest.getInputStream().reset();
