@Override
public List<HadoopStack> getSupportedStacks() throws SoftwareManagementPluginException {
List<HadoopStack> stacks = new ArrayList<HadoopStack>();
List<DistroRead> distros = distroManager.getDistros();
IronfanStack stack = null;
String packagesExistStatus = "";
Map <String, String> hadoopDistroMap = null;
for (DistroRead distro : distros) {
stack = new IronfanStack();
stack.setDistro(distro.getName());
stack.setVendor(distro.getVendor());
stack.setFullVersion(distro.getVersion());
stack.setHveSupported(distro.isHveSupported());
stack.setRoles(distro.getRoles());
packagesExistStatus = distroManager.checkPackagesExistStatus(distro.getName()).toString();
stack.setPackagesExistStatus(packagesExistStatus);
hadoopDistroMap = new HashMap<String, String>();
hadoopDistroMap.put("HadoopUrl", distroManager.getPackageUrlByDistroRole(distro.getName(), HadoopRole.HADOOP_NAMENODE_ROLE.toString()));
hadoopDistroMap.put("HiveUrl", distroManager.getPackageUrlByDistroRole(distro.getName(), HadoopRole.HIVE_ROLE.toString()));
hadoopDistroMap.put("PigUrl", distroManager.getPackageUrlByDistroRole(distro.getName(), HadoopRole.PIG_ROLE.toString()));
hadoopDistroMap.put("HbaseUrl", distroManager.getPackageUrlByDistroRole(distro.getName(), HadoopRole.HBASE_MASTER_ROLE.toString()));
hadoopDistroMap.put("ZookeeperUrl", distroManager.getPackageUrlByDistroRole(distro.getName(), HadoopRole.ZOOKEEPER_ROLE.toString()));
stack.setHadoopDistroMap(hadoopDistroMap);
stack.setPackageRepos(distroManager.getPackageRepos(distro.getName()));
stacks.add(stack);
}
return stacks;
}