This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this correct way of using HBase REST API to just parse the response from its URL?

 
Monica Shiralkar
Ranch Hand
Posts: 857
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not find any example of HBase REST Client to put GET POST request.So instead of this what I am doing is I am just using the HBase REST URL ,putting it in my java code and just parsing the response using SAX parser..Is this correct way(because i m not using GET request..i did not find example of using GET post On Hbase REST client) thanks..
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. GET and POST are two different HTTP actions so "GET POST request" does not make any sense. One would normally say "GET request" or "POST request" not "GET post"

2. By the REST architectural style, GET is for getting the current state of a resource without modifying it.

Wandering around the HBase docs I find:


so it appears HBase supports GET directly.

Bill
 
Monica Shiralkar
Ranch Hand
Posts: 857
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Bill.but i did not find a way of specifying the URL.I mean before sending GET request or POST request.I need to specify the URL. One way I found was using the HBsae url :http://xx.xx.xx.xx:60050/TableName/*/

(the Hbase rest URL) and parsing this URL XML using SAX parser.but this is not the normal way of REST WS consumption.Please advice.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica. Shiralkar wrote:thanks Bill.but i did not find a way of specifying the URL.I mean before sending GET request or POST request.I need to specify the URL. One way I found was using the HBsae url :http://xx.xx.xx.xx:60050/TableName/*/

(the Hbase rest URL) and parsing this URL XML using SAX parser.but this is not the normal way of REST WS consumption.Please advice.


Where did you get that idea? REST is just an architecture, you can handle the response any way you please (as opposed to SOAP which is a messaging API with more tightly defined rules)

Note that a REST style response can be anything, not just XML.

Bill
 
Monica Shiralkar
Ranch Hand
Posts: 857
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tha? for huge data when i read this URL,for minutes no response comes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic