Till Westmann has posted comments on this change. Change subject: WIP - load from classpath ......................................................................
Patch Set 2: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/1400/2/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java File asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/ParserFactoryProvider.java: Line 47: private static final String RESOURCE = "META-INF/services/org.apache.asterix.external.api.IDataParserFactory"; > Should we make this RESOURCE as a directory? As I see from the later initFa There are different approaches. The only restriction we have is, that we can only have of configuration file with a specific name per jar. Now we can either create a lot of jars for the individual classes or create a mechanism to cover several classes in one jar. I'm not sure if directories would work well as I don't know what URL.openStream() does for directories, but this is clearly a solvable problem. One option to handle multiple implementations for one interface in a single jar would be to a) have a single file per interface in the jar (.e.g o.a.a.e.a.IDataParserFactory) that contains a class name of an implementation on each line (e.g. o.a.a.e.p.f.DelimitedDataParserFactory) and to b) extend the interface to provide more information about the implementation (e.g. add a supportedFormats() method to IDataParserFactory). That way we could keep the configuration files simple and allow for an arbitrary number of implementations of a arbitrary number of interfaces in a single jar. -- To view, visit https://asterix-gerrit.ics.uci.edu/1400 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36a3fca2df9134423fe7590be260cfc3856c7f01 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Till Westmann <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Xikui Wang <[email protected]> Gerrit-HasComments: Yes
