Package org.apache.datafusion
Class MemoryUsage
java.lang.Object
org.apache.datafusion.MemoryUsage
Snapshot of session-wide memory usage from
SessionContext.memoryUsage(). Returns the
total bytes currently reserved against the session's MemoryPool and the peak observed
since the session was created.
Multi-tenant attribution: place each tenant in its own SessionContext. Sessions in
DataFusion are cheap; one per tenant is the standard pattern. Within a single session, the
snapshot is the sum across all in-flight queries' operator reservations -- see SessionContext.memoryUsage() for the precise definition of what is and is not counted.
Instances are immutable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongBytes currently reserved against this session'sMemoryPool.longMaximum value ofcurrentBytes()observed since the session was created.toString()
-
Constructor Details
-
MemoryUsage
public MemoryUsage(long currentBytes, long peakBytes)
-
-
Method Details
-
currentBytes
public long currentBytes()Bytes currently reserved against this session'sMemoryPool. -
peakBytes
public long peakBytes()Maximum value ofcurrentBytes()observed since the session was created. Monotonic: never decreases for a given session. -
toString
-