Search in sources :

Example 1 with ConfigProperties

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();
}
Also used : ConfigProperties(alluxio.grpc.ConfigProperties) ConfigProperty(alluxio.grpc.ConfigProperty) GetConfigurationPResponse(alluxio.grpc.GetConfigurationPResponse)

Aggregations

ConfigProperties (alluxio.grpc.ConfigProperties)1 ConfigProperty (alluxio.grpc.ConfigProperty)1 GetConfigurationPResponse (alluxio.grpc.GetConfigurationPResponse)1