Examples of EchoResponseProto


Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

        TestProtos.EmptyRequestProto.newBuilder().build();
      stub.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = stub.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        stub.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

        TestProtos.EmptyRequestProto.newBuilder().build();
      stub.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = stub.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        stub.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

      EmptyRequestProto emptyRequest = EmptyRequestProto.newBuilder().build();
      client.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = client.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        client.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

        TestProtos.EmptyRequestProto.newBuilder().build();
      stub.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = stub.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        stub.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

        TestProtos.EmptyRequestProto.newBuilder().build();
      stub.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = stub.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        stub.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.protobuf.generated.TestProtos.EchoResponseProto

        TestProtos.EmptyRequestProto.newBuilder().build();
      stub.ping(null, emptyRequest);

      // Test echo method
      EchoRequestProto echoRequest = EchoRequestProto.newBuilder().setMessage("hello").build();
      EchoResponseProto echoResponse = stub.echo(null, echoRequest);
      Assert.assertEquals(echoResponse.getMessage(), "hello");

      // Test error method - error should be thrown as RemoteException
      try {
        stub.error(null, emptyRequest);
        Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto

    client.ping(null, emptyRequest);
   
    // Test echo method
    EchoRequestProto echoRequest = EchoRequestProto.newBuilder()
        .setMessage("hello").build();
    EchoResponseProto echoResponse = client.echo(null, echoRequest);
    Assert.assertEquals(echoResponse.getMessage(), "hello");
   
    // Test error method - error should be thrown as RemoteException
    try {
      client.error(null, emptyRequest);
      Assert.fail("Expected exception is not thrown");
View Full Code Here

Examples of org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto

    client.ping2(null, emptyRequest);
   
    // Test echo method
    EchoRequestProto echoRequest = EchoRequestProto.newBuilder()
        .setMessage("hello").build();
    EchoResponseProto echoResponse = client.echo2(null, echoRequest);
    Assert.assertEquals(echoResponse.getMessage(), "hello");
   
    // Ensure RPC metrics are updated
    MetricsRecordBuilder rpcMetrics = getMetrics(server.getRpcMetrics().name());
    assertCounterGt("RpcQueueTimeNumOps", 0L, rpcMetrics);
    assertCounterGt("RpcProcessingTimeNumOps", 0L, rpcMetrics);
View Full Code Here

Examples of org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto

        @Override
        public String doEcho(String msg) throws Exception {
          EchoRequestProto req = EchoRequestProto.newBuilder()
            .setMessage(msg)
            .build();
          EchoResponseProto responseProto = proxy.echo(null, req);
          return responseProto.getMessage();
        }
      };
    } else if (opts.rpcEngine == WritableRpcEngine.class) {
      final TestProtocol proxy = (TestProtocol)RPC.getProxy(
          TestProtocol.class, TestProtocol.versionID, addr, conf);
View Full Code Here

Examples of org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto

    client.ping(null, emptyRequest);
   
    // Test echo method
    EchoRequestProto echoRequest = EchoRequestProto.newBuilder()
        .setMessage("hello").build();
    EchoResponseProto echoResponse = client.echo(null, echoRequest);
    Assert.assertEquals(echoResponse.getMessage(), "hello");
   
    // Test error method - error should be thrown as RemoteException
    try {
      client.error(null, emptyRequest);
      Assert.fail("Expected exception is not thrown");
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.