jackjlli opened a new pull request #3758: Better handle NPE from getting 
instance config
URL: https://github.com/apache/incubator-pinot/pull/3758
 
 
   Currently when `PinotHelixResourceManager` tries to get a instance config 
which doesn't exist, it will throw an NPE. This PR explicitly logs the instance 
Id for better debugging.
   
   Current sample exception log (no instance information):
   ```
   java.lang.NullPointerException
           at org.apache.helix.HelixProperty.<init>(HelixProperty.java:144)
           at 
org.apache.helix.model.InstanceConfig.<init>(InstanceConfig.java:76)
           at 
org.apache.pinot.controller.helix.core.PinotHelixResourceManager.getHelixInstanceConfig(PinotHelixResourceManager.java:289)
           at 
org.apache.pinot.controller.helix.core.PinotHelixResourceManager.getDataInstanceAdminEndpoints(PinotHelixResourceManager.java:2201)
           at 
org.apache.pinot.controller.util.TableSizeReader.getTableSubtypeSize(TableSizeReader.java:153)
   ```
   
   New log:
   ```
   Instance testInstance:1234_SERVER not found
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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