Return-Path: X-Original-To: apmail-spark-commits-archive@minotaur.apache.org Delivered-To: apmail-spark-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 523B4116BD for ; Tue, 6 May 2014 18:09:32 +0000 (UTC) Received: (qmail 23201 invoked by uid 500); 6 May 2014 17:13:14 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 23131 invoked by uid 500); 6 May 2014 17:13:12 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@spark.apache.org Delivered-To: mailing list commits@spark.apache.org Received: (qmail 23117 invoked by uid 99); 6 May 2014 17:13:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 17:13:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1C1EC935AD9; Tue, 6 May 2014 17:13:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rxin@apache.org To: commits@spark.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: Update OpenHashSet.scala Date: Tue, 6 May 2014 17:13:12 +0000 (UTC) Repository: spark Updated Branches: refs/heads/branch-1.0 39ac62d6c -> 4ff39292c Update OpenHashSet.scala Modify wrong comment of function addWithoutResize. Author: ArcherShao Closes #667 from ArcherShao/patch-3 and squashes the following commits: a607358 [ArcherShao] Update OpenHashSet.scala (cherry picked from commit 0a5a46811475a7accac1ed8dfefeeba9554456db) Signed-off-by: Reynold Xin Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4ff39292 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4ff39292 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4ff39292 Branch: refs/heads/branch-1.0 Commit: 4ff39292c6d85e5f9a2c4f9164723ddce1f2bdcb Parents: 39ac62d Author: ArcherShao Authored: Tue May 6 10:12:59 2014 -0700 Committer: Reynold Xin Committed: Tue May 6 10:13:09 2014 -0700 ---------------------------------------------------------------------- .../scala/org/apache/spark/util/collection/OpenHashSet.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/4ff39292/core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---------------------------------------------------------------------- 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 19af4f8..4e363b7 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