Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Spark Streaming insert String into HBase

SOLVED Go to solution

Spark Streaming insert String into HBase

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

Accepted Solutions
Highlighted

Re: Spark Streaming insert String into HBase

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

Re: Spark Streaming insert String into HBase

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