Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9922#discussion_r45792488
  
    --- Diff: python/pyspark/streaming/util.py ---
    @@ -89,22 +95,27 @@ def __init__(self, ctx, serializer, gateway=None):
             self.serializer = serializer
             self.gateway = gateway or self.ctx._gateway
             self.gateway.jvm.PythonDStream.registerSerializer(self)
    +        self.failure = None
     
         def dumps(self, id):
             try:
                 func = self.gateway.gateway_property.pool[id]
                 return bytearray(self.serializer.dumps((func.func, 
func.deserializers)))
    -        except Exception:
    -            traceback.print_exc()
    -            raise
    +        except:
    +            self.failure = traceback.format_exc()
     
         def loads(self, data):
             try:
                 f, deserializers = self.serializer.loads(bytes(data))
                 return TransformFunction(self.ctx, f, *deserializers)
    -        except Exception:
    -            traceback.print_exc()
    -            raise
    +        except:
    +            self.failure = traceback.format_exc()
    +
    +    def getFailure(self):
    --- End diff --
    
    Again, same comments as above. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to