In the new Hadoop api, I can get the config from context
.
But now I'm using the old api, how do I get the current configuration in old map/reduce's reduce?
In the old API, there is a configure method (similar to the setup in the new API), from which you can get the conf as follows:
public void configure(JobConf conf) {
int test = conf.getInt("test", 0));
String testString = conf.get("testString", "default");
}
You can also use this method to get the DistributedCache (deprecated in the new API).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.