[
https://issues.apache.org/jira/browse/EAGLE-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15628434#comment-15628434
]
ASF GitHub Bot commented on EAGLE-690:
--------------------------------------
Github user haoch commented on a diff in the pull request:
https://github.com/apache/incubator-eagle/pull/570#discussion_r86106454
--- Diff:
eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/storm/HealthCheckParseBolt.java
---
@@ -0,0 +1,75 @@
+/*
+ * 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.eagle.topology.storm;
+
+import backtype.storm.task.OutputCollector;
+import backtype.storm.task.TopologyContext;
+import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.topology.base.BaseRichBolt;
+import backtype.storm.tuple.Fields;
+import backtype.storm.tuple.Tuple;
+import org.apache.eagle.topology.entity.HealthCheckParseAPIEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import storm.kafka.bolt.mapper.FieldNameBasedTupleToKafkaMapper;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.TreeMap;
+
+public class HealthCheckParseBolt extends BaseRichBolt {
+
+ private static final long serialVersionUID = 1L;
+
+ private static Logger LOG =
LoggerFactory.getLogger(HealthCheckParseBolt.class);
+ private OutputCollector collector;
+
+ @Override
+ public void prepare(Map map, TopologyContext topologyContext,
OutputCollector outputCollector) {
+ this.collector = outputCollector;
+ }
+
+ @Override
+ public void execute(Tuple tuple) {
+ HealthCheckParseAPIEntity result = null;
+ try{
+ result = (HealthCheckParseAPIEntity)
tuple.getValueByField("f1");
--- End diff --
check style
> Integrate topology health check with alert engine
> -------------------------------------------------
>
> Key: EAGLE-690
> URL: https://issues.apache.org/jira/browse/EAGLE-690
> Project: Eagle
> Issue Type: New Feature
> Affects Versions: v0.5.0
> Reporter: yupu
> Assignee: yupu
> Labels: features
> Fix For: v0.5.0
>
>
> Integrate topology health check with alert engine.
> It will send timestamp,tag,status to alert engine,when the node status is
> dead, alert engine will send the email to user
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)