brianmhess / cassandra-loader

Delimited file loader for Cassandra
Apache License 2.0
197 stars 93 forks source link

Loader should fail quickly on error #90

Open jcross-linkup opened 6 years ago

jcross-linkup commented 6 years ago

While using the loader, we noticed that a fatal failure would occur on one executor thread, but it would take quite a while for the entire program to exit. This is likely due to the res.get() blocking until the future has a result. Depending on the order of the futures and when they return, a failed thread may not return its result until after some successful threads complete. Since the user probably cares that a fatal error has occurred and would like to take corrective action, it makes sense to check on the threads occasionally and detect failures early. Once a failure is detected, the program should exit non-0.

We submitted a PR with the necessary changes: #89 Note that this PR also includes the commit from #88