MINOR: Make PushHttpMetricsReporter API compatible with releases back to 0.8.2.2
This is follow up to #4072 which added the PushHttpMetricsReporter and converted some services to use it. We somehow missed some compatibility issues that made the ProducerPerformance tool fail when using a newer tools jar with older common/clients jar, which we do with some system tests so we have all the features we need in the tool but can build compatibility tests for older releases.
This just adjusts some API usage to make the tool compatible with all previous releases.
I have a full run of the tests starting [here](https://jenkins.confluent.io/job/system-test-kafka-branch-builder/1122/)
Author: Ewen Cheslack-Postava <me@ewencp.org>
Reviewers: Ismael Juma <ismael@juma.me.uk>
Closes#4214 from ewencp/fix-compatibility-sanity-check-tests
@ -87,15 +87,15 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@@ -87,15 +87,15 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@ -106,17 +106,17 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@@ -106,17 +106,17 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@ -161,7 +161,7 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@@ -161,7 +161,7 @@ public class PushHttpMetricsReporter implements MetricsReporter {
try{
executor.awaitTermination(30,TimeUnit.SECONDS);
}catch(InterruptedExceptione){
thrownewInterruptException("Interrupted when shutting down PushHttpMetricsReporter",e);
thrownewKafkaException("Interrupted when shutting down PushHttpMetricsReporter",e);
}
}
@ -316,4 +316,17 @@ public class PushHttpMetricsReporter implements MetricsReporter {
@@ -316,4 +316,17 @@ public class PushHttpMetricsReporter implements MetricsReporter {
returnvalue;
}
}
// The signature for getInt changed from returning int to Integer so to remain compatible with 0.8.2.2 jars
// for system tests we replace it with a custom version that works for all versions.