beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lc...@apache.org
Subject [1/2] beam git commit: [BEAM-2334] Fix OutOfMemoryError
Date Sat, 20 May 2017 00:14:22 GMT
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 <yonromai@users.noreply.github.com>
Authored: Fri May 19 16:16:24 2017 -0400
Committer: Luke Cwik <lcwik@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;
     }


Mime
View raw message