Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
This is an error from Ozone's unit test case HDDS-4688. The error is as follows:
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) ...
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.
Attachments
Issue Links
- relates to
-
HADOOP-17081 MetricsSystem doesn't start the sink adapters on restart
- Resolved
- links to