This is an automated email from the ASF dual-hosted git repository.
danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 09ed2cbffd5 [HUDI-6812]Fix bootstrap operator null point exception
while lastInstantTime is null (#9599)
09ed2cbffd5 is described below
commit 09ed2cbffd50a0e2cb7427ec170fa1989f832552
Author: oliver jude <[email protected]>
AuthorDate: Mon Sep 4 09:58:55 2023 +0800
[HUDI-6812]Fix bootstrap operator null point exception while
lastInstantTime is null (#9599)
Co-authored-by: zhuzhengjun <[email protected]>
---
.../main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
index 7c9daf4075d..1bdfeb7296b 100644
---
a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
+++
b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
@@ -108,7 +108,9 @@ public class BootstrapOperator<I, O extends HoodieRecord<?>>
@Override
public void snapshotState(StateSnapshotContext context) throws Exception {
lastInstantTime = this.ckpMetadata.lastPendingInstant();
- instantState.update(Collections.singletonList(lastInstantTime));
+ if (null != lastInstantTime) {
+ instantState.update(Collections.singletonList(lastInstantTime));
+ }
}
@Override