You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 17:25:34 UTC

[GitHub] [beam] kennknowles opened a new issue, #18338: Remove ResourceId.getCurrentDirectory()?

kennknowles opened a new issue, #18338:
URL: https://github.com/apache/beam/issues/18338

   Beam ResourceId 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 ResourceId 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]
   
   Imported from Jira [BEAM-2069](https://issues.apache.org/jira/browse/BEAM-2069). Original Jira may contain additional context.
   Reported by: sisk.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org