linkedin / dr-elephant

Dr. Elephant is a job and flow-level performance monitoring and tuning tool for Apache Hadoop and Apache Spark
Apache License 2.0
1.35k stars 859 forks source link

[Spark EF][Enhancement]Adding De-Deuplication logic for Spark Exception Fingerprinting results #679

Open ShubhamGupta29 opened 4 years ago

ShubhamGupta29 commented 4 years ago

WHAT CHANGES ARE PROPOSED IN THIS PR This PR is aimed to add deDup logic before saving the EF results to the DB. Currently, there is no dedup is done in case of SparkExceptionFingerprinting, so the changes are done in this PR to look for the same Exception Stacktraces and remove the duplicate one from the result before saving them to the database. The problem with the result duplication is implicitly the memory resource wastage, no extra information for the end-user, some overhead while fetching the results for the API call.

How these changes are Tested Testing it on the EI machine. The current Unit tests are rigid in terms of flexibility to test new changes made, finding a way out to make them more structured and add tests for the done changes.

pralabhkumar commented 4 years ago

@ShubhamGupta29 This is only removing duplicate and not similar exceptions . We should have logic to remove simillar exceptions also

ShubhamGupta29 commented 4 years ago

These changes are made in accordance with DSS-24596. Also just an observation, in Spark there are not many similar exceptions as in TonY. In Spark, most of the exceptions will be having format of JavaExceptions, so huge chances are there for two exceptions to be the same. In Tony, most of the time exception stack traces did have only different container_id else whole so there was a lot of similarity between the logs. For Spark also I will add similarity logic but in different future PR.