prateekm commented on a change in pull request #1047: SAMZA-2210: Initial
majority migration for injecting classloader when doing reflection
URL: https://github.com/apache/samza/pull/1047#discussion_r290063670
##########
File path: samza-core/src/main/java/org/apache/samza/table/TableManager.java
##########
@@ -85,14 +85,14 @@ public void init(Context context) {
initialized = true;
}
- private void addTable(String tableId, Config config) {
+ private void addTable(String tableId, Config config, ClassLoader
classLoader) {
if (tableContexts.containsKey(tableId)) {
throw new SamzaException("Table " + tableId + " already exists");
}
JavaTableConfig tableConfig = new JavaTableConfig(config);
String providerFactoryClassName =
tableConfig.getTableProviderFactory(tableId);
TableProviderFactory tableProviderFactory =
- Util.getObj(providerFactoryClassName, TableProviderFactory.class);
+ ReflectionUtil.getObj(classLoader, providerFactoryClassName,
TableProviderFactory.class);
Review comment:
Same as above, more of a reminder that this needs to be the plugin
classloader, but is currently the framework (SamzaContainer) classloader. It's
OK to address in next PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services