[
https://issues.apache.org/jira/browse/FLINK-8830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385037#comment-16385037
]
ASF GitHub Bot commented on FLINK-8830:
---------------------------------------
GitHub user yanghua opened a pull request:
https://github.com/apache/flink/pull/5629
[FLINK-8830][YARN] YarnResourceManager throws NullPointerException
## What is the purpose of the change
*This pull request fixed a NullPointException issue which
`YarnResourceManager` throws*
## Brief change log
- *Add a `null` check for the file location*
## 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): (yes / **no**)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes /
**no** / don't know)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (not applicable / docs /
JavaDocs / **not documented**)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yanghua/flink FLINK-8830
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5629.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 #5629
----
commit fb15233414fae2793d77296b990b76f224cacf6e
Author: vinoyang <vinoyang@...>
Date: 2018-03-04T09:01:35Z
[FLINK-8830][YARN] YarnResourceManager throws NullPointerException
----
> YarnResourceManager throws NullPointerException
> -----------------------------------------------
>
> Key: FLINK-8830
> URL: https://issues.apache.org/jira/browse/FLINK-8830
> Project: Flink
> Issue Type: Bug
> Components: YARN
> Affects Versions: 1.5.0
> Reporter: Piotr Nowojski
> Assignee: vinoyang
> Priority: Major
>
>
> {code:java}
> java.lang.NullPointerException
> at java.io.File.<init>(File.java:277)
> at org.apache.flink.yarn.Utils.createTaskExecutorContext(Utils.java:502)
> at
> org.apache.flink.yarn.YarnResourceManager.createTaskExecutorLaunchContext(YarnResourceManager.java:445)
> at
> org.apache.flink.yarn.YarnResourceManager.onContainersAllocated(YarnResourceManager.java:338)
> at
> org.apache.flink.yarn.YarnResourceManagerTest$1.<init>(YarnResourceManagerTest.java:340)
> at
> org.apache.flink.yarn.YarnResourceManagerTest.testStopWorker(YarnResourceManagerTest.java:317)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
> at
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
> at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> {code}
>
> This exception is being thrown in
> `org.apache.flink.yarn.YarnResourceManagerTest#testStopWorker`. Exception
> apparently is being ignored, since the test completes. It seems like this
> line:
> {code:java}
> String fileLocation =
> System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION){code}
> Is not guarded against returned null value. I don't know if that's a test or
> production code issue.
> CC [~till.rohrmann]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)