public final class DynamicWrappedStatistics
extends java.lang.Object
WrappedStatistics,
dynamically loaded.
This is suitable for copy-and-paste into other libraries which have some
version of the Parquet DynMethods classes already present.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
IOSTATISTICS_CONTEXT_AGGREGATE |
IOStatisticsContext method: "iostatisticsContext_aggregate".
|
static java.lang.String |
IOSTATISTICS_CONTEXT_ENABLED |
IOStatisticsContext method: "iostatisticsContext_enabled".
|
static java.lang.String |
IOSTATISTICS_CONTEXT_GET_CURRENT |
IOStatisticsContext method: "iostatisticsContext_getCurrent".
|
static java.lang.String |
IOSTATISTICS_CONTEXT_RESET |
IOStatisticsContext method: "iostatisticsContext_reset".
|
static java.lang.String |
IOSTATISTICS_CONTEXT_SET_THREAD_CONTEXT |
IOStatisticsContext method: "iostatisticsContext_setThreadIOStatisticsContext".
|
static java.lang.String |
IOSTATISTICS_CONTEXT_SNAPSHOT |
IOStatisticsContext method: "iostatisticsContext_snapshot".
|
static java.lang.String |
IOSTATISTICS_COUNTERS |
Method name: "iostatistics_counters".
|
static java.lang.String |
IOSTATISTICS_GAUGES |
Method name: "iostatistics_gauges".
|
static java.lang.String |
IOSTATISTICS_MAXIMUMS |
Method name: "iostatistics_maximums".
|
static java.lang.String |
IOSTATISTICS_MEANS |
Method name: "iostatistics_means".
|
static java.lang.String |
IOSTATISTICS_MINIMUMS |
Method name: "iostatistics_minimums".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_AGGREGATE |
Method name: "iostatisticsSnapshot_aggregate".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_CREATE |
Method name: "iostatisticsSnapshot_create".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_FROM_JSON_STRING |
Method name: "iostatisticsSnapshot_fromJsonString".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_LOAD |
Method name: "iostatisticsSnapshot_load".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_RETRIEVE |
Method name: "iostatisticsSnapshot_retrieve".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_SAVE |
Method name: "iostatisticsSnapshot_save".
|
static java.lang.String |
IOSTATISTICS_SNAPSHOT_TO_JSON_STRING |
Method name: "iostatisticsSnapshot_toJsonString".
|
static java.lang.String |
IOSTATISTICS_TO_PRETTY_STRING |
Method name: "iostatistics_toPrettyString".
|
static java.lang.String |
IS_IOSTATISTICS |
Method name: "isIOStatistics".
|
static java.lang.String |
IS_IOSTATISTICS_SNAPSHOT |
Method name: "isIOStatisticsSnapshot".
|
static java.lang.String |
IS_IOSTATISTICS_SOURCE |
Method name: "isIOStatisticsSource".
|
static java.lang.String |
WRAPPED_STATISTICS_CLASSNAME |
Classname of the wrapped statistics class: "org.apache.hadoop.io.wrappedio.WrappedStatistics".
|
| Constructor | Description |
|---|---|
DynamicWrappedStatistics() |
|
DynamicWrappedStatistics(java.lang.String classname) |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Map<java.lang.String,java.lang.Long> |
iostatistics_counters(java.io.Serializable source) |
Get the counters of an IOStatisticsSnapshot.
|
java.util.Map<java.lang.String,java.lang.Long> |
iostatistics_gauges(java.io.Serializable source) |
Get the gauges of an IOStatisticsSnapshot.
|
java.util.Map<java.lang.String,java.lang.Long> |
iostatistics_maximums(java.io.Serializable source) |
Get the maximums of an IOStatisticsSnapshot.
|
java.util.Map<java.lang.String,java.util.Map.Entry<java.lang.Long,java.lang.Long>> |
iostatistics_means(java.io.Serializable source) |
Get the means of an IOStatisticsSnapshot.
|
java.util.Map<java.lang.String,java.lang.Long> |
iostatistics_minimums(java.io.Serializable source) |
Get the minimums of an IOStatisticsSnapshot.
|
java.lang.String |
iostatistics_toPrettyString(java.lang.Object statistics) |
Convert IOStatistics to a string form, with all the metrics sorted
and empty value stripped.
|
boolean |
ioStatisticsAvailable() |
Are the core IOStatistics methods and classes available.
|
boolean |
iostatisticsContext_aggregate(java.lang.Object source) |
Aggregate into the IOStatistics context the statistics passed in via
IOStatistics/source parameter.
|
boolean |
iostatisticsContext_enabled() |
Probe to check if the thread-level IO statistics enabled.
|
java.lang.Object |
iostatisticsContext_getCurrent() |
Get the context's
IOStatisticsContext which
implements IOStatisticsSource. |
void |
iostatisticsContext_reset() |
Reset the context's IOStatistics.
|
void |
iostatisticsContext_setThreadIOStatisticsContext(java.lang.Object statisticsContext) |
Set the IOStatisticsContext for the current thread.
|
java.io.Serializable |
iostatisticsContext_snapshot() |
Take a snapshot of the context IOStatistics.
|
boolean |
ioStatisticsContextAvailable() |
Are the IOStatisticsContext methods and classes available?
|
boolean |
iostatisticsSnapshot_aggregate(java.io.Serializable snapshot,
java.lang.Object statistics) |
Aggregate an existing
IOStatisticsSnapshot with
the supplied statistics. |
java.io.Serializable |
iostatisticsSnapshot_create() |
Create a new
IOStatisticsSnapshot instance. |
java.io.Serializable |
iostatisticsSnapshot_create(java.lang.Object source) |
Create a new
IOStatisticsSnapshot instance. |
java.io.Serializable |
iostatisticsSnapshot_fromJsonString(java.lang.String json) |
Load IOStatisticsSnapshot from a JSON string.
|
java.io.Serializable |
iostatisticsSnapshot_load(FileSystem fs,
Path path) |
Load IOStatisticsSnapshot from a Hadoop filesystem.
|
java.io.Serializable |
iostatisticsSnapshot_retrieve(java.lang.Object source) |
Extract the IOStatistics from an object in a serializable form.
|
void |
iostatisticsSnapshot_save(java.io.Serializable snapshot,
FileSystem fs,
Path path,
boolean overwrite) |
Save IOStatisticsSnapshot to a Hadoop filesystem as a JSON file.
|
java.lang.String |
iostatisticsSnapshot_toJsonString(java.io.Serializable snapshot) |
Save IOStatisticsSnapshot to a JSON string.
|
boolean |
isIOStatistics(java.lang.Object object) |
Probe for an object being an instance of
IOStatisticsSource. |
boolean |
isIOStatisticsSnapshot(java.io.Serializable object) |
Probe for an object being an instance of
IOStatisticsSnapshot. |
boolean |
isIOStatisticsSource(java.lang.Object object) |
Probe for an object being an instance of
IOStatisticsSource. |
boolean |
loaded() |
Is the wrapped statistics class loaded?
|
java.lang.String |
toString() |
public static final java.lang.String WRAPPED_STATISTICS_CLASSNAME
public static final java.lang.String IS_IOSTATISTICS_SOURCE
public static final java.lang.String IS_IOSTATISTICS
public static final java.lang.String IS_IOSTATISTICS_SNAPSHOT
public static final java.lang.String IOSTATISTICS_CONTEXT_AGGREGATE
public static final java.lang.String IOSTATISTICS_CONTEXT_ENABLED
public static final java.lang.String IOSTATISTICS_CONTEXT_GET_CURRENT
public static final java.lang.String IOSTATISTICS_CONTEXT_SET_THREAD_CONTEXT
public static final java.lang.String IOSTATISTICS_CONTEXT_RESET
public static final java.lang.String IOSTATISTICS_CONTEXT_SNAPSHOT
public static final java.lang.String IOSTATISTICS_SNAPSHOT_AGGREGATE
public static final java.lang.String IOSTATISTICS_SNAPSHOT_CREATE
public static final java.lang.String IOSTATISTICS_SNAPSHOT_FROM_JSON_STRING
public static final java.lang.String IOSTATISTICS_SNAPSHOT_LOAD
public static final java.lang.String IOSTATISTICS_SNAPSHOT_RETRIEVE
public static final java.lang.String IOSTATISTICS_SNAPSHOT_SAVE
public static final java.lang.String IOSTATISTICS_SNAPSHOT_TO_JSON_STRING
public static final java.lang.String IOSTATISTICS_TO_PRETTY_STRING
public static final java.lang.String IOSTATISTICS_COUNTERS
public static final java.lang.String IOSTATISTICS_GAUGES
public static final java.lang.String IOSTATISTICS_MINIMUMS
public static final java.lang.String IOSTATISTICS_MAXIMUMS
public static final java.lang.String IOSTATISTICS_MEANS
public DynamicWrappedStatistics()
public DynamicWrappedStatistics(java.lang.String classname)
public boolean loaded()
public boolean ioStatisticsAvailable()
public boolean ioStatisticsContextAvailable()
public boolean isIOStatisticsSource(java.lang.Object object)
IOStatisticsSource.object - object to probepublic boolean isIOStatistics(java.lang.Object object)
IOStatisticsSource.object - object to probepublic boolean isIOStatisticsSnapshot(java.io.Serializable object)
IOStatisticsSnapshot.object - object to probepublic boolean iostatisticsContext_enabled()
public java.lang.Object iostatisticsContext_getCurrent()
throws java.lang.UnsupportedOperationException
IOStatisticsContext which
implements IOStatisticsSource.
This is either a thread-local value or a global empty context.IOStatisticsContext.java.lang.UnsupportedOperationException - if the IOStatisticsContext API was not foundpublic void iostatisticsContext_setThreadIOStatisticsContext(@Nullable
java.lang.Object statisticsContext)
throws java.lang.UnsupportedOperationException
statisticsContext - IOStatistics context instance for the
current thread. If null, the context is reset.java.lang.UnsupportedOperationException - if the IOStatisticsContext API was not foundpublic void iostatisticsContext_reset()
throws java.lang.UnsupportedOperationException
IOStatisticsContext#reset()java.lang.UnsupportedOperationException - if the IOStatisticsContext API was not foundpublic java.io.Serializable iostatisticsContext_snapshot()
throws java.lang.UnsupportedOperationException
IOStatisticsContext#snapshot()IOStatisticsSnapshot.java.lang.UnsupportedOperationException - if the IOStatisticsContext API was not foundpublic boolean iostatisticsContext_aggregate(java.lang.Object source)
Returns false if the source is null or does not contain any statistics.
source - implementation of IOStatisticsSource or IOStatisticspublic boolean iostatisticsSnapshot_aggregate(java.io.Serializable snapshot,
@Nullable
java.lang.Object statistics)
throws java.lang.UnsupportedOperationException
IOStatisticsSnapshot with
the supplied statistics.snapshot - snapshot to updatestatistics - IOStatistics to addjava.lang.IllegalArgumentException - if the statistics argument is not
null but not an instance of IOStatistics, or if snapshot is invalid.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.io.Serializable iostatisticsSnapshot_create()
throws java.lang.UnsupportedOperationException
IOStatisticsSnapshot instance.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.io.Serializable iostatisticsSnapshot_create(@Nullable
java.lang.Object source)
throws java.lang.UnsupportedOperationException,
java.lang.ClassCastException
IOStatisticsSnapshot instance.source - optional source statisticsjava.lang.ClassCastException - if the source is not valid.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.lang.String iostatisticsSnapshot_toJsonString(@Nullable
java.io.Serializable snapshot)
throws java.io.UncheckedIOException,
java.lang.UnsupportedOperationException
snapshot - statistics; may be null or of an incompatible typejava.io.UncheckedIOException - Any IO/jackson exception.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.io.Serializable iostatisticsSnapshot_fromJsonString(java.lang.String json)
throws java.io.UncheckedIOException,
java.lang.UnsupportedOperationException
json - JSON string value.java.io.UncheckedIOException - Any IO/jackson exception.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.io.Serializable iostatisticsSnapshot_load(FileSystem fs, Path path) throws java.io.UncheckedIOException, java.lang.UnsupportedOperationException
fs - filesystempath - pathjava.io.UncheckedIOException - Any IO exception.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.io.Serializable iostatisticsSnapshot_retrieve(@Nullable
java.lang.Object source)
throws java.lang.UnsupportedOperationException
source - source object, may be null/not a statistics source/instanceIOStatisticsSnapshot or null if the object is null/doesn't have statisticsjava.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic void iostatisticsSnapshot_save(@Nullable
java.io.Serializable snapshot,
FileSystem fs,
Path path,
boolean overwrite)
throws java.io.UncheckedIOException,
java.lang.UnsupportedOperationException
snapshot - statisticsfs - filesystempath - pathoverwrite - should any existing file be overwritten?java.io.UncheckedIOException - Any IO exception.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.util.Map<java.lang.String,java.lang.Long> iostatistics_counters(java.io.Serializable source)
source - source of statistics.public java.util.Map<java.lang.String,java.lang.Long> iostatistics_gauges(java.io.Serializable source)
source - source of statistics.public java.util.Map<java.lang.String,java.lang.Long> iostatistics_minimums(java.io.Serializable source)
source - source of statistics.public java.util.Map<java.lang.String,java.lang.Long> iostatistics_maximums(java.io.Serializable source)
source - source of statistics.public java.util.Map<java.lang.String,java.util.Map.Entry<java.lang.Long,java.lang.Long>> iostatistics_means(java.io.Serializable source)
source - source of statistics.public java.lang.String iostatistics_toPrettyString(java.lang.Object statistics)
statistics - A statistics instance.java.lang.UnsupportedOperationException - if the IOStatistics classes were not foundpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.