Yaml properties are not available when the @Components are initialized, they get configured after the components are initialized, therefore we cannot use handy tools like @ConditionalOnProperty/ @ConditionalOnBean. @Lazy is next best thing, it makes the bean initialize lazily and this is fantastic for heavy-lifting fsclients. This is also similar with our previous behavior: HdfsStorageProvider
Testing Done
[✅] Manually Tested on local docker setup. Please include commands ran, and their output.
[✅] Added new tests for the changes made.
[✅] Updated existing tests to reflect the changes made.
Summary
This PR sets foundation for
Storage
interfaces and provides a sample implementation calledLocalStorage
two primary interfaces are:
This PR also adds
LocalStorage
,LocalStorageClient
to show how new implementations should be added.Methods in
Storage
,StorageClient
are minimal right now, but they'll be extended as we do refactoring.For more details please see the document here.
Whats with
@Lazy
?Yaml properties are not available when the
@Components
are initialized, they get configured after the components are initialized, therefore we cannot use handy tools like@ConditionalOnProperty
/@ConditionalOnBean
.@Lazy
is next best thing, it makes the bean initialize lazily and this is fantastic for heavy-lifting fsclients. This is also similar with our previous behavior: HdfsStorageProviderTesting Done