use of com.sequenceiq.cloudbreak.service.cluster.flow.AmbariClientPollerObject in project cloudbreak by hortonworks.
the class AmbariDecommissioner method getDFSSpace.
private Map<String, Map<Long, Long>> getDFSSpace(Stack stack, AmbariClient client) {
AmbariDFSSpaceRetrievalTask dfsSpaceTask = new AmbariDFSSpaceRetrievalTask();
PollingResult result = ambariClientPollingService.pollWithTimeoutSingleFailure(dfsSpaceTask, new AmbariClientPollerObject(stack, client), AmbariDFSSpaceRetrievalTask.AMBARI_RETRYING_INTERVAL, AmbariDFSSpaceRetrievalTask.AMBARI_RETRYING_COUNT);
if (result == SUCCESS) {
return dfsSpaceTask.getDfsSpace();
} else {
throw new CloudbreakServiceException("Failed to get dfs space from ambari!");
}
}
Aggregations