Examples of execute()


Examples of org.apache.hadoop.hive.common.cli.ShellCmdExecutor.execute()

      shell_cmd = new VariableSubstitution().substitute(ss.getConf(), shell_cmd);

      // shell_cmd = "/bin/bash -c \'" + shell_cmd + "\'";
      try {
        ShellCmdExecutor executor = new ShellCmdExecutor(shell_cmd, ss.out, ss.err);
        ret = executor.execute();
        if (ret != 0) {
          console.printError("Command failed with exit code = " + ret);
        }
      } catch (Exception e) {
        console.printError("Exception raised from Shell command " + e.getLocalizedMessage(),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.ExplainTask.execute()

    ExplainWork work = new ExplainWork(tmp, sem.getParseContext(), sem.getRootTasks(),
        sem.getFetchTask(), astStringTree, sem, true, false, false, false, false);
    ExplainTask task = new ExplainTask();
    task.setWork(work);
    task.initialize(conf, plan, null);
    task.execute(null);
    FSDataInputStream in = fs.open(tmp);
    StringBuilder builder = new StringBuilder();
    final int bufSz = 4096;
    byte[] buf = new byte[bufSz];
    long pos = 0L;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.MapRedTask.execute()

  {
    MapRedTask mrtask = new MapRedTask();
    DriverContext dctx = new DriverContext();
    mrtask.setWork(mr);
    mrtask.initialize(hiveConf, null, dctx);
    int exitVal = mrtask.execute(dctx);

    if (exitVal != 0)
    {
      System.out.println("Test execution failed with exit status: "
          + exitVal);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute()

    String testName = new Exception().getStackTrace()[1].getMethodName();
    MapRedTask mrtask = new MapRedTask();
    DriverContext dctx = new DriverContext ();
    mrtask.setWork(mr);
    mrtask.initialize(conf, null, dctx);
    int exitVal =  mrtask.execute(dctx);

    if (exitVal != 0) {
      LOG.error(testName + " execution failed with exit status: "
          + exitVal);
      assertEquals(true, false);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.merge.MergeFileTask.execute()

    DriverContext driverCxt = new DriverContext();
    MergeFileTask taskExec = new MergeFileTask();
    taskExec.initialize(db.getConf(), null, driverCxt);
    taskExec.setWork(mergeWork);
    taskExec.setQueryPlan(this.getQueryPlan());
    int ret = taskExec.execute(driverCxt);

    return ret;
  }

  private HiveAuthorizer getSessionAuthorizer() {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.rcfile.merge.BlockMergeTask.execute()

    DriverContext driverCxt = new DriverContext();
    BlockMergeTask taskExec = new BlockMergeTask();
    taskExec.initialize(db.getConf(), null, driverCxt);
    taskExec.setWork(mergeWork);
    taskExec.setQueryPlan(this.getQueryPlan());
    int ret = taskExec.execute(driverCxt);

    return ret;
  }

  private int grantOrRevokeRole(GrantRevokeRoleDDL grantOrRevokeRoleDDL)
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.rcfile.truncate.ColumnTruncateTask.execute()

      DriverContext driverCxt = new DriverContext();
      ColumnTruncateTask taskExec = new ColumnTruncateTask();
      taskExec.initialize(db.getConf(), null, driverCxt);
      taskExec.setWork(truncateWork);
      taskExec.setQueryPlan(this.getQueryPlan());
      return taskExec.execute(driverCxt);
    }

    String tableName = truncateTableDesc.getTableName();
    Map<String, String> partSpec = truncateTableDesc.getPartSpec();
View Full Code Here

Examples of org.apache.hadoop.hive.service.HiveClient.execute()

      HiveClient client = ss.getClient();
      PrintStream out = ss.out;
      PrintStream err = ss.err;

      try {
        client.execute(cmd_trimmed);
        List<String> results;
        do {
          results = client.fetchN(LINES_TO_FETCH);
          for (String line : results) {
            out.println(line);
View Full Code Here

Examples of org.apache.hadoop.lib.service.FileSystemAccess.execute()

  private <T> T fsExecute(Principal user, String doAs, FileSystemAccess.FileSystemExecutor<T> executor)
    throws IOException, FileSystemAccessException {
    String hadoopUser = getEffectiveUser(user, doAs);
    FileSystemAccess fsAccess = HttpFSServerWebApp.get().get(FileSystemAccess.class);
    Configuration conf = HttpFSServerWebApp.get().get(FileSystemAccess.class).getFileSystemConfiguration();
    return fsAccess.execute(hadoopUser, conf, executor);
  }

  /**
   * Returns a filesystem instance. The fileystem instance is wired for release at the completion of
   * the current Servlet request via the {@link FileSystemReleaseFilter}.
View Full Code Here

Examples of org.apache.hadoop.tools.DistCp.execute()

        DistCp distCp = (feedStorageType == Storage.TYPE.FILESYSTEM)
                ? new CustomReplicator(conf, options)
                : new DistCp(conf, options);
        LOG.info("Started DistCp");
        distCp.execute();

        if (feedStorageType == Storage.TYPE.FILESYSTEM) {
            executePostProcessing(options)// this only applies for FileSystem Storage.
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.