0

I have generated an RDD in Google Cloud Spark Shell.

Now i have to insert the same into HBASE table. The format of my RDD is -

RDD[(String, Map[String, String])]

The First String is the row key and the Map[String, String] is the combination of column and it's corresponding value..

I have to use the below command to insert data using Hbase.Put Command -

val put = new Put(Bytes.toBytes("Value 1"));
put.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("greeting"), Bytes.toBytes("Greeting Heeloo World"));
table.put(put);

Problem i am facing is, i am not sure how to iterate inside the RDD.

My code is written in scala and i am running it on Google Cloud Spark Cluster.

Any help or pointers would be appreciated.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Tushar Kesarwani
  • 77
  • 1
  • 1
  • 14

0 Answers0