Skip to content

[Format]ORC Support ZStandard compression using zstd-jni - #3056

Merged
JingsongLi merged 5 commits into
apache:masterfrom
zyl891229:zstd
Mar 20, 2024
Merged

JingsongLi merged 5 commits into
apache:masterfrom
zyl891229:zstd

Conversation

@zyl891229

Copy link
Copy Markdown
Contributor

Purpose

Support ZStandard compression using zstd-jni.

ORC Original PR: apache/orc#988
Support the use of zstd-jni library as the implementation of ORC zstd,
with better performance than aircompressor. 

But ORC support it from 2.0.0 ,but it also drop java 8 at the same version.

Tests

org.apache.paimon.format.orc.writer.OrcZstdTest

API and Format

Documentation

@JingsongLi

Copy link
Copy Markdown
Contributor

Hi @zyl891229 , thanks for the contribution!

Is apache/orc#988 based on ORC 1.9?
So should we upgrade orc to 1.9.2 too?

@zyl891229

zyl891229 commented Mar 20, 2024 •

Copy link
Copy Markdown
Contributor Author

Hi @JingsongLi
apache/orc#988 is original PR.
apache/orc#1743 here is the new PR about the same thing ,it base on ORC 2.0.0 .
But according to orc's official website releases list
1.9.2 is the newest stable version for java 8
We can upgrade it.
image

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi
JingsongLi merged commit 532cd8f into apache:master Mar 20, 2024
zhu3pang pushed a commit to zhu3pang/incubator-paimon that referenced this pull request Mar 29, 2024
import java.util.Properties;

/** Define the configuration properties that Orc understands. */
public enum OrcConf {

@Zouxxyy Zouxxyy Apr 9, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zyl891229 @JingsongLi I encountered the class conflict in my local test, there may be problems with class with the same name.

Caused by: java.lang.NoSuchFieldError: COMPRESSION_ZSTD_LEVEL
	at org.apache.paimon.format.OrcOptions.<clinit>(OrcOptions.java:42)
	at org.apache.paimon.format.orc.OrcWriterFactory.create(OrcWriterFactory.java:132)
	at org.apache.paimon.io.SingleFileWriter.<init>(SingleFileWriter.java:68)
	at org.apache.paimon.io.StatsCollectingSingleFileWriter.<init>(StatsCollectingSingleFileWriter.java:57)
	at org.apache.paimon.io.RowDataFileWriter.<init>(RowDataFileWriter.java:57)
	at org.apache.paimon.io.RowDataRollingFileWriter.lambda$new$0(RowDataRollingFileWriter.java:53)
	at org.apache.paimon.io.RollingFileWriter.openCurrentWriter(RollingFileWriter.java:99)
	at org.apache.paimon.io.RollingFileWriter.write(RollingFileWriter.java:78)
	at org.apache.paimon.append.AppendOnlyWriter$DirectSinkWriter.write(AppendOnlyWriter.java:347)
	at org.apache.paimon.append.AppendOnlyWriter.write(AppendOnlyWriter.java:144)
	at org.apache.paimon.append.AppendOnlyWriter.write(AppendOnlyWriter.java:60)
	at org.apache.paimon.operation.AbstractFileStoreWrite.write(AbstractFileStoreWrite.java:126)
	at org.apache.paimon.table.sink.TableWriteImpl.writeAndReturn(TableWriteImpl.java:145)
	at org.apache.paimon.table.sink.TableWriteImpl.write(TableWriteImpl.java:126)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0be4a21 fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants