aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorAnkur Dave <ankurdave@gmail.com>2014-01-06 18:25:44 -0800
committerAnkur Dave <ankurdave@gmail.com>2014-01-06 18:25:44 -0800
commit7210257ba3038d5e22d4b60fe9c3113dc45c3dff (patch)
treef27e76efe0cbb38b1c34bc7eac68d5e964795ea5 /core/src/main
parent86404dac7414e4f1af6802ef30bf5e5173c3bb5e (diff)
parentfa8ce3fdd7f91add0e8ead6e48f4d69e67c604b9 (diff)
downloadspark-7210257ba3038d5e22d4b60fe9c3113dc45c3dff.tar.gz
spark-7210257ba3038d5e22d4b60fe9c3113dc45c3dff.tar.bz2
spark-7210257ba3038d5e22d4b60fe9c3113dc45c3dff.zip
Merge pull request #128 from adamnovak/master
Fix failing "sbt/sbt publish-local" by adding a no-argument PrimitiveKeyOpenHashMap constructor Closes #78.
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala b/core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala
index ee1b168028..d6a3cdb405 100644
--- a/core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala
+++ b/core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala
@@ -35,8 +35,15 @@ class PrimitiveKeyOpenHashMap[@specialized(Long, Int) K: ClassManifest,
/**
* Allocate an OpenHashMap with a fixed initial capacity
*/
- def this(initialCapacity: Int = 64) =
+ def this(initialCapacity: Int) =
this(new OpenHashSet[K](initialCapacity), new Array[V](initialCapacity))
+
+ /**
+ * Allocate an OpenHashMap with a default initial capacity, providing a true
+ * no-argument constructor.
+ */
+ def this() = this(64)
+
/**
* Allocate an OpenHashMap with a fixed initial capacity