Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.18.0
-
Fix Version/s: None
-
Component/s: Command-line Interface
-
Labels:None
Description
The CLI loads the source and target datasets using the default class loader initialized with the JVM's classpath. Any classes that are provided by using the --jar option aren't included.
The expected object type is determined by target.getType(), which tries to load the class in DataModelUtil. If the class isn't in the classpath, then the method returns GenericData.Record. The transform uses this class to validate objects coming from the transform DoFn to ensure the target dataset writer can write the objects (GenericData can't write reflect classes).
One possible solution is to handle the --jar options in main rather than in each command.