KKcorps commented on code in PR #9681:
URL: https://github.com/apache/pinot/pull/9681#discussion_r1012298208
##########
pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFSFactory.java:
##########
@@ -39,24 +39,34 @@ private PinotFSFactory() {
public static final String LOCAL_PINOT_FS_SCHEME = "file";
private static final Logger LOGGER =
LoggerFactory.getLogger(PinotFSFactory.class);
private static final String CLASS = "class";
- private static final Map<String, PinotFS> PINOT_FS_MAP = new HashMap<String,
PinotFS>() {
+ private static final Map<String, PinotFSInfo> PINOT_FS_MAP = new
HashMap<String, PinotFSInfo>() {
{
- put(LOCAL_PINOT_FS_SCHEME, new LocalPinotFS());
+ put(LOCAL_PINOT_FS_SCHEME, new PinotFSInfo(null, null, new
LocalPinotFS()));
}
};
public static void register(String scheme, String fsClassName,
PinotConfiguration fsConfiguration) {
try {
- LOGGER.info("Initializing PinotFS for scheme {}, classname {}", scheme,
fsClassName);
- PinotFS pinotFS = PluginManager.get().createInstance(fsClassName);
- pinotFS.init(fsConfiguration);
- PINOT_FS_MAP.put(scheme, pinotFS);
Review Comment:
You're right. This approach seems cleaner and much-less error-prone for
caller. Made the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]