You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Markus Weimer <ma...@weimo.de> on 2016/04/19 22:30:11 UTC
Exception numbering?
Hi,
over on dev@spark, a nice way to make exception printouts more readable
was proposed:
On 4/18/2016 12:16 PM, Reynold Xin wrote to dev@spark.apache.org:
> (1) Create a common root class for all the exceptions (e.g. call it
> SparkException) used in Spark. We should make sure every time we
> catch an exception from a 3rd party library, we rethrow them as
> SparkException (a lot of places already do that). In
> SparkException's constructor, log the exception and the stacktrace.
>
> (2) SparkException has a monotonically increasing ID, and this ID
> appears in the exception error message (say at the end).
I really like the second part of it. We currently log exactly once on
the Java side and way more often on the .NET side. Hence, I don't think
we need to concern ourselves with the logging of the exceptions.
However, the numeric ID would be very useful, especially for REEF.NET
where each exception is logged more than once.
What do you think?
Markus
Re: Exception numbering?
Posted by Markus Weimer <ma...@weimo.de>.
On 2016-04-20 09:42, Dudoladov, Sergey wrote:
>> We currently log exactly once on the Java side
>
> AFAIK this policy is not enforced in REEF Java.
OK, my mistake!
> Did I get it right that the suggestion is to number exceptions to
> ease navigation in duplicated stack traces?
Yes, the idea is that each exception instance has a unique ID associated
with it. That ID could be a number, but also include the Evaluator or
Task ID where it was thrown. That way, we can follow an exception all
the way from the Task to the Driver.
Markus
Re: Exception numbering?
Posted by "Dudoladov, Sergey" <se...@tu-berlin.de>.
Hi,
> We currently log exactly once on the Java side
AFAIK this policy is not enforced in REEF Java.
> the great many replications of the same stack trace in the log files.
Did I get it right that the suggestion is to number exceptions to ease navigation in duplicated stack traces ?
Best,
Sergey.
Re: Exception numbering?
Posted by Markus Weimer <ma...@weimo.de>.
On 2016-04-19 16:17, Byung-Gon Chun wrote:
> Do we have multiple log lines for an exception in REEF.NET? Why is
> it different from REEF Java?
We used to have less of a strict protocol in Java, too. Sergiy took it
upon himself to rectify that. We might want to do the same for .NET.
In REEF.NET, we follow a scheme where all interactions with exceptions
happens through static methods on the `Exceptions` class. And those
methods log a lot, which leads to the great many replications of the
same stack trace in the log files. On the flip side, this should also
make it easy to change our logging policy.
Markus
Re: Exception numbering?
Posted by Byung-Gon Chun <bg...@gmail.com>.
(2) sounds good.
Do we have multiple log lines for an exception in REEF.NET? Why is it
different from REEF Java?
On Wed, Apr 20, 2016 at 5:30 AM, Markus Weimer <ma...@weimo.de> wrote:
> Hi,
>
> over on dev@spark, a nice way to make exception printouts more readable
> was proposed:
>
> On 4/18/2016 12:16 PM, Reynold Xin wrote to dev@spark.apache.org:
>
>> (1) Create a common root class for all the exceptions (e.g. call it
>> SparkException) used in Spark. We should make sure every time we
>> catch an exception from a 3rd party library, we rethrow them as
>> SparkException (a lot of places already do that). In
>> SparkException's constructor, log the exception and the stacktrace.
>>
>> (2) SparkException has a monotonically increasing ID, and this ID
>> appears in the exception error message (say at the end).
>>
>
>
> I really like the second part of it. We currently log exactly once on the
> Java side and way more often on the .NET side. Hence, I don't think we need
> to concern ourselves with the logging of the exceptions.
>
> However, the numeric ID would be very useful, especially for REEF.NET
> where each exception is logged more than once.
>
> What do you think?
>
> Markus
>
--
Byung-Gon Chun