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

Use MemorySize type instead of String type for memory ConfigOption in ExecutionConfigOptions

    XMLWordPrintableJSON

    Details

      Description

      Currently, There are memory ConfigOptions in ExecutionConfigOptions such as table.exec.resource.external-buffer-memory, table.exec.resource.hash-agg.memory. They are all String type now. While when we need to get the memory size value, the String value should be converted to MemorySize type and then getting bytes value. Code likes:

      val memoryBytes = MemorySize.parse(config.getConfiguration.getString(
            ExecutionConfigOptions.TABLE_EXEC_RESOURCE_HASH_AGG_MEMORY)).getBytes
      

      The above code can be simplified if we change the ConfigOption type from String to MemorySize type. Many runtime ConfigOption s also use MemorySize type to define memory config. So I suggest we use MemorySize type instead of String type for memory ConfigOption in ExecutionConfigOptions.

      Note: this is an incompatible change.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                873925389@qq.com jiawen xiao
                Reporter:
                godfreyhe godfrey he
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: