diff --git a/pom.xml b/pom.xml index a791cf6..e769f23 100644 --- a/pom.xml +++ b/pom.xml @@ -227,6 +227,7 @@ under the License. + ${project.artifactId}-${project.version} @@ -485,7 +486,7 @@ under the License. com.spotify docker-maven-plugin - 0.4.11 + 1.2.2 javax.activation @@ -496,11 +497,13 @@ under the License. ${docker.image.prefix}/${project.artifactId} + openjdk:8-alpine + / ${project.version} latest - src/main/docker + ["java", "-jar", "${project.build.finalName}-exec.jar"] / diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile deleted file mode 100644 index 792939a..0000000 --- a/src/main/docker/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM java:8 -MAINTAINER breeze -ADD rocketmq-exporter-0.0.2-SNAPSHOT-exec.jar rocketmq-exporter.jar -EXPOSE 5557 -ENTRYPOINT ["java","-jar","rocketmq-exporter.jar"] diff --git a/src/main/java/org/apache/rocketmq/exporter/task/MetricsCollectTask.java b/src/main/java/org/apache/rocketmq/exporter/task/MetricsCollectTask.java index e2e5f00..d8d84d2 100644 --- a/src/main/java/org/apache/rocketmq/exporter/task/MetricsCollectTask.java +++ b/src/main/java/org/apache/rocketmq/exporter/task/MetricsCollectTask.java @@ -716,7 +716,7 @@ public void collectBrokerGroupStats() { String brokerName = clusterEntry.getValue().getBrokerName(); String masterAddr = clusterEntry.getValue().getBrokerAddrs().get(MixAll.MASTER_ID); for (Map.Entry broker : clusterEntry.getValue().getBrokerAddrs().entrySet()) { - if(broker.getKey() == MixAll.MASTER_ID) { + if (broker.getKey() == MixAll.MASTER_ID) { continue; } BrokerRuntimeStats slaveRuntimeStats = getBrokerRuntimeStats(broker.getValue());