Google News
logo
PySpark - Interview Questions
Explain Marshal Serializer?
With the help of Python’s Marshal Serializer, it serializes objects. Even if it supports fewer datatypes, it is faster than PickleSerializer.
class MarshalSerializer(FramedSerializer):
   def dumps(self, obj):
       return marshal.dumps(obj)
    def loads(self, obj):
       return marshal.loads(obj)
class MarshalSerializer(FramedSerializer):
   def dumps(self, obj):
       return marshal.dumps(obj)
    def loads(self, obj):
       return marshal.loads(obj)
Advertisement