You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Larry McCay (JIRA)" <ji...@apache.org> on 2016/04/25 13:37:12 UTC

[jira] [Commented] (KNOX-712) submitPig does not allow multiple argument via arg()

    [ https://issues.apache.org/jira/browse/KNOX-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15256234#comment-15256234 ] 

Larry McCay commented on KNOX-712:
----------------------------------

Hi [~pregazzoni] - thank you for reporting this!
Are you interested or planning to contribute a patch for it?
It seems you already have a fix for it.

The contributor workflow is detailed here:
https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-ContributorWorkflow

Thanks again!

> submitPig does not allow multiple argument via arg()
> ----------------------------------------------------
>
>                 Key: KNOX-712
>                 URL: https://issues.apache.org/jira/browse/KNOX-712
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: ClientDSL
>    Affects Versions: 0.7.0
>            Reporter: Pierre Regazzoni
>             Fix For: 0.9.1
>
>
> Seems like I can't pass multiple argument via knox shell as follow:
> {noformat}
> jobId = Job.submitPig(session) \
>   .arg( "-p" ) \
>   .arg( "someparam=somevalue" ) \
>   .arg( "-v" ) \
> ...
> {noformat}
> Looking at code looks like [Pig code|https://github.com/apache/knox/blob/master/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/Pig.java] can only take one arg.
> Would expect code to be as follow:
> {noformat}
>     public Request arg( String arg ) {
>       addParam( params, "arg", value );
>       return this;
>     }
> {noformat}
> {noformat}
>     protected Callable<Response> callable() {
>       return new Callable<Response>() {
>         @Override
>         public Response call() throws Exception {
>           URIBuilder uri = uri( Job.SERVICE_PATH, "/pig" );
>           List<NameValuePair> params = new ArrayList<NameValuePair>();
>           addParam( params, "group", group );
>           addParam( params, "file", file );
>           addParam( params, "statusdir", statusDir );
>           UrlEncodedFormEntity form = new UrlEncodedFormEntity( params );
>           HttpPost request = new HttpPost( uri.build() );
>           request.setEntity( form );
>           return new Response( execute( request ) );
>         }
>       };
>     }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)