org.apache.hadoop.conf中的最后一个类,也是这个包中以后用的最频繁的一个,Configurable算是肉体,Configuration算是灵魂吧
package org.apache.hadoop.conf; /** Base class for things that may be configured with a {@link Configuration}. */
public class Configured implements Configurable { private Configuration conf; /** Construct a Configured. */
public Configured() {
this(null);
} /** Construct a Configured. */
public Configured(Configuration conf) {
setConf(conf);
} // inherit javadoc
public void setConf(Configuration conf) {
this.conf = conf;
} // inherit javadoc
public Configuration getConf() {
return conf;
} }
整个代码没什么好解释的。
就一个//inherit javadoc让我顿了一下,后来知道了,是继承了接口的注释
/** Set the configuration to be used by this object. */
void setConf(Configuration conf); /** Return the configuration used by this object. */
Configuration getConf();