Skip to content

Commit

Permalink
Remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
maropu committed Dec 3, 2016
1 parent 9a516e6 commit f381ac2
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -72,12 +72,8 @@ private[kinesis] class KinesisRecordProcessor[T](receiver: KinesisReceiver[T], w
private def processRecordsWithLimit(
batch: List[Record], checkpointer: IRecordProcessorCheckpointer): Unit = {
val maxRecords = receiver.getCurrentLimit
if (batch.size() <= maxRecords) {
addRecords(batch, checkpointer)
} else {
for (start <- 0 until batch.size by maxRecords) {
addRecords(batch.subList(start, math.min(start + maxRecords, batch.size)), checkpointer)
}
for (start <- 0 until batch.size by maxRecords) {
addRecords(batch.subList(start, math.min(start + maxRecords, batch.size)), checkpointer)
}
}

Expand Down

0 comments on commit f381ac2

Please sign in to comment.