Examples of QueryId


Examples of org.apache.drill.exec.proto.UserBitShared.QueryId

    this.bee = bee;
  }

  public QueryId submitWork(UserClientConnection connection, RunQuery query){
    UUID uuid = UUID.randomUUID();
    QueryId id = QueryId.newBuilder().setPart1(uuid.getMostSignificantBits()).setPart2(uuid.getLeastSignificantBits()).build();
    Foreman foreman = new Foreman(bee, bee.getContext(), connection, id, query);
    bee.addNewForeman(foreman);
    return id;
  }
View Full Code Here

Examples of org.apache.tajo.QueryId

    ClientProtos.SubmitQueryResponse response = client.executeQuery(statement);
    if (response == null) {
      sout.println("response is null");
    } else if (response.getResultCode() == ClientProtos.ResultCode.OK) {
      if (response.getIsForwarded()) {
        QueryId queryId = new QueryId(response.getQueryId());
        try {
          waitForQueryCompleted(queryId);
        } finally {
          client.closeQuery(queryId);
        }
View Full Code Here

Examples of org.apache.tajo.QueryId

  private String errorText;
  private String queryMasterHost;
  private int queryMasterPort;

  public QueryStatus(GetQueryStatusResponse proto) {
    queryId = new QueryId(proto.getQueryId());
    state = proto.getState();
    progress = proto.getProgress();
    submitTime = proto.getSubmitTime();
    finishTime = proto.getFinishTime();
    hasResult = proto.getHasResult();
View Full Code Here

Examples of org.apache.tajo.QueryId

        LOG.debug("Received QueryHeartbeat:" + request.getTajoWorkerHost() + ":" + request.getTajoWorkerPort());
      }

      TajoMasterProtocol.TajoHeartbeatResponse.ResponseCommand command = null;
      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);
View Full Code Here

Examples of org.apache.tajo.QueryId

        workerResource.setMemoryMBSlots(eachWorkerResource.getMemoryMBSlots());
        workerResource.setDiskSlots(eachWorkerResource.getDiskSlots());

        LOG.info("releaseWorkerResource:" + workerResource);
        context.getResourceManager().releaseWorkerResource(
            new QueryId(eachWorkerResource.getExecutionBlockId().getQueryId()),
            workerResource);
      }
      done.run(BOOL_TRUE);
    }
View Full Code Here

Examples of org.apache.tajo.QueryId

    }

    @Override
    public void stopQueryMaster(RpcController controller, TajoIdProtos.QueryIdProto request,
                                RpcCallback<BoolProto> done) {
      context.getQueryJobManager().stopQuery(new QueryId(request));
      done.run(BOOL_TRUE);
    }
View Full Code Here

Examples of org.apache.tajo.QueryId

  private String errorText;
  private String queryMasterHost;
  private int queryMasterPort;

  public QueryStatus(GetQueryStatusResponse proto) {
    queryId = new QueryId(proto.getQueryId());
    state = proto.getState();
    progress = proto.getProgress();
    submitTime = proto.getSubmitTime();
    initTime = proto.getInitTime();
    finishTime = proto.getFinishTime();
View Full Code Here

Examples of org.apache.tajo.QueryId

    @Override
    public ClientProtos.GetQueryResultResponse getQueryResult(
            RpcController controller,
            ClientProtos.GetQueryResultRequest request) throws ServiceException {
      QueryId queryId = new QueryId(request.getQueryId());
      Query query = workerContext.getQueryMaster().getQuery(queryId);

      ClientProtos.GetQueryResultResponse.Builder builder = ClientProtos.GetQueryResultResponse.newBuilder();

      if(query == null) {
View Full Code Here

Examples of org.apache.tajo.QueryId

    public ClientProtos.GetQueryStatusResponse getQueryStatus(
            RpcController controller,
            ClientProtos.GetQueryStatusRequest request) throws ServiceException {
      ClientProtos.GetQueryStatusResponse.Builder builder
              = ClientProtos.GetQueryStatusResponse.newBuilder();
      QueryId queryId = new QueryId(request.getQueryId());

      builder.setQueryId(request.getQueryId());

      if (queryId.equals(QueryIdFactory.NULL_QUERY_ID)) {
        builder.setResultCode(ClientProtos.ResultCode.OK);
        builder.setState(TajoProtos.QueryState.QUERY_SUCCEEDED);
      } else {
        QueryMasterTask queryMasterTask = workerContext.getQueryMaster().getQueryMasterTask(queryId);
        builder.setResultCode(ClientProtos.ResultCode.OK);
View Full Code Here

Examples of org.apache.tajo.QueryId

    @Override
    public PrimitiveProtos.BoolProto killQuery (
            RpcController controller,
            TajoIdProtos.QueryIdProto request) throws ServiceException {
      final QueryId queryId = new QueryId(request);
      LOG.info("Stop Query:" + queryId);
      Thread t = new Thread() {
        public void run() {
          workerContext.getQueryMaster().getContext().stopQuery(queryId);
        }
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.