-
Notifications
You must be signed in to change notification settings - Fork 6
Dev log sink refactor #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @Override | ||
| public SinkRuntimeProvider getSinkRuntimeProvider(Context context) { | ||
| return SinkFunctionProvider.of(new Slf4jSink<>(printIdentifier)); | ||
| Slf4jSink.Builder build = Slf4jSink.builder().setFieldDataTypes(tableSchema.getFieldDataTypes()).setPrintIdentifier(printIdentifier); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"====== " 太长了,已经有 printIdentifier 了就可以不用了吧
kylemeow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
采用 RowData::FieldGetter 来获取RowData里面的字段。
不同flink版本打包时候,要修改pom里的flink版本号