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.
This commit is contained in:
parent
86404dac74
commit
fa8ce3fdd7
|
@ -35,9 +35,16 @@ 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
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue