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

DisableAutoGeneratedUIDs fails on keyBy

    XMLWordPrintableJSON

    Details

      Description

      There doesn't seem to be a way to add a UID to the Partition operator created by KeyBy, causing `disableAutoGeneratedUIDs` to fail.

       

      Here's a simple test case that will reproduce the issue:

       @Test
      public void testFailedUID() throws Exception {
          StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
          env.getConfig().disableAutoGeneratedUIDs();
      
          DataStream<String> data = env.fromCollection(Arrays.asList("1", "2", "3")).uid("source-uid");
          data.keyBy(i -> i)
                  .map(i -> i).uid("map-uid");
      
          env.execute();
      }
      testFailedUID(twitch.creatoranalytics.sessions.StreamingJobTest)  Time elapsed: 0.008 sec  <<< ERROR!
      java.lang.IllegalStateException: Auto generated UIDs have been disabled but no UID or hash has been assigned to operator Partition
       

       

      This passes if the keyBy is removed. 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dwysakowicz Dawid Wysakowicz
                Reporter:
                wilcheng William Cheng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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