Hi Joshua, Could you use `TableFactoryService` directly to register TableSource? The code looks like:
final TableSource<?> tableSource = > TableFactoryService.find(StreamTableSourceFactory.class, > streamTableDescriptor, classloader) > .createStreamTableSource(propertiesMap); > tableEnv.registerTableSource(name, tableSource); Best, Hequn On Tue, Jan 15, 2019 at 6:43 PM Joshua Fan <joshuafat...@gmail.com> wrote: > Hi > > As known, TableFactoryService has many methods to find a suitable service > to load. Some of them use a user defined classloader, the others just uses > the default classloader. > > Now I use ConnectTableDescriptor to registerTableSource in the > environment, which uses TableFactoryUtil to load service, but > TableFactoryUtil just use the default classloader, it is not enough in my > case. Because the user may use kafka 0.8 or 0.9, the jars can not be put > together in the lib directory. > > Is there a proper way to use ConnectTableDescriptor to registerTableSource > at a user defined classloader? > > I know SQL Client has their now implementation to avoid > use TableFactoryUtil, but I think TableFactoryUtil itself should also > provide a method to use user defined classloader. > > Yours sincerely > Joshhua >