use of alluxio.wire.WorkerWebUIConfiguration in project alluxio by Alluxio.
the class AlluxioWorkerRestServiceHandler method getWebUIConfiguration.
/**
* Gets Web UI ServerConfiguration page data.
*
* @return the response object
*/
@GET
@Path(WEBUI_CONFIG)
public Response getWebUIConfiguration() {
return RestUtils.call(() -> {
WorkerWebUIConfiguration response = new WorkerWebUIConfiguration();
response.setWhitelist(mBlockWorker.getWhiteList());
TreeSet<Triple<String, String, String>> sortedProperties = new TreeSet<>();
Set<String> alluxioConfExcludes = Sets.newHashSet(PropertyKey.WORKER_WHITELIST.toString());
for (ConfigProperty configProperty : mBlockWorker.getConfiguration(GetConfigurationPOptions.newBuilder().setRawValue(true).build()).toProto().getClusterConfigsList()) {
String confName = configProperty.getName();
if (!alluxioConfExcludes.contains(confName)) {
sortedProperties.add(new ImmutableTriple<>(confName, ConfigurationUtils.valueAsString(configProperty.getValue()), configProperty.getSource()));
}
}
response.setConfiguration(sortedProperties);
return response;
}, ServerConfiguration.global());
}
Aggregations