use of org.python.core.PyIterator in project apex-malhar by apache.
the class PythonOperator method getBindings.
@Override
public Map<String, Object> getBindings() {
Map<String, Object> bindings = new HashMap<String, Object>();
PyStringMap keyValueMap = (PyStringMap) interp.getLocals();
PyIterator keyValueSet = (PyIterator) keyValueMap.iteritems();
for (Object temp : keyValueSet) {
PyTuple tempEntry = (PyTuple) temp;
Iterator<PyObject> iter = tempEntry.iterator();
bindings.put((String) iter.next().__tojava__(String.class), iter.next());
}
return bindings;
}
Aggregations