public JobData runPigQuery(String execute, File pigFile, String statusDir, String arg) throws IOException {
    MultivaluedMapImpl data = new MultivaluedMapImpl();
    if (execute != null)
      data.add("execute", execute);
    if (pigFile != null)
      data.add("file", pigFile.toString());
    if (statusDir != null)
      data.add("statusdir", statusDir);
    if (arg != null && !arg.isEmpty()) {
      for(String arg1 : arg.split("\t")) {
        data.add("arg", arg1);
      }
    }

    JSONRequest<JobData> request =
        new JSONRequest<JobData>(service.path("pig"), JobData.class, doAs, doAs, context); //FIXME: configurable proxyuser

    return request.post(data);
  }
Create and queue a Pig job.
@param execute String containing an entire, short pig program to run. (e.g. pwd)
@param pigFile HDFS file name of a pig program to run. (One of either "execute" or "file" is required )
@param statusDir A directory where Templeton will write the status of the Pig job. If
                 provided, it is the caller's responsibility to remove this directory when done.
@param arg Set a program argument. Optional None
@return id A string containing the job ID similar to "job_201110132141_0001".
        info A JSON object containing the information returned when the job was queued.
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/templeton/client/TempletonApi.java