Example usage for org.apache.hadoop.mapred JobConf getTrimmed

List of usage examples for org.apache.hadoop.mapred JobConf getTrimmed

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred JobConf getTrimmed.

Prototype

public String getTrimmed(String name) 

Source Link

Document

Get the value of the name property as a trimmed String, null if no such property exists.

Usage

From source file:org.wikimedia.analytics.refinery.hive.GeocodedCountryUDF.java

License:Apache License

@Override
public void configure(MapredContext context) {
    if (geocode == null) {
        try {/* www . ja  v a 2 s. c o  m*/
            JobConf jobConf = context.getJobConf();
            geocode = new Geocode(jobConf.getTrimmed("maxmind.database.country"),
                    jobConf.getTrimmed("maxmind.database.city"));
        } catch (IOException ex) {
            LOG.error(ex);
            throw new RuntimeException(ex);
        }
    }

    super.configure(context);
}