aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/streaming/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyspark/streaming/util.py')
-rw-r--r--python/pyspark/streaming/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/streaming/util.py b/python/pyspark/streaming/util.py
index e617fc9ce9..abbbf6eb93 100644
--- a/python/pyspark/streaming/util.py
+++ b/python/pyspark/streaming/util.py
@@ -89,10 +89,11 @@ class TransformFunctionSerializer(object):
it uses this class to invoke Python, which returns the serialized function
as a byte array.
"""
- def init(self, ctx, serializer, gateway=None):
+ def __init__(self, ctx, serializer, gateway=None):
self.ctx = ctx
self.serializer = serializer
self.gateway = gateway or self.ctx._gateway
+ self.gateway.jvm.PythonDStream.registerSerializer(self)
self.failure = None
def dumps(self, id):