Hi Guys,
I was trying to read data from hbase. Below is the code which i've written.
val conf = HBaseConfiguration.create()
conf.set("hbase.rootdir", "hdfs://server:port/hbase")
conf.set(TableInputFormat.INPUT_TABLE, "test")
conf.setBoolean("hbase.cluster.distributed", true)
conf.set("hbase.zookeeper.quorum", "server")
val *testRDD* = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat],
classOf[org.apache.hadoop.hbase.io.ImmutableBytesWritable],
classOf[org.apache.hadoop.hbase.client.Result])
testRDD.count()
I'm able to successfully read the data from hbase and perform actions such
as count() and take(). But how do we read the Key and Values individually
from testRDD(Highlighted in bold above).
Thanks in advance.
Regards,
suman