cassandra-node-driver

Node.js Streaming/Piping Error Handling (Change Response Status on Error)

巧了我就是萌 提交于 2021-02-08 19:57:46
问题 I have millions of rows in my Cassandra db that I want to stream to the client in a zip file (don't want a potentially huge zip file in memory). I am using the stream() function from the Cassandra-Node driver, piping to a Transformer which extracts the one field from each row that I care about and appends a newline, and pipes to archive which pipes to the Express Response object. This seems to work fine but I can't figure out how to properly handle errors during streaming. I have to set the

dse-driver connection refused

◇◆丶佛笑我妖孽 提交于 2020-01-07 06:14:15
问题 I am trying to connect to my Datastax enterprise Cassandra install on a server. When I try to connect I receive an error: Cassandra connection error { [Error: All host(s) tried for query failed. First host tried, XX.XX.XX.XX:9042: Error: connect ECONNREFUSED XX.XX.XX.XX:9042. See innerErrors.] innerErrors: { 'XX.XX.XX.XX:9042': { Error: connect ECONNREFUSED XX.XX.XX.XX:9042 at Object.exports._errnoException (util.js:896:11) at exports._exceptionWithHostPort (util.js:919:20) at TCPConnectWrap

Cassandra query failure (Tombstones)

可紊 提交于 2019-12-23 00:53:13
问题 So this is driving me crazy. i tried querying one of my table in Cassandra and it showed query failure. i tried digging dip in to the reason behind it and found that it was because of tombstone. i changed GC_GRACE_SECONDS to Zero and triggered Compaction using nodetool, And when i queried again it worked fine. however on a subsequent calls query failed again with a same reason. i am using cassandra-nodejs driver. This is my data model. CREATE TABLE my_table ( firstname text, lastname text,

Cassandra query failure (Tombstones)

帅比萌擦擦* 提交于 2019-12-06 15:34:49
So this is driving me crazy. i tried querying one of my table in Cassandra and it showed query failure. i tried digging dip in to the reason behind it and found that it was because of tombstone. i changed GC_GRACE_SECONDS to Zero and triggered Compaction using nodetool, And when i queried again it worked fine. however on a subsequent calls query failed again with a same reason. i am using cassandra-nodejs driver. This is my data model. CREATE TABLE my_table ( firstname text, lastname text, email text, mobile text, date timeuuid, value float, PRIMARY KEY (firstname, lastname, email, mobile) )