title: Spark cannot compile newAPIHadoopRDD with mongo-hadoop-connector's BSONFileInputFormat
body: <p>I'm using mongo-hadoop client(r1.5.2) in spark to read data from mongoDB and bson following this link: <a href="https://github.com/mongodb/mongo-hadoop/wiki/Spark-Usage" rel="nofollow">https://github.com/mongodb/mongo-hadoop/wiki/Spark-Usage</a>. So far I can read from mongoDB without problem. However, the bson configuration cannot even compile. Please help.</p>
  
  <p>my code in scala:</p>
  
  <pre><code>dataConfig.set("mapred.input.dir", "path.bson")
  
      val documents = sc.newAPIHadoopRDD(
        dataConfig,                
        classOf[BSONFileInputFormat],  
        classOf[Object],            
        classOf[BSONObject])    
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Error:(56, 24) inferred type arguments [Object,org.bson.BSONObject,com.mongodb.hadoop.mapred.BSONFileInputFormat] do not conform to method newAPIHadoopRDD's type parameter bounds [K,V,F &lt;: org.apache.hadoop.mapreduce.InputFormat[K,V]]
      val documents = sc.newAPIHadoopRDD(
                         ^
  </code></pre>