Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public void basicTest() {
checkBasic("hello", 5); // 5 * 1 byte chars
checkBasic("大 千 世 界", 7);
checkBasic("︽﹋%", 3); // 3 * 3 bytes chars
// checkstyle.off: AvoidEscapedUnicodeCharacters
checkBasic("\uD83E\uDD19", 1); // 4 bytes char
// checkstyle.on: AvoidEscapedUnicodeCharacters
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,18 +480,17 @@ public void testOOMDuringSpill() throws Exception {
memoryManager.markconsequentOOM(2);
try {
insertNumber(sorter, 1024);
fail("expected OutOfMmoryError but " +
"it seems operation surprisingly succeeded");
fail("expected OutOfMmoryError but it seems operation surprisingly succeeded");
}
// We expect an OutOfMemoryError here, anything else
// (i.e the original NPE is a failure)
catch (OutOfMemoryError oom){
String oomStackTrace = Utils.exceptionString(oom);
assertThat("expected OutOfMemoryError in " +
"org.apache.spark.util.collection.unsafe.sort.UnsafeInMemorySorter.reset",
oomStackTrace,
Matchers.containsString("org.apache.spark.util.collection." +
"unsafe.sort.UnsafeInMemorySorter.reset"));
assertThat("expected OutOfMemoryError in " +
"org.apache.spark.util.collection.unsafe.sort.UnsafeInMemorySorter.reset",
oomStackTrace,
Matchers.containsString(
"org.apache.spark.util.collection.unsafe.sort.UnsafeInMemorySorter.reset"));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,12 @@ public int compare(
}
};
UnsafeInMemorySorter sorter = new UnsafeInMemorySorter(consumer, memoryManager,
recordComparator, prefixComparator,
100, shouldUseRadixSort());
recordComparator, prefixComparator, 100, shouldUseRadixSort());

testMemoryManager.markExecutionAsOutOfMemoryOnce();
try {
sorter.reset();
fail("expected OutOfMmoryError " +
"but it seems operation surprisingly succeeded");
fail("expected OutOfMmoryError but it seems operation surprisingly succeeded");
} catch (OutOfMemoryError oom) {
// as expected
}
Expand Down