[ 
https://issues.apache.org/jira/browse/HBASE-7533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13550590#comment-13550590
 ] 

Elliott Clark commented on HBASE-7533:
--------------------------------------

So this exercise got me thinking.  Right now RpcRequstHeader and 
RpcResponseHeader are used so that not all data must be decoded to get some 
meta data.  Since we're moving towards EncodedDataBlocks coming after the 
Protobuf responses, there's not a requirement for a header.

That means we could have one RpcRequest and one RpcResponse.  That would 
greatly simplify the rpc specification.

{code}
message CoprocessorServiceRequest {
  required RegionSpecifier region = 1;
  required CoprocessorServiceCall call = 2;
}
message MutateRequest {
  required RegionSpecifier region = 1;
  required Mutate mutate = 2;
  optional Condition condition = 3;
}
message GetRequest {
  required RegionSpecifier region = 1;
  required Get get = 2;

  // If the row to get doesn't exist, return the
  // closest row before.
  optional bool closestRowBefore = 3;

  // The result isn't asked for, just check for
  // the existence. If specified, closestRowBefore
  // will be ignored
  optional bool existenceOnly = 4;
}

message ScanRequest {
  optional RegionSpecifier region = 1;
  optional Scan scan = 2;
  optional uint64 scannerId = 3;
  optional uint32 numberOfRows = 4;
  optional bool closeScanner = 5;
  optional uint64 nextCallSeq = 6;
}
message RpcException {
  /** Class name of the exception thrown from the server */
  required string exceptionName = 1;

  /** Exception stack trace from the server side */
  optional string stackTrace = 2;
}
message UnionRequestType {
        required Enum requestType {GET = 1; MUTATE = 2; SCAN = 3; BULKLOAD = 4; 
COPROC = 5;} = 1;
        optional GetRequest getRequest = 2
        optional MutateRequest mutateRequest = 3;
        optional ScanRequest scanRequest = 4;
        optional BulkLoadRequest bulkLoadRequest = 5;
        optional CoprocessorServiceRequest coprocessorServiceRequest = 6;
        optional RpcException exception = 7;
}
message TraceInfo {
 //Whatever is here
}
 
message EncodedDateBlockMeta {
        required unit64 = size =1;
        optional string type = 2 [default = "KeyValue"]
        optional encoding encoding = 3;
}

message RpcRequest {
        required long callId = 1;
        required ServiceDescriptor serviceId = 2; // Equivilant to current 
protocol.
        required MethodDescriptor method = 3;
        optional EncodedDataBlockMeta encodedDataMeta = 4; 
        repeated UnionRequestType requests = 5;
        optinal TraceInfo traceInfo = 6;
        optional unit8 priority = 7 [default = 0];

}
message UnionResponseType {
        required Enum responseType {GET = 1; MUTATE = 2; SCAN = 3; BULKLOAD = 
4; COPROC = 5;} = 1;
        optional GetResponse getResponse  = 2
        optional MutateResponse  mutateResponse  = 3;
        optional ScanResponse  scanResponse  = 4;
        optional BulkLoadResponse  bulkLoadResponse  = 5;
        optional CoprocessorServiceResponse  coprocessorResponse  = 6
}

message RpcResponse {
        required unit64 callId = 1;
        required ServiceDescriptor serviceId = 2; // Equivilant to current 
protocol.
        required MethodDescriptor method = 3;
        repeated UnionResponseType requests = 5;

}
{code}
                
> Write an RPC Specification for 0.96
> -----------------------------------
>
>                 Key: HBASE-7533
>                 URL: https://issues.apache.org/jira/browse/HBASE-7533
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.96.0
>
>
> RPC format is changing for 0.96 to accomodate our protobufing all around.  
> Here is a first cut.  Please shred: 
> https://docs.google.com/document/d/1-1RJMLXzYldmHgKP7M7ynK6euRpucD03fZ603DlZfGI/edit

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to