[ https://issues.apache.org/jira/browse/HADOOP-13578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15749677#comment-15749677 ]
churro morales commented on HADOOP-13578: ----------------------------------------- [~jlowe] in regards to your previous comment in regards to not returning after throwing. I can make the following change: {code} size_t size = dlsym_ZSTD_compressStream(stream, &output, &input); if (dlsym_ZSTD_isError(size)) { THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(size)); return (jint) 0; } if (finish && input.pos == input.size) { // end the stream, flush and write the frame epilogue size = dlsym_ZSTD_endStream(stream, &output); if (!size) { (*env)->SetBooleanField(env, this, ZStandardCompressor_finished, JNI_TRUE); } } else { // need to flush the output buffer // this also updates the output buffer position. size = dlsym_ZSTD_flushStream(stream, &output); } if (dlsym_ZSTD_isError(size)) { THROW(env, "java/lang/InternalError", dlsym_ZSTD_getErrorName(size)); return (jint) 0; } {code} If you are okay with this I can put up a new patch containing this fix. > Add Codec for ZStandard Compression > ----------------------------------- > > Key: HADOOP-13578 > URL: https://issues.apache.org/jira/browse/HADOOP-13578 > Project: Hadoop Common > Issue Type: New Feature > Reporter: churro morales > Assignee: churro morales > Attachments: HADOOP-13578.patch, HADOOP-13578.v1.patch, > HADOOP-13578.v2.patch, HADOOP-13578.v3.patch, HADOOP-13578.v4.patch, > HADOOP-13578.v5.patch, HADOOP-13578.v6.patch, HADOOP-13578.v7.patch, > HADOOP-13578.v8.patch > > > ZStandard: https://github.com/facebook/zstd has been used in production for 6 > months by facebook now. v1.0 was recently released. Create a codec for this > library. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org