title: Apache Spark: Hashmap accumulators give type mismatch error
body: <p>I am trying to declare a hashmap as Spark (v0.9.1) accumulator. The docs state that "Spark natively supports accumulators of numeric value types and standard mutable collections..." (<a href="https://spark.apache.org/docs/0.9.1/scala-programming-guide.html#accumulators" rel="nofollow">link</a>).</p>
  
  <p>However, this doesn't seem to be working for me when I try to create a HashMap[String, Boolean]:</p>
  
  <pre><code>scala&gt; import collection.mutable.HashMap
  import collection.mutable.HashMap
  
  scala&gt; val accum = sc.accumulator("test" -&gt; true)(HashMap)
  &lt;console&gt;:13: error: type mismatch;
   found   : scala.collection.mutable.HashMap.type
   required: org.apache.spark.AccumulatorParam[(String, Boolean)]
             val accum = sc.accumulator("test" -&gt; true)(HashMap)
  </code></pre>