You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/12/01 16:48:02 UTC

Re: [PR] HDDS-9668. Zero-Copy in EC GRPC (write) [ozone]

adoroszlai commented on code in PR #5621:
URL: https://github.com/apache/ozone/pull/5621#discussion_r1412352879


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/GrpcXceiverService.java:
##########
@@ -39,9 +46,62 @@ public class GrpcXceiverService extends
       LOG = LoggerFactory.getLogger(GrpcXceiverService.class);
 
   private final ContainerDispatcher dispatcher;
+  private final boolean zerocopyEnabled;
+  private final ZeroCopyMessageMarshaller<ContainerCommandRequestProto>
+      zeroCopyMessageMarshaller = new ZeroCopyMessageMarshaller<>(
+          ContainerCommandRequestProto.getDefaultInstance());
 
-  public GrpcXceiverService(ContainerDispatcher dispatcher) {
+  public GrpcXceiverService(ContainerDispatcher dispatcher,
+      boolean zerocopyEnabled) {
     this.dispatcher = dispatcher;
+    this.zerocopyEnabled = zerocopyEnabled;
+  }
+
+  /**
+   * Bind service with zerocopy marshaller equiped for the `send` API if
+   * zerocopy is enabled.
+   * @return  service definition.
+   */
+  public ServerServiceDefinition bindServiceWithZerocopy() {

Review Comment:
   @duongkame I've updated capitalization in my fork, please check if you like https://github.com/adoroszlai/ozone/commit/2011bf115474241a6f44ae54a0b5649a8d33ddbe



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org