stevenzwu commented on a change in pull request #3986:
URL: https://github.com/apache/iceberg/pull/3986#discussion_r793290390
##########
File path:
flink/v1.12/flink/src/main/java/org/apache/iceberg/flink/sink/ManifestOutputFileFactory.java
##########
@@ -28,6 +28,7 @@
import org.apache.iceberg.relocated.com.google.common.base.Strings;
class ManifestOutputFileFactory {
+ private static final AtomicInteger fileCount = new AtomicInteger(0);
Review comment:
hmm. I didn't think about the case where target table can be the same.
However, I also think the static variable may also not be enough. I think we
can still get name collision when those committer operators run on different
TMs. we may want to use this unique id from `StreamingRuntimeContext`
```
/**
* Returned value is guaranteed to be unique between operators within
the same job and to be
* stable and the same across job submissions.
*
* <p>This operation is currently only supported in Streaming
(DataStream) contexts.
*
* @return String representation of the operator's unique id.
*/
public String getOperatorUniqueID() {
return operatorUniqueID;
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]