-
Notifications
You must be signed in to change notification settings - Fork 22
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
refactor: Reduce API implementation classes visibility #227
Conversation
Looking at FileSystems.newFileSystem javadoc, it looks like the method is intented for creating filesystems, not just a The default FileSystem implementations IMHO, I think it will be a good opportunity to remove the current implementation of newFileSystem for v2.x.x , leaving it unimplemented (
What are your thoughts @markjschreiber ? |
775803e
to
6b6a9ca
Compare
You make a good point. I would be in favor of being able to use it to create a bucket. The map of key value pairs passed to it would need to map to properties that can be set on the |
Exactly! Would it be ok to turn it into unimplemented for this PR and leave the implementation for a future PR? Otherwise it'll be a hell to review as it is already big. |
6b6a9ca
to
ea23c1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this refactoring. I have asked a couple of questions in the review and there are some suggested changes.
src/main/java/software/amazon/nio/spi/s3/NotYetImplementedException.java
Show resolved
Hide resolved
public S3FileSystem newFileSystem(URI uri) { | ||
return newFileSystem(uri, Collections.EMPTY_MAP); | ||
public FileSystem newFileSystem(URI uri, Map<String, ?> env) { | ||
throw new NotYetImplementedException("This method is not yet supported in v2.x. It might be implemented for bucket creation"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an issue to implement this for bucket creation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I'll do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #243, feel free to add any information you consider relevant 🙏
@@ -14,34 +14,16 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
package software.amazon.nio.spi.s3x; | |||
package software.amazon.nio.spi.s3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You seem to have moved some of the s3x... classes into the s3 package. Is this intentional? If so you should probably move the rest as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it was intentional. By changing the visibility of fileSystemInfo
in the superclass of the S3XFileSystemProvider
, I needed to move this one to the same package.
The one left in s3x
package is S3XFileSystemInfo
, I can move it👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 1c80df9
Merging the other PRs has created a conflict here. You can probably resolve it by rebasing this onto HEAD |
…t it is just an implementation of BasicFileAttributeView
732a951
to
37fd462
Compare
…igured. Hide `S3Path` from `FileSystem.getPath`
2bf05f2
to
bf050eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Description of changes
As described in #223 (comment):
Code coverage
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.