node.js - get a response from cassandra binary protocol using node streams -


While trying to know more about the streams and the cassandra, I thought I would try the binary protocol.

  var net = need ('net'); Var util = require (); Var Stream = Required ('Stream'); Separate session; Var = new buffer (4); Var body = New buffer ("{'CQL_VERSION': '3.0.0'}", 'UTF8'); Length.Lyought UINT 32BE (body length, 0); Session.written (header); Session.written (length); Session.write (body); SetTimeout (function () {session.end ();}, 5000);}); Session.on ('error', function (error) {console.log (err);}); Var client = new (stream.); Client._write = function (slice, _, next) {console.log ('receive feedback'); the upcoming(); }; Session.pipe (customer);   

The program runs for 5 seconds, the printing "connect" occurs almost instantly, but the writeable stream never receives content from the database. Any help would be appreciated!


I am working with this and

Cassandra is running, version 2.0.5 .

9160 is the port of Thief Have you tried your code with port 9042?

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -