apiStackVersionInfoSummary.getStackName(),
apiStackVersionInfoSummary.getStackVersion());
ApiStackVersionInfo apiStackVersionInfo =
apiStackVersion.getApiStackVersionInfo();
if (apiStackVersionInfo.isActive()) {
HadoopStack hadoopStack = new HadoopStack();
hadoopStack.setDistro(apiStackVersionInfo.getStackName(),
apiStackVersionInfo.getStackVersion());
hadoopStack
.setFullVersion(apiStackVersionInfo.getStackVersion());
hadoopStack.setVendor(apiStackVersionInfo.getStackName());
List<String> roles = new ArrayList<String>();
ApiStackServiceList apiStackServiceList =
apiManager.getStackServiceListWithComponents(
hadoopStack.getVendor(),
hadoopStack.getFullVersion());
for (ApiStackService apiStackService : apiStackServiceList
.getApiStackServices()) {
for (ApiStackComponent apiComponent : apiStackService
.getServiceComponents()) {
roles.add(apiComponent.getApiComponent()
.getComponentName());
}
}
hadoopStack.setRoles(roles);
hadoopStacks.add(hadoopStack);
}
}
}