You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2015/05/15 08:18:47 UTC
spark git commit: [HOTFIX] Add workaround for SPARK-7660 to fix
JavaAPISuite failures.
Repository: spark
Updated Branches:
refs/heads/master e8f0e016e -> 7da33ce50
[HOTFIX] Add workaround for SPARK-7660 to fix JavaAPISuite failures.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7da33ce5
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7da33ce5
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7da33ce5
Branch: refs/heads/master
Commit: 7da33ce5057ff965eec19ce662465b64a3564019
Parents: e8f0e01
Author: Josh Rosen <jo...@databricks.com>
Authored: Thu May 14 23:17:41 2015 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Thu May 14 23:17:41 2015 -0700
----------------------------------------------------------------------
.../spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/7da33ce5/core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java b/core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
index 730d265..78e5264 100644
--- a/core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
+++ b/core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
@@ -35,6 +35,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
+import org.xerial.snappy.buffer.CachedBufferAllocator;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
@@ -96,6 +97,13 @@ public class UnsafeShuffleWriterSuite {
@After
public void tearDown() {
Utils.deleteRecursively(tempDir);
+ // This call is a workaround for SPARK-7660, a snappy-java bug which is exposed by this test
+ // suite. Clearing the cached buffer allocator's pool of reusable buffers masks this bug,
+ // preventing a test failure in JavaAPISuite that would otherwise occur. The underlying bug
+ // needs to be fixed, but in the meantime this workaround avoids spurious Jenkins failures.
+ synchronized (CachedBufferAllocator.class) {
+ CachedBufferAllocator.queueTable.clear();
+ }
final long leakedMemory = taskMemoryManager.cleanUpAllAllocatedMemory();
if (leakedMemory != 0) {
fail("Test leaked " + leakedMemory + " bytes of managed memory");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org