Try this and see if it works:
public class MyObj implements WritableComparable<MyObj>{
private String date;
private Double name;
public String getDate() { return date;}
public Double getName() { return name;}
@Override
public void readFields(DataInput in) throws IOException {
//Define how you want to read the fields
}
@Override
public void writeFields(DataOutput out) throws IOException {
//Define how you want to write the fields
}
.......
.......
.......
}