hbase 协处理器,实现group by,distinct函数

在使用hbase时,发现没有自带的group by ,  distinct等函数,所以手写了两个,写的并不好,大神们见谅!

本来想用phoenix来做查询的,但因为对hbase还不熟悉,先熟悉一下,后续再说!废话不多说了,开始吧!

1、先准备一个proto,用于定义rpc的接口。名称:ExpandAggregationProtos.proto

 1 // This file contains protocol buffers that are used for filters
 2 
 3 option java_package = "com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service";
 4 
 5 option java_outer_classname = "ExpandAggregationProtos";
 6 
 7 option java_generic_services = true;
 8 
 9 option java_generate_equals_and_hash = true;
10 
11 option optimize_for = SPEED;
12 
13 
14 import "Client.proto";
15 // This file contains protocol buffers that are used for comparators (e.g. in filters)
16 
17 service ExpandAggregationService {
18     
19     rpc getGroupSumAndCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
20     
21     rpc getSumAndCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
22     
23     rpc getSumAndDistictCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
24     
25     rpc getSum(ExpandAggregationRequest) returns(ExpandAggregationResponse);
26     
27     rpc getCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
28     
29     rpc getDistictCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
30     
31     rpc getCountAndDistictCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
32     
33     rpc getGroupAndSum(ExpandAggregationRequest) returns(ExpandAggregationResponse);
34     
35     rpc getGroupAndCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
36     
37     rpc getGroupAndDistictCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
38     
39     rpc getGroupAndDistictCountAndCount(ExpandAggregationRequest) returns(ExpandAggregationResponse);
40 }
41 
42 
43 message ExpandAggregationRequest {
44     repeated ExpandCell sumColumns = 1;
45     repeated ExpandCell groupColumns = 2;
46     repeated ExpandCell countColumns = 3;
47     repeated ExpandCell distictColumns = 4;
48     required Scan scan = 5;
49     
50 }
51 
52 
53 
54 message ExpandAggregationResponse {
55     repeated ExpandRow results = 1;
56 }
57 
58 message ExpandCell{
59     optional bytes family = 1;
60     optional bytes qualify = 2;
61     optional bytes value = 3;
62     repeated bytes distinctValues = 5;
63     optional bytes class_name = 4; 
64 }
65 
66 message ExpandRow{
67     repeated ExpandCell keys = 1;
68     repeated ExpandCell values = 2;
69 }

 

2、生成proto对应的java文件。

protoc.exe --proto_path=IMPORT_PATH --java_out=DST_DIR  path/to/file.proto   

这里面换成当前的文件就可以了, IMPORT_PATH是habse对应proto的文件路径,先得把habse的这些文件导出来,然后才能运行上面的命令!

对于不知道protobuf的同鞋,自己找找资料吧,这里不做讲述!

生成后的文件:

   1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
   2 // source: ExpandAggregationService.proto
   3 
   4 package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service;
   5 
   6 public final class ExpandAggregationProtos {
   7   private ExpandAggregationProtos() {}
   8   public static void registerAllExtensions(
   9       com.google.protobuf.ExtensionRegistry registry) {
  10   }
  11   public interface ExpandAggregationRequestOrBuilder
  12       extends com.google.protobuf.MessageOrBuilder {
  13 
  14     // repeated .ExpandCell sumColumns = 1;
  15     /**
  16      * <code>repeated .ExpandCell sumColumns = 1;</code>
  17      */
  18     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
  19         getSumColumnsList();
  20     /**
  21      * <code>repeated .ExpandCell sumColumns = 1;</code>
  22      */
  23     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getSumColumns(int index);
  24     /**
  25      * <code>repeated .ExpandCell sumColumns = 1;</code>
  26      */
  27     int getSumColumnsCount();
  28     /**
  29      * <code>repeated .ExpandCell sumColumns = 1;</code>
  30      */
  31     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
  32         getSumColumnsOrBuilderList();
  33     /**
  34      * <code>repeated .ExpandCell sumColumns = 1;</code>
  35      */
  36     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getSumColumnsOrBuilder(
  37         int index);
  38 
  39     // repeated .ExpandCell groupColumns = 2;
  40     /**
  41      * <code>repeated .ExpandCell groupColumns = 2;</code>
  42      */
  43     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
  44         getGroupColumnsList();
  45     /**
  46      * <code>repeated .ExpandCell groupColumns = 2;</code>
  47      */
  48     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getGroupColumns(int index);
  49     /**
  50      * <code>repeated .ExpandCell groupColumns = 2;</code>
  51      */
  52     int getGroupColumnsCount();
  53     /**
  54      * <code>repeated .ExpandCell groupColumns = 2;</code>
  55      */
  56     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
  57         getGroupColumnsOrBuilderList();
  58     /**
  59      * <code>repeated .ExpandCell groupColumns = 2;</code>
  60      */
  61     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getGroupColumnsOrBuilder(
  62         int index);
  63 
  64     // repeated .ExpandCell countColumns = 3;
  65     /**
  66      * <code>repeated .ExpandCell countColumns = 3;</code>
  67      */
  68     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
  69         getCountColumnsList();
  70     /**
  71      * <code>repeated .ExpandCell countColumns = 3;</code>
  72      */
  73     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getCountColumns(int index);
  74     /**
  75      * <code>repeated .ExpandCell countColumns = 3;</code>
  76      */
  77     int getCountColumnsCount();
  78     /**
  79      * <code>repeated .ExpandCell countColumns = 3;</code>
  80      */
  81     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
  82         getCountColumnsOrBuilderList();
  83     /**
  84      * <code>repeated .ExpandCell countColumns = 3;</code>
  85      */
  86     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getCountColumnsOrBuilder(
  87         int index);
  88 
  89     // repeated .ExpandCell distictColumns = 4;
  90     /**
  91      * <code>repeated .ExpandCell distictColumns = 4;</code>
  92      */
  93     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
  94         getDistictColumnsList();
  95     /**
  96      * <code>repeated .ExpandCell distictColumns = 4;</code>
  97      */
  98     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getDistictColumns(int index);
  99     /**
 100      * <code>repeated .ExpandCell distictColumns = 4;</code>
 101      */
 102     int getDistictColumnsCount();
 103     /**
 104      * <code>repeated .ExpandCell distictColumns = 4;</code>
 105      */
 106     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
 107         getDistictColumnsOrBuilderList();
 108     /**
 109      * <code>repeated .ExpandCell distictColumns = 4;</code>
 110      */
 111     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getDistictColumnsOrBuilder(
 112         int index);
 113 
 114     // required .Scan scan = 5;
 115     /**
 116      * <code>required .Scan scan = 5;</code>
 117      */
 118     boolean hasScan();
 119     /**
 120      * <code>required .Scan scan = 5;</code>
 121      */
 122     org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan();
 123     /**
 124      * <code>required .Scan scan = 5;</code>
 125      */
 126     org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder();
 127   }
 128   /**
 129    * Protobuf type {@code ExpandAggregationRequest}
 130    */
 131   public static final class ExpandAggregationRequest extends
 132       com.google.protobuf.GeneratedMessage
 133       implements ExpandAggregationRequestOrBuilder {
 134     // Use ExpandAggregationRequest.newBuilder() to construct.
 135     private ExpandAggregationRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
 136       super(builder);
 137       this.unknownFields = builder.getUnknownFields();
 138     }
 139     private ExpandAggregationRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
 140 
 141     private static final ExpandAggregationRequest defaultInstance;
 142     public static ExpandAggregationRequest getDefaultInstance() {
 143       return defaultInstance;
 144     }
 145 
 146     public ExpandAggregationRequest getDefaultInstanceForType() {
 147       return defaultInstance;
 148     }
 149 
 150     private final com.google.protobuf.UnknownFieldSet unknownFields;
 151     @java.lang.Override
 152     public final com.google.protobuf.UnknownFieldSet
 153         getUnknownFields() {
 154       return this.unknownFields;
 155     }
 156     private ExpandAggregationRequest(
 157         com.google.protobuf.CodedInputStream input,
 158         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 159         throws com.google.protobuf.InvalidProtocolBufferException {
 160       initFields();
 161       int mutable_bitField0_ = 0;
 162       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
 163           com.google.protobuf.UnknownFieldSet.newBuilder();
 164       try {
 165         boolean done = false;
 166         while (!done) {
 167           int tag = input.readTag();
 168           switch (tag) {
 169             case 0:
 170               done = true;
 171               break;
 172             default: {
 173               if (!parseUnknownField(input, unknownFields,
 174                                      extensionRegistry, tag)) {
 175                 done = true;
 176               }
 177               break;
 178             }
 179             case 10: {
 180               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
 181                 sumColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
 182                 mutable_bitField0_ |= 0x00000001;
 183               }
 184               sumColumns_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
 185               break;
 186             }
 187             case 18: {
 188               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
 189                 groupColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
 190                 mutable_bitField0_ |= 0x00000002;
 191               }
 192               groupColumns_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
 193               break;
 194             }
 195             case 26: {
 196               if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
 197                 countColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
 198                 mutable_bitField0_ |= 0x00000004;
 199               }
 200               countColumns_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
 201               break;
 202             }
 203             case 34: {
 204               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
 205                 distictColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
 206                 mutable_bitField0_ |= 0x00000008;
 207               }
 208               distictColumns_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
 209               break;
 210             }
 211             case 42: {
 212               org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null;
 213               if (((bitField0_ & 0x00000001) == 0x00000001)) {
 214                 subBuilder = scan_.toBuilder();
 215               }
 216               scan_ = input.readMessage(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.PARSER, extensionRegistry);
 217               if (subBuilder != null) {
 218                 subBuilder.mergeFrom(scan_);
 219                 scan_ = subBuilder.buildPartial();
 220               }
 221               bitField0_ |= 0x00000001;
 222               break;
 223             }
 224           }
 225         }
 226       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
 227         throw e.setUnfinishedMessage(this);
 228       } catch (java.io.IOException e) {
 229         throw new com.google.protobuf.InvalidProtocolBufferException(
 230             e.getMessage()).setUnfinishedMessage(this);
 231       } finally {
 232         if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
 233           sumColumns_ = java.util.Collections.unmodifiableList(sumColumns_);
 234         }
 235         if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
 236           groupColumns_ = java.util.Collections.unmodifiableList(groupColumns_);
 237         }
 238         if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
 239           countColumns_ = java.util.Collections.unmodifiableList(countColumns_);
 240         }
 241         if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
 242           distictColumns_ = java.util.Collections.unmodifiableList(distictColumns_);
 243         }
 244         this.unknownFields = unknownFields.build();
 245         makeExtensionsImmutable();
 246       }
 247     }
 248     public static final com.google.protobuf.Descriptors.Descriptor
 249         getDescriptor() {
 250       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationRequest_descriptor;
 251     }
 252 
 253     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
 254         internalGetFieldAccessorTable() {
 255       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationRequest_fieldAccessorTable
 256           .ensureFieldAccessorsInitialized(
 257               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.Builder.class);
 258     }
 259 
 260     public static com.google.protobuf.Parser<ExpandAggregationRequest> PARSER =
 261         new com.google.protobuf.AbstractParser<ExpandAggregationRequest>() {
 262       public ExpandAggregationRequest parsePartialFrom(
 263           com.google.protobuf.CodedInputStream input,
 264           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 265           throws com.google.protobuf.InvalidProtocolBufferException {
 266         return new ExpandAggregationRequest(input, extensionRegistry);
 267       }
 268     };
 269 
 270     @java.lang.Override
 271     public com.google.protobuf.Parser<ExpandAggregationRequest> getParserForType() {
 272       return PARSER;
 273     }
 274 
 275     private int bitField0_;
 276     // repeated .ExpandCell sumColumns = 1;
 277     public static final int SUMCOLUMNS_FIELD_NUMBER = 1;
 278     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> sumColumns_;
 279     /**
 280      * <code>repeated .ExpandCell sumColumns = 1;</code>
 281      */
 282     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getSumColumnsList() {
 283       return sumColumns_;
 284     }
 285     /**
 286      * <code>repeated .ExpandCell sumColumns = 1;</code>
 287      */
 288     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
 289         getSumColumnsOrBuilderList() {
 290       return sumColumns_;
 291     }
 292     /**
 293      * <code>repeated .ExpandCell sumColumns = 1;</code>
 294      */
 295     public int getSumColumnsCount() {
 296       return sumColumns_.size();
 297     }
 298     /**
 299      * <code>repeated .ExpandCell sumColumns = 1;</code>
 300      */
 301     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getSumColumns(int index) {
 302       return sumColumns_.get(index);
 303     }
 304     /**
 305      * <code>repeated .ExpandCell sumColumns = 1;</code>
 306      */
 307     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getSumColumnsOrBuilder(
 308         int index) {
 309       return sumColumns_.get(index);
 310     }
 311 
 312     // repeated .ExpandCell groupColumns = 2;
 313     public static final int GROUPCOLUMNS_FIELD_NUMBER = 2;
 314     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> groupColumns_;
 315     /**
 316      * <code>repeated .ExpandCell groupColumns = 2;</code>
 317      */
 318     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getGroupColumnsList() {
 319       return groupColumns_;
 320     }
 321     /**
 322      * <code>repeated .ExpandCell groupColumns = 2;</code>
 323      */
 324     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
 325         getGroupColumnsOrBuilderList() {
 326       return groupColumns_;
 327     }
 328     /**
 329      * <code>repeated .ExpandCell groupColumns = 2;</code>
 330      */
 331     public int getGroupColumnsCount() {
 332       return groupColumns_.size();
 333     }
 334     /**
 335      * <code>repeated .ExpandCell groupColumns = 2;</code>
 336      */
 337     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getGroupColumns(int index) {
 338       return groupColumns_.get(index);
 339     }
 340     /**
 341      * <code>repeated .ExpandCell groupColumns = 2;</code>
 342      */
 343     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getGroupColumnsOrBuilder(
 344         int index) {
 345       return groupColumns_.get(index);
 346     }
 347 
 348     // repeated .ExpandCell countColumns = 3;
 349     public static final int COUNTCOLUMNS_FIELD_NUMBER = 3;
 350     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> countColumns_;
 351     /**
 352      * <code>repeated .ExpandCell countColumns = 3;</code>
 353      */
 354     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getCountColumnsList() {
 355       return countColumns_;
 356     }
 357     /**
 358      * <code>repeated .ExpandCell countColumns = 3;</code>
 359      */
 360     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
 361         getCountColumnsOrBuilderList() {
 362       return countColumns_;
 363     }
 364     /**
 365      * <code>repeated .ExpandCell countColumns = 3;</code>
 366      */
 367     public int getCountColumnsCount() {
 368       return countColumns_.size();
 369     }
 370     /**
 371      * <code>repeated .ExpandCell countColumns = 3;</code>
 372      */
 373     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getCountColumns(int index) {
 374       return countColumns_.get(index);
 375     }
 376     /**
 377      * <code>repeated .ExpandCell countColumns = 3;</code>
 378      */
 379     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getCountColumnsOrBuilder(
 380         int index) {
 381       return countColumns_.get(index);
 382     }
 383 
 384     // repeated .ExpandCell distictColumns = 4;
 385     public static final int DISTICTCOLUMNS_FIELD_NUMBER = 4;
 386     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> distictColumns_;
 387     /**
 388      * <code>repeated .ExpandCell distictColumns = 4;</code>
 389      */
 390     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getDistictColumnsList() {
 391       return distictColumns_;
 392     }
 393     /**
 394      * <code>repeated .ExpandCell distictColumns = 4;</code>
 395      */
 396     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
 397         getDistictColumnsOrBuilderList() {
 398       return distictColumns_;
 399     }
 400     /**
 401      * <code>repeated .ExpandCell distictColumns = 4;</code>
 402      */
 403     public int getDistictColumnsCount() {
 404       return distictColumns_.size();
 405     }
 406     /**
 407      * <code>repeated .ExpandCell distictColumns = 4;</code>
 408      */
 409     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getDistictColumns(int index) {
 410       return distictColumns_.get(index);
 411     }
 412     /**
 413      * <code>repeated .ExpandCell distictColumns = 4;</code>
 414      */
 415     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getDistictColumnsOrBuilder(
 416         int index) {
 417       return distictColumns_.get(index);
 418     }
 419 
 420     // required .Scan scan = 5;
 421     public static final int SCAN_FIELD_NUMBER = 5;
 422     private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_;
 423     /**
 424      * <code>required .Scan scan = 5;</code>
 425      */
 426     public boolean hasScan() {
 427       return ((bitField0_ & 0x00000001) == 0x00000001);
 428     }
 429     /**
 430      * <code>required .Scan scan = 5;</code>
 431      */
 432     public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
 433       return scan_;
 434     }
 435     /**
 436      * <code>required .Scan scan = 5;</code>
 437      */
 438     public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
 439       return scan_;
 440     }
 441 
 442     private void initFields() {
 443       sumColumns_ = java.util.Collections.emptyList();
 444       groupColumns_ = java.util.Collections.emptyList();
 445       countColumns_ = java.util.Collections.emptyList();
 446       distictColumns_ = java.util.Collections.emptyList();
 447       scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
 448     }
 449     private byte memoizedIsInitialized = -1;
 450     public final boolean isInitialized() {
 451       byte isInitialized = memoizedIsInitialized;
 452       if (isInitialized != -1) return isInitialized == 1;
 453 
 454       if (!hasScan()) {
 455         memoizedIsInitialized = 0;
 456         return false;
 457       }
 458       if (!getScan().isInitialized()) {
 459         memoizedIsInitialized = 0;
 460         return false;
 461       }
 462       memoizedIsInitialized = 1;
 463       return true;
 464     }
 465 
 466     public void writeTo(com.google.protobuf.CodedOutputStream output)
 467                         throws java.io.IOException {
 468       getSerializedSize();
 469       for (int i = 0; i < sumColumns_.size(); i++) {
 470         output.writeMessage(1, sumColumns_.get(i));
 471       }
 472       for (int i = 0; i < groupColumns_.size(); i++) {
 473         output.writeMessage(2, groupColumns_.get(i));
 474       }
 475       for (int i = 0; i < countColumns_.size(); i++) {
 476         output.writeMessage(3, countColumns_.get(i));
 477       }
 478       for (int i = 0; i < distictColumns_.size(); i++) {
 479         output.writeMessage(4, distictColumns_.get(i));
 480       }
 481       if (((bitField0_ & 0x00000001) == 0x00000001)) {
 482         output.writeMessage(5, scan_);
 483       }
 484       getUnknownFields().writeTo(output);
 485     }
 486 
 487     private int memoizedSerializedSize = -1;
 488     public int getSerializedSize() {
 489       int size = memoizedSerializedSize;
 490       if (size != -1) return size;
 491 
 492       size = 0;
 493       for (int i = 0; i < sumColumns_.size(); i++) {
 494         size += com.google.protobuf.CodedOutputStream
 495           .computeMessageSize(1, sumColumns_.get(i));
 496       }
 497       for (int i = 0; i < groupColumns_.size(); i++) {
 498         size += com.google.protobuf.CodedOutputStream
 499           .computeMessageSize(2, groupColumns_.get(i));
 500       }
 501       for (int i = 0; i < countColumns_.size(); i++) {
 502         size += com.google.protobuf.CodedOutputStream
 503           .computeMessageSize(3, countColumns_.get(i));
 504       }
 505       for (int i = 0; i < distictColumns_.size(); i++) {
 506         size += com.google.protobuf.CodedOutputStream
 507           .computeMessageSize(4, distictColumns_.get(i));
 508       }
 509       if (((bitField0_ & 0x00000001) == 0x00000001)) {
 510         size += com.google.protobuf.CodedOutputStream
 511           .computeMessageSize(5, scan_);
 512       }
 513       size += getUnknownFields().getSerializedSize();
 514       memoizedSerializedSize = size;
 515       return size;
 516     }
 517 
 518     private static final long serialVersionUID = 0L;
 519     @java.lang.Override
 520     protected java.lang.Object writeReplace()
 521         throws java.io.ObjectStreamException {
 522       return super.writeReplace();
 523     }
 524 
 525     @java.lang.Override
 526     public boolean equals(final java.lang.Object obj) {
 527       if (obj == this) {
 528        return true;
 529       }
 530       if (!(obj instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)) {
 531         return super.equals(obj);
 532       }
 533       com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest other = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest) obj;
 534 
 535       boolean result = true;
 536       result = result && getSumColumnsList()
 537           .equals(other.getSumColumnsList());
 538       result = result && getGroupColumnsList()
 539           .equals(other.getGroupColumnsList());
 540       result = result && getCountColumnsList()
 541           .equals(other.getCountColumnsList());
 542       result = result && getDistictColumnsList()
 543           .equals(other.getDistictColumnsList());
 544       result = result && (hasScan() == other.hasScan());
 545       if (hasScan()) {
 546         result = result && getScan()
 547             .equals(other.getScan());
 548       }
 549       result = result &&
 550           getUnknownFields().equals(other.getUnknownFields());
 551       return result;
 552     }
 553 
 554     private int memoizedHashCode = 0;
 555     @java.lang.Override
 556     public int hashCode() {
 557       if (memoizedHashCode != 0) {
 558         return memoizedHashCode;
 559       }
 560       int hash = 41;
 561       hash = (19 * hash) + getDescriptorForType().hashCode();
 562       if (getSumColumnsCount() > 0) {
 563         hash = (37 * hash) + SUMCOLUMNS_FIELD_NUMBER;
 564         hash = (53 * hash) + getSumColumnsList().hashCode();
 565       }
 566       if (getGroupColumnsCount() > 0) {
 567         hash = (37 * hash) + GROUPCOLUMNS_FIELD_NUMBER;
 568         hash = (53 * hash) + getGroupColumnsList().hashCode();
 569       }
 570       if (getCountColumnsCount() > 0) {
 571         hash = (37 * hash) + COUNTCOLUMNS_FIELD_NUMBER;
 572         hash = (53 * hash) + getCountColumnsList().hashCode();
 573       }
 574       if (getDistictColumnsCount() > 0) {
 575         hash = (37 * hash) + DISTICTCOLUMNS_FIELD_NUMBER;
 576         hash = (53 * hash) + getDistictColumnsList().hashCode();
 577       }
 578       if (hasScan()) {
 579         hash = (37 * hash) + SCAN_FIELD_NUMBER;
 580         hash = (53 * hash) + getScan().hashCode();
 581       }
 582       hash = (29 * hash) + getUnknownFields().hashCode();
 583       memoizedHashCode = hash;
 584       return hash;
 585     }
 586 
 587     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 588         com.google.protobuf.ByteString data)
 589         throws com.google.protobuf.InvalidProtocolBufferException {
 590       return PARSER.parseFrom(data);
 591     }
 592     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 593         com.google.protobuf.ByteString data,
 594         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 595         throws com.google.protobuf.InvalidProtocolBufferException {
 596       return PARSER.parseFrom(data, extensionRegistry);
 597     }
 598     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(byte[] data)
 599         throws com.google.protobuf.InvalidProtocolBufferException {
 600       return PARSER.parseFrom(data);
 601     }
 602     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 603         byte[] data,
 604         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 605         throws com.google.protobuf.InvalidProtocolBufferException {
 606       return PARSER.parseFrom(data, extensionRegistry);
 607     }
 608     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(java.io.InputStream input)
 609         throws java.io.IOException {
 610       return PARSER.parseFrom(input);
 611     }
 612     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 613         java.io.InputStream input,
 614         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 615         throws java.io.IOException {
 616       return PARSER.parseFrom(input, extensionRegistry);
 617     }
 618     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseDelimitedFrom(java.io.InputStream input)
 619         throws java.io.IOException {
 620       return PARSER.parseDelimitedFrom(input);
 621     }
 622     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseDelimitedFrom(
 623         java.io.InputStream input,
 624         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 625         throws java.io.IOException {
 626       return PARSER.parseDelimitedFrom(input, extensionRegistry);
 627     }
 628     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 629         com.google.protobuf.CodedInputStream input)
 630         throws java.io.IOException {
 631       return PARSER.parseFrom(input);
 632     }
 633     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parseFrom(
 634         com.google.protobuf.CodedInputStream input,
 635         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 636         throws java.io.IOException {
 637       return PARSER.parseFrom(input, extensionRegistry);
 638     }
 639 
 640     public static Builder newBuilder() { return Builder.create(); }
 641     public Builder newBuilderForType() { return newBuilder(); }
 642     public static Builder newBuilder(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest prototype) {
 643       return newBuilder().mergeFrom(prototype);
 644     }
 645     public Builder toBuilder() { return newBuilder(this); }
 646 
 647     @java.lang.Override
 648     protected Builder newBuilderForType(
 649         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
 650       Builder builder = new Builder(parent);
 651       return builder;
 652     }
 653     /**
 654      * Protobuf type {@code ExpandAggregationRequest}
 655      */
 656     public static final class Builder extends
 657         com.google.protobuf.GeneratedMessage.Builder<Builder>
 658        implements com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequestOrBuilder {
 659       public static final com.google.protobuf.Descriptors.Descriptor
 660           getDescriptor() {
 661         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationRequest_descriptor;
 662       }
 663 
 664       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
 665           internalGetFieldAccessorTable() {
 666         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationRequest_fieldAccessorTable
 667             .ensureFieldAccessorsInitialized(
 668                 com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.Builder.class);
 669       }
 670 
 671       // Construct using com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.newBuilder()
 672       private Builder() {
 673         maybeForceBuilderInitialization();
 674       }
 675 
 676       private Builder(
 677           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
 678         super(parent);
 679         maybeForceBuilderInitialization();
 680       }
 681       private void maybeForceBuilderInitialization() {
 682         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
 683           getSumColumnsFieldBuilder();
 684           getGroupColumnsFieldBuilder();
 685           getCountColumnsFieldBuilder();
 686           getDistictColumnsFieldBuilder();
 687           getScanFieldBuilder();
 688         }
 689       }
 690       private static Builder create() {
 691         return new Builder();
 692       }
 693 
 694       public Builder clear() {
 695         super.clear();
 696         if (sumColumnsBuilder_ == null) {
 697           sumColumns_ = java.util.Collections.emptyList();
 698           bitField0_ = (bitField0_ & ~0x00000001);
 699         } else {
 700           sumColumnsBuilder_.clear();
 701         }
 702         if (groupColumnsBuilder_ == null) {
 703           groupColumns_ = java.util.Collections.emptyList();
 704           bitField0_ = (bitField0_ & ~0x00000002);
 705         } else {
 706           groupColumnsBuilder_.clear();
 707         }
 708         if (countColumnsBuilder_ == null) {
 709           countColumns_ = java.util.Collections.emptyList();
 710           bitField0_ = (bitField0_ & ~0x00000004);
 711         } else {
 712           countColumnsBuilder_.clear();
 713         }
 714         if (distictColumnsBuilder_ == null) {
 715           distictColumns_ = java.util.Collections.emptyList();
 716           bitField0_ = (bitField0_ & ~0x00000008);
 717         } else {
 718           distictColumnsBuilder_.clear();
 719         }
 720         if (scanBuilder_ == null) {
 721           scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
 722         } else {
 723           scanBuilder_.clear();
 724         }
 725         bitField0_ = (bitField0_ & ~0x00000010);
 726         return this;
 727       }
 728 
 729       public Builder clone() {
 730         return create().mergeFrom(buildPartial());
 731       }
 732 
 733       public com.google.protobuf.Descriptors.Descriptor
 734           getDescriptorForType() {
 735         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationRequest_descriptor;
 736       }
 737 
 738       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest getDefaultInstanceForType() {
 739         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
 740       }
 741 
 742       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest build() {
 743         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest result = buildPartial();
 744         if (!result.isInitialized()) {
 745           throw newUninitializedMessageException(result);
 746         }
 747         return result;
 748       }
 749 
 750       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest buildPartial() {
 751         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest result = new com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest(this);
 752         int from_bitField0_ = bitField0_;
 753         int to_bitField0_ = 0;
 754         if (sumColumnsBuilder_ == null) {
 755           if (((bitField0_ & 0x00000001) == 0x00000001)) {
 756             sumColumns_ = java.util.Collections.unmodifiableList(sumColumns_);
 757             bitField0_ = (bitField0_ & ~0x00000001);
 758           }
 759           result.sumColumns_ = sumColumns_;
 760         } else {
 761           result.sumColumns_ = sumColumnsBuilder_.build();
 762         }
 763         if (groupColumnsBuilder_ == null) {
 764           if (((bitField0_ & 0x00000002) == 0x00000002)) {
 765             groupColumns_ = java.util.Collections.unmodifiableList(groupColumns_);
 766             bitField0_ = (bitField0_ & ~0x00000002);
 767           }
 768           result.groupColumns_ = groupColumns_;
 769         } else {
 770           result.groupColumns_ = groupColumnsBuilder_.build();
 771         }
 772         if (countColumnsBuilder_ == null) {
 773           if (((bitField0_ & 0x00000004) == 0x00000004)) {
 774             countColumns_ = java.util.Collections.unmodifiableList(countColumns_);
 775             bitField0_ = (bitField0_ & ~0x00000004);
 776           }
 777           result.countColumns_ = countColumns_;
 778         } else {
 779           result.countColumns_ = countColumnsBuilder_.build();
 780         }
 781         if (distictColumnsBuilder_ == null) {
 782           if (((bitField0_ & 0x00000008) == 0x00000008)) {
 783             distictColumns_ = java.util.Collections.unmodifiableList(distictColumns_);
 784             bitField0_ = (bitField0_ & ~0x00000008);
 785           }
 786           result.distictColumns_ = distictColumns_;
 787         } else {
 788           result.distictColumns_ = distictColumnsBuilder_.build();
 789         }
 790         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
 791           to_bitField0_ |= 0x00000001;
 792         }
 793         if (scanBuilder_ == null) {
 794           result.scan_ = scan_;
 795         } else {
 796           result.scan_ = scanBuilder_.build();
 797         }
 798         result.bitField0_ = to_bitField0_;
 799         onBuilt();
 800         return result;
 801       }
 802 
 803       public Builder mergeFrom(com.google.protobuf.Message other) {
 804         if (other instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest) {
 805           return mergeFrom((com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)other);
 806         } else {
 807           super.mergeFrom(other);
 808           return this;
 809         }
 810       }
 811 
 812       public Builder mergeFrom(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest other) {
 813         if (other == com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance()) return this;
 814         if (sumColumnsBuilder_ == null) {
 815           if (!other.sumColumns_.isEmpty()) {
 816             if (sumColumns_.isEmpty()) {
 817               sumColumns_ = other.sumColumns_;
 818               bitField0_ = (bitField0_ & ~0x00000001);
 819             } else {
 820               ensureSumColumnsIsMutable();
 821               sumColumns_.addAll(other.sumColumns_);
 822             }
 823             onChanged();
 824           }
 825         } else {
 826           if (!other.sumColumns_.isEmpty()) {
 827             if (sumColumnsBuilder_.isEmpty()) {
 828               sumColumnsBuilder_.dispose();
 829               sumColumnsBuilder_ = null;
 830               sumColumns_ = other.sumColumns_;
 831               bitField0_ = (bitField0_ & ~0x00000001);
 832               sumColumnsBuilder_ = 
 833                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
 834                    getSumColumnsFieldBuilder() : null;
 835             } else {
 836               sumColumnsBuilder_.addAllMessages(other.sumColumns_);
 837             }
 838           }
 839         }
 840         if (groupColumnsBuilder_ == null) {
 841           if (!other.groupColumns_.isEmpty()) {
 842             if (groupColumns_.isEmpty()) {
 843               groupColumns_ = other.groupColumns_;
 844               bitField0_ = (bitField0_ & ~0x00000002);
 845             } else {
 846               ensureGroupColumnsIsMutable();
 847               groupColumns_.addAll(other.groupColumns_);
 848             }
 849             onChanged();
 850           }
 851         } else {
 852           if (!other.groupColumns_.isEmpty()) {
 853             if (groupColumnsBuilder_.isEmpty()) {
 854               groupColumnsBuilder_.dispose();
 855               groupColumnsBuilder_ = null;
 856               groupColumns_ = other.groupColumns_;
 857               bitField0_ = (bitField0_ & ~0x00000002);
 858               groupColumnsBuilder_ = 
 859                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
 860                    getGroupColumnsFieldBuilder() : null;
 861             } else {
 862               groupColumnsBuilder_.addAllMessages(other.groupColumns_);
 863             }
 864           }
 865         }
 866         if (countColumnsBuilder_ == null) {
 867           if (!other.countColumns_.isEmpty()) {
 868             if (countColumns_.isEmpty()) {
 869               countColumns_ = other.countColumns_;
 870               bitField0_ = (bitField0_ & ~0x00000004);
 871             } else {
 872               ensureCountColumnsIsMutable();
 873               countColumns_.addAll(other.countColumns_);
 874             }
 875             onChanged();
 876           }
 877         } else {
 878           if (!other.countColumns_.isEmpty()) {
 879             if (countColumnsBuilder_.isEmpty()) {
 880               countColumnsBuilder_.dispose();
 881               countColumnsBuilder_ = null;
 882               countColumns_ = other.countColumns_;
 883               bitField0_ = (bitField0_ & ~0x00000004);
 884               countColumnsBuilder_ = 
 885                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
 886                    getCountColumnsFieldBuilder() : null;
 887             } else {
 888               countColumnsBuilder_.addAllMessages(other.countColumns_);
 889             }
 890           }
 891         }
 892         if (distictColumnsBuilder_ == null) {
 893           if (!other.distictColumns_.isEmpty()) {
 894             if (distictColumns_.isEmpty()) {
 895               distictColumns_ = other.distictColumns_;
 896               bitField0_ = (bitField0_ & ~0x00000008);
 897             } else {
 898               ensureDistictColumnsIsMutable();
 899               distictColumns_.addAll(other.distictColumns_);
 900             }
 901             onChanged();
 902           }
 903         } else {
 904           if (!other.distictColumns_.isEmpty()) {
 905             if (distictColumnsBuilder_.isEmpty()) {
 906               distictColumnsBuilder_.dispose();
 907               distictColumnsBuilder_ = null;
 908               distictColumns_ = other.distictColumns_;
 909               bitField0_ = (bitField0_ & ~0x00000008);
 910               distictColumnsBuilder_ = 
 911                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
 912                    getDistictColumnsFieldBuilder() : null;
 913             } else {
 914               distictColumnsBuilder_.addAllMessages(other.distictColumns_);
 915             }
 916           }
 917         }
 918         if (other.hasScan()) {
 919           mergeScan(other.getScan());
 920         }
 921         this.mergeUnknownFields(other.getUnknownFields());
 922         return this;
 923       }
 924 
 925       public final boolean isInitialized() {
 926         if (!hasScan()) {
 927           
 928           return false;
 929         }
 930         if (!getScan().isInitialized()) {
 931           
 932           return false;
 933         }
 934         return true;
 935       }
 936 
 937       public Builder mergeFrom(
 938           com.google.protobuf.CodedInputStream input,
 939           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
 940           throws java.io.IOException {
 941         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest parsedMessage = null;
 942         try {
 943           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
 944         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
 945           parsedMessage = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest) e.getUnfinishedMessage();
 946           throw e;
 947         } finally {
 948           if (parsedMessage != null) {
 949             mergeFrom(parsedMessage);
 950           }
 951         }
 952         return this;
 953       }
 954       private int bitField0_;
 955 
 956       // repeated .ExpandCell sumColumns = 1;
 957       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> sumColumns_ =
 958         java.util.Collections.emptyList();
 959       private void ensureSumColumnsIsMutable() {
 960         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
 961           sumColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(sumColumns_);
 962           bitField0_ |= 0x00000001;
 963          }
 964       }
 965 
 966       private com.google.protobuf.RepeatedFieldBuilder<
 967           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> sumColumnsBuilder_;
 968 
 969       /**
 970        * <code>repeated .ExpandCell sumColumns = 1;</code>
 971        */
 972       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getSumColumnsList() {
 973         if (sumColumnsBuilder_ == null) {
 974           return java.util.Collections.unmodifiableList(sumColumns_);
 975         } else {
 976           return sumColumnsBuilder_.getMessageList();
 977         }
 978       }
 979       /**
 980        * <code>repeated .ExpandCell sumColumns = 1;</code>
 981        */
 982       public int getSumColumnsCount() {
 983         if (sumColumnsBuilder_ == null) {
 984           return sumColumns_.size();
 985         } else {
 986           return sumColumnsBuilder_.getCount();
 987         }
 988       }
 989       /**
 990        * <code>repeated .ExpandCell sumColumns = 1;</code>
 991        */
 992       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getSumColumns(int index) {
 993         if (sumColumnsBuilder_ == null) {
 994           return sumColumns_.get(index);
 995         } else {
 996           return sumColumnsBuilder_.getMessage(index);
 997         }
 998       }
 999       /**
1000        * <code>repeated .ExpandCell sumColumns = 1;</code>
1001        */
1002       public Builder setSumColumns(
1003           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1004         if (sumColumnsBuilder_ == null) {
1005           if (value == null) {
1006             throw new NullPointerException();
1007           }
1008           ensureSumColumnsIsMutable();
1009           sumColumns_.set(index, value);
1010           onChanged();
1011         } else {
1012           sumColumnsBuilder_.setMessage(index, value);
1013         }
1014         return this;
1015       }
1016       /**
1017        * <code>repeated .ExpandCell sumColumns = 1;</code>
1018        */
1019       public Builder setSumColumns(
1020           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1021         if (sumColumnsBuilder_ == null) {
1022           ensureSumColumnsIsMutable();
1023           sumColumns_.set(index, builderForValue.build());
1024           onChanged();
1025         } else {
1026           sumColumnsBuilder_.setMessage(index, builderForValue.build());
1027         }
1028         return this;
1029       }
1030       /**
1031        * <code>repeated .ExpandCell sumColumns = 1;</code>
1032        */
1033       public Builder addSumColumns(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1034         if (sumColumnsBuilder_ == null) {
1035           if (value == null) {
1036             throw new NullPointerException();
1037           }
1038           ensureSumColumnsIsMutable();
1039           sumColumns_.add(value);
1040           onChanged();
1041         } else {
1042           sumColumnsBuilder_.addMessage(value);
1043         }
1044         return this;
1045       }
1046       /**
1047        * <code>repeated .ExpandCell sumColumns = 1;</code>
1048        */
1049       public Builder addSumColumns(
1050           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1051         if (sumColumnsBuilder_ == null) {
1052           if (value == null) {
1053             throw new NullPointerException();
1054           }
1055           ensureSumColumnsIsMutable();
1056           sumColumns_.add(index, value);
1057           onChanged();
1058         } else {
1059           sumColumnsBuilder_.addMessage(index, value);
1060         }
1061         return this;
1062       }
1063       /**
1064        * <code>repeated .ExpandCell sumColumns = 1;</code>
1065        */
1066       public Builder addSumColumns(
1067           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1068         if (sumColumnsBuilder_ == null) {
1069           ensureSumColumnsIsMutable();
1070           sumColumns_.add(builderForValue.build());
1071           onChanged();
1072         } else {
1073           sumColumnsBuilder_.addMessage(builderForValue.build());
1074         }
1075         return this;
1076       }
1077       /**
1078        * <code>repeated .ExpandCell sumColumns = 1;</code>
1079        */
1080       public Builder addSumColumns(
1081           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1082         if (sumColumnsBuilder_ == null) {
1083           ensureSumColumnsIsMutable();
1084           sumColumns_.add(index, builderForValue.build());
1085           onChanged();
1086         } else {
1087           sumColumnsBuilder_.addMessage(index, builderForValue.build());
1088         }
1089         return this;
1090       }
1091       /**
1092        * <code>repeated .ExpandCell sumColumns = 1;</code>
1093        */
1094       public Builder addAllSumColumns(
1095           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
1096         if (sumColumnsBuilder_ == null) {
1097           ensureSumColumnsIsMutable();
1098           super.addAll(values, sumColumns_);
1099           onChanged();
1100         } else {
1101           sumColumnsBuilder_.addAllMessages(values);
1102         }
1103         return this;
1104       }
1105       /**
1106        * <code>repeated .ExpandCell sumColumns = 1;</code>
1107        */
1108       public Builder clearSumColumns() {
1109         if (sumColumnsBuilder_ == null) {
1110           sumColumns_ = java.util.Collections.emptyList();
1111           bitField0_ = (bitField0_ & ~0x00000001);
1112           onChanged();
1113         } else {
1114           sumColumnsBuilder_.clear();
1115         }
1116         return this;
1117       }
1118       /**
1119        * <code>repeated .ExpandCell sumColumns = 1;</code>
1120        */
1121       public Builder removeSumColumns(int index) {
1122         if (sumColumnsBuilder_ == null) {
1123           ensureSumColumnsIsMutable();
1124           sumColumns_.remove(index);
1125           onChanged();
1126         } else {
1127           sumColumnsBuilder_.remove(index);
1128         }
1129         return this;
1130       }
1131       /**
1132        * <code>repeated .ExpandCell sumColumns = 1;</code>
1133        */
1134       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getSumColumnsBuilder(
1135           int index) {
1136         return getSumColumnsFieldBuilder().getBuilder(index);
1137       }
1138       /**
1139        * <code>repeated .ExpandCell sumColumns = 1;</code>
1140        */
1141       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getSumColumnsOrBuilder(
1142           int index) {
1143         if (sumColumnsBuilder_ == null) {
1144           return sumColumns_.get(index);  } else {
1145           return sumColumnsBuilder_.getMessageOrBuilder(index);
1146         }
1147       }
1148       /**
1149        * <code>repeated .ExpandCell sumColumns = 1;</code>
1150        */
1151       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1152            getSumColumnsOrBuilderList() {
1153         if (sumColumnsBuilder_ != null) {
1154           return sumColumnsBuilder_.getMessageOrBuilderList();
1155         } else {
1156           return java.util.Collections.unmodifiableList(sumColumns_);
1157         }
1158       }
1159       /**
1160        * <code>repeated .ExpandCell sumColumns = 1;</code>
1161        */
1162       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addSumColumnsBuilder() {
1163         return getSumColumnsFieldBuilder().addBuilder(
1164             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1165       }
1166       /**
1167        * <code>repeated .ExpandCell sumColumns = 1;</code>
1168        */
1169       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addSumColumnsBuilder(
1170           int index) {
1171         return getSumColumnsFieldBuilder().addBuilder(
1172             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1173       }
1174       /**
1175        * <code>repeated .ExpandCell sumColumns = 1;</code>
1176        */
1177       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
1178            getSumColumnsBuilderList() {
1179         return getSumColumnsFieldBuilder().getBuilderList();
1180       }
1181       private com.google.protobuf.RepeatedFieldBuilder<
1182           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1183           getSumColumnsFieldBuilder() {
1184         if (sumColumnsBuilder_ == null) {
1185           sumColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1186               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
1187                   sumColumns_,
1188                   ((bitField0_ & 0x00000001) == 0x00000001),
1189                   getParentForChildren(),
1190                   isClean());
1191           sumColumns_ = null;
1192         }
1193         return sumColumnsBuilder_;
1194       }
1195 
1196       // repeated .ExpandCell groupColumns = 2;
1197       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> groupColumns_ =
1198         java.util.Collections.emptyList();
1199       private void ensureGroupColumnsIsMutable() {
1200         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
1201           groupColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(groupColumns_);
1202           bitField0_ |= 0x00000002;
1203          }
1204       }
1205 
1206       private com.google.protobuf.RepeatedFieldBuilder<
1207           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> groupColumnsBuilder_;
1208 
1209       /**
1210        * <code>repeated .ExpandCell groupColumns = 2;</code>
1211        */
1212       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getGroupColumnsList() {
1213         if (groupColumnsBuilder_ == null) {
1214           return java.util.Collections.unmodifiableList(groupColumns_);
1215         } else {
1216           return groupColumnsBuilder_.getMessageList();
1217         }
1218       }
1219       /**
1220        * <code>repeated .ExpandCell groupColumns = 2;</code>
1221        */
1222       public int getGroupColumnsCount() {
1223         if (groupColumnsBuilder_ == null) {
1224           return groupColumns_.size();
1225         } else {
1226           return groupColumnsBuilder_.getCount();
1227         }
1228       }
1229       /**
1230        * <code>repeated .ExpandCell groupColumns = 2;</code>
1231        */
1232       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getGroupColumns(int index) {
1233         if (groupColumnsBuilder_ == null) {
1234           return groupColumns_.get(index);
1235         } else {
1236           return groupColumnsBuilder_.getMessage(index);
1237         }
1238       }
1239       /**
1240        * <code>repeated .ExpandCell groupColumns = 2;</code>
1241        */
1242       public Builder setGroupColumns(
1243           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1244         if (groupColumnsBuilder_ == null) {
1245           if (value == null) {
1246             throw new NullPointerException();
1247           }
1248           ensureGroupColumnsIsMutable();
1249           groupColumns_.set(index, value);
1250           onChanged();
1251         } else {
1252           groupColumnsBuilder_.setMessage(index, value);
1253         }
1254         return this;
1255       }
1256       /**
1257        * <code>repeated .ExpandCell groupColumns = 2;</code>
1258        */
1259       public Builder setGroupColumns(
1260           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1261         if (groupColumnsBuilder_ == null) {
1262           ensureGroupColumnsIsMutable();
1263           groupColumns_.set(index, builderForValue.build());
1264           onChanged();
1265         } else {
1266           groupColumnsBuilder_.setMessage(index, builderForValue.build());
1267         }
1268         return this;
1269       }
1270       /**
1271        * <code>repeated .ExpandCell groupColumns = 2;</code>
1272        */
1273       public Builder addGroupColumns(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1274         if (groupColumnsBuilder_ == null) {
1275           if (value == null) {
1276             throw new NullPointerException();
1277           }
1278           ensureGroupColumnsIsMutable();
1279           groupColumns_.add(value);
1280           onChanged();
1281         } else {
1282           groupColumnsBuilder_.addMessage(value);
1283         }
1284         return this;
1285       }
1286       /**
1287        * <code>repeated .ExpandCell groupColumns = 2;</code>
1288        */
1289       public Builder addGroupColumns(
1290           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1291         if (groupColumnsBuilder_ == null) {
1292           if (value == null) {
1293             throw new NullPointerException();
1294           }
1295           ensureGroupColumnsIsMutable();
1296           groupColumns_.add(index, value);
1297           onChanged();
1298         } else {
1299           groupColumnsBuilder_.addMessage(index, value);
1300         }
1301         return this;
1302       }
1303       /**
1304        * <code>repeated .ExpandCell groupColumns = 2;</code>
1305        */
1306       public Builder addGroupColumns(
1307           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1308         if (groupColumnsBuilder_ == null) {
1309           ensureGroupColumnsIsMutable();
1310           groupColumns_.add(builderForValue.build());
1311           onChanged();
1312         } else {
1313           groupColumnsBuilder_.addMessage(builderForValue.build());
1314         }
1315         return this;
1316       }
1317       /**
1318        * <code>repeated .ExpandCell groupColumns = 2;</code>
1319        */
1320       public Builder addGroupColumns(
1321           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1322         if (groupColumnsBuilder_ == null) {
1323           ensureGroupColumnsIsMutable();
1324           groupColumns_.add(index, builderForValue.build());
1325           onChanged();
1326         } else {
1327           groupColumnsBuilder_.addMessage(index, builderForValue.build());
1328         }
1329         return this;
1330       }
1331       /**
1332        * <code>repeated .ExpandCell groupColumns = 2;</code>
1333        */
1334       public Builder addAllGroupColumns(
1335           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
1336         if (groupColumnsBuilder_ == null) {
1337           ensureGroupColumnsIsMutable();
1338           super.addAll(values, groupColumns_);
1339           onChanged();
1340         } else {
1341           groupColumnsBuilder_.addAllMessages(values);
1342         }
1343         return this;
1344       }
1345       /**
1346        * <code>repeated .ExpandCell groupColumns = 2;</code>
1347        */
1348       public Builder clearGroupColumns() {
1349         if (groupColumnsBuilder_ == null) {
1350           groupColumns_ = java.util.Collections.emptyList();
1351           bitField0_ = (bitField0_ & ~0x00000002);
1352           onChanged();
1353         } else {
1354           groupColumnsBuilder_.clear();
1355         }
1356         return this;
1357       }
1358       /**
1359        * <code>repeated .ExpandCell groupColumns = 2;</code>
1360        */
1361       public Builder removeGroupColumns(int index) {
1362         if (groupColumnsBuilder_ == null) {
1363           ensureGroupColumnsIsMutable();
1364           groupColumns_.remove(index);
1365           onChanged();
1366         } else {
1367           groupColumnsBuilder_.remove(index);
1368         }
1369         return this;
1370       }
1371       /**
1372        * <code>repeated .ExpandCell groupColumns = 2;</code>
1373        */
1374       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getGroupColumnsBuilder(
1375           int index) {
1376         return getGroupColumnsFieldBuilder().getBuilder(index);
1377       }
1378       /**
1379        * <code>repeated .ExpandCell groupColumns = 2;</code>
1380        */
1381       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getGroupColumnsOrBuilder(
1382           int index) {
1383         if (groupColumnsBuilder_ == null) {
1384           return groupColumns_.get(index);  } else {
1385           return groupColumnsBuilder_.getMessageOrBuilder(index);
1386         }
1387       }
1388       /**
1389        * <code>repeated .ExpandCell groupColumns = 2;</code>
1390        */
1391       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1392            getGroupColumnsOrBuilderList() {
1393         if (groupColumnsBuilder_ != null) {
1394           return groupColumnsBuilder_.getMessageOrBuilderList();
1395         } else {
1396           return java.util.Collections.unmodifiableList(groupColumns_);
1397         }
1398       }
1399       /**
1400        * <code>repeated .ExpandCell groupColumns = 2;</code>
1401        */
1402       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addGroupColumnsBuilder() {
1403         return getGroupColumnsFieldBuilder().addBuilder(
1404             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1405       }
1406       /**
1407        * <code>repeated .ExpandCell groupColumns = 2;</code>
1408        */
1409       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addGroupColumnsBuilder(
1410           int index) {
1411         return getGroupColumnsFieldBuilder().addBuilder(
1412             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1413       }
1414       /**
1415        * <code>repeated .ExpandCell groupColumns = 2;</code>
1416        */
1417       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
1418            getGroupColumnsBuilderList() {
1419         return getGroupColumnsFieldBuilder().getBuilderList();
1420       }
1421       private com.google.protobuf.RepeatedFieldBuilder<
1422           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1423           getGroupColumnsFieldBuilder() {
1424         if (groupColumnsBuilder_ == null) {
1425           groupColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1426               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
1427                   groupColumns_,
1428                   ((bitField0_ & 0x00000002) == 0x00000002),
1429                   getParentForChildren(),
1430                   isClean());
1431           groupColumns_ = null;
1432         }
1433         return groupColumnsBuilder_;
1434       }
1435 
1436       // repeated .ExpandCell countColumns = 3;
1437       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> countColumns_ =
1438         java.util.Collections.emptyList();
1439       private void ensureCountColumnsIsMutable() {
1440         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
1441           countColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(countColumns_);
1442           bitField0_ |= 0x00000004;
1443          }
1444       }
1445 
1446       private com.google.protobuf.RepeatedFieldBuilder<
1447           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> countColumnsBuilder_;
1448 
1449       /**
1450        * <code>repeated .ExpandCell countColumns = 3;</code>
1451        */
1452       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getCountColumnsList() {
1453         if (countColumnsBuilder_ == null) {
1454           return java.util.Collections.unmodifiableList(countColumns_);
1455         } else {
1456           return countColumnsBuilder_.getMessageList();
1457         }
1458       }
1459       /**
1460        * <code>repeated .ExpandCell countColumns = 3;</code>
1461        */
1462       public int getCountColumnsCount() {
1463         if (countColumnsBuilder_ == null) {
1464           return countColumns_.size();
1465         } else {
1466           return countColumnsBuilder_.getCount();
1467         }
1468       }
1469       /**
1470        * <code>repeated .ExpandCell countColumns = 3;</code>
1471        */
1472       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getCountColumns(int index) {
1473         if (countColumnsBuilder_ == null) {
1474           return countColumns_.get(index);
1475         } else {
1476           return countColumnsBuilder_.getMessage(index);
1477         }
1478       }
1479       /**
1480        * <code>repeated .ExpandCell countColumns = 3;</code>
1481        */
1482       public Builder setCountColumns(
1483           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1484         if (countColumnsBuilder_ == null) {
1485           if (value == null) {
1486             throw new NullPointerException();
1487           }
1488           ensureCountColumnsIsMutable();
1489           countColumns_.set(index, value);
1490           onChanged();
1491         } else {
1492           countColumnsBuilder_.setMessage(index, value);
1493         }
1494         return this;
1495       }
1496       /**
1497        * <code>repeated .ExpandCell countColumns = 3;</code>
1498        */
1499       public Builder setCountColumns(
1500           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1501         if (countColumnsBuilder_ == null) {
1502           ensureCountColumnsIsMutable();
1503           countColumns_.set(index, builderForValue.build());
1504           onChanged();
1505         } else {
1506           countColumnsBuilder_.setMessage(index, builderForValue.build());
1507         }
1508         return this;
1509       }
1510       /**
1511        * <code>repeated .ExpandCell countColumns = 3;</code>
1512        */
1513       public Builder addCountColumns(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1514         if (countColumnsBuilder_ == null) {
1515           if (value == null) {
1516             throw new NullPointerException();
1517           }
1518           ensureCountColumnsIsMutable();
1519           countColumns_.add(value);
1520           onChanged();
1521         } else {
1522           countColumnsBuilder_.addMessage(value);
1523         }
1524         return this;
1525       }
1526       /**
1527        * <code>repeated .ExpandCell countColumns = 3;</code>
1528        */
1529       public Builder addCountColumns(
1530           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1531         if (countColumnsBuilder_ == null) {
1532           if (value == null) {
1533             throw new NullPointerException();
1534           }
1535           ensureCountColumnsIsMutable();
1536           countColumns_.add(index, value);
1537           onChanged();
1538         } else {
1539           countColumnsBuilder_.addMessage(index, value);
1540         }
1541         return this;
1542       }
1543       /**
1544        * <code>repeated .ExpandCell countColumns = 3;</code>
1545        */
1546       public Builder addCountColumns(
1547           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1548         if (countColumnsBuilder_ == null) {
1549           ensureCountColumnsIsMutable();
1550           countColumns_.add(builderForValue.build());
1551           onChanged();
1552         } else {
1553           countColumnsBuilder_.addMessage(builderForValue.build());
1554         }
1555         return this;
1556       }
1557       /**
1558        * <code>repeated .ExpandCell countColumns = 3;</code>
1559        */
1560       public Builder addCountColumns(
1561           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1562         if (countColumnsBuilder_ == null) {
1563           ensureCountColumnsIsMutable();
1564           countColumns_.add(index, builderForValue.build());
1565           onChanged();
1566         } else {
1567           countColumnsBuilder_.addMessage(index, builderForValue.build());
1568         }
1569         return this;
1570       }
1571       /**
1572        * <code>repeated .ExpandCell countColumns = 3;</code>
1573        */
1574       public Builder addAllCountColumns(
1575           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
1576         if (countColumnsBuilder_ == null) {
1577           ensureCountColumnsIsMutable();
1578           super.addAll(values, countColumns_);
1579           onChanged();
1580         } else {
1581           countColumnsBuilder_.addAllMessages(values);
1582         }
1583         return this;
1584       }
1585       /**
1586        * <code>repeated .ExpandCell countColumns = 3;</code>
1587        */
1588       public Builder clearCountColumns() {
1589         if (countColumnsBuilder_ == null) {
1590           countColumns_ = java.util.Collections.emptyList();
1591           bitField0_ = (bitField0_ & ~0x00000004);
1592           onChanged();
1593         } else {
1594           countColumnsBuilder_.clear();
1595         }
1596         return this;
1597       }
1598       /**
1599        * <code>repeated .ExpandCell countColumns = 3;</code>
1600        */
1601       public Builder removeCountColumns(int index) {
1602         if (countColumnsBuilder_ == null) {
1603           ensureCountColumnsIsMutable();
1604           countColumns_.remove(index);
1605           onChanged();
1606         } else {
1607           countColumnsBuilder_.remove(index);
1608         }
1609         return this;
1610       }
1611       /**
1612        * <code>repeated .ExpandCell countColumns = 3;</code>
1613        */
1614       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getCountColumnsBuilder(
1615           int index) {
1616         return getCountColumnsFieldBuilder().getBuilder(index);
1617       }
1618       /**
1619        * <code>repeated .ExpandCell countColumns = 3;</code>
1620        */
1621       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getCountColumnsOrBuilder(
1622           int index) {
1623         if (countColumnsBuilder_ == null) {
1624           return countColumns_.get(index);  } else {
1625           return countColumnsBuilder_.getMessageOrBuilder(index);
1626         }
1627       }
1628       /**
1629        * <code>repeated .ExpandCell countColumns = 3;</code>
1630        */
1631       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1632            getCountColumnsOrBuilderList() {
1633         if (countColumnsBuilder_ != null) {
1634           return countColumnsBuilder_.getMessageOrBuilderList();
1635         } else {
1636           return java.util.Collections.unmodifiableList(countColumns_);
1637         }
1638       }
1639       /**
1640        * <code>repeated .ExpandCell countColumns = 3;</code>
1641        */
1642       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addCountColumnsBuilder() {
1643         return getCountColumnsFieldBuilder().addBuilder(
1644             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1645       }
1646       /**
1647        * <code>repeated .ExpandCell countColumns = 3;</code>
1648        */
1649       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addCountColumnsBuilder(
1650           int index) {
1651         return getCountColumnsFieldBuilder().addBuilder(
1652             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1653       }
1654       /**
1655        * <code>repeated .ExpandCell countColumns = 3;</code>
1656        */
1657       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
1658            getCountColumnsBuilderList() {
1659         return getCountColumnsFieldBuilder().getBuilderList();
1660       }
1661       private com.google.protobuf.RepeatedFieldBuilder<
1662           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1663           getCountColumnsFieldBuilder() {
1664         if (countColumnsBuilder_ == null) {
1665           countColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1666               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
1667                   countColumns_,
1668                   ((bitField0_ & 0x00000004) == 0x00000004),
1669                   getParentForChildren(),
1670                   isClean());
1671           countColumns_ = null;
1672         }
1673         return countColumnsBuilder_;
1674       }
1675 
1676       // repeated .ExpandCell distictColumns = 4;
1677       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> distictColumns_ =
1678         java.util.Collections.emptyList();
1679       private void ensureDistictColumnsIsMutable() {
1680         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
1681           distictColumns_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(distictColumns_);
1682           bitField0_ |= 0x00000008;
1683          }
1684       }
1685 
1686       private com.google.protobuf.RepeatedFieldBuilder<
1687           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> distictColumnsBuilder_;
1688 
1689       /**
1690        * <code>repeated .ExpandCell distictColumns = 4;</code>
1691        */
1692       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getDistictColumnsList() {
1693         if (distictColumnsBuilder_ == null) {
1694           return java.util.Collections.unmodifiableList(distictColumns_);
1695         } else {
1696           return distictColumnsBuilder_.getMessageList();
1697         }
1698       }
1699       /**
1700        * <code>repeated .ExpandCell distictColumns = 4;</code>
1701        */
1702       public int getDistictColumnsCount() {
1703         if (distictColumnsBuilder_ == null) {
1704           return distictColumns_.size();
1705         } else {
1706           return distictColumnsBuilder_.getCount();
1707         }
1708       }
1709       /**
1710        * <code>repeated .ExpandCell distictColumns = 4;</code>
1711        */
1712       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getDistictColumns(int index) {
1713         if (distictColumnsBuilder_ == null) {
1714           return distictColumns_.get(index);
1715         } else {
1716           return distictColumnsBuilder_.getMessage(index);
1717         }
1718       }
1719       /**
1720        * <code>repeated .ExpandCell distictColumns = 4;</code>
1721        */
1722       public Builder setDistictColumns(
1723           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1724         if (distictColumnsBuilder_ == null) {
1725           if (value == null) {
1726             throw new NullPointerException();
1727           }
1728           ensureDistictColumnsIsMutable();
1729           distictColumns_.set(index, value);
1730           onChanged();
1731         } else {
1732           distictColumnsBuilder_.setMessage(index, value);
1733         }
1734         return this;
1735       }
1736       /**
1737        * <code>repeated .ExpandCell distictColumns = 4;</code>
1738        */
1739       public Builder setDistictColumns(
1740           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1741         if (distictColumnsBuilder_ == null) {
1742           ensureDistictColumnsIsMutable();
1743           distictColumns_.set(index, builderForValue.build());
1744           onChanged();
1745         } else {
1746           distictColumnsBuilder_.setMessage(index, builderForValue.build());
1747         }
1748         return this;
1749       }
1750       /**
1751        * <code>repeated .ExpandCell distictColumns = 4;</code>
1752        */
1753       public Builder addDistictColumns(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1754         if (distictColumnsBuilder_ == null) {
1755           if (value == null) {
1756             throw new NullPointerException();
1757           }
1758           ensureDistictColumnsIsMutable();
1759           distictColumns_.add(value);
1760           onChanged();
1761         } else {
1762           distictColumnsBuilder_.addMessage(value);
1763         }
1764         return this;
1765       }
1766       /**
1767        * <code>repeated .ExpandCell distictColumns = 4;</code>
1768        */
1769       public Builder addDistictColumns(
1770           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
1771         if (distictColumnsBuilder_ == null) {
1772           if (value == null) {
1773             throw new NullPointerException();
1774           }
1775           ensureDistictColumnsIsMutable();
1776           distictColumns_.add(index, value);
1777           onChanged();
1778         } else {
1779           distictColumnsBuilder_.addMessage(index, value);
1780         }
1781         return this;
1782       }
1783       /**
1784        * <code>repeated .ExpandCell distictColumns = 4;</code>
1785        */
1786       public Builder addDistictColumns(
1787           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1788         if (distictColumnsBuilder_ == null) {
1789           ensureDistictColumnsIsMutable();
1790           distictColumns_.add(builderForValue.build());
1791           onChanged();
1792         } else {
1793           distictColumnsBuilder_.addMessage(builderForValue.build());
1794         }
1795         return this;
1796       }
1797       /**
1798        * <code>repeated .ExpandCell distictColumns = 4;</code>
1799        */
1800       public Builder addDistictColumns(
1801           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
1802         if (distictColumnsBuilder_ == null) {
1803           ensureDistictColumnsIsMutable();
1804           distictColumns_.add(index, builderForValue.build());
1805           onChanged();
1806         } else {
1807           distictColumnsBuilder_.addMessage(index, builderForValue.build());
1808         }
1809         return this;
1810       }
1811       /**
1812        * <code>repeated .ExpandCell distictColumns = 4;</code>
1813        */
1814       public Builder addAllDistictColumns(
1815           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
1816         if (distictColumnsBuilder_ == null) {
1817           ensureDistictColumnsIsMutable();
1818           super.addAll(values, distictColumns_);
1819           onChanged();
1820         } else {
1821           distictColumnsBuilder_.addAllMessages(values);
1822         }
1823         return this;
1824       }
1825       /**
1826        * <code>repeated .ExpandCell distictColumns = 4;</code>
1827        */
1828       public Builder clearDistictColumns() {
1829         if (distictColumnsBuilder_ == null) {
1830           distictColumns_ = java.util.Collections.emptyList();
1831           bitField0_ = (bitField0_ & ~0x00000008);
1832           onChanged();
1833         } else {
1834           distictColumnsBuilder_.clear();
1835         }
1836         return this;
1837       }
1838       /**
1839        * <code>repeated .ExpandCell distictColumns = 4;</code>
1840        */
1841       public Builder removeDistictColumns(int index) {
1842         if (distictColumnsBuilder_ == null) {
1843           ensureDistictColumnsIsMutable();
1844           distictColumns_.remove(index);
1845           onChanged();
1846         } else {
1847           distictColumnsBuilder_.remove(index);
1848         }
1849         return this;
1850       }
1851       /**
1852        * <code>repeated .ExpandCell distictColumns = 4;</code>
1853        */
1854       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getDistictColumnsBuilder(
1855           int index) {
1856         return getDistictColumnsFieldBuilder().getBuilder(index);
1857       }
1858       /**
1859        * <code>repeated .ExpandCell distictColumns = 4;</code>
1860        */
1861       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getDistictColumnsOrBuilder(
1862           int index) {
1863         if (distictColumnsBuilder_ == null) {
1864           return distictColumns_.get(index);  } else {
1865           return distictColumnsBuilder_.getMessageOrBuilder(index);
1866         }
1867       }
1868       /**
1869        * <code>repeated .ExpandCell distictColumns = 4;</code>
1870        */
1871       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1872            getDistictColumnsOrBuilderList() {
1873         if (distictColumnsBuilder_ != null) {
1874           return distictColumnsBuilder_.getMessageOrBuilderList();
1875         } else {
1876           return java.util.Collections.unmodifiableList(distictColumns_);
1877         }
1878       }
1879       /**
1880        * <code>repeated .ExpandCell distictColumns = 4;</code>
1881        */
1882       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addDistictColumnsBuilder() {
1883         return getDistictColumnsFieldBuilder().addBuilder(
1884             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1885       }
1886       /**
1887        * <code>repeated .ExpandCell distictColumns = 4;</code>
1888        */
1889       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addDistictColumnsBuilder(
1890           int index) {
1891         return getDistictColumnsFieldBuilder().addBuilder(
1892             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
1893       }
1894       /**
1895        * <code>repeated .ExpandCell distictColumns = 4;</code>
1896        */
1897       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
1898            getDistictColumnsBuilderList() {
1899         return getDistictColumnsFieldBuilder().getBuilderList();
1900       }
1901       private com.google.protobuf.RepeatedFieldBuilder<
1902           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
1903           getDistictColumnsFieldBuilder() {
1904         if (distictColumnsBuilder_ == null) {
1905           distictColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1906               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
1907                   distictColumns_,
1908                   ((bitField0_ & 0x00000008) == 0x00000008),
1909                   getParentForChildren(),
1910                   isClean());
1911           distictColumns_ = null;
1912         }
1913         return distictColumnsBuilder_;
1914       }
1915 
1916       // required .Scan scan = 5;
1917       private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
1918       private com.google.protobuf.SingleFieldBuilder<
1919           org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> scanBuilder_;
1920       /**
1921        * <code>required .Scan scan = 5;</code>
1922        */
1923       public boolean hasScan() {
1924         return ((bitField0_ & 0x00000010) == 0x00000010);
1925       }
1926       /**
1927        * <code>required .Scan scan = 5;</code>
1928        */
1929       public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
1930         if (scanBuilder_ == null) {
1931           return scan_;
1932         } else {
1933           return scanBuilder_.getMessage();
1934         }
1935       }
1936       /**
1937        * <code>required .Scan scan = 5;</code>
1938        */
1939       public Builder setScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
1940         if (scanBuilder_ == null) {
1941           if (value == null) {
1942             throw new NullPointerException();
1943           }
1944           scan_ = value;
1945           onChanged();
1946         } else {
1947           scanBuilder_.setMessage(value);
1948         }
1949         bitField0_ |= 0x00000010;
1950         return this;
1951       }
1952       /**
1953        * <code>required .Scan scan = 5;</code>
1954        */
1955       public Builder setScan(
1956           org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder builderForValue) {
1957         if (scanBuilder_ == null) {
1958           scan_ = builderForValue.build();
1959           onChanged();
1960         } else {
1961           scanBuilder_.setMessage(builderForValue.build());
1962         }
1963         bitField0_ |= 0x00000010;
1964         return this;
1965       }
1966       /**
1967        * <code>required .Scan scan = 5;</code>
1968        */
1969       public Builder mergeScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
1970         if (scanBuilder_ == null) {
1971           if (((bitField0_ & 0x00000010) == 0x00000010) &&
1972               scan_ != org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance()) {
1973             scan_ =
1974               org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.newBuilder(scan_).mergeFrom(value).buildPartial();
1975           } else {
1976             scan_ = value;
1977           }
1978           onChanged();
1979         } else {
1980           scanBuilder_.mergeFrom(value);
1981         }
1982         bitField0_ |= 0x00000010;
1983         return this;
1984       }
1985       /**
1986        * <code>required .Scan scan = 5;</code>
1987        */
1988       public Builder clearScan() {
1989         if (scanBuilder_ == null) {
1990           scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
1991           onChanged();
1992         } else {
1993           scanBuilder_.clear();
1994         }
1995         bitField0_ = (bitField0_ & ~0x00000010);
1996         return this;
1997       }
1998       /**
1999        * <code>required .Scan scan = 5;</code>
2000        */
2001       public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder getScanBuilder() {
2002         bitField0_ |= 0x00000010;
2003         onChanged();
2004         return getScanFieldBuilder().getBuilder();
2005       }
2006       /**
2007        * <code>required .Scan scan = 5;</code>
2008        */
2009       public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
2010         if (scanBuilder_ != null) {
2011           return scanBuilder_.getMessageOrBuilder();
2012         } else {
2013           return scan_;
2014         }
2015       }
2016       /**
2017        * <code>required .Scan scan = 5;</code>
2018        */
2019       private com.google.protobuf.SingleFieldBuilder<
2020           org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> 
2021           getScanFieldBuilder() {
2022         if (scanBuilder_ == null) {
2023           scanBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2024               org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder>(
2025                   scan_,
2026                   getParentForChildren(),
2027                   isClean());
2028           scan_ = null;
2029         }
2030         return scanBuilder_;
2031       }
2032 
2033       // @@protoc_insertion_point(builder_scope:ExpandAggregationRequest)
2034     }
2035 
2036     static {
2037       defaultInstance = new ExpandAggregationRequest(true);
2038       defaultInstance.initFields();
2039     }
2040 
2041     // @@protoc_insertion_point(class_scope:ExpandAggregationRequest)
2042   }
2043 
2044   public interface ExpandAggregationResponseOrBuilder
2045       extends com.google.protobuf.MessageOrBuilder {
2046 
2047     // repeated .ExpandRow results = 1;
2048     /**
2049      * <code>repeated .ExpandRow results = 1;</code>
2050      */
2051     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> 
2052         getResultsList();
2053     /**
2054      * <code>repeated .ExpandRow results = 1;</code>
2055      */
2056     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow getResults(int index);
2057     /**
2058      * <code>repeated .ExpandRow results = 1;</code>
2059      */
2060     int getResultsCount();
2061     /**
2062      * <code>repeated .ExpandRow results = 1;</code>
2063      */
2064     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder> 
2065         getResultsOrBuilderList();
2066     /**
2067      * <code>repeated .ExpandRow results = 1;</code>
2068      */
2069     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder getResultsOrBuilder(
2070         int index);
2071   }
2072   /**
2073    * Protobuf type {@code ExpandAggregationResponse}
2074    */
2075   public static final class ExpandAggregationResponse extends
2076       com.google.protobuf.GeneratedMessage
2077       implements ExpandAggregationResponseOrBuilder {
2078     // Use ExpandAggregationResponse.newBuilder() to construct.
2079     private ExpandAggregationResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2080       super(builder);
2081       this.unknownFields = builder.getUnknownFields();
2082     }
2083     private ExpandAggregationResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2084 
2085     private static final ExpandAggregationResponse defaultInstance;
2086     public static ExpandAggregationResponse getDefaultInstance() {
2087       return defaultInstance;
2088     }
2089 
2090     public ExpandAggregationResponse getDefaultInstanceForType() {
2091       return defaultInstance;
2092     }
2093 
2094     private final com.google.protobuf.UnknownFieldSet unknownFields;
2095     @java.lang.Override
2096     public final com.google.protobuf.UnknownFieldSet
2097         getUnknownFields() {
2098       return this.unknownFields;
2099     }
2100     private ExpandAggregationResponse(
2101         com.google.protobuf.CodedInputStream input,
2102         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2103         throws com.google.protobuf.InvalidProtocolBufferException {
2104       initFields();
2105       int mutable_bitField0_ = 0;
2106       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2107           com.google.protobuf.UnknownFieldSet.newBuilder();
2108       try {
2109         boolean done = false;
2110         while (!done) {
2111           int tag = input.readTag();
2112           switch (tag) {
2113             case 0:
2114               done = true;
2115               break;
2116             default: {
2117               if (!parseUnknownField(input, unknownFields,
2118                                      extensionRegistry, tag)) {
2119                 done = true;
2120               }
2121               break;
2122             }
2123             case 10: {
2124               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
2125                 results_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow>();
2126                 mutable_bitField0_ |= 0x00000001;
2127               }
2128               results_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.PARSER, extensionRegistry));
2129               break;
2130             }
2131           }
2132         }
2133       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2134         throw e.setUnfinishedMessage(this);
2135       } catch (java.io.IOException e) {
2136         throw new com.google.protobuf.InvalidProtocolBufferException(
2137             e.getMessage()).setUnfinishedMessage(this);
2138       } finally {
2139         if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
2140           results_ = java.util.Collections.unmodifiableList(results_);
2141         }
2142         this.unknownFields = unknownFields.build();
2143         makeExtensionsImmutable();
2144       }
2145     }
2146     public static final com.google.protobuf.Descriptors.Descriptor
2147         getDescriptor() {
2148       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationResponse_descriptor;
2149     }
2150 
2151     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2152         internalGetFieldAccessorTable() {
2153       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationResponse_fieldAccessorTable
2154           .ensureFieldAccessorsInitialized(
2155               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.Builder.class);
2156     }
2157 
2158     public static com.google.protobuf.Parser<ExpandAggregationResponse> PARSER =
2159         new com.google.protobuf.AbstractParser<ExpandAggregationResponse>() {
2160       public ExpandAggregationResponse parsePartialFrom(
2161           com.google.protobuf.CodedInputStream input,
2162           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2163           throws com.google.protobuf.InvalidProtocolBufferException {
2164         return new ExpandAggregationResponse(input, extensionRegistry);
2165       }
2166     };
2167 
2168     @java.lang.Override
2169     public com.google.protobuf.Parser<ExpandAggregationResponse> getParserForType() {
2170       return PARSER;
2171     }
2172 
2173     // repeated .ExpandRow results = 1;
2174     public static final int RESULTS_FIELD_NUMBER = 1;
2175     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> results_;
2176     /**
2177      * <code>repeated .ExpandRow results = 1;</code>
2178      */
2179     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> getResultsList() {
2180       return results_;
2181     }
2182     /**
2183      * <code>repeated .ExpandRow results = 1;</code>
2184      */
2185     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder> 
2186         getResultsOrBuilderList() {
2187       return results_;
2188     }
2189     /**
2190      * <code>repeated .ExpandRow results = 1;</code>
2191      */
2192     public int getResultsCount() {
2193       return results_.size();
2194     }
2195     /**
2196      * <code>repeated .ExpandRow results = 1;</code>
2197      */
2198     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow getResults(int index) {
2199       return results_.get(index);
2200     }
2201     /**
2202      * <code>repeated .ExpandRow results = 1;</code>
2203      */
2204     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder getResultsOrBuilder(
2205         int index) {
2206       return results_.get(index);
2207     }
2208 
2209     private void initFields() {
2210       results_ = java.util.Collections.emptyList();
2211     }
2212     private byte memoizedIsInitialized = -1;
2213     public final boolean isInitialized() {
2214       byte isInitialized = memoizedIsInitialized;
2215       if (isInitialized != -1) return isInitialized == 1;
2216 
2217       memoizedIsInitialized = 1;
2218       return true;
2219     }
2220 
2221     public void writeTo(com.google.protobuf.CodedOutputStream output)
2222                         throws java.io.IOException {
2223       getSerializedSize();
2224       for (int i = 0; i < results_.size(); i++) {
2225         output.writeMessage(1, results_.get(i));
2226       }
2227       getUnknownFields().writeTo(output);
2228     }
2229 
2230     private int memoizedSerializedSize = -1;
2231     public int getSerializedSize() {
2232       int size = memoizedSerializedSize;
2233       if (size != -1) return size;
2234 
2235       size = 0;
2236       for (int i = 0; i < results_.size(); i++) {
2237         size += com.google.protobuf.CodedOutputStream
2238           .computeMessageSize(1, results_.get(i));
2239       }
2240       size += getUnknownFields().getSerializedSize();
2241       memoizedSerializedSize = size;
2242       return size;
2243     }
2244 
2245     private static final long serialVersionUID = 0L;
2246     @java.lang.Override
2247     protected java.lang.Object writeReplace()
2248         throws java.io.ObjectStreamException {
2249       return super.writeReplace();
2250     }
2251 
2252     @java.lang.Override
2253     public boolean equals(final java.lang.Object obj) {
2254       if (obj == this) {
2255        return true;
2256       }
2257       if (!(obj instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse)) {
2258         return super.equals(obj);
2259       }
2260       com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse other = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) obj;
2261 
2262       boolean result = true;
2263       result = result && getResultsList()
2264           .equals(other.getResultsList());
2265       result = result &&
2266           getUnknownFields().equals(other.getUnknownFields());
2267       return result;
2268     }
2269 
2270     private int memoizedHashCode = 0;
2271     @java.lang.Override
2272     public int hashCode() {
2273       if (memoizedHashCode != 0) {
2274         return memoizedHashCode;
2275       }
2276       int hash = 41;
2277       hash = (19 * hash) + getDescriptorForType().hashCode();
2278       if (getResultsCount() > 0) {
2279         hash = (37 * hash) + RESULTS_FIELD_NUMBER;
2280         hash = (53 * hash) + getResultsList().hashCode();
2281       }
2282       hash = (29 * hash) + getUnknownFields().hashCode();
2283       memoizedHashCode = hash;
2284       return hash;
2285     }
2286 
2287     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2288         com.google.protobuf.ByteString data)
2289         throws com.google.protobuf.InvalidProtocolBufferException {
2290       return PARSER.parseFrom(data);
2291     }
2292     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2293         com.google.protobuf.ByteString data,
2294         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2295         throws com.google.protobuf.InvalidProtocolBufferException {
2296       return PARSER.parseFrom(data, extensionRegistry);
2297     }
2298     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(byte[] data)
2299         throws com.google.protobuf.InvalidProtocolBufferException {
2300       return PARSER.parseFrom(data);
2301     }
2302     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2303         byte[] data,
2304         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2305         throws com.google.protobuf.InvalidProtocolBufferException {
2306       return PARSER.parseFrom(data, extensionRegistry);
2307     }
2308     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(java.io.InputStream input)
2309         throws java.io.IOException {
2310       return PARSER.parseFrom(input);
2311     }
2312     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2313         java.io.InputStream input,
2314         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2315         throws java.io.IOException {
2316       return PARSER.parseFrom(input, extensionRegistry);
2317     }
2318     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseDelimitedFrom(java.io.InputStream input)
2319         throws java.io.IOException {
2320       return PARSER.parseDelimitedFrom(input);
2321     }
2322     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseDelimitedFrom(
2323         java.io.InputStream input,
2324         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2325         throws java.io.IOException {
2326       return PARSER.parseDelimitedFrom(input, extensionRegistry);
2327     }
2328     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2329         com.google.protobuf.CodedInputStream input)
2330         throws java.io.IOException {
2331       return PARSER.parseFrom(input);
2332     }
2333     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parseFrom(
2334         com.google.protobuf.CodedInputStream input,
2335         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2336         throws java.io.IOException {
2337       return PARSER.parseFrom(input, extensionRegistry);
2338     }
2339 
2340     public static Builder newBuilder() { return Builder.create(); }
2341     public Builder newBuilderForType() { return newBuilder(); }
2342     public static Builder newBuilder(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse prototype) {
2343       return newBuilder().mergeFrom(prototype);
2344     }
2345     public Builder toBuilder() { return newBuilder(this); }
2346 
2347     @java.lang.Override
2348     protected Builder newBuilderForType(
2349         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2350       Builder builder = new Builder(parent);
2351       return builder;
2352     }
2353     /**
2354      * Protobuf type {@code ExpandAggregationResponse}
2355      */
2356     public static final class Builder extends
2357         com.google.protobuf.GeneratedMessage.Builder<Builder>
2358        implements com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponseOrBuilder {
2359       public static final com.google.protobuf.Descriptors.Descriptor
2360           getDescriptor() {
2361         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationResponse_descriptor;
2362       }
2363 
2364       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2365           internalGetFieldAccessorTable() {
2366         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationResponse_fieldAccessorTable
2367             .ensureFieldAccessorsInitialized(
2368                 com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.Builder.class);
2369       }
2370 
2371       // Construct using com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.newBuilder()
2372       private Builder() {
2373         maybeForceBuilderInitialization();
2374       }
2375 
2376       private Builder(
2377           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2378         super(parent);
2379         maybeForceBuilderInitialization();
2380       }
2381       private void maybeForceBuilderInitialization() {
2382         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2383           getResultsFieldBuilder();
2384         }
2385       }
2386       private static Builder create() {
2387         return new Builder();
2388       }
2389 
2390       public Builder clear() {
2391         super.clear();
2392         if (resultsBuilder_ == null) {
2393           results_ = java.util.Collections.emptyList();
2394           bitField0_ = (bitField0_ & ~0x00000001);
2395         } else {
2396           resultsBuilder_.clear();
2397         }
2398         return this;
2399       }
2400 
2401       public Builder clone() {
2402         return create().mergeFrom(buildPartial());
2403       }
2404 
2405       public com.google.protobuf.Descriptors.Descriptor
2406           getDescriptorForType() {
2407         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandAggregationResponse_descriptor;
2408       }
2409 
2410       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getDefaultInstanceForType() {
2411         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
2412       }
2413 
2414       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse build() {
2415         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse result = buildPartial();
2416         if (!result.isInitialized()) {
2417           throw newUninitializedMessageException(result);
2418         }
2419         return result;
2420       }
2421 
2422       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse buildPartial() {
2423         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse result = new com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse(this);
2424         int from_bitField0_ = bitField0_;
2425         if (resultsBuilder_ == null) {
2426           if (((bitField0_ & 0x00000001) == 0x00000001)) {
2427             results_ = java.util.Collections.unmodifiableList(results_);
2428             bitField0_ = (bitField0_ & ~0x00000001);
2429           }
2430           result.results_ = results_;
2431         } else {
2432           result.results_ = resultsBuilder_.build();
2433         }
2434         onBuilt();
2435         return result;
2436       }
2437 
2438       public Builder mergeFrom(com.google.protobuf.Message other) {
2439         if (other instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) {
2440           return mergeFrom((com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse)other);
2441         } else {
2442           super.mergeFrom(other);
2443           return this;
2444         }
2445       }
2446 
2447       public Builder mergeFrom(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse other) {
2448         if (other == com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()) return this;
2449         if (resultsBuilder_ == null) {
2450           if (!other.results_.isEmpty()) {
2451             if (results_.isEmpty()) {
2452               results_ = other.results_;
2453               bitField0_ = (bitField0_ & ~0x00000001);
2454             } else {
2455               ensureResultsIsMutable();
2456               results_.addAll(other.results_);
2457             }
2458             onChanged();
2459           }
2460         } else {
2461           if (!other.results_.isEmpty()) {
2462             if (resultsBuilder_.isEmpty()) {
2463               resultsBuilder_.dispose();
2464               resultsBuilder_ = null;
2465               results_ = other.results_;
2466               bitField0_ = (bitField0_ & ~0x00000001);
2467               resultsBuilder_ = 
2468                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2469                    getResultsFieldBuilder() : null;
2470             } else {
2471               resultsBuilder_.addAllMessages(other.results_);
2472             }
2473           }
2474         }
2475         this.mergeUnknownFields(other.getUnknownFields());
2476         return this;
2477       }
2478 
2479       public final boolean isInitialized() {
2480         return true;
2481       }
2482 
2483       public Builder mergeFrom(
2484           com.google.protobuf.CodedInputStream input,
2485           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2486           throws java.io.IOException {
2487         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse parsedMessage = null;
2488         try {
2489           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2490         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2491           parsedMessage = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) e.getUnfinishedMessage();
2492           throw e;
2493         } finally {
2494           if (parsedMessage != null) {
2495             mergeFrom(parsedMessage);
2496           }
2497         }
2498         return this;
2499       }
2500       private int bitField0_;
2501 
2502       // repeated .ExpandRow results = 1;
2503       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> results_ =
2504         java.util.Collections.emptyList();
2505       private void ensureResultsIsMutable() {
2506         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
2507           results_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow>(results_);
2508           bitField0_ |= 0x00000001;
2509          }
2510       }
2511 
2512       private com.google.protobuf.RepeatedFieldBuilder<
2513           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder> resultsBuilder_;
2514 
2515       /**
2516        * <code>repeated .ExpandRow results = 1;</code>
2517        */
2518       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> getResultsList() {
2519         if (resultsBuilder_ == null) {
2520           return java.util.Collections.unmodifiableList(results_);
2521         } else {
2522           return resultsBuilder_.getMessageList();
2523         }
2524       }
2525       /**
2526        * <code>repeated .ExpandRow results = 1;</code>
2527        */
2528       public int getResultsCount() {
2529         if (resultsBuilder_ == null) {
2530           return results_.size();
2531         } else {
2532           return resultsBuilder_.getCount();
2533         }
2534       }
2535       /**
2536        * <code>repeated .ExpandRow results = 1;</code>
2537        */
2538       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow getResults(int index) {
2539         if (resultsBuilder_ == null) {
2540           return results_.get(index);
2541         } else {
2542           return resultsBuilder_.getMessage(index);
2543         }
2544       }
2545       /**
2546        * <code>repeated .ExpandRow results = 1;</code>
2547        */
2548       public Builder setResults(
2549           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow value) {
2550         if (resultsBuilder_ == null) {
2551           if (value == null) {
2552             throw new NullPointerException();
2553           }
2554           ensureResultsIsMutable();
2555           results_.set(index, value);
2556           onChanged();
2557         } else {
2558           resultsBuilder_.setMessage(index, value);
2559         }
2560         return this;
2561       }
2562       /**
2563        * <code>repeated .ExpandRow results = 1;</code>
2564        */
2565       public Builder setResults(
2566           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder builderForValue) {
2567         if (resultsBuilder_ == null) {
2568           ensureResultsIsMutable();
2569           results_.set(index, builderForValue.build());
2570           onChanged();
2571         } else {
2572           resultsBuilder_.setMessage(index, builderForValue.build());
2573         }
2574         return this;
2575       }
2576       /**
2577        * <code>repeated .ExpandRow results = 1;</code>
2578        */
2579       public Builder addResults(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow value) {
2580         if (resultsBuilder_ == null) {
2581           if (value == null) {
2582             throw new NullPointerException();
2583           }
2584           ensureResultsIsMutable();
2585           results_.add(value);
2586           onChanged();
2587         } else {
2588           resultsBuilder_.addMessage(value);
2589         }
2590         return this;
2591       }
2592       /**
2593        * <code>repeated .ExpandRow results = 1;</code>
2594        */
2595       public Builder addResults(
2596           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow value) {
2597         if (resultsBuilder_ == null) {
2598           if (value == null) {
2599             throw new NullPointerException();
2600           }
2601           ensureResultsIsMutable();
2602           results_.add(index, value);
2603           onChanged();
2604         } else {
2605           resultsBuilder_.addMessage(index, value);
2606         }
2607         return this;
2608       }
2609       /**
2610        * <code>repeated .ExpandRow results = 1;</code>
2611        */
2612       public Builder addResults(
2613           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder builderForValue) {
2614         if (resultsBuilder_ == null) {
2615           ensureResultsIsMutable();
2616           results_.add(builderForValue.build());
2617           onChanged();
2618         } else {
2619           resultsBuilder_.addMessage(builderForValue.build());
2620         }
2621         return this;
2622       }
2623       /**
2624        * <code>repeated .ExpandRow results = 1;</code>
2625        */
2626       public Builder addResults(
2627           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder builderForValue) {
2628         if (resultsBuilder_ == null) {
2629           ensureResultsIsMutable();
2630           results_.add(index, builderForValue.build());
2631           onChanged();
2632         } else {
2633           resultsBuilder_.addMessage(index, builderForValue.build());
2634         }
2635         return this;
2636       }
2637       /**
2638        * <code>repeated .ExpandRow results = 1;</code>
2639        */
2640       public Builder addAllResults(
2641           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow> values) {
2642         if (resultsBuilder_ == null) {
2643           ensureResultsIsMutable();
2644           super.addAll(values, results_);
2645           onChanged();
2646         } else {
2647           resultsBuilder_.addAllMessages(values);
2648         }
2649         return this;
2650       }
2651       /**
2652        * <code>repeated .ExpandRow results = 1;</code>
2653        */
2654       public Builder clearResults() {
2655         if (resultsBuilder_ == null) {
2656           results_ = java.util.Collections.emptyList();
2657           bitField0_ = (bitField0_ & ~0x00000001);
2658           onChanged();
2659         } else {
2660           resultsBuilder_.clear();
2661         }
2662         return this;
2663       }
2664       /**
2665        * <code>repeated .ExpandRow results = 1;</code>
2666        */
2667       public Builder removeResults(int index) {
2668         if (resultsBuilder_ == null) {
2669           ensureResultsIsMutable();
2670           results_.remove(index);
2671           onChanged();
2672         } else {
2673           resultsBuilder_.remove(index);
2674         }
2675         return this;
2676       }
2677       /**
2678        * <code>repeated .ExpandRow results = 1;</code>
2679        */
2680       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder getResultsBuilder(
2681           int index) {
2682         return getResultsFieldBuilder().getBuilder(index);
2683       }
2684       /**
2685        * <code>repeated .ExpandRow results = 1;</code>
2686        */
2687       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder getResultsOrBuilder(
2688           int index) {
2689         if (resultsBuilder_ == null) {
2690           return results_.get(index);  } else {
2691           return resultsBuilder_.getMessageOrBuilder(index);
2692         }
2693       }
2694       /**
2695        * <code>repeated .ExpandRow results = 1;</code>
2696        */
2697       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder> 
2698            getResultsOrBuilderList() {
2699         if (resultsBuilder_ != null) {
2700           return resultsBuilder_.getMessageOrBuilderList();
2701         } else {
2702           return java.util.Collections.unmodifiableList(results_);
2703         }
2704       }
2705       /**
2706        * <code>repeated .ExpandRow results = 1;</code>
2707        */
2708       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder addResultsBuilder() {
2709         return getResultsFieldBuilder().addBuilder(
2710             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.getDefaultInstance());
2711       }
2712       /**
2713        * <code>repeated .ExpandRow results = 1;</code>
2714        */
2715       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder addResultsBuilder(
2716           int index) {
2717         return getResultsFieldBuilder().addBuilder(
2718             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.getDefaultInstance());
2719       }
2720       /**
2721        * <code>repeated .ExpandRow results = 1;</code>
2722        */
2723       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder> 
2724            getResultsBuilderList() {
2725         return getResultsFieldBuilder().getBuilderList();
2726       }
2727       private com.google.protobuf.RepeatedFieldBuilder<
2728           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder> 
2729           getResultsFieldBuilder() {
2730         if (resultsBuilder_ == null) {
2731           resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2732               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder>(
2733                   results_,
2734                   ((bitField0_ & 0x00000001) == 0x00000001),
2735                   getParentForChildren(),
2736                   isClean());
2737           results_ = null;
2738         }
2739         return resultsBuilder_;
2740       }
2741 
2742       // @@protoc_insertion_point(builder_scope:ExpandAggregationResponse)
2743     }
2744 
2745     static {
2746       defaultInstance = new ExpandAggregationResponse(true);
2747       defaultInstance.initFields();
2748     }
2749 
2750     // @@protoc_insertion_point(class_scope:ExpandAggregationResponse)
2751   }
2752 
2753   public interface ExpandCellOrBuilder
2754       extends com.google.protobuf.MessageOrBuilder {
2755 
2756     // optional bytes family = 1;
2757     /**
2758      * <code>optional bytes family = 1;</code>
2759      */
2760     boolean hasFamily();
2761     /**
2762      * <code>optional bytes family = 1;</code>
2763      */
2764     com.google.protobuf.ByteString getFamily();
2765 
2766     // optional bytes qualify = 2;
2767     /**
2768      * <code>optional bytes qualify = 2;</code>
2769      */
2770     boolean hasQualify();
2771     /**
2772      * <code>optional bytes qualify = 2;</code>
2773      */
2774     com.google.protobuf.ByteString getQualify();
2775 
2776     // optional bytes value = 3;
2777     /**
2778      * <code>optional bytes value = 3;</code>
2779      */
2780     boolean hasValue();
2781     /**
2782      * <code>optional bytes value = 3;</code>
2783      */
2784     com.google.protobuf.ByteString getValue();
2785 
2786     // repeated bytes distinctValues = 5;
2787     /**
2788      * <code>repeated bytes distinctValues = 5;</code>
2789      */
2790     java.util.List<com.google.protobuf.ByteString> getDistinctValuesList();
2791     /**
2792      * <code>repeated bytes distinctValues = 5;</code>
2793      */
2794     int getDistinctValuesCount();
2795     /**
2796      * <code>repeated bytes distinctValues = 5;</code>
2797      */
2798     com.google.protobuf.ByteString getDistinctValues(int index);
2799 
2800     // optional bytes class_name = 4;
2801     /**
2802      * <code>optional bytes class_name = 4;</code>
2803      */
2804     boolean hasClassName();
2805     /**
2806      * <code>optional bytes class_name = 4;</code>
2807      */
2808     com.google.protobuf.ByteString getClassName();
2809   }
2810   /**
2811    * Protobuf type {@code ExpandCell}
2812    */
2813   public static final class ExpandCell extends
2814       com.google.protobuf.GeneratedMessage
2815       implements ExpandCellOrBuilder {
2816     // Use ExpandCell.newBuilder() to construct.
2817     private ExpandCell(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2818       super(builder);
2819       this.unknownFields = builder.getUnknownFields();
2820     }
2821     private ExpandCell(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2822 
2823     private static final ExpandCell defaultInstance;
2824     public static ExpandCell getDefaultInstance() {
2825       return defaultInstance;
2826     }
2827 
2828     public ExpandCell getDefaultInstanceForType() {
2829       return defaultInstance;
2830     }
2831 
2832     private final com.google.protobuf.UnknownFieldSet unknownFields;
2833     @java.lang.Override
2834     public final com.google.protobuf.UnknownFieldSet
2835         getUnknownFields() {
2836       return this.unknownFields;
2837     }
2838     private ExpandCell(
2839         com.google.protobuf.CodedInputStream input,
2840         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2841         throws com.google.protobuf.InvalidProtocolBufferException {
2842       initFields();
2843       int mutable_bitField0_ = 0;
2844       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2845           com.google.protobuf.UnknownFieldSet.newBuilder();
2846       try {
2847         boolean done = false;
2848         while (!done) {
2849           int tag = input.readTag();
2850           switch (tag) {
2851             case 0:
2852               done = true;
2853               break;
2854             default: {
2855               if (!parseUnknownField(input, unknownFields,
2856                                      extensionRegistry, tag)) {
2857                 done = true;
2858               }
2859               break;
2860             }
2861             case 10: {
2862               bitField0_ |= 0x00000001;
2863               family_ = input.readBytes();
2864               break;
2865             }
2866             case 18: {
2867               bitField0_ |= 0x00000002;
2868               qualify_ = input.readBytes();
2869               break;
2870             }
2871             case 26: {
2872               bitField0_ |= 0x00000004;
2873               value_ = input.readBytes();
2874               break;
2875             }
2876             case 34: {
2877               bitField0_ |= 0x00000008;
2878               className_ = input.readBytes();
2879               break;
2880             }
2881             case 42: {
2882               if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
2883                 distinctValues_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
2884                 mutable_bitField0_ |= 0x00000008;
2885               }
2886               distinctValues_.add(input.readBytes());
2887               break;
2888             }
2889           }
2890         }
2891       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2892         throw e.setUnfinishedMessage(this);
2893       } catch (java.io.IOException e) {
2894         throw new com.google.protobuf.InvalidProtocolBufferException(
2895             e.getMessage()).setUnfinishedMessage(this);
2896       } finally {
2897         if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
2898           distinctValues_ = java.util.Collections.unmodifiableList(distinctValues_);
2899         }
2900         this.unknownFields = unknownFields.build();
2901         makeExtensionsImmutable();
2902       }
2903     }
2904     public static final com.google.protobuf.Descriptors.Descriptor
2905         getDescriptor() {
2906       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandCell_descriptor;
2907     }
2908 
2909     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2910         internalGetFieldAccessorTable() {
2911       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandCell_fieldAccessorTable
2912           .ensureFieldAccessorsInitialized(
2913               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder.class);
2914     }
2915 
2916     public static com.google.protobuf.Parser<ExpandCell> PARSER =
2917         new com.google.protobuf.AbstractParser<ExpandCell>() {
2918       public ExpandCell parsePartialFrom(
2919           com.google.protobuf.CodedInputStream input,
2920           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2921           throws com.google.protobuf.InvalidProtocolBufferException {
2922         return new ExpandCell(input, extensionRegistry);
2923       }
2924     };
2925 
2926     @java.lang.Override
2927     public com.google.protobuf.Parser<ExpandCell> getParserForType() {
2928       return PARSER;
2929     }
2930 
2931     private int bitField0_;
2932     // optional bytes family = 1;
2933     public static final int FAMILY_FIELD_NUMBER = 1;
2934     private com.google.protobuf.ByteString family_;
2935     /**
2936      * <code>optional bytes family = 1;</code>
2937      */
2938     public boolean hasFamily() {
2939       return ((bitField0_ & 0x00000001) == 0x00000001);
2940     }
2941     /**
2942      * <code>optional bytes family = 1;</code>
2943      */
2944     public com.google.protobuf.ByteString getFamily() {
2945       return family_;
2946     }
2947 
2948     // optional bytes qualify = 2;
2949     public static final int QUALIFY_FIELD_NUMBER = 2;
2950     private com.google.protobuf.ByteString qualify_;
2951     /**
2952      * <code>optional bytes qualify = 2;</code>
2953      */
2954     public boolean hasQualify() {
2955       return ((bitField0_ & 0x00000002) == 0x00000002);
2956     }
2957     /**
2958      * <code>optional bytes qualify = 2;</code>
2959      */
2960     public com.google.protobuf.ByteString getQualify() {
2961       return qualify_;
2962     }
2963 
2964     // optional bytes value = 3;
2965     public static final int VALUE_FIELD_NUMBER = 3;
2966     private com.google.protobuf.ByteString value_;
2967     /**
2968      * <code>optional bytes value = 3;</code>
2969      */
2970     public boolean hasValue() {
2971       return ((bitField0_ & 0x00000004) == 0x00000004);
2972     }
2973     /**
2974      * <code>optional bytes value = 3;</code>
2975      */
2976     public com.google.protobuf.ByteString getValue() {
2977       return value_;
2978     }
2979 
2980     // repeated bytes distinctValues = 5;
2981     public static final int DISTINCTVALUES_FIELD_NUMBER = 5;
2982     private java.util.List<com.google.protobuf.ByteString> distinctValues_;
2983     /**
2984      * <code>repeated bytes distinctValues = 5;</code>
2985      */
2986     public java.util.List<com.google.protobuf.ByteString>
2987         getDistinctValuesList() {
2988       return distinctValues_;
2989     }
2990     /**
2991      * <code>repeated bytes distinctValues = 5;</code>
2992      */
2993     public int getDistinctValuesCount() {
2994       return distinctValues_.size();
2995     }
2996     /**
2997      * <code>repeated bytes distinctValues = 5;</code>
2998      */
2999     public com.google.protobuf.ByteString getDistinctValues(int index) {
3000       return distinctValues_.get(index);
3001     }
3002 
3003     // optional bytes class_name = 4;
3004     public static final int CLASS_NAME_FIELD_NUMBER = 4;
3005     private com.google.protobuf.ByteString className_;
3006     /**
3007      * <code>optional bytes class_name = 4;</code>
3008      */
3009     public boolean hasClassName() {
3010       return ((bitField0_ & 0x00000008) == 0x00000008);
3011     }
3012     /**
3013      * <code>optional bytes class_name = 4;</code>
3014      */
3015     public com.google.protobuf.ByteString getClassName() {
3016       return className_;
3017     }
3018 
3019     private void initFields() {
3020       family_ = com.google.protobuf.ByteString.EMPTY;
3021       qualify_ = com.google.protobuf.ByteString.EMPTY;
3022       value_ = com.google.protobuf.ByteString.EMPTY;
3023       distinctValues_ = java.util.Collections.emptyList();
3024       className_ = com.google.protobuf.ByteString.EMPTY;
3025     }
3026     private byte memoizedIsInitialized = -1;
3027     public final boolean isInitialized() {
3028       byte isInitialized = memoizedIsInitialized;
3029       if (isInitialized != -1) return isInitialized == 1;
3030 
3031       memoizedIsInitialized = 1;
3032       return true;
3033     }
3034 
3035     public void writeTo(com.google.protobuf.CodedOutputStream output)
3036                         throws java.io.IOException {
3037       getSerializedSize();
3038       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3039         output.writeBytes(1, family_);
3040       }
3041       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3042         output.writeBytes(2, qualify_);
3043       }
3044       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3045         output.writeBytes(3, value_);
3046       }
3047       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3048         output.writeBytes(4, className_);
3049       }
3050       for (int i = 0; i < distinctValues_.size(); i++) {
3051         output.writeBytes(5, distinctValues_.get(i));
3052       }
3053       getUnknownFields().writeTo(output);
3054     }
3055 
3056     private int memoizedSerializedSize = -1;
3057     public int getSerializedSize() {
3058       int size = memoizedSerializedSize;
3059       if (size != -1) return size;
3060 
3061       size = 0;
3062       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3063         size += com.google.protobuf.CodedOutputStream
3064           .computeBytesSize(1, family_);
3065       }
3066       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3067         size += com.google.protobuf.CodedOutputStream
3068           .computeBytesSize(2, qualify_);
3069       }
3070       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3071         size += com.google.protobuf.CodedOutputStream
3072           .computeBytesSize(3, value_);
3073       }
3074       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3075         size += com.google.protobuf.CodedOutputStream
3076           .computeBytesSize(4, className_);
3077       }
3078       {
3079         int dataSize = 0;
3080         for (int i = 0; i < distinctValues_.size(); i++) {
3081           dataSize += com.google.protobuf.CodedOutputStream
3082             .computeBytesSizeNoTag(distinctValues_.get(i));
3083         }
3084         size += dataSize;
3085         size += 1 * getDistinctValuesList().size();
3086       }
3087       size += getUnknownFields().getSerializedSize();
3088       memoizedSerializedSize = size;
3089       return size;
3090     }
3091 
3092     private static final long serialVersionUID = 0L;
3093     @java.lang.Override
3094     protected java.lang.Object writeReplace()
3095         throws java.io.ObjectStreamException {
3096       return super.writeReplace();
3097     }
3098 
3099     @java.lang.Override
3100     public boolean equals(final java.lang.Object obj) {
3101       if (obj == this) {
3102        return true;
3103       }
3104       if (!(obj instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell)) {
3105         return super.equals(obj);
3106       }
3107       com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell other = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell) obj;
3108 
3109       boolean result = true;
3110       result = result && (hasFamily() == other.hasFamily());
3111       if (hasFamily()) {
3112         result = result && getFamily()
3113             .equals(other.getFamily());
3114       }
3115       result = result && (hasQualify() == other.hasQualify());
3116       if (hasQualify()) {
3117         result = result && getQualify()
3118             .equals(other.getQualify());
3119       }
3120       result = result && (hasValue() == other.hasValue());
3121       if (hasValue()) {
3122         result = result && getValue()
3123             .equals(other.getValue());
3124       }
3125       result = result && getDistinctValuesList()
3126           .equals(other.getDistinctValuesList());
3127       result = result && (hasClassName() == other.hasClassName());
3128       if (hasClassName()) {
3129         result = result && getClassName()
3130             .equals(other.getClassName());
3131       }
3132       result = result &&
3133           getUnknownFields().equals(other.getUnknownFields());
3134       return result;
3135     }
3136 
3137     private int memoizedHashCode = 0;
3138     @java.lang.Override
3139     public int hashCode() {
3140       if (memoizedHashCode != 0) {
3141         return memoizedHashCode;
3142       }
3143       int hash = 41;
3144       hash = (19 * hash) + getDescriptorForType().hashCode();
3145       if (hasFamily()) {
3146         hash = (37 * hash) + FAMILY_FIELD_NUMBER;
3147         hash = (53 * hash) + getFamily().hashCode();
3148       }
3149       if (hasQualify()) {
3150         hash = (37 * hash) + QUALIFY_FIELD_NUMBER;
3151         hash = (53 * hash) + getQualify().hashCode();
3152       }
3153       if (hasValue()) {
3154         hash = (37 * hash) + VALUE_FIELD_NUMBER;
3155         hash = (53 * hash) + getValue().hashCode();
3156       }
3157       if (getDistinctValuesCount() > 0) {
3158         hash = (37 * hash) + DISTINCTVALUES_FIELD_NUMBER;
3159         hash = (53 * hash) + getDistinctValuesList().hashCode();
3160       }
3161       if (hasClassName()) {
3162         hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
3163         hash = (53 * hash) + getClassName().hashCode();
3164       }
3165       hash = (29 * hash) + getUnknownFields().hashCode();
3166       memoizedHashCode = hash;
3167       return hash;
3168     }
3169 
3170     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3171         com.google.protobuf.ByteString data)
3172         throws com.google.protobuf.InvalidProtocolBufferException {
3173       return PARSER.parseFrom(data);
3174     }
3175     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3176         com.google.protobuf.ByteString data,
3177         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3178         throws com.google.protobuf.InvalidProtocolBufferException {
3179       return PARSER.parseFrom(data, extensionRegistry);
3180     }
3181     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(byte[] data)
3182         throws com.google.protobuf.InvalidProtocolBufferException {
3183       return PARSER.parseFrom(data);
3184     }
3185     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3186         byte[] data,
3187         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3188         throws com.google.protobuf.InvalidProtocolBufferException {
3189       return PARSER.parseFrom(data, extensionRegistry);
3190     }
3191     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(java.io.InputStream input)
3192         throws java.io.IOException {
3193       return PARSER.parseFrom(input);
3194     }
3195     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3196         java.io.InputStream input,
3197         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3198         throws java.io.IOException {
3199       return PARSER.parseFrom(input, extensionRegistry);
3200     }
3201     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseDelimitedFrom(java.io.InputStream input)
3202         throws java.io.IOException {
3203       return PARSER.parseDelimitedFrom(input);
3204     }
3205     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseDelimitedFrom(
3206         java.io.InputStream input,
3207         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3208         throws java.io.IOException {
3209       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3210     }
3211     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3212         com.google.protobuf.CodedInputStream input)
3213         throws java.io.IOException {
3214       return PARSER.parseFrom(input);
3215     }
3216     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parseFrom(
3217         com.google.protobuf.CodedInputStream input,
3218         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3219         throws java.io.IOException {
3220       return PARSER.parseFrom(input, extensionRegistry);
3221     }
3222 
3223     public static Builder newBuilder() { return Builder.create(); }
3224     public Builder newBuilderForType() { return newBuilder(); }
3225     public static Builder newBuilder(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell prototype) {
3226       return newBuilder().mergeFrom(prototype);
3227     }
3228     public Builder toBuilder() { return newBuilder(this); }
3229 
3230     @java.lang.Override
3231     protected Builder newBuilderForType(
3232         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3233       Builder builder = new Builder(parent);
3234       return builder;
3235     }
3236     /**
3237      * Protobuf type {@code ExpandCell}
3238      */
3239     public static final class Builder extends
3240         com.google.protobuf.GeneratedMessage.Builder<Builder>
3241        implements com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder {
3242       public static final com.google.protobuf.Descriptors.Descriptor
3243           getDescriptor() {
3244         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandCell_descriptor;
3245       }
3246 
3247       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3248           internalGetFieldAccessorTable() {
3249         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandCell_fieldAccessorTable
3250             .ensureFieldAccessorsInitialized(
3251                 com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder.class);
3252       }
3253 
3254       // Construct using com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.newBuilder()
3255       private Builder() {
3256         maybeForceBuilderInitialization();
3257       }
3258 
3259       private Builder(
3260           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3261         super(parent);
3262         maybeForceBuilderInitialization();
3263       }
3264       private void maybeForceBuilderInitialization() {
3265         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3266         }
3267       }
3268       private static Builder create() {
3269         return new Builder();
3270       }
3271 
3272       public Builder clear() {
3273         super.clear();
3274         family_ = com.google.protobuf.ByteString.EMPTY;
3275         bitField0_ = (bitField0_ & ~0x00000001);
3276         qualify_ = com.google.protobuf.ByteString.EMPTY;
3277         bitField0_ = (bitField0_ & ~0x00000002);
3278         value_ = com.google.protobuf.ByteString.EMPTY;
3279         bitField0_ = (bitField0_ & ~0x00000004);
3280         distinctValues_ = java.util.Collections.emptyList();
3281         bitField0_ = (bitField0_ & ~0x00000008);
3282         className_ = com.google.protobuf.ByteString.EMPTY;
3283         bitField0_ = (bitField0_ & ~0x00000010);
3284         return this;
3285       }
3286 
3287       public Builder clone() {
3288         return create().mergeFrom(buildPartial());
3289       }
3290 
3291       public com.google.protobuf.Descriptors.Descriptor
3292           getDescriptorForType() {
3293         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandCell_descriptor;
3294       }
3295 
3296       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getDefaultInstanceForType() {
3297         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance();
3298       }
3299 
3300       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell build() {
3301         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell result = buildPartial();
3302         if (!result.isInitialized()) {
3303           throw newUninitializedMessageException(result);
3304         }
3305         return result;
3306       }
3307 
3308       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell buildPartial() {
3309         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell result = new com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell(this);
3310         int from_bitField0_ = bitField0_;
3311         int to_bitField0_ = 0;
3312         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3313           to_bitField0_ |= 0x00000001;
3314         }
3315         result.family_ = family_;
3316         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3317           to_bitField0_ |= 0x00000002;
3318         }
3319         result.qualify_ = qualify_;
3320         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3321           to_bitField0_ |= 0x00000004;
3322         }
3323         result.value_ = value_;
3324         if (((bitField0_ & 0x00000008) == 0x00000008)) {
3325           distinctValues_ = java.util.Collections.unmodifiableList(distinctValues_);
3326           bitField0_ = (bitField0_ & ~0x00000008);
3327         }
3328         result.distinctValues_ = distinctValues_;
3329         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3330           to_bitField0_ |= 0x00000008;
3331         }
3332         result.className_ = className_;
3333         result.bitField0_ = to_bitField0_;
3334         onBuilt();
3335         return result;
3336       }
3337 
3338       public Builder mergeFrom(com.google.protobuf.Message other) {
3339         if (other instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell) {
3340           return mergeFrom((com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell)other);
3341         } else {
3342           super.mergeFrom(other);
3343           return this;
3344         }
3345       }
3346 
3347       public Builder mergeFrom(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell other) {
3348         if (other == com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance()) return this;
3349         if (other.hasFamily()) {
3350           setFamily(other.getFamily());
3351         }
3352         if (other.hasQualify()) {
3353           setQualify(other.getQualify());
3354         }
3355         if (other.hasValue()) {
3356           setValue(other.getValue());
3357         }
3358         if (!other.distinctValues_.isEmpty()) {
3359           if (distinctValues_.isEmpty()) {
3360             distinctValues_ = other.distinctValues_;
3361             bitField0_ = (bitField0_ & ~0x00000008);
3362           } else {
3363             ensureDistinctValuesIsMutable();
3364             distinctValues_.addAll(other.distinctValues_);
3365           }
3366           onChanged();
3367         }
3368         if (other.hasClassName()) {
3369           setClassName(other.getClassName());
3370         }
3371         this.mergeUnknownFields(other.getUnknownFields());
3372         return this;
3373       }
3374 
3375       public final boolean isInitialized() {
3376         return true;
3377       }
3378 
3379       public Builder mergeFrom(
3380           com.google.protobuf.CodedInputStream input,
3381           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3382           throws java.io.IOException {
3383         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell parsedMessage = null;
3384         try {
3385           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3386         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3387           parsedMessage = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell) e.getUnfinishedMessage();
3388           throw e;
3389         } finally {
3390           if (parsedMessage != null) {
3391             mergeFrom(parsedMessage);
3392           }
3393         }
3394         return this;
3395       }
3396       private int bitField0_;
3397 
3398       // optional bytes family = 1;
3399       private com.google.protobuf.ByteString family_ = com.google.protobuf.ByteString.EMPTY;
3400       /**
3401        * <code>optional bytes family = 1;</code>
3402        */
3403       public boolean hasFamily() {
3404         return ((bitField0_ & 0x00000001) == 0x00000001);
3405       }
3406       /**
3407        * <code>optional bytes family = 1;</code>
3408        */
3409       public com.google.protobuf.ByteString getFamily() {
3410         return family_;
3411       }
3412       /**
3413        * <code>optional bytes family = 1;</code>
3414        */
3415       public Builder setFamily(com.google.protobuf.ByteString value) {
3416         if (value == null) {
3417     throw new NullPointerException();
3418   }
3419   bitField0_ |= 0x00000001;
3420         family_ = value;
3421         onChanged();
3422         return this;
3423       }
3424       /**
3425        * <code>optional bytes family = 1;</code>
3426        */
3427       public Builder clearFamily() {
3428         bitField0_ = (bitField0_ & ~0x00000001);
3429         family_ = getDefaultInstance().getFamily();
3430         onChanged();
3431         return this;
3432       }
3433 
3434       // optional bytes qualify = 2;
3435       private com.google.protobuf.ByteString qualify_ = com.google.protobuf.ByteString.EMPTY;
3436       /**
3437        * <code>optional bytes qualify = 2;</code>
3438        */
3439       public boolean hasQualify() {
3440         return ((bitField0_ & 0x00000002) == 0x00000002);
3441       }
3442       /**
3443        * <code>optional bytes qualify = 2;</code>
3444        */
3445       public com.google.protobuf.ByteString getQualify() {
3446         return qualify_;
3447       }
3448       /**
3449        * <code>optional bytes qualify = 2;</code>
3450        */
3451       public Builder setQualify(com.google.protobuf.ByteString value) {
3452         if (value == null) {
3453     throw new NullPointerException();
3454   }
3455   bitField0_ |= 0x00000002;
3456         qualify_ = value;
3457         onChanged();
3458         return this;
3459       }
3460       /**
3461        * <code>optional bytes qualify = 2;</code>
3462        */
3463       public Builder clearQualify() {
3464         bitField0_ = (bitField0_ & ~0x00000002);
3465         qualify_ = getDefaultInstance().getQualify();
3466         onChanged();
3467         return this;
3468       }
3469 
3470       // optional bytes value = 3;
3471       private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
3472       /**
3473        * <code>optional bytes value = 3;</code>
3474        */
3475       public boolean hasValue() {
3476         return ((bitField0_ & 0x00000004) == 0x00000004);
3477       }
3478       /**
3479        * <code>optional bytes value = 3;</code>
3480        */
3481       public com.google.protobuf.ByteString getValue() {
3482         return value_;
3483       }
3484       /**
3485        * <code>optional bytes value = 3;</code>
3486        */
3487       public Builder setValue(com.google.protobuf.ByteString value) {
3488         if (value == null) {
3489     throw new NullPointerException();
3490   }
3491   bitField0_ |= 0x00000004;
3492         value_ = value;
3493         onChanged();
3494         return this;
3495       }
3496       /**
3497        * <code>optional bytes value = 3;</code>
3498        */
3499       public Builder clearValue() {
3500         bitField0_ = (bitField0_ & ~0x00000004);
3501         value_ = getDefaultInstance().getValue();
3502         onChanged();
3503         return this;
3504       }
3505 
3506       // repeated bytes distinctValues = 5;
3507       private java.util.List<com.google.protobuf.ByteString> distinctValues_ = java.util.Collections.emptyList();
3508       private void ensureDistinctValuesIsMutable() {
3509         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
3510           distinctValues_ = new java.util.ArrayList<com.google.protobuf.ByteString>(distinctValues_);
3511           bitField0_ |= 0x00000008;
3512          }
3513       }
3514       /**
3515        * <code>repeated bytes distinctValues = 5;</code>
3516        */
3517       public java.util.List<com.google.protobuf.ByteString>
3518           getDistinctValuesList() {
3519         return java.util.Collections.unmodifiableList(distinctValues_);
3520       }
3521       /**
3522        * <code>repeated bytes distinctValues = 5;</code>
3523        */
3524       public int getDistinctValuesCount() {
3525         return distinctValues_.size();
3526       }
3527       /**
3528        * <code>repeated bytes distinctValues = 5;</code>
3529        */
3530       public com.google.protobuf.ByteString getDistinctValues(int index) {
3531         return distinctValues_.get(index);
3532       }
3533       /**
3534        * <code>repeated bytes distinctValues = 5;</code>
3535        */
3536       public Builder setDistinctValues(
3537           int index, com.google.protobuf.ByteString value) {
3538         if (value == null) {
3539     throw new NullPointerException();
3540   }
3541   ensureDistinctValuesIsMutable();
3542         distinctValues_.set(index, value);
3543         onChanged();
3544         return this;
3545       }
3546       /**
3547        * <code>repeated bytes distinctValues = 5;</code>
3548        */
3549       public Builder addDistinctValues(com.google.protobuf.ByteString value) {
3550         if (value == null) {
3551     throw new NullPointerException();
3552   }
3553   ensureDistinctValuesIsMutable();
3554         distinctValues_.add(value);
3555         onChanged();
3556         return this;
3557       }
3558       /**
3559        * <code>repeated bytes distinctValues = 5;</code>
3560        */
3561       public Builder addAllDistinctValues(
3562           java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
3563         ensureDistinctValuesIsMutable();
3564         super.addAll(values, distinctValues_);
3565         onChanged();
3566         return this;
3567       }
3568       /**
3569        * <code>repeated bytes distinctValues = 5;</code>
3570        */
3571       public Builder clearDistinctValues() {
3572         distinctValues_ = java.util.Collections.emptyList();
3573         bitField0_ = (bitField0_ & ~0x00000008);
3574         onChanged();
3575         return this;
3576       }
3577 
3578       // optional bytes class_name = 4;
3579       private com.google.protobuf.ByteString className_ = com.google.protobuf.ByteString.EMPTY;
3580       /**
3581        * <code>optional bytes class_name = 4;</code>
3582        */
3583       public boolean hasClassName() {
3584         return ((bitField0_ & 0x00000010) == 0x00000010);
3585       }
3586       /**
3587        * <code>optional bytes class_name = 4;</code>
3588        */
3589       public com.google.protobuf.ByteString getClassName() {
3590         return className_;
3591       }
3592       /**
3593        * <code>optional bytes class_name = 4;</code>
3594        */
3595       public Builder setClassName(com.google.protobuf.ByteString value) {
3596         if (value == null) {
3597     throw new NullPointerException();
3598   }
3599   bitField0_ |= 0x00000010;
3600         className_ = value;
3601         onChanged();
3602         return this;
3603       }
3604       /**
3605        * <code>optional bytes class_name = 4;</code>
3606        */
3607       public Builder clearClassName() {
3608         bitField0_ = (bitField0_ & ~0x00000010);
3609         className_ = getDefaultInstance().getClassName();
3610         onChanged();
3611         return this;
3612       }
3613 
3614       // @@protoc_insertion_point(builder_scope:ExpandCell)
3615     }
3616 
3617     static {
3618       defaultInstance = new ExpandCell(true);
3619       defaultInstance.initFields();
3620     }
3621 
3622     // @@protoc_insertion_point(class_scope:ExpandCell)
3623   }
3624 
3625   public interface ExpandRowOrBuilder
3626       extends com.google.protobuf.MessageOrBuilder {
3627 
3628     // repeated .ExpandCell keys = 1;
3629     /**
3630      * <code>repeated .ExpandCell keys = 1;</code>
3631      */
3632     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
3633         getKeysList();
3634     /**
3635      * <code>repeated .ExpandCell keys = 1;</code>
3636      */
3637     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getKeys(int index);
3638     /**
3639      * <code>repeated .ExpandCell keys = 1;</code>
3640      */
3641     int getKeysCount();
3642     /**
3643      * <code>repeated .ExpandCell keys = 1;</code>
3644      */
3645     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
3646         getKeysOrBuilderList();
3647     /**
3648      * <code>repeated .ExpandCell keys = 1;</code>
3649      */
3650     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getKeysOrBuilder(
3651         int index);
3652 
3653     // repeated .ExpandCell values = 2;
3654     /**
3655      * <code>repeated .ExpandCell values = 2;</code>
3656      */
3657     java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> 
3658         getValuesList();
3659     /**
3660      * <code>repeated .ExpandCell values = 2;</code>
3661      */
3662     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getValues(int index);
3663     /**
3664      * <code>repeated .ExpandCell values = 2;</code>
3665      */
3666     int getValuesCount();
3667     /**
3668      * <code>repeated .ExpandCell values = 2;</code>
3669      */
3670     java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
3671         getValuesOrBuilderList();
3672     /**
3673      * <code>repeated .ExpandCell values = 2;</code>
3674      */
3675     com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getValuesOrBuilder(
3676         int index);
3677   }
3678   /**
3679    * Protobuf type {@code ExpandRow}
3680    */
3681   public static final class ExpandRow extends
3682       com.google.protobuf.GeneratedMessage
3683       implements ExpandRowOrBuilder {
3684     // Use ExpandRow.newBuilder() to construct.
3685     private ExpandRow(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3686       super(builder);
3687       this.unknownFields = builder.getUnknownFields();
3688     }
3689     private ExpandRow(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3690 
3691     private static final ExpandRow defaultInstance;
3692     public static ExpandRow getDefaultInstance() {
3693       return defaultInstance;
3694     }
3695 
3696     public ExpandRow getDefaultInstanceForType() {
3697       return defaultInstance;
3698     }
3699 
3700     private final com.google.protobuf.UnknownFieldSet unknownFields;
3701     @java.lang.Override
3702     public final com.google.protobuf.UnknownFieldSet
3703         getUnknownFields() {
3704       return this.unknownFields;
3705     }
3706     private ExpandRow(
3707         com.google.protobuf.CodedInputStream input,
3708         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3709         throws com.google.protobuf.InvalidProtocolBufferException {
3710       initFields();
3711       int mutable_bitField0_ = 0;
3712       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3713           com.google.protobuf.UnknownFieldSet.newBuilder();
3714       try {
3715         boolean done = false;
3716         while (!done) {
3717           int tag = input.readTag();
3718           switch (tag) {
3719             case 0:
3720               done = true;
3721               break;
3722             default: {
3723               if (!parseUnknownField(input, unknownFields,
3724                                      extensionRegistry, tag)) {
3725                 done = true;
3726               }
3727               break;
3728             }
3729             case 10: {
3730               if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
3731                 keys_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
3732                 mutable_bitField0_ |= 0x00000001;
3733               }
3734               keys_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
3735               break;
3736             }
3737             case 18: {
3738               if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
3739                 values_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>();
3740                 mutable_bitField0_ |= 0x00000002;
3741               }
3742               values_.add(input.readMessage(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.PARSER, extensionRegistry));
3743               break;
3744             }
3745           }
3746         }
3747       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3748         throw e.setUnfinishedMessage(this);
3749       } catch (java.io.IOException e) {
3750         throw new com.google.protobuf.InvalidProtocolBufferException(
3751             e.getMessage()).setUnfinishedMessage(this);
3752       } finally {
3753         if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
3754           keys_ = java.util.Collections.unmodifiableList(keys_);
3755         }
3756         if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
3757           values_ = java.util.Collections.unmodifiableList(values_);
3758         }
3759         this.unknownFields = unknownFields.build();
3760         makeExtensionsImmutable();
3761       }
3762     }
3763     public static final com.google.protobuf.Descriptors.Descriptor
3764         getDescriptor() {
3765       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandRow_descriptor;
3766     }
3767 
3768     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3769         internalGetFieldAccessorTable() {
3770       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandRow_fieldAccessorTable
3771           .ensureFieldAccessorsInitialized(
3772               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder.class);
3773     }
3774 
3775     public static com.google.protobuf.Parser<ExpandRow> PARSER =
3776         new com.google.protobuf.AbstractParser<ExpandRow>() {
3777       public ExpandRow parsePartialFrom(
3778           com.google.protobuf.CodedInputStream input,
3779           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3780           throws com.google.protobuf.InvalidProtocolBufferException {
3781         return new ExpandRow(input, extensionRegistry);
3782       }
3783     };
3784 
3785     @java.lang.Override
3786     public com.google.protobuf.Parser<ExpandRow> getParserForType() {
3787       return PARSER;
3788     }
3789 
3790     // repeated .ExpandCell keys = 1;
3791     public static final int KEYS_FIELD_NUMBER = 1;
3792     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> keys_;
3793     /**
3794      * <code>repeated .ExpandCell keys = 1;</code>
3795      */
3796     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getKeysList() {
3797       return keys_;
3798     }
3799     /**
3800      * <code>repeated .ExpandCell keys = 1;</code>
3801      */
3802     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
3803         getKeysOrBuilderList() {
3804       return keys_;
3805     }
3806     /**
3807      * <code>repeated .ExpandCell keys = 1;</code>
3808      */
3809     public int getKeysCount() {
3810       return keys_.size();
3811     }
3812     /**
3813      * <code>repeated .ExpandCell keys = 1;</code>
3814      */
3815     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getKeys(int index) {
3816       return keys_.get(index);
3817     }
3818     /**
3819      * <code>repeated .ExpandCell keys = 1;</code>
3820      */
3821     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getKeysOrBuilder(
3822         int index) {
3823       return keys_.get(index);
3824     }
3825 
3826     // repeated .ExpandCell values = 2;
3827     public static final int VALUES_FIELD_NUMBER = 2;
3828     private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values_;
3829     /**
3830      * <code>repeated .ExpandCell values = 2;</code>
3831      */
3832     public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getValuesList() {
3833       return values_;
3834     }
3835     /**
3836      * <code>repeated .ExpandCell values = 2;</code>
3837      */
3838     public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
3839         getValuesOrBuilderList() {
3840       return values_;
3841     }
3842     /**
3843      * <code>repeated .ExpandCell values = 2;</code>
3844      */
3845     public int getValuesCount() {
3846       return values_.size();
3847     }
3848     /**
3849      * <code>repeated .ExpandCell values = 2;</code>
3850      */
3851     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getValues(int index) {
3852       return values_.get(index);
3853     }
3854     /**
3855      * <code>repeated .ExpandCell values = 2;</code>
3856      */
3857     public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getValuesOrBuilder(
3858         int index) {
3859       return values_.get(index);
3860     }
3861 
3862     private void initFields() {
3863       keys_ = java.util.Collections.emptyList();
3864       values_ = java.util.Collections.emptyList();
3865     }
3866     private byte memoizedIsInitialized = -1;
3867     public final boolean isInitialized() {
3868       byte isInitialized = memoizedIsInitialized;
3869       if (isInitialized != -1) return isInitialized == 1;
3870 
3871       memoizedIsInitialized = 1;
3872       return true;
3873     }
3874 
3875     public void writeTo(com.google.protobuf.CodedOutputStream output)
3876                         throws java.io.IOException {
3877       getSerializedSize();
3878       for (int i = 0; i < keys_.size(); i++) {
3879         output.writeMessage(1, keys_.get(i));
3880       }
3881       for (int i = 0; i < values_.size(); i++) {
3882         output.writeMessage(2, values_.get(i));
3883       }
3884       getUnknownFields().writeTo(output);
3885     }
3886 
3887     private int memoizedSerializedSize = -1;
3888     public int getSerializedSize() {
3889       int size = memoizedSerializedSize;
3890       if (size != -1) return size;
3891 
3892       size = 0;
3893       for (int i = 0; i < keys_.size(); i++) {
3894         size += com.google.protobuf.CodedOutputStream
3895           .computeMessageSize(1, keys_.get(i));
3896       }
3897       for (int i = 0; i < values_.size(); i++) {
3898         size += com.google.protobuf.CodedOutputStream
3899           .computeMessageSize(2, values_.get(i));
3900       }
3901       size += getUnknownFields().getSerializedSize();
3902       memoizedSerializedSize = size;
3903       return size;
3904     }
3905 
3906     private static final long serialVersionUID = 0L;
3907     @java.lang.Override
3908     protected java.lang.Object writeReplace()
3909         throws java.io.ObjectStreamException {
3910       return super.writeReplace();
3911     }
3912 
3913     @java.lang.Override
3914     public boolean equals(final java.lang.Object obj) {
3915       if (obj == this) {
3916        return true;
3917       }
3918       if (!(obj instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow)) {
3919         return super.equals(obj);
3920       }
3921       com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow other = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow) obj;
3922 
3923       boolean result = true;
3924       result = result && getKeysList()
3925           .equals(other.getKeysList());
3926       result = result && getValuesList()
3927           .equals(other.getValuesList());
3928       result = result &&
3929           getUnknownFields().equals(other.getUnknownFields());
3930       return result;
3931     }
3932 
3933     private int memoizedHashCode = 0;
3934     @java.lang.Override
3935     public int hashCode() {
3936       if (memoizedHashCode != 0) {
3937         return memoizedHashCode;
3938       }
3939       int hash = 41;
3940       hash = (19 * hash) + getDescriptorForType().hashCode();
3941       if (getKeysCount() > 0) {
3942         hash = (37 * hash) + KEYS_FIELD_NUMBER;
3943         hash = (53 * hash) + getKeysList().hashCode();
3944       }
3945       if (getValuesCount() > 0) {
3946         hash = (37 * hash) + VALUES_FIELD_NUMBER;
3947         hash = (53 * hash) + getValuesList().hashCode();
3948       }
3949       hash = (29 * hash) + getUnknownFields().hashCode();
3950       memoizedHashCode = hash;
3951       return hash;
3952     }
3953 
3954     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
3955         com.google.protobuf.ByteString data)
3956         throws com.google.protobuf.InvalidProtocolBufferException {
3957       return PARSER.parseFrom(data);
3958     }
3959     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
3960         com.google.protobuf.ByteString data,
3961         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3962         throws com.google.protobuf.InvalidProtocolBufferException {
3963       return PARSER.parseFrom(data, extensionRegistry);
3964     }
3965     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(byte[] data)
3966         throws com.google.protobuf.InvalidProtocolBufferException {
3967       return PARSER.parseFrom(data);
3968     }
3969     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
3970         byte[] data,
3971         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3972         throws com.google.protobuf.InvalidProtocolBufferException {
3973       return PARSER.parseFrom(data, extensionRegistry);
3974     }
3975     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(java.io.InputStream input)
3976         throws java.io.IOException {
3977       return PARSER.parseFrom(input);
3978     }
3979     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
3980         java.io.InputStream input,
3981         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3982         throws java.io.IOException {
3983       return PARSER.parseFrom(input, extensionRegistry);
3984     }
3985     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseDelimitedFrom(java.io.InputStream input)
3986         throws java.io.IOException {
3987       return PARSER.parseDelimitedFrom(input);
3988     }
3989     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseDelimitedFrom(
3990         java.io.InputStream input,
3991         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3992         throws java.io.IOException {
3993       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3994     }
3995     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
3996         com.google.protobuf.CodedInputStream input)
3997         throws java.io.IOException {
3998       return PARSER.parseFrom(input);
3999     }
4000     public static com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parseFrom(
4001         com.google.protobuf.CodedInputStream input,
4002         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4003         throws java.io.IOException {
4004       return PARSER.parseFrom(input, extensionRegistry);
4005     }
4006 
4007     public static Builder newBuilder() { return Builder.create(); }
4008     public Builder newBuilderForType() { return newBuilder(); }
4009     public static Builder newBuilder(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow prototype) {
4010       return newBuilder().mergeFrom(prototype);
4011     }
4012     public Builder toBuilder() { return newBuilder(this); }
4013 
4014     @java.lang.Override
4015     protected Builder newBuilderForType(
4016         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4017       Builder builder = new Builder(parent);
4018       return builder;
4019     }
4020     /**
4021      * Protobuf type {@code ExpandRow}
4022      */
4023     public static final class Builder extends
4024         com.google.protobuf.GeneratedMessage.Builder<Builder>
4025        implements com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRowOrBuilder {
4026       public static final com.google.protobuf.Descriptors.Descriptor
4027           getDescriptor() {
4028         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandRow_descriptor;
4029       }
4030 
4031       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4032           internalGetFieldAccessorTable() {
4033         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandRow_fieldAccessorTable
4034             .ensureFieldAccessorsInitialized(
4035                 com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.class, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.Builder.class);
4036       }
4037 
4038       // Construct using com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.newBuilder()
4039       private Builder() {
4040         maybeForceBuilderInitialization();
4041       }
4042 
4043       private Builder(
4044           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4045         super(parent);
4046         maybeForceBuilderInitialization();
4047       }
4048       private void maybeForceBuilderInitialization() {
4049         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4050           getKeysFieldBuilder();
4051           getValuesFieldBuilder();
4052         }
4053       }
4054       private static Builder create() {
4055         return new Builder();
4056       }
4057 
4058       public Builder clear() {
4059         super.clear();
4060         if (keysBuilder_ == null) {
4061           keys_ = java.util.Collections.emptyList();
4062           bitField0_ = (bitField0_ & ~0x00000001);
4063         } else {
4064           keysBuilder_.clear();
4065         }
4066         if (valuesBuilder_ == null) {
4067           values_ = java.util.Collections.emptyList();
4068           bitField0_ = (bitField0_ & ~0x00000002);
4069         } else {
4070           valuesBuilder_.clear();
4071         }
4072         return this;
4073       }
4074 
4075       public Builder clone() {
4076         return create().mergeFrom(buildPartial());
4077       }
4078 
4079       public com.google.protobuf.Descriptors.Descriptor
4080           getDescriptorForType() {
4081         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.internal_static_ExpandRow_descriptor;
4082       }
4083 
4084       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow getDefaultInstanceForType() {
4085         return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.getDefaultInstance();
4086       }
4087 
4088       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow build() {
4089         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow result = buildPartial();
4090         if (!result.isInitialized()) {
4091           throw newUninitializedMessageException(result);
4092         }
4093         return result;
4094       }
4095 
4096       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow buildPartial() {
4097         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow result = new com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow(this);
4098         int from_bitField0_ = bitField0_;
4099         if (keysBuilder_ == null) {
4100           if (((bitField0_ & 0x00000001) == 0x00000001)) {
4101             keys_ = java.util.Collections.unmodifiableList(keys_);
4102             bitField0_ = (bitField0_ & ~0x00000001);
4103           }
4104           result.keys_ = keys_;
4105         } else {
4106           result.keys_ = keysBuilder_.build();
4107         }
4108         if (valuesBuilder_ == null) {
4109           if (((bitField0_ & 0x00000002) == 0x00000002)) {
4110             values_ = java.util.Collections.unmodifiableList(values_);
4111             bitField0_ = (bitField0_ & ~0x00000002);
4112           }
4113           result.values_ = values_;
4114         } else {
4115           result.values_ = valuesBuilder_.build();
4116         }
4117         onBuilt();
4118         return result;
4119       }
4120 
4121       public Builder mergeFrom(com.google.protobuf.Message other) {
4122         if (other instanceof com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow) {
4123           return mergeFrom((com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow)other);
4124         } else {
4125           super.mergeFrom(other);
4126           return this;
4127         }
4128       }
4129 
4130       public Builder mergeFrom(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow other) {
4131         if (other == com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow.getDefaultInstance()) return this;
4132         if (keysBuilder_ == null) {
4133           if (!other.keys_.isEmpty()) {
4134             if (keys_.isEmpty()) {
4135               keys_ = other.keys_;
4136               bitField0_ = (bitField0_ & ~0x00000001);
4137             } else {
4138               ensureKeysIsMutable();
4139               keys_.addAll(other.keys_);
4140             }
4141             onChanged();
4142           }
4143         } else {
4144           if (!other.keys_.isEmpty()) {
4145             if (keysBuilder_.isEmpty()) {
4146               keysBuilder_.dispose();
4147               keysBuilder_ = null;
4148               keys_ = other.keys_;
4149               bitField0_ = (bitField0_ & ~0x00000001);
4150               keysBuilder_ = 
4151                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
4152                    getKeysFieldBuilder() : null;
4153             } else {
4154               keysBuilder_.addAllMessages(other.keys_);
4155             }
4156           }
4157         }
4158         if (valuesBuilder_ == null) {
4159           if (!other.values_.isEmpty()) {
4160             if (values_.isEmpty()) {
4161               values_ = other.values_;
4162               bitField0_ = (bitField0_ & ~0x00000002);
4163             } else {
4164               ensureValuesIsMutable();
4165               values_.addAll(other.values_);
4166             }
4167             onChanged();
4168           }
4169         } else {
4170           if (!other.values_.isEmpty()) {
4171             if (valuesBuilder_.isEmpty()) {
4172               valuesBuilder_.dispose();
4173               valuesBuilder_ = null;
4174               values_ = other.values_;
4175               bitField0_ = (bitField0_ & ~0x00000002);
4176               valuesBuilder_ = 
4177                 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
4178                    getValuesFieldBuilder() : null;
4179             } else {
4180               valuesBuilder_.addAllMessages(other.values_);
4181             }
4182           }
4183         }
4184         this.mergeUnknownFields(other.getUnknownFields());
4185         return this;
4186       }
4187 
4188       public final boolean isInitialized() {
4189         return true;
4190       }
4191 
4192       public Builder mergeFrom(
4193           com.google.protobuf.CodedInputStream input,
4194           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4195           throws java.io.IOException {
4196         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow parsedMessage = null;
4197         try {
4198           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4199         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4200           parsedMessage = (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow) e.getUnfinishedMessage();
4201           throw e;
4202         } finally {
4203           if (parsedMessage != null) {
4204             mergeFrom(parsedMessage);
4205           }
4206         }
4207         return this;
4208       }
4209       private int bitField0_;
4210 
4211       // repeated .ExpandCell keys = 1;
4212       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> keys_ =
4213         java.util.Collections.emptyList();
4214       private void ensureKeysIsMutable() {
4215         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
4216           keys_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(keys_);
4217           bitField0_ |= 0x00000001;
4218          }
4219       }
4220 
4221       private com.google.protobuf.RepeatedFieldBuilder<
4222           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> keysBuilder_;
4223 
4224       /**
4225        * <code>repeated .ExpandCell keys = 1;</code>
4226        */
4227       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getKeysList() {
4228         if (keysBuilder_ == null) {
4229           return java.util.Collections.unmodifiableList(keys_);
4230         } else {
4231           return keysBuilder_.getMessageList();
4232         }
4233       }
4234       /**
4235        * <code>repeated .ExpandCell keys = 1;</code>
4236        */
4237       public int getKeysCount() {
4238         if (keysBuilder_ == null) {
4239           return keys_.size();
4240         } else {
4241           return keysBuilder_.getCount();
4242         }
4243       }
4244       /**
4245        * <code>repeated .ExpandCell keys = 1;</code>
4246        */
4247       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getKeys(int index) {
4248         if (keysBuilder_ == null) {
4249           return keys_.get(index);
4250         } else {
4251           return keysBuilder_.getMessage(index);
4252         }
4253       }
4254       /**
4255        * <code>repeated .ExpandCell keys = 1;</code>
4256        */
4257       public Builder setKeys(
4258           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4259         if (keysBuilder_ == null) {
4260           if (value == null) {
4261             throw new NullPointerException();
4262           }
4263           ensureKeysIsMutable();
4264           keys_.set(index, value);
4265           onChanged();
4266         } else {
4267           keysBuilder_.setMessage(index, value);
4268         }
4269         return this;
4270       }
4271       /**
4272        * <code>repeated .ExpandCell keys = 1;</code>
4273        */
4274       public Builder setKeys(
4275           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4276         if (keysBuilder_ == null) {
4277           ensureKeysIsMutable();
4278           keys_.set(index, builderForValue.build());
4279           onChanged();
4280         } else {
4281           keysBuilder_.setMessage(index, builderForValue.build());
4282         }
4283         return this;
4284       }
4285       /**
4286        * <code>repeated .ExpandCell keys = 1;</code>
4287        */
4288       public Builder addKeys(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4289         if (keysBuilder_ == null) {
4290           if (value == null) {
4291             throw new NullPointerException();
4292           }
4293           ensureKeysIsMutable();
4294           keys_.add(value);
4295           onChanged();
4296         } else {
4297           keysBuilder_.addMessage(value);
4298         }
4299         return this;
4300       }
4301       /**
4302        * <code>repeated .ExpandCell keys = 1;</code>
4303        */
4304       public Builder addKeys(
4305           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4306         if (keysBuilder_ == null) {
4307           if (value == null) {
4308             throw new NullPointerException();
4309           }
4310           ensureKeysIsMutable();
4311           keys_.add(index, value);
4312           onChanged();
4313         } else {
4314           keysBuilder_.addMessage(index, value);
4315         }
4316         return this;
4317       }
4318       /**
4319        * <code>repeated .ExpandCell keys = 1;</code>
4320        */
4321       public Builder addKeys(
4322           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4323         if (keysBuilder_ == null) {
4324           ensureKeysIsMutable();
4325           keys_.add(builderForValue.build());
4326           onChanged();
4327         } else {
4328           keysBuilder_.addMessage(builderForValue.build());
4329         }
4330         return this;
4331       }
4332       /**
4333        * <code>repeated .ExpandCell keys = 1;</code>
4334        */
4335       public Builder addKeys(
4336           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4337         if (keysBuilder_ == null) {
4338           ensureKeysIsMutable();
4339           keys_.add(index, builderForValue.build());
4340           onChanged();
4341         } else {
4342           keysBuilder_.addMessage(index, builderForValue.build());
4343         }
4344         return this;
4345       }
4346       /**
4347        * <code>repeated .ExpandCell keys = 1;</code>
4348        */
4349       public Builder addAllKeys(
4350           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
4351         if (keysBuilder_ == null) {
4352           ensureKeysIsMutable();
4353           super.addAll(values, keys_);
4354           onChanged();
4355         } else {
4356           keysBuilder_.addAllMessages(values);
4357         }
4358         return this;
4359       }
4360       /**
4361        * <code>repeated .ExpandCell keys = 1;</code>
4362        */
4363       public Builder clearKeys() {
4364         if (keysBuilder_ == null) {
4365           keys_ = java.util.Collections.emptyList();
4366           bitField0_ = (bitField0_ & ~0x00000001);
4367           onChanged();
4368         } else {
4369           keysBuilder_.clear();
4370         }
4371         return this;
4372       }
4373       /**
4374        * <code>repeated .ExpandCell keys = 1;</code>
4375        */
4376       public Builder removeKeys(int index) {
4377         if (keysBuilder_ == null) {
4378           ensureKeysIsMutable();
4379           keys_.remove(index);
4380           onChanged();
4381         } else {
4382           keysBuilder_.remove(index);
4383         }
4384         return this;
4385       }
4386       /**
4387        * <code>repeated .ExpandCell keys = 1;</code>
4388        */
4389       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getKeysBuilder(
4390           int index) {
4391         return getKeysFieldBuilder().getBuilder(index);
4392       }
4393       /**
4394        * <code>repeated .ExpandCell keys = 1;</code>
4395        */
4396       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getKeysOrBuilder(
4397           int index) {
4398         if (keysBuilder_ == null) {
4399           return keys_.get(index);  } else {
4400           return keysBuilder_.getMessageOrBuilder(index);
4401         }
4402       }
4403       /**
4404        * <code>repeated .ExpandCell keys = 1;</code>
4405        */
4406       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
4407            getKeysOrBuilderList() {
4408         if (keysBuilder_ != null) {
4409           return keysBuilder_.getMessageOrBuilderList();
4410         } else {
4411           return java.util.Collections.unmodifiableList(keys_);
4412         }
4413       }
4414       /**
4415        * <code>repeated .ExpandCell keys = 1;</code>
4416        */
4417       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addKeysBuilder() {
4418         return getKeysFieldBuilder().addBuilder(
4419             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
4420       }
4421       /**
4422        * <code>repeated .ExpandCell keys = 1;</code>
4423        */
4424       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addKeysBuilder(
4425           int index) {
4426         return getKeysFieldBuilder().addBuilder(
4427             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
4428       }
4429       /**
4430        * <code>repeated .ExpandCell keys = 1;</code>
4431        */
4432       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
4433            getKeysBuilderList() {
4434         return getKeysFieldBuilder().getBuilderList();
4435       }
4436       private com.google.protobuf.RepeatedFieldBuilder<
4437           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
4438           getKeysFieldBuilder() {
4439         if (keysBuilder_ == null) {
4440           keysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
4441               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
4442                   keys_,
4443                   ((bitField0_ & 0x00000001) == 0x00000001),
4444                   getParentForChildren(),
4445                   isClean());
4446           keys_ = null;
4447         }
4448         return keysBuilder_;
4449       }
4450 
4451       // repeated .ExpandCell values = 2;
4452       private java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values_ =
4453         java.util.Collections.emptyList();
4454       private void ensureValuesIsMutable() {
4455         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
4456           values_ = new java.util.ArrayList<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell>(values_);
4457           bitField0_ |= 0x00000002;
4458          }
4459       }
4460 
4461       private com.google.protobuf.RepeatedFieldBuilder<
4462           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> valuesBuilder_;
4463 
4464       /**
4465        * <code>repeated .ExpandCell values = 2;</code>
4466        */
4467       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> getValuesList() {
4468         if (valuesBuilder_ == null) {
4469           return java.util.Collections.unmodifiableList(values_);
4470         } else {
4471           return valuesBuilder_.getMessageList();
4472         }
4473       }
4474       /**
4475        * <code>repeated .ExpandCell values = 2;</code>
4476        */
4477       public int getValuesCount() {
4478         if (valuesBuilder_ == null) {
4479           return values_.size();
4480         } else {
4481           return valuesBuilder_.getCount();
4482         }
4483       }
4484       /**
4485        * <code>repeated .ExpandCell values = 2;</code>
4486        */
4487       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell getValues(int index) {
4488         if (valuesBuilder_ == null) {
4489           return values_.get(index);
4490         } else {
4491           return valuesBuilder_.getMessage(index);
4492         }
4493       }
4494       /**
4495        * <code>repeated .ExpandCell values = 2;</code>
4496        */
4497       public Builder setValues(
4498           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4499         if (valuesBuilder_ == null) {
4500           if (value == null) {
4501             throw new NullPointerException();
4502           }
4503           ensureValuesIsMutable();
4504           values_.set(index, value);
4505           onChanged();
4506         } else {
4507           valuesBuilder_.setMessage(index, value);
4508         }
4509         return this;
4510       }
4511       /**
4512        * <code>repeated .ExpandCell values = 2;</code>
4513        */
4514       public Builder setValues(
4515           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4516         if (valuesBuilder_ == null) {
4517           ensureValuesIsMutable();
4518           values_.set(index, builderForValue.build());
4519           onChanged();
4520         } else {
4521           valuesBuilder_.setMessage(index, builderForValue.build());
4522         }
4523         return this;
4524       }
4525       /**
4526        * <code>repeated .ExpandCell values = 2;</code>
4527        */
4528       public Builder addValues(com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4529         if (valuesBuilder_ == null) {
4530           if (value == null) {
4531             throw new NullPointerException();
4532           }
4533           ensureValuesIsMutable();
4534           values_.add(value);
4535           onChanged();
4536         } else {
4537           valuesBuilder_.addMessage(value);
4538         }
4539         return this;
4540       }
4541       /**
4542        * <code>repeated .ExpandCell values = 2;</code>
4543        */
4544       public Builder addValues(
4545           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell value) {
4546         if (valuesBuilder_ == null) {
4547           if (value == null) {
4548             throw new NullPointerException();
4549           }
4550           ensureValuesIsMutable();
4551           values_.add(index, value);
4552           onChanged();
4553         } else {
4554           valuesBuilder_.addMessage(index, value);
4555         }
4556         return this;
4557       }
4558       /**
4559        * <code>repeated .ExpandCell values = 2;</code>
4560        */
4561       public Builder addValues(
4562           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4563         if (valuesBuilder_ == null) {
4564           ensureValuesIsMutable();
4565           values_.add(builderForValue.build());
4566           onChanged();
4567         } else {
4568           valuesBuilder_.addMessage(builderForValue.build());
4569         }
4570         return this;
4571       }
4572       /**
4573        * <code>repeated .ExpandCell values = 2;</code>
4574        */
4575       public Builder addValues(
4576           int index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder builderForValue) {
4577         if (valuesBuilder_ == null) {
4578           ensureValuesIsMutable();
4579           values_.add(index, builderForValue.build());
4580           onChanged();
4581         } else {
4582           valuesBuilder_.addMessage(index, builderForValue.build());
4583         }
4584         return this;
4585       }
4586       /**
4587        * <code>repeated .ExpandCell values = 2;</code>
4588        */
4589       public Builder addAllValues(
4590           java.lang.Iterable<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell> values) {
4591         if (valuesBuilder_ == null) {
4592           ensureValuesIsMutable();
4593           super.addAll(values, values_);
4594           onChanged();
4595         } else {
4596           valuesBuilder_.addAllMessages(values);
4597         }
4598         return this;
4599       }
4600       /**
4601        * <code>repeated .ExpandCell values = 2;</code>
4602        */
4603       public Builder clearValues() {
4604         if (valuesBuilder_ == null) {
4605           values_ = java.util.Collections.emptyList();
4606           bitField0_ = (bitField0_ & ~0x00000002);
4607           onChanged();
4608         } else {
4609           valuesBuilder_.clear();
4610         }
4611         return this;
4612       }
4613       /**
4614        * <code>repeated .ExpandCell values = 2;</code>
4615        */
4616       public Builder removeValues(int index) {
4617         if (valuesBuilder_ == null) {
4618           ensureValuesIsMutable();
4619           values_.remove(index);
4620           onChanged();
4621         } else {
4622           valuesBuilder_.remove(index);
4623         }
4624         return this;
4625       }
4626       /**
4627        * <code>repeated .ExpandCell values = 2;</code>
4628        */
4629       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder getValuesBuilder(
4630           int index) {
4631         return getValuesFieldBuilder().getBuilder(index);
4632       }
4633       /**
4634        * <code>repeated .ExpandCell values = 2;</code>
4635        */
4636       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder getValuesOrBuilder(
4637           int index) {
4638         if (valuesBuilder_ == null) {
4639           return values_.get(index);  } else {
4640           return valuesBuilder_.getMessageOrBuilder(index);
4641         }
4642       }
4643       /**
4644        * <code>repeated .ExpandCell values = 2;</code>
4645        */
4646       public java.util.List<? extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
4647            getValuesOrBuilderList() {
4648         if (valuesBuilder_ != null) {
4649           return valuesBuilder_.getMessageOrBuilderList();
4650         } else {
4651           return java.util.Collections.unmodifiableList(values_);
4652         }
4653       }
4654       /**
4655        * <code>repeated .ExpandCell values = 2;</code>
4656        */
4657       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addValuesBuilder() {
4658         return getValuesFieldBuilder().addBuilder(
4659             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
4660       }
4661       /**
4662        * <code>repeated .ExpandCell values = 2;</code>
4663        */
4664       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder addValuesBuilder(
4665           int index) {
4666         return getValuesFieldBuilder().addBuilder(
4667             index, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.getDefaultInstance());
4668       }
4669       /**
4670        * <code>repeated .ExpandCell values = 2;</code>
4671        */
4672       public java.util.List<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder> 
4673            getValuesBuilderList() {
4674         return getValuesFieldBuilder().getBuilderList();
4675       }
4676       private com.google.protobuf.RepeatedFieldBuilder<
4677           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder> 
4678           getValuesFieldBuilder() {
4679         if (valuesBuilder_ == null) {
4680           valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
4681               com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell.Builder, com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCellOrBuilder>(
4682                   values_,
4683                   ((bitField0_ & 0x00000002) == 0x00000002),
4684                   getParentForChildren(),
4685                   isClean());
4686           values_ = null;
4687         }
4688         return valuesBuilder_;
4689       }
4690 
4691       // @@protoc_insertion_point(builder_scope:ExpandRow)
4692     }
4693 
4694     static {
4695       defaultInstance = new ExpandRow(true);
4696       defaultInstance.initFields();
4697     }
4698 
4699     // @@protoc_insertion_point(class_scope:ExpandRow)
4700   }
4701 
4702   /**
4703    * Protobuf service {@code ExpandAggregationService}
4704    */
4705   public static abstract class ExpandAggregationService
4706       implements com.google.protobuf.Service {
4707     protected ExpandAggregationService() {}
4708 
4709     public interface Interface {
4710       /**
4711        * <code>rpc getGroupSumAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4712        */
4713       public abstract void getGroupSumAndCount(
4714           com.google.protobuf.RpcController controller,
4715           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4716           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4717 
4718       /**
4719        * <code>rpc getSumAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4720        */
4721       public abstract void getSumAndCount(
4722           com.google.protobuf.RpcController controller,
4723           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4724           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4725 
4726       /**
4727        * <code>rpc getSumAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4728        */
4729       public abstract void getSumAndDistictCount(
4730           com.google.protobuf.RpcController controller,
4731           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4732           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4733 
4734       /**
4735        * <code>rpc getSum(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4736        */
4737       public abstract void getSum(
4738           com.google.protobuf.RpcController controller,
4739           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4740           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4741 
4742       /**
4743        * <code>rpc getCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4744        */
4745       public abstract void getCount(
4746           com.google.protobuf.RpcController controller,
4747           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4748           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4749 
4750       /**
4751        * <code>rpc getDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4752        */
4753       public abstract void getDistictCount(
4754           com.google.protobuf.RpcController controller,
4755           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4756           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4757 
4758       /**
4759        * <code>rpc getCountAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4760        */
4761       public abstract void getCountAndDistictCount(
4762           com.google.protobuf.RpcController controller,
4763           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4764           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4765 
4766       /**
4767        * <code>rpc getGroupAndSum(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4768        */
4769       public abstract void getGroupAndSum(
4770           com.google.protobuf.RpcController controller,
4771           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4772           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4773 
4774       /**
4775        * <code>rpc getGroupAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4776        */
4777       public abstract void getGroupAndCount(
4778           com.google.protobuf.RpcController controller,
4779           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4780           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4781 
4782       /**
4783        * <code>rpc getGroupAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4784        */
4785       public abstract void getGroupAndDistictCount(
4786           com.google.protobuf.RpcController controller,
4787           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4788           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4789 
4790       /**
4791        * <code>rpc getGroupAndDistictCountAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
4792        */
4793       public abstract void getGroupAndDistictCountAndCount(
4794           com.google.protobuf.RpcController controller,
4795           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4796           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
4797 
4798     }
4799 
4800     public static com.google.protobuf.Service newReflectiveService(
4801         final Interface impl) {
4802       return new ExpandAggregationService() {
4803         @java.lang.Override
4804         public  void getGroupSumAndCount(
4805             com.google.protobuf.RpcController controller,
4806             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4807             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4808           impl.getGroupSumAndCount(controller, request, done);
4809         }
4810 
4811         @java.lang.Override
4812         public  void getSumAndCount(
4813             com.google.protobuf.RpcController controller,
4814             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4815             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4816           impl.getSumAndCount(controller, request, done);
4817         }
4818 
4819         @java.lang.Override
4820         public  void getSumAndDistictCount(
4821             com.google.protobuf.RpcController controller,
4822             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4823             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4824           impl.getSumAndDistictCount(controller, request, done);
4825         }
4826 
4827         @java.lang.Override
4828         public  void getSum(
4829             com.google.protobuf.RpcController controller,
4830             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4831             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4832           impl.getSum(controller, request, done);
4833         }
4834 
4835         @java.lang.Override
4836         public  void getCount(
4837             com.google.protobuf.RpcController controller,
4838             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4839             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4840           impl.getCount(controller, request, done);
4841         }
4842 
4843         @java.lang.Override
4844         public  void getDistictCount(
4845             com.google.protobuf.RpcController controller,
4846             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4847             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4848           impl.getDistictCount(controller, request, done);
4849         }
4850 
4851         @java.lang.Override
4852         public  void getCountAndDistictCount(
4853             com.google.protobuf.RpcController controller,
4854             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4855             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4856           impl.getCountAndDistictCount(controller, request, done);
4857         }
4858 
4859         @java.lang.Override
4860         public  void getGroupAndSum(
4861             com.google.protobuf.RpcController controller,
4862             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4863             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4864           impl.getGroupAndSum(controller, request, done);
4865         }
4866 
4867         @java.lang.Override
4868         public  void getGroupAndCount(
4869             com.google.protobuf.RpcController controller,
4870             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4871             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4872           impl.getGroupAndCount(controller, request, done);
4873         }
4874 
4875         @java.lang.Override
4876         public  void getGroupAndDistictCount(
4877             com.google.protobuf.RpcController controller,
4878             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4879             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4880           impl.getGroupAndDistictCount(controller, request, done);
4881         }
4882 
4883         @java.lang.Override
4884         public  void getGroupAndDistictCountAndCount(
4885             com.google.protobuf.RpcController controller,
4886             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
4887             com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
4888           impl.getGroupAndDistictCountAndCount(controller, request, done);
4889         }
4890 
4891       };
4892     }
4893 
4894     public static com.google.protobuf.BlockingService
4895         newReflectiveBlockingService(final BlockingInterface impl) {
4896       return new com.google.protobuf.BlockingService() {
4897         public final com.google.protobuf.Descriptors.ServiceDescriptor
4898             getDescriptorForType() {
4899           return getDescriptor();
4900         }
4901 
4902         public final com.google.protobuf.Message callBlockingMethod(
4903             com.google.protobuf.Descriptors.MethodDescriptor method,
4904             com.google.protobuf.RpcController controller,
4905             com.google.protobuf.Message request)
4906             throws com.google.protobuf.ServiceException {
4907           if (method.getService() != getDescriptor()) {
4908             throw new java.lang.IllegalArgumentException(
4909               "Service.callBlockingMethod() given method descriptor for " +
4910               "wrong service type.");
4911           }
4912           switch(method.getIndex()) {
4913             case 0:
4914               return impl.getGroupSumAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4915             case 1:
4916               return impl.getSumAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4917             case 2:
4918               return impl.getSumAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4919             case 3:
4920               return impl.getSum(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4921             case 4:
4922               return impl.getCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4923             case 5:
4924               return impl.getDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4925             case 6:
4926               return impl.getCountAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4927             case 7:
4928               return impl.getGroupAndSum(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4929             case 8:
4930               return impl.getGroupAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4931             case 9:
4932               return impl.getGroupAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4933             case 10:
4934               return impl.getGroupAndDistictCountAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request);
4935             default:
4936               throw new java.lang.AssertionError("Can't get here.");
4937           }
4938         }
4939 
4940         public final com.google.protobuf.Message
4941             getRequestPrototype(
4942             com.google.protobuf.Descriptors.MethodDescriptor method) {
4943           if (method.getService() != getDescriptor()) {
4944             throw new java.lang.IllegalArgumentException(
4945               "Service.getRequestPrototype() given method " +
4946               "descriptor for wrong service type.");
4947           }
4948           switch(method.getIndex()) {
4949             case 0:
4950               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4951             case 1:
4952               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4953             case 2:
4954               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4955             case 3:
4956               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4957             case 4:
4958               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4959             case 5:
4960               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4961             case 6:
4962               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4963             case 7:
4964               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4965             case 8:
4966               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4967             case 9:
4968               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4969             case 10:
4970               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
4971             default:
4972               throw new java.lang.AssertionError("Can't get here.");
4973           }
4974         }
4975 
4976         public final com.google.protobuf.Message
4977             getResponsePrototype(
4978             com.google.protobuf.Descriptors.MethodDescriptor method) {
4979           if (method.getService() != getDescriptor()) {
4980             throw new java.lang.IllegalArgumentException(
4981               "Service.getResponsePrototype() given method " +
4982               "descriptor for wrong service type.");
4983           }
4984           switch(method.getIndex()) {
4985             case 0:
4986               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4987             case 1:
4988               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4989             case 2:
4990               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4991             case 3:
4992               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4993             case 4:
4994               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4995             case 5:
4996               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4997             case 6:
4998               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
4999             case 7:
5000               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5001             case 8:
5002               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5003             case 9:
5004               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5005             case 10:
5006               return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5007             default:
5008               throw new java.lang.AssertionError("Can't get here.");
5009           }
5010         }
5011 
5012       };
5013     }
5014 
5015     /**
5016      * <code>rpc getGroupSumAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5017      */
5018     public abstract void getGroupSumAndCount(
5019         com.google.protobuf.RpcController controller,
5020         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5021         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5022 
5023     /**
5024      * <code>rpc getSumAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5025      */
5026     public abstract void getSumAndCount(
5027         com.google.protobuf.RpcController controller,
5028         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5029         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5030 
5031     /**
5032      * <code>rpc getSumAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5033      */
5034     public abstract void getSumAndDistictCount(
5035         com.google.protobuf.RpcController controller,
5036         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5037         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5038 
5039     /**
5040      * <code>rpc getSum(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5041      */
5042     public abstract void getSum(
5043         com.google.protobuf.RpcController controller,
5044         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5045         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5046 
5047     /**
5048      * <code>rpc getCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5049      */
5050     public abstract void getCount(
5051         com.google.protobuf.RpcController controller,
5052         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5053         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5054 
5055     /**
5056      * <code>rpc getDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5057      */
5058     public abstract void getDistictCount(
5059         com.google.protobuf.RpcController controller,
5060         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5061         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5062 
5063     /**
5064      * <code>rpc getCountAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5065      */
5066     public abstract void getCountAndDistictCount(
5067         com.google.protobuf.RpcController controller,
5068         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5069         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5070 
5071     /**
5072      * <code>rpc getGroupAndSum(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5073      */
5074     public abstract void getGroupAndSum(
5075         com.google.protobuf.RpcController controller,
5076         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5077         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5078 
5079     /**
5080      * <code>rpc getGroupAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5081      */
5082     public abstract void getGroupAndCount(
5083         com.google.protobuf.RpcController controller,
5084         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5085         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5086 
5087     /**
5088      * <code>rpc getGroupAndDistictCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5089      */
5090     public abstract void getGroupAndDistictCount(
5091         com.google.protobuf.RpcController controller,
5092         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5093         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5094 
5095     /**
5096      * <code>rpc getGroupAndDistictCountAndCount(.ExpandAggregationRequest) returns (.ExpandAggregationResponse);</code>
5097      */
5098     public abstract void getGroupAndDistictCountAndCount(
5099         com.google.protobuf.RpcController controller,
5100         com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5101         com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done);
5102 
5103     public static final
5104         com.google.protobuf.Descriptors.ServiceDescriptor
5105         getDescriptor() {
5106       return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.getDescriptor().getServices().get(0);
5107     }
5108     public final com.google.protobuf.Descriptors.ServiceDescriptor
5109         getDescriptorForType() {
5110       return getDescriptor();
5111     }
5112 
5113     public final void callMethod(
5114         com.google.protobuf.Descriptors.MethodDescriptor method,
5115         com.google.protobuf.RpcController controller,
5116         com.google.protobuf.Message request,
5117         com.google.protobuf.RpcCallback<
5118           com.google.protobuf.Message> done) {
5119       if (method.getService() != getDescriptor()) {
5120         throw new java.lang.IllegalArgumentException(
5121           "Service.callMethod() given method descriptor for wrong " +
5122           "service type.");
5123       }
5124       switch(method.getIndex()) {
5125         case 0:
5126           this.getGroupSumAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5127             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5128               done));
5129           return;
5130         case 1:
5131           this.getSumAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5132             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5133               done));
5134           return;
5135         case 2:
5136           this.getSumAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5137             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5138               done));
5139           return;
5140         case 3:
5141           this.getSum(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5142             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5143               done));
5144           return;
5145         case 4:
5146           this.getCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5147             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5148               done));
5149           return;
5150         case 5:
5151           this.getDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5152             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5153               done));
5154           return;
5155         case 6:
5156           this.getCountAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5157             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5158               done));
5159           return;
5160         case 7:
5161           this.getGroupAndSum(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5162             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5163               done));
5164           return;
5165         case 8:
5166           this.getGroupAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5167             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5168               done));
5169           return;
5170         case 9:
5171           this.getGroupAndDistictCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5172             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5173               done));
5174           return;
5175         case 10:
5176           this.getGroupAndDistictCountAndCount(controller, (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest)request,
5177             com.google.protobuf.RpcUtil.<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse>specializeCallback(
5178               done));
5179           return;
5180         default:
5181           throw new java.lang.AssertionError("Can't get here.");
5182       }
5183     }
5184 
5185     public final com.google.protobuf.Message
5186         getRequestPrototype(
5187         com.google.protobuf.Descriptors.MethodDescriptor method) {
5188       if (method.getService() != getDescriptor()) {
5189         throw new java.lang.IllegalArgumentException(
5190           "Service.getRequestPrototype() given method " +
5191           "descriptor for wrong service type.");
5192       }
5193       switch(method.getIndex()) {
5194         case 0:
5195           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5196         case 1:
5197           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5198         case 2:
5199           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5200         case 3:
5201           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5202         case 4:
5203           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5204         case 5:
5205           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5206         case 6:
5207           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5208         case 7:
5209           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5210         case 8:
5211           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5212         case 9:
5213           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5214         case 10:
5215           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest.getDefaultInstance();
5216         default:
5217           throw new java.lang.AssertionError("Can't get here.");
5218       }
5219     }
5220 
5221     public final com.google.protobuf.Message
5222         getResponsePrototype(
5223         com.google.protobuf.Descriptors.MethodDescriptor method) {
5224       if (method.getService() != getDescriptor()) {
5225         throw new java.lang.IllegalArgumentException(
5226           "Service.getResponsePrototype() given method " +
5227           "descriptor for wrong service type.");
5228       }
5229       switch(method.getIndex()) {
5230         case 0:
5231           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5232         case 1:
5233           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5234         case 2:
5235           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5236         case 3:
5237           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5238         case 4:
5239           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5240         case 5:
5241           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5242         case 6:
5243           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5244         case 7:
5245           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5246         case 8:
5247           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5248         case 9:
5249           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5250         case 10:
5251           return com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance();
5252         default:
5253           throw new java.lang.AssertionError("Can't get here.");
5254       }
5255     }
5256 
5257     public static Stub newStub(
5258         com.google.protobuf.RpcChannel channel) {
5259       return new Stub(channel);
5260     }
5261 
5262     public static final class Stub extends com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationService implements Interface {
5263       private Stub(com.google.protobuf.RpcChannel channel) {
5264         this.channel = channel;
5265       }
5266 
5267       private final com.google.protobuf.RpcChannel channel;
5268 
5269       public com.google.protobuf.RpcChannel getChannel() {
5270         return channel;
5271       }
5272 
5273       public  void getGroupSumAndCount(
5274           com.google.protobuf.RpcController controller,
5275           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5276           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5277         channel.callMethod(
5278           getDescriptor().getMethods().get(0),
5279           controller,
5280           request,
5281           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5282           com.google.protobuf.RpcUtil.generalizeCallback(
5283             done,
5284             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5285             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5286       }
5287 
5288       public  void getSumAndCount(
5289           com.google.protobuf.RpcController controller,
5290           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5291           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5292         channel.callMethod(
5293           getDescriptor().getMethods().get(1),
5294           controller,
5295           request,
5296           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5297           com.google.protobuf.RpcUtil.generalizeCallback(
5298             done,
5299             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5300             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5301       }
5302 
5303       public  void getSumAndDistictCount(
5304           com.google.protobuf.RpcController controller,
5305           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5306           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5307         channel.callMethod(
5308           getDescriptor().getMethods().get(2),
5309           controller,
5310           request,
5311           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5312           com.google.protobuf.RpcUtil.generalizeCallback(
5313             done,
5314             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5315             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5316       }
5317 
5318       public  void getSum(
5319           com.google.protobuf.RpcController controller,
5320           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5321           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5322         channel.callMethod(
5323           getDescriptor().getMethods().get(3),
5324           controller,
5325           request,
5326           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5327           com.google.protobuf.RpcUtil.generalizeCallback(
5328             done,
5329             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5330             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5331       }
5332 
5333       public  void getCount(
5334           com.google.protobuf.RpcController controller,
5335           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5336           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5337         channel.callMethod(
5338           getDescriptor().getMethods().get(4),
5339           controller,
5340           request,
5341           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5342           com.google.protobuf.RpcUtil.generalizeCallback(
5343             done,
5344             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5345             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5346       }
5347 
5348       public  void getDistictCount(
5349           com.google.protobuf.RpcController controller,
5350           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5351           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5352         channel.callMethod(
5353           getDescriptor().getMethods().get(5),
5354           controller,
5355           request,
5356           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5357           com.google.protobuf.RpcUtil.generalizeCallback(
5358             done,
5359             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5360             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5361       }
5362 
5363       public  void getCountAndDistictCount(
5364           com.google.protobuf.RpcController controller,
5365           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5366           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5367         channel.callMethod(
5368           getDescriptor().getMethods().get(6),
5369           controller,
5370           request,
5371           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5372           com.google.protobuf.RpcUtil.generalizeCallback(
5373             done,
5374             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5375             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5376       }
5377 
5378       public  void getGroupAndSum(
5379           com.google.protobuf.RpcController controller,
5380           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5381           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5382         channel.callMethod(
5383           getDescriptor().getMethods().get(7),
5384           controller,
5385           request,
5386           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5387           com.google.protobuf.RpcUtil.generalizeCallback(
5388             done,
5389             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5390             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5391       }
5392 
5393       public  void getGroupAndCount(
5394           com.google.protobuf.RpcController controller,
5395           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5396           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5397         channel.callMethod(
5398           getDescriptor().getMethods().get(8),
5399           controller,
5400           request,
5401           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5402           com.google.protobuf.RpcUtil.generalizeCallback(
5403             done,
5404             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5405             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5406       }
5407 
5408       public  void getGroupAndDistictCount(
5409           com.google.protobuf.RpcController controller,
5410           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5411           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5412         channel.callMethod(
5413           getDescriptor().getMethods().get(9),
5414           controller,
5415           request,
5416           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5417           com.google.protobuf.RpcUtil.generalizeCallback(
5418             done,
5419             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5420             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5421       }
5422 
5423       public  void getGroupAndDistictCountAndCount(
5424           com.google.protobuf.RpcController controller,
5425           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request,
5426           com.google.protobuf.RpcCallback<com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse> done) {
5427         channel.callMethod(
5428           getDescriptor().getMethods().get(10),
5429           controller,
5430           request,
5431           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance(),
5432           com.google.protobuf.RpcUtil.generalizeCallback(
5433             done,
5434             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.class,
5435             com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance()));
5436       }
5437     }
5438 
5439     public static BlockingInterface newBlockingStub(
5440         com.google.protobuf.BlockingRpcChannel channel) {
5441       return new BlockingStub(channel);
5442     }
5443 
5444     public interface BlockingInterface {
5445       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupSumAndCount(
5446           com.google.protobuf.RpcController controller,
5447           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5448           throws com.google.protobuf.ServiceException;
5449 
5450       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSumAndCount(
5451           com.google.protobuf.RpcController controller,
5452           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5453           throws com.google.protobuf.ServiceException;
5454 
5455       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSumAndDistictCount(
5456           com.google.protobuf.RpcController controller,
5457           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5458           throws com.google.protobuf.ServiceException;
5459 
5460       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSum(
5461           com.google.protobuf.RpcController controller,
5462           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5463           throws com.google.protobuf.ServiceException;
5464 
5465       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getCount(
5466           com.google.protobuf.RpcController controller,
5467           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5468           throws com.google.protobuf.ServiceException;
5469 
5470       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getDistictCount(
5471           com.google.protobuf.RpcController controller,
5472           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5473           throws com.google.protobuf.ServiceException;
5474 
5475       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getCountAndDistictCount(
5476           com.google.protobuf.RpcController controller,
5477           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5478           throws com.google.protobuf.ServiceException;
5479 
5480       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndSum(
5481           com.google.protobuf.RpcController controller,
5482           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5483           throws com.google.protobuf.ServiceException;
5484 
5485       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndCount(
5486           com.google.protobuf.RpcController controller,
5487           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5488           throws com.google.protobuf.ServiceException;
5489 
5490       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndDistictCount(
5491           com.google.protobuf.RpcController controller,
5492           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5493           throws com.google.protobuf.ServiceException;
5494 
5495       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndDistictCountAndCount(
5496           com.google.protobuf.RpcController controller,
5497           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5498           throws com.google.protobuf.ServiceException;
5499     }
5500 
5501     private static final class BlockingStub implements BlockingInterface {
5502       private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
5503         this.channel = channel;
5504       }
5505 
5506       private final com.google.protobuf.BlockingRpcChannel channel;
5507 
5508       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupSumAndCount(
5509           com.google.protobuf.RpcController controller,
5510           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5511           throws com.google.protobuf.ServiceException {
5512         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5513           getDescriptor().getMethods().get(0),
5514           controller,
5515           request,
5516           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5517       }
5518 
5519 
5520       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSumAndCount(
5521           com.google.protobuf.RpcController controller,
5522           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5523           throws com.google.protobuf.ServiceException {
5524         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5525           getDescriptor().getMethods().get(1),
5526           controller,
5527           request,
5528           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5529       }
5530 
5531 
5532       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSumAndDistictCount(
5533           com.google.protobuf.RpcController controller,
5534           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5535           throws com.google.protobuf.ServiceException {
5536         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5537           getDescriptor().getMethods().get(2),
5538           controller,
5539           request,
5540           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5541       }
5542 
5543 
5544       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getSum(
5545           com.google.protobuf.RpcController controller,
5546           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5547           throws com.google.protobuf.ServiceException {
5548         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5549           getDescriptor().getMethods().get(3),
5550           controller,
5551           request,
5552           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5553       }
5554 
5555 
5556       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getCount(
5557           com.google.protobuf.RpcController controller,
5558           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5559           throws com.google.protobuf.ServiceException {
5560         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5561           getDescriptor().getMethods().get(4),
5562           controller,
5563           request,
5564           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5565       }
5566 
5567 
5568       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getDistictCount(
5569           com.google.protobuf.RpcController controller,
5570           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5571           throws com.google.protobuf.ServiceException {
5572         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5573           getDescriptor().getMethods().get(5),
5574           controller,
5575           request,
5576           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5577       }
5578 
5579 
5580       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getCountAndDistictCount(
5581           com.google.protobuf.RpcController controller,
5582           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5583           throws com.google.protobuf.ServiceException {
5584         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5585           getDescriptor().getMethods().get(6),
5586           controller,
5587           request,
5588           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5589       }
5590 
5591 
5592       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndSum(
5593           com.google.protobuf.RpcController controller,
5594           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5595           throws com.google.protobuf.ServiceException {
5596         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5597           getDescriptor().getMethods().get(7),
5598           controller,
5599           request,
5600           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5601       }
5602 
5603 
5604       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndCount(
5605           com.google.protobuf.RpcController controller,
5606           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5607           throws com.google.protobuf.ServiceException {
5608         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5609           getDescriptor().getMethods().get(8),
5610           controller,
5611           request,
5612           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5613       }
5614 
5615 
5616       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndDistictCount(
5617           com.google.protobuf.RpcController controller,
5618           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5619           throws com.google.protobuf.ServiceException {
5620         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5621           getDescriptor().getMethods().get(9),
5622           controller,
5623           request,
5624           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5625       }
5626 
5627 
5628       public com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse getGroupAndDistictCountAndCount(
5629           com.google.protobuf.RpcController controller,
5630           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest request)
5631           throws com.google.protobuf.ServiceException {
5632         return (com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse) channel.callBlockingMethod(
5633           getDescriptor().getMethods().get(10),
5634           controller,
5635           request,
5636           com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse.getDefaultInstance());
5637       }
5638 
5639     }
5640 
5641     // @@protoc_insertion_point(class_scope:ExpandAggregationService)
5642   }
5643 
5644   private static com.google.protobuf.Descriptors.Descriptor
5645     internal_static_ExpandAggregationRequest_descriptor;
5646   private static
5647     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5648       internal_static_ExpandAggregationRequest_fieldAccessorTable;
5649   private static com.google.protobuf.Descriptors.Descriptor
5650     internal_static_ExpandAggregationResponse_descriptor;
5651   private static
5652     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5653       internal_static_ExpandAggregationResponse_fieldAccessorTable;
5654   private static com.google.protobuf.Descriptors.Descriptor
5655     internal_static_ExpandCell_descriptor;
5656   private static
5657     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5658       internal_static_ExpandCell_fieldAccessorTable;
5659   private static com.google.protobuf.Descriptors.Descriptor
5660     internal_static_ExpandRow_descriptor;
5661   private static
5662     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5663       internal_static_ExpandRow_fieldAccessorTable;
5664 
5665   public static com.google.protobuf.Descriptors.FileDescriptor
5666       getDescriptor() {
5667     return descriptor;
5668   }
5669   private static com.google.protobuf.Descriptors.FileDescriptor
5670       descriptor;
5671   static {
5672     java.lang.String[] descriptorData = {
5673       "\n\036ExpandAggregationService.proto\032\014Client" +
5674       ".proto\"\273\001\n\030ExpandAggregationRequest\022\037\n\ns" +
5675       "umColumns\030\001 \003(\0132\013.ExpandCell\022!\n\014groupCol" +
5676       "umns\030\002 \003(\0132\013.ExpandCell\022!\n\014countColumns\030" +
5677       "\003 \003(\0132\013.ExpandCell\022#\n\016distictColumns\030\004 \003" +
5678       "(\0132\013.ExpandCell\022\023\n\004scan\030\005 \002(\0132\005.Scan\"8\n\031" +
5679       "ExpandAggregationResponse\022\033\n\007results\030\001 \003" +
5680       "(\0132\n.ExpandRow\"h\n\nExpandCell\022\016\n\006family\030\001" +
5681       " \001(\014\022\017\n\007qualify\030\002 \001(\014\022\r\n\005value\030\003 \001(\014\022\026\n\016" +
5682       "distinctValues\030\005 \003(\014\022\022\n\nclass_name\030\004 \001(\014",
5683       "\"C\n\tExpandRow\022\031\n\004keys\030\001 \003(\0132\013.ExpandCell" +
5684       "\022\033\n\006values\030\002 \003(\0132\013.ExpandCell2\341\006\n\030Expand" +
5685       "AggregationService\022L\n\023getGroupSumAndCoun" +
5686       "t\022\031.ExpandAggregationRequest\032\032.ExpandAgg" +
5687       "regationResponse\022G\n\016getSumAndCount\022\031.Exp" +
5688       "andAggregationRequest\032\032.ExpandAggregatio" +
5689       "nResponse\022N\n\025getSumAndDistictCount\022\031.Exp" +
5690       "andAggregationRequest\032\032.ExpandAggregatio" +
5691       "nResponse\022?\n\006getSum\022\031.ExpandAggregationR" +
5692       "equest\032\032.ExpandAggregationResponse\022A\n\010ge",
5693       "tCount\022\031.ExpandAggregationRequest\032\032.Expa" +
5694       "ndAggregationResponse\022H\n\017getDistictCount" +
5695       "\022\031.ExpandAggregationRequest\032\032.ExpandAggr" +
5696       "egationResponse\022P\n\027getCountAndDistictCou" +
5697       "nt\022\031.ExpandAggregationRequest\032\032.ExpandAg" +
5698       "gregationResponse\022G\n\016getGroupAndSum\022\031.Ex" +
5699       "pandAggregationRequest\032\032.ExpandAggregati" +
5700       "onResponse\022I\n\020getGroupAndCount\022\031.ExpandA" +
5701       "ggregationRequest\032\032.ExpandAggregationRes" +
5702       "ponse\022P\n\027getGroupAndDistictCount\022\031.Expan",
5703       "dAggregationRequest\032\032.ExpandAggregationR" +
5704       "esponse\022X\n\037getGroupAndDistictCountAndCou" +
5705       "nt\022\031.ExpandAggregationRequest\032\032.ExpandAg" +
5706       "gregationResponseB[\n8com.xxdai.ace.persi" +
5707       "stence.hbase.jdbc.coprocessor.serviceB\027E" +
5708       "xpandAggregationProtosH\001\210\001\001\240\001\001"
5709     };
5710     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
5711       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
5712         public com.google.protobuf.ExtensionRegistry assignDescriptors(
5713             com.google.protobuf.Descriptors.FileDescriptor root) {
5714           descriptor = root;
5715           internal_static_ExpandAggregationRequest_descriptor =
5716             getDescriptor().getMessageTypes().get(0);
5717           internal_static_ExpandAggregationRequest_fieldAccessorTable = new
5718             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5719               internal_static_ExpandAggregationRequest_descriptor,
5720               new java.lang.String[] { "SumColumns", "GroupColumns", "CountColumns", "DistictColumns", "Scan", });
5721           internal_static_ExpandAggregationResponse_descriptor =
5722             getDescriptor().getMessageTypes().get(1);
5723           internal_static_ExpandAggregationResponse_fieldAccessorTable = new
5724             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5725               internal_static_ExpandAggregationResponse_descriptor,
5726               new java.lang.String[] { "Results", });
5727           internal_static_ExpandCell_descriptor =
5728             getDescriptor().getMessageTypes().get(2);
5729           internal_static_ExpandCell_fieldAccessorTable = new
5730             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5731               internal_static_ExpandCell_descriptor,
5732               new java.lang.String[] { "Family", "Qualify", "Value", "DistinctValues", "ClassName", });
5733           internal_static_ExpandRow_descriptor =
5734             getDescriptor().getMessageTypes().get(3);
5735           internal_static_ExpandRow_fieldAccessorTable = new
5736             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5737               internal_static_ExpandRow_descriptor,
5738               new java.lang.String[] { "Keys", "Values", });
5739           return null;
5740         }
5741       };
5742     com.google.protobuf.Descriptors.FileDescriptor
5743       .internalBuildGeneratedFileFrom(descriptorData,
5744         new com.google.protobuf.Descriptors.FileDescriptor[] {
5745           org.apache.hadoop.hbase.protobuf.generated.ClientProtos.getDescriptor(),
5746         }, assigner);
5747   }
5748 
5749   // @@protoc_insertion_point(outer_class_scope)
5750 }
ExpandAggregationProtos.java

 

3、继承上述的类,我们这里是叫ExpandAggregationService的抽象类是ExpandAggregationProtos.java中的内部类,再实现CoprocessorService, Coprocessor两个接口,这两个是habse协处理的必要的接口!

实现类代码:

   1    package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.impl;
   2    
   3    import java.io.IOException;
   4    import java.math.BigDecimal;
   5    import java.util.ArrayList;
   6    import java.util.List;
   7    
   8    import org.apache.commons.logging.Log;
   9    import org.apache.commons.logging.LogFactory;
  10    import org.apache.hadoop.hbase.Cell;
  11    import org.apache.hadoop.hbase.Coprocessor;
  12    import org.apache.hadoop.hbase.CoprocessorEnvironment;
  13    import org.apache.hadoop.hbase.client.Scan;
  14    import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
  15    import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
  16    import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
  17    import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
  18    import org.apache.hadoop.hbase.protobuf.ResponseConverter;
  19    import org.apache.hadoop.hbase.regionserver.InternalScanner;
  20    import org.apache.hadoop.hbase.util.Bytes;
  21    
  22    import com.google.protobuf.ByteString;
  23    import com.google.protobuf.RpcCallback;
  24    import com.google.protobuf.RpcController;
  25    import com.google.protobuf.Service;
  26    import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest;
  27    import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse;
  28    import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationService;
  29    import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell;
  30    import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow;
  31    
  32    /**  
  33     * Copyright (c) 2014, xxxxxxxx All Rights Reserved.
  34     * Package: com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.impl  
  35     *  
  36     * File: ExpandAggregationProtosImpl.java   
  37     *  
  38     * Author: lpy   
  39     * Date: 2016年1月18日  
  40     *  
  41     * Copyright @ 2016 Corpration Name  
  42     *   
  43     */
  44    public class ExpandAggregationProtosImpl
  45    extends ExpandAggregationService 
  46    implements CoprocessorService, Coprocessor{
  47        protected static final Log log = LogFactory.getLog(ExpandAggregationProtosImpl.class);
  48        private RegionCoprocessorEnvironment env;
  49        /**
  50        * @Title: getGroupSumAndCount
  51        * @Description: 
  52        * @param 
  53        * @return ExpandAggregationProtos.ExpandAggregationService
  54        * @author lpy
  55        * @throws
  56        */
  57        static class TempRow{
  58            private List<TempCell> keys = new ArrayList<TempCell>();
  59            private List<TempCell> row = new ArrayList<TempCell>();
  60    
  61            public List<TempCell> getRow() {
  62                return row;
  63            }
  64    
  65            public void setRow(List<TempCell> row) {
  66                this.row = row;
  67            }
  68    
  69            public List<TempCell> getKeys() {
  70                return keys;
  71            }
  72    
  73            public void setKeys(List<TempCell> keys) {
  74                this.keys = keys;
  75            }
  76            
  77            
  78        }
  79        static class TempCell{
  80            private String family;
  81            private String qualify;
  82            private String value;
  83            private List<String> values = new ArrayList<String>();
  84            public String getFamily() {
  85                return family;
  86            }
  87            public void setFamily(String family) {
  88                this.family = family;
  89            }
  90            public String getQualify() {
  91                return qualify;
  92            }
  93            public void setQualify(String qualify) {
  94                this.qualify = qualify;
  95            }
  96            public String getValue() {
  97                return value;
  98            }
  99            public void setValue(String value) {
 100             this.value = value;
 101         }
 102         public List<String> getValues() {
 103             return values;
 104         }
 105         public void setValues(List<String> values) {
 106             this.values = values;
 107         }
 108         public TempCell(){
 109         }
 110         public TempCell(String family,String qualify){
 111             this.family = family;
 112             this.qualify = qualify;
 113         }
 114         public TempCell(String family,String qualify,String value){
 115             this.family = family;
 116             this.qualify = qualify;
 117             this.value = value;
 118         }
 119         public TempCell(String family,String qualify,String value,boolean flag){
 120             this.family = family;
 121             this.qualify = qualify;
 122             this.values.add(value);
 123         }
 124     }
 125     
 126     
 127     @Override
 128     public void getGroupSumAndCount(RpcController controller, ExpandAggregationRequest request,
 129             RpcCallback<ExpandAggregationResponse> done) {
 130         InternalScanner scanner = null;
 131         ExpandAggregationResponse response = null;
 132         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 133         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 134         try {
 135             //sum字段的类型
 136             List<ByteString> sumListClas = new ArrayList<ByteString>();
 137             Scan scan = ProtobufUtil.toScan(request.getScan());
 138             //group By的字段
 139             List<ExpandCell>  groupList = request.getGroupColumnsList();
 140             //count 的字段
 141             List<ExpandCell>  countList = request.getCountColumnsList();
 142             //sum 的字段
 143             List<ExpandCell>  sumList = request.getSumColumnsList();
 144             
 145             for(ExpandCell eCell : sumList){
 146                 sumListClas.add(eCell.getClassName());
 147             }
 148             scanner = env.getRegion().getScanner(scan);
 149             List<Cell> results = new ArrayList<Cell>();
 150             // qualifier can be null.
 151             boolean hasMoreRows = false;
 152             do {
 153                 hasMoreRows = scanner.next(results);
 154                 TempRow tempRow = new TempRow();
 155                 for(Cell cell:results){
 156                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 157                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 158                     for(ExpandCell group:groupList){
 159                         if(family.equals(group.getFamily().toStringUtf8())
 160                                 && qualif.equals(group.getQualify().toStringUtf8())){
 161                             String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 162                             TempCell tempCell = new TempCell(family,qualif,value);
 163                             tempRow.getKeys().add(tempCell);
 164                             tempRow.getRow().add(tempCell);
 165                         }
 166                     }
 167                 }
 168                 int index = -1;
 169                 for(int j=0;j<tempResultRows.size();j++){
 170                     List<TempCell> keys = tempResultRows.get(j).getKeys();
 171                     List<TempCell> tempKeys = tempRow.getKeys();
 172                     boolean mark = true;
 173                     for(int i=0;i<keys.size();i++){
 174                         if(keys.get(i).getFamily().equals(tempKeys.get(i).getFamily()) &&
 175                                 keys.get(i).getQualify().equals(tempKeys.get(i).getQualify()) &&
 176                                 keys.get(i).getValue().equals(tempKeys.get(i).getValue())){
 177                             //index = j;
 178                             //break;
 179                             continue;
 180                         }else{
 181                             mark = false;
 182                         } 
 183                     }
 184                     if(mark) index = j;
 185                     if(index > -1){
 186                         tempRow = tempResultRows.get(j);
 187                         break;
 188                     }
 189                 }
 190                 for(Cell cell:results){
 191                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 192                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 193                     String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 194                     for(int i=0;i<sumList.size();i++){
 195                         ExpandCell sumCell = sumList.get(i);
 196                         if(sumCell.getFamily().toStringUtf8().equals(family)&&
 197                                 sumCell.getQualify().toStringUtf8().equals(qualif)){//是sum例
 198                             boolean sumCheck = false;//tempRow行中不存在
 199                             List<TempCell> tempRowCell = tempRow.getRow();
 200                             for(TempCell tempCell:tempRowCell){
 201                                 if(tempCell.getFamily().equals(family) && tempCell.getQualify().equals(qualif)){
 202                                     sumCheck = true;
 203                                     String tempValue = tempCell.getValue();
 204                                     tempValue = AddValue(value, tempValue, sumListClas.get(i));
 205                                     if(tempValue != null)
 206                                         tempCell.setValue(tempValue);
 207                                     else
 208                                         tempCell.setValue(0+"");
 209                                     break;
 210                                 }
 211                             }
 212                             if(!sumCheck){
 213                                 if(value == null || value.equals(""))
 214                                     tempRow.getRow().add(new TempCell(family, qualif, "0"));
 215                                 else
 216                                     tempRow.getRow().add(new TempCell(family, qualif, value));
 217                             }
 218                             break;
 219                         }
 220                     }
 221                 }
 222                 
 223                 for(ExpandCell countCell : countList){
 224                     if(tempRow.getRow().size() > 0){
 225                         List<TempCell>  tempCell = tempRow.getRow();
 226                         boolean countCheck = false;
 227                         for(TempCell tc : tempCell){
 228                             if(tc.getFamily().equals(countCell.getFamily().toStringUtf8()) &&
 229                                     tc.getQualify().equals(countCell.getQualify().toStringUtf8())){
 230                                 countCheck = true;
 231                                 String value = tc.getValue();
 232                                 value = AddValue(value, "1", ByteString.copyFromUtf8("Long"));
 233                                 if(value == null)
 234                                     tc.setValue("1");
 235                                 else
 236                                     tc.setValue(value);
 237                                 break;
 238                             }
 239                         }
 240                         if(!countCheck){
 241                             tempRow.getRow().add(new TempCell(countCell.getFamily().toStringUtf8(),
 242                                     countCell.getQualify().toStringUtf8(),"1"));
 243                         }
 244                     }
 245                 }
 246                 
 247                 if(index > -1){
 248                     tempResultRows.remove(index);
 249                     tempResultRows.add(index,tempRow);
 250                 }else
 251                     tempResultRows.add(tempRow);
 252                 results.clear();
 253               } while (hasMoreRows);
 254             
 255             if(tempResultRows.size() > 0){
 256                 for(TempRow tempRow:tempResultRows){
 257                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 258                     List<TempCell> tempKeys = tempRow.getKeys();
 259                     List<TempCell> tempValues =  tempRow.getRow();
 260                     for(TempCell key : tempKeys){
 261                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 262                         cellBuilder.setFamily(ByteString.copyFromUtf8(key.getFamily()));
 263                         cellBuilder.setQualify(ByteString.copyFromUtf8(key.getQualify()));
 264                         cellBuilder.setValue(ByteString.copyFromUtf8(key.getValue()));
 265                         rowBuilder.addKeys(cellBuilder.build());
 266                     }
 267                     for(TempCell v : tempValues){
 268                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 269                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 270                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 271                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 272                         rowBuilder.addValues(cellBuilder.build());
 273                     }
 274                     resultRows.add(rowBuilder.build());
 275                 }
 276             }
 277             if(resultRows.size() > 0){
 278                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 279                 responseBuilder.addAllResults(resultRows);
 280                 response = responseBuilder.build();
 281             }
 282         }catch(IOException e){
 283             ResponseConverter.setControllerException(controller, e);
 284         }
 285         finally{
 286             if (scanner != null) {
 287                 try {
 288                   scanner.close();
 289                 } catch (IOException ignored) {}
 290              }
 291         }
 292         log.debug("group by size from this region is "
 293                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 294         done.run(response);
 295         
 296     }
 297  
 298     /**
 299     * @Title: getSumAndCount
 300     * @Description: 
 301     * @param 
 302     * @return ExpandAggregationProtos.ExpandAggregationService
 303     * @author lpy
 304     * @throws
 305     */
 306     @Override
 307     public void getSumAndCount(RpcController controller, ExpandAggregationRequest request,
 308             RpcCallback<ExpandAggregationResponse> done) {
 309         InternalScanner scanner = null;
 310         ExpandAggregationResponse response = null;
 311         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 312         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 313         try {
 314             //sum字段的类型
 315             List<ByteString> sumListClas = new ArrayList<ByteString>();
 316             Scan scan = ProtobufUtil.toScan(request.getScan());
 317             //count 的字段
 318             List<ExpandCell>  countList = request.getCountColumnsList();
 319             //sum 的字段
 320             List<ExpandCell>  sumList = request.getSumColumnsList();
 321             
 322             for(ExpandCell eCell : sumList){
 323                 sumListClas.add(eCell.getClassName());
 324             }
 325             scanner = env.getRegion().getScanner(scan);
 326             List<Cell> results = new ArrayList<Cell>();
 327             // qualifier can be null.
 328             boolean hasMoreRows = false;
 329             do {
 330                 hasMoreRows = scanner.next(results);
 331                 TempRow tempRow = null;
 332                 if(tempResultRows.size() > 0){
 333                     tempRow = tempResultRows.get(0);
 334                 }else
 335                     tempRow = new TempRow();
 336                 
 337                 for(Cell cell:results){
 338                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 339                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 340                     String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 341                     for(int i=0;i<sumList.size();i++){
 342                         ExpandCell sumCell = sumList.get(i);
 343                         if(sumCell.getFamily().toStringUtf8().equals(family)&&
 344                                 sumCell.getQualify().toStringUtf8().equals(qualif)){//是sum例
 345                             boolean sumCheck = false;//tempRow行中不存在
 346                             List<TempCell> tempRowCell = tempRow.getRow();
 347                             for(TempCell tempCell:tempRowCell){
 348                                 if(tempCell.getFamily().equals(family) && tempCell.getQualify().equals(qualif)){
 349                                     sumCheck = true;
 350                                     String tempValue = tempCell.getValue();
 351                                     tempValue = AddValue(value, tempValue, sumListClas.get(i));
 352                                     if(tempValue != null)
 353                                         tempCell.setValue(tempValue);
 354                                     else
 355                                         tempCell.setValue(0+"");
 356                                     break;
 357                                 }
 358                             }
 359                             if(!sumCheck){
 360                                 tempRow.getRow().add(new TempCell(family, qualif, value));
 361                             }
 362                             break;
 363                         }
 364                     }
 365                 }
 366                 
 367                 for(ExpandCell countCell : countList){
 368                     if(tempRow.getRow().size() > 0){
 369                         List<TempCell>  tempCell = tempRow.getRow();
 370                         boolean countCheck = false;
 371                         for(TempCell tc : tempCell){
 372                             if(tc.getFamily().equals(countCell.getFamily().toStringUtf8()) &&
 373                                     tc.getQualify().equals(countCell.getQualify().toStringUtf8())){
 374                                 countCheck = true;
 375                                 String value = tc.getValue();
 376                                 value = AddValue(value, "1", ByteString.copyFromUtf8("Long"));
 377                                 if(value == null)
 378                                     tc.setValue("1");
 379                                 else
 380                                     tc.setValue(value);
 381                                 break;
 382                             }
 383                         }
 384                         if(!countCheck){
 385                             tempRow.getRow().add(new TempCell(countCell.getFamily().toStringUtf8(),
 386                                     countCell.getQualify().toStringUtf8(),"1"));
 387                         }
 388                     }
 389                 }
 390                 if(tempResultRows.size() > 0){
 391                     tempResultRows.remove(0);
 392                 }
 393                 tempResultRows.add(tempRow);
 394                 results.clear();
 395               } while (hasMoreRows);
 396             
 397             if(tempResultRows.size() > 0){
 398                 for(TempRow tempRow:tempResultRows){
 399                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 400                     List<TempCell> tempValues =  tempRow.getRow();
 401                     for(TempCell v : tempValues){
 402                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 403                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 404                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 405                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 406                         rowBuilder.addValues(cellBuilder.build());
 407                     }
 408                     resultRows.add(rowBuilder.build());
 409                 }
 410             }
 411             if(resultRows.size() > 0){
 412                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 413                 responseBuilder.addAllResults(resultRows);
 414                 response = responseBuilder.build();
 415             }
 416         }catch(IOException e){
 417             ResponseConverter.setControllerException(controller, e);
 418         }
 419         finally{
 420             if (scanner != null) {
 421                 try {
 422                   scanner.close();
 423                 } catch (IOException ignored) {}
 424              }
 425         }
 426         log.debug("count and sum size from this region is "
 427                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 428         done.run(response);
 429     }
 430  
 431     
 432     
 433     /**
 434     * @Title: getSum
 435     * @Description: 
 436     * @param 
 437     * @return ExpandAggregationProtos.ExpandAggregationService
 438     * @author lpy
 439     * @throws
 440     */
 441     @Override
 442     public void getSum(RpcController controller, ExpandAggregationRequest request,
 443             RpcCallback<ExpandAggregationResponse> done) {
 444         InternalScanner scanner = null;
 445         ExpandAggregationResponse response = null;
 446         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 447         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 448         try {
 449             //sum字段的类型
 450             List<ByteString> sumListClas = new ArrayList<ByteString>();
 451             Scan scan = ProtobufUtil.toScan(request.getScan());
 452             //sum 的字段
 453             List<ExpandCell>  sumList = request.getSumColumnsList();
 454             
 455             for(ExpandCell eCell : sumList){
 456                 sumListClas.add(eCell.getClassName());
 457             }
 458             scanner = env.getRegion().getScanner(scan);
 459             List<Cell> results = new ArrayList<Cell>();
 460             // qualifier can be null.
 461             boolean hasMoreRows = false;
 462             do {
 463                 hasMoreRows = scanner.next(results);
 464                 TempRow tempRow = null;
 465                 if(tempResultRows.size() > 0){
 466                     tempRow = tempResultRows.get(0);
 467                 }else
 468                     tempRow = new TempRow();
 469                 
 470                 for(Cell cell:results){
 471                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 472                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 473                     String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 474                     for(int i=0;i<sumList.size();i++){
 475                         ExpandCell sumCell = sumList.get(i);
 476                         if(sumCell.getFamily().toStringUtf8().equals(family)&&
 477                                 sumCell.getQualify().toStringUtf8().equals(qualif)){//是sum例
 478                             boolean sumCheck = false;//tempRow行中不存在
 479                             List<TempCell> tempRowCell = tempRow.getRow();
 480                             for(TempCell tempCell:tempRowCell){
 481                                 if(tempCell.getFamily().equals(family) && tempCell.getQualify().equals(qualif)){
 482                                     sumCheck = true;
 483                                     String tempValue = tempCell.getValue();
 484                                     tempValue = AddValue(value, tempValue, sumListClas.get(i));
 485                                     if(tempValue != null)
 486                                         tempCell.setValue(tempValue);
 487                                     else
 488                                         tempCell.setValue(0+"");
 489                                     break;
 490                                 }
 491                             }
 492                             if(!sumCheck){
 493                                 tempRow.getRow().add(new TempCell(family, qualif, value));
 494                             }
 495                             break;
 496                         }
 497                     }
 498                 }
 499                 
 500                 if(tempResultRows.size() > 0){
 501                     tempResultRows.remove(0);
 502                 }
 503                 tempResultRows.add(tempRow);
 504                 results.clear();
 505               } while (hasMoreRows);
 506             
 507             if(tempResultRows.size() > 0){
 508                 for(TempRow tempRow:tempResultRows){
 509                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 510                     List<TempCell> tempValues =  tempRow.getRow();
 511                     for(TempCell v : tempValues){
 512                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 513                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 514                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 515                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 516                         rowBuilder.addValues(cellBuilder.build());
 517                     }
 518                     resultRows.add(rowBuilder.build());
 519                 }
 520             }
 521             if(resultRows.size() > 0){
 522                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 523                 responseBuilder.addAllResults(resultRows);
 524                 response = responseBuilder.build();
 525             }
 526         }catch(IOException e){
 527             ResponseConverter.setControllerException(controller, e);
 528         }
 529         finally{
 530             if (scanner != null) {
 531                 try {
 532                   scanner.close();
 533                 } catch (IOException ignored) {}
 534              }
 535         }
 536         log.debug("count and sum size from this region is "
 537                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 538         done.run(response);
 539     }
 540  
 541     /**
 542     * @Title: getCount
 543     * @Description: 
 544     * @param 
 545     * @return ExpandAggregationProtos.ExpandAggregationService
 546     * @author lpy
 547     * @throws
 548     */
 549     @Override
 550     public void getCount(RpcController controller, ExpandAggregationRequest request,
 551             RpcCallback<ExpandAggregationResponse> done) {
 552         InternalScanner scanner = null;
 553         ExpandAggregationResponse response = null;
 554         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 555         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 556         try {
 557             Scan scan = ProtobufUtil.toScan(request.getScan());
 558             //count 的字段
 559             List<ExpandCell>  countList = request.getCountColumnsList();
 560             scanner = env.getRegion().getScanner(scan);
 561             List<Cell> results = new ArrayList<Cell>();
 562             // qualifier can be null.
 563             boolean hasMoreRows = false;
 564             do {
 565                 hasMoreRows = scanner.next(results);
 566                 TempRow tempRow = null;
 567                 if(tempResultRows.size() > 0){
 568                     tempRow = tempResultRows.get(0);
 569                 }else
 570                     tempRow = new TempRow();
 571                 for(ExpandCell countCell : countList){
 572                     if(tempRow.getRow().size() > 0){
 573                         List<TempCell>  tempCell = tempRow.getRow();
 574                         boolean countCheck = false;
 575                         for(TempCell tc : tempCell){
 576                             if(tc.getFamily().equals(countCell.getFamily().toStringUtf8()) &&
 577                                     tc.getQualify().equals(countCell.getQualify().toStringUtf8())){
 578                                 countCheck = true;
 579                                 String value = tc.getValue();
 580                                 value = AddValue(value, "1", ByteString.copyFromUtf8("Long"));
 581                                 if(value == null)
 582                                     tc.setValue("1");
 583                                 else
 584                                     tc.setValue(value);
 585                                 break;
 586                             }
 587                         }
 588                         if(!countCheck){
 589                             tempRow.getRow().add(new TempCell(countCell.getFamily().toStringUtf8(),
 590                                     countCell.getQualify().toStringUtf8(),"1"));
 591                         }
 592                     }else{
 593                         tempRow.getRow().add(new TempCell(countCell.getFamily().toStringUtf8(),
 594                                 countCell.getQualify().toStringUtf8(),"1"));
 595                     }
 596                 }
 597                 if(tempResultRows.size() > 0){
 598                     tempResultRows.remove(0);
 599                 }
 600                 tempResultRows.add(tempRow);
 601                 results.clear();
 602               } while (hasMoreRows);
 603             
 604             if(tempResultRows.size() > 0){
 605                 for(TempRow tempRow:tempResultRows){
 606                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 607                     List<TempCell> tempValues =  tempRow.getRow();
 608                     for(TempCell v : tempValues){
 609                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 610                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 611                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 612                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 613                         rowBuilder.addValues(cellBuilder.build());
 614                     }
 615                     resultRows.add(rowBuilder.build());
 616                 }
 617             }
 618             if(resultRows.size() > 0){
 619                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 620                 responseBuilder.addAllResults(resultRows);
 621                 response = responseBuilder.build();
 622             }
 623         }catch(IOException e){
 624             ResponseConverter.setControllerException(controller, e);
 625         }
 626         finally{
 627             if (scanner != null) {
 628                 try {
 629                   scanner.close();
 630                 } catch (IOException ignored) {}
 631              }
 632         }
 633         log.debug("count and sum size from this region is "
 634                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 635         done.run(response);
 636         
 637     }
 638  
 639     
 640  
 641     /**
 642     * @Title: getGroupAndSum
 643     * @Description: 
 644     * @param 
 645     * @return ExpandAggregationProtos.ExpandAggregationService
 646     * @author lpy
 647     * @throws
 648     */
 649     @Override
 650     public void getGroupAndSum(RpcController controller, ExpandAggregationRequest request,
 651             RpcCallback<ExpandAggregationResponse> done) {
 652         InternalScanner scanner = null;
 653         ExpandAggregationResponse response = null;
 654         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 655         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 656         try {
 657             //sum字段的类型
 658             List<ByteString> sumListClas = new ArrayList<ByteString>();
 659             Scan scan = ProtobufUtil.toScan(request.getScan());
 660             //group By的字段
 661             List<ExpandCell>  groupList = request.getGroupColumnsList();
 662             //sum 的字段
 663             List<ExpandCell>  sumList = request.getSumColumnsList();
 664             
 665             for(ExpandCell eCell : sumList){
 666                 sumListClas.add(eCell.getClassName());
 667             }
 668             scanner = env.getRegion().getScanner(scan);
 669             List<Cell> results = new ArrayList<Cell>();
 670             // qualifier can be null.
 671             boolean hasMoreRows = false;
 672             do {
 673                 hasMoreRows = scanner.next(results);
 674                 TempRow tempRow = new TempRow();
 675                 for(Cell cell:results){
 676                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 677                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 678                     for(ExpandCell group:groupList){
 679                         if(family.equals(group.getFamily().toStringUtf8())
 680                                 && qualif.equals(group.getQualify().toStringUtf8())){
 681                             String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 682                             TempCell tempCell = new TempCell(family,qualif,value);
 683                             tempRow.getKeys().add(tempCell);
 684                             tempRow.getRow().add(tempCell);
 685                         }
 686                     }
 687                 }
 688                 int index = -1;
 689                 for(int j=0;j<tempResultRows.size();j++){
 690                     List<TempCell> keys = tempResultRows.get(j).getKeys();
 691                     List<TempCell> tempKeys = tempRow.getKeys();
 692                     boolean mark = true;
 693                     for(int i=0;i<keys.size();i++){
 694                         if(keys.get(i).getFamily().equals(tempKeys.get(i).getFamily()) &&
 695                                 keys.get(i).getQualify().equals(tempKeys.get(i).getQualify()) &&
 696                                 keys.get(i).getValue().equals(tempKeys.get(i).getValue())){
 697                             //index = j;
 698                             //break;
 699                             continue;
 700                         }else{
 701                             mark = false;
 702                         } 
 703                     }
 704                     if(mark) index = j;
 705                     if(index > -1){
 706                         tempRow = tempResultRows.get(j);
 707                         break;
 708                     }
 709                 }
 710                 for(Cell cell:results){
 711                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 712                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 713                     String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 714                     for(int i=0;i<sumList.size();i++){
 715                         ExpandCell sumCell = sumList.get(i);
 716                         if(sumCell.getFamily().toStringUtf8().equals(family)&&
 717                                 sumCell.getQualify().toStringUtf8().equals(qualif)){//是sum例
 718                             boolean sumCheck = false;//tempRow行中不存在
 719                             List<TempCell> tempRowCell = tempRow.getRow();
 720                             for(TempCell tempCell:tempRowCell){
 721                                 if(tempCell.getFamily().equals(family) && tempCell.getQualify().equals(qualif)){
 722                                     sumCheck = true;
 723                                     String tempValue = tempCell.getValue();
 724                                     tempValue = AddValue(value, tempValue, sumListClas.get(i));
 725                                     if(tempValue != null)
 726                                         tempCell.setValue(tempValue);
 727                                     else
 728                                         tempCell.setValue(0+"");
 729                                     break;
 730                                 }
 731                             }
 732                             if(!sumCheck){
 733                                 tempRow.getRow().add(new TempCell(family, qualif, value));
 734                             }
 735                             break;
 736                         }
 737                     }
 738                 }
 739                 
 740                 if(index > -1){
 741                     tempResultRows.remove(index);
 742                     tempResultRows.add(index,tempRow);
 743                 }else
 744                     tempResultRows.add(tempRow);
 745                 results.clear();
 746               } while (hasMoreRows);
 747             
 748             if(tempResultRows.size() > 0){
 749                 for(TempRow tempRow:tempResultRows){
 750                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 751                     List<TempCell> tempKeys = tempRow.getKeys();
 752                     List<TempCell> tempValues =  tempRow.getRow();
 753                     for(TempCell key : tempKeys){
 754                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 755                         cellBuilder.setFamily(ByteString.copyFromUtf8(key.getFamily()));
 756                         cellBuilder.setQualify(ByteString.copyFromUtf8(key.getQualify()));
 757                         cellBuilder.setValue(ByteString.copyFromUtf8(key.getValue()));
 758                         rowBuilder.addKeys(cellBuilder.build());
 759                     }
 760                     for(TempCell v : tempValues){
 761                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 762                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 763                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 764                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 765                         rowBuilder.addValues(cellBuilder.build());
 766                     }
 767                     resultRows.add(rowBuilder.build());
 768                 }
 769             }
 770             if(resultRows.size() > 0){
 771                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 772                 responseBuilder.addAllResults(resultRows);
 773                 response = responseBuilder.build();
 774             }
 775         }catch(IOException e){
 776             ResponseConverter.setControllerException(controller, e);
 777         }
 778         finally{
 779             if (scanner != null) {
 780                 try {
 781                   scanner.close();
 782                 } catch (IOException ignored) {}
 783              }
 784         }
 785         log.debug("group by size from this region is "
 786                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 787         done.run(response);
 788         
 789     }
 790     
 791     
 792  
 793     /**
 794     * @Title: getGroupAndCount
 795     * @Description: 
 796     * @param 
 797     * @return ExpandAggregationProtos.ExpandAggregationService
 798     * @author lpy
 799     * @throws
 800     */
 801     @Override
 802     public void getGroupAndCount(RpcController controller, ExpandAggregationRequest request,
 803             RpcCallback<ExpandAggregationResponse> done) {
 804         InternalScanner scanner = null;
 805         ExpandAggregationResponse response = null;
 806         List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 807         List<TempRow> tempResultRows = new ArrayList<TempRow>();
 808         try {
 809             Scan scan = ProtobufUtil.toScan(request.getScan());
 810             //group By的字段
 811             List<ExpandCell>  groupList = request.getGroupColumnsList();
 812             //count 的字段
 813             List<ExpandCell>  countList = request.getCountColumnsList();
 814             
 815             scanner = env.getRegion().getScanner(scan);
 816             List<Cell> results = new ArrayList<Cell>();
 817             // qualifier can be null.
 818             boolean hasMoreRows = false;
 819             do {
 820                 hasMoreRows = scanner.next(results);
 821                 TempRow tempRow = new TempRow();
 822                 for(Cell cell:results){
 823                     String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 824                     String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 825                     for(ExpandCell group:groupList){
 826                         if(family.equals(group.getFamily().toStringUtf8())
 827                                 && qualif.equals(group.getQualify().toStringUtf8())){
 828                             String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
 829                             TempCell tempCell = new TempCell(family,qualif,value);
 830                             tempRow.getKeys().add(tempCell);
 831                             tempRow.getRow().add(tempCell);
 832                         }
 833                     }
 834                 }
 835                 int index = -1;
 836                 for(int j=0;j<tempResultRows.size();j++){
 837                     List<TempCell> keys = tempResultRows.get(j).getKeys();
 838                     List<TempCell> tempKeys = tempRow.getKeys();
 839                     boolean mark = true;
 840                     for(int i=0;i<keys.size();i++){
 841                         if(keys.get(i).getFamily().equals(tempKeys.get(i).getFamily()) &&
 842                                 keys.get(i).getQualify().equals(tempKeys.get(i).getQualify()) &&
 843                                 keys.get(i).getValue().equals(tempKeys.get(i).getValue())){
 844                             //index = j;
 845                             //break;
 846                             continue;
 847                         }else{
 848                             mark = false;
 849                         } 
 850                     }
 851                     if(mark) index = j;
 852                     if(index > -1){
 853                         tempRow = tempResultRows.get(j);
 854                         break;
 855                     }
 856                 }
 857                 for(ExpandCell countCell : countList){
 858                     if(tempRow.getRow().size() > 0){
 859                         List<TempCell>  tempCell = tempRow.getRow();
 860                         boolean countCheck = false;
 861                         for(TempCell tc : tempCell){
 862                             if(tc.getFamily().equals(countCell.getFamily().toStringUtf8()) &&
 863                                     tc.getQualify().equals(countCell.getQualify().toStringUtf8())){
 864                                 countCheck = true;
 865                                 String value = tc.getValue();
 866                                 value = AddValue(value, "1", ByteString.copyFromUtf8("Long"));
 867                                 if(value == null)
 868                                     tc.setValue("1");
 869                                 else
 870                                     tc.setValue(value);
 871                                 break;
 872                             }
 873                         }
 874                         if(!countCheck){
 875                             tempRow.getRow().add(new TempCell(countCell.getFamily().toStringUtf8(),
 876                                     countCell.getQualify().toStringUtf8(),"1"));
 877                         }
 878                     }
 879                 }
 880                 
 881                 if(index > -1){
 882                     tempResultRows.remove(index);
 883                     tempResultRows.add(index,tempRow);
 884                 }else
 885                     tempResultRows.add(tempRow);
 886                 results.clear();
 887               } while (hasMoreRows);
 888             
 889             if(tempResultRows.size() > 0){
 890                 for(TempRow tempRow:tempResultRows){
 891                     ExpandRow.Builder rowBuilder = ExpandRow.newBuilder();
 892                     List<TempCell> tempKeys = tempRow.getKeys();
 893                     List<TempCell> tempValues =  tempRow.getRow();
 894                     for(TempCell key : tempKeys){
 895                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 896                         cellBuilder.setFamily(ByteString.copyFromUtf8(key.getFamily()));
 897                         cellBuilder.setQualify(ByteString.copyFromUtf8(key.getQualify()));
 898                         cellBuilder.setValue(ByteString.copyFromUtf8(key.getValue()));
 899                         rowBuilder.addKeys(cellBuilder.build());
 900                     }
 901                     for(TempCell v : tempValues){
 902                         ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
 903                         cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
 904                         cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
 905                         cellBuilder.setValue(ByteString.copyFromUtf8(v.getValue()));
 906                         rowBuilder.addValues(cellBuilder.build());
 907                     }
 908                     resultRows.add(rowBuilder.build());
 909                 }
 910             }
 911             if(resultRows.size() > 0){
 912                 ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
 913                 responseBuilder.addAllResults(resultRows);
 914                 response = responseBuilder.build();
 915             }
 916         }catch(IOException e){
 917             ResponseConverter.setControllerException(controller, e);
 918         }
 919         finally{
 920             if (scanner != null) {
 921                 try {
 922                   scanner.close();
 923                 } catch (IOException ignored) {}
 924              }
 925         }
 926         log.debug("group by size from this region is "
 927                 + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
 928         done.run(response);
 929         
 930         
 931     }
 932  
 933     /**
 934     * @Title: getGroupAndDistictCount
 935     * @Description: 
 936     * @param 
 937     * @return ExpandAggregationProtos.ExpandAggregationService
 938     * @author lpy
 939     * @throws
 940     */
 941     @Override
 942     public void getGroupAndDistictCount(RpcController controller, ExpandAggregationRequest request,
 943             RpcCallback<ExpandAggregationResponse> done) {
 944         
 945         
 946     }
 947  
 948     
 949     /**
 950     * @Title: getGroupAndDistictCountAndCount
 951     * @Description: 
 952     * @param 
 953     * @return ExpandAggregationProtos.ExpandAggregationService
 954     * @author lpy
 955     * @throws
 956     */
 957     @Override
 958     public void getGroupAndDistictCountAndCount(RpcController controller, ExpandAggregationRequest request,
 959               RpcCallback<ExpandAggregationResponse> done) {
 960           
 961           
 962       }
 963       
 964       /**
 965       * @Title: getDistictCount
 966       * @Description: 
 967       * @param 
 968       * @return ExpandAggregationProtos.ExpandAggregationService
 969       * @author lpy
 970       * @throws
 971       */
 972       @Override
 973       public void getDistictCount(RpcController controller, ExpandAggregationRequest request,
 974               RpcCallback<ExpandAggregationResponse> done) {
 975           InternalScanner scanner = null;
 976           ExpandAggregationResponse response = null;
 977           List<ExpandRow> resultRows = new ArrayList<ExpandRow>();
 978           List<TempRow> tempResultRows = new ArrayList<TempRow>();
 979           try {
 980               Scan scan = ProtobufUtil.toScan(request.getScan());
 981               //count 的字段
 982               List<ExpandCell>  distinctCountList = request.getDistictColumnsList();
 983               
 984               scanner = env.getRegion().getScanner(scan);
 985               List<Cell> results = new ArrayList<Cell>();
 986               // qualifier can be null.
 987               boolean hasMoreRows = false;
 988               do {
 989                   hasMoreRows = scanner.next(results);
 990                   TempRow tempRow = null;
 991                   if(tempResultRows.size() > 0){
 992                       tempRow = tempResultRows.get(0);
 993                   }else{
 994                       tempRow = new TempRow();
 995                   }
 996                   for(Cell cell:results){
 997                       String family = Bytes.toString(cell.getFamilyArray(),cell.getFamilyOffset(),cell.getFamilyLength());
 998                       String qualif = Bytes.toString(cell.getQualifierArray(),cell.getQualifierOffset(),cell.getQualifierLength());
 999                       String value = Bytes.toString(cell.getValueArray(),cell.getValueOffset(),cell.getQualifierLength());
1000                      for(ExpandCell eCell : distinctCountList){
1001                          String eFamily = eCell.getFamily().toStringUtf8();
1002                          String eQualif = eCell.getQualify().toStringUtf8();
1003                          if(family.equals(eFamily) && qualif.equals(eQualif)){//是同一列
1004                              if(tempRow.getRow().size() > 0){
1005                                  List<TempCell> tempCells = tempRow.getRow();
1006                                  boolean mark = false;
1007                                  for(TempCell tcell : tempCells){
1008                                      if(tcell.getFamily().equals(family)&& tcell.getQualify().equals(qualif)){
1009                                          mark = true;
1010                                          List<String> tempValues = tcell.getValues();
1011                                          boolean flag = false;
1012                                          for(String v : tempValues){
1013                                              if((v==null && value==null) || (v != null && v.equals(value))){
1014                                                  flag = true;
1015                                                  break;
1016                                              }
1017                                          }
1018                                          if(!flag){
1019                                              tcell.getValues().add(value);
1020                                              break;
1021                                          }
1022                                      }
1023                                  }
1024                                  if(!mark){
1025                                      TempCell tempCell = new TempCell(family,qualif,value,true);
1026                                      tempRow.getRow().add(tempCell);
1027                                      break;
1028                                  }
1029                              }else{
1030                                  TempCell tempCell = new TempCell(family,qualif,value,true);
1031                                  tempRow.getRow().add(tempCell);
1032                              }
1033                          }
1034                      }
1035                  }
1036                  if(tempResultRows.size() > 0){
1037                      tempResultRows.remove(0);
1038                  }
1039                  tempResultRows.add(tempRow);
1040                  results.clear();
1041                } while (hasMoreRows);
1042              
1043              for(TempRow row : tempResultRows){
1044                  ExpandRow.Builder expandRow = ExpandRow.newBuilder();
1045                  List<TempCell>  tempCell = row.getRow();
1046                  for(TempCell v : tempCell){
1047                      ExpandCell.Builder cellBuilder = ExpandCell.newBuilder();
1048                      cellBuilder.setFamily(ByteString.copyFromUtf8(v.getFamily()));
1049                      cellBuilder.setQualify(ByteString.copyFromUtf8(v.getQualify()));
1050                      for(String s : v.getValues()){
1051                          if(s == null){
1052                              cellBuilder.addDistinctValues(ByteString.copyFromUtf8(""));
1053                          }else{
1054                              cellBuilder.addDistinctValues(ByteString.copyFromUtf8(s));
1055                          }
1056                      }
1057                      expandRow.addValues(cellBuilder.build());
1058                  }
1059                  resultRows.add(expandRow.build());
1060              }
1061              if(resultRows.size() > 0){
1062                  ExpandAggregationResponse.Builder responseBuilder = ExpandAggregationResponse.newBuilder();
1063                  responseBuilder.addAllResults(resultRows);
1064                  response = responseBuilder.build();
1065              }
1066          }catch(IOException e){
1067              ResponseConverter.setControllerException(controller, e);
1068          }
1069          finally{
1070              if (scanner != null) {
1071                  try {
1072                    scanner.close();
1073                  } catch (IOException ignored) {}
1074               }
1075          }
1076          log.debug("distict count size from this region is "
1077                  + env.getRegion().getRegionNameAsString() + ": " + resultRows.size());
1078          done.run(response);
1079          
1080          
1081      }
1082  
1083      /**
1084      * @Title: getCountAndDistictCount
1085      * @Description: 
1086      * @param 
1087      * @return ExpandAggregationProtos.ExpandAggregationService
1088      * @author lpy
1089      * @throws
1090      */
1091      @Override
1092      public void getCountAndDistictCount(RpcController controller, ExpandAggregationRequest request,
1093              RpcCallback<ExpandAggregationResponse> done) {
1094          
1095          
1096      }
1097      
1098      /**
1099      * @Title: getSumAndDistictCount
1100      * @Description: 
1101      * @param 
1102      * @return ExpandAggregationProtos.ExpandAggregationService
1103      * @author lpy
1104      * @throws
1105      */
1106      @Override
1107      public void getSumAndDistictCount(RpcController controller, ExpandAggregationRequest request,
1108              RpcCallback<ExpandAggregationResponse> done) {
1109          
1110          
1111      }
1112      
1113      String AddValue(String v1,String v2,ByteString className){
1114          String c = className.toStringUtf8();
1115          if("long".equals(c) || "Long".equals(c)){
1116              Long l1 = null;
1117              Long l2 = null;
1118              if(v1 != null && !v1.equals(""))
1119                  l1 = Long.parseLong(v1);
1120              if(v2 !=null && !v2.equals(""))
1121                  l2 = Long.parseLong(v2);
1122              if (l1 == null ^ l2 == null) {
1123                    return (((l1 == null) ? l2 : l1))+""; // either of one is null.
1124                  } else if (l1 == null) // both are null
1125                    return null;
1126                  return (l1 + l2)+"";
1127          }else if("int".equals(c) || "Integer".equals(c)){
1128              Integer i1 = null;
1129              Integer i2 = null;
1130              if(v1 != null && !v1.equals(""))
1131                  i1 = Integer.parseInt(v1);
1132              if(v2 !=null && !v2.equals(""))
1133                  i2 = Integer.parseInt(v2);
1134              if(i1 == null ^ i2 ==null){
1135                   return ((i1 == null) ? i2 : i1)+""; // either of one is null.
1136              }else if(i1 == null){
1137                  return null;
1138              }
1139              return (i1+i2)+"";
1140          }else if("double".equals(c) || "Double".equals(c)){
1141              Double d1 = null;
1142              Double d2 = null;
1143              if(v1 != null && !v1.equals("")) d1 = Double.parseDouble(v1);
1144              if(v2 != null && !v2.equals("")) d2 = Double.parseDouble(v2);
1145              if (d1 == null ^ d2 == null) {
1146                  return ((d1 == null) ? d2 : d1)+""; // either of one is null.
1147              }else if(d1 == null){
1148                  return null;
1149              }
1150              return (d1+d2)+"";
1151          }else{
1152              BigDecimal b1 = null;
1153              BigDecimal b2 = null;
1154              if(v1 != null && !v1.equals("")) b1 = BigDecimal.valueOf(Double.parseDouble(v1));
1155              if(v2 != null && !v2.equals("")) b2 = BigDecimal.valueOf(Double.parseDouble(v2));
1156              if (b1 == null ^ b2 == null) {
1157                    return ((b1 == null) ? b2 : b1)+""; // either of one is null.
1158                  }
1159                  if (b1 == null) {
1160                    return null;
1161                  }
1162                  return b1.add(b2).toString();
1163          }
1164      }
1165  
1166      
1167      
1168      
1169      
1170      /**
1171      * @Title: start
1172      * @Description: 
1173      * @param 
1174      * @return Coprocessor
1175      * @author lpy
1176      * @throws
1177      */
1178      @Override
1179      public void start(CoprocessorEnvironment env) throws IOException {
1180          if (env instanceof RegionCoprocessorEnvironment) {
1181                this.env = (RegionCoprocessorEnvironment)env;
1182              } else {
1183                throw new CoprocessorException("Must be loaded on a table region!");
1184              }
1185      }
1186      /**
1187      * @Title: stop
1188      * @Description: 
1189      * @param 
1190      * @return Coprocessor
1191      * @author lpy
1192      * @throws
1193      */
1194      @Override
1195      public void stop(CoprocessorEnvironment env) throws IOException {
1196          
1197      }
1198  
1199      /**
1200      * @Title: getService
1201      * @Description: 
1202      * @param return null;
1203      * @return CoprocessorService
1204      * @author lpy
1205      * @throws
1206      */
1207      @Override
1208      public Service getService() {
1209          return this;
1210          
1211      }
1212  }
1213   
ExpandAggregationProtosImpl.java

 

ps:这里还有其它的方法还没实现,其实原理都是一样的,后续再说!

接下来需要把我们的协处理器加入到table中去。把生成的接口文件与实现类文件打成jar包,放到hdfs上,然后加入到对应的表中就可以了!

我自己是对单个表加入的,用hbase shell来做的!

 

4、客户端代码:

我这里自己写了三个bean用来封装数据的!

 1 package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean;
 2 
 3 import java.util.ArrayList;
 4 import java.util.List;
 5 
 6 import org.apache.hadoop.hbase.util.Bytes;
 7 
 8 /**  
 9  * Copyright (c) 2014, xxxxxxxx All Rights Reserved.
10  * Package: com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean  
11  *  
12  * File: ExoabdHbaseCell.java   
13  *  
14  * Author: lpy
15  * Date: 2016年1月19日  
16  *  
17  * Copyright @ 2016 Corpration Name  
18  *   
19  */
20 public class ExpandHbaseCell {
21     
22     private String family;
23     
24     private String qualify;
25     
26     private String value;
27     
28     private List<String> values = new ArrayList<String>();
29     
30     private String className;
31 
32     public ExpandHbaseCell(){
33         
34     }
35 
36     public ExpandHbaseCell(String family,String qualify,String className){
37         this.family = family;
38         this.qualify = qualify;
39         this.className = className;
40     }
41     public ExpandHbaseCell(String family,String qualify){
42         this.family = family;
43         this.qualify = qualify;
44     }
45     
46     public String getFamily() {
47         return family;
48     }
49 
50     public void setFamily(String family) {
51         this.family = family;
52     }
53 
54     public String getQualify() {
55         return qualify;
56     }
57 
58     public void setQualify(String qualify) {
59         this.qualify = qualify;
60     }
61 
62     public String getValue() {
63         return value;
64     }
65 
66     public void setValue(String value) {
67         this.value = value;
68     }
69 
70     public String getClassName() {
71         return className;
72     }
73 
74     public void setClassName(String className) {
75         this.className = className;
76     }
77     public List<String> getValues() {
78         return values;
79     }
80     public void setValues(List<String> values) {
81         this.values = values;
82     }
83     
84     
85     
86 }
87  
ExoabdHbaseCell.java
 1 package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean;
 2 
 3 import java.util.ArrayList;
 4 import java.util.List;
 5 
 6 /**  
 7  * Copyright (c) 2014, xxxxxxx All Rights Reserved.
 8  * Package: com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean  
 9  *  
10  * File: ExpandHbaseCondition.java   
11  *  
12  * Author: lpy   
13  * Date: 2016年1月19日  
14  *  
15  * Copyright @ 2016 Corpration Name  
16  *   
17  */
18 public class ExpandHbaseCondition {
19     private List<ExpandHbaseCell> sumList;
20     private List<ExpandHbaseCell> groupList;
21     private List<ExpandHbaseCell> countList;
22     private List<ExpandHbaseCell> distinctCountList;
23     
24     /**
25      * 增加要sum的字段
26      * @param sumCell
27      */
28     public void addSum(ExpandHbaseCell sumCell){
29         if(sumList == null){
30             sumList = new ArrayList<ExpandHbaseCell>();
31         }
32         sumList.add(sumCell);
33     }
34     
35     public void addGroup(ExpandHbaseCell groupCell){
36         if(groupList == null){
37             groupList = new ArrayList<ExpandHbaseCell>();
38         }
39         groupList.add(groupCell);
40     }
41     
42     public void addCount(ExpandHbaseCell countCell){
43         if(countList == null){
44             countList = new ArrayList<ExpandHbaseCell>();
45         }
46         countList.add(countCell);
47     }
48     
49     public void addDistinctCount(ExpandHbaseCell distinctCell){
50         if(distinctCountList == null){
51             distinctCountList = new ArrayList<ExpandHbaseCell>();
52         }
53         distinctCountList.add(distinctCell);
54     }
55     
56     public List<ExpandHbaseCell> getSumList() {
57         return sumList;
58     }
59     public void setSumList(List<ExpandHbaseCell> sumList) {
60         this.sumList = sumList;
61     }
62     public List<ExpandHbaseCell> getGroupList() {
63         return groupList;
64     }
65     public void setGroupList(List<ExpandHbaseCell> groupList) {
66         this.groupList = groupList;
67     }
68     public List<ExpandHbaseCell> getCountList() {
69         return countList;
70     }
71     public void setCountList(List<ExpandHbaseCell> countList) {
72         this.countList = countList;
73     }
74     public List<ExpandHbaseCell> getDistinctCountList() {
75         return distinctCountList;
76     }
77     public void setDistinctCountList(List<ExpandHbaseCell> distinctCountList) {
78         this.distinctCountList = distinctCountList;
79     }
80     
81     
82 }
83  
ExpandHbaseCondition.java
 1 package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean;
 2 
 3 import java.util.List;
 4 
 5 /**  
 6  * Copyright (c) 2014, xxxxxx All Rights Reserved.
 7  * Package: com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean  
 8  *  
 9  * File: ExpandHbaseRow.java   
10  *  
11  * Author: lpy  
12  * Date: 2016年1月19日  
13  *  
14  * Copyright @ 2016 Corpration Name  
15  *   
16  */
17 public class ExpandHbaseRow {
18     private List<ExpandHbaseCell> keys;
19     private List<ExpandHbaseCell> resultRow;
20 
21     public int size(){
22         if(this.resultRow == null) return 0;
23         return this.resultRow.size();
24     }
25     
26     public List<ExpandHbaseCell> getResultRow() {
27         return resultRow;
28     }
29 
30     public void setResultRow(List<ExpandHbaseCell> resultRow) {
31         this.resultRow = resultRow;
32     }
33 
34     public List<ExpandHbaseCell> getKeys() {
35         return keys;
36     }
37 
38     public void setKeys(List<ExpandHbaseCell> keys) {
39         this.keys = keys;
40     }
41     
42     
43     
44     
45 }
46  
ExpandHbaseRow

还有一个util类,做类之间的转换的

  1 package com.xxdai.ace.persistence.hbase.jdbc.util;
  2 
  3 import java.lang.reflect.InvocationTargetException;
  4 import java.lang.reflect.Method;
  5 import java.util.ArrayList;
  6 import java.util.Date;
  7 import java.util.List;
  8 import java.util.Map;
  9 
 10 import org.apache.hadoop.hbase.util.Bytes;
 11 
 12 import com.google.protobuf.ByteString;
 13 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseCell;
 14 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseRow;
 15 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell;
 16 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow;
 17 import com.xxdai.ace.persistence.hbase.jdbc.exception.AssertPropertiseException;
 18 
 19 /**  
 20  * Copyright (c) 2014, xxxxxxx All Rights Reserved.
 21  * Package: com.xxdai.ace.persistence.hbase.jdbc.util  
 22  *  
 23  * File: HbaseUtil.java   
 24  *  
 25  * Author: lpy  
 26  * Date: 2015年12月18日  
 27  *  
 28  * Copyright @ 2015 Corpration Name  
 29  *   
 30  */
 31 public class HbaseUtil {
 32     
 33     
 34     public static void getEntityProperties(Object object , Method method,Object param,byte[] value) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException{
 35         if (param.equals(Integer.class)) {
 36                 Integer val = Integer.valueOf(Bytes.toString(value));
 37                 method.invoke(object, val);
 38            } else if (param.equals(String.class)) {
 39                String val = Bytes.toString(value);
 40                method.invoke(object, val);
 41            } else if (param.equals( Double.class)) {
 42                Double val = Double.valueOf(Bytes.toString(value));
 43                method.invoke(object, val);
 44            } else if (param.equals(Float.class)) {
 45                Float val = Float.valueOf(Bytes.toString(value));
 46                method.invoke(object, val);
 47            } else if (param.equals(Long.class)) {
 48                Long val = Long.getLong(Bytes.toString(value));
 49                method.invoke(object, val);
 50            } else if (param.equals(Boolean.class)) {
 51                Boolean val = Boolean.valueOf(Bytes.toString(value));
 52                method.invoke(object, val);
 53            } else if (param instanceof Date) {
 54                
 55            } else if(param instanceof Map){
 56                
 57            } 
 58     }
 59     /**
 60      * 把hbase的字段转成Java字段,java中用驼峰命名法
 61      * @param name
 62      * @return
 63      */
 64     public static String getEntityPropertiesName(String name){
 65         String newName = "";
 66         boolean flag = false;
 67         for(int i=0;i<name.length();i++){
 68             char a = name.charAt(i);
 69             if(a=='_' || a== '-'){
 70                 flag = true;
 71                 continue;
 72             }
 73             if(flag){
 74                 if(a >= 'a' && a<= 'z' ){
 75                     a = (char) (a - 32);
 76                 }
 77                 flag = false;
 78             }
 79             newName += a;
 80         }
 81         return newName;
 82     }
 83     
 84     public static String getfirstUp(String name){
 85         String newName = "";
 86         String a = "";
 87         if(name != null && name.length() > 0){
 88             a = name.substring(0, 1);
 89             a = a.toUpperCase();
 90         }
 91         if(name != null && name.length() > 1)
 92             newName = a + name.substring(1,name.length());
 93         else
 94             return a;
 95         return newName;
 96     }
 97     
 98     /**
 99      * 将ExpandHbaseCell对象转换成ExpandCell对象
100      * @param cell
101      * @return
102      */
103     public static ExpandCell toExpandCell(ExpandHbaseCell cell){
104         if(cell == null) return null;
105         AssertPropertiseException.notNull(cell.getFamily(), "列簇不能为空!");
106         AssertPropertiseException.notNull(cell.getQualify(), "列不能为空!");
107         ExpandCell.Builder builder = ExpandCell.newBuilder();
108         builder.setFamily(ByteString.copyFromUtf8(cell.getFamily()));
109         builder.setQualify(ByteString.copyFromUtf8(cell.getQualify()));
110         if(cell.getValue() != null)
111             builder.setValue(ByteString.copyFromUtf8(cell.getValue()));
112         if(cell.getClassName() != null)
113             builder.setClassName(ByteString.copyFromUtf8(cell.getClassName()));
114         return builder.build();
115     }
116     
117     /**
118      * 将ExpandCell对象转换成ExpandHbaseCell对象 
119      * @param cell
120      * @return
121      */
122     public static ExpandHbaseCell toExpandCell(ExpandCell cell){
123         if(cell == null) return null;
124         AssertPropertiseException.notNull(cell.getFamily(), "列簇不能为空!");
125         AssertPropertiseException.notNull(cell.getQualify(), "列不能为空!");
126         ExpandHbaseCell nCell = new ExpandHbaseCell();
127         nCell.setFamily(cell.getFamily().toStringUtf8());
128         nCell.setQualify(cell.getQualify().toStringUtf8());
129         if(cell.getValue() != null)
130             nCell.setValue(cell.getValue().toStringUtf8());
131         if(cell.getClassName() != null)
132             nCell.setClassName(cell.getClassName().toStringUtf8());
133         if(cell.getDistinctValuesList()!=null && cell.getDistinctValuesList().size() > 0){
134             List<ByteString> byteList = cell.getDistinctValuesList();
135             for(ByteString s:byteList){
136                 if(s == null){
137                     nCell.getValues().add(null);
138                 }else{
139                     nCell.getValues().add(s.toStringUtf8());
140                 }
141             }
142         }
143         return nCell;
144     }
145     /**
146      * 将ExpandRow对象转换成ExpandHbaseRow对象
147      * @param row
148      * @return
149      */
150     public static ExpandHbaseRow toExpandHbaseRow(ExpandRow row){
151         if(row==null) return null;
152         if(row.getValuesList().size()==0) return null;
153         ExpandHbaseRow hbaseRow = new ExpandHbaseRow();
154         List<ExpandHbaseCell> hbaseCells = new ArrayList<ExpandHbaseCell>();
155         for(ExpandCell cell:row.getValuesList()){
156             ExpandHbaseCell hbaseCell = HbaseUtil.toExpandCell(cell);
157             hbaseCells.add(hbaseCell);
158         }
159         hbaseRow.setResultRow(hbaseCells);
160         return hbaseRow;
161         
162     }
163     
164 }
165  
HbaseUtil.java

最后是客户端代码:

  1 package com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client;
  2 
  3 import java.io.IOException;
  4 import java.math.BigDecimal;
  5 import java.util.ArrayList;
  6 import java.util.List;
  7 
  8 import org.apache.commons.logging.Log;
  9 import org.apache.commons.logging.LogFactory;
 10 import org.apache.hadoop.conf.Configuration;
 11 import org.apache.hadoop.hbase.client.HTable;
 12 import org.apache.hadoop.hbase.client.Scan;
 13 import org.apache.hadoop.hbase.client.coprocessor.Batch;
 14 import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
 15 import org.apache.hadoop.hbase.ipc.ServerRpcController;
 16 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 17 
 18 import com.google.protobuf.ByteString;
 19 import com.google.protobuf.ServiceException;
 20 import com.sun.research.ws.wadl.Request;
 21 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseCell;
 22 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseCondition;
 23 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseRow;
 24 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationRequest;
 25 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationResponse;
 26 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandAggregationService;
 27 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandCell;
 28 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.service.ExpandAggregationProtos.ExpandRow;
 29 import com.xxdai.ace.persistence.hbase.jdbc.exception.AssertPropertiseException;
 30 import com.xxdai.ace.persistence.hbase.jdbc.util.HbaseUtil;
 31 
 32 /**  
 33  * Copyright (c) 2014, xxxxxxxx All Rights Reserved.
 34  * Package: com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client  
 35  *  
 36  * File: ExpandAggregationClient.java   
 37  *  
 38  * Author: lpy   
 39  * Date: 2016年1月19日  
 40  *  
 41  * Copyright @ 2016 Corpration Name  
 42  *   
 43  */
 44 public class ExpandAggregationClient {
 45     
 46     private Log log = LogFactory.getLog(ExpandAggregationClient.class);
 47     
 48     Configuration conf;
 49     
 50     public ExpandAggregationClient(Configuration conf){
 51         this.conf = conf;
 52     }
 53     
 54     public List<ExpandHbaseRow> getGroupSumAndCount(final String tableName,ExpandHbaseCondition condition,Scan scan) throws Throwable{
 55         HTable table = null;
 56         try {
 57             table = new HTable(conf, tableName);
 58             return getGroupSumAndCount(table,condition,scan);
 59         }finally{
 60             table.close();
 61         }
 62     }
 63     
 64     public List<ExpandHbaseRow> getGroupSumAndCount(HTable table,ExpandHbaseCondition condition,Scan scan) throws Throwable{
 65         final ExpandAggregationRequest request = validateArgAndGetPB(condition, scan, true, true, true, false);
 66         
 67         class GroupSumAndCountCallback implements Batch.Callback<List<ExpandRow>>{
 68             List<ExpandCell> sumList = request.getSumColumnsList();
 69             List<ExpandCell> countList = request.getCountColumnsList();
 70             List<ExpandHbaseRow> list = new ArrayList<ExpandHbaseRow>();
 71             public List<ExpandHbaseRow> getGroupSumAndCount(){
 72                 return list;
 73             }
 74             /**
 75             * @Title: update
 76             * @Description: 
 77             * @param 
 78             * @return Batch.Callback<List<ExpandHbaseRow>>
 79             * @author lpy
 80             * @throws
 81             */
 82             @Override
 83             public synchronized void update(byte[] region, byte[] row, List<ExpandRow> result) {
 84                 if(list.size() == 0){
 85                     if(result !=null){
 86                         for(ExpandRow rowN : result){
 87                             list.add(HbaseUtil.toExpandHbaseRow(rowN));
 88                         }
 89                     }
 90                 }else{
 91                     List<ExpandHbaseRow> locat = new ArrayList<ExpandHbaseRow>();
 92                     if(result != null){
 93                         for(ExpandRow rowN : result){
 94                             locat.add(HbaseUtil.toExpandHbaseRow(rowN));
 95                         }
 96                     }
 97                     for(ExpandHbaseRow listRow :  list){
 98                         List<ExpandHbaseCell>  listCells = listRow.getKeys();
 99                         for(ExpandHbaseRow locatRow : locat){
100                             List<ExpandHbaseCell> locatCells = locatRow.getKeys();
101                             if(listCells.size() == locatCells.size()){
102                                 boolean flag = false;//假设不是同一个组
103                                 for(int i=0;i<listCells.size();i++){
104                                     //是同一个组
105                                     if(listCells.get(i).getFamily().equals(locatCells.get(i).getFamily())&&
106                                             listCells.get(i).getQualify().equals(locatCells.get(i).getQualify()) &&
107                                             ((listCells.get(i).getValue() == null && locatCells.get(i).getValue() == null) ||
108                                                     listCells.get(i).getValue()!=null && listCells.get(i).getValue().equals(locatCells.get(i).getValue()))){
109                                         flag = true;
110                                         break;
111                                     }
112                                 }
113                                 if(flag){
114                                     List<ExpandHbaseCell> listCol = listRow.getResultRow();
115                                     List<ExpandHbaseCell> locatCol =locatRow.getResultRow();
116                                     for(ExpandCell sumCell:sumList){
117                                         for(ExpandHbaseCell cell : listCol){
118                                             boolean check = false;
119                                             if(sumCell.getFamily().toStringUtf8().equals(cell.getFamily()) &&
120                                                     sumCell.getQualify().toStringUtf8().equals(cell.getQualify())){
121                                                 for(ExpandHbaseCell lcol : locatCol){
122                                                     if(lcol.getFamily().equals(cell.getFamily()) && lcol.getQualify().equals(cell.getQualify())){
123                                                         String v = AddValue(cell.getValue(),lcol.getValue(),sumCell.getClassName());
124                                                         if(v==null) cell.setValue("0");
125                                                         else cell.setValue(v);
126                                                         check = true;
127                                                         break;
128                                                     }
129                                                 }
130                                             }
131                                             if(check) break;
132                                         }
133                                     }
134                                     
135                                     for(ExpandCell countCell:countList){
136                                         for(ExpandHbaseCell cell : listCol){
137                                             boolean check = false;
138                                             if(countCell.getFamily().toStringUtf8().equals(cell.getFamily()) &&
139                                                     countCell.getQualify().toStringUtf8().equals(cell.getQualify())){
140                                                 for(ExpandHbaseCell lcol : locatCol){
141                                                     if(lcol.getFamily().equals(cell.getFamily()) && lcol.getQualify().equals(cell.getQualify())){
142                                                         String v = AddValue(cell.getValue(),lcol.getValue(),ByteString.copyFromUtf8("Long"));
143                                                         if(v==null) cell.setValue("1");
144                                                         else cell.setValue(v);
145                                                         check = true;
146                                                         break;
147                                                     }
148                                                 }
149                                             }
150                                             if(check) break;
151                                         }
152                                     }
153                                 }else{
154                                     list.add(locatRow);
155                                 }
156                                 
157                             }
158                         }
159                     }
160                     
161                     locat.clear();
162                 }
163                 
164             }
165             
166         }
167         
168         
169         GroupSumAndCountCallback groupSumAndCountcallback = new GroupSumAndCountCallback();
170         table.coprocessorService(ExpandAggregationService.class, scan.getStartRow(), scan.getStopRow(), new Batch.Call<ExpandAggregationService, List<ExpandRow>>() {
171             /**
172             * @Title: call
173             * @Description: 
174             * @param return null;
175             * @return Batch.Call<ExpandAggregationService,List<ExpandRow>>
176             * @author lpy
177             * @throws
178             */
179             @Override
180             public List<ExpandRow> call(ExpandAggregationService instance) throws IOException {
181                 ServerRpcController controller = new ServerRpcController();
182                 BlockingRpcCallback<ExpandAggregationResponse> rpcCallback 
183                     = new BlockingRpcCallback<ExpandAggregationResponse>();
184                 instance.getGroupSumAndCount(controller, request, rpcCallback);
185                 ExpandAggregationResponse response = rpcCallback.get();
186                  if (controller.failedOnException()) {
187                       throw controller.getFailedOn();
188                  }
189                  return response.getResultsList();
190             }
191 
192             
193             
194         },groupSumAndCountcallback);
195         return groupSumAndCountcallback.getGroupSumAndCount();
196     }
197     
198     
199     
200     public List<ExpandHbaseRow> getDistinctCount(final String tableName,ExpandHbaseCondition condition,Scan scan) throws Throwable{
201         HTable table = null;
202         try {
203             table = new HTable(conf, tableName);
204             List<ExpandHbaseRow> list = getDistinctCount(table,condition,scan);
205             if(list.size() != 0){ 
206                 List<ExpandHbaseCell> cells = list.get(0).getResultRow();
207                 for(ExpandHbaseCell cell : cells){
208                     int num = cell.getValues().size();
209                     cell.setValue(num+"");
210                 }
211                 return list;
212             }
213             return null;
214                 
215         }finally{
216             table.close();
217         }
218     }
219     
220     public List<ExpandHbaseRow> getDistinctCount(HTable table,ExpandHbaseCondition condition,Scan scan) throws ServiceException, Throwable{
221         final ExpandAggregationRequest request = validateArgAndGetPB(condition, scan, false, false, false, true);
222         class DistinctCount implements Batch.Callback<List<ExpandRow>>{
223             List<ExpandHbaseRow> list = new ArrayList<ExpandHbaseRow>();
224             public List<ExpandHbaseRow> getDistinctCount(){
225                 return list;
226             }
227             /**
228             * @Title: update
229             * @Description: 
230             * @param 
231             * @return Batch.Callback<List<ExpandRow>>
232             * @author lpy
233             * @throws
234             */
235             @Override
236             public void update(byte[] region, byte[] row, List<ExpandRow> result) {
237                 if(list.size() == 0){
238                     if(result !=null){
239                         for(ExpandRow rowN : result){
240                             list.add(HbaseUtil.toExpandHbaseRow(rowN));
241                         }
242                     }
243                 }else{
244                     List<ExpandHbaseRow> locat = new ArrayList<ExpandHbaseRow>();
245                     if(result != null){
246                         for(ExpandRow rowN : result){
247                             locat.add(HbaseUtil.toExpandHbaseRow(rowN));
248                         }
249                     }
250                     for(ExpandHbaseRow listRow : list){
251                         List<ExpandHbaseCell> listCells = listRow.getResultRow();
252                         for(ExpandHbaseRow locatRow:locat){
253                             List<ExpandHbaseCell> locatCells = locatRow.getResultRow();
254                             for(ExpandHbaseCell listCell:listCells){
255                                 for(ExpandHbaseCell locatCell:locatCells){
256                                     if(listCell.getFamily().equals(locatCell.getFamily()) &&
257                                             listCell.getQualify().equals(locatCell.getQualify())){
258                                         List<String> vs = locatCell.getValues();
259                                         for(String s:vs){
260                                             if(!listCell.getValues().contains(s)) listCell.getValues().add(s);
261                                         }
262                                     }
263                                 }
264                             }
265                         }
266                     }
267                 }
268                 
269             }
270         }
271         
272         DistinctCount distinctCount = new DistinctCount();
273         
274         table.coprocessorService(ExpandAggregationService.class, scan.getStartRow(), scan.getStopRow(), new Batch.Call<ExpandAggregationService, List<ExpandRow>>() {
275             
276             /**
277             * @Title: call
278             * @Description: 
279             * @param return null;
280             * @return Batch.Call<ExpandAggregationService,List<ExpandRow>>
281             * @author lpy
282             * @throws
283             */
284             @Override
285             public List<ExpandRow> call(ExpandAggregationService instance) throws IOException {
286                 ServerRpcController controller = new ServerRpcController();
287                 BlockingRpcCallback<ExpandAggregationResponse> rpcCallback 
288                     = new BlockingRpcCallback<ExpandAggregationResponse>();
289                 instance.getDistictCount(controller, request, rpcCallback);
290                 ExpandAggregationResponse response = rpcCallback.get();
291                  if (controller.failedOnException()) {
292                       throw controller.getFailedOn();
293                  }
294                  return response.getResultsList();
295             }
296             
297         },distinctCount);
298         return distinctCount.getDistinctCount();
299     }
300     /**
301      * 把统计字段与查询条件变成一个
302      * request对象
303      * @param condition
304      * @param scan
305      * @param isSum
306      * @param isCount
307      * @param isGroup
308      * @param isDistict
309      * @return
310      * @throws IOException 
311      */
312     public ExpandAggregationRequest validateArgAndGetPB(ExpandHbaseCondition condition,Scan scan,
313             final boolean isSum,final boolean isCount,
314             final boolean isGroup,final boolean isDistict) throws IOException{
315         AssertPropertiseException.notNull(condition, "统计的对象不能为空!!");
316         ExpandAggregationRequest.Builder builder = ExpandAggregationRequest.newBuilder();
317         builder.setScan(ProtobufUtil.toScan(scan));
318         if(isSum){
319             if(condition.getSumList() == null || condition.getSumList().size() == 0 ){
320                 throw new IllegalArgumentException("sumList不能为空!");
321             }
322             for(ExpandHbaseCell cell :condition.getSumList())
323                 builder.addSumColumns(HbaseUtil.toExpandCell(cell));
324         }
325         if(isCount){
326             if(condition.getCountList() == null || condition.getCountList().size() == 0){
327                 throw new IllegalArgumentException("countList不能为空!");
328             }
329             for(ExpandHbaseCell cell :condition.getCountList()){
330                 builder.addCountColumns(HbaseUtil.toExpandCell(cell));
331             }
332         }
333         if(isGroup){
334             if(condition.getGroupList() == null || condition.getGroupList().size() == 0){
335                 throw new IllegalArgumentException("groupList不能为空!");
336             }
337             for(ExpandHbaseCell cell :condition.getGroupList()){
338                 builder.addGroupColumns(HbaseUtil.toExpandCell(cell));
339             }
340         }
341         if(isDistict){
342             if(condition.getDistinctCountList() == null || condition.getDistinctCountList().size() == 0){
343                 throw new IllegalArgumentException("distinctCountList不能为空!");
344             }
345             for(ExpandHbaseCell cell :condition.getDistinctCountList()){
346                 builder.addDistictColumns(HbaseUtil.toExpandCell(cell));
347             }
348         }
349         
350         return builder.build();
351     }
352     
353     
354     String AddValue(String v1,String v2,ByteString className){
355         String c = className.toString();
356         if("long".equals(c) || "Long".equals(c)){
357             Long l1 = null;
358             Long l2 = null;
359             if(v1 != null )
360                 l1 = Long.parseLong(v1);
361             if(v2 !=null)
362                 l2 = Long.parseLong(v2);
363             if (l1 == null ^ l2 == null) {
364                   return ((l1 == null) ? l2 : l1)+""; // either of one is null.
365                 } else if (l1 == null) // both are null
366                   return null;
367                 return (Long)(l1 + l2)+"";
368         }else if("int".equals(c) || "Integer".equals(c)){
369             Integer i1 = null;
370             Integer i2 = null;
371             if(v1 != null )
372                 i1 = Integer.parseInt(v1);
373             if(v2 !=null)
374                 i2 = Integer.parseInt(v2);
375             if(i1 == null ^ i2 ==null){
376                  return ((i1 == null) ? i2 : i1)+""; // either of one is null.
377             }else if(i1 == null){
378                 return null;
379             }
380             return (i1+i2)+"";
381         }else if("double".equals(c) || "Double".equals(c)){
382             Double d1 = null;
383             Double d2 = null;
384             if(v1 != null) d1 = Double.parseDouble(v1);
385             if(v2 != null) d2 = Double.parseDouble(v2);
386             if (d1 == null ^ d2 == null) {
387                 return ((d1 == null) ? d2 : d1)+""; // either of one is null.
388             }else if(d1 == null){
389                 return null;
390             }
391             return (d1+d2)+"";
392         }else{
393             BigDecimal b1 = null;
394             BigDecimal b2 = null;
395             if(v1 != null) b1 = BigDecimal.valueOf(Double.parseDouble(v1));
396             if(v2 != null) b2 = BigDecimal.valueOf(Double.parseDouble(v2));
397             if (b1 == null ^ b2 == null) {
398                   return ((b1 == null) ? b2 : b1).toString(); // either of one is null.
399                 }
400                 if (b1 == null) {
401                   return null;
402                 }
403                 return b1.add(b2).toString();
404         }
405     }
406 }
407  
ExpandAggregationClient.java

5、测试的demo

  1 package com.xxdai.ace.persistence.hbase.fun;
  2 
  3 import java.io.IOException;
  4 import java.util.ArrayList;
  5 import java.util.List;
  6 
  7 import org.apache.hadoop.hbase.HTableDescriptor;
  8 import org.apache.hadoop.hbase.MasterNotRunningException;
  9 import org.apache.hadoop.hbase.TableName;
 10 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
 11 import org.apache.hadoop.hbase.client.HBaseAdmin;
 12 import org.apache.hadoop.hbase.client.Scan;
 13 import org.apache.hadoop.hbase.client.coprocessor.AggregationClient;
 14 import org.apache.hadoop.hbase.client.coprocessor.LongColumnInterpreter;
 15 import org.apache.hadoop.hbase.util.Bytes;
 16 import org.springframework.beans.factory.BeanFactory;
 17 import org.springframework.context.ApplicationContext;
 18 import org.springframework.context.support.ClassPathXmlApplicationContext;
 19 
 20 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.ExpandAggregationClient;
 21 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseCell;
 22 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseCondition;
 23 import com.xxdai.ace.persistence.hbase.jdbc.coprocessor.client.bean.ExpandHbaseRow;
 24 import com.xxdai.ace.persistence.hbase.jdbc.template.dao.HbaseTemplateBaseDao;
 25 
 26 /**  
 27  * Copyright (c) 2014, xxxxxx All Rights Reserved.
 28  * Package: com.xxdai.ace.persistence.hbase.fun  
 29  *  
 30  * File: CountDemo.java   
 31  *  
 32  * Author: lpy
 33  * Date: 2016年1月8日  
 34  *  
 35  * Copyright @ 2016 Corpration Name  
 36  *   
 37  */
 38 public class CountDemo {
 39 
 40     static ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "spring-hbase.xml","applicationContext.xml"});
 41     static BeanFactory factory = (BeanFactory) context;
 42     static HbaseTemplateBaseDao hbaseTemplate = (HbaseTemplateBaseDao) factory.getBean("hbaseTemplate");
 43     
 44     public static void main(String[] args) {
 45         try {
 46             TableName tableName = TableName.valueOf("demoTest");
 47             Scan s = new Scan();
 48             ExpandAggregationClient ac = new ExpandAggregationClient(hbaseTemplate.getConfiguration());
 49             s.addColumn(Bytes.toBytes("info"), Bytes.toBytes("age"));
 50             s.addColumn(Bytes.toBytes("info"), Bytes.toBytes("name"));
 51             s.addColumn(Bytes.toBytes("info"), Bytes.toBytes("number"));
 52             AggregationClient ac1 = new AggregationClient(hbaseTemplate.getConfiguration());
 53             Long lo = 0L;
 54             ExpandHbaseCondition hbase = new ExpandHbaseCondition();
 55             List<ExpandHbaseCell> sumList = new ArrayList<ExpandHbaseCell>();
 56             ExpandHbaseCell cell = new ExpandHbaseCell("info","number","Long");
 57             sumList.add(cell);
 58             hbase.setSumList(sumList);
 59             cell = new ExpandHbaseCell("info", "name");
 60            // ExpandHbaseCell cell2 = new ExpandHbaseCell("info", "age");
 61             List<ExpandHbaseCell> group = new ArrayList<ExpandHbaseCell>();
 62             group.add(cell);
 63             //group.add(cell2);
 64             hbase.setGroupList(group);
 65             cell = new ExpandHbaseCell("info_count", "age");
 66             List<ExpandHbaseCell> count = new ArrayList<ExpandHbaseCell>();
 67             count.add(cell);
 68             hbase.setCountList(count);
 69             //hbase.setDistinctCountList(group);
 70             List<ExpandHbaseCell> distinct = new ArrayList<ExpandHbaseCell>();
 71             ExpandHbaseCell cell1 = new ExpandHbaseCell("info","age");
 72             ExpandHbaseCell cell2 = new ExpandHbaseCell("info","name");
 73             distinct.add(cell1);
 74             distinct.add(cell2);
 75             hbase.setDistinctCountList(distinct);
 76             List<ExpandHbaseRow>  result = null;
 77             try {
 78                 //lo = ac1.rowCount(tableName, new LongColumnInterpreter(), s);
 79                  result = ac.getGroupSumAndCount("demoTest", hbase, s);
 80                  System.out.println(result==null?"bug":result.size());
 81                  //System.out.println(lo);
 82                  for(ExpandHbaseRow row:result){
 83                      String context = "";
 84                      List<ExpandHbaseCell> ll= row.getResultRow();
 85                      if(ll != null)
 86                          for(ExpandHbaseCell c : ll){
 87                              context +=c.getFamily()+":"+c.getQualify()+"--->";
 88                              context += c.getValue();
 89                              context += "\t";
 90                          }
 91                      System.out.println(context);
 92                      
 93                  }
 94                  
 95                  result = ac.getDistinctCount("demoTest", hbase, s);
 96                  System.out.println(result==null?"bug":result.size());
 97                  for(ExpandHbaseRow row:result){
 98                      String context = "";
 99                      List<ExpandHbaseCell> ll= row.getResultRow();
100                      if(ll != null)
101                          for(ExpandHbaseCell c : ll){
102                              context +=c.getFamily()+":"+c.getQualify()+"--->";
103                              context += c.getValue();
104                              context += "\t";
105                          }
106                      System.out.println(context);
107                  }
108             } catch (Throwable e) {
109                 e.printStackTrace();
110             }
111             System.out.println(lo);
112         }  catch (Exception e) {
113             e.printStackTrace();
114             
115         }
116         
117     }
118 
119 }
120  
CountDemo.java

到这里就写完了!

posted on 2016-01-26 14:54  蔚藍de回憶  阅读(3961)  评论(7编辑  收藏  举报

导航