Skip to content

Commit

Permalink
Corrected offset. fixes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
jcustenborder committed Mar 27, 2018
1 parent 1a52576 commit 7b36790
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected void configure(InputStream inputStream, Map<String, String> metadata,

if (null != lastOffset) {
int skippedRecords = 0;
while (this.iterator.hasNext() && skippedRecords < lastOffset) {
while (this.iterator.hasNext() && skippedRecords <= lastOffset) {
next();
skippedRecords++;
}
Expand All @@ -77,7 +77,7 @@ JsonNode next() {
}

@Override
protected List<SourceRecord> process() throws IOException {
protected List<SourceRecord> process() {
List<SourceRecord> records = new ArrayList<>(this.config.batchSize);

while (this.iterator.hasNext() && records.size() < this.config.batchSize) {
Expand Down

0 comments on commit 7b36790

Please sign in to comment.