Package org.apache.tez.dag.api

Examples of org.apache.tez.dag.api.TezException


    }

    try {
      dagId = proxy.submitDAG(null, requestProto).getDagId();
    } catch (ServiceException e) {
      throw new TezException(e);
    }
    LOG.info("Submitted dag to TezSession"
        + ", sessionName=" + sessionName
        + ", applicationId=" + applicationId
        + ", dagId=" + dagId);
View Full Code Here


        + ", sessionName=" + sessionName
        + ", applicationId=" + applicationId);
    try {
      yarnClient.killApplication(applicationId);
    } catch (YarnException e) {
      throw new TezException(e);
    }
  }
View Full Code Here

        } catch (ServiceException e) {
          LOG.info("Failed to retrieve AM Status via proxy", e);
        }
      }
    } catch (YarnException e) {
      throw new TezException(e);
    }
    return TezSessionStatus.INITIALIZING;
  }
View Full Code Here

        } catch (InterruptedException e) {
          return;
        }
      }
    } catch (ServiceException e) {
      throw new TezException(e);
    }
  }
View Full Code Here

    initTask(out);

    // Sanity check
    if (!(in instanceof MRInputLegacy)) {
      throw new IOException(new TezException(
          "Only MRInputLegacy supported. Input: " + in.getClass()));
    }
    MRInputLegacy input = (MRInputLegacy)in;
    input.init();
    Configuration incrementalConf = input.getConfigUpdates();
View Full Code Here

  synchronized String submitDAGToAppMaster(DAGPlan dagPlan)
      throws TezException  {
    if(currentDAG != null
        && !state.equals(DAGAppMasterState.IDLE)) {
      throw new TezException("App master already running a DAG");
    }
    if (state.equals(DAGAppMasterState.ERROR)
        || sessionStopped.get()) {
      throw new TezException("AM unable to accept new DAG submissions."
          + " In the process of shutting down");
    }

    // RPC server runs in the context of the job user as it was started in
    // the job user's UGI context
    LOG.info("Starting DAG submitted via RPC");

    if (LOG.isDebugEnabled()) {
      LOG.debug("Writing DAG plan to: "
          + TezConfiguration.TEZ_PB_PLAN_TEXT_NAME);

      File outFile = new File(TezConfiguration.TEZ_PB_PLAN_TEXT_NAME);
      try {
        PrintWriter printWriter = new PrintWriter(outFile);
        String dagPbString = dagPlan.toString();
        printWriter.println(dagPbString);
        printWriter.close();
      } catch (IOException e) {
        throw new TezException("Failed to write TEZ_PLAN to "
            + outFile.toString(), e);
      }
    }

    submittedDAGs.incrementAndGet();
View Full Code Here

        Set<StatusGetOpts> statusOptions)
        throws TezException{
      VertexStatus status = getDAG(dagIdStr)
          .getVertexStatus(vertexName, statusOptions);
      if(status == null) {
        throw new TezException("Unknown vertexName: " + vertexName);
      }

      return status;
    }
View Full Code Here

    }

    DAG getDAG(String dagIdStr) throws TezException {
      TezDAGID dagId = TezDAGID.fromString(dagIdStr);
      if(dagId == null) {
        throw new TezException("Bad dagId: " + dagIdStr);
      }

      if(currentDAG == null) {
        throw new TezException("No running dag at present");
      }
      if(!dagId.equals(currentDAG.getID())) {
        LOG.warn("Current DAGID : "
            + (currentDAG.getID() == null ? "NULL" : currentDAG.getID())
            + ", Looking for string (not found): " + dagIdStr + ", dagIdObj: "
            + dagId);
        throw new TezException("Unknown dagId: " + dagIdStr);
      }

      return currentDAG;
    }
View Full Code Here

      shutdownTezAM();
    }

    public synchronized TezSessionStatus getSessionStatus() throws TezException {
      if (!isSession) {
        throw new TezException("Unsupported operation as AM not running in"
            + " session mode");
      }
      switch (state) {
      case NEW:
      case INITED:
View Full Code Here

              tezJarResources);
      // Set Tez Sessions to not retry on AM crashes
      appContext.setMaxAppAttempts(1);
      yarnClient.submitApplication(appContext);
    } catch (YarnException e) {
      throw new TezException(e);
    }
    sessionStarted = true;
  }
View Full Code Here

TOP

Related Classes of org.apache.tez.dag.api.TezException

Copyright © 2018 www.massapicom. 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.