You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/05 12:40:04 UTC
[jira] [Commented] (FLINK-8372) NPEs when stopping containers via
YarnResourceManager and adding Tasks via TaskSlotTable
[ https://issues.apache.org/jira/browse/FLINK-8372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313037#comment-16313037 ]
ASF GitHub Bot commented on FLINK-8372:
---------------------------------------
GitHub user sebastiansemmle opened a pull request:
https://github.com/apache/flink/pull/5245
[FLINK-8372] Fix NPEs when stopping worker nodes and adding tasks.
## What is the purpose of the change
Fix potential `NullPointerExceptions` when stopping worker nodes and adding tasks.
[lgtm.com](https://lgtm.com) detected these two NPEs for `apache/flink` which can be viewed [here](https://lgtm.com/projects/g/apache/flink/alerts/?mode=tree&severity=error&rule=3960073)
## Brief change log
- The first commit fixes `YarnResourceManager.stopWorker()`, which, when given a null reference, will attempt to obtain and print the resource id, which in turn will fail. I opted to change the commit message as well in order to accommodate for the missing id.
- The second commit fixes `TaskSlotTable.addTask()`, which, when given a null reference will throw a `SlotNotFoundException`. However, since it attempts to get an allocation id from that null reference, that exception will be shadowed by an NPE.
## Verifying this change
*(Please pick either of the following options)*
This change is a trivial rework 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 / don't know)
- The runtime per-record code paths (performance sensitive): (no / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no / don't know)
- The S3 file system connector: (no / don't know)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sebastiansemmle/flink fix-NPEs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5245.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5245
----
commit 47bfeba899e54a3c4613c81a8a7a4c66b17f0cfd
Author: Sebastian Bauersfeld <se...@...>
Date: 2018-01-05T11:24:08Z
[FLINK-8372] Fix NullPointerException when stopping YarnWorkerNodes
commit 567c764eb4abef2d4847ebe946b4723878589b33
Author: Sebastian Bauersfeld <se...@...>
Date: 2018-01-05T11:24:42Z
[FLINK-8372] Fix NullPointerException when adding Tasks
----
> NPEs when stopping containers via YarnResourceManager and adding Tasks via TaskSlotTable
> ----------------------------------------------------------------------------------------
>
> Key: FLINK-8372
> URL: https://issues.apache.org/jira/browse/FLINK-8372
> Project: Flink
> Issue Type: Bug
> Components: YARN
> Reporter: Sebastian Bauersfeld
>
> [lgtm.com|https://lgtm.com] detected two cases where NullPointerExceptions could be triggered when stopping a worker node ([click|https://lgtm.com/projects/g/apache/flink/snapshot/512a3895328d29500458cd03a4c55eea031334eb/files/flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java?sort=name&dir=ASC&mode=heatmap&excluded=false#x84390b0ea77b236f:1]) and when adding a task ([click|https://lgtm.com/projects/g/apache/flink/snapshot/512a3895328d29500458cd03a4c55eea031334eb/files/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java?sort=name&dir=ASC&mode=heatmap&excluded=false#xb891777ba106b132:1]). I have a PR prepared to fix those, but wanted to make sure I have a ticket to file it against.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)