[
https://issues.apache.org/jira/browse/BEAM-12193?focusedWorklogId=586733&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-586733
]
ASF GitHub Bot logged work on BEAM-12193:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Apr/21 16:42
Start Date: 21/Apr/21 16:42
Worklog Time Spent: 10m
Work Description: aromanenko-dev commented on a change in pull request
#14570:
URL: https://github.com/apache/beam/pull/14570#discussion_r617710696
##########
File path:
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/TopicPartitionCoder.java
##########
@@ -48,7 +49,7 @@ public TopicPartition decode(InputStream inStream) throws
CoderException, IOExce
@Override
public List<? extends Coder<?>> getCoderArguments() {
- return null;
+ return ImmutableList.of(StringUtf8Coder.of(), VarIntCoder.of());
Review comment:
Why it's needed?
##########
File path:
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/WatchKafkaTopicPartitionDoFn.java
##########
@@ -107,13 +112,17 @@ public void processElement(
current.forEach(
topicPartition -> {
if (checkStopReadingFn == null ||
!checkStopReadingFn.apply(topicPartition)) {
+ Counter foundedTopicPartition =
+ Metrics.counter(COUNTER_NAMESPACE, topicPartition.toString());
+ foundedTopicPartition.inc();
existingTopicPartitions.add(topicPartition);
outputReceiver.output(
KafkaSourceDescriptor.of(topicPartition, null, startReadTime,
null));
}
});
- timer.set(Instant.now().plus(checkDuration.getMillis()));
+ timer.offset(checkDuration).setRelative();
Review comment:
Why it requires this change?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 586733)
Time Spent: 40m (was: 0.5h)
> WatchKafkaTopicPartitionDoFn reports user counter to indicate which
> TopicPartition has been emitted to downstream
> -----------------------------------------------------------------------------------------------------------------
>
> Key: BEAM-12193
> URL: https://issues.apache.org/jira/browse/BEAM-12193
> Project: Beam
> Issue Type: Improvement
> Components: io-java-kafka
> Reporter: Boyuan Zhang
> Assignee: Boyuan Zhang
> Priority: P2
> Time Spent: 40m
> Remaining Estimate: 0h
>
> WatchKafkaTopicPartitionDoFn can use user counter to indicate which
> TopicPartition has been outputted to downstream.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)