saintstack commented on a change in pull request #1280: HBASE-23799 Make our
core coprocessors use shaded protobuf
URL: https://github.com/apache/hbase/pull/1280#discussion_r394097610
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcUtils.java
##########
@@ -87,53 +89,47 @@ public static CoprocessorServiceRequest
getCoprocessorServiceRequest(
}
public static CoprocessorServiceRequest getCoprocessorServiceRequest(
- final Descriptors.MethodDescriptor method, final Message request, final
byte [] row,
- final byte [] regionName) {
- return CoprocessorServiceRequest.newBuilder().setCall(
- getCoprocessorServiceCall(method, request, row)).
- setRegion(RequestConverter.buildRegionSpecifier(REGION_NAME,
regionName)).build();
+ final Descriptors.MethodDescriptor method, final Message request, final
byte[] row,
+ final byte[] regionName) {
+ return CoprocessorServiceRequest.newBuilder()
+ .setCall(getCoprocessorServiceCall(method, request, row))
+ .setRegion(RequestConverter.buildRegionSpecifier(REGION_NAME,
regionName)).build();
}
- private static CoprocessorServiceCall getCoprocessorServiceCall(
- final Descriptors.MethodDescriptor method, final Message request, final
byte [] row) {
+ private static CoprocessorServiceCall getCoprocessorServiceCall(final
MethodDescriptor method,
+ final Message request, final byte[] row) {
return CoprocessorServiceCall.newBuilder()
-
.setRow(org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations.unsafeWrap(row))
- .setServiceName(CoprocessorRpcUtils.getServiceName(method.getService()))
- .setMethodName(method.getName())
- // TODO!!!!! Come back here after!!!!! This is a double copy of the
request if I read
- // it right copying from non-shaded to shaded version!!!!!! FIXXXXX!!!!!
-
.setRequest(org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations.
- unsafeWrap(request.toByteArray())).build();
+
.setRow(org.apache.hbase.thirdparty.com.google.protobuf.UnsafeByteOperations.unsafeWrap(row))
+ .setServiceName(CoprocessorRpcUtils.getServiceName(method.getService()))
+ .setMethodName(method.getName())
+ // TODO!!!!! Come back here after!!!!! This is a double copy of the
request if I read
+ // it right copying from non-shaded to shaded version!!!!!! FIXXXXX!!!!!
Review comment:
Did I write this comment?
In CPEP, there was copying from pb2.5 data structures to internal PB3 data
structures -- so we could maintain pb2.5 as public interface but this seems to
be something different.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services