In the analytics-sample code there is a BlockingFlush plugin which uses java.util.concurrent.Phaser incorrectly.
The problem is if you actually try to use this in a production scenario it calls phaser.register() lots of times, but it never calls phaser.arriveAndDeregister(). Instead it calls phaser.arrive(). So after some time you will receive:
java.lang.IllegalStateException: Attempt to register more than 65535 parties for java.util.concurrent.Phaser@6cb672ad[phase = 0 parties = 65535 arrived = 65534]
I can't see how the BlockingFlush can work at all as-is. I think it needs to call phaser.arriveAndDeregister() instead?