Hi All, With a lot of Apache projects making use of inner class in Java 7 and Decarative programming feature of Java 8 to define stages in the pipeline, I would like to propose a small additional to our existing compositional APIs allowing it to define processing stages inline.
I've created a public gist of addition and example about it: https://gist.github.com/chinmaykolhatkar/ad3d25fd9a0343d76ac7fdd7fca59e6f Basically, it has an abstract "Process" base operator which has a single abstract method called "apply" which takes input and returns output. This method also takes a state variable to allow user to maintain any state if required for the operator. This way one can create a new operator simply as follows: dag.addOperator("test", new Process<String, String[]>() { @Override public String[] apply(String s, Map<String, Object> state) { return s.split(" "); } }); Using this one need not create a new class for defining simple and up to a certain level complex functionalities. Intention of this is to make app developers life easier. Please share your thoughts if this can be a good addition. Thanks, Chinmay.