public interface QueryTrace
When tracing
is enabled for a query, Cassandra generates rows in
the sessions
and events
table of the system_traces
keyspace. This class
is a client-side representation of that information.
Modifier and Type | Method and Description |
---|---|
InetAddress |
getCoordinator()
Deprecated.
returns the coordinator IP, but
getCoordinatorAddress() should be
preferred, since C* 4.0 and above now returns the port was well. |
default InetSocketAddress |
getCoordinatorAddress()
The IP and port of the node that coordinated the query.
|
int |
getDurationMicros()
The server-side duration of the query in microseconds.
|
List<TraceEvent> |
getEvents()
The events contained in this trace.
|
Map<String,String> |
getParameters()
The parameters attached to this trace.
|
String |
getRequestType() |
long |
getStartedAt()
The server-side timestamp of the start of this query.
|
UUID |
getTracingId() |
@NonNull UUID getTracingId()
@NonNull String getRequestType()
int getDurationMicros()
@NonNull @Deprecated InetAddress getCoordinator()
getCoordinatorAddress()
should be
preferred, since C* 4.0 and above now returns the port was well.@NonNull default InetSocketAddress getCoordinatorAddress()
This method's default implementation returns getCoordinator()
with the port set to
0. The only reason it exists is to preserve binary compatibility. Internally, the driver
overrides it to set the correct port.
long getStartedAt()
@NonNull List<TraceEvent> getEvents()
Query tracing is asynchronous in Cassandra. Hence, it is possible for the list returned to be missing some events for some of the replicas involved in the query if the query trace is requested just after the return of the query (the only guarantee being that the list will contain the events pertaining to the coordinator).
Copyright © 2017–2020. All rights reserved.