Skip to content

Commit

Permalink
Merge pull request #17 from Shopify/errbit
Browse files Browse the repository at this point in the history
Errbit Integration
  • Loading branch information
Aaron Olson committed Feb 26, 2014
2 parents d5524da + a3653bb commit 468b67e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Binary file added python/lib/errbit-1.1.3.zip
Binary file not shown.
1 change: 1 addition & 0 deletions python/pyspark/__init__.py
Expand Up @@ -41,6 +41,7 @@
import sys
import os
sys.path.insert(0, os.path.join(os.environ["SPARK_HOME"], "python/lib/py4j-0.8.1-src.zip"))
sys.path.insert(0, os.path.join(os.environ["SPARK_HOME"], "python/lib/errbit-1.1.3.zip"))


from pyspark.conf import SparkConf
Expand Down
12 changes: 11 additions & 1 deletion python/pyspark/worker.py
Expand Up @@ -32,11 +32,21 @@
from pyspark.serializers import write_with_length, write_int, read_long, \
write_long, read_int, SpecialLengths, UTF8Deserializer, PickleSerializer


pickleSer = PickleSerializer()
utf8_deserializer = UTF8Deserializer()


import errbit
import errbit.client

def send_to_errbit(exctype, value, traceback):
client = errbit.client.Client()
client.post((exctype, value, traceback))
sys.__excepthook__(exctype, value, traceback)

sys.excepthook = send_to_errbit


def report_times(outfile, boot, init, finish):
write_int(SpecialLengths.TIMING_DATA, outfile)
write_long(1000 * boot, outfile)
Expand Down

0 comments on commit 468b67e

Please sign in to comment.