public static List<String> getHadoopDistributionVersions(String distribution, boolean display) {
   List<String> result = new ArrayList<String>();
   List<EImpalaDistribution4Versions> d4vList =
       EImpalaDistribution4Versions.indexOfByDistribution(distribution);
   for (EImpalaDistribution4Versions d4v : d4vList) {
     if (display) {
       result.add(d4v.getVersionDisplayName());
     } else {
       result.add(d4v.getVersionValue());
     }
   }
   return result;
 }
 private static EImpalaDistribution4Versions indexOf(String name, boolean display) {
   if (name != null) {
     for (EImpalaDistribution4Versions version : EImpalaDistribution4Versions.values()) {
       if (display) {
         if (name.equalsIgnoreCase(version.getVersionDisplayName())) {
           return version;
         }
       } else {
         if (name.equalsIgnoreCase(version.getVersionValue())) {
           return version;
         }
       }
     }
   }
   return null;
 }