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

Clarify CloudFileSystem API. #313

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Clarify CloudFileSystem API. #313

merged 2 commits into from
Jan 19, 2024

Conversation

dpetrov4
Copy link

Splitting the CloudFileSystem class into a pure interface class
and a separate class that contains static initialization and factory
methods (CloudFileSystemEnv).
This will make it possible to provide other implementations of CloudFileSystem
wihtout having to wrangle with static functions and options.

Splitting the CloudFileSystem class into a pure interface class
and a separate class that contains static initialization and factory
methods (CloudFileSystemEnv).
This will make it possible to provide other implementations of CloudFileSystem
wihtout having to wrangle with static functions and options.
@dpetrov4 dpetrov4 requested review from nbronson, igorcanadi, a team and seckcoder January 12, 2024 23:14
// constructed, and remain active (Aws::ShutdownAPI() not called) as long as any
// CloudFileSystem objects exist.
class CloudFileSystemEnv : public CloudFileSystem {
protected:
Copy link

@seckcoder seckcoder Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why do we keep this separate class instead of moving all these static functions and member variables to CloudFileSystemImpl and simply removing this CloudFileSystemEnv class?

nvm, seems we access these static methods in rockset codebase.

Would it be better to move all these member variables and member functions to CloudFileSystemImpl and only keep these static functions in CloudFileSystemEnv so that CloudFileSystemEnv doesn't have to inherit the interface CloudFileSystem?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. I kind of assumed there was a reason for these methods to be in CloudFileSystem in the first place. Maybe somebody didn't want to reveal the fact that ColoudFileSystemImpl exists to the client code or didn't want to force them to add another include.
There is some logic to the current state. CloudFileSystem defines the API, CloudFileSystemEnv has various static initialization methods. Theoretically it could even be made separate from the CloudFileSystem class hierarchy altogether. Finally, CloudFileSystemImp implements the CloudFileSystem and FileSystem APIs.

That being said, I am not opposed to moving everything to CloudFileSystemImpl if that is the consensus.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically it could even be made separate from the CloudFileSystem class hierarchy altogether. Finally, CloudFileSystemImp implements the CloudFileSystem and FileSystem APIs

Like this idea.

Copy link

@seckcoder seckcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would be better if we could make CloudFileSystemEnv separate from the CloudFileSystem class hierarchy.

@igorcanadi
Copy link

Sorry Dmitri, would you mind waiting for SYS-6913 to be done before landing this?

@dpetrov4
Copy link
Author

I have updated the code to detach CloudFileSystemEnv from the CloudfileSystem->CloudFileSystemImpl hierarchy.

Will wait for @igorcanadi to "do his thing" before merging.

@dpetrov4 dpetrov4 merged commit 40f265a into master Jan 19, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants