Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/21102#discussion_r203311755
--- Diff:
core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala ---
@@ -85,9 +85,13 @@ class OpenHashSet[@specialized(Long, Int) T: ClassTag](
protected var _capacity = nextPowerOf2(initialCapacity)
protected var _mask = _capacity - 1
protected var _size = 0
+ protected var _occupied = 0
protected var _growThreshold = (loadFactor * _capacity).toInt
+ def g: Int = _growThreshold
+ def o: Int = _occupied
protected var _bitset = new BitSet(_capacity)
+ protected var _bitsetDeleted: BitSet = null
--- End diff --
Why protected ? Make it private instead.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]