[
https://issues.apache.org/jira/browse/BEAM-11936?focusedWorklogId=692885&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-692885
]
ASF GitHub Bot logged work on BEAM-11936:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Dec/21 21:21
Start Date: 08/Dec/21 21:21
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on a change in pull request
#15890:
URL: https://github.com/apache/beam/pull/15890#discussion_r765251834
##########
File path:
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFn.java
##########
@@ -290,6 +290,7 @@ public GrowableOffsetRangeTracker restrictionTracker(
return new GrowableOffsetRangeTracker(restriction.getFrom(), offsetPoller);
}
+ @SuppressWarnings("PreferJavaTimeOverload")
Review comment:
I dug into the test failure that you reported, the reason it works with
`poll(long)` and not `poll(Duration)` is that we create our own MockConsumer,
which only overrides `poll(long)`. If we just change this line to
`poll(Duration)`:
https://github.com/apache/beam/blob/414707077bb1f2689017d54076184c0b7d64955c/sdks/java/io/kafka/src/test/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFnTest.java#L147
It will work for both cases. (Since MockConsumer.poll(long) defers to
poll(Duration):
https://github.com/apache/kafka/blob/2.4.1/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java#L157-L159)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 692885)
Time Spent: 61h 20m (was: 61h 10m)
> Fix errorprone 2.3.4 ignored warnings
> -------------------------------------
>
> Key: BEAM-11936
> URL: https://issues.apache.org/jira/browse/BEAM-11936
> Project: Beam
> Issue Type: Task
> Components: build-system, runner-core, sdk-java-core,
> sdk-java-harness
> Reporter: Brian Hulette
> Assignee: Benjamin Gonzalez
> Priority: P3
> Time Spent: 61h 20m
> Remaining Estimate: 0h
>
> Upgrading to errorprone 2.3.4 (https://github.com/apache/beam/pull/14148)
> required ignoring a lot of new warnings. We should fix the offending code and
> re-enable these warnings.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)