Hello again,

Finals won't help all the logic you require to be performed in the
front-end/Driver code. If you're using fs.default.name inside a Task
somehow, final will help there. It is best if your application gets
the right configuration files on its classpath itself, so that the
right values are read (how else would it know your values!).

Alternatively, you can use GenericOptionsParser to parse -fs and -jt
arguments when the Driver is launched from commandline.

On Fri, Feb 25, 2011 at 11:46 AM, Jun Young Kim <juneng...@gmail.com> wrote:
> Hi, Harsh.
>
> I've already tried to do use <final> tag to set it unmodifiable.
> but, my result is not different.
>
> *core-site.xml:*
> <configuration>
> <property>
> <name>fs.default.name</name>
> <value>hdfs://localhost</value>
> <final>true</final>
> </property>
> </configuration>
>
> other *-site.xml files are also modified by this rule.
>
> thanks.
>
> Junyoung Kim (juneng...@gmail.com)
>
>
> On 02/25/2011 02:50 PM, Harsh J wrote:
>>
>> Hi,
>>
>> On Fri, Feb 25, 2011 at 10:17 AM, Jun Young Kim<juneng...@gmail.com>
>>  wrote:
>>>
>>> hi,
>>>
>>> I got the reason of my problem.
>>>
>>> in case of submitting a job by shell,
>>>
>>> conf.get("fs.default.name") is "hdfs://localhost"
>>>
>>> in case of submitting a job by a java application directly,
>>>
>>> conf.get("fs.default.name") is "file://localhost"
>>> so I couldn't read any files from hdfs.
>>>
>>> I think the execution of my java app couldn't read *-site.xml
>>> configurations
>>> properly.
>>
>> Have a look at this Q:
>>
>> http://wiki.apache.org/hadoop/FAQ#How_do_I_get_my_MapReduce_Java_Program_to_read_the_Cluster.27s_set_configuration_and_not_just_defaults.3F
>>
>



-- 
Harsh J
www.harshj.com

Reply via email to