@Test public void assertPropertiesFromBaseConfiguration() throws ConfigurationException { PinotConfiguration config = new PinotConfiguration(new PropertiesConfiguration( PropertiesConfiguration.class.getClassLoader().getResource("pinot-configuration-1.properties").getFile())); Assert.assertEquals(config.getProperty("pinot.server.storage.factory.class.s3"), "org.apache.pinot.plugin.filesystem.S3PinotFS"); Assert.assertEquals(config.getProperty("pinot.server.segment.fetcher.protocols"), "file,http,s3"); }
private static String getProperty(String name, Configuration configuration) { return Optional.of(configuration.getStringArray(relaxPropertyName(name))) .filter(values -> values.length > 0) .map(Arrays::stream) .map(stream -> stream.collect(Collectors.joining(","))) .orElse(null); }
PinotConfiguration { private static String getProperty(String name, Configuration configuration) { return Optional.of(configuration.getStringArray(relaxPropertyName(name))) .filter(values -> values.length > 0) .map(Arrays::stream) .map(stream -> stream.collect(Collectors.joining(","))) .orElse(null); } }
PinotConfiguration { private static String getProperty(String name, Configuration configuration) { return Optional.of(configuration.getStringArray(relaxPropertyName(name))) .filter(values -> values.length > 0) .map(Arrays::stream) .map(stream -> stream.collect(Collectors.joining(","))) .orElse(null); } PinotConfiguration();  PinotConfiguration(Configuration baseConfiguration);  PinotConfiguration(Map<String, Object> baseProperties);  PinotConfiguration(Map<String, Object> baseProperties, Map<String, String> environmentVariables);  PinotConfiguration(PinotFSSpec pinotFSSpec); }
PinotConfiguration { private static String getProperty(String name, Configuration configuration) { return Optional.of(configuration.getStringArray(relaxPropertyName(name))) .filter(values -> values.length > 0) .map(Arrays::stream) .map(stream -> stream.collect(Collectors.joining(","))) .orElse(null); } PinotConfiguration();  PinotConfiguration(Configuration baseConfiguration);  PinotConfiguration(Map<String, Object> baseProperties);  PinotConfiguration(Map<String, Object> baseProperties, Map<String, String> environmentVariables);  PinotConfiguration(PinotFSSpec pinotFSSpec); void addProperty(String name, Object value); PinotConfiguration clone(); boolean containsKey(String key); List<String> getKeys(); String getProperty(String name); boolean getProperty(String name, boolean defaultValue); T getProperty(String name, Class<T> returnType); double getProperty(String name, double defaultValue); int getProperty(String name, int defaultValue); List<String> getProperty(String name, List<String> defaultValues); long getProperty(String name, long defaultValue); String getProperty(String name, String defaultValue); Object getRawProperty(String name); Object getRawProperty(String name, Object defaultValue); void setProperty(String name, Object value); PinotConfiguration subset(String prefix); Map<String, Object> toMap(); }
PinotConfiguration { private static String getProperty(String name, Configuration configuration) { return Optional.of(configuration.getStringArray(relaxPropertyName(name))) .filter(values -> values.length > 0) .map(Arrays::stream) .map(stream -> stream.collect(Collectors.joining(","))) .orElse(null); } PinotConfiguration();  PinotConfiguration(Configuration baseConfiguration);  PinotConfiguration(Map<String, Object> baseProperties);  PinotConfiguration(Map<String, Object> baseProperties, Map<String, String> environmentVariables);  PinotConfiguration(PinotFSSpec pinotFSSpec); void addProperty(String name, Object value); PinotConfiguration clone(); boolean containsKey(String key); List<String> getKeys(); String getProperty(String name); boolean getProperty(String name, boolean defaultValue); T getProperty(String name, Class<T> returnType); double getProperty(String name, double defaultValue); int getProperty(String name, int defaultValue); List<String> getProperty(String name, List<String> defaultValues); long getProperty(String name, long defaultValue); String getProperty(String name, String defaultValue); Object getRawProperty(String name); Object getRawProperty(String name, Object defaultValue); void setProperty(String name, Object value); PinotConfiguration subset(String prefix); Map<String, Object> toMap(); static final String CONFIG_PATHS_KEY; }