Skip to content

Scala example to write/read and parse results from HBase client API 1.0

Notifications You must be signed in to change notification settings

cberez/write-to-hbase-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Scala write to HBase example

An example project showing how to read and write from a Kerberized HBase using the 1.0 API and how to parse the results.

Based on lucasbak's kafka-spark-streaming use of HBase's 0.97 API with kerberos and HBase's cookbook

What does it do ?

Basics !

The app creates a table called hbase_demo with the given kerberos principal (it needs to have RWC rights on the table in hbase)

Then it inserts three lines / two rows, reads and prints them

Run

The project needs to be compiled with Maven :

cd write-to-hbase
mvn package

It has to be ran with the following options :

 -cs,--core-site <arg>    hadoop core-site.xml file path
 -hs,--hbase-site <arg>   hbase-site.xml file path
 -k,--keytab <arg>        kerberos principal's keytab to use
 -p,--principal <arg>     kerberos principal to use

About

Scala example to write/read and parse results from HBase client API 1.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages