Examples of coprocessorExec()


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

        new Batch.Call<BulkDeleteProtocol, BulkDeleteResponse>() {
      public BulkDeleteResponse call(BulkDeleteProtocol instance) throws IOException {
        return instance.delete(scan, deleteType, timeStamp, rowBatchSize);
      }
    };
    Map<byte[], BulkDeleteResponse> result = ht.coprocessorExec(BulkDeleteProtocol.class,
        scan.getStartRow(), scan.getStopRow(), callable);
    for (BulkDeleteResponse response : result.values()) {
      noOfDeletedRows += response.getRowsDeleted();
    }
    return noOfDeletedRows;
View Full Code Here

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

        new Batch.Call<BulkDeleteProtocol, BulkDeleteResponse>() {
      public BulkDeleteResponse call(BulkDeleteProtocol instance) throws IOException {
        return instance.delete(scan, DeleteType.VERSION, null, 500);
      }
    };
    Map<byte[], BulkDeleteResponse> result = ht.coprocessorExec(BulkDeleteProtocol.class,
        scan.getStartRow(), scan.getStopRow(), callable);
    for (BulkDeleteResponse response : result.values()) {
      noOfDeletedRows += response.getRowsDeleted();
      noOfVersionsDeleted += response.getVersionsDeleted();
    }
View Full Code Here

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

  public void testAggregation() throws Throwable {
    HTable table = new HTable(util.getConfiguration(), TEST_TABLE);
    Map<byte[], Long> results;

    // scan: for all regions
    results = table
        .coprocessorExec(ColumnAggregationProtocol.class,
                         ROWS[rowSeperator1 - 1], ROWS[rowSeperator2 + 1],
                         new Batch.Call<ColumnAggregationProtocol, Long>() {
                           public Long call(ColumnAggregationProtocol instance)
                               throws IOException {
View Full Code Here

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

    assertEquals("Invalid result", sumResult, expectedResult);

    results.clear();

    // scan: for region 2 and region 3
    results = table
        .coprocessorExec(ColumnAggregationProtocol.class,
                         ROWS[rowSeperator1 + 1], ROWS[rowSeperator2 + 1],
                         new Batch.Call<ColumnAggregationProtocol, Long>() {
                           public Long call(ColumnAggregationProtocol instance)
                               throws IOException {
View Full Code Here

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

    }
    RowNumCallback rowNum = new RowNumCallback();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      table.coprocessorExec(WaspAggregateProtocol.class, scan.getStartRow(),
          scan.getStopRow(), new Batch.Call<WaspAggregateProtocol, Long>() {
            @Override
            public Long call(WaspAggregateProtocol instance) throws IOException {
              return instance.getRowNum(ci, scan);
            }
View Full Code Here

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

    }
    SumCallBack sumCallBack = new SumCallBack();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      table.coprocessorExec(WaspAggregateProtocol.class, scan.getStartRow(),
          scan.getStopRow(), new Batch.Call<WaspAggregateProtocol, S>() {
            @Override
            public S call(WaspAggregateProtocol instance) throws IOException {
              return instance.getSum(ci, scan, qualifier);
            }
View Full Code Here

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

      public synchronized void update(byte[] region, byte[] row, R result) {
        max = ci.compare(max, result) < 0 ? result : max;
      }
    }
    MaxCallBack aMaxCallBack = new MaxCallBack();
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(), new Batch.Call<AggregateProtocol, R>() {
      @Override
      public R call(AggregateProtocol instance) throws IOException {
        return instance.getMax(ci, scan);
      }
View Full Code Here

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

        min = (min == null || ci.compare(result, min) < 0) ? result : min;
      }
    }
    HTable table = new HTable(conf, tableName);
    MinCallBack minCallBack = new MinCallBack();
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(), new Batch.Call<AggregateProtocol, R>() {

      @Override
      public R call(AggregateProtocol instance) throws IOException {
        return instance.getMin(ci, scan);
View Full Code Here

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

        rowCountL.addAndGet(result.longValue());
      }
    }
    RowNumCallback rowNum = new RowNumCallback();
    HTable table = new HTable(conf, tableName);
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(), new Batch.Call<AggregateProtocol, Long>() {
      @Override
      public Long call(AggregateProtocol instance) throws IOException {
        return instance.getRowNum(ci, scan);
      }
View Full Code Here

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

        sumVal = ci.add(sumVal, result);
      }
    }
    SumCallBack sumCallBack = new SumCallBack();
    HTable table = new HTable(conf, tableName);
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(), new Batch.Call<AggregateProtocol, S>() {
      @Override
      public S call(AggregateProtocol instance) throws IOException {
        return instance.getSum(ci, scan);
      }
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.