You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Lijie Wang (Jira)" <ji...@apache.org> on 2022/03/01 09:29:00 UTC

[jira] [Updated] (FLINK-26330) Test Adaptive Batch Scheduler manually

     [ https://issues.apache.org/jira/browse/FLINK-26330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lijie Wang updated FLINK-26330:
-------------------------------
    Description: 
Documentation: [https://github.com/apache/flink/pull/18757]

Run DataStream / SQL batch jobs with Adaptive Batch Scheduler and verifiy:

1. Whether the automatically determined parallelism is correct
2. Whether the job result is correct

 

A simple DataStream example as follow:
{code:java}
final Configuration configuration = new Configuration();
configuration.set(
        JobManagerOptions.SCHEDULER, JobManagerOptions.SchedulerType.AdaptiveBatch);
configuration.setInteger(
        JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_MAX_PARALLELISM, 4);
configuration.set(
        JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_DATA_VOLUME_PER_TASK,
        MemorySize.parse("8kb"));
configuration.setInteger("parallelism.default", -1);

final StreamExecutionEnvironment env =
        StreamExecutionEnvironment.createLocalEnvironment(configuration);
env.setRuntimeMode(RuntimeExecutionMode.BATCH);

env.fromSequence(0, 1000).setParallelism(1)
        .keyBy(num -> num % 10)
        .sum(0)
        .addSink(new PrintSinkFunction<>());

env.execute(); {code}
You can run it and check:
 
1. The parallelism of "Keyed Aggregation -> Sink: Unnamed" should be 3. Jobmanager log show following logs:
{code:java}
Parallelism of JobVertex: Keyed Aggregation -> Sink: Unnamed (20ba6b65f97481d5570070de90e4e791) is decided to be 3. {code}
2. The job result should be:
{code:java}
50500
49600
49700
49800
49900
50000
50100
50200
50300
50400 {code}

  was:
Documentation: [https://github.com/apache/flink/pull/18757]

 

Run DataStream / SQL batch jobs with Adaptive Batch Scheduler and verifiy:

1. Whether the automatically determined parallelism is correct
2. Whether the job result is correct


> Test Adaptive Batch Scheduler manually
> --------------------------------------
>
>                 Key: FLINK-26330
>                 URL: https://issues.apache.org/jira/browse/FLINK-26330
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>            Reporter: Lijie Wang
>            Assignee: Matthias Pohl
>            Priority: Blocker
>              Labels: release-testing
>             Fix For: 1.15.0
>
>
> Documentation: [https://github.com/apache/flink/pull/18757]
> Run DataStream / SQL batch jobs with Adaptive Batch Scheduler and verifiy:
> 1. Whether the automatically determined parallelism is correct
> 2. Whether the job result is correct
>  
> A simple DataStream example as follow:
> {code:java}
> final Configuration configuration = new Configuration();
> configuration.set(
>         JobManagerOptions.SCHEDULER, JobManagerOptions.SchedulerType.AdaptiveBatch);
> configuration.setInteger(
>         JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_MAX_PARALLELISM, 4);
> configuration.set(
>         JobManagerOptions.ADAPTIVE_BATCH_SCHEDULER_DATA_VOLUME_PER_TASK,
>         MemorySize.parse("8kb"));
> configuration.setInteger("parallelism.default", -1);
> final StreamExecutionEnvironment env =
>         StreamExecutionEnvironment.createLocalEnvironment(configuration);
> env.setRuntimeMode(RuntimeExecutionMode.BATCH);
> env.fromSequence(0, 1000).setParallelism(1)
>         .keyBy(num -> num % 10)
>         .sum(0)
>         .addSink(new PrintSinkFunction<>());
> env.execute(); {code}
> You can run it and check:
>  
> 1. The parallelism of "Keyed Aggregation -> Sink: Unnamed" should be 3. Jobmanager log show following logs:
> {code:java}
> Parallelism of JobVertex: Keyed Aggregation -> Sink: Unnamed (20ba6b65f97481d5570070de90e4e791) is decided to be 3. {code}
> 2. The job result should be:
> {code:java}
> 50500
> 49600
> 49700
> 49800
> 49900
> 50000
> 50100
> 50200
> 50300
> 50400 {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)