You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/11 02:28:07 UTC

[GitHub] [flink-table-store] JingsongLi opened a new pull request, #86: [FLINK-27158] Adjust default value of compaction and compress

JingsongLi opened a new pull request, #86:
URL: https://github.com/apache/flink-table-store/pull/86

   - By default, numLevels = numSortedRunMax + 1, this ensures that the compaction does not fall to level 0, but at least to level 1
   - orc default compress is lz4, zlib is too slow


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] JingsongLi merged pull request #86: [FLINK-27158] Adjust default value of compaction and compress

Posted by GitBox <gi...@apache.org>.
JingsongLi merged PR #86:
URL: https://github.com/apache/flink-table-store/pull/86


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-table-store] JingsongLi commented on a diff in pull request #86: [FLINK-27158] Adjust default value of compaction and compress

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on code in PR #86:
URL: https://github.com/apache/flink-table-store/pull/86#discussion_r846903121


##########
flink-table-store-format/src/main/java/org/apache/flink/table/store/format/orc/OrcFileFormatFactory.java:
##########
@@ -31,7 +32,19 @@ public String identifier() {
     }
 
     @Override
-    public FileFormat create(ReadableConfig formatOptions) {
-        return new OrcFileFormat(formatOptions);
+    public OrcFileFormat create(Configuration formatOptions) {
+        return new OrcFileFormat(supplyDefaultOptions(formatOptions));
+    }
+
+    private Configuration supplyDefaultOptions(Configuration options) {
+        if (!options.containsKey("compress")) {
+            Properties properties = new Properties();
+            options.addAllToProperties(properties);
+            properties.setProperty("compress", "lz4");
+            Configuration newOptions = new Configuration();
+            properties.forEach((k, v) -> newOptions.setString(k.toString(), v.toString()));
+            return newOptions;

Review Comment:
   orc will use `addAllToProperties`, so here must returns a `Configuration`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org