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-18220][runtime] Extended OutOfMemoryError message. #13111

Closed
wants to merge 1 commit into from

Conversation

XComp
Copy link
Contributor

@XComp XComp commented Aug 10, 2020

What is the purpose of the change

  • Adding meaningful information to the error message of an OutOfMemoryError that happens while initializing or finalizing the an OutputFormat on the master.

Brief change log

  • Added OOM-enrichment to InputOutputFormatVertex.initializeOnMaster and InputOutputFormatVertex.finalizeOnMaster
  • Adapted signature of JobVertex.finalizeOnMaster and JobVertex.initializeOnMaster to indicate that not only Exceptions might occur.
  • ClusterEntrypointExceptionUtils and its method was made public
  • JavaDoc was fixed.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

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/Mesos, 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

@XComp
Copy link
Contributor Author

XComp commented Aug 10, 2020

@tillrohrmann The PR is ready to be reviewed.
I did a bit more than what was requested in FLINK-18220: Besides finalizing, I also added the enrichment method when initializing the OutputFormat. Is this ok or too much?

@flinkbot
Copy link
Collaborator

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 8401a49 (Mon Aug 10 21:18:21 UTC 2020)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

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 Aug 10, 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

@tillrohrmann tillrohrmann 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 creating this PR @XComp. I had a couple of comments. Please take a look.

Copy link
Contributor

@tillrohrmann tillrohrmann 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 updating this PR @XComp. I had a couple of comments. Please take a look.

Copy link
Contributor

@tillrohrmann tillrohrmann 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 updating the PR @XComp. The changes look good. I will resolve the comment about the missing license header while rebasing onto the latest master. Once AZP gives green light, I will merge the PR.

@@ -0,0 +1,48 @@
package org.apache.flink.runtime.entrypoint;
Copy link
Contributor

Choose a reason for hiding this comment

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

This file misses a license header:

/*
 * 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.
 */

…on information

Provide the user with hints how to configure Flink in order to increase the heap space
of the JobManager process in case that Java heap space OutOfMemory errors are encountered.

[FLINK-18220][runtime] Changed the visibility of ClusterEntryPointExceptionUtils and its utility method to enable using it also in other packages.

[FLINK-18220][runtime] Adapted signature of JobVertex.finalizeOnMaster and JobVertex.initializeOnMaster to indicate that not only Exceptions might occur.

[FLINK-18220][runtime] Added OOM-enrichment to InputOutputFormatVertex.initializeOnMaster and InputOutputFormatVertex.finalizeOnMaster.

[FLINK-18220][runtime] Extended ExceptionUtils adding a method for manipulating the error message within the cause tree of a passed Throwable.

More specifically, this method is used to change the message of a OutOfMemoryError buried within a Throwable's cause tree.

[FLINK-18220][runtime] Refactored newly added utility method by generalizing its purpose.

The previous version was referring to a concrete use case already which is not the purpose of ExceptionUtils. Corresponding testcases were added as well.

[FLINK-18220][runtime] Refactored newly added utility method by enabling to update multiple messages at once.

This way, we avoid traversing the cause tree multiple times.

[FLINK-18220][runtime] Made use of newly added ExceptionUtils.updateDetailMessage and cleaning up unused code.

[FLINK-18220][runtime] Refactored code to not support deleting an error message.

This was done in favor of simplifying the code over supporting a feature that was not requested.

[FLINK-18220][runtime] Fixed missed out compiler errors.

Revert "[FLINK-18220][runtime] Adapted signature of JobVertex.finalizeOnMaster and JobVertex.initializeOnMaster to indicate that not only Exceptions might occur."

This reverts commit dc23b3a.

[FLINK-18220][runtime] Moved OOM message handling into more exposed code segments.

[FLINK-18220][runtime] JavaDoc fix.

[FLINK-18220][runtime] Extended ExceptionUtils.tryEnrichOutOfMemoryError to cover also heap space-related OutOfMemoryErrors.

[FLINK-18220][runtime] Added error message for heap-space-related OutOfMemoryErrors.

[FLINK-18220][runtime] Fixed compilation error.

[FLINK-18220][runtime] Reverted the formatting changes accidentally pushed in 93d9627 but left the TaskManagerExceptionUtils.tryEnrichTaskManagerError(Throwable) change untouched.

[FLINK-18220][runtime] Updated Exception methods to be more descriptive.

[FLINK-18220][runtime] Typo fix in newly added exception message for JM heap space errors.

[FLINK-18220][runtime] Updated JavaDoc to comply the actual implementation.

[FLINK-18220][runtime] Added @nullable constaints.

[FLINK-18220][runtime] Moved OOM handling up the call hierarchy into the Dispatcher.

[FLINK-18220][runtime] Moved OOM handling down from the generic failGlobal(Throwable) into vertexFinished().

[FLINK-18220][runtime] Moved OOM handling up the call hierarchy into internalSubmitJob(JobGraph).

[FLINK-18220][runtime] Added test class that checks whether the right error message prefix to extended error message mapping is applied.

[FLINK-18220][runtime] Added IT testing that OOM error message enrichment is happening when an OutOfMemoryError occurs during initialization or finalization of a vertex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants