You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ay...@apache.org on 2025/03/24 21:09:49 UTC

(tez) branch master updated: TEZ-4609: JDK-17: Fix ByteBuffer mark incompatibility in PipelinedSorter. (#397). (Ayush Saxena, reviewed by Laszlo Bodor)

This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tez.git


The following commit(s) were added to refs/heads/master by this push:
     new c34ec163e TEZ-4609: JDK-17: Fix ByteBuffer mark incompatibility in PipelinedSorter. (#397). (Ayush Saxena, reviewed by Laszlo Bodor)
c34ec163e is described below

commit c34ec163eaba358db9dfcfa1902ee99d27c850ff
Author: Ayush Saxena <ay...@apache.org>
AuthorDate: Tue Mar 25 02:39:44 2025 +0530

    TEZ-4609: JDK-17: Fix ByteBuffer mark incompatibility in PipelinedSorter. (#397). (Ayush Saxena, reviewed by Laszlo Bodor)
---
 .../apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
index d0eeadca0..937f898ad 100644
--- a/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
+++ b/tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/PipelinedSorter.java
@@ -945,8 +945,7 @@ public class PipelinedSorter extends ExternalSorter {
         // try to allocate less meta space, because we have sample data
         metasize = METASIZE*(capacity/(perItem+METASIZE));
       }
-      ByteBuffer reserved = source.duplicate();
-      reserved.mark();
+      ByteBuffer reserved = (ByteBuffer) source.duplicate().mark();
       LOG.info(outputContext.getInputOutputVertexNames() + ": " + "reserved.remaining()=" +
           reserved.remaining() + ", reserved.metasize=" + metasize);
       reserved.position(metasize);