@Test public void testCoprocessorServiceLoadedByMaster() throws Throwable { TEST_UTIL.getAdmin().coprocessorService().callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(MASTER).build(), DummyResponse.getDefaultInstance()); assertEquals(MASTER, DummyCoprocessorService.numMaster); TEST_UTIL.getAdmin().coprocessorService( TEST_UTIL.getHBaseCluster().getRegionServer(0).getServerName()).callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(REGIONSERVER).build(), DummyResponse.getDefaultInstance()); assertEquals(REGIONSERVER, DummyCoprocessorService.numRegionServer); TEST_UTIL.getConnection().getTable(TableName.valueOf("hbase:meta")).batchCoprocessorService( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), DummyRequest.newBuilder().setValue(REGION).build(), Bytes.toBytes(""), Bytes.toBytes(""), DummyResponse.getDefaultInstance()); assertEquals(REGION, DummyCoprocessorService.numRegion); } }
@Test public void testCoprocessorServiceLoadedByMaster() throws Throwable { TEST_UTIL.getAdmin().coprocessorService().callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(MASTER).build(), DummyResponse.getDefaultInstance()); assertEquals(MASTER, DummyCoprocessorService.numMaster); TEST_UTIL.getAdmin().coprocessorService( TEST_UTIL.getHBaseCluster().getRegionServer(0).getServerName()).callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(REGIONSERVER).build(), DummyResponse.getDefaultInstance()); assertEquals(REGIONSERVER, DummyCoprocessorService.numRegionServer); TEST_UTIL.getConnection().getTable(TableName.valueOf("hbase:meta")).batchCoprocessorService( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), DummyRequest.newBuilder().setValue(REGION).build(), Bytes.toBytes(""), Bytes.toBytes(""), DummyResponse.getDefaultInstance()); assertEquals(REGION, DummyCoprocessorService.numRegion); } }
@Test public void testCoprocessorServiceLoadedByMaster() throws Throwable { TEST_UTIL.getAdmin().coprocessorService().callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(MASTER).build(), DummyResponse.getDefaultInstance()); assertEquals(MASTER, DummyCoprocessorService.numMaster); TEST_UTIL.getAdmin().coprocessorService( TEST_UTIL.getHBaseCluster().getRegionServer(0).getServerName()).callBlockingMethod( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), null, DummyRequest.newBuilder().setValue(REGIONSERVER).build(), DummyResponse.getDefaultInstance()); assertEquals(REGIONSERVER, DummyCoprocessorService.numRegionServer); TEST_UTIL.getConnection().getTable(TableName.valueOf("hbase:meta")).batchCoprocessorService( DummyCoprocessorService.getDescriptor().findMethodByName("dummyCall"), DummyRequest.newBuilder().setValue(REGION).build(), Bytes.toBytes(""), Bytes.toBytes(""), DummyResponse.getDefaultInstance()); assertEquals(REGION, DummyCoprocessorService.numRegion); } }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest other) { if (other == org.apache.hadoop.hbase.coprocessor.protobuf.generated.DummyRegionServerEndpointProtos.DummyRequest.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }