Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-712

submitPig does not allow multiple argument via arg()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.9.1
    • ClientDSL
    • None

    Description

      Seems like I can't pass multiple argument via knox shell as follow:

      jobId = Job.submitPig(session) \
        .arg( "-p" ) \
        .arg( "someparam=somevalue" ) \
        .arg( "-v" ) \
      ...
      

      Looking at code looks like Pig code can only take one arg.

      Would expect code to be as follow:

          public Request arg( String arg ) {
            addParam( params, "arg", value );
            return this;
          }
      
          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 ) );
              }
            };
          }
      

      Attachments

        1. KNOX-712.003.patch
          5 kB
          Pierre Regazzoni
        2. KNOX-712.patch
          4 kB
          Pierre Regazzoni
        3. KNOX-712-002.patch
          1 kB
          Larry McCay

        Activity

          People

            pregazzoni Pierre Regazzoni
            pregazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: