Package org.apache.tajo.rpc.test.DummyProtocol.DummyProtocolService

Examples of org.apache.tajo.rpc.test.DummyProtocol.DummyProtocolService.BlockingInterface


    SumResponse response =
    new ServerCallable<SumResponse>(RpcConnectionPool.newPool(new TajoConf(), getClass().getSimpleName(), 2),
        server.getListenAddress(), DummyProtocol.class, false) {
      @Override
      public SumResponse call(NettyClientBase client) throws Exception {
        BlockingInterface stub2 = client.getStub();
        SumResponse response1 = stub2.sum(null, request);
        return response1;
      }
    }.withRetries();

    assertTrue(8.15d == response.getResult());

    response =
        new ServerCallable<SumResponse>(RpcConnectionPool.newPool(new TajoConf(), getClass().getSimpleName(), 2),
            server.getListenAddress(), DummyProtocol.class, false) {
          @Override
          public SumResponse call(NettyClientBase client) throws Exception {
            BlockingInterface stub2 = client.getStub();
            SumResponse response1 = stub2.sum(null, request);
            return response1;
          }
        }.withoutRetries();

    assertTrue(8.15d == response.getResult());
View Full Code Here


  @Test
  public void testUnresolvedAddress() throws Exception {
    String hostAndPort = NetUtils.normalizeInetSocketAddress(server.getListenAddress());
    BlockingRpcClient client = new BlockingRpcClient(DummyProtocol.class, NetUtils.createUnresolved(hostAndPort));
    BlockingInterface stub = client.getStub();

    EchoMessage message = EchoMessage.newBuilder()
        .setMessage(MESSAGE).build();
    EchoMessage response2 = stub.echo(null, message);
    assertEquals(MESSAGE, response2.getMessage());
    client.close();
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.rpc.test.DummyProtocol.DummyProtocolService.BlockingInterface

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.