/** * Gets all configuration properties filtered by the specified scope. * * @param conf the configuration to use * @param scope the scope to filter by * @return the properties */ public static List<ConfigProperty> getConfiguration(AlluxioConfiguration conf, Scope scope) { ConfigurationValueOptions useRawDisplayValue = ConfigurationValueOptions.defaults().useDisplayValue(true).useRawValue(true); List<ConfigProperty> configs = new ArrayList<>(); List<PropertyKey> selectedKeys = conf.keySet().stream() .filter(key -> GrpcUtils.contains(key.getScope(), scope)) .filter(key -> key.isValid(key.getName())) .collect(toList()); for (PropertyKey key : selectedKeys) { ConfigProperty.Builder configProp = ConfigProperty.newBuilder().setName(key.getName()) .setSource(conf.getSource(key).toString()); if (conf.isSet(key)) { configProp.setValue(conf.get(key, useRawDisplayValue)); } configs.add(configProp.build()); } return configs; }
if (!GrpcUtils.contains(key.getScope(), Scope.CLIENT)) {