You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "MOBIN-F (via GitHub)" <gi...@apache.org> on 2025/05/28 11:19:33 UTC

[PR] [FLINK-37860][pipeline-connector/paimon]Fix Committer.createContext not passing OperatorStateStore correctly [flink-cdc]

MOBIN-F opened a new pull request, #4029:
URL: https://github.com/apache/flink-cdc/pull/4029

   pipeline.yml
   ```
   source:
   sink:
     type: paimon
     name: Paimon Sink
     catalog.properties.metastore: hive
     catalog.properties.uri: thrift://test:9083
     catalog.properties.warehouse: hdfs://test/warehouse/
   
     table.properties.metastore.partitioned-table: true
    ```
   
   The metastore.partitioned-table parameter of paimon will store partition information in the state and trigger updates to HMS periodically. When the user turns on this parameter, NEP exception will occur because the OperatorStateStore is not correctly passed in Committer.createContext.
   ```
   Caused by: java.lang.RuntimeException: java.lang.NullPointerException
       at org.apache.paimon.flink.sink.StoreCommitter.<init>(StoreCommitter.java:63)
       at org.apache.paimon.flink.sink.StoreMultiCommitter.getStoreCommitter(StoreMultiCommitter.java:204)
       at java.util.HashMap$KeySet.forEach(HashMap.java:928)
       at org.apache.paimon.flink.sink.StoreMultiCommitter.commit(StoreMultiCommitter.java:128)
       at org.apache.flink.cdc.connectors.paimon.sink.v2.PreCommitOperator.snapshotState(PreCommitOperator.java:116)
       at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.snapshotState(StreamOperatorStateHandler.java:234)
       ... 33 more
   Caused by: java.lang.NullPointerException
       at org.apache.paimon.flink.sink.partition.ReportPartStatsListener.<init>(ReportPartStatsListener.java:75)
       at org.apache.paimon.flink.sink.partition.ReportPartStatsListener.create(ReportPartStatsListener.java:180)
       at org.apache.paimon.flink.sink.partition.PartitionListeners.create(PartitionListeners.java:62)
       at org.apache.paimon.flink.sink.StoreCommitter.<init>(StoreCommitter.java:61)
       ... 38 more
   ```
    


-- 
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


Re: [PR] [FLINK-37860][pipeline-connector/paimon]Fix Committer.createContext not passing OperatorStateStore correctly [flink-cdc]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #4029:
URL: https://github.com/apache/flink-cdc/pull/4029#issuecomment-2918074961

   Could you add a test for 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: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-37860][pipeline-connector/paimon]Fix Committer.createContext not passing OperatorStateStore correctly [flink-cdc]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan merged PR #4029:
URL: https://github.com/apache/flink-cdc/pull/4029


-- 
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


Re: [PR] [FLINK-37860][pipeline-connector/paimon]Fix Committer.createContext not passing OperatorStateStore correctly [flink-cdc]

Posted by "MOBIN-F (via GitHub)" <gi...@apache.org>.
MOBIN-F commented on PR #4029:
URL: https://github.com/apache/flink-cdc/pull/4029#issuecomment-2948433898

   rebase, Please help trigger CI again,thanks@lvyanquan 


-- 
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


Re: [PR] [FLINK-37860][pipeline-connector/paimon]Fix Committer.createContext not passing OperatorStateStore correctly [flink-cdc]

Posted by "MOBIN-F (via GitHub)" <gi...@apache.org>.
MOBIN-F commented on code in PR #4029:
URL: https://github.com/apache/flink-cdc/pull/4029#discussion_r2128524947


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/v2/PreCommitOperator.java:
##########
@@ -140,4 +147,9 @@ public void close() throws Exception {
             storeMultiCommitter.close();
         }
     }
+
+    @Override
+    public void endInput() throws Exception {
+        commitUpToCheckpoint(Long.MAX_VALUE);
+    }

Review Comment:
   When using flink batch mode and bounded stream, the endInput method of BoundedOneInput is needed to drive commit.
   In the test case, env.fromCollection(events, TypeInformation.of(Event.class) returns a bounded stream. When the data ends, endInput() is called to generate a paimon snapshot.



-- 
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