public AbstractVertexProgramBuilder() { this.configuration.setDelimiterParsingDisabled(true); }
public static org.apache.commons.configuration.Configuration makeApacheConfiguration(final Configuration hadoopConfiguration) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); hadoopConfiguration.iterator().forEachRemaining(e -> apacheConfiguration.setProperty(e.getKey(), e.getValue())); return apacheConfiguration; }
/** * Generate a {@link Configuration} from the {@link System#getProperties}. * Only those properties with specified prefix key are aggregated. * If the prefix and a . should be removed, then trim prefix. * * @param prefix the prefix of the keys to include in the configuration * @param trimPrefix whether to trim the prefix + . from the key * @return a configuration generated from the System properties */ public static Configuration getSystemPropertiesConfiguration(final String prefix, final boolean trimPrefix) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); for (final Map.Entry<Object, Object> entry : System.getProperties().entrySet()) { final String key = entry.getKey().toString(); final Object value = entry.getValue(); if (key.startsWith(prefix + ".")) apacheConfiguration.setProperty(trimPrefix ? key.substring(prefix.length() + 1) : key, value); } return apacheConfiguration; } }
apacheConfiguration.setDelimiterParsingDisabled(true); mapReduce.storeState(apacheConfiguration); ConfUtil.mergeApacheIntoHadoopConfiguration(apacheConfiguration, newConfiguration);
private static Configuration makeApacheConfiguration(final SparkConf sparkConfiguration) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); for (final Tuple2<String, String> tuple : sparkConfiguration.getAll()) { apacheConfiguration.setProperty(tuple._1(), tuple._2()); } return apacheConfiguration; }
public AbstractVertexProgramBuilder() { this.configuration.setDelimiterParsingDisabled(true); }
/** * Generate a {@link Configuration} from the {@link System#getProperties}. * Only those properties with specified prefix key are aggregated. * If the prefix and a . should be removed, then trim prefix. * * @param prefix the prefix of the keys to include in the configuration * @param trimPrefix whether to trim the prefix + . from the key * @return a configuration generated from the System properties */ public static Configuration getSystemPropertiesConfiguration(final String prefix, final boolean trimPrefix) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); for (final Map.Entry<Object, Object> entry : System.getProperties().entrySet()) { final String key = entry.getKey().toString(); final Object value = entry.getValue(); if (key.startsWith(prefix + ".")) apacheConfiguration.setProperty(trimPrefix ? key.substring(prefix.length() + 1) : key, value); } return apacheConfiguration; } }
public static org.apache.commons.configuration.Configuration makeApacheConfiguration(final Configuration hadoopConfiguration) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); hadoopConfiguration.iterator().forEachRemaining(e -> apacheConfiguration.setProperty(e.getKey(), e.getValue())); return apacheConfiguration; }
@Override public void initialize() throws InitializationException { BaseConfiguration configuration = new BaseConfiguration(); configuration.setDelimiterParsingDisabled(true); Map<String, String> environment = System.getenv(); for (String key : environment.keySet()) { configuration.setProperty(key, environment.get(key)); } setConfiguration(configuration); }
@Override public void initialize() throws InitializationException { BaseConfiguration configuration = new BaseConfiguration(); configuration.setDelimiterParsingDisabled(true); Properties properties = System.getProperties(); for (String key : properties.stringPropertyNames()) { configuration.setProperty(key, properties.get(key)); } setConfiguration(configuration); }
apacheConfiguration.setDelimiterParsingDisabled(true); mapReduce.storeState(apacheConfiguration); ConfUtil.mergeApacheIntoHadoopConfiguration(apacheConfiguration, newConfiguration);
/** * Removes all child configurations and reinitializes the <em>in-memory * configuration</em>. <strong>Attention:</strong> A new in-memory * configuration is created; the old one is lost. */ @Override public void clear() { configList.clear(); // recreate the in memory configuration inMemoryConfiguration = new BaseConfiguration(); ((BaseConfiguration) inMemoryConfiguration).setThrowExceptionOnMissing(isThrowExceptionOnMissing()); ((BaseConfiguration) inMemoryConfiguration).setListDelimiter(getListDelimiter()); ((BaseConfiguration) inMemoryConfiguration).setDelimiterParsingDisabled(isDelimiterParsingDisabled()); configList.add(inMemoryConfiguration); inMemoryConfigIsChild = false; }
/** * Removes all child configurations and reinitializes the <em>in-memory * configuration</em>. <strong>Attention:</strong> A new in-memory * configuration is created; the old one is lost. */ @Override public void clear() { configList.clear(); // recreate the in memory configuration inMemoryConfiguration = new BaseConfiguration(); ((BaseConfiguration) inMemoryConfiguration).setThrowExceptionOnMissing(isThrowExceptionOnMissing()); ((BaseConfiguration) inMemoryConfiguration).setListDelimiter(getListDelimiter()); ((BaseConfiguration) inMemoryConfiguration).setDelimiterParsingDisabled(isDelimiterParsingDisabled()); configList.add(inMemoryConfiguration); inMemoryConfigIsChild = false; }
private static Configuration makeApacheConfiguration(final SparkConf sparkConfiguration) { final BaseConfiguration apacheConfiguration = new BaseConfiguration(); apacheConfiguration.setDelimiterParsingDisabled(true); for (final Tuple2<String, String> tuple : sparkConfiguration.getAll()) { apacheConfiguration.setProperty(tuple._1(), tuple._2()); } return apacheConfiguration; }