hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun C Murthy <...@yahoo-inc.com>
Subject Re: configuration access
Date Tue, 04 Mar 2008 18:27:01 GMT

On Mar 4, 2008, at 8:34 AM, Steve Sapovits wrote:

>
> Can someone point me to working examples of config access?  I'm  
> trying to use
> the FileSystem and Configuration classes to get the  
> 'fs.default.name' value.  I see
> that the Configuration object thinks it's loaded hadoop-default.xml  
> and hadoop-site.xml
> files, but no matter what I ask it for I get a default back and not  
> what's configured.

Can you re-check if the right paths (for your config files) are on  
the CLASSPATH?

You should be able to get the configured value via:

String fsName = conf.get("fs.default.name");

Arun

> A working example of this would probably set me straight.  I tried  
> explicitly adding
> resources hard-coding the full path names of the config. files ...  
> same thing.
>
> -- 
> Steve Sapovits
> Invite Media  -  http://www.invitemedia.com
> ssapovits@invitemedia.com
>


Mime
View raw message