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

Split MiniClusterResource to be usable in runtime/streaming-java/clients

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: API / DataStream, Tests
    • Labels:
      None

      Description

      Problem

      The MiniClusterResource is a utility class to create and manage flink clusters for testing purposes. It is incredibly convenient, but unfortunately resides in flink-test-utils which depends on flink-runtime, flink-streaming-java and flink-clients, making the class not usable in these modules.

      The current version does require these dependencies, but only for specific, optional, parts. streaming-java is only required for accessing TestStreamEnvironment and flink-clients only for tests that want to work against a ClusterClient.

      Proposal

      Split the MiniClusterResource as follows:

      1)

      Remove client/streaming-java dependent parts and move the class to flink-runtime.

      2)

      Add a new class StreamingMiniClusterResourceExtension that accepts a MiniClusterResource as an argument and contains the streaming parts.
      Usage would look like this:

      private final MiniClusterResource cluster = ...
      private final StreamingMiniClusterResourceExtension ext = new StreamingMiniClusterResourceExtension(cluster);
      
      @Rule
      public RuleChain chain= RuleChain
      	.outerRule(cluster) 
      	.around(ext),
      
      3)

      Add a new class ClientMiniClusterResourceExtension that accepts a MiniClusterResource as an argument and contains the client parts.
      Usage would look like this:

      private final MiniClusterResource cluster = ...
      private final ClientMiniClusterResourceExtensionext = new ClientMiniClusterResourceExtension(cluster);
      
      @Rule
      public RuleChain chain= RuleChain
      	.outerRule(cluster) 
      	.around(ext),
      

      [~till.rohrmann] WDYT?

        Attachments

          Activity

            People

            • Assignee:
              chesnay Chesnay Schepler
              Reporter:
              chesnay Chesnay Schepler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: