Here you'd have to use a method on the Hadoop version enum to get an enum from a string.
It could also have a default (or could be null).