Skip to content
Snippets Groups Projects
Commit fa8ce3fd authored by Adam Novak's avatar Adam Novak
Browse files

Changing org.apache.spark.util.collection.PrimitiveKeyOpenHashMap to have a...

Changing org.apache.spark.util.collection.PrimitiveKeyOpenHashMap to have a real no-argument constructor, instead of a one-argument constructor with a default value. The lack of a real no-argument constructor was causing "sbt/sbt publish-local" to fail thusly:

```
[error] /pod/home/anovak/build/graphx/core/src/main/scala/org/apache/spark/storage/ShuffleBlockManager.scala:172: not enough arguments for constructor PrimitiveKeyOpenHashMap: (initialCapacity: Int)(implicit evidence$3: ClassManifest[Int], implicit evidence$4: ClassManifest[Int])org.apache.spark.util.collection.PrimitiveKeyOpenHashMap[Int,Int]
[error]     private val mapIdToIndex = new PrimitiveKeyOpenHashMap[Int, Int]()
[error]                                ^
[info] No documentation generated with unsucessful compiler run
[error] one error found
[error] (core/compile:doc) Scaladoc generation failed
[error] Total time: 67 s, completed Jan 6, 2014 2:20:51 PM
```

In theory a no-argument constructor ought not to differ from one with a single argument that has a default value, but in practice there seems to be an issue.
parent 86404dac
No related branches found
No related tags found
No related merge requests found
...@@ -35,8 +35,15 @@ class PrimitiveKeyOpenHashMap[@specialized(Long, Int) K: ClassManifest, ...@@ -35,8 +35,15 @@ class PrimitiveKeyOpenHashMap[@specialized(Long, Int) K: ClassManifest,
/** /**
* Allocate an OpenHashMap with a fixed initial capacity * 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)) 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 * Allocate an OpenHashMap with a fixed initial capacity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment