-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Exercise Python PVR tests on Flink 2.0 #37313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "comment": "Modify this file in a trivial way to cause this test suite to run", | ||
| "modification": 1, | ||
| "modification": 2, | ||
| "https://github.com/apache/beam/pull/32440": "testing datastream optimizations", | ||
| "https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "modification": "#37313" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,5 +56,4 @@ shadowJar { | |
| manifest { | ||
| attributes(["Multi-Release": true]) | ||
| } | ||
| outputs.upToDateWhen { false } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a workaround leftover for corrupted remote Gradle cache, could cause elevated compile time. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
|
|
||
| import argparse | ||
| import logging | ||
| import platform | ||
| import shlex | ||
| import typing | ||
| import unittest | ||
|
|
@@ -139,6 +140,7 @@ def _create_conf_dir(cls): | |
| cls.test_metrics_path = path.join(cls.conf_dir, 'test-metrics.txt') | ||
|
|
||
| # path to write Flink configuration to | ||
| # Flink 1.x conf: | ||
| conf_path = path.join(cls.conf_dir, 'flink-conf.yaml') | ||
| file_reporter = 'org.apache.beam.runners.flink.metrics.FileReporter' | ||
| with open(conf_path, 'w') as f: | ||
|
|
@@ -149,6 +151,19 @@ def _create_conf_dir(cls): | |
| 'metrics.reporter.file.path: %s' % cls.test_metrics_path, | ||
| 'metrics.scope.operator: <operator_name>', | ||
| ])) | ||
| # Flink 2.x conf: | ||
| conf_path_2 = path.join(cls.conf_dir, 'config.yaml') | ||
| with open(conf_path_2, 'w') as f: | ||
| f.write( | ||
| '''metrics: | ||
| reporters: file | ||
| reporter: | ||
| file: | ||
| class: %s | ||
| path: %s | ||
| scope: | ||
| operator: <operator_name> | ||
| ''' % (file_reporter, cls.test_metrics_path)) | ||
|
|
||
| @classmethod | ||
| def _subprocess_command(cls, job_port, expansion_port): | ||
|
|
@@ -158,15 +173,19 @@ def _subprocess_command(cls, job_port, expansion_port): | |
|
|
||
| cls._create_conf_dir() | ||
| cls.expansion_port = expansion_port | ||
|
|
||
| platform_specific_opts = [] | ||
| if platform.system() == 'Linux': | ||
| # UseContainerSupport is supported in Linux and turned on by default | ||
| platform_specific_opts.append('-XX:-UseContainerSupport') | ||
| try: | ||
| return [ | ||
| 'java', | ||
| '-XX:-UseContainerSupport', | ||
| return ['java'] + platform_specific_opts + [ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix flink_runner_test on MacOS (and persumably windows) |
||
| '--add-opens=java.base/java.lang=ALL-UNNAMED', | ||
| '--add-opens=java.base/java.nio=ALL-UNNAMED', | ||
| '--add-opens=java.base/java.util=ALL-UNNAMED', | ||
| '-Dorg.slf4j.simpleLogger.defaultLogLevel=warn', | ||
| '-Dslf4j.provider=org.slf4j.simple.SimpleServiceProvider', | ||
| '-Dorg.slf4j.simpleLogger.log.org.apache.flink.metrics=error', | ||
| '-Dorg.slf4j.simpleLogger.log.org.apache.flink.runtime=error', | ||
| '-Dorg.slf4j.simpleLogger.log.org.apache.flink.streaming=error', | ||
| '-jar', | ||
| cls.flink_job_server_jar, | ||
| '--flink-master', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOOPBACK for both Flink 1.20 and Flink 2.0 already have coverage, dedup'd here