You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Ninad Raut <hb...@gmail.com> on 2009/07/24 08:47:34 UTC

HBase Rest API ..

hi,
I was trying to use Hbase Rest calls.
I started hbase rest server using command ./hadoop rest start
 I wrote the following Rest client:

Map <String, String> params = new HashMap <String, String>();
  RestTemplate template = new RestTemplate();
  params.put("tabename", "table");
  // template.postForLocation("http://192.168.0.115:60010/AnalysisTable",
null, params);
  template.getForObject("http://192.168.0.115:60050/AnalysisTable",
String.class,params);

I am getting HTTP 406 error for url http://localhost:60050/api/ in browser.
the curl calls are working fine. Where am I going wrong?

Re: HBase Rest API ..

Posted by Ninad Raut <hb...@gmail.com>.
Thanks stack..

On Fri, Jul 24, 2009 at 8:28 PM, stack <st...@duboce.net> wrote:

> Anything in the server-side logs?
>
> Put up a proxy.  That'll help you figure the issue.  First request with
> working curl and then from java.  See what the difference is.
>
> In the past, this proxy, http://freshmeat.net/projects/charles/, worked
> well
> for me.
>
> St.Ack
>
> On Thu, Jul 23, 2009 at 11:47 PM, Ninad Raut <hbase.user.ninad@gmail.com
> >wrote:
>
> > hi,
> > I was trying to use Hbase Rest calls.
> > I started hbase rest server using command ./hadoop rest start
> >  I wrote the following Rest client:
> >
> > Map <String, String> params = new HashMap <String, String>();
> >  RestTemplate template = new RestTemplate();
> >  params.put("tabename", "table");
> >  // template.postForLocation("http://192.168.0.115:60010/AnalysisTable",
> > null, params);
> >  template.getForObject("http://192.168.0.115:60050/AnalysisTable",
> > String.class,params);
> >
> > I am getting HTTP 406 error for url http://localhost:60050/api/ in
> > browser.
> > the curl calls are working fine. Where am I going wrong?
> >
>

Re: HBase Rest API ..

Posted by stack <st...@duboce.net>.
Anything in the server-side logs?

Put up a proxy.  That'll help you figure the issue.  First request with
working curl and then from java.  See what the difference is.

In the past, this proxy, http://freshmeat.net/projects/charles/, worked well
for me.

St.Ack

On Thu, Jul 23, 2009 at 11:47 PM, Ninad Raut <hb...@gmail.com>wrote:

> hi,
> I was trying to use Hbase Rest calls.
> I started hbase rest server using command ./hadoop rest start
>  I wrote the following Rest client:
>
> Map <String, String> params = new HashMap <String, String>();
>  RestTemplate template = new RestTemplate();
>  params.put("tabename", "table");
>  // template.postForLocation("http://192.168.0.115:60010/AnalysisTable",
> null, params);
>  template.getForObject("http://192.168.0.115:60050/AnalysisTable",
> String.class,params);
>
> I am getting HTTP 406 error for url http://localhost:60050/api/ in
> browser.
> the curl calls are working fine. Where am I going wrong?
>