1. You don't want each executor to start at zero. What you want, is a EE-global value that starts at 0 when the batch starts at 0 and increments at each executor. For example, if I report to java every 10,000 processed tuples, and one executor scans 9000 tuples, then the next executor scans 9000 more, I will never call into java.

2. Stop with the incrementing and checking in all over the place and move this logic into progressUpdate(). Have it return super fast the EE-global counter is not evenly divisible by LONG_OP_THRESHOLD. Finally, rename it something like doLongOpTracking().