Skip to content
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

[FLINK-31947] enable stdout for flink-console.sh #22491

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuangZhenQiu
Copy link
Contributor

What is the purpose of the change

Add stdout redirection in flink-console.sh, so that flink Kubernetes applications can fetch the stdout log in web ui.

Brief change log

  • simply change on flink-console.sh

Verifying this change

Verified end to end with local build and Flink web UI in Kubernetes env.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 26, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@@ -116,4 +117,5 @@ echo $$ >> "$pid" 2>/dev/null
# Evaluate user options for local variable expansion
FLINK_ENV_JAVA_OPTS=$(eval echo ${FLINK_ENV_JAVA_OPTS})

exec 1>"${out}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we are using log4j-console.properties for the log configuration, all the Flink logs will also be mirrored to the stdout. Then we will have duplicated logs for *.log and *.out.

Actually, we already have some discussion about the .out file in this PR #11839.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file size of redirection is a concern from community. It makes sense to me. The lack of out file from web was reported by our internal users who use stream.print() to verify some execution result. Given stream.print() is a supported functionality, l feel it is a kind of lacking integrity if flink on k8s behaves differently with flink on yarn. Shall we revisit the problem together with Till and Zentol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants