Skip to content

Commit

Permalink
[Minor] Throws an exception when using bulk_insert and stream mode (a…
Browse files Browse the repository at this point in the history
…pache#10082)

Co-authored-by: leixin1 <leixin1@jd.com>
  • Loading branch information
LXin96 and leixin1 authored Nov 15, 2023
1 parent 055839b commit 19b3e7f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.hudi.configuration.FlinkOptions;
import org.apache.hudi.configuration.OptionsInference;
import org.apache.hudi.configuration.OptionsResolver;
import org.apache.hudi.exception.HoodieException;
import org.apache.hudi.sink.utils.Pipelines;
import org.apache.hudi.util.ChangelogModes;
import org.apache.hudi.util.DataModificationInfos;
Expand Down Expand Up @@ -86,6 +87,10 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {

// bulk_insert mode
if (OptionsResolver.isBulkInsertOperation(conf)) {
if (!context.isBounded()) {
throw new HoodieException(
"The bulk insert should be run in batch execution mode.");
}
return Pipelines.bulkInsert(conf, rowType, dataStream);
}

Expand Down

0 comments on commit 19b3e7f

Please sign in to comment.