Examples of CoprocessorRpcChannel


Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

    // Make it not retry forever
    configuration.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
    Table table = new HTable(configuration, TEST_TABLE);

    try {
      CoprocessorRpcChannel protocol = table.coprocessorService(ROWS[0]);

      TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface service =
          TestRpcServiceProtos.TestProtobufRpcProto.newBlockingStub(protocol);

      service.error(null, TestProtos.EmptyRequestProto.getDefaultInstance());
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

                         final String bulkToken,
                         final byte[] startRow) throws IOException {
    // we never want to send a batch of HFiles to all regions, thus cannot call
    // HTable#coprocessorService methods that take start and end rowkeys; see HBASE-9639
    try {
      CoprocessorRpcChannel channel = table.coprocessorService(startRow);
      SecureBulkLoadProtos.SecureBulkLoadService instance =
          ProtobufUtil.newServiceStub(SecureBulkLoadProtos.SecureBulkLoadService.class, channel);

      SecureBulkLoadProtos.DelegationToken protoDT =
          SecureBulkLoadProtos.DelegationToken.newBuilder().build();
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

                         final String bulkToken,
                         final byte[] startRow) throws IOException {
    // we never want to send a batch of HFiles to all regions, thus cannot call
    // HTable#coprocessorService methods that take start and end rowkeys; see HBASE-9639
    try {
      CoprocessorRpcChannel channel = table.coprocessorService(startRow);
      SecureBulkLoadProtos.SecureBulkLoadService instance =
          ProtobufUtil.newServiceStub(SecureBulkLoadProtos.SecureBulkLoadService.class, channel);

      SecureBulkLoadProtos.DelegationToken protoDT =
          SecureBulkLoadProtos.DelegationToken.newBuilder().build();
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

  @Test
  public void testDoubleScan() throws Throwable {
    prepareTestData();

    CoprocessorRpcChannel channel = table.coprocessorService(ROW);
    RowProcessorEndpoint.FriendsOfFriendsProcessor processor =
        new RowProcessorEndpoint.FriendsOfFriendsProcessor(ROW, A);
    RowProcessorService.BlockingInterface service =
        RowProcessorService.newBlockingStub(channel);
    ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

      }
    }
  }

  private int incrementCounter(Table table) throws Throwable {
    CoprocessorRpcChannel channel = table.coprocessorService(ROW);
    RowProcessorEndpoint.IncrementCounterProcessor processor =
        new RowProcessorEndpoint.IncrementCounterProcessor(ROW);
    RowProcessorService.BlockingInterface service =
        RowProcessorService.newBlockingStub(channel);
    ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

      }
    }
  }

  private void swapRows(Table table) throws Throwable {
    CoprocessorRpcChannel channel = table.coprocessorService(ROW);
    RowProcessorEndpoint.RowSwapProcessor processor =
        new RowProcessorEndpoint.RowSwapProcessor(ROW, ROW2);
    RowProcessorService.BlockingInterface service =
        RowProcessorService.newBlockingStub(channel);
    ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

  }

  @Test
  public void testTimeout() throws Throwable {
    prepareTestData();
    CoprocessorRpcChannel channel = table.coprocessorService(ROW);
    RowProcessorEndpoint.TimeoutProcessor processor =
        new RowProcessorEndpoint.TimeoutProcessor(ROW);
    RowProcessorService.BlockingInterface service =
        RowProcessorService.newBlockingStub(channel);
    ProcessRequest request = RowProcessorClient.getRowProcessorPB(processor);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

    MutateRowsRequest.Builder mrmBuilder = MutateRowsRequest.newBuilder();
    mrmBuilder.addMutationRequest(m1);
    mrmBuilder.addMutationRequest(m2);
    MutateRowsRequest mrm = mrmBuilder.build();
    CoprocessorRpcChannel channel = t.coprocessorService(ROW);
    MultiRowMutationService.BlockingInterface service =
       MultiRowMutationService.newBlockingStub(channel);
    service.mutateRows(null, mrm);
    Get g = new Get(ROW);
    Result r = t.get(g);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

    MutateRowsRequest.Builder mrmBuilder = MutateRowsRequest.newBuilder();
    mrmBuilder.addMutationRequest(m1);
    mrmBuilder.addMutationRequest(m2);
    MutateRowsRequest mrm = mrmBuilder.build();
    CoprocessorRpcChannel channel = t.coprocessorService(ROW);
    MultiRowMutationService.BlockingInterface service =
       MultiRowMutationService.newBlockingStub(channel);
    service.mutateRows(null, mrm);
    Get g = new Get(ROW);
    Result r = t.get(g);
View Full Code Here

Examples of org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel

  public static Token<AuthenticationTokenIdentifier> obtainToken(
      Configuration conf) throws IOException {
    HTable meta = null;
    try {
      meta = new HTable(conf, TableName.META_TABLE_NAME);
      CoprocessorRpcChannel rpcChannel = meta.coprocessorService(HConstants.EMPTY_START_ROW);
      AuthenticationProtos.AuthenticationService.BlockingInterface service =
          AuthenticationProtos.AuthenticationService.newBlockingStub(rpcChannel);
      AuthenticationProtos.GetAuthenticationTokenResponse response = service.getAuthenticationToken(null,
          AuthenticationProtos.GetAuthenticationTokenRequest.getDefaultInstance());
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.