Skip to content

Conversation

@xhmz
Copy link
Contributor

@xhmz xhmz commented Sep 16, 2021

采用 RowData::FieldGetter 来获取RowData里面的字段。
不同flink版本打包时候,要修改pom里的flink版本号

@Override
public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {
return SinkFunctionProvider.of(new Slf4jSink<>(printIdentifier));
Slf4jSink.Builder build = Slf4jSink.builder().setFieldDataTypes(tableSchema.getFieldDataTypes()).setPrintIdentifier(printIdentifier);
Copy link
Collaborator

Choose a reason for hiding this comment

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

变量名应该是 builder

Method m1 = null;
CatalogTable table = null;
try {
m1 = clazz.getDeclaredMethod("getCatalogTable");
Copy link
Collaborator

Choose a reason for hiding this comment

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

不建议用 m1 这样的名字

public void invoke(T value, Context context) {
StringBuilder builder = new StringBuilder();
builder.append(printIdentifier);
builder.append("====== " + printIdentifier);
Copy link
Collaborator

Choose a reason for hiding this comment

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

"====== " 太长了,已经有 printIdentifier 了就可以不用了吧

Copy link
Collaborator

@kylemeow kylemeow left a comment

Choose a reason for hiding this comment

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

OK

@kylemeow kylemeow merged commit 4a380b7 into tencentyun:master Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants