org.apache.spark.util.collection
Get the value for a given key
Return whether the next insert will cause the map to grow
Set the value for key to updateFunc(hadValue, oldValue), where oldValue will be the old value for key, if any, or null otherwise.
Set the value for key to updateFunc(hadValue, oldValue), where oldValue will be the old value for key, if any, or null otherwise. Returns the newly updated value.
Return an iterator of the map in sorted order.
Return an iterator of the map in sorted order. This provides a way to sort the map without using additional memory, at the expense of destroying the validity of the map.
Double the table's size and re-hash everything
Double the table's size and re-hash everything
Iterator method from Iterable
Iterator method from Iterable
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Set the value for a key
:: DeveloperApi :: A simple open hash table optimized for the append-only use case, where keys are never removed, but the value for each key may be changed.
This implementation uses quadratic probing with a power-of-2 hash table size, which is guaranteed to explore all spaces for each key (see http://en.wikipedia.org/wiki/Quadratic_probing).
TODO: Cache the hash values of each key? java.util.HashMap does that.