private void nextBatch() throws IOException, RecordServiceException { if (handle_ == null) { throw new RuntimeException("Task has been closed already."); } fetchResult_ = worker_.fetch(handle_); if (fetchResult_.recordFormat != FetchResult.RecordFormat.Columnar) { throw new RuntimeException("Unsupported record format"); } record_.reset(fetchResult_); progress_ = (float)fetchResult_.taskProgress; }