Cannot handle type while writing dataframe to ES


(Krishna Chaitanya Yalamanchili) #1

Hi,

I am seeing this exception while writing an RDD to ES

Caused by: org.elasticsearch.hadoop.serialization.EsHadoopSerializationException: Cannot handle type [class scala.Enumeration$Val] ...

My object has Enumeration values in it. Is there something I need to do to avoid these exceptions?


(James Baiera) #2

We do not currently support serializing enums in the connector. You should convert the enum fields into strings using a map call in Spark and map them as keywords in Elasticsearch.


(Krishna Chaitanya Yalamanchili) #3

Thanks. I did that and this error was gone. Forgot to post my answer earlier.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.