stevenzwu commented on a change in pull request #1477:
URL: https://github.com/apache/iceberg/pull/1477#discussion_r495671194



##########
File path: 
flink/src/main/java/org/apache/iceberg/flink/sink/IcebergFilesCommitter.java
##########
@@ -117,6 +120,10 @@ public void initializeState(StateInitializationContext 
context) throws Exception
     // Open the table loader and load the table.
     this.tableLoader.open(hadoopConf.get());
     this.table = tableLoader.loadTable();
+
+    int subTaskId = getRuntimeContext().getIndexOfThisSubtask();
+    int attemptId = getRuntimeContext().getAttemptNumber();
+    this.flinkManifestFactory = FlinkManifest.createFactory(table, flinkJobId, 
subTaskId, attemptId);

Review comment:
       +1 on the comment. I also asked a question regarding `partitionId` in 
the definition place, as it is not a very intuitive name in the context. Now 
looking at the usage here. I am wondering if the arg order is correct. In the 
definition, `taskId` is the last/4th arg, while here `subtaskid` is supplied in 
the 3rd arg.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to