You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/09/15 08:29:27 UTC
[GitHub] [hudi] liujinhui1994 opened a new pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
liujinhui1994 opened a new pull request #3667:
URL: https://github.com/apache/hudi/pull/3667
## *Tips*
- *Thank you very much for contributing to Apache Hudi.*
- *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
## What is the purpose of the pull request
GraphiteReporter periodSeconds should be configurable
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710789891
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteReportPeriodSeconds()).thenReturn(30);
+ new HoodieMetrics(config);
Review comment:
Why not extract it into a initialize method and mark it via `@BeforeEach` like `TestHoodieConsoleMetrics`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255)
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2262",
"triggerID" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257)
* 13611371aa425cf2acf4fee39dd78265d47d4703 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2262)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252)
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255)
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710767279
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteMerticReportPeriodSeconds()).thenReturn(30);
Review comment:
I mean verify and assert the `PeriodSeconds ` it's the major change of this PR, right? You can set a customized value instead of the default value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919832944
@hudi-bot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257)
* 13611371aa425cf2acf4fee39dd78265d47d4703 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-920688486
@hudi-bot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252)
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710875340
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteReportPeriodSeconds()).thenReturn(30);
+ new HoodieMetrics(config);
Review comment:
Yes, I have observed that there are other monitoring tests that are not handled in this way. I think we can start another PR to standardize unit tests and do this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233)
* aba0e0d101bfde2f42236fb65e5e212683dbe657 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234)
* aba0e0d101bfde2f42236fb65e5e212683dbe657 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234)
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233)
* aba0e0d101bfde2f42236fb65e5e212683dbe657 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2262",
"triggerID" : "13611371aa425cf2acf4fee39dd78265d47d4703",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 13611371aa425cf2acf4fee39dd78265d47d4703 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2262)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710042087
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteMerticReportPeriodSeconds()).thenReturn(30);
Review comment:
IMO, it would be better to verify this setting. WDYT?
##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
##########
@@ -1475,6 +1475,10 @@ public String getGraphiteMetricPrefix() {
return getString(HoodieMetricsGraphiteConfig.GRAPHITE_METRIC_PREFIX_VALUE);
}
+ public int getGraphiteMerticReportPeriodSeconds() {
Review comment:
too long....
What about renaming to `getGraphiteReportPeriodSeconds `?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"triggerType" : "PUSH"
}, {
"hash" : "53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257",
"triggerID" : "920688486",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2252) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2255)
* 53fea88f4c72ba3ec3c855f14bf244dbcaf0afc6 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2257)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua merged pull request #3667: [HUDI-2434] Make periodSeconds of GraphiteReporter configurable
Posted by GitBox <gi...@apache.org>.
yanghua merged pull request #3667:
URL: https://github.com/apache/hudi/pull/3667
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710060531
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteMerticReportPeriodSeconds()).thenReturn(30);
Review comment:
HoodieConfig is used here, I don't think it is necessary. Because Hoodie'Config has been used by many classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710981255
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteReportPeriodSeconds()).thenReturn(30);
+ new HoodieMetrics(config);
Review comment:
s.g.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234)
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 372ed628dd3af059afaedb29e9b5ebe3b0e1cc47 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710769505
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteMerticReportPeriodSeconds()).thenReturn(30);
Review comment:
I don't think it's necessary here because unit tests don't take default values here. Just set the valid value here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yanghua commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710767279
##########
File path: hudi-client/hudi-client-common/src/test/java/org/apache/hudi/metrics/TestHoodieGraphiteMetrics.java
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package org.apache.hudi.metrics;
+
+import org.apache.hudi.common.testutils.NetworkTestUtils;
+import org.apache.hudi.config.HoodieWriteConfig;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import static org.apache.hudi.metrics.Metrics.registerGauge;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.when;
+
+/**
+ * Test for the Graphite metrics report.
+ */
+@ExtendWith(MockitoExtension.class)
+public class TestHoodieGraphiteMetrics {
+
+ @Mock
+ HoodieWriteConfig config;
+
+ @AfterEach
+ void shutdownMetrics() {
+ Metrics.shutdown();
+ }
+
+ @Test
+ public void testRegisterGauge() {
+ when(config.isMetricsOn()).thenReturn(true);
+ when(config.getTableName()).thenReturn("table1");
+ when(config.getMetricsReporterType()).thenReturn(MetricsReporterType.GRAPHITE);
+ when(config.getGraphiteServerHost()).thenReturn("localhost");
+ when(config.getGraphiteServerPort()).thenReturn(NetworkTestUtils.nextFreePort());
+ when(config.getGraphiteMerticReportPeriodSeconds()).thenReturn(30);
Review comment:
I mean verify the `getGraphiteMerticReportPeriodSeconds ` it's the major change of this PR, right? You can set a customized value instead of the default value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#issuecomment-919813603
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2233",
"triggerID" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"triggerType" : "PUSH"
}, {
"hash" : "372ed628dd3af059afaedb29e9b5ebe3b0e1cc47",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2234",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"triggerType" : "PUSH"
}, {
"hash" : "aba0e0d101bfde2f42236fb65e5e212683dbe657",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236",
"triggerID" : "919832944",
"triggerType" : "MANUAL"
}, {
"hash" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "10f05d42a895e0c1083bb0ce3f7102f59416a012",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aba0e0d101bfde2f42236fb65e5e212683dbe657 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=2236)
* 10f05d42a895e0c1083bb0ce3f7102f59416a012 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3667: [HUDI-2434] Add GraphiteReporter reporter periodSeconds config
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3667:
URL: https://github.com/apache/hudi/pull/3667#discussion_r710060764
##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
##########
@@ -1475,6 +1475,10 @@ public String getGraphiteMetricPrefix() {
return getString(HoodieMetricsGraphiteConfig.GRAPHITE_METRIC_PREFIX_VALUE);
}
+ public int getGraphiteMerticReportPeriodSeconds() {
Review comment:
Ah, it's okay
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org