Example usage for org.apache.hadoop.conf Configuration getProperty

List of usage examples for org.apache.hadoop.conf Configuration getProperty

Introduction

In this page you can find the example usage for org.apache.hadoop.conf Configuration getProperty.

Prototype

String getProperty(String key) 

Source Link

Usage

From source file:org.apache.tinkerpop.gremlin.hadoop.structure.util.ConfUtil.java

License:Apache License

public static Configuration makeHadoopConfiguration(
        final org.apache.commons.configuration.Configuration apacheConfiguration) {
    final Configuration hadoopConfiguration = new Configuration();
    apacheConfiguration.getKeys().forEachRemaining(key -> {
        final Object object = apacheConfiguration.getProperty(key);
        hadoopConfiguration.set(key, object.toString());
    });/*from  w  ww  . java  2  s . c o  m*/
    return hadoopConfiguration;
}

From source file:org.apache.tinkerpop.gremlin.hadoop.structure.util.ConfUtil.java

License:Apache License

public static void mergeApacheIntoHadoopConfiguration(
        final org.apache.commons.configuration.Configuration apacheConfiguration,
        final Configuration hadoopConfiguration) {
    apacheConfiguration.getKeys().forEachRemaining(key -> {
        final Object object = apacheConfiguration.getProperty(key);
        hadoopConfiguration.set(key, object.toString());
    });/*  w  ww .j av a2  s  .c  om*/
}