You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yi-Sheng Lien (Jira)" <ji...@apache.org> on 2021/03/15 03:06:00 UTC

[jira] [Assigned] (HADOOP-17468) NullPointerException from register in MetricsSystemImpl

     [ https://issues.apache.org/jira/browse/HADOOP-17468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yi-Sheng Lien reassigned HADOOP-17468:
--------------------------------------

    Assignee: Janus Chow

> NullPointerException from register in MetricsSystemImpl
> -------------------------------------------------------
>
>                 Key: HADOOP-17468
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17468
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Janus Chow
>            Assignee: Janus Chow
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is an error from Ozone's unit test case [HDDS-4688|https://github.com/apache/ozone/pull/1795#issuecomment-760052788]. The error is as follows:
>  
> {code:java}
> java.lang.NullPointerException: configjava.lang.NullPointerException: config
>  at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.registerSink(MetricsSystemImpl.java:298) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:277) at org.apache.hadoop.hdds.server.http.BaseHttpServer.start(BaseHttpServer.java:298)
> ...{code}
> The reason should be happened here "https://github.com/apache/hadoop/commit/2f500e4635ea4347a55693b1a10a4a4465fe5fac#", if the _name_ is contained in _allSinks_ but not in _sink_, it will invoke the method of _registerSink_. But if the variable of config is null, it will throw the exception of NullPointerException.
>  
> A suggestion would be checking if the variable of config is null before calling _registerSink._



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

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