Class MetricKey.Builder

  • Enclosing class:
    MetricKey

    public static final class MetricKey.Builder
    extends java.lang.Object
    Builder to create MetricKey instances. Note that, Builder.build() will throw exception if there is an existing Metric built with the same name.
    • Constructor Detail

      • Builder

        public Builder​(java.lang.String name)
        Parameters:
        name - name of the Metric
    • Method Detail

      • setName

        public MetricKey.Builder setName​(java.lang.String name)
        Parameters:
        name - name for the Metric
        Returns:
        the updated builder instance
      • setDescription

        public MetricKey.Builder setDescription​(java.lang.String description)
        Parameters:
        description - of the Metric
        Returns:
        the updated builder instance
      • setIsClusterAggregated

        public MetricKey.Builder setIsClusterAggregated​(boolean isClusterAggregated)
        Parameters:
        isClusterAggregated - whether this metric can be aggregated at cluster level
        Returns:
        the updated builder instance
      • setMetricType

        public MetricKey.Builder setMetricType​(alluxio.grpc.MetricType metricType)
        Parameters:
        metricType - the metric type of this metric
        Returns:
        the updated builder instance
      • build

        public MetricKey build()
        Creates and registers the Metric key.
        Returns:
        the created Metric key instance