Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Fw: Regarding Rowkey and Column Family


+
varaprasad.bheri@... 2012-12-27, 07:19
Copy link to this message
-
Re: Fw: Regarding Rowkey and Column Family
I have not looked at your Jason object but the rest sound good to me.

You might want to implement a test class Wichita creates a Jason, put it in
the table, retrieve it and compare it with the original one...

JM
Le 27 déc. 2012 01:07, <[EMAIL PROTECTED]> a écrit :

> Hi,
>
> For the below, may I insert into 'Customer' hbase table in the following
> way:
>
> put 'Customer', 'rowkey', 'cf:json',
> '{"Customer": {"Customer Detail":[{"CustomerNumber": "10000000001","DOB":
> "01/01/01","Fname": "Fname1","Mname":"Mname1","Lname": "Lname1","address":
> {"AddressType": "Home","AddressLine1" :"1.1.Address Line1",
> "AddressLine2" :"1.1.Address Line2","AddressLine3" :"1.1.Address
> Line3","AddressLine4" :"1.1.Address Line4","State" :"1.1.State","City"
> :"1.1.City","Country" :"1.1.Country"}},{ "CustomerNumber":
> "10000000002","DOB": "01/02/01","Fname": "Fname2","Mname":
> "Mname2","Lname": "Lname2","address": [{"AddressType":
> "Home","AddressLine1" :"2.1.Address Line1","AddressLine2" :"2.1.Address
> Line2","AddressLine3" :"2.1.Address Line3","AddressLine4" :"2.1.Address
> Line4","State" :"2.1.State","City" :"2.1.City","Country"
> :"2.1.Country"},{"AddressType": "Office","AddressLine1" :"2.2.Address
> Line1","AddressLine2" :"2.2.Address Line2","AddressLine3" :"2.2.Address
> Line3",
> "AddressLine4" :"2.2.Address Line4","State" :"2.2.State","City"
> :"2.2.City","Country" :"2.2.Country"}]},{"CustomerNumber":
> "10000000003","DOB": "01/03/01","Fname": "Fname3","Mname":
> "Mname3","Lname": "Lname3","address": [{"AddressType":
> "Home","AddressLine1" :"3.1.Address Line1","AddressLine2" :"3.1.Address
> Line2","AddressLine3" :"3.1.Address Line3","AddressLine4" :"3.1.Address
> Line4","State" :"3.1.State","City" :"3.1.City","Country"
> :"3.1.Country"},{"AddressType": "Office","AddressLine1" :"3.2.Address
> Line1","AddressLine2" :"3.2.Address Line2","AddressLine3" :"3.2.Address
> Line3","AddressLine4" :"3.2.Address Line4","State" :"3.2.State","City"
> :"3.2.City","Country" :"3.2.Country"},{"AddressType":
> "Others","AddressLine1" :"3.3.Address Line1","AddressLine2" :"3.3.Address
> Line2","AddressLine3" :"3.3.Address Line3","AddressLine4" :"3.3.Address
> Line4","State" :"3.3.State","City" :"3.3.City","Country"
> :"3.3.Country"}]},{"CustomerNumber": "10000000004","DOB":
> "01/04/01","Fname": "Fname4","Mname": "Mname4","Lname": "Lname4","address":
> [{"AddressType": "Home","AddressLine1" :"4.1.Address Line1","AddressLine2"
> :"4.1.Address Line2","AddressLine3" :"4.1.Address Line3","AddressLine4"
> :"4.1.Address Line4","State" :"4.1.State","City" :"4.1.City","Country"
> :"4.1.Country"},{"AddressType": "Office","AddressLine1" :"4.2.Address
> Line1","AddressLine2" :"4.2.Address Line2","AddressLine3" :"4.2.Address
> Line3","AddressLine4" :"4.2.Address Line4","State" :"4.2.State","City"
> :"4.2.City","Country" :"4.2.Country"},{"AddressType":
> "Office2","AddressLine1" :"4.3.Address Line1","AddressLine2" :"4.3.Address
> Line2","AddressLine3" :"4.3.Address Line3","AddressLine4" :"4.3.Address
> Line4","State" :"4.3.State","City" :"4.3.City","Country"
> :"4.3.Country"},{"AddressType": "Others","AddressLine1" :"4.4.Address
> Line1","AddressLine2" :"4.4.Address Line2","AddressLine3" :"4.4.Address
> Line3","AddressLine4" :"4.4.Address Line4","State" :"4.4.State","City"
> :"4.4.City","Country" :"4.4.Country"}]}]}}'
>
> The scan of Customer table gives:
>
> hbase(main):009:0> scan 'Customer'
> ROW                              COLUMN+CELL
>  rowkey                          column=cf:json, timestamp=1356583865944,
> value={"Customer": {"Customer Detail": [{"CustomerNumber":
> "10000000001","DOB": "01/01/01","Fname": "Fname1","Mname":"Mname1","Lname":
> "Lname1"
>                                  ,"address": {"AddressType":
> "Home","AddressLine1" :"1.1.Address Line1", \x0A"AddressLine2" :
>                                  "1.1.Address Line2","AddressLine3"
> :"1.1.Address Line3","AddressLine4" :"1.1.Address Line4",
>                                  "State" :"1.1.State","City"
+
Ramasubramanian Narayanan... 2012-12-24, 10:11
+
Mohammad Tariq 2012-12-24, 10:36
+
Ramasubramanian Narayanan... 2012-12-24, 11:30
+
Mohammad Tariq 2012-12-24, 13:15
+
Jean-Marc Spaggiari 2012-12-24, 14:24
+
Ramasubramanian 2012-12-24, 14:37
+
Ramasubramanian 2012-12-24, 14:48
+
Jean-Marc Spaggiari 2012-12-24, 15:45
+
Ramasubramanian Narayanan... 2012-12-26, 15:05
+
Mohammad Tariq 2012-12-26, 15:39
+
Ramasubramanian Narayanan... 2012-12-26, 16:20
+
Jean-Marc Spaggiari 2012-12-26, 16:24
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB