Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在新的 Hadoop api 中,我可以从context.
context
但是现在我使用的是旧的 api,如何在旧的 map/reduce 的 reduce 中获取当前配置?
在旧 API 中,有一个 configure 方法(类似于新 API 中的 setup),您可以从中获取 conf,如下所示:
public void configure(JobConf conf) { int test = conf.getInt("test", 0)); String testString = conf.get("testString", "default"); }
您还可以使用此方法获取 DistributedCache(在新 API 中已弃用)。