<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Type mismatch for Hadoop Conf for HBase in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167997#M130327</link>
    <description>&lt;P&gt;Looks like you were following example using spark-shell.&lt;/P&gt;&lt;P&gt;Can you reproduce this using standalone program ?&lt;/P&gt;&lt;P&gt;Which HDP release are you using ?&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2016 23:15:05 GMT</pubDate>
    <dc:creator>tyu</dc:creator>
    <dc:date>2016-05-25T23:15:05Z</dc:date>
    <item>
      <title>Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167996#M130326</link>
      <description>&lt;P&gt;I have a Spark application that needs to retrieve data from HBase directly. &lt;/P&gt;&lt;P&gt;I provide:&lt;/P&gt;&lt;PRE&gt;import org.apache.spark._
import org.apache.hadoop.hbase.HBaseConfiguration
import org.apache.hadoop.hbase.client.HBaseAdmin
import org.apache.spark.rdd.NewHadoopRDD

val conf = HBaseConfiguration.create()
conf.set(TableInputFormat.INPUT_TABLE, "timeseries")&lt;/PRE&gt;&lt;P&gt;with &lt;/P&gt;&lt;PRE&gt;val hBaseRDD = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat], 
      classOf[org.apache.hadoop.hbase.io.ImmutableBytesWritable],
      classOf[org.apache.hadoop.hbase.client.Result])&lt;/PRE&gt;&lt;P&gt;I receive the error &lt;/P&gt;&lt;PRE&gt;&amp;lt;console&amp;gt;:113: error: type mismatch;
 found   : org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.Configuration
 required: org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.org.apache.hadoop.conf.Configuration
       val hBaseRDD = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat], 
                                         ^
&lt;/PRE&gt;&lt;P&gt;Which is a very confusing error.  Am I missing an import or have the conf types wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:09:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167996#M130326</guid>
      <dc:creator>wsalazar</dc:creator>
      <dc:date>2016-05-25T23:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167997#M130327</link>
      <description>&lt;P&gt;Looks like you were following example using spark-shell.&lt;/P&gt;&lt;P&gt;Can you reproduce this using standalone program ?&lt;/P&gt;&lt;P&gt;Which HDP release are you using ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:15:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167997#M130327</guid>
      <dc:creator>tyu</dc:creator>
      <dc:date>2016-05-25T23:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167998#M130328</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/234/wsalazar.html" nodeid="234"&gt;@wsalazar&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Can you please try with below imports?&lt;/P&gt;&lt;PRE&gt;import org.apache.spark._
import org.apache.spark.rdd.NewHadoopRDD
import org.apache.hadoop.hbase.{HBaseConfiguration, HTableDescriptor}
import org.apache.hadoop.hbase.client.HBaseAdmin
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HColumnDescriptor
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.HTable;
&lt;/PRE&gt;&lt;P&gt;Also if possible please share your code and command.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:17:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167998#M130328</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-25T23:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167999#M130329</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2528/jyadav.html" nodeid="2528"&gt;@Jitendra Yadav&lt;/A&gt; no change with the addtional imports&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/532/tyu.html" nodeid="532"&gt;@Ted Yu&lt;/A&gt; I am converting this to a stand alone program as we speak, will post later.&lt;/P&gt;&lt;P&gt;This is HDP 2.4.2 with Spark 1.6.1  &lt;/P&gt;&lt;P&gt;Just FYI I tried &lt;/P&gt;&lt;PRE&gt;val conf = sc.hadoopConfiguration&lt;/PRE&gt;&lt;P&gt;With success but this is essentially the same as the HbaseConfiguration and even receives the same type class.  I was thinking these should be interchangeable.  Perhaps that is not the case?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:19:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/167999#M130329</guid>
      <dc:creator>wsalazar</dc:creator>
      <dc:date>2016-05-25T23:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/168000#M130330</link>
      <description>&lt;P&gt;Please try&lt;/P&gt;&lt;P&gt;conf.asInstanceOf[Configuration]&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 23:28:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/168000#M130330</guid>
      <dc:creator>tyu</dc:creator>
      <dc:date>2016-05-25T23:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Type mismatch for Hadoop Conf for HBase</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/168001#M130331</link>
      <description>&lt;P&gt;finally got to the bottom of this one&lt;/P&gt;&lt;P&gt;hbase-spark is not in maven central and the error was not "in my face".  &lt;/P&gt;&lt;P&gt;Once I added the hbase-spark repo to maven everything works as expected. &lt;/P&gt;&lt;P&gt;Thanks for your quick replies&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:04:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Type-mismatch-for-Hadoop-Conf-for-HBase/m-p/168001#M130331</guid>
      <dc:creator>wsalazar</dc:creator>
      <dc:date>2016-05-26T05:04:01Z</dc:date>
    </item>
  </channel>
</rss>

