Re: NPE when using spring bean in custom input format

2019-01-21 Thread Piotr Nowojski
Hi, You have to use `open()` method to handle initialisation of the things required by your code/operators. By the nature of the LocalEnvironment, the life cycle of the operators is different there compared to what happens when submitting a job to the real cluster. With remote environments your

Re: NPE when using spring bean in custom input format

2019-01-18 Thread madan
Suggestions please. Thinking of options 1. Initilizing spring application context in the 'open' method. Instead of loading entire context, move service related beans to one/multiple packages and scan only those packages. Requires code refactoring. 2. Direct database query - direct query cannot be

NPE when using spring bean in custom input format

2019-01-16 Thread madan
Hi, Need help in the below scenario, I have CustomInputFormat which loads the records using a bean, public class CustomInputFormat extends GenericInputFormat { private Iterator> recordsIterator; @Override public void open(GenericInputSplit split) throws IOException {