You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2017/05/20 00:14:22 UTC

[1/2] beam git commit: [BEAM-2334] Fix OutOfMemoryError

Repository: beam
Updated Branches:
  refs/heads/master 82ddd4e4b -> d7a4e4943


[BEAM-2334] Fix OutOfMemoryError


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/5c163c77
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/5c163c77
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/5c163c77

Branch: refs/heads/master
Commit: 5c163c77bd6d948231ea5a5ce9cce7a1064b0331
Parents: 82ddd4e
Author: Romain Yon <yo...@users.noreply.github.com>
Authored: Fri May 19 16:16:24 2017 -0400
Committer: Luke Cwik <lc...@google.com>
Committed: Fri May 19 17:13:49 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/dataflow/util/RandomAccessData.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/5c163c77/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/RandomAccessData.java
----------------------------------------------------------------------
diff --git a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/RandomAccessData.java b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/RandomAccessData.java
index 5ea9f07..0c08902 100644
--- a/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/RandomAccessData.java
+++ b/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/RandomAccessData.java
@@ -350,7 +350,7 @@ public class RandomAccessData {
 
     // Try to double the size of the buffer, if thats not enough, just use the new capacity.
     // Note that we use Math.min(long, long) to not cause overflow on the multiplication.
-    int newCapacity = (int) Math.min(Integer.MAX_VALUE, buffer.length * 2L);
+    int newCapacity = (int) Math.min(Integer.MAX_VALUE - 8, buffer.length * 2L);
     if (newCapacity < minCapacity) {
         newCapacity = minCapacity;
     }


[2/2] beam git commit: [BEAM-2334] Fix OutOfMemoryError

Posted by lc...@apache.org.
[BEAM-2334] Fix OutOfMemoryError

This closes #3189


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/d7a4e494
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/d7a4e494
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/d7a4e494

Branch: refs/heads/master
Commit: d7a4e4943bfc201cafa3ac52310f7561d71c16d6
Parents: 82ddd4e 5c163c7
Author: Luke Cwik <lc...@google.com>
Authored: Fri May 19 17:14:10 2017 -0700
Committer: Luke Cwik <lc...@google.com>
Committed: Fri May 19 17:14:10 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/dataflow/util/RandomAccessData.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------