Skip to content

Commit

Permalink
[flink] Upgraded sink connector to new API version
Browse files Browse the repository at this point in the history
- Adapted access modifiers
- Consistent naming

Issue alibaba#132
  • Loading branch information
michaelkoepf committed Dec 20, 2024
1 parent 41e592e commit 6ea1b85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
import java.io.Serializable;

/** Flink sink for Fluss. */
public class FlinkSink implements Sink<RowData> {
class FlinkSink implements Sink<RowData> {

private static final long serialVersionUID = 1L;

private final SinkWriterBuilder<? extends FlinkSinkWriter> builder;

public FlinkSink(SinkWriterBuilder<? extends FlinkSinkWriter> builder) {
FlinkSink(SinkWriterBuilder<? extends FlinkSinkWriter> builder) {
this.builder = builder;
}

Expand All @@ -65,15 +65,15 @@ interface SinkWriterBuilder<W extends FlinkSinkWriter> extends Serializable {
}

@Internal
static class AppendSinkSinkWriterBuilder implements SinkWriterBuilder<AppendSinkWriter> {
static class AppendSinkWriterBuilder implements SinkWriterBuilder<AppendSinkWriter> {

private static final long serialVersionUID = 1L;

private final TablePath tablePath;
private final Configuration flussConfig;
private final RowType tableRowType;

public AppendSinkSinkWriterBuilder(
public AppendSinkWriterBuilder(
TablePath tablePath, Configuration flussConfig, RowType tableRowType) {
this.tablePath = tablePath;
this.flussConfig = flussConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {
(primaryKeyIndexes.length > 0)
? new FlinkSink.UpsertSinkWriterBuilder(
tablePath, flussConfig, tableRowType, targetColumnIndexes)
: new FlinkSink.AppendSinkSinkWriterBuilder(
: new FlinkSink.AppendSinkWriterBuilder(
tablePath, flussConfig, tableRowType);

FlinkSink flinkSink = new FlinkSink(flinkSinkWriterBuilder);
Expand Down

0 comments on commit 6ea1b85

Please sign in to comment.