Package org.apache.tajo.rpc

Examples of org.apache.tajo.rpc.CallFuture


    }
    stopped.set(true);

    LOG.info("Stopping QueryMasterTask:" + queryId);

    CallFuture future = new CallFuture();
    queryMasterContext.getWorkerContext().getTajoMasterRpcClient()
        .stopQueryMaster(null, queryId.getProto(), future);
    try {
      future.get(3, TimeUnit.SECONDS);
    } catch (Throwable t) {
      LOG.warn(t);
    }

    super.stop();
View Full Code Here


      queryMasterTask = queryMasterTasks.remove(queryId);
      finishedQueryMasterTasks.put(queryId, queryMasterTask);

      if(queryMasterTask != null) {
        TajoHeartbeat queryHeartbeat = buildTajoHeartBeat(queryMasterTask);
        CallFuture future = new CallFuture();
        workerContext.getTajoMasterRpcClient().heartbeat(null, queryHeartbeat, future);
        try {
          future.get(3, TimeUnit.SECONDS);
        } catch (Throwable e) {
          LOG.warn(e);
        }

        try {
View Full Code Here

      return;
    }

    LOG.info("Stopping QueryMasterTask:" + queryId);

    CallFuture future = new CallFuture();

    RpcConnectionPool connPool = RpcConnectionPool.getPool(queryMasterContext.getConf());
    NettyClientBase tmClient = null;
    try {
      tmClient = connPool.getConnection(queryMasterContext.getWorkerContext().getTajoMasterAddress(),
          TajoMasterProtocol.class, true);
      TajoMasterProtocol.TajoMasterProtocolService masterClientService = tmClient.getStub();
      masterClientService.stopQueryMaster(null, queryId.getProto(), future);
    } catch (Exception e) {
      LOG.error(e.getMessage(), e);
    } finally {
      connPool.releaseConnection(tmClient);
    }

    try {
      future.get(3, TimeUnit.SECONDS);
    } catch (Throwable t) {
      LOG.warn(t);
    }

    super.stop();
View Full Code Here

TOP

Related Classes of org.apache.tajo.rpc.CallFuture

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.