ApiStackList stackList = apiManager.getStackList();
for (ApiStack apiStack : stackList.getApiStacks()) {
for (ApiStackVersion apiStackVersionSummary : apiManager
.getStackVersionList(apiStack.getApiStackName().getStackName())
.getApiStackVersions()) {
ApiStackVersionInfo apiStackVersionInfoSummary =
apiStackVersionSummary.getApiStackVersionInfo();
ApiStackVersion apiStackVersion =
apiManager.getStackVersion(
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(),