コード例 #1
0
 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;
 }
コード例 #2
0
 public static List<EImpalaDistribution4Versions> indexOfByDistribution(String distribution) {
   List<EImpalaDistribution4Versions> distribution4Versions =
       new ArrayList<EImpalaDistribution4Versions>();
   if (distribution != null) {
     for (EImpalaDistribution4Versions d4v : EImpalaDistribution4Versions.values()) {
       if (d4v.getDistribution().getName().equals(distribution)
           || d4v.getDistribution().getDisplayName().equals(distribution)) {
         distribution4Versions.add(d4v);
       }
     }
   }
   return distribution4Versions;
 }
コード例 #3
0
 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;
 }