MINOR: Fix ProducerPerformance bug when numRecords > Integer.MAX
Current code will fall into non-stop loop and send more message to broker, and Stat in PerfCallback method record will throw ArrayIndexOutOfBoundsException
@@ -126,7 +126,7 @@ public class ProducerPerformance {
int currentTransactionSize = 0;
long transactionStartTime = 0;
- for (int i = 0; i < numRecords; i++) {
+ for (long i = 0; i < numRecords; i++) {
if (transactionsEnabled && currentTransactionSize == 0) {
producer.beginTransaction();
transactionStartTime = System.currentTimeMillis();
