-
Notifications
You must be signed in to change notification settings - Fork 527
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
refact: use standard UTF-8 charset & enhance CI configs #2095
Conversation
also fix some tiny problem
This comment was marked as off-topic.
This comment was marked as off-topic.
hugegraph-core/src/main/java/org/apache/hugegraph/backend/id/SnowflakeIdGenerator.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/optimize/HugeScriptTraversal.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/org/apache/hugegraph/api/job/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/AnsjAnalyzer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/analyzer/HanLPAnalyzer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/type/Nameable.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/type/define/Cardinality.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/CompressUtil.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/GZipUtil.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
...aph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
Show resolved
Hide resolved
TODO: move RAT(check) from build action --> |
hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/ProcessBasicSuite.java
Outdated
Show resolved
Hide resolved
hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/StructureBasicSuite.java
Outdated
Show resolved
Hide resolved
...aph-cassandra/src/main/java/org/apache/hugegraph/backend/store/cassandra/CassandraShard.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
return buf.bytes(); | ||
try (BytesBuffer buf = LZ4Util.compress(encode(value), BLOCK_SIZE, bufferRatio)) { | ||
return buf.bytes(); | ||
} catch (IOException e) { |
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.
seems don't need to catch IOException
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 IOException throws by LZ4Util.compress/decompress
& we just auto release the BytesBuffer
when it used up, so if we don't catch exception, we need to throws out? (so as the decompress
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.
yes just remove the catch, since the LZ4Util.compress already transfer IOException to BackendException
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.
yes just remove the catch, since the LZ4Util.compress already transfer IOException to BackendException
�so shall we close the ByteBuffer
when it used up? if we remove catch with try(xx)
, we need throws the exception?
It means we just ignore the ByteBuffer
close?
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.
yes the BytesBuffer don't need to close, it's just a memory buffer
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.
yes the BytesBuffer don't need to close, it's just a memory buffer
OK, my previous consideration is that if the buffer is large(like compress a big file), we should recycle it manually in time to reduce the pressure of GC & memory usage, but lack enough validation, so back off for now
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/StringEncoding.java
Outdated
Show resolved
Hide resolved
return buf.bytes(); | ||
try (BytesBuffer buf = LZ4Util.compress(encode(value), BLOCK_SIZE, bufferRatio)) { | ||
return buf.bytes(); | ||
} catch (IOException e) { |
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.
yes just remove the catch, since the LZ4Util.compress already transfer IOException to BackendException
follow the #1632 , and also fix some tiny problem
@zyxxoo could follow this PR to solve the TODOs