[ 
https://issues.apache.org/jira/browse/KNOX-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dilli Arumugam updated KNOX-163:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

We were setting up user.name (or doAs) query parameter only if query string is 
not null if the request method is not GET. 

In other words the user.name (or doAs) query parameter would not be set if the 
request method is POST and the query string is null.

It so happened that WebHDFS POST requests always had query string with op query 
parameter. So, we did not hit the problem in WebHDFS.

However, in WebHCAT POST method, there is no such query parameter and we hit 
the problem.

Moved the code around to always set user.name (or doAs) query parameter.


                
> job submission through knox-webchat results in NullPointerException
> -------------------------------------------------------------------
>
>                 Key: KNOX-163
>                 URL: https://issues.apache.org/jira/browse/KNOX-163
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Dilli Arumugam
>            Assignee: Dilli Arumugam
>             Fix For: 0.3.0
>
>         Attachments: KNOX-163.patch
>
>
> Hitting a NullPointerException while trying to submit a job through knox -> 
> webhcat.
> The same use case works when there is no knox in path.
> Curl session:
> curl -k -i -u guest:guest-password -X POST \
>     -d jar=/user/guest/tmp/test/lib/wordcount.jar -d class=WordCountTem\
>     -d arg=/user/guest/tmp/test/input -d arg=/user/guest/tmp/test/output \
>      https://localhost:8443/gateway/sandbox/templeton/v1/mapreduce/jar
> Pasting what I think is relevant from the stack trace on shown on console:
> <h3>Caused by:</h3><pre>java.lang.NullPointerException
>       at 
> org.apache.hadoop.gateway.dispatch.HttpClientDispatch.executeRequest(HttpClientDispatch.java:83)
>       at 
> org.apache.hadoop.gateway.dispatch.HttpClientDispatch.doPost(HttpClientDispatch.java:262)
>       at 
> org.apache.hadoop.gateway.dispatch.AbstractGatewayDispatch$PostAdapter.doMethod(AbstractGatewayDispatch.java:141)
>       at 
> org.apache.hadoop.gateway.dispatch.AbstractGatewayDispatch.doFilter(AbstractGatewayDispatch.java:64)
>       at 
> org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:59)
>       at 
> org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:259)
> It appears that query string happens to be null.
> The query string is not expected to be null here.
> Would try to debug tomorrow.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to