This is an automated email from the ASF dual-hosted git repository. cserwen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/rocketmq-exporter.git
The following commit(s) were added to refs/heads/master by this push: new 72ce20c fix some errors which make exporter can't run (#142) 72ce20c is described below commit 72ce20c7983693e54f74075d68a9f04aa32c8644 Author: cserwen <cser...@apache.org> AuthorDate: Thu Dec 28 12:13:09 2023 +0800 fix some errors which make exporter can't run (#142) --- src/main/docker/Dockerfile | 2 +- .../java/org/apache/rocketmq/exporter/model/BrokerRuntimeStats.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 3a559ad..4953093 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -17,6 +17,6 @@ FROM java:8 MAINTAINER breeze -ADD rocketmq-exporter-0.0.2-SNAPSHOT.jar quickstart.jar +ADD rocketmq-exporter-0.0.2-SNAPSHOT-exec.jar quickstart.jar EXPOSE 5557 ENTRYPOINT ["java","-jar","quickstart.jar"] diff --git a/src/main/java/org/apache/rocketmq/exporter/model/BrokerRuntimeStats.java b/src/main/java/org/apache/rocketmq/exporter/model/BrokerRuntimeStats.java index 238aa96..921b5af 100644 --- a/src/main/java/org/apache/rocketmq/exporter/model/BrokerRuntimeStats.java +++ b/src/main/java/org/apache/rocketmq/exporter/model/BrokerRuntimeStats.java @@ -91,7 +91,11 @@ public class BrokerRuntimeStats { loadTps(this.putTps, kvTable.getTable().get("putTps")); loadTps(this.getMissTps, kvTable.getTable().get("getMissTps")); - loadTps(this.getTransferedTps, kvTable.getTable().get("getTransferredTps")); + if (kvTable.getTable().containsKey("getTransferredTps")) { + loadTps(this.getTransferedTps, kvTable.getTable().get("getTransferredTps")); + } else { + loadTps(this.getTransferedTps, kvTable.getTable().get("getTransferedTps")); + } loadTps(this.getTotalTps, kvTable.getTable().get("getTotalTps")); loadTps(this.getFoundTps, kvTable.getTable().get("getFoundTps"));