// deploy dataset modules
ApplicationSpecification specification = input.getSpecification();
File unpackedLocation = Files.createTempDir();
try {
BundleJarUtil.unpackProgramJar(input.getArchive(), unpackedLocation);
ProgramClassLoader classLoader = ClassLoaders.newProgramClassLoader(unpackedLocation,
ApiResourceListHolder.getResourceList(),
this.getClass().getClassLoader());
for (Map.Entry<String, String> moduleEntry : specification.getDatasetModules().entrySet()) {
// note: using app class loader to load module class
@SuppressWarnings("unchecked")
Class<?> clazz = classLoader.loadClass(moduleEntry.getValue());
String moduleName = moduleEntry.getKey();
try {
// note: we can deploy module or create module from Dataset class
// note: it seems dangerous to instantiate dataset module here, but this will be fine when we move deploy into
// isolated user's environment (e.g. separate yarn container)