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-15488] Obtain the JVM and TM param correctly #10804

Closed
wants to merge 1 commit into from

Conversation

KarmaGYZ
Copy link
Contributor

@KarmaGYZ KarmaGYZ commented Jan 9, 2020

What is the purpose of the change

When using logback it is not possible to start the taskmanager using taskamanger.sh scripts. To fix this issue, we need to make a contract that the calculation result is always outputted in the last line and in specific format. Then, we can fetch and verify it even when the log is redirected to console.

Brief change log

  • Introduce a prefix to the calculation result of BashJavaUtils class
  • Fetch the calculation result and ignore side output.
  • Fail the script when error occurs during calculation.

Verifying this change

  1. Using logback, you could follow this guide

  2. Start a TaskExecutor by ${FLINK_DIR}/bin/taskmanager.sh

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, Yarn/Mesos, ZooKeeper: yes
  • The S3 file system connector: no

Documentation

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

@KarmaGYZ
Copy link
Contributor Author

KarmaGYZ commented Jan 9, 2020

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 9, 2020

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 1bdc001 (Thu Jan 09 05:40:15 UTC 2020)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 9, 2020

CI report:

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

Copy link
Contributor

@xintongsong xintongsong left a comment

Choose a reason for hiding this comment

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

Thanks for opening the PR, @KarmaGYZ.
I left some comments.

flink-dist/src/main/flink-bin/bin/config.sh Outdated Show resolved Hide resolved
flink-dist/src/main/flink-bin/bin/config.sh Outdated Show resolved Hide resolved
@GJL GJL self-assigned this Jan 9, 2020
@KarmaGYZ
Copy link
Contributor Author

KarmaGYZ commented Jan 9, 2020

Thanks for the review @xintongsong . PR updated.

@KarmaGYZ KarmaGYZ force-pushed the FLINK-15488-basic branch 2 times, most recently from 6c0d003 to a3a5ebe Compare January 9, 2020 12:32
Copy link
Member

@GJL GJL left a comment

Choose a reason for hiding this comment

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

LGTM. I have left some minor suggestions.

flink-dist/src/main/flink-bin/bin/config.sh Outdated Show resolved Hide resolved
flink-dist/src/main/flink-bin/bin/config.sh Outdated Show resolved Hide resolved
sb.append(s);
}
return sb.toString();
return IOUtils.toString(process.getInputStream());
Copy link
Member

Choose a reason for hiding this comment

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

Should have been a separate commit but you don't need to fix it.

@GJL
Copy link
Member

GJL commented Jan 10, 2020

LGTM. Merging

GJL pushed a commit to GJL/flink that referenced this pull request Jan 10, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes apache#10804.
GJL pushed a commit to GJL/flink that referenced this pull request Jan 10, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes apache#10804.
GJL pushed a commit to GJL/flink that referenced this pull request Jan 10, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes apache#10804.
GJL pushed a commit to GJL/flink that referenced this pull request Jan 12, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes apache#10804.
GJL pushed a commit to GJL/flink that referenced this pull request Jan 12, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes apache#10804.
GJL pushed a commit that referenced this pull request Jan 13, 2020
This avoids that log messages to stdout intermingle with BashJavaUtils'
computation result which is also printed to stdout.

This closes #10804.
@GJL GJL closed this in d76f216 Jan 13, 2020
@KarmaGYZ KarmaGYZ deleted the FLINK-15488-basic branch January 13, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants