Esempio n. 1
0
  public static List<String> getAllDistributionNames(boolean display) {
    List<String> names = new ArrayList<String>();
    EHadoopDistributions[] values = values();
    for (EHadoopDistributions distribution : values) {
      if (display) {
        names.add(distribution.getDisplayName());
      } else {
        names.add(distribution.getName());
      }
    }

    return names;
  }
Esempio n. 2
0
 public static EHadoopDistributions getDistributionByName(String name, boolean display) {
   if (name != null) {
     for (EHadoopDistributions distribution : values()) {
       if (display) {
         if (name.equalsIgnoreCase(distribution.getDisplayName())) {
           return distribution;
         }
       } else {
         if (name.equalsIgnoreCase(distribution.getName())) {
           return distribution;
         }
       }
     }
   }
   return null;
 }