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

Expose setCurrentKey method to streamRuntimeContext

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      when we use reducing state / aggregating keyed state and so on , we have to read value from state backend and update the value with userFunction and then put back to state backend. If we can just cache certain data in heap with a map, and update once in snapshot method with

      snapshot() {
       for(Map.Entry<String, String> entry : map.entrySet()){
           setCurrentKey(entry.getKey());
           valueState.update(entry.getValue()); // put value back to state backend
      }}
      

      we just have to expose the setCurrentKey to userFunction and the will enable the ability to cache partitial keyedState in memory by userself.

      what's your opinion Stefan Richter Andrey Zagrebin ?

        Attachments

          Activity

            People

            • Assignee:
              aitozi Aitozi
              Reporter:
              aitozi Aitozi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: