Review Board 1.7.22


hbase-3939 Crossport HADOOP-1849 rpc fix

Review Request #2718 - Created Nov. 4, 2011 and updated

Michael Stack
hbase-3939
Reviewers
hbase
hbase-git
Versions of Gary suggestions

 
src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java
Revision fce5490 New Change
[20] 25 lines
[+20]
26
import org.apache.commons.logging.Log;
26
import org.apache.commons.logging.Log;
27
import org.apache.commons.logging.LogFactory;
27
import org.apache.commons.logging.LogFactory;
28
import org.apache.hadoop.hbase.KeyValue;
28
import org.apache.hadoop.hbase.KeyValue;
29
import org.apache.hadoop.hbase.client.Scan;
29
import org.apache.hadoop.hbase.client.Scan;
30
import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
30
import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;

    
   
31
import org.apache.hadoop.hbase.ipc.ProtocolSignature;
31
import org.apache.hadoop.hbase.regionserver.InternalScanner;
32
import org.apache.hadoop.hbase.regionserver.InternalScanner;
32
import org.apache.hadoop.hbase.util.Pair;
33
import org.apache.hadoop.hbase.util.Pair;
33

    
   
34

   
34
/**
35
/**
35
 * A concrete AggregateProtocol implementation. Its system level coprocessor
36
 * A concrete AggregateProtocol implementation. Its system level coprocessor
36
 * that computes the aggregate function at a region level.
37
 * that computes the aggregate function at a region level.
37
 */
38
 */
38
public class AggregateImplementation extends BaseEndpointCoprocessor implements
39
public class AggregateImplementation extends BaseEndpointCoprocessor implements
39
    AggregateProtocol {
40
    AggregateProtocol {
40
  protected static Log log = LogFactory.getLog(AggregateImplementation.class);
41
  protected static Log log = LogFactory.getLog(AggregateImplementation.class);
41

    
   
42

   
42
  @Override
43
  @Override

    
   
44
  public ProtocolSignature getProtocolSignature(

    
   
45
      String protocol, long version, int clientMethodsHashCode)

    
   
46
  throws IOException {

    
   
47
    if (AggregateProtocol.class.getName().equals(protocol)) {

    
   
48
      return new ProtocolSignature(AggregateProtocol.VERSION, null);

    
   
49
    }

    
   
50
    throw new IOException("Unknown protocol: " + protocol);

    
   
51
  }

    
   
52

   

    
   
53
  @Override
43
  public <T, S> T getMax(ColumnInterpreter<T, S> ci, Scan scan)
54
  public <T, S> T getMax(ColumnInterpreter<T, S> ci, Scan scan)
44
      throws IOException {
55
      throws IOException {
45
    T temp;
56
    T temp;
46
    T max = null;
57
    T max = null;
47
    InternalScanner scanner = ((RegionCoprocessorEnvironment) getEnvironment())
58
    InternalScanner scanner = ((RegionCoprocessorEnvironment) getEnvironment())
[+20] [20] 177 lines
src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateProtocol.java
Revision 2fa4d6f New Change
 
src/main/java/org/apache/hadoop/hbase/coprocessor/BaseEndpointCoprocessor.java
Revision 6f88357 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorProtocol.java
Revision 6fcb771 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Revision 1365411 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Revision 4a8918a New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java
Revision e60f970 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/ProtocolSignature.java
New File
 
src/main/java/org/apache/hadoop/hbase/ipc/Status.java
New File
 
src/main/java/org/apache/hadoop/hbase/ipc/VersionedProtocol.java
Revision fb07374 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/WritableRpcEngine.java
Revision 60a9248 New Change
 
src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Revision 8de2314 New Change
 
src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Revision 0d0e4c5 New Change
 
src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Revision 12bd33e New Change
 
src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java
Revision 888f428 New Change
 
src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
Revision e5b6a78 New Change
 
  1. src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java: Loading...
  2. src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateProtocol.java: Loading...
  3. src/main/java/org/apache/hadoop/hbase/coprocessor/BaseEndpointCoprocessor.java: Loading...
  4. src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorProtocol.java: Loading...
  5. src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java: Loading...
  6. src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java: Loading...
  7. src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java: Loading...
  8. src/main/java/org/apache/hadoop/hbase/ipc/ProtocolSignature.java: Loading...
  9. src/main/java/org/apache/hadoop/hbase/ipc/Status.java: Loading...
  10. src/main/java/org/apache/hadoop/hbase/ipc/VersionedProtocol.java: Loading...
  11. src/main/java/org/apache/hadoop/hbase/ipc/WritableRpcEngine.java: Loading...
  12. src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: Loading...
  13. src/main/java/org/apache/hadoop/hbase/master/HMaster.java: Loading...
  14. src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: Loading...
  15. src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java: Loading...
  16. src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java: Loading...