If WRFVariableText is a Text, then it implements Writable, not Java
serialization. You can implement Serializable in your class, or
consider reusing SerializableWritable in Spark (note it's a developer
API).

On Thu, Feb 26, 2015 at 4:03 PM, patcharee <patcharee.thong...@uni.no> wrote:
> Hi,
>
> I am using custom inputformat and recordreader. This custom recordreader has
> declaration:
> public class NetCDFRecordReader extends RecordReader<WRFIndex,
> WRFVariableText>
>
> The WRFVariableText extends Text:
> public class WRFVariableText extends org.apache.hadoop.io.Text
>
> The WRFVariableText overrides readFields(DataInput in) and write(DataOutput
> out) method. I understand that this WRFVariableText already implements
> serialization. But I got an exception about serialization when I ran my job
> using the custom inputformat and recordreader>>>
>
> Exception in thread "main" org.apache.spark.SparkException: Job aborted due
> to stage failure: Task 0.0 in stage 0.0 (TID 0) had a not serializable
> result: no.uni.computing.io.WRFVariableText
>
> Any ideas?
>
> Best,
> Patcharee
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to