Skip to content

Commit 9709603

Browse files
committed
Fix indexing in comments
1 parent 1f236fe commit 9709603

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedReader.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ public boolean start() throws IOException {
151151
@Override
152152
public boolean advance() throws IOException {
153153
/* Read first record (if any). we need to loop here because :
154-
* - (b) if curBatch is empty, we want to fetch next batch and then advance.
155-
* - (c) curBatch is an iterator of iterators. we interleave the records from each.
154+
* - (a) if curBatch is empty, we want to fetch next batch and then advance.
155+
* - (b) curBatch is an iterator of iterators. we interleave the records from each.
156156
* curBatch.next() might return an empty iterator.
157157
*/
158158
while (true) {
@@ -162,7 +162,7 @@ public boolean advance() throws IOException {
162162

163163
PartitionState<K, V> pState = curBatch.next();
164164

165-
if (!pState.recordIter.hasNext()) { // -- (c)
165+
if (!pState.recordIter.hasNext()) { // -- (b)
166166
pState.recordIter = Collections.emptyIterator(); // drop ref
167167
curBatch.remove();
168168
continue;
@@ -211,7 +211,7 @@ public boolean advance() throws IOException {
211211

212212
kafkaResults.flushBufferedMetrics();
213213
return true;
214-
} else { // -- (b)
214+
} else { // -- (a)
215215
kafkaResults = KafkaSinkMetrics.kafkaMetrics();
216216
nextBatch();
217217
kafkaResults.flushBufferedMetrics();

0 commit comments

Comments
 (0)