CreateDirectStream.foreachRDD error calling external object

the figure is as follows:
clipboard.png

def update_model(rdd),mixture_model:

clipboard.png

it"s OK to declare mixture_model directly in update_model, but every time you foreachRDD, you need to re-declare MingleModel. Makes it impossible to update the model in real time


false reading feels like there is no way to serialize read and write in mixture_model

Menu