[jira] [Comment Edited] (BEAM-9439) KinesisReader does not report correct backlog statistics

2020-03-30 Thread Alexey Romanenko (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-9439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071128#comment-17071128
 ] 

Alexey Romanenko edited comment on BEAM-9439 at 3/30/20, 4:41 PM:
--

[~pawel.kaczmarczyk] I think now I see why {{getTotalBacklogBytes()}} was 
implemented, thanks.
{quote}As I understand, to fix getTotalBacklogBytes() we would need the 
watermark of the whole stream, not just current split, right?
{quote}
I think so if we can't get the number of bytes per shard and implement 
\{{getSplitBacklogBytes(}}

In the same time, I doubt that implementation based on Enhanced Shard-level 
Metrics should be default since, as you mentioned, it will charge additionally. 
Perhaps, it could be an alternative solution for those who wants to use it.


was (Author: aromanenko):
[~pawel.kaczmarczyk] I think now I see why {{getTotalBacklogBytes()}} was 
implemented, thanks. 
bq. As I understand, to fix getTotalBacklogBytes() we would need the watermark 
of the whole stream, not just current split, right?

I think so if we can't get the number of bytes per shard.

In the same time, I doubt that implementation based on  Enhanced Shard-level 
Metrics should be default since, as you mentioned, it will charge additionally. 
Perhaps, it could be an alternative solution for those who wants to use it. 

> KinesisReader does not report correct backlog statistics 
> -
>
> Key: BEAM-9439
> URL: https://issues.apache.org/jira/browse/BEAM-9439
> Project: Beam
>  Issue Type: Bug
>  Components: io-java-kinesis
>Reporter: Sam Whittle
>Priority: Major
>
> The KinesisReader implementing KinesisIO reports backlog by implementing the
> UnboundedSource.getTotalBacklogBytes()
> method as opposed to the
> UnboundedSource.getSplitBacklogBytes()
> This value is supposed to represent the total backlog across all shards.  
> This function is implemented by calling 
> SimplifiedKinesisClient.getBacklogBytes with the watermark of the kinesis 
> shards managed within the UnboundedReader instance.  As this watermark may be 
> further ahead than the watermark across all shards, this may miss backlog 
> bytes.
> An additional concern is that the watermark is calculated using a 
> WatermarkPolicy, which means that the watermark may be inconsistent to the 
> kinesis timestamp for querying backlog.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (BEAM-9439) KinesisReader does not report correct backlog statistics

2020-03-27 Thread Alexey Romanenko (Jira)


[ 
https://issues.apache.org/jira/browse/BEAM-9439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17068938#comment-17068938
 ] 

Alexey Romanenko edited comment on BEAM-9439 at 3/27/20, 5:56 PM:
--

Thank you for reporting this.  Do you have any fix for that or an idea how 
{{getSplitBacklogBytes()}} could be implemented?

Also, I'd ask [~pawel.kaczmarczyk], who initially worked on BEAM-2455, why 
{{getTotalBacklogBytes()}} was used in this case?


was (Author: aromanenko):
Thank you for reporting this.  I'd ask [~pawel.kaczmarczyk], who initially 
worked on BEAM-2455, why {{getTotalBacklogBytes()}} was used in this case?

> KinesisReader does not report correct backlog statistics 
> -
>
> Key: BEAM-9439
> URL: https://issues.apache.org/jira/browse/BEAM-9439
> Project: Beam
>  Issue Type: Bug
>  Components: io-java-kinesis
>Reporter: Sam Whittle
>Priority: Major
>
> The KinesisReader implementing KinesisIO reports backlog by implementing the
> UnboundedSource.getTotalBacklogBytes()
> method as opposed to the
> UnboundedSource.getSplitBacklogBytes()
> This value is supposed to represent the total backlog across all shards.  
> This function is implemented by calling 
> SimplifiedKinesisClient.getBacklogBytes with the watermark of the kinesis 
> shards managed within the UnboundedReader instance.  As this watermark may be 
> further ahead than the watermark across all shards, this may miss backlog 
> bytes.
> An additional concern is that the watermark is calculated using a 
> WatermarkPolicy, which means that the watermark may be inconsistent to the 
> kinesis timestamp for querying backlog.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)