You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Bikas Saha (JIRA)" <ji...@apache.org> on 2015/11/17 19:40:11 UTC

[jira] [Commented] (TEZ-2944) NPE in TestProcessorContext

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

Bikas Saha commented on TEZ-2944:
---------------------------------

NPE is in RuntimeTask which is a base class of the mocked object of logicalioruntimetask. Because of mocking the base class members are not initialized and hence RuntimeTask.progressNotified is null. So when RuntimeTask.notifyProgressInvocation() is invoked then it NPEs.

We cannot mock that base class method because its final. We cannot mock TaskContextImpl's notify method because its also final. I am not sure this can be tested by mocking. Removing the test. The test originally worked because RuntimeTask.notifyProgressNotification() was setting a scalar boolean. TEZ-2918 changed that to an AtomicBoolean and so it started failing. The Jenkins run on TEZ-2918 passed. Now that I checked its test report, it seems that all the tests were not run and hence this did not show up.

Removing the test. 

> NPE in TestProcessorContext
> ---------------------------
>
>                 Key: TEZ-2944
>                 URL: https://issues.apache.org/jira/browse/TEZ-2944
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: Jeff Zhang
>            Assignee: Bikas Saha
>
> https://builds.apache.org/job/Tez-Build/1311/console
> {code}
> testDagNumber(org.apache.tez.runtime.api.impl.TestProcessorContext)  Time elapsed: 0.734 sec  <<< ERROR!
> java.lang.NullPointerException: null
> 	at org.apache.tez.runtime.RuntimeTask.notifyProgressInvocation(RuntimeTask.java:109)
> 	at org.apache.tez.runtime.api.impl.TezTaskContextImpl.notifyProgress(TezTaskContextImpl.java:178)
> 	at org.apache.tez.runtime.api.impl.TezProcessorContextImpl.setProgress(TezProcessorContextImpl.java:97)
> 	at org.apache.tez.runtime.api.impl.TestProcessorContext.testDagNumber(TestProcessorContext.java:101)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)