Implementing VectorWritable

2009-12-28 Thread bharath v
Hi , I've implemented a simple VectorWritable class as follows package com; import org.apache.hadoop.*; import org.apache.hadoop.io.*; import java.io.*; import java.util.Vector; public class VectorWritable implements WritableComparable { private Vector value = new Vector(); public Vector

Re: Implementing VectorWritable

2009-12-28 Thread Jeff Zhang
The readFields and write method is empty ? When data is transfered from map phase to reduce phase, data is serialized and deserialized , so the write and readFields will be called. You should not leave them empty. Jeff Zhang On Tue, Dec 29, 2009 at 1:29 PM, bharath v < bharathvissapragada1...@

Re: Implementing VectorWritable

2009-12-29 Thread bharath v
Can you please tell me , what is the functionality of those 2 methods. (How should i implement the same in this VectorWritable) .. Thanks On Tue, Dec 29, 2009 at 11:25 AM, Jeff Zhang wrote: > The readFields and write method is empty ? > > When data is transfered from map phase to reduce phase,

Re: Implementing VectorWritable

2009-12-29 Thread Tom White
Have a look at org.apache.hadoop.io.ArrayWritable. You may be able to use this class in your application, or at least use it as a basis for writing VectorWritable. Cheers, Tom On Tue, Dec 29, 2009 at 1:37 AM, bharath v wrote: > Can you please tell me , what is the functionality of those 2 method