Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
7da33ce5
Commit
7da33ce5
authored
9 years ago
by
Josh Rosen
Browse files
Options
Downloads
Patches
Plain Diff
[HOTFIX] Add workaround for SPARK-7660 to fix JavaAPISuite failures.
parent
e8f0e016
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
+8
-0
8 additions, 0 deletions
...apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
with
8 additions
and
0 deletions
core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
+
8
−
0
View file @
7da33ce5
...
...
@@ -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"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment