rdblue commented on a change in pull request #784: Allow caller to construct 
HadoopInputFile and HadoopOutputFile using an existing instance of FileSystem 
object.
URL: https://github.com/apache/incubator-iceberg/pull/784#discussion_r378425260
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopInputFile.java
 ##########
 @@ -133,7 +143,7 @@ public SeekableInputStream newStream() {
   }
 
   public Configuration getConf() {
-    return conf;
+    return fs.getConf();
 
 Review comment:
   You can get input and output files by constructing them yourself, but the 
recommended way is to use the factory methods on a table's `FileIO` so that the 
catalog/table implementation can inject what it needs to at this layer, like 
using a different implementation for an object store.
   
   The Hadoop variants of input and output file accept a configuration so that 
`HadoopFileIO` can pass it, but changing that `Configuration` is not a part of 
the API. We should avoid cases where implementations attempt to change the 
configuration that an `InputFile` or `OutputFile` uses. The right way to pass a 
configuration is to pass it in when creating a catalog.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to