I would move all that logic to the HadoopDistro enum (which could allow for more complex logic on a per distro level btw)