Record Class MetricsReportEnvelope
java.lang.Object
java.lang.Record
org.apache.polaris.service.metrics.MetricsReportEnvelope
- Record Components:
catalogName- the name of the catalog containing the tablecatalogId- the internal Polaris ID of the catalogtable- the identifier of the table the metrics are fortableId- the internal Polaris ID of the table entitymetricType- the kind of metrics report (MetricType.SCANorMetricType.COMMIT)report- the Iceberg metrics report (ScanReportorCommitReport)receivedTimestamp- the timestamp when the metrics were received by Polaris
@Beta
public record MetricsReportEnvelope(@NonNull String catalogName, long catalogId, @NonNull org.apache.iceberg.catalog.TableIdentifier table, long tableId, @NonNull MetricType metricType, @NonNull org.apache.iceberg.metrics.MetricsReport report, @NonNull Instant receivedTimestamp)
extends Record
Stable, self-describing carrier for an Iceberg metrics report received by Polaris.
Bundles the resolved table context (catalog name/id and table name/id) with the raw Iceberg
MetricsReport and an explicit MetricType discriminator, plus the timestamp when
the metrics were received. Passing an envelope keeps the IcebergMetricsReporter SPI
signature stable as new context fields are added, and lets implementations branch on metricType() without inspecting the concrete Iceberg report type.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsReportEnvelope(@NonNull String catalogName, long catalogId, @NonNull org.apache.iceberg.catalog.TableIdentifier table, long tableId, @NonNull MetricType metricType, @NonNull org.apache.iceberg.metrics.MetricsReport report, @NonNull Instant receivedTimestamp) Creates an instance of aMetricsReportEnveloperecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecatalogIdrecord component.@NonNull StringReturns the value of thecatalogNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull MetricTypeReturns the value of themetricTyperecord component.@NonNull InstantReturns the value of thereceivedTimestamprecord component.@NonNull org.apache.iceberg.metrics.MetricsReportreport()Returns the value of thereportrecord component.@NonNull org.apache.iceberg.catalog.TableIdentifiertable()Returns the value of thetablerecord component.longtableId()Returns the value of thetableIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetricsReportEnvelope
public MetricsReportEnvelope(@NonNull String catalogName, long catalogId, @NonNull org.apache.iceberg.catalog.TableIdentifier table, long tableId, @NonNull MetricType metricType, @NonNull org.apache.iceberg.metrics.MetricsReport report, @NonNull Instant receivedTimestamp) Creates an instance of aMetricsReportEnveloperecord class.- Parameters:
catalogName- the value for thecatalogNamerecord componentcatalogId- the value for thecatalogIdrecord componenttable- the value for thetablerecord componenttableId- the value for thetableIdrecord componentmetricType- the value for themetricTyperecord componentreport- the value for thereportrecord componentreceivedTimestamp- the value for thereceivedTimestamprecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
catalogName
Returns the value of thecatalogNamerecord component.- Returns:
- the value of the
catalogNamerecord component
-
catalogId
public long catalogId()Returns the value of thecatalogIdrecord component.- Returns:
- the value of the
catalogIdrecord component
-
table
public @NonNull org.apache.iceberg.catalog.TableIdentifier table()Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
tableId
public long tableId()Returns the value of thetableIdrecord component.- Returns:
- the value of the
tableIdrecord component
-
metricType
Returns the value of themetricTyperecord component.- Returns:
- the value of the
metricTyperecord component
-
report
public @NonNull org.apache.iceberg.metrics.MetricsReport report()Returns the value of thereportrecord component.- Returns:
- the value of the
reportrecord component
-
receivedTimestamp
Returns the value of thereceivedTimestamprecord component.- Returns:
- the value of the
receivedTimestamprecord component
-