clintropolis opened a new pull request #8106: fix npe with sql metadata manager 
polling and empty database
URL: https://github.com/apache/incubator-druid/pull/8106
 
 
   ### Description
   
   This fixes a null pointer exception that occurs in numerous places when 
polling for segments while having an empty metadata database after the changes 
of #7653. I'm not certain if this is the _correct_ fix since previously the 
snapshot would remain null until there were segments available during a poll, 
but it resolves the issue for me at least, and doesn't appear to have any ill 
side-effects.
   
   ```
   2019-07-18T20:48:10,597 WARN [qtp265052195-81] 
org.eclipse.jetty.server.HttpChannel - /druid/coordinator/v1/metadata/segments
   java.lang.NullPointerException
       at 
org.apache.druid.server.http.MetadataResource.getAllUsedSegmentsWithOvershadowedStatus(MetadataResource.java:174)
 ~[classes/:?]
       at 
org.apache.druid.server.http.MetadataResource.getAllUsedSegments(MetadataResource.java:142)
 ~[classes/:?]
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_192]
       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_192]
       at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_192]
       at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_192]
       at 
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
 ~[jersey-server-1.19.3.jar:1.19.3]
   ```
   
   ```
   2019-07-18T21:26:15,173 ERROR [Coordinator-Exec--0] 
org.apache.druid.server.coordinator.DruidCoordinator - Caught exception, 
ignoring so that schedule keeps going.: 
{class=org.apache.druid.server.coordinator.DruidCoordinator, 
exceptionType=class java.lang.NullPointerException, exceptionMessage=null}
   java.lang.NullPointerException
        at 
org.apache.druid.server.coordinator.DruidCoordinatorRuntimeParams$Builder.withSnapshotOfDataSourcesWithAllUsedSegments(DruidCoordinatorRuntimeParams.java:354)
 ~[classes/:?]
        at 
org.apache.druid.server.coordinator.DruidCoordinator$CoordinatorRunnable.run(DruidCoordinator.java:657)
 [classes/:?]
        at 
org.apache.druid.server.coordinator.DruidCoordinator$2.call(DruidCoordinator.java:559)
 [classes/:?]
   ```
   
   etc.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] been tested in a localhost Druid cluster.
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to