wangxianghu commented on pull request #1827:
URL: https://github.com/apache/hudi/pull/1827#issuecomment-693760147


   > @wangxianghu are we set on the `parallelDo` approach. it would be nice if 
you or @leesf @yanghua confirm once that it works for Flink also and we can 
close that loop.
   > 
   > Like I said, also please let me know if you need help on the PR. Would 
love to get this landed soon :)
   
   @vinothchandar, I'm working on the 'parallelDo' approach, it works for flink 
too. 
   I have added three functions to `HoodieEngineContext` , to do the `map`, 
`flatMap`, `foreach` separately. more function can be added when needed. 
   ```
     public <I, O> List<O> map(List<I> data, Function<I, O> func) {
       return data.stream().map(func).collect(Collectors.toList());
     }
   
     public <I, O> List<O> flatMap(List<I> data, Function<? super I, ? extends 
Stream<? extends O>> func) {
       return data.stream().flatMap(func).collect(Collectors.toList());
     }
   
     public <I> void foreach(List<I> data, Consumer<I> func) {
       data.forEach(func);
     }
   ```
   Of course, it would be great if you could provide some help, I‘d like to 
land this pr ASAP too 
   From now on , I can focus on refactoring this code with bi function, you can 
change anywhere you feel unsuitable, WDYT? :)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to