* @param conf job configuration
* @return ELEvaluator the evaluator for el function
* @throws BundleJobException thrown if failed to create evaluator
*/
public ELEvaluator createEvaluator(Configuration conf) throws BundleJobException {
ELEvaluator eval;
ELEvaluator.Context context;
try {
context = new ELEvaluator.Context();
eval = new ELEvaluator(context);
for (Map.Entry<String, String> entry : conf) {
eval.setVariable(entry.getKey(), entry.getValue());
}
}
catch (Exception e) {
throw new BundleJobException(ErrorCode.E1004, e.getMessage(), e);
}