Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-36200 Breaking changes for Flink 3.0
  3. FLINK-6053

Gauge<T> should only take subclasses of Number, rather than everything

    XMLWordPrintableJSON

Details

    Description

      Currently, Flink's Gauge is defined as

      ```java
      public interface Gauge<T> extends Metric {
      T getValue();
      }
      ```

      But it doesn't make sense to have Gauge take generic types other than Number. And it blocks I from finishing FLINK-6013, because I cannot assume Gauge is only about Number. So the class should be like

      ```java
      public interface Gauge<T extends Number> extends Metric {
      T getValue();
      }
      ```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              phoenixjiangnan Bowen Li
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m