Created 05-03-2016 10:09 AM
Hi:
I need to insert every day 1 json into HBASE, there are any api to do it without schema???
Also i dont want to use HIVE.
Thanks
Created 05-03-2016 11:57 AM
you can treat each json as string then in HBase you would do the following where line is a json string. Full example here https://github.com/dbist/workshops/blob/master/hbase/HBaseJsonLoad/src/main/java/com/hortonworks/hba...
p.addColumn(CF, Bytes.toBytes("json"), Bytes.toBytes(line));
Created 05-03-2016 11:57 AM
you can treat each json as string then in HBase you would do the following where line is a json string. Full example here https://github.com/dbist/workshops/blob/master/hbase/HBaseJsonLoad/src/main/java/com/hortonworks/hba...
p.addColumn(CF, Bytes.toBytes("json"), Bytes.toBytes(line));
Created 05-03-2016 12:24 PM
Hi;
thanks, and them how can i get some keys from the json???
Created 05-03-2016 12:31 PM
You read the string, convert it up json obj and read it. Look at my example how I read the key to make it a row key, you will do the same after calling a Get.
Created 05-03-2016 04:39 PM
Ok, thanks i saw the code, you are right,
and what about autoincrement id row from pig'
Created 05-03-2016 11:44 PM
I see you asked this question in a separate thread, that's the right approach to keep them separate.