Search in sources :

Example 11 with TraceState

use of org.apache.cassandra.tracing.TraceState in project cassandra by apache.

the class InboundMessageHandler method dispatch.

/**
 * Submit a {@link ProcessMessage} task to the appropriate {@link Stage} for the {@link Verb}.
 */
private void dispatch(ProcessMessage task) {
    Header header = task.header();
    TraceState state = Tracing.instance.initializeFromMessage(header);
    if (state != null)
        state.trace("{} message received from {}", header.verb, header.from);
    callbacks.onDispatched(task.size(), header);
    header.verb.stage.execute(ExecutorLocals.create(state), task);
}
Also used : TraceState(org.apache.cassandra.tracing.TraceState) Header(org.apache.cassandra.net.Message.Header)

Aggregations

TraceState (org.apache.cassandra.tracing.TraceState)11 ProgressListener (org.apache.cassandra.utils.progress.ProgressListener)3 ColumnFamilyStore (org.apache.cassandra.db.ColumnFamilyStore)2 ClientWarn (org.apache.cassandra.service.ClientWarn)2 ProgressEvent (org.apache.cassandra.utils.progress.ProgressEvent)2 IOException (java.io.IOException)1 InetAddress (java.net.InetAddress)1 UUID (java.util.UUID)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 LocalAwareExecutorService (org.apache.cassandra.concurrent.LocalAwareExecutorService)1 Range (org.apache.cassandra.dht.Range)1 Token (org.apache.cassandra.dht.Token)1 Header (org.apache.cassandra.net.Message.Header)1 TraceStateImpl (org.apache.cassandra.tracing.TraceStateImpl)1 Tracing (org.apache.cassandra.tracing.Tracing)1 Pair (org.apache.cassandra.utils.Pair)1