use of com.sequenceiq.cloudbreak.cm.client.ClouderaManagerClientInitException in project cloudbreak by hortonworks.
the class ClouderaManagerClusterDecommissionService method initApiClient.
@PostConstruct
public void initApiClient() throws ClusterClientInitException {
Cluster cluster = stack.getCluster();
String user = cluster.getCloudbreakAmbariUser();
String password = cluster.getCloudbreakAmbariPassword();
try {
v31Client = clouderaManagerApiClientProvider.getV31Client(stack.getGatewayPort(), user, password, clientConfig);
} catch (ClouderaManagerClientInitException e) {
throw new ClusterClientInitException(e);
}
try {
v45Client = clouderaManagerApiClientProvider.getV45Client(stack.getGatewayPort(), user, password, clientConfig);
} catch (ClouderaManagerClientInitException e) {
LOGGER.warn("Client init failed for V45 client!");
}
}
use of com.sequenceiq.cloudbreak.cm.client.ClouderaManagerClientInitException in project cloudbreak by hortonworks.
the class ClouderaManagerClusterStatusService method initApiClient.
@PostConstruct
public void initApiClient() throws ClusterClientInitException {
Cluster cluster = stack.getCluster();
String cloudbreakAmbariUser = cluster.getCloudbreakAmbariUser();
String cloudbreakAmbariPassword = cluster.getCloudbreakAmbariPassword();
try {
client = clouderaManagerApiClientProvider.getV31Client(stack.getGatewayPort(), cloudbreakAmbariUser, cloudbreakAmbariPassword, clientConfig);
fastClient = clouderaManagerApiClientProvider.getV31Client(stack.getGatewayPort(), cloudbreakAmbariUser, cloudbreakAmbariPassword, clientConfig);
fastClient.getHttpClient().setConnectTimeout(connectQuickTimeoutSeconds, TimeUnit.SECONDS);
} catch (ClouderaManagerClientInitException e) {
throw new ClusterClientInitException(e);
}
}
Aggregations