-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Dear,
As I own a specifics FileSystem and using kereberos, I have a custom hdfs-site.xml and core-site.xml . So vanilla hdfs-shell did not work as it uses default configuration file defines from the classpath. As an example, core-default.xml is taken from hadoop-common jar.

legend: Application state while debugging
The environment variable HADOOP_CONF_DIR is set to: /usr/hdp/3.1.0.0-78/hadoop/conf/
which contained the required configuration files.
if I add explicitly after line 184
configuration.addResource(new Path("file:///usr/hdp/3.1.0.0-78/hadoop/conf/hdfs-site.xml"));
configuration.addResource(new Path("file:///usr/hdp/3.1.0.0-78/hadoop/conf/core-site.xml"));These 2 lines solves my problem, which show that HADOOP_CONF_DIR is not used in order to discover resources files.
Moreover, I trace the process to read the configuration files and put a breakpoint when parsing the file . When the resource var is equaled to core-site.xml both the ùrlanddocvar was null` as it fails to find the resource.
So should I build with:
- gradle by adding these
xmlfiles into theresourcedir - using the programmatic way by the use of
configuration.addResource... - an another way to build with gradle in order to use
HADOOP_CLASSPATHandHADOOP_CONF_DIR
thanks
Best regards