Also I just remembered about cloudera’s contribution

From: Deng Ching-Mallete
Date: Tuesday, October 27, 2015 at 12:03 PM
To: avivb
Cc: user
Subject: Re: There is any way to write from spark to HBase CDH4?


We are using phoenix-spark ( to write data to HBase, but it requires spark 1.3.1+ and phoenix 4.4+. Previously, when we were still on spark 1.2, we used the HBase API to write directly to HBase.

For HBase 0.98, it's something like this:

rdd.foreachPartition(partition => {
   // create hbase config
   val hConf = HBaseConfiguration.create()
   val hTable = new HTable(hConf, "TABLE_1")

   partition.foreach(r => {
     // generate row key
     // create row
     val hRow = new Put(rowKey)

     // add columns


On Tue, Oct 27, 2015 at 5:36 PM, avivb <> wrote:
I have already try it with and and in both cases I get

So I would like to know about other option to write from Spark to HBase


View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail: