Search in sources :

Example 1 with AmbariDFSSpaceRetrievalTask

use of com.sequenceiq.cloudbreak.service.cluster.flow.AmbariDFSSpaceRetrievalTask 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!");
    }
}
Also used : CloudbreakServiceException(com.sequenceiq.cloudbreak.service.CloudbreakServiceException) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) AmbariClientPollerObject(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariClientPollerObject) AmbariDFSSpaceRetrievalTask(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariDFSSpaceRetrievalTask)

Aggregations

CloudbreakServiceException (com.sequenceiq.cloudbreak.service.CloudbreakServiceException)1 PollingResult (com.sequenceiq.cloudbreak.service.PollingResult)1 AmbariClientPollerObject (com.sequenceiq.cloudbreak.service.cluster.flow.AmbariClientPollerObject)1 AmbariDFSSpaceRetrievalTask (com.sequenceiq.cloudbreak.service.cluster.flow.AmbariDFSSpaceRetrievalTask)1