Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13406

MetricConfig.getInteger() always returns null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.6.3
    • Fix Version/s: None
    • Component/s: Runtime / Metrics
    • Labels:
      None

      Description

      MetricConfig's getInteger will always return the default value.

      The reason is, since it delegates to Java's Properties.getProperty which returns null if the type of the value is not String.

      Reproduce

      1. Create a class MyReporter implementing MetricReporter
      2. Implment the open() method so that you do config.getInteger("foo", null)
      3. Start an ExecutionEnvironment with and give it the following Configuration object:
      configuration.setString("metrics.reporters", "my");
      configuration.setClass("metrics.reporter.my.class", MyReporter.class)
      configuration.setInteger("metrics.reporter.my.foo", 42);
      1. In open() the value of foo is null.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oripwk Ori Popowski
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: