You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Xuan Gong (JIRA)" <ji...@apache.org> on 2018/03/01 01:31:00 UTC

[jira] [Commented] (MAPREDUCE-6903) NPE occured when run MapredTestDriver's testcase

    [ https://issues.apache.org/jira/browse/MAPREDUCE-6903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381362#comment-16381362 ] 

Xuan Gong commented on MAPREDUCE-6903:
--------------------------------------

[~GeLiXin] Thank for working this.
In this fix, we only add the NULL check. Does it really solve the issue?
Normally, when we try to use TimelineClient, we need to initiate the client and start the client, so the timeline writer can get created. But here, looks like that the timeline writer is still null, so it would throw out the Null exception.

> NPE occured when run MapredTestDriver's testcase
> ------------------------------------------------
>
>                 Key: MAPREDUCE-6903
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6903
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0-alpha4
>            Reporter: LiXin Ge
>            Assignee: LiXin Ge
>            Priority: Major
>              Labels: easyfix
>         Attachments: MAPREDUCE-6903.001.patch, MAPREDUCE-6903.002.patch
>
>
> When runing the timelineperformance test from MapredTestDriver without input parameter, an NPE was throwed:
> {quote}
> ./hadoop org.apache.hadoop.test.MapredTestDriver timelineperformance
> ...
> 2017-06-08 09:32:13,194 ERROR mapreduce.SimpleEntityWriterV1: writing to the timeline service failed
> java.lang.NullPointerException
> 	at org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl.putEntities(TimelineClientImpl.java:178)
> 	at org.apache.hadoop.mapreduce.SimpleEntityWriterV1.map(SimpleEntityWriterV1.java:82)
> 	at org.apache.hadoop.mapreduce.SimpleEntityWriterV1.map(SimpleEntityWriterV1.java:41)
> 	at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
> 	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:793)
> 	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
> 	at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:271)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {quote}
> That's better to add a protection of NULL pointer check.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org