-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add support for Flink 1.19 #32648
Merged
Merged
Add support for Flink 1.19 #32648
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"comment": "Modify this file in a trivial way to cause this test suite to run", | ||
"modification": 1 | ||
"modification": 1, | ||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
3 changes: 3 additions & 0 deletions
3
.github/trigger_files/beam_PostCommit_Java_Examples_Flink.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"https://github.com/apache/beam/pull/32648": "testing flink 1.19 support" | ||
} |
3 changes: 3 additions & 0 deletions
3
.github/trigger_files/beam_PostCommit_Java_Jpms_Flink_Java11.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"https://github.com/apache/beam/pull/32648": "testing flink 1.19 support" | ||
} |
3 changes: 2 additions & 1 deletion
3
.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Flink.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"comment": "Modify this file in a trivial way to cause this test suite to run", | ||
"https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test" | ||
"https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test", | ||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
3 changes: 2 additions & 1 deletion
3
.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Flink_Java11.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"comment": "Modify this file in a trivial way to cause this test suite to run", | ||
"https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test" | ||
"https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test", | ||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
4 changes: 4 additions & 0 deletions
4
.github/trigger_files/beam_PostCommit_Java_ValidatesRunner_Flink_Java8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
|
||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"https://github.com/apache/beam/pull/32648": "testing addition of Flink 1.19 support" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...1.15/src/test/java/org/apache/beam/runners/flink/streaming/MemoryStateBackendWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.beam.runners.flink.streaming; | ||
|
||
import java.util.Collection; | ||
import org.apache.flink.api.common.JobID; | ||
import org.apache.flink.api.common.typeutils.TypeSerializer; | ||
import org.apache.flink.core.fs.CloseableRegistry; | ||
import org.apache.flink.metrics.MetricGroup; | ||
import org.apache.flink.runtime.execution.Environment; | ||
import org.apache.flink.runtime.query.TaskKvStateRegistry; | ||
import org.apache.flink.runtime.state.AbstractKeyedStateBackend; | ||
import org.apache.flink.runtime.state.BackendBuildingException; | ||
import org.apache.flink.runtime.state.KeyGroupRange; | ||
import org.apache.flink.runtime.state.KeyedStateHandle; | ||
import org.apache.flink.runtime.state.OperatorStateBackend; | ||
import org.apache.flink.runtime.state.OperatorStateHandle; | ||
import org.apache.flink.runtime.state.memory.MemoryStateBackend; | ||
import org.apache.flink.runtime.state.ttl.TtlTimeProvider; | ||
|
||
class MemoryStateBackendWrapper { | ||
static <K> AbstractKeyedStateBackend<K> createKeyedStateBackend( | ||
Environment env, | ||
JobID jobID, | ||
String operatorIdentifier, | ||
TypeSerializer<K> keySerializer, | ||
int numberOfKeyGroups, | ||
KeyGroupRange keyGroupRange, | ||
TaskKvStateRegistry kvStateRegistry, | ||
TtlTimeProvider ttlTimeProvider, | ||
MetricGroup metricGroup, | ||
Collection<KeyedStateHandle> stateHandles, | ||
CloseableRegistry cancelStreamRegistry) | ||
throws BackendBuildingException { | ||
|
||
MemoryStateBackend backend = new MemoryStateBackend(); | ||
return backend.createKeyedStateBackend( | ||
env, | ||
jobID, | ||
operatorIdentifier, | ||
keySerializer, | ||
numberOfKeyGroups, | ||
keyGroupRange, | ||
kvStateRegistry, | ||
ttlTimeProvider, | ||
metricGroup, | ||
stateHandles, | ||
cancelStreamRegistry); | ||
} | ||
|
||
static OperatorStateBackend createOperatorStateBackend( | ||
Environment env, | ||
String operatorIdentifier, | ||
Collection<OperatorStateHandle> stateHandles, | ||
CloseableRegistry cancelStreamRegistry) | ||
throws Exception { | ||
MemoryStateBackend backend = new MemoryStateBackend(); | ||
return backend.createOperatorStateBackend( | ||
env, operatorIdentifier, stateHandles, cancelStreamRegistry); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* License); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an AS IS BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
project.ext { | ||
flink_major = '1.19' | ||
flink_version = '1.19.0' | ||
} | ||
|
||
// Load the main build script which contains all build logic. | ||
apply from: "../flink_runner.gradle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* License); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an AS IS BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
def basePath = '../../job-server-container' | ||
|
||
project.ext { | ||
resource_path = basePath | ||
} | ||
|
||
// Load the main build script which contains all build logic. | ||
apply from: "$basePath/flink_job_server_container.gradle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* License); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an AS IS BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
def basePath = '../../job-server' | ||
|
||
project.ext { | ||
// Look for the source code in the parent module | ||
main_source_dirs = ["$basePath/src/main/java"] | ||
test_source_dirs = ["$basePath/src/test/java"] | ||
main_resources_dirs = ["$basePath/src/main/resources"] | ||
test_resources_dirs = ["$basePath/src/test/resources"] | ||
archives_base_name = 'beam-runners-flink-1.19-job-server' | ||
} | ||
|
||
// Load the main build script which contains all build logic. | ||
apply from: "$basePath/flink_job_server.gradle" |
80 changes: 80 additions & 0 deletions
80
...1.19/src/test/java/org/apache/beam/runners/flink/streaming/MemoryStateBackendWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.beam.runners.flink.streaming; | ||
|
||
import java.util.Collection; | ||
import org.apache.flink.api.common.JobID; | ||
import org.apache.flink.api.common.typeutils.TypeSerializer; | ||
import org.apache.flink.core.fs.CloseableRegistry; | ||
import org.apache.flink.metrics.MetricGroup; | ||
import org.apache.flink.runtime.execution.Environment; | ||
import org.apache.flink.runtime.query.TaskKvStateRegistry; | ||
import org.apache.flink.runtime.state.AbstractKeyedStateBackend; | ||
import org.apache.flink.runtime.state.BackendBuildingException; | ||
import org.apache.flink.runtime.state.KeyGroupRange; | ||
import org.apache.flink.runtime.state.KeyedStateBackendParametersImpl; | ||
import org.apache.flink.runtime.state.KeyedStateHandle; | ||
import org.apache.flink.runtime.state.OperatorStateBackend; | ||
import org.apache.flink.runtime.state.OperatorStateBackendParametersImpl; | ||
import org.apache.flink.runtime.state.OperatorStateHandle; | ||
import org.apache.flink.runtime.state.memory.MemoryStateBackend; | ||
import org.apache.flink.runtime.state.ttl.TtlTimeProvider; | ||
|
||
class MemoryStateBackendWrapper { | ||
static <K> AbstractKeyedStateBackend<K> createKeyedStateBackend( | ||
Environment env, | ||
JobID jobID, | ||
String operatorIdentifier, | ||
TypeSerializer<K> keySerializer, | ||
int numberOfKeyGroups, | ||
KeyGroupRange keyGroupRange, | ||
TaskKvStateRegistry kvStateRegistry, | ||
TtlTimeProvider ttlTimeProvider, | ||
MetricGroup metricGroup, | ||
Collection<KeyedStateHandle> stateHandles, | ||
CloseableRegistry cancelStreamRegistry) | ||
throws BackendBuildingException { | ||
|
||
MemoryStateBackend backend = new MemoryStateBackend(); | ||
return backend.createKeyedStateBackend( | ||
new KeyedStateBackendParametersImpl<>( | ||
env, | ||
jobID, | ||
operatorIdentifier, | ||
keySerializer, | ||
numberOfKeyGroups, | ||
keyGroupRange, | ||
kvStateRegistry, | ||
ttlTimeProvider, | ||
metricGroup, | ||
stateHandles, | ||
cancelStreamRegistry)); | ||
} | ||
|
||
static OperatorStateBackend createOperatorStateBackend( | ||
Environment env, | ||
String operatorIdentifier, | ||
Collection<OperatorStateHandle> stateHandles, | ||
CloseableRegistry cancelStreamRegistry) | ||
throws Exception { | ||
MemoryStateBackend backend = new MemoryStateBackend(); | ||
return backend.createOperatorStateBackend( | ||
new OperatorStateBackendParametersImpl( | ||
env, operatorIdentifier, stateHandles, cancelStreamRegistry)); | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unrelated, but these edits seem to be accumulating over time. Can we (probably in a different issue and PR) add a script that will just update some timestamp field of the json?
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.
Yea, we could. But TBH it kind of doesn't matter? The original idea is we would drop the commit before merging. But of course most people are not very careful about their commit history. Some people like to put a meaningless entry. I like to put an entry that describes the test so I don't mind if it gets checked in. We can also just trigger the tests by deleting all the entries, too.