You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2023/02/24 09:51:45 UTC
[ambari-metrics] branch branch-2.0 updated (594fe0e -> 339afc6)
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a change to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
from 594fe0e AMBARI-25860: Bump version to 2.0.0-1
new acf538b AMBARI-25866: Fix an unit test failure on ambari-metrics-kafka-sink (#104)
new 385f999 AMBARI-25864: Fix an unit test failure on ambari-metrics-common (#102)
new 418d013 AMBARI-25865: Fix an unit test failure on ambari-metrics-host-monitoring (#103)
new 339afc6 AMBARI-25860: Bump version to 2.0.0-2
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ambari-metrics-assembly/pom.xml | 4 ++--
ambari-metrics-common/pom.xml | 14 ++++++++++----
ambari-metrics-flume-sink/pom.xml | 4 ++--
ambari-metrics-grafana/pom.xml | 4 ++--
ambari-metrics-hadoop-sink/pom.xml | 4 ++--
ambari-metrics-host-aggregator/pom.xml | 4 ++--
ambari-metrics-host-monitoring/pom.xml | 10 +++-------
.../src/test/python/unitTests.py | 5 ++++-
ambari-metrics-kafka-sink/pom.xml | 4 ++--
.../kafka/KafkaTimelineMetricsReporterTest.java | 21 +++++++++++----------
ambari-metrics-storm-sink/pom.xml | 4 ++--
ambari-metrics-timelineservice/pom.xml | 4 ++--
pom.xml | 2 +-
13 files changed, 45 insertions(+), 39 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
[ambari-metrics] 01/04: AMBARI-25866: Fix an unit test failure on ambari-metrics-kafka-sink (#104)
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
commit acf538b76eb213c66355afa7a99fa2bdc8e783d0
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Fri Feb 24 15:29:17 2023 +0800
AMBARI-25866: Fix an unit test failure on ambari-metrics-kafka-sink (#104)
---
.../kafka/KafkaTimelineMetricsReporterTest.java | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java b/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
index cc56227..7187f47 100644
--- a/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
+++ b/ambari-metrics-kafka-sink/src/test/java/org/apache/hadoop/metrics2/sink/kafka/KafkaTimelineMetricsReporterTest.java
@@ -27,6 +27,7 @@ import com.yammer.metrics.core.Metric;
import com.yammer.metrics.core.MetricsRegistry;
import com.yammer.metrics.core.Timer;
import junit.framework.Assert;
+import kafka.metrics.KafkaYammerMetrics;
import kafka.utils.VerifiableProperties;
import org.apache.hadoop.metrics2.sink.timeline.TimelineMetric;
import org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache;
@@ -51,7 +52,7 @@ import static org.powermock.api.easymock.PowerMock.verifyAll;
@RunWith(PowerMockRunner.class)
@PrepareForTest({ Metrics.class, URL.class, OutputStream.class,
- KafkaTimelineMetricsReporter.TimelineScheduledReporter.class })
+ KafkaTimelineMetricsReporter.TimelineScheduledReporter.class, KafkaYammerMetrics.class })
@PowerMockIgnore({"javax.management.*", "org.apache.log4j.*", "org.slf4j.*"})
public class KafkaTimelineMetricsReporterTest {
@@ -92,11 +93,11 @@ public class KafkaTimelineMetricsReporterTest {
@Test
public void testReporterStartStop() {
- mockStatic(Metrics.class);
- EasyMock.expect(Metrics.defaultRegistry()).andReturn(registry).times(2);
+ mockStatic(KafkaYammerMetrics.class);
+ EasyMock.expect(KafkaYammerMetrics.defaultRegistry()).andReturn(registry).times(2);
TimelineMetricsCache timelineMetricsCache = getTimelineMetricsCache(kafkaTimelineMetricsReporter);
kafkaTimelineMetricsReporter.setMetricsCache(timelineMetricsCache);
- replay(Metrics.class, timelineMetricsCache);
+ replay(KafkaYammerMetrics.class, timelineMetricsCache);
kafkaTimelineMetricsReporter.init(props);
kafkaTimelineMetricsReporter.stopReporter();
verifyAll();
@@ -104,11 +105,11 @@ public class KafkaTimelineMetricsReporterTest {
@Test
public void testReporterStartStopHttps() {
- mockStatic(Metrics.class);
- EasyMock.expect(Metrics.defaultRegistry()).andReturn(registry).times(2);
+ mockStatic(KafkaYammerMetrics.class);
+ EasyMock.expect(KafkaYammerMetrics.defaultRegistry()).andReturn(registry).times(2);
TimelineMetricsCache timelineMetricsCache = getTimelineMetricsCache(kafkaTimelineMetricsReporter);
kafkaTimelineMetricsReporter.setMetricsCache(timelineMetricsCache);
- replay(Metrics.class, timelineMetricsCache);
+ replay(KafkaYammerMetrics.class, timelineMetricsCache);
Properties properties = new Properties();
properties.setProperty("zookeeper.connect", "localhost:2181");
@@ -133,12 +134,12 @@ public class KafkaTimelineMetricsReporterTest {
@Test
public void testMetricsExclusionPolicy() throws Exception {
- mockStatic(Metrics.class);
- EasyMock.expect(Metrics.defaultRegistry()).andReturn(registry).times(2);
+ mockStatic(KafkaYammerMetrics.class);
+ EasyMock.expect(KafkaYammerMetrics.defaultRegistry()).andReturn(registry).times(2);
TimelineMetricsCache timelineMetricsCache = getTimelineMetricsCache(kafkaTimelineMetricsReporter);
kafkaTimelineMetricsReporter.setMetricsCache(timelineMetricsCache);
- replay(Metrics.class, timelineMetricsCache);
+ replay(KafkaYammerMetrics.class, timelineMetricsCache);
kafkaTimelineMetricsReporter.init(props);
Assert.assertTrue(kafkaTimelineMetricsReporter.isExcludedMetric("a.b.c"));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
[ambari-metrics] 04/04: AMBARI-25860: Bump version to 2.0.0-2
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
commit 339afc60221efd910913f82b2b956fbfd6dcaba7
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Fri Feb 24 00:31:34 2023 -0800
AMBARI-25860: Bump version to 2.0.0-2
---
ambari-metrics-assembly/pom.xml | 4 ++--
ambari-metrics-common/pom.xml | 2 +-
ambari-metrics-flume-sink/pom.xml | 4 ++--
ambari-metrics-grafana/pom.xml | 4 ++--
ambari-metrics-hadoop-sink/pom.xml | 4 ++--
ambari-metrics-host-aggregator/pom.xml | 4 ++--
ambari-metrics-host-monitoring/pom.xml | 4 ++--
ambari-metrics-kafka-sink/pom.xml | 4 ++--
ambari-metrics-storm-sink/pom.xml | 4 ++--
ambari-metrics-timelineservice/pom.xml | 4 ++--
pom.xml | 2 +-
11 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/ambari-metrics-assembly/pom.xml b/ambari-metrics-assembly/pom.xml
index ae9c4a1..ee1bd47 100644
--- a/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics-assembly/pom.xml
@@ -23,13 +23,13 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-assembly</artifactId>
<name>Ambari Metrics Assembly</name>
<packaging>pom</packaging>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<description>Ambari Metrics Assembly</description>
<properties>
diff --git a/ambari-metrics-common/pom.xml b/ambari-metrics-common/pom.xml
index a5199ee..5b8d141 100644
--- a/ambari-metrics-common/pom.xml
+++ b/ambari-metrics-common/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-common</artifactId>
diff --git a/ambari-metrics-flume-sink/pom.xml b/ambari-metrics-flume-sink/pom.xml
index 51b6781..0dc82fd 100644
--- a/ambari-metrics-flume-sink/pom.xml
+++ b/ambari-metrics-flume-sink/pom.xml
@@ -22,11 +22,11 @@ limitations under the License.
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-flume-sink</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<name>Ambari Metrics Flume Sink</name>
<packaging>jar</packaging>
<build>
diff --git a/ambari-metrics-grafana/pom.xml b/ambari-metrics-grafana/pom.xml
index 886ce54..b769e12 100644
--- a/ambari-metrics-grafana/pom.xml
+++ b/ambari-metrics-grafana/pom.xml
@@ -21,14 +21,14 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-grafana</artifactId>
<name>Ambari Metrics Grafana</name>
<packaging>pom</packaging>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<description>Ambari Metrics Grafana</description>
<build>
diff --git a/ambari-metrics-hadoop-sink/pom.xml b/ambari-metrics-hadoop-sink/pom.xml
index a78858b..22a3155 100644
--- a/ambari-metrics-hadoop-sink/pom.xml
+++ b/ambari-metrics-hadoop-sink/pom.xml
@@ -22,11 +22,11 @@ limitations under the License.
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-hadoop-sink</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<name>Ambari Metrics Hadoop Sink</name>
<packaging>jar</packaging>
<properties>
diff --git a/ambari-metrics-host-aggregator/pom.xml b/ambari-metrics-host-aggregator/pom.xml
index 472ce93..dded96a 100644
--- a/ambari-metrics-host-aggregator/pom.xml
+++ b/ambari-metrics-host-aggregator/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -46,7 +46,7 @@
<dependency>
<groupId>org.apache.ambari</groupId>
<artifactId>ambari-metrics-common</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/ambari-metrics-host-monitoring/pom.xml b/ambari-metrics-host-monitoring/pom.xml
index 786daa3..a3623da 100644
--- a/ambari-metrics-host-monitoring/pom.xml
+++ b/ambari-metrics-host-monitoring/pom.xml
@@ -22,11 +22,11 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<artifactId>ambari-metrics-host-monitoring</artifactId>
<name>Ambari Metrics Monitor</name>
<properties>
diff --git a/ambari-metrics-kafka-sink/pom.xml b/ambari-metrics-kafka-sink/pom.xml
index c4321dc..9e83df2 100644
--- a/ambari-metrics-kafka-sink/pom.xml
+++ b/ambari-metrics-kafka-sink/pom.xml
@@ -22,11 +22,11 @@ limitations under the License.
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-kafka-sink</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<name>Ambari Metrics Kafka Sink</name>
<packaging>jar</packaging>
<build>
diff --git a/ambari-metrics-storm-sink/pom.xml b/ambari-metrics-storm-sink/pom.xml
index 8e9a711..06d60f0 100644
--- a/ambari-metrics-storm-sink/pom.xml
+++ b/ambari-metrics-storm-sink/pom.xml
@@ -22,11 +22,11 @@ limitations under the License.
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-storm-sink</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<name>Ambari Metrics Storm Sink</name>
<packaging>jar</packaging>
diff --git a/ambari-metrics-timelineservice/pom.xml b/ambari-metrics-timelineservice/pom.xml
index 5bc9653..18c1b16 100644
--- a/ambari-metrics-timelineservice/pom.xml
+++ b/ambari-metrics-timelineservice/pom.xml
@@ -22,11 +22,11 @@
<parent>
<artifactId>ambari-metrics</artifactId>
<groupId>org.apache.ambari</groupId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics-timelineservice</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<name>Ambari Metrics Collector</name>
<packaging>jar</packaging>
diff --git a/pom.xml b/pom.xml
index f9c66ab..29e4b5f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.apache.ambari</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-metrics</artifactId>
- <version>2.0.0-1</version>
+ <version>2.0.0-2</version>
<packaging>pom</packaging>
<modules>
<module>ambari-metrics-common</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
[ambari-metrics] 02/04: AMBARI-25864: Fix an unit test failure on ambari-metrics-common (#102)
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
commit 385f999e989071bdad4f0bad1dcf7d8d465fcac1
Author: Kengo Seki <se...@apache.org>
AuthorDate: Fri Feb 24 17:24:38 2023 +0900
AMBARI-25864: Fix an unit test failure on ambari-metrics-common (#102)
---
ambari-metrics-common/pom.xml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/ambari-metrics-common/pom.xml b/ambari-metrics-common/pom.xml
index f90c92f..a5199ee 100644
--- a/ambari-metrics-common/pom.xml
+++ b/ambari-metrics-common/pom.xml
@@ -151,6 +151,11 @@
<artifactId>commons-math3</artifactId>
<version>3.1.1</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.2</version>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -174,9 +179,10 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.2</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>test</scope>
</dependency>
</dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
[ambari-metrics] 03/04: AMBARI-25865: Fix an unit test failure on ambari-metrics-host-monitoring (#103)
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/ambari-metrics.git
commit 418d0136bb6fa3e817083f14e573a8018625dd71
Author: Kengo Seki <se...@apache.org>
AuthorDate: Fri Feb 24 17:25:07 2023 +0900
AMBARI-25865: Fix an unit test failure on ambari-metrics-host-monitoring (#103)
---
ambari-metrics-host-monitoring/pom.xml | 6 +-----
ambari-metrics-host-monitoring/src/test/python/unitTests.py | 5 ++++-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/ambari-metrics-host-monitoring/pom.xml b/ambari-metrics-host-monitoring/pom.xml
index 2e54d3c..786daa3 100644
--- a/ambari-metrics-host-monitoring/pom.xml
+++ b/ambari-metrics-host-monitoring/pom.xml
@@ -44,7 +44,7 @@
<fileset>
<directory>${project.basedir}/src/main/python/psutil/build/</directory>
<includes>
- <include>**/*</include>
+ <include>**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
@@ -188,10 +188,6 @@
<exec dir="${basedir}/src/main/python/psutil" executable="${executable.python}" failonerror="true">
<arg value="setup.py" />
<arg value="build" />
- <arg value="--build-temp" />
- <arg value="${basedir}/target/psutil_build_temp" />
- <arg value="--build-base" />
- <arg value="${basedir}/target/psutil_build" />
</exec>
</target>
</configuration>
diff --git a/ambari-metrics-host-monitoring/src/test/python/unitTests.py b/ambari-metrics-host-monitoring/src/test/python/unitTests.py
index 7445546..f4aa845 100644
--- a/ambari-metrics-host-monitoring/src/test/python/unitTests.py
+++ b/ambari-metrics-host-monitoring/src/test/python/unitTests.py
@@ -100,8 +100,11 @@ def main():
test_mask = TEST_MASK
tests = get_test_files(pwd, mask=test_mask, recursive=True)
- shuffle(tests)
modules = [os.path.basename(s)[:-3] for s in tests]
+ # Workaround for AMBARI-25865. This avoids loading psutil too early.
+ i = modules.index("TestHostInfo")
+ if -1 < i:
+ modules.append(modules.pop(i))
suites = [unittest.defaultTestLoader.loadTestsFromName(name) for name in
modules]
testSuite = unittest.TestSuite(suites)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org