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

Make `org.apache.flink.configuration.Configuration` support method chaining

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 1.9.1
    • None
    • None

    Description

      Goal:

      To make the following code examples work in production, which is very handy for users to set a couple of configurations: 

      // instantiate table environment
      TableEnvironment tEnv = ...tEnv.getConfig()        // access high-level configuration
        .getConfiguration()   // set low-level key-value options
        .setString("table.exec.mini-batch.enabled", "true")  // enable mini-batch optimization
        .setString("table.exec.mini-batch.allow-latency", "5 s") // use 5 seconds to buffer input records
        .setString("table.exec.mini-batch.size", "5000"); // the maximum number of records can be buffered by each aggregate operator task
      

       

      Suggestion:

      Currently, the return type of `setXXX` method is "void", we can make it return `Configuration` itself to support method chaining.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              victor-wong jiasheng55
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: