jerryshao/apache-spark — pull request #7 by tdas (2014-11-13 21:43:52+00:00)
Title: Refactor 1: Achieve deadlock-free lock ordering by subclassing BlockGenerator and taking receiver lock first in BlockGenerator.updateCurrentBuffer

- Subclassed BlockGenerator to make sure that the receiver lock is taken first before taking the block generator lock. So both threads (data insertion thread, and block generation thread) take locks in the same order.
- Changed offset check to distinguish between offset not existing and offset being 0
- Added a lot of docs on the callback's semantics
- Increased timeouts