[
https://issues.apache.org/jira/browse/BEAM-5063?focusedWorklogId=133720&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-133720
]
ASF GitHub Bot logged work on BEAM-5063:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Aug/18 17:48
Start Date: 10/Aug/18 17:48
Worklog Time Spent: 10m
Work Description: rangadi commented on a change in pull request #6178:
[BEAM-5063] Fix Watermark does not progress for low traffic streams
URL: https://github.com/apache/beam/pull/6178#discussion_r209332336
##########
File path:
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisWatermark.java
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.kinesis;
+
+import java.util.function.BooleanSupplier;
+import org.apache.beam.sdk.transforms.Min;
+import org.apache.beam.sdk.util.MovingFunction;
+import org.joda.time.Duration;
+import org.joda.time.Instant;
+
+/** Keeps track of current watermark using {@link MovingFunction}. */
Review comment:
Would be nice have a short description aimed at end users about how
watermark progresses. As I understand, it would be something like : "on a topic
with steady traffic, it would around 'now - 1 minute', if the topic is mostly
idle it could be between 'now - 2 minutes' to 'now'". [ I have a comment below
about setting to to 'now' when shards are up to date].
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 133720)
Time Spent: 1h 10m (was: 1h)
> Watermark does not progress for low traffic streams
> ---------------------------------------------------
>
> Key: BEAM-5063
> URL: https://issues.apache.org/jira/browse/BEAM-5063
> Project: Beam
> Issue Type: Bug
> Components: io-java-kinesis
> Affects Versions: 2.5.0
> Reporter: Krzysztof Trubalski
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> We have a Dataflow Job copying data from multiple Kinesis streams into Big
> Query. Recently we have noticed that the watermark on one of the streams
> frequently gets stuck although data from that stream is still being processed
> (it progress only when the traffic increases or Dataflow autoscaling feature
> kicks in).
>
> Looking at the CloudWatch statistics for the affected stream, it has a
> really low traffic rate - only ~1 event every few minutes . After
> investigation and consulting the issue with Google's Dataflow Team, it looks
> like with such small amount of data on the stream, the function calculating
> the watermark in KinesisReader reports progress incorrectly.
>
> From my initial investigation, I suspect that the issue might be related to
> usage of MovingFunction in KinesisReader. In the current implementation, it
> covers 1 minute period of samples, since obtaining the min value flushes
> stale values, if the traffic is very low the following call to significance
> check always returns false (as it relies on the number of samples, and most
> of them were flushed by get() invocation).
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)