-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from getindata/release-1.10.0
Release 1.10.0
- Loading branch information
Showing
20 changed files
with
362 additions
and
23 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
import importlib.resources as pkg_resources | ||
from pathlib import Path | ||
from typing import Optional | ||
|
||
from streamingcli.project import templates | ||
|
||
|
||
class TemplateLoader: | ||
@staticmethod | ||
def load_project_template(template_name: str) -> str: | ||
template = pkg_resources.read_text(templates, template_name) | ||
template = TemplateLoader.try_to_load_text_from_packages( | ||
template_name | ||
) or TemplateLoader.try_to_load_text_from_path(template_name) | ||
if template is None: | ||
raise ValueError(f"Could not read file for name: {template_name}") | ||
return template | ||
|
||
@staticmethod | ||
def copy_binary(file_name: str, target_path: str) -> None: | ||
file_content = pkg_resources.read_binary(templates, file_name) | ||
with open(target_path, "wb") as target_file: | ||
target_file.write(file_content) | ||
|
||
@staticmethod | ||
def try_to_load_text_from_packages(name: str) -> Optional[str]: | ||
try: | ||
return pkg_resources.read_text(templates, name) | ||
except ValueError: | ||
return None | ||
|
||
@staticmethod | ||
def try_to_load_text_from_path(name: str) -> Optional[str]: | ||
try: | ||
return Path(name).absolute().read_text() | ||
except OSError: | ||
return None |
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
50 changes: 50 additions & 0 deletions
50
tests/streamingcli/resources/platform/vvp/custom_vvp_flink_deployment_template.yml
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,50 @@ | ||
metadata: | ||
displayName: {{project_name}} | ||
name: {{project_name}} | ||
spec: | ||
deploymentTargetName: {{ververica_deployment_target}} | ||
maxJobCreationAttempts: 4 | ||
maxSavepointCreationAttempts: 4 | ||
restoreStrategy: | ||
allowNonRestoredState: false | ||
kind: LATEST_STATE | ||
state: RUNNING | ||
template: | ||
metadata: | ||
annotations: | ||
flink.queryable-state.enabled: 'false' | ||
flink.security.ssl.enabled: 'false' | ||
spec: | ||
artifact: | ||
flinkImageRegistry: {{docker_registry_url}} | ||
flinkImageRepository: {{project_name}} | ||
flinkImageTag: {{docker_image_tag}} | ||
flinkVersion: '1.16' | ||
kind: JAR | ||
jarUri: 'file:///opt/flink/opt/flink-python-1.16.0.jar' | ||
entryClass: org.apache.flink.client.python.PythonDriver | ||
mainArgs: '--python /app/src/flink_app.py' | ||
flinkConfiguration: | ||
execution.checkpointing.externalized-checkpoint-retention: RETAIN_ON_CANCELLATION | ||
execution.checkpointing.interval: 10s | ||
execution.checkpointing.min-pause: 10s | ||
high-availability: vvp-kubernetes | ||
metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter | ||
state.backend: filesystem | ||
taskmanager.memory.managed.fraction: '0.0' | ||
taskmanager.numberOfTaskSlots: '1' | ||
web.cancel.enable: 'false' | ||
logging: | ||
log4jLoggers: | ||
'': INFO | ||
loggingProfile: default | ||
parallelism: 1 | ||
resources: | ||
jobmanager: | ||
cpu: 1 | ||
memory: 1G | ||
taskmanager: | ||
cpu: 1 | ||
memory: 1G | ||
upgradeStrategy: | ||
kind: STATEFUL |
Oops, something went wrong.