use of org.apache.knox.gateway.topology.discovery.cm.ServiceModel in project knox by apache.
the class HiveOnTezServiceModelGenerator method generateService.
@Override
public ServiceModel generateService(ApiService service, ApiServiceConfig serviceConfig, ApiRole role, ApiConfigList roleConfig) throws ApiException {
ServiceModel model = super.generateService(service, serviceConfig, role, roleConfig);
model.addRoleProperty(getRoleType(), HIVEONTEZ_HTTP_PORT, getRoleConfigValue(roleConfig, HIVEONTEZ_HTTP_PORT));
model.addRoleProperty(getRoleType(), HIVEONTEZ_TRANSPORT_MODE, getRoleConfigValue(roleConfig, HIVEONTEZ_TRANSPORT_MODE));
return model;
}
use of org.apache.knox.gateway.topology.discovery.cm.ServiceModel in project knox by apache.
the class WebHCatServiceModelGenerator method generateService.
@Override
public ServiceModel generateService(ApiService service, ApiServiceConfig serviceConfig, ApiRole role, ApiConfigList roleConfig) throws ApiException {
String hostname = role.getHostRef().getHostname();
String port = getRoleConfigValue(roleConfig, WEBHCAT_PORT);
ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "http://%s:%s/templeton", hostname, port));
model.addRoleProperty(getRoleType(), WEBHCAT_PORT, getRoleConfigValue(roleConfig, WEBHCAT_PORT));
return model;
}
use of org.apache.knox.gateway.topology.discovery.cm.ServiceModel in project knox by apache.
the class HueServiceModelGenerator method generateService.
@Override
public ServiceModel generateService(ApiService service, ApiServiceConfig serviceConfig, ApiRole role, ApiConfigList roleConfig) {
String hostname = role.getHostRef().getHostname();
String scheme;
String port = getRoleConfigValue(roleConfig, HUE_HTTP_PORT);
boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
if (sslEnabled) {
scheme = "https";
} else {
scheme = "http";
}
ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s", scheme, hostname, port));
model.addRoleProperty(getRoleType(), HUE_HTTP_PORT, port);
model.addRoleProperty(getRoleType(), SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
return model;
}
use of org.apache.knox.gateway.topology.discovery.cm.ServiceModel in project knox by apache.
the class ImpalaUIServiceModelGenerator method generateService.
@Override
public ServiceModel generateService(ApiService service, ApiServiceConfig serviceConfig, ApiRole role, ApiConfigList roleConfig) throws ApiException {
String hostname = role.getHostRef().getHostname();
String sslEnabled = getServiceConfigValue(serviceConfig, SSL_ENABLED);
String scheme = Boolean.parseBoolean(sslEnabled) ? "https" : "http";
String port = getRoleConfigValue(roleConfig, WEBSERVER_PORT);
ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s/", scheme, hostname, port));
model.addServiceProperty(SSL_ENABLED, sslEnabled);
model.addRoleProperty(getRoleType(), WEBSERVER_PORT, port);
model.addRoleProperty(getRoleType(), ENABLE_WEBSERVER, getRoleConfigValue(roleConfig, ENABLE_WEBSERVER));
return model;
}
use of org.apache.knox.gateway.topology.discovery.cm.ServiceModel in project knox by apache.
the class LivyServiceModelGenerator method generateService.
@Override
public ServiceModel generateService(ApiService service, ApiServiceConfig serviceConfig, ApiRole role, ApiConfigList roleConfig) {
String hostname = role.getHostRef().getHostname();
String scheme;
String port = getRoleConfigValue(roleConfig, LIVY_SERVER_PORT);
String sslEnabled = getRoleConfigValue(roleConfig, SSL_ENABLED);
if (Boolean.parseBoolean(sslEnabled)) {
scheme = "https";
} else {
scheme = "http";
}
ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s", scheme, hostname, port));
model.addRoleProperty(getRoleType(), SSL_ENABLED, sslEnabled);
model.addRoleProperty(getRoleType(), LIVY_SERVER_PORT, port);
return model;
}
Aggregations