Package org.apache.hadoop.hbase.client

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


        rowCountVal += result.getSecond();
      }
    }
    StdCallback stdCallback = new StdCallback();
    HTable table = new HTable(conf, tableName);
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(),
        new Batch.Call<AggregateProtocol, Pair<List<S>, Long>>() {
          @Override
          public Pair<List<S>, Long> call(AggregateProtocol instance)
              throws IOException {
View Full Code Here


        sumWeights = ci.add(sumWeights, result.get(1));
      }
    }
    StdCallback stdCallback = new StdCallback();
    HTable table = new HTable(conf, tableName);
    table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(), scan
        .getStopRow(),
        new Batch.Call<AggregateProtocol, List<S>>() {
          @Override
          public List<S> call(AggregateProtocol instance)
              throws IOException {
View Full Code Here

    }
    MaxCallBack aMaxCallBack = new MaxCallBack();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      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

    }
    MinCallBack minCallBack = new MinCallBack();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      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

    }
    RowNumCallback rowNum = new RowNumCallback();
    HTable table = null;
    try {
      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

    }
    SumCallBack sumCallBack = new SumCallBack();
    HTable table = null;
    try {
      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

    }
    AvgCallBack avgCallBack = new AvgCallBack();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(),
          scan.getStopRow(),
          new Batch.Call<AggregateProtocol, Pair<S, Long>>() {
            @Override
            public Pair<S, Long> call(AggregateProtocol instance)
                throws IOException {
View Full Code Here

    }
    StdCallback stdCallback = new StdCallback();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(),
          scan.getStopRow(),
          new Batch.Call<AggregateProtocol, Pair<List<S>, Long>>() {
            @Override
            public Pair<List<S>, Long> call(AggregateProtocol instance)
                throws IOException {
View Full Code Here

    }
    StdCallback stdCallback = new StdCallback();
    HTable table = null;
    try {
      table = new HTable(conf, tableName);
      table.coprocessorExec(AggregateProtocol.class, scan.getStartRow(),
          scan.getStopRow(), new Batch.Call<AggregateProtocol, List<S>>() {
            @Override
            public List<S> call(AggregateProtocol instance) throws IOException {
              return instance.getMedian(ci, scan);
            }
View Full Code Here

        new Get(ROW_A), new Get(ROW_B), new Get(ROW_C));

    Batch.Call<PingProtocol,String> call =  Batch.forMethod(PingProtocol.class,
        "ping");
    Map<byte[],String> results =
        table.coprocessorExec(PingProtocol.class, ROW_A, ROW_C, call);


    verifyRegionResults(table, results, ROW_A);
    verifyRegionResults(table, results, ROW_B);
    verifyRegionResults(table, results, ROW_C);
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.