Support Questions

Find answers, ask questions, and share your expertise

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)".