nathanmarz/storm — pull request #582 by d2r (2013-06-03 22:25:00+00:00)
Title: Try at config validation

For issue #581

This pull request is for input to see if this is a direction we could go.

In thinking about how to fix this sort of issue, I figure we want to validate the config at the point of topology submission, since after that it enters ZK state and would become a nuisance.

The idea is to use the defaults.yaml file we already have to validate types coming in with the topology.

Pros:
* Should only have to change the defaults.yaml to change the schema.
* Can be generalized to lists and maps

Cons:
* Need defaults for every config where the type truly matters.
* Would have to change storm code to deal with null (e.g. use the empty String instead)
* What if there are no sensible defaults?
* Lists with differing types prescribed by elements would not be enforced.

The code in this pull is incomplete, but I'm looking for comments on the direction.