Re: java.io.IOException: Couldn't access resultSet

2016-06-06 Thread Chesnay Schepler
open() not being called is a valuable observation, but from then on out i have problems following you. within hasNext() we first check whether exhausted is true, and if so return false. Since it is initialized with false we will not return here. this seems like correct behaviour. I have one q

Re: java.io.IOException: Couldn't access resultSet

2016-06-06 Thread David Olsen
After recompiling the 1.0.3 source and testing it, I discover that InputFormat.open() in FileSourceFunction doesn't get called because splitIterator.hasNext() returns false. This looks like getInputSplits() creates Iterator object with 'exhausted' variable initialized to false, and then the followi

Re: java.io.IOException: Couldn't access resultSet

2016-06-06 Thread Chesnay Schepler
the JDBC IF does not and never has used the configuration. On 06.06.2016 09:27, Aljoscha Krettek wrote: The problem could be that open() is not called with a proper Configuration object in streaming mode. On Sun, 5 Jun 2016 at 19:33 Stephan Ewen > wrote: Hi David

Re: java.io.IOException: Couldn't access resultSet

2016-06-06 Thread Aljoscha Krettek
The problem could be that open() is not called with a proper Configuration object in streaming mode. On Sun, 5 Jun 2016 at 19:33 Stephan Ewen wrote: > Hi David! > > You are using the JDBC format that was written for the batch API in the > streaming API. > > While that should actually work, it is

Re: java.io.IOException: Couldn't access resultSet

2016-06-05 Thread Stephan Ewen
Hi David! You are using the JDBC format that was written for the batch API in the streaming API. While that should actually work, it is a somewhat new and less tested function. Let's double check that the call to open() is properly forwarded. On Sun, Jun 5, 2016 at 12:47 PM, David Olsen wrote:

Re: java.io.IOException: Couldn't access resultSet

2016-06-05 Thread David Olsen
Switching to use org.apache.flink.api.java.ExecutionEnvironment, my code can successfully read data from database through JDBCInputFormat. But I need stream mode (and now it seems that the DataSet and DataStream is not interchangeable). Are there any additional functions required to be executed bef

Re: java.io.IOException: Couldn't access resultSet

2016-06-05 Thread David Olsen
I remove the open method when constructing jdbc input format, but I still obtain "couldn't access resultSet" error. Caused by: java.io.IOException: Couldn't access resultSet at org.apache.flink.api.java.io.jdbc.JDBCInputFormat.nextRecord(JDBCInputFormat.java:179) at org.apache.flink.api.java.io.jd

Re: java.io.IOException: Couldn't access resultSet

2016-06-05 Thread Chesnay Schepler
you are not supposed to call open yourselves. On 05.06.2016 11:05, David Olsen wrote: Following the sample on the flink website[1] to test jdbc I encountered an error "Couldn't access resultSet". It looks like the nextRecord is called before open() function. However I've called open() when I c