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

how to append row key in Hbase using KeyValue class of Hfile ?

how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

I am trying to create HFiles from csv using Java and while trying to write Hfile row keys aren't getting appended and I get 0.1 kb hfile with generic Hfile information.

12 REPLIES 12

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Super Collaborator

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

I get an empty Hfile created from the csv it takes as an input..

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Super Collaborator

Can you take a look at

hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java

getNewWriter() shows you how to create StoreFile.Writer

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

May I know the dependency library for that

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Super Collaborator

HFileOutputFormat2 is in hbase-server in hbase 1.1.x

The mvn dependency:tree output for hbase-server is 200 lines long.

You can get the output yourself (for your project). If you encounter problem, let me know.

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

I am working on it. Thank you Ted!!

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

Any idea how to give Hfile as an input to Hbase table

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Super Collaborator

hfile can be loaded thru bulk load.

Re: how to append row key in Hbase using KeyValue class of Hfile ?

Explorer

bulkload is again using Java API or Do we have any jars that can simply take an Hfile and table through command line and create the table