cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tylerho...@apache.org
Subject [1/4] cassandra git commit: cqlsh: Apply --connect-timeout to control conn
Date Tue, 12 Jan 2016 17:54:01 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 22a1bbb10 -> a883ff5f3


cqlsh: Apply --connect-timeout to control conn

Patch by Julien Blondeau; reviewed by Tyler Hobbs for CASSANDRA-10959


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/de946ae4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/de946ae4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/de946ae4

Branch: refs/heads/trunk
Commit: de946ae45ad8af3718d4159e885e6700230d4818
Parents: a6e5cda
Author: Julien Blondeau <lounagen@gmail.com>
Authored: Tue Jan 12 11:51:20 2016 -0600
Committer: Tyler Hobbs <tylerlhobbs@gmail.com>
Committed: Tue Jan 12 11:51:20 2016 -0600

----------------------------------------------------------------------
 CHANGES.txt  | 2 ++
 bin/cqlsh.py | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/de946ae4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 477a104..f895139 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.2.5
+ * (cqlsh) Also apply --connect-timeout to control connection
+   timeout (CASSANDRA-10959)
  * Histogram buckets exposed in jmx are sorted incorrectly (CASSANDRA-10975)
  * Enable GC logging by default (CASSANDRA-10140)
  * Optimize pending range computation (CASSANDRA-9258)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/de946ae4/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index c38bc2e..be2ad46 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -141,7 +141,6 @@ from cassandra.cluster import Cluster
 from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata,
                                 TableMetadata, protect_name, protect_names)
 from cassandra.policies import WhiteListRoundRobinPolicy
-from cassandra.protocol import ResultMessage
 from cassandra.query import SimpleStatement, ordered_dict_factory, TraceUnavailable
 
 # cqlsh should run correctly when run out of a Cassandra source tree,
@@ -683,6 +682,7 @@ class Shell(cmd.Cmd):
                                 auth_provider=self.auth_provider,
                                 ssl_options=sslhandling.ssl_settings(hostname, CONFIG_FILE)
if ssl else None,
                                 load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname]),
+                                control_connection_timeout=connect_timeout,
                                 connect_timeout=connect_timeout)
         self.owns_connection = not use_conn
         self.set_expanded_cql_version(cqlver)
@@ -1201,7 +1201,7 @@ class Shell(cmd.Cmd):
     def perform_simple_statement(self, statement):
         if not statement:
             return False, None
-        rows = None
+
         while True:
             try:
                 future = self.session.execute_async(statement, trace=self.tracing_enabled)
@@ -2047,6 +2047,7 @@ class Shell(cmd.Cmd):
                        auth_provider=auth_provider,
                        ssl_options=self.conn.ssl_options,
                        load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname]),
+                       control_connection_timeout=self.conn.connect_timeout,
                        connect_timeout=self.conn.connect_timeout)
 
         if self.current_keyspace:


Mime
View raw message