Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Add registration-order disclaimer #23

Merged
merged 1 commit into from Jun 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -5,7 +5,11 @@ import org.apache.spark.serializer.{KryoRegistrator => BaseKryoRegistrator}

class KryoRegistrator extends BaseKryoRegistrator {
override def registerClasses(kryo: Kryo): Unit = {
// fortis
// !!!!!!!!!!!! ATTENTION !!!!!!!!!!!!
// the order of these registration calls matters as it determines the class ids
// so always add new classes at the end of this list
// more information: https://stackoverflow.com/a/32869053/3817588
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.dto.AnalyzedItem[_]])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.transforms.locations.Geofence])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.transforms.locations.PlaceRecognizer])
Expand All @@ -20,32 +24,22 @@ class KryoRegistrator extends BaseKryoRegistrator {
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.transforms.sentiment.CognitiveServicesSentimentDetector])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.transforms.sentiment.WordListSentimentDetector])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.transforms.sentiment.SentimentDetectorAuth])

// twitter
kryo.register(classOf[twitter4j.Status])
kryo.register(classOf[twitter4j.GeoLocation])
kryo.register(classOf[twitter4j.Place])
kryo.register(classOf[twitter4j.User])
kryo.register(classOf[twitter4j.Scopes])

// facebook
kryo.register(classOf[facebook4j.Post])
kryo.register(classOf[facebook4j.Category])
kryo.register(classOf[facebook4j.Privacy])
kryo.register(classOf[facebook4j.Place])
kryo.register(classOf[facebook4j.Comment])
kryo.register(classOf[facebook4j.Application])
kryo.register(classOf[facebook4j.Targeting])

// tadaweb
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.tadaweb.dto.TadawebEvent])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.tadaweb.dto.TadawebCity])
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.tadaweb.dto.TadawebTada])

// radio
kryo.register(classOf[com.microsoft.partnercatalyst.fortis.spark.streamwrappers.radio.RadioTranscription])

// instagram
kryo.register(classOf[com.github.catalystcode.fortis.spark.streaming.instagram.dto.InstagramItem])
kryo.register(classOf[com.github.catalystcode.fortis.spark.streaming.instagram.dto.InstagramUser])
kryo.register(classOf[com.github.catalystcode.fortis.spark.streaming.instagram.dto.InstagramLocation])
Expand Down