gong commented on code in PR #7418:
URL: https://github.com/apache/inlong/pull/7418#discussion_r1116459063
##########
inlong-sort/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/multiple/IcebergSingleStreamWriter.java:
##########
@@ -125,37 +114,7 @@ public void prepareSnapshotPreBarrier(long checkpointId)
throws Exception {
@Override
public void processElement(T value) throws Exception {
- try {
- writer.write(value);
- } catch (Exception e) {
- LOGGER.error(String.format("write error, raw data: %s", value), e);
- if (!dirtyOptions.ignoreDirty()) {
- throw e;
- }
- if (dirtySink != null) {
- DirtyData.Builder<Object> builder = DirtyData.builder();
- try {
- builder.setData(value)
- .setLabels(dirtyOptions.getLabels())
- .setLogTag(dirtyOptions.getLogTag())
- .setIdentifier(dirtyOptions.getIdentifier())
- .setRowType(flinkRowType)
- .setDirtyMessage(e.getMessage());
- dirtySink.invoke(builder.build());
- if (metricData != null) {
- metricData.invokeDirtyWithEstimate(value);
- }
- } catch (Exception ex) {
- if (!dirtyOptions.ignoreSideOutputErrors()) {
- throw new RuntimeException(ex);
- }
- LOGGER.warn("Dirty sink failed", ex);
Review Comment:
> Compared with SinkMetricData, SinkTableMetricData not only collects the
metric of each table, but also summarizes the metric of a node; So the
SinkTableMetricData object is moved to the IcebergMultipleStreamWriter class,
and the IcebergSingleStreamWriter only corresponds to a single table;
@lordcheng10 single table sync will exec
FlinkSink#chainIcebergSingleSinkOperators#createStreamWriter#IcebergSingleStreamWriter.
So metric will and dirty data process logic will lost
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]