[
https://issues.apache.org/jira/browse/STREAMS-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14178870#comment-14178870
]
ASF GitHub Bot commented on STREAMS-197:
----------------------------------------
Github user robdouglas commented on a diff in the pull request:
https://github.com/apache/incubator-streams/pull/107#discussion_r19171702
--- Diff:
streams-runtimes/streams-runtime-local/src/test/java/org/apache/streams/local/counters/DatumStatusCounterTest.java
---
@@ -0,0 +1,134 @@
+/*
+ * 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
+ *
+ * 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.streams.local.counters;
+
+import com.carrotsearch.randomizedtesting.RandomizedTest;
+import com.carrotsearch.randomizedtesting.annotations.Repeat;
+import org.junit.After;
+import org.junit.Test;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.ObjectName;
+import java.lang.management.ManagementFactory;
+
+/**
+ *
+ */
+public class DatumStatusCounterTest extends RandomizedTest {
+
+ private static final String MBEAN_ID = "test_id";
+
+
+
+ /**
+ * Remove registered mbeans from previous tests
+ * @throws Exception
+ */
+ @After
+ public void unregisterMXBean() throws Exception {
+ try {
+ ManagementFactory.getPlatformMBeanServer().unregisterMBean(new
ObjectName(String.format(DatumStatusCounter.NAME_TEMPLATE, MBEAN_ID)));
+ } catch (InstanceNotFoundException ife) {
+ //No-op
--- End diff --
Is there a reason you're not logging the exception here?
> Implement New Counting Classes
> ------------------------------
>
> Key: STREAMS-197
> URL: https://issues.apache.org/jira/browse/STREAMS-197
> Project: Streams
> Issue Type: Sub-task
> Reporter: Ryan Ebanks
>
> Need to implement threadsafe classes that will count datums at the task level
> and process (prov/proc/writer) level.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)