You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/29 13:35:35 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #12407: [FLINK-17842][network] Remove NextRecordResponse to improve deserialisation performance

rkhachatryan commented on a change in pull request #12407:
URL: https://github.com/apache/flink/pull/12407#discussion_r432485048



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java
##########
@@ -101,11 +99,13 @@ public DeserializationResult getNextRecord(T target) throws IOException {
 	}
 
 	private DeserializationResult readNonSpanningRecord(T target) throws IOException {
-		NextRecordResponse response = nonSpanningWrapper.getNextRecord(target);
-		if (response.result == PARTIAL_RECORD) {
-			spanningWrapper.transferFrom(nonSpanningWrapper, response.bytesLeft);
+		int recordLen = nonSpanningWrapper.readInt();
+		if (nonSpanningWrapper.canReadRecord(recordLen)) {
+			return nonSpanningWrapper.readInto(target);

Review comment:
       Leave a comment that this can't be turned into POJO/Tuple because of performance?




----------------------------------------------------------------
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:
users@infra.apache.org