This is an automated email from the ASF dual-hosted git repository.
altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 02d3e06 Fix backlog bytes reported by CountingSource. (#5719)
02d3e06 is described below
commit 02d3e063af9c84d38cfd8a460a95c0e49f449a05
Author: Raghu Angadi <[email protected]>
AuthorDate: Thu Jun 21 11:42:06 2018 -0700
Fix backlog bytes reported by CountingSource. (#5719)
* Fix backlog bytes reported by CountingSource.
---
.../java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java
index cc3c88d..7c04923 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java
@@ -479,7 +479,8 @@ public class CountingSource {
@Override
public long getSplitBacklogBytes() {
long expected = expectedValue();
- return Math.max(0L, 8 * (expected - current) / source.stride);
+ long backlogElements = (expected - current) / source.stride;
+ return Math.max(0L, 8 * backlogElements);
}
}