cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/4] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Fri, 06 Nov 2015 17:56:45 GMT
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb429063/pylib/cqlshlib/tracing.py
----------------------------------------------------------------------
diff --cc pylib/cqlshlib/tracing.py
index 40d22f0,40d22f0..2ded259
--- a/pylib/cqlshlib/tracing.py
+++ b/pylib/cqlshlib/tracing.py
@@@ -20,13 -20,13 +20,14 @@@ import tim
  from cassandra.query import QueryTrace, TraceUnavailable
  
  
--def print_trace_session(shell, session, session_id):
++def print_trace_session(shell, session, session_id, partial_session=False):
      """
      Lookup a trace by session and trace session ID, then print it.
      """
      trace = QueryTrace(session_id, session)
      try:
--        trace.populate()
++        wait_for_complete = not partial_session
++        trace.populate(wait_for_complete=wait_for_complete)
      except TraceUnavailable:
          shell.printerr("Session %s wasn't found." % session_id)
      else:
@@@ -69,11 -69,11 +70,10 @@@ def make_trace_rows(trace)
      # 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])
      else:
          finished_at = trace.duration = "--"
  
--    rows.append(['Request complete', str(finished_at), trace.coordinator, trace.duration.microseconds])
--
      return rows
  
  


Mime
View raw message