Package org.apache.pinot.spi.trace
Class BaseRecording
- java.lang.Object
-
- org.apache.pinot.spi.trace.BaseRecording
-
- All Implemented Interfaces:
InvocationRecording
- Direct Known Subclasses:
NoOpRecording
public class BaseRecording extends Object implements InvocationRecording
A base recording class. SPI users should extend this class to ensure that {@see isEnabled} checks are cheap.
-
-
Constructor Summary
Constructors Constructor Description BaseRecording(boolean enabled)
-
Method Summary
Modifier and Type Method Description booleanisEnabled()This should not be overridden to keep the isEnabled checks as cheap as possible.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.spi.trace.InvocationRecording
setBytesProcessed, setColumnCardinality, setColumnName, setDocIdRange, setFilter, setFunctionName, setInputDataType, setNumChildren, setNumDocsMatchingAfterFilter, setNumDocsScanned, setNumGroups, setNumSegments, setNumTasks, setOutputDataType
-
-
-
-
Method Detail
-
isEnabled
public final boolean isEnabled()
This should not be overridden to keep the isEnabled checks as cheap as possible.- Specified by:
isEnabledin interfaceInvocationRecording- Returns:
- true if the recording is enabled. If producing a value is costly, the caller should check whether the recording is enabled before producing the value to keep tracing overhead down.
-
-