Description
JsonToBean has code to map from Bundle Job, Coordinator Job, etc JSON into the associated BundleJob, CoordinatorJob, etc classes.
If a mapping is missing, and you try to call a getter, the code will compile but you'll get a RuntimeException. For example; the mapping for BundleJob.getAcl() is missing. Specifically, when you use this code:
BundleJob job = client.getBundleJobInfo(jobId);
String acl = job.getAcl();
you get this exception:
Exception in thread "main" java.lang.RuntimeException: Undefined method mapping: getAcl at org.apache.oozie.client.rest.JsonToBean$JsonInvocationHandler.invoke(JsonToBean.java:217) at com.sun.proxy.$Proxy4.getAcl(Unknown Source) ...
There are a few inconsistencies including extra mappings, missing mappings, and missing information from the server.
We should:
- Fix these inconsistencies.
- Write tests to prevent this sort of thing from happening in the future.
Attachments
Attachments
Issue Links
- is depended upon by
-
OOZIE-2296 Add an Oozie diagnostic bundle tool
- Closed