You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Simon Majou <si...@majou.org> on 2013/06/04 17:37:23 UTC

Using thrift2 interface but getting : 400 Bad Request

Hello,

I am using thrift & thrift2 interfaces (thrift for DDL & thrift2 for the
rest), my requests work with thrift but with thrift2 I got a error 400.

Here is my code (coffeescript) :

  colValue = new types2.TColumnValue family: 'cf', qualifier:'col',
value:'yoo'
  put = new types2.TPut(row:'row1', columnValues: [ colValue ])
  client2.put 'test', put, (err, res) ->
    console.log 'put', err, res


Here is what is sent by the put method :

{ row: 'row1',
  columnValues: [ { family: 'cf', qualifier: 'col', value: 'yoo',
timestamp: null } ],
  timestamp: null,
  writeToWal: true }


And here is the reply from thrift2 deamon :

receive HTTP/1.1 400 Bad Request
Connection: close
Server: Jetty(6.1.26)


There are no logs into thrift2.log when I do my request.

Anyone have any clue ?

Simon

Re: Using thrift2 interface but getting : 400 Bad Request

Posted by Simon Majou <si...@majou.org>.
No logs there either (in fact no logs are written in any log file when I
execute the request)


Simon


On Tue, Jun 4, 2013 at 5:42 PM, Ted Yu <yu...@gmail.com> wrote:

> Can you check region server log around that time ?
>
> Thanks
>
> On Jun 4, 2013, at 8:37 AM, Simon Majou <si...@majou.org> wrote:
>
> > Hello,
> >
> > I am using thrift & thrift2 interfaces (thrift for DDL & thrift2 for the
> > rest), my requests work with thrift but with thrift2 I got a error 400.
> >
> > Here is my code (coffeescript) :
> >
> >  colValue = new types2.TColumnValue family: 'cf', qualifier:'col',
> > value:'yoo'
> >  put = new types2.TPut(row:'row1', columnValues: [ colValue ])
> >  client2.put 'test', put, (err, res) ->
> >    console.log 'put', err, res
> >
> >
> > Here is what is sent by the put method :
> >
> > { row: 'row1',
> >  columnValues: [ { family: 'cf', qualifier: 'col', value: 'yoo',
> > timestamp: null } ],
> >  timestamp: null,
> >  writeToWal: true }
> >
> >
> > And here is the reply from thrift2 deamon :
> >
> > receive HTTP/1.1 400 Bad Request
> > Connection: close
> > Server: Jetty(6.1.26)
> >
> >
> > There are no logs into thrift2.log when I do my request.
> >
> > Anyone have any clue ?
> >
> > Simon
>

Re: Using thrift2 interface but getting : 400 Bad Request

Posted by Ted Yu <yu...@gmail.com>.
Can you check region server log around that time ?

Thanks

On Jun 4, 2013, at 8:37 AM, Simon Majou <si...@majou.org> wrote:

> Hello,
> 
> I am using thrift & thrift2 interfaces (thrift for DDL & thrift2 for the
> rest), my requests work with thrift but with thrift2 I got a error 400.
> 
> Here is my code (coffeescript) :
> 
>  colValue = new types2.TColumnValue family: 'cf', qualifier:'col',
> value:'yoo'
>  put = new types2.TPut(row:'row1', columnValues: [ colValue ])
>  client2.put 'test', put, (err, res) ->
>    console.log 'put', err, res
> 
> 
> Here is what is sent by the put method :
> 
> { row: 'row1',
>  columnValues: [ { family: 'cf', qualifier: 'col', value: 'yoo',
> timestamp: null } ],
>  timestamp: null,
>  writeToWal: true }
> 
> 
> And here is the reply from thrift2 deamon :
> 
> receive HTTP/1.1 400 Bad Request
> Connection: close
> Server: Jetty(6.1.26)
> 
> 
> There are no logs into thrift2.log when I do my request.
> 
> Anyone have any clue ?
> 
> Simon