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



##########
File path: 
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/source/FlinkSource.java
##########
@@ -247,6 +250,16 @@ int inferParallelism(FlinkInputFormat format, ScanContext 
context) {
       parallelism = Math.max(1, parallelism);
       return parallelism;
     }
+
+    private boolean localityEnabled() {
+      FileIO fileIO = table.io();
+      if (fileIO instanceof HadoopFileIO) {
+        Boolean localityConfig = readableConfig.get(FlinkConfigOptions
+            .TABLE_EXEC_ICEBERG_EXPOSE_SPLIT_LOCALITY_INFO);
+        return localityConfig != null ? localityConfig : true;

Review comment:
       I thought the 
[discussion](https://lists.apache.org/thread/cknhjhvf63vp7xq7gwdbj9mlp0z0wj8b) 
is to use S3FileIO for Azure or GCS because they implements S3 like API.
   
   With that said, I do agree to check the `scheme` like the Spark `Reader` 
class does. but @hililiwei we shouldn't need to open an InputFile for that 
purpose. We can just follow the Spark code.
   ```
    FileSystem fs = new Path(table.location()).getFileSystem(conf);
           fsscheme = fs.getScheme().toLowerCase(Locale.ENGLISH);
   ```




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

Reply via email to