Created 06-16-2016 03:01 AM
Hi, I am using Apache Hbase (Version 1.1.3).
Sample data used:
simple structure that I have got for an industrial sensor
id, temp:in,temp:out,vibration,pressure:in,pressure:out 5842,50,30,4,240,340
executed the Loadtsv statement as following
hbase> hbase org.apache.hadoop.hbase.mapreduce.ImportTsv-Dimporttsv.separator=,-Dimporttsv.columns="HBASE_ROW_KEY,id,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor /user/hbase.csv
import the same data (header removed) - got this error - syntax error, unexpected ','
then removed the 'ID' column in '-Dimporttsv.columns'
hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator= ',' -Dimporttsv.columns="HBASE_ROW_KEY,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor /user/hbase.csv
getting
syntax error, unexpected tIDENTIFIER
Please help
Thanks, Sridharan
Created 06-20-2016 02:13 PM
hbase.csv should be placed on hdfs.
Created 06-20-2016 02:18 PM
When I tried 'hbase' command within shell (HDP 2.5), I got:
hbase(main):001:0> hbase org.apache.hadoop.hbase.mapreduce.ImportTsv NoMethodError: undefined method `hbase' for #<Object:0x415d88de>
Created 07-29-2016 03:04 AM
Hi @Sridharan Govindaraj. Did running your command from Unix shell instead of HBase shell solve this issue? You might also want to fully qualify your hdfs file path:
$ hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator="," -Dimporttsv.columns="HBASE_ROW_KEY,id,temp:in,temp:out,vibration,pressure:in,pressure:out" sensor hdfs:///user/hbase.csv