Package org.apache.tajo.rpc

Examples of org.apache.tajo.rpc.AsyncRpcClient$ProxyRpcChannel


      // initialize MasterWorkerProtocol as an actual task owner.
      this.client =
          taskOwner.doAs(new PrivilegedExceptionAction<AsyncRpcClient>() {
            @Override
            public AsyncRpcClient run() throws Exception {
              return new AsyncRpcClient(TajoWorkerProtocol.class, masterAddr);
            }
          });
      this.master = client.getStub();

      this.executionBlockId = executionBlockId;
View Full Code Here


    context.getEventHandler().handle(new QueryEvent(context.getQueryId(), QueryEventType.INIT_COMPLETED));
  }

  private void assignExecutionBlock(ExecutionBlockId executionBlockId, Container container) {
    AsyncRpcClient tajoWorkerRpc = null;
    try {
      InetSocketAddress myAddr= context.getQueryMasterContext().getWorkerContext()
          .getTajoWorkerManagerService().getBindAddr();

      InetSocketAddress addr = new InetSocketAddress(container.getNodeId().getHost(), container.getNodeId().getPort());
      tajoWorkerRpc = new AsyncRpcClient(TajoWorkerProtocol.class, addr);
      TajoWorkerProtocol.TajoWorkerProtocolService tajoWorkerRpcClient = tajoWorkerRpc.getStub();

      TajoWorkerProtocol.RunExecutionBlockRequestProto request =
          TajoWorkerProtocol.RunExecutionBlockRequestProto.newBuilder()
              .setExecutionBlockId(executionBlockId.toString())
              .setQueryMasterHost(myAddr.getHostName())
View Full Code Here

    LOG.info("Connecting to TajoMaster (" + tajoMasterAddrString +")");
    this.tajoMasterAddress = NetUtils.createSocketAddr(tajoMasterAddrString);

    while(true) {
      try {
        tajoMasterRpc = new AsyncRpcClient(TajoMasterProtocol.class, this.tajoMasterAddress);
        tajoMasterRpcClient = tajoMasterRpc.getStub();
        break;
      } catch (Exception e) {
        LOG.error("Can't connect to TajoMaster[" + NetUtils.normalizeInetSocketAddress(tajoMasterAddress) + "], "
            + e.getMessage(), e);
View Full Code Here

        queryInfo.getQueryMasterResource().getAllocatedHost() != null) {
      InetSocketAddress addr = NetUtils.createSocketAddr(
          queryInfo.getQueryMasterHost() + ":" + queryInfo.getQueryMasterPort());
      LOG.info("Connect to QueryMaster:" + addr);
      //TODO Get Connection from pool
      queryMasterRpc = new AsyncRpcClient(TajoWorkerProtocol.class, addr);
      queryMasterRpcClient = queryMasterRpc.getStub();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.rpc.AsyncRpcClient$ProxyRpcChannel

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.