Package org.apache.pinot.spi.trace
Class Tracing
- java.lang.Object
-
- org.apache.pinot.spi.trace.Tracing
-
public class Tracing extends Object
Global registration for tracing and thread accounting implementations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTracing.DefaultThreadResourceUsageAccountantDefault accountant that is used to enable worker thread cancellation upon runner thread's interruptionstatic classTracing.ThreadAccountantOpsAccountant related Ops util class
-
Method Summary
Modifier and Type Method Description static InvocationRecordingactiveRecording()Get the active recording on the current thread to write values into.static ThreadResourceUsageAccountantgetThreadAccountant()static TracergetTracer()static booleanregister(ThreadResourceUsageAccountant threadResourceUsageAccountant)Registration point to allow customization of thread accounting behavior.static booleanregister(Tracer tracer)User once registration point to allow customization of tracing behaviour.
-
-
-
Method Detail
-
register
public static boolean register(Tracer tracer)
User once registration point to allow customization of tracing behaviour. Registration will be successful if this was the first attempt to register and registration happened before first use of the tracer.- Parameters:
tracer- the tracer implementation- Returns:
- true if the registration was successful.
-
register
public static boolean register(ThreadResourceUsageAccountant threadResourceUsageAccountant)
Registration point to allow customization of thread accounting behavior. Registration will be successful if this was the first attempt to register and registration happened before first use of the thread accountant.- Parameters:
threadResourceUsageAccountant- the threadAccountant implementation- Returns:
- true if the registration was successful.
-
getTracer
public static Tracer getTracer()
- Returns:
- the registered tracer.
-
getThreadAccountant
public static ThreadResourceUsageAccountant getThreadAccountant()
- Returns:
- the registered threadAccountant.
-
activeRecording
public static InvocationRecording activeRecording()
Get the active recording on the current thread to write values into.- Returns:
- the active recording
-
-