Examples of coprocessorService()


Examples of org.apache.hadoop.hbase.client.HTable.coprocessorService()

    User TABLE_ADMIN = User.createUserForTesting(conf, "UserA", new String[0]);

    // Grant TABLE ADMIN privs
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      BlockingRpcChannel service = acl.coprocessorService(TEST_TABLE.getTableName().getName());
      AccessControlService.BlockingInterface protocol =
        AccessControlService.newBlockingStub(service);
      ProtobufUtil.grant(protocol, TABLE_ADMIN.getShortName(), TEST_TABLE.getTableName(),
        null, null, Permission.Action.ADMIN);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTable.coprocessorService()

    User TABLE_ADMIN = User.createUserForTesting(conf, "TestUser", new String[0]);

    // Grant TABLE ADMIN privs
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      BlockingRpcChannel service = acl.coprocessorService(TEST_TABLE.getTableName().getName());
      AccessControlService.BlockingInterface protocol =
        AccessControlService.newBlockingStub(service);
      ProtobufUtil.grant(protocol, TABLE_ADMIN.getShortName(), TEST_TABLE.getTableName(),
        null, null, Permission.Action.ADMIN);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hbase.client.HTableInterface.coprocessorService()

                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_STATE_BYTES, PIndexState.DISABLE.getSerializedBytes());
                put.add(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP_BYTES, PDataType.LONG.toBytes(minTimeStamp));
                final List<Mutation> tableMetadata = Collections.<Mutation>singletonList(put);
               
                final Map<byte[], MetaDataResponse> results =
                        systemTable.coprocessorService(MetaDataService.class, indexTableKey, indexTableKey,
                            new Batch.Call<MetaDataService, MetaDataResponse>() {
                                @Override
                                public MetaDataResponse call(MetaDataService instance) throws IOException {
                                    ServerRpcController controller = new ServerRpcController();
                                    BlockingRpcCallback<MetaDataResponse> rpcCallback =
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Table.coprocessorService()

      p.add(TEST_FAMILY, TEST_COLUMN, iBytes);
      table.put(p);
    }

    final ExampleProtos.CountRequest request = ExampleProtos.CountRequest.getDefaultInstance();
    Map<byte[],Long> results = table.coprocessorService(ExampleProtos.RowCountService.class,
        null, null,
        new Batch.Call<ExampleProtos.RowCountService,Long>() {
          public Long call(ExampleProtos.RowCountService counter) throws IOException {
            ServerRpcController controller = new ServerRpcController();
            BlockingRpcCallback<ExampleProtos.CountResponse> rpcCallback =
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.