FLUME-131: sinks throw interrupted exceptions
Review Request #1280 - Created Dec. 8, 2010 and submitted
Currently, there is some black magic for handling cancellation and interruptions of active sources and sinks. Some of the tricks include wrapping InterruptedExceptions with IOExceptions, reflagging interupted() stated on Threads and living with some flakey test cases. This API change makes interruption handling an explicit case that plugin writers would need to consider. It also helps us get away from the implicit interruption handling tricks and ideally will resolve us the "flakey" tests cases (most of which rely on interrupted exceptions in one way or another). This patch changes the sink api so that sinks and sink decorators throw interrupted exceptions. This patch has the bulk of the "mechanical" changes all the classes that are affected by this interface change. - update core to handle interruptable api. - javatest now handle interruptabl api. - java perf tests compiles against interruptable api - plugins example compiles against interruptable api - javatest-torture compiles against interruptable api - remove some deprecated code
Test pass. However, this patch is only the first of a series of patches -- it updates the interfaces enough so that all code compiles and runs but does not update the implementations! (interrupted exception are still wrapped with IOExceptions.) This will live in a separate branch until the we can confirm that this branch is no worse than before or the implementations are updated to use the interrupted exceptions correctly.