You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Marcel Holle <ma...@googlemail.com> on 2012/01/12 19:59:12 UTC
Access core-site.xml from FileInputFormat
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?
Re: Access core-site.xml from FileInputFormat
Posted by Joey Echeverria <jo...@cloudera.com>.
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
<ma...@googlemail.com> 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 <jo...@cloudera.com>
>
>> 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
>> <ma...@googlemail.com> 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
Re: Access core-site.xml from FileInputFormat
Posted by Marcel Holle <ma...@googlemail.com>.
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 <jo...@cloudera.com>
> 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
> <ma...@googlemail.com> 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
>
Re: Access core-site.xml from FileInputFormat
Posted by Joey Echeverria <jo...@cloudera.com>.
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
<ma...@googlemail.com> 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