Can I use the Serializable interface? Alternatively, is there any way to
specify OutputFormatter for mappers like we can do for reducers?

Thanks,
Farhan

On Tue, Apr 27, 2010 at 1:19 PM, Ted Yu <yuzhih...@gmail.com> wrote:

> Take a look at the sample given in Javadoc of Writable.java
> You need to serialize your data yourself:
>     @Override
>    public void readFields(DataInput in) throws IOException {
>      h = Text.readString(in);
>      sc = in.readFloat();
>      ran = in.readInt ();
>    }
>
>
> On Tue, Apr 27, 2010 at 10:53 AM, Farhan Husain
> <farhan.hus...@csebuet.org>wrote:
>
> > Hello,
> >
> > I want to output a class which I have written as the value of the map
> > phase.
> > The obvious was is to implement the Writable interface but the problem is
> > the class has other classes as its member properties. The DataInput and
> > DataOutput interfaces used by the read and write methods of the Writable
> > class do not support object serialization. Is there any other way I can
> > achieve this?
> >
> > Thanks,
> > Farhan
> >
>

Reply via email to