Figured it out. I was passing wrong javascript object to that method but now getting ' ERROR thrift.ProcessFunction: Internal error processing get' error in Thrift server logs. Shall I write separate thread about this error?
Regards, Chandrash3khar Kotekar Mobile - +91 8600011455 On Mon, Aug 24, 2015 at 6:45 PM, Ted Yu <yuzhih...@gmail.com> wrote: > Looking at pom.xml in 0.98 branch I see: > <thrift.version>0.9.0</thrift.version> > > Not sure which thrift version is used in CDH. > > BTW thrift2 is supported in 0.98 > Take a look at hbase-thrift module and its git log. > > Cheers > > On Mon, Aug 24, 2015 at 5:47 AM, Chandrashekhar Kotekar < > shekhar.kote...@gmail.com> wrote: > > > I am using HBase 0.98.6 which is shipped with CDH 5.3.0, Thrift compiler > > version is 0.9.2 and I guess I have started HBase thrift server. I am not > > sure if Thrift2 is available with 0.98.6 or not and even if it is > available > > not sure how do I start thrift2 service. > > > > > > Regards, > > Chandrash3khar Kotekar > > Mobile - +91 8600011455 > > > > On Mon, Aug 24, 2015 at 6:15 PM, Ted Yu <yuzhih...@gmail.com> wrote: > > > > > Which hbase release are you using ? > > > > > > Which version of thrift do you use in your app ? > > > > > > Thanks > > > > > > > > > > > > > On Aug 24, 2015, at 5:00 AM, Chandrashekhar Kotekar < > > > shekhar.kote...@gmail.com> wrote: > > > > > > > > Hi, > > > > > > > > I am trying to use following code to test HBase Thrift interface for > > > > Node.js but it is not working. > > > > > > > > *var thrift = require('thrift');* > > > > *var hbase = require('./gen-nodejs/THBaseService');* > > > > *var hbaseTypes = require('./gen-nodejs/hbase_types');* > > > > > > > > *var connection = thrift.createConnection('nn2', 9090, {* > > > > * transport: thrift.TBufferedTransport//,* > > > > * //protocol : thrift.TBinaryProtocol* > > > > *});* > > > > *console.log('connection : ' + connection );* > > > > > > > > *var client = thrift.createClient(hbase, connection);* > > > > *for(a in client) {* > > > > * console.log(a);* > > > > *}* > > > > > > > > *connection.on('connect', function(){* > > > > * console.log('connected to hbase.');* > > > > * client.get('AD_COMPANY_V1', '028fffac57101a1fa5f9aa53a6d0', > 'CF:Id', > > > > null, function(err, data){* > > > > * console.log(data);* > > > > * });* > > > > * connection.end();* > > > > *});* > > > > > > > > *connection.on('error', function(err){* > > > > * console.log('error while connecting : ', err);* > > > > *});* > > > > > > > > > > > > Whenever I execute this code using "node index.js" command I get > > > following > > > > error : > > > > > > > > /home/ubuntu/shekhar/thrift/client/gen-nodejs/THBaseService.js:228 > > > > this.get.write(output); > > > > ^ > > > > TypeError: undefined is not a function > > > > at Object.THBaseService_get_args.write > > > > > (/home/ubuntu/shekhar/thrift/client/gen-nodejs/THBaseService.js:228:14) > > > > at Object.THBaseServiceClient.send_get > > > > > (/home/ubuntu/shekhar/thrift/client/gen-nodejs/THBaseService.js:2652:8) > > > > at Object.THBaseServiceClient.get > > > > > > (/home/ubuntu/shekhar/thrift/client/gen-nodejs/THBaseService.js:2642:10) > > > > at null.<anonymous> > > > (/home/ubuntu/shekhar/thrift/client/index.js:15:10) > > > > at emit (events.js:104:17) > > > > at Socket.<anonymous> > > > > > > > > > > (/home/ubuntu/shekhar/thrift/client/node_modules/thrift/lib/thrift/connection.js:73:10) > > > > at Socket.emit (events.js:129:20) > > > > at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1001:10) > > > > > > > > > > > > Any idea why this error occurs? > > > > > > > > Regards, > > > > Chandrash3khar Kotekar > > > > Mobile - +91 8600011455 > > > > > >