use of com.sequenceiq.cloudbreak.cluster.service.ClusterClientInitException in project cloudbreak by hortonworks.
the class ClouderaManagerSetupService method initApiClient.
@PostConstruct
public void initApiClient() throws ClusterClientInitException {
Cluster cluster = stack.getCluster();
String user = cluster.getCloudbreakAmbariUser();
String password = cluster.getCloudbreakAmbariPassword();
try {
ClouderaManagerRepo clouderaManagerRepoDetails = clusterComponentProvider.getClouderaManagerRepoDetails(cluster.getId());
if (isVersionNewerOrEqualThanLimited(clouderaManagerRepoDetails::getVersion, CLOUDERAMANAGER_VERSION_7_1_0)) {
apiClient = clouderaManagerApiClientProvider.getV40Client(stack.getGatewayPort(), user, password, clientConfig);
} else {
apiClient = clouderaManagerApiClientProvider.getV31Client(stack.getGatewayPort(), user, password, clientConfig);
}
} catch (ClouderaManagerClientInitException e) {
throw new ClusterClientInitException(e);
}
}
use of com.sequenceiq.cloudbreak.cluster.service.ClusterClientInitException in project cloudbreak by hortonworks.
the class ClouderaManagerClusterCommissionService method initApiClient.
@PostConstruct
public void initApiClient() throws ClusterClientInitException {
Cluster cluster = stack.getCluster();
String user = cluster.getCloudbreakAmbariUser();
String password = cluster.getCloudbreakAmbariPassword();
try {
client = clouderaManagerApiClientProvider.getV31Client(stack.getGatewayPort(), user, password, clientConfig);
} catch (ClouderaManagerClientInitException e) {
throw new ClusterClientInitException(e);
}
}
use of com.sequenceiq.cloudbreak.cluster.service.ClusterClientInitException 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.cluster.service.ClusterClientInitException 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