You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2015/05/22 00:12:07 UTC
spark git commit: [SPARK-7800] isDefined should not marked too early
in putNewKey
Repository: spark
Updated Branches:
refs/heads/master 5287eec5a -> 5a3c04bb9
[SPARK-7800] isDefined should not marked too early in putNewKey
JIRA: https://issues.apache.org/jira/browse/SPARK-7800
`isDefined` is marked as true twice in `Location.putNewKey`. The first one is unnecessary and will cause problem because it is too early and before some assert checking. E.g., if an attempt with incorrect `keyLengthBytes` marks `isDefined` as true, the location can not be used later.
ping JoshRosen
Author: Liang-Chi Hsieh <vi...@gmail.com>
Closes #6324 from viirya/dup_isdefined and squashes the following commits:
cbfe03b [Liang-Chi Hsieh] isDefined should not marked too early in putNewKey.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5a3c04bb
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5a3c04bb
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5a3c04bb
Branch: refs/heads/master
Commit: 5a3c04bb92e21bd221a75c4ae13a71f7d4716b44
Parents: 5287eec
Author: Liang-Chi Hsieh <vi...@gmail.com>
Authored: Thu May 21 23:12:00 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Thu May 21 23:12:00 2015 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/5a3c04bb/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
----------------------------------------------------------------------
diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
index bd4ca74..0b4d8d2 100644
--- a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
+++ b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java
@@ -429,7 +429,6 @@ public final class BytesToBytesMap {
long valueBaseOffset,
int valueLengthBytes) {
assert (!isDefined) : "Can only set value once for a key";
- isDefined = true;
assert (keyLengthBytes % 8 == 0);
assert (valueLengthBytes % 8 == 0);
if (size == MAX_CAPACITY) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org