You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/22 08:34:46 UTC

[GitHub] [inlong] thesumery opened a new pull request, #6599: [INLONG-6598][Sort] Import small file compact for iceberg

thesumery opened a new pull request, #6599:
URL: https://github.com/apache/inlong/pull/6599

   ### Prepare a Pull Request
   - Title Example: [INLONG-6598][Sort] Import small file compact for iceberg
   - Fixes #6598 
   
   ### Motivation
   
   *Import small file compact for iceberg*
   
   ### Modifications
   
   *Add some interface for compact action in flink checkpoint.*
   
   


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1033085545


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkActions.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.inlong.sort.iceberg;
+
+import org.apache.iceberg.Table;
+import org.apache.iceberg.actions.ActionsProvider;
+import org.apache.iceberg.actions.RewriteDataFiles;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public interface FlinkActions extends ActionsProvider, Serializable {
+    String COMPACT_ENABLED = "write.compact.enable";
+    boolean COMPACT_ENABLED_DEFAULT = false;
+
+    void init(Map<String, String> actionProperties);
+
+    class FlinkDefaultActions implements FlinkActions {
+        private static final long serialVersionUID = 1L;
+
+        private Map<String, String> actionProperties;
+
+        @Override
+        public void init(Map<String, String> actionProperties) {
+            this.actionProperties = actionProperties;
+        }
+
+        @Override
+        public RewriteDataFiles rewriteDataFiles(Table table) {
+            return FlinkActions.super.rewriteDataFiles(table);

Review Comment:
   Missing default implementation?



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] healchow commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1029987839


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkActions.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.inlong.sort.iceberg;
+
+import org.apache.iceberg.Table;
+import org.apache.iceberg.actions.ActionsProvider;
+import org.apache.iceberg.actions.RewriteDataFiles;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public interface FlinkActions extends ActionsProvider, Serializable {

Review Comment:
   Add Java doc, please.



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] gong commented on pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
gong commented on PR #6599:
URL: https://github.com/apache/inlong/pull/6599#issuecomment-1328495201

   @thesumery please git rebase master, and exec mvn spotless:apply


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] EMsnap commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
EMsnap commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1033084335


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkDynamicTableFactory.java:
##########
@@ -64,37 +65,43 @@
  *
  * <p>
  * Factory for creating configured instances of {@link IcebergTableSource} and {@link
- * IcebergTableSink}.We modify KafkaDynamicTableSink to support append-mode .
+ * IcebergTableSink}.We modify IcebergDynamicTableSink to support append-mode .
  * </p>
  */
 public class FlinkDynamicTableFactory implements DynamicTableSinkFactory, DynamicTableSourceFactory {
 
     static final String FACTORY_IDENTIFIER = "iceberg-inlong";
 
-    private static final ConfigOption<String> CATALOG_NAME =
+    public static final ConfigOption<String> CATALOG_NAME =

Review Comment:
   why public this ? 



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] thesumery commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
thesumery commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1033088093


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkConfigOptions.java:
##########
@@ -22,6 +22,9 @@
 import org.apache.flink.configuration.ConfigOption;
 import org.apache.flink.configuration.ConfigOptions;
 
+/**
+ * Iceberg unique flink configuration
+ */
 public class FlinkConfigOptions {
 
     public static final ConfigOption<Boolean> TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM =

Review Comment:
   ok, remove this class



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] EMsnap merged pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
EMsnap merged PR #6599:
URL: https://github.com/apache/inlong/pull/6599


-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] thesumery commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
thesumery commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1033088649


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkActions.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.inlong.sort.iceberg;
+
+import org.apache.iceberg.Table;
+import org.apache.iceberg.actions.ActionsProvider;
+import org.apache.iceberg.actions.RewriteDataFiles;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public interface FlinkActions extends ActionsProvider, Serializable {
+    String COMPACT_ENABLED = "write.compact.enable";
+    boolean COMPACT_ENABLED_DEFAULT = false;
+
+    void init(Map<String, String> actionProperties);
+
+    class FlinkDefaultActions implements FlinkActions {
+        private static final long serialVersionUID = 1L;
+
+        private Map<String, String> actionProperties;
+
+        @Override
+        public void init(Map<String, String> actionProperties) {
+            this.actionProperties = actionProperties;
+        }
+
+        @Override
+        public RewriteDataFiles rewriteDataFiles(Table table) {
+            return FlinkActions.super.rewriteDataFiles(table);

Review Comment:
   > Can you add a detailed design description?
   
   ok,i will add a detail design here later in pr description.
   
   



-- 
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: commits-unsubscribe@inlong.apache.org

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


[GitHub] [inlong] EMsnap commented on a diff in pull request #6599: [INLONG-6598][Sort] Import small file compact for Apache Iceberg

Posted by GitBox <gi...@apache.org>.
EMsnap commented on code in PR #6599:
URL: https://github.com/apache/inlong/pull/6599#discussion_r1033083500


##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/FlinkConfigOptions.java:
##########
@@ -22,6 +22,9 @@
 import org.apache.flink.configuration.ConfigOption;
 import org.apache.flink.configuration.ConfigOptions;
 
+/**
+ * Iceberg unique flink configuration
+ */
 public class FlinkConfigOptions {
 
     public static final ConfigOption<Boolean> TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM =

Review Comment:
   TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM
   TABLE_EXEC_ICEBERG_INFER_SOURCE_PARALLELISM_MAX
   they are not being used in current code, is it nessasary to keep them ? 



-- 
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: commits-unsubscribe@inlong.apache.org

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