@POST
  @Path("sqoop")
  @Produces({MediaType.APPLICATION_JSON})
  public EnqueueBean sqoop(@FormParam("command") String command,
              @FormParam("optionsfile") String optionsFile,
              @FormParam("libdir") String libdir,
              @FormParam("files") String otherFiles,
              @FormParam("statusdir") String statusdir,
              @FormParam("callback") String callback,
              @FormParam("enablelog") boolean enablelog,
              @FormParam("enablejobreconnect") Boolean enablejobreconnect)
    throws NotAuthorizedException, BusyException, BadParam, QueueException,
    IOException, InterruptedException, TooManyRequestsException {
    verifyUser();
    if (command == null && optionsFile == null)
      throw new BadParam("Must define Sqoop command or a optionsfile contains Sqoop command to run Sqoop job.");
    if (command != null && optionsFile != null)
      throw new BadParam("Cannot set command and optionsfile at the same time.");
    checkEnableLogPrerequisite(enablelog, statusdir);

    //add all function arguments to a map
    Map<String, Object> userArgs = new HashMap<String, Object>();
    userArgs.put("user.name", getDoAsUser());
    userArgs.put("command", command);
    userArgs.put("optionsfile", optionsFile);
    userArgs.put("libdir", libdir);
    userArgs.put("files", otherFiles);
    userArgs.put("statusdir", statusdir);
    userArgs.put("callback", callback);
    userArgs.put("enablelog", Boolean.toString(enablelog));
    userArgs.put("enablejobreconnect", enablejobreconnect);
    SqoopDelegator d = new SqoopDelegator(appConf);
    return d.run(getDoAsUser(), userArgs, command, optionsFile, otherFiles,
      statusdir, callback, getCompletedUrl(), enablelog, enablejobreconnect, libdir);
  }
Run a Sqoop job.
@param optionsFile  name of option file which contains Sqoop command to run
@param otherFiles   additional files to be shipped to the launcher, such as option
                         files which contain part of the Sqoop command
@param libdir       dir containing JDBC jars that Sqoop will need to interact with the database
@param statusdir    where the stderr/stdout of templeton controller job goes
@param callback     URL which WebHCat will call when the sqoop job finishes
@param enablelog    whether to collect mapreduce log into statusdir/logs
@param enablejobreconnect    whether to reconnect to a running child job on templeton
                             controller job retry
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java