You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Maxim Ulanovskiy <mu...@iponweb.net> on 2009/10/21 14:00:43 UTC

reuse of MultipleOutputFormat with new API

Hello, fellows!

Have a problem with migration to Hadoop 0.20: I need to register
MyOutputFormatClass which extends MultipleOutputFormat in Job object. But
since Job.setOutputFormatClass(Class<? extends OutputFormat> cls) requires
new version of OutputFormat class and MultipleOutputFormat implements old
version of OutputFormat I can't register it. So is there any replacement of
MultipleOutputFormat in the new API or I should implement some kind of
adapter?


-- 
Best Regards,
Maxim Ulanovskiy
java-developer

IPonWeb

Re: reuse of MultipleOutputFormat with new API

Posted by Maxim Ulanovskiy <mu...@iponweb.net>.
Thanks for answer Amareshwari,

For now I have my own ByDateTimeOutputFormat class which extends
MultipleOutputFormat. It generates custom target file name and also choose
RecordWriter based on some configuration params. I've seen new
MultipleOutputs but not quite understand how to achive the same
functionality with a new API...

-- 
Best Regards,
Max

2009/10/22 Amareshwari Sri Ramadasu <am...@yahoo-inc.com>

> With new api, functionality of MultipleOutputFormat and MultipleOutputs is
> combined into one as org.apache.hadoop.mapreduce.lib.output.MultipleOutputs
> in branch 0.21.
> You can use the same.
>
> Thanks
> Amareshwari
>
>
> Sean Owen wrote:
>
>> FWIW this same sort of thing is blocking Apache Mahout from progress
>> on implementations using Hadoop. I imagine the whole migration is far
>> more involved than it appears so it makes sense it is taking time. But
>> yeah making all the new APIs compatible with the new APIs would be a
>> great step forward for 0.20.x
>>
>> On Wed, Oct 21, 2009 at 1:00 PM, Maxim Ulanovskiy
>> <mu...@iponweb.net> wrote:
>>
>>
>>> Hello, fellows!
>>>
>>> Have a problem with migration to Hadoop 0.20: I need to register
>>> MyOutputFormatClass which extends MultipleOutputFormat in Job object. But
>>> since Job.setOutputFormatClass(Class<? extends OutputFormat> cls)
>>> requires
>>> new version of OutputFormat class and MultipleOutputFormat implements old
>>> version of OutputFormat I can't register it. So is there any replacement
>>> of
>>> MultipleOutputFormat in the new API or I should implement some kind of
>>> adapter?
>>>
>>>
>>> --
>>> Best Regards,
>>> Maxim Ulanovskiy
>>> java-developer
>>>
>>> IPonWeb
>>>
>>>
>>>
>>

Re: reuse of MultipleOutputFormat with new API

Posted by Amareshwari Sri Ramadasu <am...@yahoo-inc.com>.
With new api, functionality of MultipleOutputFormat and MultipleOutputs 
is combined into one as 
org.apache.hadoop.mapreduce.lib.output.MultipleOutputs in branch 0.21.
You can use the same.

Thanks
Amareshwari

Sean Owen wrote:
> FWIW this same sort of thing is blocking Apache Mahout from progress
> on implementations using Hadoop. I imagine the whole migration is far
> more involved than it appears so it makes sense it is taking time. But
> yeah making all the new APIs compatible with the new APIs would be a
> great step forward for 0.20.x
>
> On Wed, Oct 21, 2009 at 1:00 PM, Maxim Ulanovskiy
> <mu...@iponweb.net> wrote:
>   
>> Hello, fellows!
>>
>> Have a problem with migration to Hadoop 0.20: I need to register
>> MyOutputFormatClass which extends MultipleOutputFormat in Job object. But
>> since Job.setOutputFormatClass(Class<? extends OutputFormat> cls) requires
>> new version of OutputFormat class and MultipleOutputFormat implements old
>> version of OutputFormat I can't register it. So is there any replacement of
>> MultipleOutputFormat in the new API or I should implement some kind of
>> adapter?
>>
>>
>> --
>> Best Regards,
>> Maxim Ulanovskiy
>> java-developer
>>
>> IPonWeb
>>
>>     


Re: reuse of MultipleOutputFormat with new API

Posted by Sean Owen <sr...@gmail.com>.
FWIW this same sort of thing is blocking Apache Mahout from progress
on implementations using Hadoop. I imagine the whole migration is far
more involved than it appears so it makes sense it is taking time. But
yeah making all the new APIs compatible with the new APIs would be a
great step forward for 0.20.x

On Wed, Oct 21, 2009 at 1:00 PM, Maxim Ulanovskiy
<mu...@iponweb.net> wrote:
> Hello, fellows!
>
> Have a problem with migration to Hadoop 0.20: I need to register
> MyOutputFormatClass which extends MultipleOutputFormat in Job object. But
> since Job.setOutputFormatClass(Class<? extends OutputFormat> cls) requires
> new version of OutputFormat class and MultipleOutputFormat implements old
> version of OutputFormat I can't register it. So is there any replacement of
> MultipleOutputFormat in the new API or I should implement some kind of
> adapter?
>
>
> --
> Best Regards,
> Maxim Ulanovskiy
> java-developer
>
> IPonWeb
>