I use pyspark to read hbase table as a dataframe, but it went some wrong:
sc = SparkContext(master="local[*]", appName="test")
spark = SparkSession(sc).builder.getOrCreate()
df = spark.read.format('org.apache.hadoop.hbase.spark') \
.option('hbase.table', 'h_table') \
.option('hbase.columns.mapping',
'life_id STRING :key, score STRING info:total_score') \
.option('hbase.use.hbase.context', False) \
.option('hbase.config.resources', 'file:///home/softs/hbase-2.0.5/conf/hbase-site.xml') \
.option('hbase-push.down.column.filter', False) \
.load()
df.show()
it shows: java.lang.ClassNotFoundException: Failed to find data source: org.apache.hadoop.hbase.spark. Please find packages at http://spark.apache.org/third-party-projects.html
I followed the demo