hililiwei commented on a change in pull request #3817:
URL: https://github.com/apache/iceberg/pull/3817#discussion_r779972943
##########
File path:
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/source/FlinkInputSplit.java
##########
@@ -19,28 +19,19 @@
package org.apache.iceberg.flink.source;
-import org.apache.flink.core.io.InputSplit;
import org.apache.flink.core.io.LocatableInputSplit;
import org.apache.iceberg.CombinedScanTask;
import org.apache.iceberg.relocated.com.google.common.base.MoreObjects;
-/**
- * TODO Implement {@link LocatableInputSplit}.
- */
-public class FlinkInputSplit implements InputSplit {
+public class FlinkInputSplit extends LocatableInputSplit {
- private final int splitNumber;
private final CombinedScanTask task;
- FlinkInputSplit(int splitNumber, CombinedScanTask task) {
- this.splitNumber = splitNumber;
+ FlinkInputSplit(int splitNumber, CombinedScanTask task, String[] hosts) {
Review comment:
yes, It's a `null`. And
`org.apache.flink.core.io.LocatableInputSplit#LocatableInputSplit(int,
java.lang.String[])` converts `null `to a empty array.
refer
https://github.com/apache/flink/blob/137b65c5f23e5ba546ce52bd15fa7aa528ab95de/flink-core/src/main/java/org/apache/flink/core/io/LocatableInputSplit.java#L61-L64
Maybe add an @Nullable to it? like this:
```
FlinkInputSplit(int splitNumber, CombinedScanTask task, @Nullable String[]
hosts) {
super(splitNumber, hosts);
this.task = task;
}
```
--
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]