jgit-spark-connector icon indicating copy to clipboard operation
jgit-spark-connector copied to clipboard

Expose Bblfsh UAST extraction errors in Engine

Open bzz opened this issue 7 years ago • 0 comments

This feature request is a followup on initial discussion (focused on correctness initially) started by @EgorBu https://github.com/src-d/engine/issues/165

Engine already handles Bblfsh errors well. Now the idea is to somehow expose Bblfsh UAST extraction exceptions to the Engine users.

This will help both:

  • applications that use Engine
  • and Bblfsh developers, to test things at scale

Context

Even at moderate scale of PGA, there are always many corner cases in data, that result in errors on UAST extraction, and as a user of Engine on cluster of machines - it would be nice to be able to identify and access those cases all together (without greping though all executor machines logs), group by case, analyze, etc.

Right now bblfsh errors are handled well and reported by Engine, but only in stderr of executors. So on a Spark cluster with many machines it is quite inconvenient to grep though all executor logs, in order to identify both: your job and then all bblfsh errors.

Proposal

As Engine uses DataFrame API, it is not possible to levirate Accumulators for building error summaries as in RDD.

Thus the I can see only a few option that are left:

  • make extractUASTs() add one extra column, exceptions: Seq[String]
  • somehow incorporate summary of errors, using Metrics (count of exceptions by type)

First approach has benefit of covering all the cases: i.e user can aggregate exception by type himself, and then drill down to the particular cases. Second one is less invasive but covers only a single case of getting overall dataset statistics.

bzz avatar Jun 28 '18 14:06 bzz