beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Sisk (JIRA)" <>
Subject [jira] [Created] (BEAM-2069) Remove FileSystem.getCurrentDirectory()?
Date Mon, 24 Apr 2017 23:19:04 GMT
Stephen Sisk created BEAM-2069:

             Summary: Remove FileSystem.getCurrentDirectory()?
                 Key: BEAM-2069
             Project: Beam
          Issue Type: Bug
          Components: sdk-java-core
            Reporter: Stephen Sisk
            Assignee: Davor Bonaci

Beam FileSystem currently has a getCurrentDirectory method that returns the current resource
id if it's a directory, or the parent directory if it's a directory.

To implement this you need to know whether or not a particular path is a directory or not.

I'm trying to implement the Hadoop FileSystem implementation, and it's not clear if it's possible.
Hadoop's Paths do not end a / if they are a directory (they are stripped), nor do hadoop paths
tell you if something is a directory, so it's not possible to determine if a given path is
a file that does not have a suffix, or a directory.

It's not clear to me that all file systems can determine whether a path is a directory and
thus I don't believe it can be implemented reliably.

The only usages of getCurrentDirectory that I could find are in tests so it's not clear we
actually need this.

I propose that we remove this method.

cc [~davor]

This message was sent by Atlassian JIRA

View raw message