Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ConfigOptions;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.table.factories.FactoryUtil;

import java.lang.reflect.Field;
import java.util.ArrayList;
Expand Down Expand Up @@ -232,6 +233,8 @@ private FlinkOptions() {
// ------------------------------------------------------------------------
// Write Options
// ------------------------------------------------------------------------
public static final ConfigOption<Integer> SINK_PARALLELISM = FactoryUtil.SINK_PARALLELISM;

public static final ConfigOption<String> TABLE_NAME = ConfigOptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, it seems that we want to add a default parallelism to the sink, but there is already parallelism param named write.tasks, can we rename this param to write.default_tasks or something ? And we should add test in TestHoodieTableFactory, before we make agreement, can you revert this PR first ? Thanks ~

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, it seems that we want to add a default parallelism to the sink, but there is already parallelism param named write.tasks, can we rename this param to write.default_tasks or something ? And we should add test in TestHoodieTableFactory, before we make agreement, can you revert this PR first ? Thanks ~

well, let me revert this PR first, Then come to an agreement, sorry @hehuiyuan my mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.key(HoodieWriteConfig.TBL_NAME.key())
.stringType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {
}

// default parallelism
int parallelism = dataStream.getExecutionConfig().getParallelism();
int parallelism = conf.getInteger(FlinkOptions.SINK_PARALLELISM,
dataStream.getExecutionConfig().getParallelism());
DataStream<Object> pipeline;
// bootstrap
final DataStream<HoodieRecord> hoodieRecordDataStream =
Expand Down