Example usage for org.apache.hadoop.conf Configurable getConf

List of usage examples for org.apache.hadoop.conf Configurable getConf

Introduction

In this page you can find the example usage for org.apache.hadoop.conf Configurable getConf.

Prototype

Configuration getConf();

Source Link

Document

Return the configuration used by this object.

Usage

From source file:com.asakusafw.runtime.directio.hadoop.SequenceFileFormat.java

License:Apache License

private void configure(Object object) {
    if (object instanceof Configurable) {
        Configurable configurable = (Configurable) object;
        if (configurable.getConf() == null) {
            configurable.setConf(getConf());
        }//  www  . j  a  va 2  s.  c  om
    }
}

From source file:com.moz.fiji.hadoop.configurator.HadoopConfigurator.java

License:Apache License

/**
 * Populates the instance variables of a {@link org.apache.hadoop.conf.Configurable}
 * instance with values from its {@link org.apache.hadoop.conf.Configuration}.
 *
 * @param instance The instance to configure.
 * @param includeParentClasses Whether to include declared variables in super classes.
 * @throws HadoopConfigurationException If there is an error with the declaration or
 *     assigning the field./* ww w.  j  ava  2 s  .  co m*/
 */
public static void configure(Configurable instance, boolean includeParentClasses) {
    configure(instance, instance.getConf(), includeParentClasses);
}