changes for batch sampling
Merge branch 'master' of github.com:anantoni/SparrowWorker
TODO: remove JDK 1.8 support