cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cassandra-node.apache-extras....@codespot.com
Subject [cassandra-node] 12 new revisions pushed by gdusbabek@gmail.com on 2012-03-20 11:15 GMT
Date Tue, 20 Mar 2012 11:15:25 GMT
12 new revisions:

Revision: 6966cf8c2a69
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 11:12:14 2012
Log:      Change all the emitted log events to be in the following format  
emit(l...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=6966cf8c2a69

Revision: e4f3ac432b19
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 12:23:43 2012
Log:      Update readme.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=e4f3ac432b19

Revision: a90fa485ba30
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 12:54:50 2012
Log:      Update affected test.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=a90fa485ba30

Revision: b74166bc74e4
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 13:59:32 2012
Log:      bimp version to 0.9.0
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=b74166bc74e4

Revision: 890c02e3ccdc
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 13:59:43 2012
Log:      update changes.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=890c02e3ccdc

Revision: 04360de36eca
Author:   Peter Rekdal Sunde <peter.sunde@gmail.com>
Date:     Wed Feb 22 12:29:28 2012
Log:      Documentation link is broken. DataStax offers a better CQL  
reference o...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=04360de36eca

Revision: eca636faca5d
Author:   Tomaž Muraus <kami@k5-storitve.net>
Date:     Wed Feb 22 12:42:54 2012
Log:      Merge pull request #21 from peters/patch-2...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=eca636faca5d

Revision: ab0ea78dc05f
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Tue Feb 28 14:22:41 2012
Log:      Also emit an error log event while catching an error.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=ab0ea78dc05f

Revision: 9878cd717402
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 12:50:37 2012
Log:      Remove TimedOutException from appExceptions - we should retry a  
query ...
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=9878cd717402

Revision: 75b447f7216c
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 12:53:34 2012
Log:      Also include err in the log object.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=75b447f7216c

Revision: f3955453cd42
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 13:42:36 2012
Log:      Update readme.
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=f3955453cd42

Revision: 4887b6da82d2
Author:   Gary Dusbabek <gdusbabek@gmail.com>
Date:     Wed Mar 14 14:06:02 2012
Log:      bump version 0.9.1
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=4887b6da82d2

==============================================================================
Revision: 6966cf8c2a69
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 11:12:14 2012
Log:      Change all the emitted log events to be in the following format  
emit(log, level,
message, obj) where obj is an optional object with arguments.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=6966cf8c2a69

Modified:
  /lib/driver.js

=======================================
--- /lib/driver.js	Fri Feb  3 07:43:44 2012
+++ /lib/driver.js	Mon Feb 13 11:12:14 2012
@@ -210,20 +210,23 @@
    var self = this,
        timeoutId;

-  self.emit('log', 'info', 'connecting ' + self.connectionInfo.host + ':'  
+ self.connectionInfo.port + '(' + this._id + ')');
+  self.emit('log', 'info', 'connecting ' + self.connectionInfo.host + ':'  
+ self.connectionInfo.port + '(' + this._id + ')',
+            {'connectionInfo': self.connectionInfo});

    // build connection here, so that timeouts on bad hosts happen now and  
not in the constructor.
    this.con = thrift.createConnection(self.connectionInfo.host,  
self.connectionInfo.port);
    this.con.on('error', function(err) {
      clearTimeout(timeoutId);
-    self.emit('log', 'error', self.connectionInfo.host + ':' +  
self.connectionInfo.port + ' error during connect.');
+    self.emit('log', 'error', self.connectionInfo.host + ':' +  
self.connectionInfo.port + ' error during connect.',
+              {'connectionInfo': self.connectionInfo, 'err': err});
      amendError(err, self.connectionInfo);
      callback(err);
    });

    this.con.on('close', function() {
      clearTimeout(timeoutId);
-    self.emit('log', 'info', self.connectionInfo.host + ':' +  
self.connectionInfo.port + ' is closed (' + self._id + ')');
+    self.emit('log', 'info', self.connectionInfo.host + ':' +  
self.connectionInfo.port + ' is closed (' + self._id + ')',
+              {'connectionInfo': self.connectionInfo});
    });

    this.con.on('connect', function() {
@@ -390,11 +393,11 @@
          start, end, diff;

      start = new Date().getTime();
-    self.emit('log', 'cql', {'query': query, 'parameterized_query':  
cqlString, 'args': args});
+    self.emit('log', 'cql', cqlString, {'query':  
query, 'parameterized_query': cqlString, 'args': args});

      // if a connection dies at the right place, execute_cql_query never  
returns. make sure the callback gets called.
      var longQueryWatch = setTimeout(function() {
-      self.emit('log', 'trace', "query is taking long: " + cql);
+      self.emit('log', 'trace', 'query is taking long: ' + cql, {'query':  
cql, 'timeout': 10000});
      },10000);
      var timeoutId = setTimeout(function() {
        callback(new Error('Connection timed out'));
@@ -403,7 +406,7 @@
      self.client.execute_cql_query(cql, ttypes.Compression.NONE,  
function(err, res) {
        clearTimeout(longQueryWatch);
        if (!timeoutId) {
-        self.emit('log', 'warn', 'query returned after timeout: ' + cql);
+        self.emit('log', 'warn', 'query returned after timeout: ' + cql,  
{'query': cql, 'timeout': 10000});
          return;
        } else {
          clearTimeout(timeoutId);
@@ -412,7 +415,7 @@
        end = new Date().getTime();
        diff = (end - start);
        if (self.connectionInfo.log_time) {
-        self.emit('log', 'timing', {
+        self.emit('log', 'timing', cqlString, {
            'query': query,
            'parameterized_query': cqlString,
            'args': args,
@@ -479,11 +482,11 @@
    // it occupies a fair amount of resources. the callback doesn't need to  
depend on this since the new transport
    // can be repointed before the old transport goes away.
    if (self._id !== undefined && self.con && self.client) {
-    self.emit('log', 'debug', 'initiating proactive transport close');
+    self.emit('log', 'debug', 'initiating proactive transport close', {});
      // ghetto close.
      var _con = self.con;
      _con.on('close', function(err) {
-      self.emit('log', 'debug', 'proactive transport close finished');
+      self.emit('log', 'debug', 'proactive transport close finished', {});
      });
      _con.end();
    }
@@ -566,8 +569,8 @@
        timeout: self.timeout,
        log_time: self.log_time
      });
-    connection.on('log', function(level, message) {
-      self.emit('log', level, message);
+    connection.on('log', function(level, message, obj) {
+      self.emit('log', level, message, obj);
      });
      this.connections.push(connection);
    }
@@ -673,7 +676,8 @@
              } else {
                con.unhealthyAt = new Date().getTime();
                con.taken = false;
-              self.emit('log', 'warn', 'setting unhealthy from execute ' +  
con.connectionInfo.host + ':' + con.connectionInfo.port + ',' +  
err.message);
+              self.emit('log', 'warn', 'setting unhealthy from execute ' +  
con.connectionInfo.host + ':' + con.connectionInfo.port + ',' + err.message,
+                        {'connectionInfo': con.connectionInfo});
                // try again.
                PooledConnection.prototype.execute.call(self, query, args,  
callback);
              }
@@ -685,7 +689,8 @@
          // individual connection has failed.
          con.unhealthyAt = new Date().getTime();
          con.taken = false;
-        self.emit('log', 'warn', 'setting unhealthy from catch outside  
execute ' + con.connectionInfo.host + ':' + con.connectionInfo.port);
+        self.emit('log', 'warn', 'setting unhealthy from catch outside  
execute ' + con.connectionInfo.host + ':' + con.connectionInfo.port,
+                  {'connectionInfo': con.connectionInfo});
          // try again.
          PooledConnection.prototype.execute.call(self, query, args,  
callback);
        }

==============================================================================
Revision: e4f3ac432b19
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 12:23:43 2012
Log:      Update readme.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=e4f3ac432b19

Modified:
  /README.md

=======================================
--- /README.md	Thu Jan 26 14:40:08 2012
+++ /README.md	Mon Feb 13 12:23:43 2012
@@ -135,11 +135,11 @@

      var Connection = require('node-cassandra-client').Connection;
      var con = new Connection({host:'cassandra-host', port:9160,  
keyspace:'Keyspace1', user:'user', pass:'password'});
-    con.on('log', function(level, message) {
+    con.on('log', function(level, message, obj) {
        console.log('log event: %s -- %j', level, message);
      });

-The `level` being passed to the listener can be one of `debug`, `info`,  
`warn`, `error`, `timing` and `cql`. The `message` is usually a string, in  
the case of `timing` and `cql` it is an object that provides more detailed  
information.
+The `level` being passed to the listener can be one of `debug`, `info`,  
`warn`, `error`, `timing` and `cql`. The `message` is a string and `obj` is  
an object that provides more detailed information.


  Things you should know about

==============================================================================
Revision: a90fa485ba30
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 12:54:50 2012
Log:      Update affected test.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=a90fa485ba30

Modified:
  /test/test_driver.js

=======================================
--- /test/test_driver.js	Mon Jan 30 13:54:09 2012
+++ /test/test_driver.js	Mon Feb 13 12:54:50 2012
@@ -944,12 +944,12 @@
    var logObjsCql = [];
    var logObjsTime = [];

-  var appendLog = function(level, message) {
+  var appendLog = function(level, message, obj) {
      if (level === 'cql') {
-      logObjsCql.push(message);
+      logObjsCql.push([message, obj]);
      }
      if (level === 'timing') {
-      logObjsTime.push(message);
+      logObjsTime.push([message, obj]);
      }
    };
    conn1.on('log', appendLog);
@@ -963,7 +963,7 @@
      assert.equal(logObjsCql.length, 1);
      assert.equal(logObjsTime.length, 0);

-    logObj = logObjsCql[0];
+    logObj = logObjsCql[0][1];
      assert.ok(logObj.hasOwnProperty('query'));
      assert.ok(logObj.hasOwnProperty('parameterized_query'));
      assert.ok(logObj.hasOwnProperty('args'));
@@ -977,7 +977,7 @@
        // Timing log is enabled, logObjs should have 1 item
        assert.equal(logObjsCql.length, 2);
        assert.equal(logObjsTime.length, 1);
-      logObj = logObjsTime[0];
+      logObj = logObjsTime[0][1];

        assert.ok(logObj.hasOwnProperty('query'));
        assert.ok(logObj.hasOwnProperty('parameterized_query'));

==============================================================================
Revision: b74166bc74e4
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 13:59:32 2012
Log:      bimp version to 0.9.0

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=b74166bc74e4

Modified:
  /package.json

=======================================
--- /package.json	Fri Feb  3 07:44:05 2012
+++ /package.json	Mon Feb 13 13:59:32 2012
@@ -9,7 +9,7 @@
    ],
    "name": "cassandra-client",
    "description": "Node.js CQL driver for Apache Cassandra",
-  "version": "0.8.2",
+  "version": "0.9.0",
    "homepage": "http://code.google.com/a/apache-extras.org/p/cassandra-node/",
    "repository": {
      "type": "git",

==============================================================================
Revision: 890c02e3ccdc
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Mon Feb 13 13:59:43 2012
Log:      update changes.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=890c02e3ccdc

Modified:
  /CHANGES

=======================================
--- /CHANGES	Fri Feb  3 07:44:05 2012
+++ /CHANGES	Mon Feb 13 13:59:43 2012
@@ -1,3 +1,14 @@
+Changes with cassandra-client 0.9.0
+
+- Change Connection and PooledConnection 'log' event arguments - now it  
takes the
+  following arguments:
+
+  - level - log level
+  - message - string log message which is always present (previously this
+    argument could be either string or an object)
+  - obj - optional object which extra message attributes (e.g.  
connectionInfo,
+    query, etc.)
+
  Changes with cassandra-client 0.8.2

  - id connections.

==============================================================================
Revision: 04360de36eca
Author:   Peter Rekdal Sunde <peter.sunde@gmail.com>
Date:     Wed Feb 22 12:29:28 2012
Log:      Documentation link is broken. DataStax offers a better CQL  
reference overview :)
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=04360de36eca

Modified:
  /README.md

=======================================
--- /README.md	Mon Feb 13 12:23:43 2012
+++ /README.md	Wed Feb 22 12:29:28 2012
@@ -4,7 +4,7 @@
  node-cassandra-client is a [Node.js](http://nodejs.org) CQL driver for  
[Apache Cassandra](http://cassandra.apache.org) 0.8 and later.

  CQL is a query language for Apache Cassandra.  You use it in much the same  
way you would use SQL for a relational database.
-The Cassandra  
[documentation](https://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.html?view=co)  
can help you learn the syntax.
+The Cassandra  
[documentation](http://www.datastax.com/docs/1.0/references/cql/index) can  
help you learn the syntax.

  License
  ====================

==============================================================================
Revision: eca636faca5d
Author:   Tomaž Muraus <kami@k5-storitve.net>
Date:     Wed Feb 22 12:42:54 2012
Log:      Merge pull request #21 from peters/patch-2

Documentation link is broken
http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=eca636faca5d



==============================================================================
Revision: ab0ea78dc05f
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Tue Feb 28 14:22:41 2012
Log:      Also emit an error log event while catching an error.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=ab0ea78dc05f

Modified:
  /lib/driver.js

=======================================
--- /lib/driver.js	Mon Feb 13 11:12:14 2012
+++ /lib/driver.js	Tue Feb 28 14:22:41 2012
@@ -689,6 +689,8 @@
          // individual connection has failed.
          con.unhealthyAt = new Date().getTime();
          con.taken = false;
+
+        self.emit('log', 'error', 'Error while executing a query: ' +  
err.toString(), {'err': err});
          self.emit('log', 'warn', 'setting unhealthy from catch outside  
execute ' + con.connectionInfo.host + ':' + con.connectionInfo.port,
                    {'connectionInfo': con.connectionInfo});
          // try again.

==============================================================================
Revision: 9878cd717402
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 12:50:37 2012
Log:      Remove TimedOutException from appExceptions - we should retry a  
query when a
Timeout exception happens.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=9878cd717402

Modified:
  /CHANGES
  /lib/driver.js

=======================================
--- /CHANGES	Mon Feb 13 13:59:43 2012
+++ /CHANGES	Wed Mar 14 12:50:37 2012
@@ -1,5 +1,7 @@
  Changes with cassandra-client 0.9.0

+- Change PooledConnection to retry a query if a TimedOutException is  
returned.
+
  - Change Connection and PooledConnection 'log' event arguments - now it  
takes the
    following arguments:

=======================================
--- /lib/driver.js	Tue Feb 28 14:22:41 2012
+++ /lib/driver.js	Wed Mar 14 12:50:37 2012
@@ -35,8 +35,7 @@
  var selectRe = /\s*SELECT\s+.+\s+FROM\s+[\']?(\w+)/im;
  var selectCountRe = /\s*SELECT\s+.*COUNT\(.+\)\s+FROM\s+[\']?(\w+)/im;

-var appExceptions =  
['InvalidRequestException', 'TimedOutException', 'UnavailableException',
-  'SchemaDisagreementException'];
+var appExceptions =  
['InvalidRequestException', 'UnavailableException', 'SchemaDisagreementException'];

  var nullBindError = {
    message: 'null/undefined query parameter'

==============================================================================
Revision: 75b447f7216c
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 12:53:34 2012
Log:      Also include err in the log object.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=75b447f7216c

Modified:
  /lib/driver.js

=======================================
--- /lib/driver.js	Wed Mar 14 12:50:37 2012
+++ /lib/driver.js	Wed Mar 14 12:53:34 2012
@@ -675,8 +675,10 @@
              } else {
                con.unhealthyAt = new Date().getTime();
                con.taken = false;
+
+              amendError(err, con.connectionInfo);
                self.emit('log', 'warn', 'setting unhealthy from execute ' +  
con.connectionInfo.host + ':' + con.connectionInfo.port + ',' + err.message,
-                        {'connectionInfo': con.connectionInfo});
+                        {'connectionInfo': con.connectionInfo, 'err':  
err});
                // try again.
                PooledConnection.prototype.execute.call(self, query, args,  
callback);
              }

==============================================================================
Revision: f3955453cd42
Author:   Tomaz Muraus <tomaz@tomaz.me>
Date:     Wed Mar 14 13:42:36 2012
Log:      Update readme.

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=f3955453cd42

Modified:
  /CHANGES

=======================================
--- /CHANGES	Wed Mar 14 12:50:37 2012
+++ /CHANGES	Wed Mar 14 13:42:36 2012
@@ -2,7 +2,7 @@

  - Change PooledConnection to retry a query if a TimedOutException is  
returned.

-- Change Connection and PooledConnection 'log' event arguments - now it  
takes the
+- Change Connection and PooledConnection 'log' event arguments - now it  
takes the
    following arguments:

    - level - log level
@@ -11,6 +11,9 @@
    - obj - optional object which extra message attributes (e.g.  
connectionInfo,
      query, etc.)

+  Note: This change is backward incompatible - previously 'obj' argument  
wasn't
+  passed to the 'log' event
+
  Changes with cassandra-client 0.8.2

  - id connections.

==============================================================================
Revision: 4887b6da82d2
Author:   Gary Dusbabek <gdusbabek@gmail.com>
Date:     Wed Mar 14 14:06:02 2012
Log:      bump version 0.9.1

http://code.google.com/a/apache-extras.org/p/cassandra-node/source/detail?r=4887b6da82d2

Modified:
  /package.json

=======================================
--- /package.json	Mon Feb 13 13:59:32 2012
+++ /package.json	Wed Mar 14 14:06:02 2012
@@ -9,7 +9,7 @@
    ],
    "name": "cassandra-client",
    "description": "Node.js CQL driver for Apache Cassandra",
-  "version": "0.9.0",
+  "version": "0.9.1",
    "homepage": "http://code.google.com/a/apache-extras.org/p/cassandra-node/",
    "repository": {
      "type": "git",
Mime
View raw message