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

Benjamin Kim commented on YARN-6214:
------------------------------------

The root cause if one of the apps is in init status, some of properties like 
application type is set to null. So if you make API call with `state=FINISHED` 
http parameter, you won't face this issue. 

However, we probably need better error handling logic.

 

> NullPointer Exception while querying timeline server API
> --------------------------------------------------------
>
>                 Key: YARN-6214
>                 URL: https://issues.apache.org/jira/browse/YARN-6214
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: timelineserver
>    Affects Versions: 2.7.1
>            Reporter: Ravi Teja Chilukuri
>            Priority: Major
>
> The apps API works fine and give all applications, including Mapreduce and Tez
> http://<host>:8188/ws/v1/applicationhistory/apps
> But when queried with application types with these APIs, it fails with 
> NullpointerException.
> http://<host>:8188/ws/v1/applicationhistory/apps?applicationTypes=TEZ
> http://<host>:8188/ws/v1/applicationhistory/apps?applicationTypes=MAPREDUCE
> <RemoteException><exception>NullPointerException</exception><javaClassName>java.lang.NullPointerException</javaClassName></RemoteException>
> Blocked on this issue as we are not able to run analytics on the tez job 
> counters on the prod jobs. 
> Timeline Logs:
> |2017-02-22 11:47:57,183 WARN  webapp.GenericExceptionHandler 
> (GenericExceptionHandler.java:toResponse(98)) - INTERNAL_SERVER_ERROR
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.yarn.server.webapp.WebServices.getApps(WebServices.java:195)
>       at 
> org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebServices.getApps(AHSWebServices.java:96)
>       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:483)
>       at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>       at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>       at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
>       at 
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
> Complete stacktrace:
> http://pastebin.com/bRgxVabf



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to