Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Spark Streaming insert String into HBase

avatar
Contributor

Dear Colleages,

 

I want to insert a simple String into HBase using spark streaming. The insert should be done inside a rdd.forech function "public void call(Tuple2<String, byte[]> avroRecord)".

 

Currently I'vo no idea. I'm able to point out the string values but not inserting into HBase.

 

Thanks in advance and best regards,

 Sebastian

 

1 ACCEPTED SOLUTION

avatar
Contributor
solved: I've created an additionaly static JavaSparkContext, convert the (String) object to JavaRDD (jsc.parallelize()) and insert into HBase using "saveAsNewAPIHadoopDataset(conf)".

View solution in original post

1 REPLY 1

avatar
Contributor
solved: I've created an additionaly static JavaSparkContext, convert the (String) object to JavaRDD (jsc.parallelize()) and insert into HBase using "saveAsNewAPIHadoopDataset(conf)".