Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Access core-site.xml from FileInputFormat


Copy link to this message
-
Re: Access core-site.xml from FileInputFormat
Joey Echeverria 2012-01-12, 22:40
Yes. Just add the property to the core-site.xml file and you should
see it in the Configuration object passed to your FileInputFormat.

-Joey

On Thu, Jan 12, 2012 at 4:09 PM, Marcel Holle
<[EMAIL PROTECTED]> wrote:
> I want to add a custom parameter to core-site.xlm, which I would like to
> access from the FileInputFormat.getSplits() method. Is this possible?
>
> 2012/1/12 Joey Echeverria <[EMAIL PROTECTED]>
>
>> It doesn't matter if the original comes from mapred-site.xml,
>> core-site.xml, or hdfs-site.xml. All that really matters is if it's a
>> client/job tunable or if it configures one of the daemons.
>>
>> Which parameter did you want to change?
>>
>> On Thu, Jan 12, 2012 at 1:59 PM, Marcel Holle
>> <[EMAIL PROTECTED]> wrote:
>> > I need a value of the core-site.xml property file within FileInputFormat.
>> > I'm overriding the getSplits method: public List<InputSplit>
>> > getSplits(JobContext job);
>> >
>> > Using the job I can access the job configuration which gives me access to
>> > mapres-site.xml, but does it also let me access core-site.xml?
>>
>>
>>
>> --
>> Joseph Echeverria
>> Cloudera, Inc.
>> 443.305.9434
>>

--
Joseph Echeverria
Cloudera, Inc.
443.305.9434