1
0

[HUDI-3868] Disable the sort input for flink streaming append mode (#5309)

This commit is contained in:
Danny Chan
2022-04-13 14:21:08 +08:00
committed by GitHub
parent 434e782b7d
commit 43de2b4702
2 changed files with 12 additions and 2 deletions

View File

@@ -173,9 +173,19 @@ public class Pipelines {
* @param conf The configuration
* @param rowType The input row type
* @param dataStream The input data stream
* @param bounded Whether the input stream is bounded
* @return the appending data stream sink
*/
public static DataStreamSink<Object> append(Configuration conf, RowType rowType, DataStream<RowData> dataStream) {
public static DataStreamSink<Object> append(
Configuration conf,
RowType rowType,
DataStream<RowData> dataStream,
boolean bounded) {
if (!bounded) {
// In principle, the config should be immutable, but the boundedness
// is only visible when creating the sink pipeline.
conf.setBoolean(FlinkOptions.WRITE_BULK_INSERT_SORT_INPUT, false);
}
WriteOperatorFactory<RowData> operatorFactory = AppendWriteOperator.getFactory(conf, rowType);
return dataStream

View File

@@ -78,7 +78,7 @@ public class HoodieTableSink implements DynamicTableSink, SupportsPartitioning,
// Append mode
if (OptionsResolver.isAppendMode(conf)) {
return Pipelines.append(conf, rowType, dataStream);
return Pipelines.append(conf, rowType, dataStream, context.isBounded());
}
// default parallelism