[
https://issues.apache.org/jira/browse/SOLR-17646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923506#comment-17923506
]
David Smiley commented on SOLR-17646:
-------------------------------------
For sure, NIOFSDirectoryFactory, StandardDirectoryFactory, and
CachingDirectoryFactory will need modifications, as I see usages of `Path.of`
and other things that assumes the default FileSystem.
Two ideas, not mutually exclusive:
* the DirectoryFactory could have a URI configuration string that implies a
certain FileSystem. Convert this to a Path in a few lines of code. Maybe need
this _anyway_, if for nothing else, as a default.
* the DF.create method could keep path being a String; doesn't have to be
changed to a Path. Changing some Strings to a Path would be a big change;
perhaps too much for this JIRA and not strictly necessary anyway TBH. As a
string, it could be a URI and converted to a Path with a few lines of standard
code. Hopefully this URI style data dir string would work if we configure a
core to have such a data dir.
The work here might start with a simple test using EmbeddedSolrServerTestRule
configured to use NIOFSDirectoryFactory and attempting to use a built-in
FileSystem like for Zip, even though read-only (I assume). It's plausible we
don't _need_ to change some String to Paths; hard to say without digging into
the work.
It might be worthwhile to see if there is similar support in OpenSearch or
something else to see what that looks like.
> DirectoryFactory should support any NIO FileSystemProvider
> ----------------------------------------------------------
>
> Key: SOLR-17646
> URL: https://issues.apache.org/jira/browse/SOLR-17646
> Project: Solr
> Issue Type: New Feature
> Reporter: David Smiley
> Priority: Major
>
> Ideally, the DirectoryFactory should support any NIO FileSystemProvider
> without assuming the local/default FileSystem. There are a variety of
> implementations out there, such as for cloud storage (S3, GCP, ...),
> [HDFS|https://github.com/damiencarol/jsr203-hadoop], and even Zip (imagine a
> read-only directory). This means switching from String & File to Path, and
> avoiding sneaky methods that assume the default FileSystem.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]