-
Notifications
You must be signed in to change notification settings - Fork 226
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
[Improve] support gz compress in streamload #434
Conversation
@@ -33,4 +33,6 @@ public class LoadConstants { | |||
public static final String READ_JSON_BY_LINE = "read_json_by_line"; | |||
public static final String GROUP_COMMIT = "group_commit"; | |||
public static final String GROUP_COMMIT_OFF_MODE = "off_mode"; | |||
public static final String COMPRESS_TYPE = "compress_type"; | |||
public static final String COMPRESS_TYPE_GZ = "gz"; |
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.
Is it more clear to use gzip
here?
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.
@@ -128,6 +132,7 @@ public DorisBatchStreamLoad( | |||
&& !loadProps | |||
.getProperty(GROUP_COMMIT) | |||
.equalsIgnoreCase(GROUP_COMMIT_OFF_MODE); | |||
this.enableGzCompress = loadProps.getProperty(COMPRESS_TYPE, "").equals(COMPRESS_TYPE_GZ); |
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.
Do we need to check whether the current file format is csv
? If the data here is json
, will gzip be turned on?
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.
If json and compression are configured, streamload will report an error when writing.
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
Proposed changes
Issue Number: close #xxx
Problem Summary:
Currently streamload supports gz compression in csv format, which requires the client to compress the stream
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...