Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BucketUtils does not make use of FileSystemProviders.installedProviders() #3569

Open
vruano opened this issue Sep 12, 2017 · 1 comment
Open

Comments

@vruano
Copy link
Contributor

vruano commented Sep 12, 2017

It seems that you can find out what FileSystem corresponds to what URI/URL by using the return of FileSystemProviders.installedProviders. Instead BucketUtils has hard-wired scheme names and has many conditional (isCould... isHadoop) for operations that can be done by using the appropriate FileSystem implementation that in turn can be resolved looking at that list.

I guess that there are extant utility classes that process that list once for subsequent queries (e.g. scheme-name -> FS), but I have not confirmed that. Otherwise it is easy to write one.

Is there is a reason what we need to do our own thing in BucketUtils?

@lbergelson
Copy link
Member

BucketUtils was a solution before we had Filesystem providers. It's stuck around as a parallel set of code because we couldn't trust the providers at first. In the long run it should be removed and replaced entirely by Files operations. We need to test that all the functionality exists / works as expected though, and it hasn't been a high priority to do so. Particularly, I'm not sure we have a lot of faith in the HDFS NIO plugin, so we may need to keep around special cases for that. It could definitely at least be simplified a lot though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants