List of usage examples for org.apache.hadoop.mapred JobConf getTrimmed
public String getTrimmed(String name)
name
property as a trimmed String
, null
if no such property exists. 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); }