hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6214) NullPointer Exception while querying timeline server API
Date Wed, 22 Feb 2017 15:31:44 GMT

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

Jason Lowe commented on YARN-6214:
----------------------------------

It's a little difficult to line up the source with that stacktrace.  The report says it's
happening on 2.7.1, but I could not get the line numbers to match up on that release.  My
guess at this point is that there is at least one app on the cluster that has not set an application
type (i.e.: app type is null) and therefore this code in WebServices.java is going to NPE
when it tries to dereference the application type to trim it:
{code}
      if (checkAppTypes &&
          !appTypes.contains(
              StringUtils.toLowerCase(appReport.getApplicationType().trim()))) {
{code}

Looks like there's a missing null check on that.  It would be good to verify there are results
in the original, non-filtered query that are returning "null", empty, or missing <type>
tags for an application which would explain why we're hitting the NPE when we go to filter
on it.

> 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
>
> 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
(v6.3.15#6346)

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


Mime
View raw message