[
https://issues.apache.org/jira/browse/KNOX-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15291168#comment-15291168
]
Larry McCay commented on KNOX-712:
----------------------------------
[~pregazzoni] - I've managed to get this to work but had to resolve an
assumption of the pig.tar.gz file being in HDFS at
hdfs:///hdp/apps/2.4.2.0-153/pig/pig.tar.gz.
My question is whether this is something that you setup in your environment for
running the job or whether this is maybe a problem with my test cluster
installation?
Did you happen to explicitly add that file to HDFS?
We will also need to figure out how to get the sample to be copied to the
install via some maven magic.
Currently, it is in the gateway-server/home/samples directory but it isn't
getting moved into the actual build.
> 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
> Assignee: Pierre Regazzoni
> Fix For: 0.9.1
>
> Attachments: KNOX-712-002.patch, KNOX-712.003.patch, KNOX-712.patch
>
>
> 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)