use of com.cloudera.api.swagger.model.ApiCluster in project tbd-studio-se by Talend.
the class HadoopCMConfigurator method getAllClusters.
/*
* (non-Javadoc)
*
* @see org.talend.repository.hadoopcluster.configurator.HadoopConfigurator#getAllClusters()
*/
@Override
public List<String> getAllClusters() {
List<String> names = new ArrayList<String>();
ApiClusterList clusters;
try {
clusters = clusterAPI.readClusters(null, HadoopCMCluster.DEFAULT_VIEW_NAME);
for (ApiCluster cluster : clusters.getItems()) {
names.add(cluster.getDisplayName() + NAME_SEPARATOR + cluster.getName());
}
} catch (ApiException e) {
throw new RuntimeException(e);
}
return names;
}
Aggregations