Support Questions

Find answers, ask questions, and share your expertise

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

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

Contributor
solved: I've created an additionaly static JavaSparkContext, convert the (String) object to JavaRDD (jsc.parallelize()) and insert into HBase using "saveAsNewAPIHadoopDataset(conf)".
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.