Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ImportTsv not working in Hbase

ImportTsv not working in Hbase

New Contributor

I am using HBase 0.98.1-cdh5.1.3. I am trying to ingest a csv file present in my hdfs at location /user/hdfs/exp to Hbase. My file has data in the following format:
1,abc,xyz
2,def,uvw
3,ghi,rst

I am using the command below:
bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv '-Dimporttsv.separator=,' -Dimporttsv.columns=HBASE_ROW_KEY,CF:firstname,CF:lastname tablename /user/hdfs/exp

I have also used different combinations like
bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.columns=HBASE_ROW_KEY,CF:firstname,CF:lastname tablename /user/hdfs/exp '-Dimporttsv.separator=,'
and
bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.columns=HBASE_ROW_KEY,CF:firstname,CF:lastname '-Dimporttsv.separator=,' tablename /user/hdfs/exp
but nothing works. It fails to detect separator i.e , in my case and is not parsed properly

1 REPLY 1
Highlighted

Re: ImportTsv not working in Hbase

Master Guru
I am unable to reproduce your problem - ImportTsv works just OK in a few versions I tested out.

What specifically appears to indicate that its not parsing your file properly - do you observe an error and/or see records inserted improperly? Could you add more details along those lines?