[ 
https://issues.apache.org/jira/browse/BEAM-7613?focusedWorklogId=264763&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-264763
 ]

ASF GitHub Bot logged work on BEAM-7613:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jun/19 16:44
            Start Date: 21/Jun/19 16:44
    Worklog Time Spent: 10m 
      Work Description: dmvk commented on pull request #8923: [BEAM-7613] 
HadoopFileSystem can work with more than one cluster.
URL: https://github.com/apache/beam/pull/8923#discussion_r296312126
 
 

 ##########
 File path: 
sdks/java/io/hadoop-file-system/src/main/java/org/apache/beam/sdk/io/hdfs/HadoopFileSystem.java
 ##########
 @@ -313,7 +328,7 @@ protected HadoopResourceId matchNewResource(String 
singleResourceSpec, boolean i
 
   @Override
   protected String getScheme() {
-    return fileSystem.getScheme();
+    return "hdfs";
 
 Review comment:
   If we want to do it this way, it would be a good idea to allow user to set 
only a single configuration, which would be a breaking change to the API, but 
we don't allow user to use it anyway right now.
   
   ```
       checkArgument(
           configurations.size() <= 1,
           String.format(
               "The %s currently only supports at most a single Hadoop 
configuration.",
               HadoopFileSystemRegistrar.class.getSimpleName()));
   ```
   
   This way we wouldn't have to deal with multiple `fs.defaultFS` definitions 
and other possible config option conflicts.
   
   It is probably less flexible, but we should have either this, or force user 
to specify a config per cluster.
   
   WDYT?
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 264763)
    Time Spent: 1h 10m  (was: 1h)

> HadoopFileSystem can be only used with fs.defaultFS
> ---------------------------------------------------
>
>                 Key: BEAM-7613
>                 URL: https://issues.apache.org/jira/browse/BEAM-7613
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-hadoop-file-system
>    Affects Versions: 2.13.0
>            Reporter: David Moravek
>            Assignee: David Moravek
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> _HadoopFileSystem_ creates underlying _FileSystem_ (one from 
> org.apache.hadoop) instance during it's construction. Single _FileSystem_ 
> instance is tied to a particular cluster (scheme + authority pair). In case 
> we want to talk to another cluster, this fail due to _FileSystem#checkPath_.
>  
> This can be fixed by using _FileSystem#get(java.net.URI, 
> org.apache.hadoop.conf.Configuration)_ instead of 
> _FileSystem#newInstance(org.apache.hadoop.conf.Configuration)_{{}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to