diff options
author | ArcherShao <ArcherShao@users.noreply.github.com> | 2014-05-06 10:12:59 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-05-06 10:12:59 -0700 |
commit | 0a5a46811475a7accac1ed8dfefeeba9554456db (patch) | |
tree | 7ba2967789db5319a014c610452b34f9abd6648c | |
parent | 3c64750bdd4c2d0a5562f90aead37be81627cc9d (diff) | |
download | spark-0a5a46811475a7accac1ed8dfefeeba9554456db.tar.gz spark-0a5a46811475a7accac1ed8dfefeeba9554456db.tar.bz2 spark-0a5a46811475a7accac1ed8dfefeeba9554456db.zip |
Update OpenHashSet.scala
Modify wrong comment of function addWithoutResize.
Author: ArcherShao <ArcherShao@users.noreply.github.com>
Closes #667 from ArcherShao/patch-3 and squashes the following commits:
a607358 [ArcherShao] Update OpenHashSet.scala
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala b/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala index 19af4f8cbe..4e363b74f4 100644 --- a/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala +++ b/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala @@ -115,10 +115,10 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag]( * The caller is responsible for calling rehashIfNeeded. * * Use (retval & POSITION_MASK) to get the actual position, and - * (retval & EXISTENCE_MASK) != 0 for prior existence. + * (retval & NONEXISTENCE_MASK) == 0 for prior existence. * * @return The position where the key is placed, plus the highest order bit is set if the key - * exists previously. + * does not exists previously. */ def addWithoutResize(k: T): Int = { var pos = hashcode(hasher.hash(k)) & _mask |