You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/03/17 15:16:14 UTC
cassandra git commit: Add client to cqlsh SHOW_SESSION
Repository: cassandra
Updated Branches:
refs/heads/trunk 07ddb8a21 -> 2ab629937
Add client to cqlsh SHOW_SESSION
patch by Stefania; reviewed by slebresne for CASSANDRA-8958
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2ab62993
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2ab62993
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2ab62993
Branch: refs/heads/trunk
Commit: 2ab6299370a756c6d216b65d9853d7fc7ddde4c1
Parents: 07ddb8a
Author: Stefania Alborghetti <st...@datastax.com>
Authored: Thu Mar 17 19:52:51 2016 +0800
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Mar 17 15:15:47 2016 +0100
----------------------------------------------------------------------
CHANGES.txt | 1 +
pylib/cqlshlib/tracing.py | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ab62993/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 15cceaa..4366c08 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.6
+ * Add client to cqlsh SHOW_SESSION (CASSANDRA-8958)
* Fix nodetool tablestats keyspace level metrics (CASSANDRA-11226)
* Store repair options in parent_repair_history (CASSANDRA-11244)
* Print current leveling in sstableofflinerelevel (CASSANDRA-9588)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2ab62993/pylib/cqlshlib/tracing.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/tracing.py b/pylib/cqlshlib/tracing.py
index b886dba..0a11206 100644
--- a/pylib/cqlshlib/tracing.py
+++ b/pylib/cqlshlib/tracing.py
@@ -43,7 +43,7 @@ def print_trace(shell, trace):
if not rows:
shell.printerr("No rows for session %s found." % (trace.trace_id,))
return
- names = ['activity', 'timestamp', 'source', 'source_elapsed']
+ names = ['activity', 'timestamp', 'source', 'source_elapsed', 'client']
formatted_names = map(shell.myformat_colname, names)
formatted_values = [map(shell.myformat_value, row) for row in rows]
@@ -60,18 +60,19 @@ def make_trace_rows(trace):
if not trace.events:
return []
- rows = [[trace.request_type, str(datetime_from_utc_to_local(trace.started_at)), trace.coordinator, 0]]
+ rows = [[trace.request_type, str(datetime_from_utc_to_local(trace.started_at)), trace.coordinator, 0, trace.client]]
# append main rows (from events table).
for event in trace.events:
rows.append(["%s [%s]" % (event.description, event.thread_name),
str(datetime_from_utc_to_local(event.datetime)),
event.source,
- event.source_elapsed.microseconds if event.source_elapsed else "--"])
+ event.source_elapsed.microseconds if event.source_elapsed else "--",
+ trace.client])
# append footer row (from sessions table).
if trace.duration:
finished_at = (datetime_from_utc_to_local(trace.started_at) + trace.duration)
- rows.append(['Request complete', str(finished_at), trace.coordinator, trace.duration.microseconds])
+ rows.append(['Request complete', str(finished_at), trace.coordinator, trace.duration.microseconds, trace.client])
else:
finished_at = trace.duration = "--"