eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-927) add jmx resource info to Hadoop JMX Monitor
Date Thu, 23 Feb 2017 06:16:44 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15879953#comment-15879953
] 

ASF GitHub Bot commented on EAGLE-927:
--------------------------------------

Github user haoch commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/839#discussion_r102645205
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/test/java/org/apache/eagle/siddhiext/StringSubtractFunctionExtensionTest.java
---
    @@ -0,0 +1,62 @@
    +/*
    + * 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
    + * <p/>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p/>
    + * 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.eagle.siddhiext;
    +
    +import org.junit.*;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import org.wso2.siddhi.core.ExecutionPlanRuntime;
    +import org.wso2.siddhi.core.SiddhiManager;
    +import org.wso2.siddhi.core.event.Event;
    +import org.wso2.siddhi.core.stream.input.InputHandler;
    +import org.wso2.siddhi.core.stream.output.StreamCallback;
    +import org.wso2.siddhi.core.util.EventPrinter;
    +
    +public class StringSubtractFunctionExtensionTest {
    +    private static final Logger LOG = LoggerFactory.getLogger(StringSubtractFunctionExtensionTest.class);
    +
    +    @Test
    +    public void testStringSubtract() throws Exception {
    +        String ql = " define stream log(timestamp long, switchLabel string, port string,
message string); " +
    +                " from log select string:subtract(\"a:b:c:d:e:f:g\", \"g:a:e:d:z:r:s:c\")
as alertKey insert into output; ";
    +        SiddhiManager manager = new SiddhiManager();
    +        ExecutionPlanRuntime runtime = manager.createExecutionPlanRuntime(ql);
    +        runtime.addCallback("output", new StreamCallback() {
    +            @Override
    +            public void receive(Event[] events) {
    +                EventPrinter.print(events);
    +                Assert.assertTrue(events.length == 1);
    +                Assert.assertTrue(events[0].getData(0).toString().equals("z\nr\ns"));
    +            }
    +        });
    +
    +        runtime.start();
    +
    +        InputHandler logInput = runtime.getInputHandler("log");
    +
    +        Event e = new Event();
    +        e.setTimestamp(System.currentTimeMillis());
    +        e.setData(new Object[] {System.currentTimeMillis(), "switch-ra-slc-01", "port01",
"log-message...."});
    --- End diff --
    
    Remove sensitive info


> add jmx resource info to Hadoop JMX Monitor
> -------------------------------------------
>
>                 Key: EAGLE-927
>                 URL: https://issues.apache.org/jira/browse/EAGLE-927
>             Project: Eagle
>          Issue Type: Improvement
>          Components: App::Hadoop JMX Monitor
>    Affects Versions: v0.5.0
>            Reporter: wujinhu
>            Assignee: wujinhu
>             Fix For: v0.5.0
>
>
> We need add an stream(HADOOP_JMX_RESOURCE_STREAM) to stand for jmx resource like corrupt
files and live nodes and so on. For example, when we found missing block number via HADOOP_JMX_METRIC_STREAM
by define a policy, we can find missing block id via HADOOP_JMX_RESOURCE_STREAM



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message