You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sandeep Reddy P <sa...@gmail.com> on 2012/08/23 17:57:36 UTC
Hbase Import Tsv Help
Hi Team,
I have integrated Hive+Hbase and created a sample table in hive ,
CREATE TABLE hbase_table_2(key int, id int, name string, dept int)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,cf1:id,cf2:name,cf3:dept")
TBLPROPERTIES ("hbase.table.name" = "xyz1");
hbase(main):033:0> describe 'xyz1'
DESCRIPTION
ENABLED
{NAME => 'xyz1', FAMILIES => [{NAME => 'cf1', BLOOMFILTER => 'NONE',
REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '3', TTL
=> '21474836 true
47', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE =>
'true'}, {NAME => 'cf2', BLOOMFILTER => 'NONE', REPLICATION_SCOPE =>
'0', COMPRESSION =>
'NONE', VERSIONS => '3', TTL => '2147483647', BLOCKSIZE => '65536',
IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'cf3',
BLOOMFILTER => 'NONE'
, REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '3',
TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false',
BLOCKCACHE => 'tru
e'}]}
1 row(s) in 0.0160 seconds
I have a sample tsv file in hbase /user/hdfs/b.tsv
15 20 sb 2461
20 30 sc 2462
25 40 sd 2463
I'm using following command to load data from hdfs to Hbase Table xyz1
../hbase/bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv
-Dimporttsv.columns=HBASE_ROW_KEY,cf1:id,cf2:name,cf3:dept xyz1 hdfs://
namenode.hadoop.com/user/hdfs/b.tsv
But when i scan 'xyz1' i cannot see any data loading to HBASE table.
Am i missing anything? Please help me.
--
Thanks,
sandeep