use of alluxio.grpc.ConfigProperties in project alluxio by Alluxio.
the class Configuration method toProto.
/**
* @return the proto representation
*/
public GetConfigurationPResponse toProto() {
GetConfigurationPResponse.Builder response = GetConfigurationPResponse.newBuilder();
if (mClusterConf != null) {
mClusterConf.forEach(property -> response.addClusterConfigs(property.toProto()));
}
if (mPathConf != null) {
mPathConf.forEach((path, properties) -> {
List<ConfigProperty> propertyList = properties.stream().map(Property::toProto).collect(Collectors.toList());
ConfigProperties configProperties = ConfigProperties.newBuilder().addAllProperties(propertyList).build();
response.putPathConfigs(path, configProperties);
});
}
if (mClusterConfHash != null) {
response.setClusterConfigHash(mClusterConfHash);
}
if (mPathConfHash != null) {
response.setPathConfigHash(mPathConfHash);
}
return response.build();
}
Aggregations