javeme commented on code in PR #181:
URL: 
https://github.com/apache/incubator-hugegraph-computer/pull/181#discussion_r867343591


##########
computer-core/src/main/java/com/baidu/hugegraph/computer/core/network/TransportUtil.java:
##########
@@ -157,4 +158,13 @@ public static void writeString(ByteBuf buf, String value) {
         buf.writeInt(encoded.length);
         buf.writeBytes(encoded);
     }
+
+    public static void setMaxBytesPreRead(Channel channel, int length) {

Review Comment:
   PreRead or PerRead?



##########
computer-core/src/main/java/com/baidu/hugegraph/computer/core/receiver/MessageRecvPartition.java:
##########
@@ -75,10 +77,15 @@ public MessageRecvPartition(Config config,
         long waitSortTimeout = config.get(
                                ComputerOptions.WORKER_WAIT_SORT_TIMEOUT);
         this.mergeFileNum = config.get(ComputerOptions.HGKV_MERGE_FILES_NUM);
-        this.recvBuffers = new MessageRecvBuffers(buffersLimit,
-                                                  waitSortTimeout);
-        this.sortBuffers = new MessageRecvBuffers(buffersLimit,
-                                                  waitSortTimeout);
+        this.useFileBuffer = config.get(
+                             ComputerOptions.TRANSPORT_RECV_FILE_MODE);
+        if (!this.useFileBuffer) {
+            this.recvBuffers = new MessageRecvBuffers(buffersLimit,
+                                                      waitSortTimeout);
+            this.sortBuffers = new MessageRecvBuffers(buffersLimit,
+                                                      waitSortTimeout);
+        }

Review Comment:
   check other code used recvBuffers and sortBuffers, since 
recvBuffers/sortBuffers may be null



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to