On the Configuration object, call something like...

addResource(new Path(new File(hadoopConfDir, "core-site.xml").toString()));
addResource(new Path(new File(hadoopConfDir, "hdfs-site.xml").toString()));
addResource(new Path(new File(hadoopConfDir, "mapred-site.xml").toString()));

with the right hadoopConfDir of course.

On Sun, Jul 3, 2011 at 11:49 AM, Sergey Bartunov <[email protected]> wrote:
> I'm using IDEA IC 10.5.1 to work on Mahout and building it using maven.
> My problem is that all Hadoop configuration is read from files within
> hadoop jar file in the local maven repository. I got that when I
> turned off quiet mode in the Configuration class:
>
> Jul 3, 2011 2:45:32 PM org.apache.hadoop.conf.Configuration loadResource
> INFO: parsing 
> jar:file:/home/sbos/.m2/repository/org/apache/hadoop/hadoop-core/0.20.203.0/hadoop-core-0.20.203.0.jar!/core-default.xml
>
> But actually I need configuration from my local Hadoop installation,
> so AFAIK I need to modify classpath to exclude these configs and
> include mine.
> How to do that?
>

Reply via email to