The overloaded Configuration constructors include the following, none of which involve specifying the hadoop configuration directory.
public Configuration() { /* compiled code */ }
public Configuration(boolean loadDefaults) { /* compiled code */ }
private Configuration(org.apache.hadoop.conf.Configuration other, boolean storeResource) { /* compiled code */ }
public Configuration(org.apache.hadoop.conf.Configuration other) { /* compiled code */ }
So then, how to do so?
The use case is running a unit test on a machine running a pseudo-distributed hadoop cluster.
The unit test will by default try to access the local file system instead of the local HDFS. So the usefulness is to point the Configuration to a non-local set of core-*.xml files configured for pseudo-distributed mode in a specified $HADOOP_HOME/conf directory.