Package org.apache.tajo.master.querymaster

Examples of org.apache.tajo.master.querymaster.QueryJobManager


        responseBuilder.setResultCode(ClientProtos.ResultCode.OK);
        responseBuilder.setState(TajoProtos.QueryState.QUERY_SUCCEEDED);
      } else {
        hookManager.doHooks(queryContext, plan);

        QueryJobManager queryJobManager = this.context.getQueryJobManager();
        QueryInfo queryInfo;

        queryInfo = queryJobManager.createNewQueryJob(queryContext, sql, rootNode);

        responseBuilder.setQueryId(queryInfo.getQueryId().getProto());
        responseBuilder.setResultCode(ClientProtos.ResultCode.OK);
        responseBuilder.setState(queryInfo.getQueryState());
        if(queryInfo.getQueryMasterHost() != null) {
View Full Code Here


      if(request.hasQueryId()) {
        QueryId queryId = new QueryId(request.getQueryId());

        //heartbeat from querymaster
        //LOG.info("Received QueryHeartbeat:" + queryId + "," + request);
        QueryJobManager queryJobManager = context.getQueryJobManager();
        command = queryJobManager.queryHeartbeat(request);
      } else {
        //heartbeat from TajoWorker
        context.getResourceManager().workerHeartbeat(request);
      }
View Full Code Here

      catalog = new LocalCatalogWrapper(catalogServer);

      globalEngine = new GlobalEngine(context);
      addIfService(globalEngine);

      queryJobManager = new QueryJobManager(context);
      addIfService(queryJobManager);

      tajoMasterClientService = new TajoMasterClientService(context);
      addIfService(tajoMasterClientService);
View Full Code Here

    @Override
    public BoolProto killQuery(RpcController controller,
                               TajoIdProtos.QueryIdProto request)
        throws ServiceException {
      QueryId queryId = new QueryId(request);
      QueryJobManager queryJobManager = context.getQueryJobManager();
      //TODO KHJ, change QueryJobManager to event handler
      //queryJobManager.handle(new QueryEvent(queryId, QueryEventType.KILL));

      return BOOL_TRUE;
    }
View Full Code Here

    } else { // it requires distributed execution. So, the query is forwarded to a query master.
      context.getSystemMetrics().counter("Query", "numDMLQuery").inc();
      hookManager.doHooks(queryContext, plan);

      QueryJobManager queryJobManager = this.context.getQueryJobManager();
      QueryInfo queryInfo;

      queryInfo = queryJobManager.createNewQueryJob(session, queryContext, sql, rootNode);

      if(queryInfo == null) {
        responseBuilder.setQueryId(QueryIdFactory.NULL_QUERY_ID.getProto());
        responseBuilder.setResultCode(ClientProtos.ResultCode.ERROR);
        responseBuilder.setErrorMessage("Fail starting QueryMaster.");
View Full Code Here

      if(request.hasQueryId()) {
        QueryId queryId = new QueryId(request.getQueryId());

        //heartbeat from querymaster
        //LOG.info("Received QueryHeartbeat:" + queryId + "," + request);
        QueryJobManager queryJobManager = context.getQueryJobManager();
        command = queryJobManager.queryHeartbeat(request);
      } else {
        //heartbeat from TajoWorker
        context.getResourceManager().workerHeartbeat(request);
      }
View Full Code Here

      addIfService(sessionManager);

      globalEngine = new GlobalEngine(context);
      addIfService(globalEngine);

      queryJobManager = new QueryJobManager(context);
      addIfService(queryJobManager);

      tajoMasterClientService = new TajoMasterClientService(context);
      addIfService(tajoMasterClientService);
View Full Code Here

    @Override
    public BoolProto killQuery(RpcController controller, KillQueryRequest request) throws ServiceException {
      try {
        context.getSessionManager().touch(request.getSessionId().getId());
        QueryId queryId = new QueryId(request.getQueryId());
        QueryJobManager queryJobManager = context.getQueryJobManager();
        queryJobManager.getEventHandler().handle(new QueryJobEvent(QueryJobEvent.Type.QUERY_JOB_KILL,
            new QueryInfo(queryId)));
        return BOOL_TRUE;
      } catch (Throwable t) {
        throw new ServiceException(t);
      }
View Full Code Here

TOP

Related Classes of org.apache.tajo.master.querymaster.QueryJobManager

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.