You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "cxzl25 (via GitHub)" <gi...@apache.org> on 2024/02/07 08:15:36 UTC
[PR] ORC-1613: Zstd decompression supports direct buffer [orc]
cxzl25 opened a new pull request, #1789:
URL: https://github.com/apache/orc/pull/1789
### What changes were proposed in this pull request?
`ZstdCodec` implements the `DirectDecompressionCodec` interface.
### Why are the changes needed?
`zstd-jni` supports direct buffer decompression, which can reduce Buffer copying.
### How was this patch tested?
add UT
### Was this patch authored or co-authored using generative AI tooling?
No
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ORC-1613: Zstd decompression supports direct buffer [orc]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #1789:
URL: https://github.com/apache/orc/pull/1789#issuecomment-1933283772
Merged to main/2.0. Thank you, @cxzl25 .
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ORC-1613: Zstd decompression supports direct buffer [orc]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #1789: ORC-1613: Zstd decompression supports direct buffer
URL: https://github.com/apache/orc/pull/1789
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ORC-1613: Zstd decompression supports direct buffer [orc]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #1789:
URL: https://github.com/apache/orc/pull/1789#discussion_r1481960753
##########
java/core/src/java/org/apache/orc/impl/ZstdCodec.java:
##########
@@ -214,6 +214,11 @@ public boolean compress(ByteBuffer in, ByteBuffer out,
@Override
public void decompress(ByteBuffer in, ByteBuffer out) throws IOException {
+ if (in.isDirect() && out.isDirect()) {
Review Comment:
Just a question. When is this used in Apache ORC code base?
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ORC-1613: Zstd decompression supports direct buffer [orc]
Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #1789:
URL: https://github.com/apache/orc/pull/1789#discussion_r1482350032
##########
java/core/src/java/org/apache/orc/impl/ZstdCodec.java:
##########
@@ -214,6 +214,11 @@ public boolean compress(ByteBuffer in, ByteBuffer out,
@Override
public void decompress(ByteBuffer in, ByteBuffer out) throws IOException {
+ if (in.isDirect() && out.isDirect()) {
Review Comment:
If we use zerocopy `orc.use.zerocopy=true`, we may use the direct buffer, which can fallback to the original way of reading if the codec doesn't implement `DirectDecompressionCodec`.
https://github.com/apache/orc/blob/4eff23aa3ff6180f00cab472b91c3f67f82d6683/java/core/src/java/org/apache/orc/impl/RecordReaderUtils.java#L600-L607
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] ORC-1613: Zstd decompression supports direct buffer [orc]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #1789:
URL: https://github.com/apache/orc/pull/1789#discussion_r1482352209
##########
java/core/src/java/org/apache/orc/impl/ZstdCodec.java:
##########
@@ -214,6 +214,11 @@ public boolean compress(ByteBuffer in, ByteBuffer out,
@Override
public void decompress(ByteBuffer in, ByteBuffer out) throws IOException {
+ if (in.isDirect() && out.isDirect()) {
Review Comment:
Got it.
--
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@orc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org