bq. TableInputFormat does not even exist in hbase-client API It is in hbase-server module.
Take a look at http://hbase.apache.org/book.html#mapreduce.example.read On Tue, Sep 16, 2014 at 8:18 AM, Y. Dong <tq00...@gmail.com> wrote: > Hello, > > I’m currently using spark-core 1.1 and hbase 0.98.5 and I want to simply > read from hbase. The Java code is attached. However the problem is > TableInputFormat does not even exist in hbase-client API, is there any > other way I can read from > hbase? Thanks > > SparkConf sconf = *new* SparkConf().setAppName(“App").setMaster("local"); > JavaSparkContext sc = *new* JavaSparkContext(sconf); > > > Configuration conf = HBaseConfiguration.*create*(); > conf.set(TableInputFormat.INPUT_TABLE, "Article"); > > > JavaPairRDD<ImmutableBytesWritable, Result> hBaseRDD = > sc.newAPIHadoopRDD(conf, > TableInputFormat.*class* > ,org.apache.hadoop.hbase.io.ImmutableBytesWritable.*class*, > org.apache.hadoop.hbase.client.Result.*class*); > > > >