use of com.sequenceiq.cloudbreak.api.service.ExposedService in project cloudbreak by hortonworks.
the class ServiceEndpointCollector method getHBaseUIUrlWithHostParameterFromGatewayTopology.
private String getHBaseUIUrlWithHostParameterFromGatewayTopology(String managerIp, GatewayTopology gt, String hbaseMasterPrivateIp) {
Gateway gateway = gt.getGateway();
ExposedService hbaseUi = exposedServiceCollector.getHBaseUIService();
if (gatewayListeningOnHttpsPort(gateway)) {
return String.format("https://%s/%s/%s%s?host=%s&port=%s", managerIp, gateway.getPath(), gt.getTopologyName(), hbaseUi.getKnoxUrl(), hbaseMasterPrivateIp, hbaseUi.getPort());
} else {
return String.format("https://%s:%s/%s/%s%s?host=%s&port=%s", managerIp, gateway.getGatewayPort(), gateway.getPath(), gt.getTopologyName(), hbaseUi.getKnoxUrl(), hbaseMasterPrivateIp, hbaseUi.getPort());
}
}
use of com.sequenceiq.cloudbreak.api.service.ExposedService in project cloudbreak by hortonworks.
the class CmCommandLinkProviderTest method exposedService.
private ExposedService exposedService() {
ExposedService service = new ExposedService();
service.setServiceName(CM_UI_SVC_NAME);
return service;
}
use of com.sequenceiq.cloudbreak.api.service.ExposedService in project cloudbreak by hortonworks.
the class ExposedServiceV4Response method fromExposedServices.
public static Collection<ExposedServiceV4Response> fromExposedServices(Collection<ExposedService> exposedServices) {
List<ExposedServiceV4Response> exposedServiceV4ResponseList = new ArrayList<>();
for (ExposedService service : exposedServices) {
ExposedServiceV4Response exposedServiceV4Response = new ExposedServiceV4Response();
exposedServiceV4Response.displayName = service.getDisplayName();
exposedServiceV4Response.serviceName = service.getServiceName();
exposedServiceV4Response.knoxService = service.getKnoxService();
exposedServiceV4Response.knoxUrl = service.getKnoxUrl();
exposedServiceV4ResponseList.add(exposedServiceV4Response);
}
return exposedServiceV4ResponseList;
}
use of com.sequenceiq.cloudbreak.api.service.ExposedService in project cloudbreak by hortonworks.
the class GrainPropertiesService method addNameNodeRoleForHosts.
private GrainProperties addNameNodeRoleForHosts(Cluster cluster, Set<Node> nodes) {
GrainProperties grainProperties = new GrainProperties();
ExposedService nameNodeService = exposedServiceCollector.getNameNodeService();
Map<String, List<String>> nameNodeServiceLocations = filteredLocations(cluster, nameNodeService.getServiceName(), nodes);
nameNodeServiceLocations.getOrDefault(nameNodeService.getServiceName(), List.of()).forEach(nmn -> grainProperties.computeIfAbsent(nmn, s -> new HashMap<>()).put(ROLES, "namenode"));
return grainProperties.getProperties().isEmpty() ? null : grainProperties;
}
Aggregations