You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/07/03 18:08:13 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #2089: HADOOP-17081. MetricsSystem doesn't start the sink adapters on restart

steveloughran commented on a change in pull request #2089:
URL: https://github.com/apache/hadoop/pull/2089#discussion_r449674051



##########
File path: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestMetricsSystemImpl.java
##########
@@ -639,4 +639,23 @@ public Boolean get() {
   private static String getPluginUrlsAsString() {
     return "file:metrics2-test-plugin.jar";
   }
+
+  @Test
+  public void testMetricSystemRestart() {
+    MetricsSystemImpl ms = new MetricsSystemImpl("msRestartTestSystem");
+    TestSink ts = new TestSink();
+    String sinkName = "restartTestSink";
+
+    try {
+      ms.start();
+      ms.register(sinkName, "", ts);
+      assertNotNull("an adapter should exist for each sink", ms.getSinkAdapter(sinkName));

Review comment:
       we're generally still 80 chars wide, I'm afraid...put the actual probe on a new line.
   nice to see some text for the assertion tnough -appreciated




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org