storm icon indicating copy to clipboard operation
storm copied to clipboard

Bug fix for BaseResourceAwareStrategy to avoid NullPointerException

Open jiangzhileaf opened this issue 7 years ago • 1 comments

Bug fix for BaseResourceAwareStrategy to avoid NullPointerException, when a supervisor is in bad list but alive.

jiangzhileaf avatar Jul 24 '18 08:07 jiangzhileaf

@jiangzhileaf I am trying to wrap my head around which situations would cause this to happen. It appears that in some cases you can get a host name from the network topography that has no corresponding RAS_Node for it. But the network topography is created from the list of supervisors.

https://github.com/apache/storm/blob/9cc5b72c1fae78c60061b9f3c3f3d41277ca93cf/storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java#L172

and are the RAS_Nodes.

https://github.com/apache/storm/blob/9cc5b72c1fae78c60061b9f3c3f3d41277ca93cf/storm-server/src/main/java/org/apache/storm/scheduler/resource/RAS_Nodes.java#L80

So the only thing I can think of that would cause this to fail is that somehow the the implementation of DNSToSwitchMapping being used has violated the contract of the API and returned more than it should.

https://github.com/apache/storm/blob/9cc5b72c1fae78c60061b9f3c3f3d41277ca93cf/storm-client/src/jvm/org/apache/storm/networktopography/DNSToSwitchMapping.java#L24-L35

If we want to support that use case, which I think is fine to make it more generic, I would rather have us fix-up the results returned by the network mapping. Also we would need to update the javadocs to explain what the new contract is.

revans2 avatar Jul 30 '18 16:07 revans2

We are currently cleaning up old issues with stale discussions. The last comment here was made 5 years ago and Storm as evolved. If this is still an issue or relevant for your work, feel free to re-open and to rebase / fix the related PR.

rzo1 avatar Dec 04 '23 11:12 rzo1