-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add LZ4 compressor #2510
Conversation
a44a3fb
to
c41baea
Compare
please fix CI error: |
please format the code according to the p3c specification |
f78f4dc
to
cac665f
Compare
There is an error. And there is no report. So I cannot find it. @a364176773 I use p3c to check the code. There is not any warning. Please help me. |
please check the code format and local mvn clean install -DskipTests=true |
I ran the command. The log had an error. But did not show the detail. The log is as following:
|
scroll up to find the corresponding module log, which should have a prompt message |
I saw the <file name="/Users/diguage/develop/java/javaprojects/seata/compressor/seata-compressor-lz4/src/main/java/io/seata/compressor/lz4/Lz4Util.java">
<error line="18" severity="error" message="Using the '.*' form of import should be avoided - net.jpountz.lz4.*." source="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck"/>
</file> Thank you very much. |
@diguage mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=false |
Codecov Report
@@ Coverage Diff @@
## develop #2510 +/- ##
=============================================
+ Coverage 51.18% 51.21% +0.03%
- Complexity 2806 2813 +7
=============================================
Files 554 556 +2
Lines 17772 17801 +29
Branches 2099 2100 +1
=============================================
+ Hits 9096 9117 +21
- Misses 7819 7825 +6
- Partials 857 859 +2
|
Thank you. I found the error, and fixed it. Thanks again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add enumeration to CompressorType
compressor/seata-compressor-lz4/src/main/java/io/seata/compressor/lz4/Lz4Util.java
Outdated
Show resolved
Hide resolved
throw new NullPointerException("bytes is null"); | ||
} | ||
|
||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(ARRAY_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to initialize such a large value, just keep the default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default size is 32. Is it too small?
Maybe I can change the ARRAY_SIZE
to 1024
. Is it OK?
compressor/seata-compressor-lz4/src/main/java/io/seata/compressor/lz4/Lz4Util.java
Outdated
Show resolved
Hide resolved
7d855c5
to
481b9e0
Compare
seata-all file is missing some configuration |
OK |
Please keep the commit log, we can only review the increment. |
The 682 line of seata-al file is missing some configuration |
OK 👌 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Agree with @ph3636
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LZ4 is an extremely fast Compression algorithm. Maybe it should be supported.