[ 
https://issues.apache.org/jira/browse/HADOOP-17468?focusedWorklogId=540732&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-540732
 ]

ASF GitHub Bot logged work on HADOOP-17468:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Jan/21 15:07
            Start Date: 24/Jan/21 15:07
    Worklog Time Spent: 10m 
      Work Description: symious opened a new pull request #2644:
URL: https://github.com/apache/hadoop/pull/2644


   https://issues.apache.org/jira/browse/HADOOP-17468


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 540732)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>            Priority: Major
>          Time Spent: 10m
>  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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to