0

Is there any software which converts any given JSON to HBase (JSON or Thrift) insert?

Let's say I receive following JSON to my stream

{  
   "_id":"www.somesite.com",
   "values":[  
      {  
         "label":"test_label"
      },
      {  
         "descr":"custom_descr"
      }
   ]
}

In order to add this information to Hbase i need to send HTTP PUT to http://192.168.44.187:8000/<TABLE>/<ROW_ID>/<COL_FAMILY>:<COLUMN>, whether i will need to change it to <ROW_ID> = www.somesite.com and so on. Thus, http://192.168.44.187:8000/t1/www.somesite.com/ColFam:label to add label. Moreover body of PUT must contain corresponding base64 formatted values.

{
   "Row":[
      {
         "key":"d3d3LnNvbWVzaXRlLmNvbTIy",
         "Cell":[
            {
               "column":"bGFiZWw=",
               "$":"dGVzdF9sYWJlbA=="
            }
         ]
     } 
   ]
}
Cron Merdek
  • 1,084
  • 1
  • 14
  • 25

1 Answers1

0

There is no such software. You can write a script/program in your favorite language to build the url and body for HTTP post request.

Anil Gupta
  • 1,116
  • 2
  • 8
  • 13