Support Questions
Find answers, ask questions, and share your expertise

Read Hbase tables using Spark 2

Contributor

Looking for some suggestions on how to read HBase tables using Spark 2.2. I currently have HDP 2.6.3 installed and have been starting to use Spark 2.2. We have been using 1.6.3 with the spark hbase connector and that worked alright, but it doesn't seem to work with spark2. I also see a lot of references to using Phoenix, but that also doesn't support Spark2 until version 4.10 and HDP is still on 4.7. Does anyone have any suggestions or examples of how they are accomplishing interaction with HBase on Spark2?

1 ACCEPTED SOLUTION

Contributor

I created a hive table with HBase integration and was able to read from that table in my Spark job to resolve this for now

View solution in original post

7 REPLIES 7

Expert Contributor

Hi, @Eric Hanson .
SHC seems to work for both Spark 1.6.3 and Spark 2.2. Could you share your specific problem with SHC here?

Contributor

@Dongjoon Hyun

What dependency are you using to get it to work with 2.2? I'm getting a missing or invalid dependency detected while loading class file HBaseContext.class. Looking at the hortonworks repo (http://repo.hortonworks.com/content/repositories/releases/) it looks like version 1.1.0.2.6.3.0-235 is built for Spark 2.2, but the matching hbase-spark dependency POM has Spark 2.1.1 as the spark version still. I'm guessing that's probably my issue, if you were able to get it to work, maybe I'm just doing something wrong.

Expert Contributor

Let's ping the maintainer of SHC. Ping, @wyang Could you help @Eric Hanson?

Contributor

I created a hive table with HBase integration and was able to read from that table in my Spark job to resolve this for now

Contributor

@wyang Do you have any insight into why I can't get hbase-spark to work with Spark 2.2?

Expert Contributor

If you have HDP 2.6.3 then you should be able to find spark 2.2 version of spark-llap available under /usr/hdp/current/

Perhaps you are using the older versions of shc using --packages and thats not compatible with spark 2.2.

Explorer
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.