You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ce...@apache.org on 2016/01/26 15:18:32 UTC
[54/89] [abbrv] incubator-metron git commit: Move all com/apache
folders to org/apache
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/bolts/PrintingBolt.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/bolts/PrintingBolt.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/bolts/PrintingBolt.java
deleted file mode 100644
index 4938585..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/bolts/PrintingBolt.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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 com.apache.metron.test.bolts;
-
-import java.util.Map;
-
-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.Tuple;
-
-@SuppressWarnings("serial")
-public class PrintingBolt extends BaseRichBolt {
-
- @SuppressWarnings("rawtypes")
- public void prepare(Map stormConf, TopologyContext context,
- OutputCollector collector) {
- // TODO Auto-generated method stub
-
- }
-
- public void execute(Tuple input) {
- System.out.println("---------[RECEIVED] " + input);
-
- }
-
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- // TODO Auto-generated method stub
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/filereaders/FileReader.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/filereaders/FileReader.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/filereaders/FileReader.java
deleted file mode 100644
index 886baca..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/filereaders/FileReader.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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 com.apache.metron.test.filereaders;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.LinkedList;
-import java.util.List;
-
-public class FileReader {
- public List<String> readFromFile(String filename) throws IOException
- {
-
- System.out.println("Reading stream from " + filename);
-
- List<String> lines = new LinkedList<String>();
-
- InputStream stream = Thread.currentThread().getContextClassLoader()
- .getResourceAsStream(filename);
-
- DataInputStream in = new DataInputStream(stream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- String strLine;
- while ((strLine = br.readLine()) != null)
- {
- //System.out.println("-----------------I READ: " + strLine);
- lines.add(strLine);
- }
- //br.close();
-
- return lines;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/GenericInternalTestSpout.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/GenericInternalTestSpout.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/GenericInternalTestSpout.java
deleted file mode 100644
index 0f52e26..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/GenericInternalTestSpout.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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 com.apache.metron.test.spouts;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-import com.apache.metron.test.filereaders.FileReader;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-
-
-public class GenericInternalTestSpout extends BaseRichSpout {
-
-
- /**
- *
- */
- private static final long serialVersionUID = -2379344923143372543L;
-
- List<String> jsons;
-
- private String _filename;
- private int _delay = 100;
- private boolean _repeating = true;
-
- private SpoutOutputCollector _collector;
- private FileReader Reader;
- private int cnt = 0;
-
- public GenericInternalTestSpout withFilename(String filename)
- {
- _filename = filename;
- return this;
- }
- public GenericInternalTestSpout withMilisecondDelay(int delay)
- {
- _delay = delay;
- return this;
- }
-
- public GenericInternalTestSpout withRepeating(boolean repeating)
- {
- _repeating = repeating;
- return this;
- }
-
-
- @SuppressWarnings("rawtypes")
- public void open(Map conf, TopologyContext context,
- SpoutOutputCollector collector) {
-
- _collector = collector;
- try {
- Reader = new FileReader();
- jsons = Reader.readFromFile(_filename);
-
-
- } catch (IOException e)
- {
- System.out.println("Could not read sample JSONs");
- e.printStackTrace();
- }
-
- }
-
- public void nextTuple() {
- Utils.sleep(_delay);
-
- if(cnt < jsons.size())
- {
- _collector.emit(new Values(jsons.get(cnt).getBytes()));
- }
- cnt ++;
-
- if(_repeating && cnt == jsons.size() -1 )
- cnt = 0;
- }
-
- @Override
- public void ack(Object id) {
- }
-
- @Override
- public void fail(Object id) {
- }
-
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
- declarer.declare(new Fields("message"));
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/PcapSimulatorSpout.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/PcapSimulatorSpout.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/PcapSimulatorSpout.java
deleted file mode 100644
index 6e47b95..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/test/spouts/PcapSimulatorSpout.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package com.apache.metron.test.spouts;
-
-import java.util.Map;
-import java.util.Random;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Values;
-import com.apache.metron.pcap.PcapUtils;
-
-
-/**
- * The Class PcapSimulatorSpout.
- */
-public class PcapSimulatorSpout extends BaseRichSpout {
-
- /** The Constant serialVersionUID. */
- private static final long serialVersionUID = -5878104600899840638L;
-
- /** The collector. */
- private SpoutOutputCollector collector = null;
-
- /** The Constant randomIpSegmentGenerator. */
- private static final Random randomIpSegmentGenerator = new Random(255);
-
- /** The Constant randomPortGenerator. */
- private static final Random randomPortGenerator = new Random(64000);
-
- /** The Constant randomJsonGenerator. */
- private static final Random randomJsonGenerator = new Random(8);
-
- /** The Constant randomProtocolGenerator. */
- private static final Random randomProtocolGenerator = new Random(255);
-
- /** The message size. */
- private static int messageSize = 30000;
-
- /** The pcap. */
- private static byte[] pcap = new byte[messageSize];
-
- /** The Constant randomPcapGenerator. */
- private static final Random randomPcapGenerator = new Random();
-
- /** The json doc. */
- private static String jsonDoc;
-
- /** The ts. */
- private static long ts;
-
- /** The group key. */
- private static String groupKey;
-
- /** The ip addr. */
- StringBuffer ipAddr = new StringBuffer();
-
- /** The Constant jsonDocs. */
- private static final String[] jsonDocs = {
- "{ \"header\": { \"IncLen\": 124,\"OrigLen\": 124,\"TsSec\": 1391740061,\"TsUsec\": 723610},\"ipv4header\": { \"Destination\": -1407317716,\"DestinationAddress\": \"172.30.9.44\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 22550,\"Id\": 30686,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317715,\"SourceAddress\": \"172.30.9.45\",\"Tos\": 0,\"TotalLength\": 110,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": 1331776820,\"Checksum\": 21822,\"DataLength\": 58,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.44\",\"DestinationPort\": 9092,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": 337331842,\"SessionKey\": \"172.30.9.45:56412 -> 172.30.9.44:9092\",\"SourceAddress\": \"172.30.9.45\",\"SourcePort\": 56412,\"TotalLength\": 90,\"UrgentPointer\": 0,\"Window\": 115}}",
- "{ \"header\": { \"IncLen\": 60,\"OrigLen\": 60,\"TsSec\": 1391743533,\"TsUsec\": 523808},\"ipv4header\": { \"Destination\": 202,\"DestinationAddress\": \"0.0.0.202\",\"Flags\": 0,\"FragmentOffset\": 572,\"HeaderChecksum\": 21631,\"Id\": 2,\"Ihl\": 8,\"Protocol\": 0,\"Source\": -285366020,\"SourceAddress\": \"238.253.168.252\",\"Tos\": 66,\"TotalLength\": 768,\"Ttl\": 128,\"Version\": 4}} ",
- "{ \"header\": { \"IncLen\": 64,\"OrigLen\": 64,\"TsSec\": 1391729466,\"TsUsec\": 626286},\"ipv4header\": { \"Destination\": -55296,\"DestinationAddress\": \"255.255.40.0\",\"Flags\": 0,\"FragmentOffset\": 0,\"HeaderChecksum\": 28302,\"Id\": 62546,\"Ihl\": 0,\"Protocol\": 0,\"Source\": 151031295,\"SourceAddress\": \"9.0.141.255\",\"Tos\": 60,\"TotalLength\": 14875,\"Ttl\": 0,\"Version\": 0}}",
- "{ \"header\": { \"IncLen\": 64,\"OrigLen\": 64,\"TsSec\": 1391729470,\"TsUsec\": 404175},\"ipv4header\": { \"Destination\": -55296,\"DestinationAddress\": \"255.255.40.0\",\"Flags\": 0,\"FragmentOffset\": 0,\"HeaderChecksum\": 53034,\"Id\": 62546,\"Ihl\": 0,\"Protocol\": 0,\"Source\": 100699647,\"SourceAddress\": \"6.0.141.255\",\"Tos\": 60,\"TotalLength\": 15899,\"Ttl\": 0,\"Version\": 0}}",
- "{ \"header\": { \"IncLen\": 64,\"OrigLen\": 64,\"TsSec\": 1391729470,\"TsUsec\": 991207},\"ipv4header\": { \"Destination\": -55296,\"DestinationAddress\": \"255.255.40.0\",\"Flags\": 0,\"FragmentOffset\": 0,\"HeaderChecksum\": 59167,\"Id\": 62546,\"Ihl\": 0,\"Protocol\": 0,\"Source\": 251694591,\"SourceAddress\": \"15.0.141.255\",\"Tos\": 60,\"TotalLength\": 15899,\"Ttl\": 0,\"Version\": 0}}",
- "{ \"header\": { \"IncLen\": 78,\"OrigLen\": 78,\"TsSec\": 1391743531,\"TsUsec\": 617746},\"ipv4header\": { \"Destination\": -1407317706,\"DestinationAddress\": \"172.30.9.54\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 12015,\"Id\": 41253,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317711,\"SourceAddress\": \"172.30.9.49\",\"Tos\": 0,\"TotalLength\": 64,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": -854627611,\"Checksum\": 28439,\"DataLength\": 12,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.54\",\"DestinationPort\": 43457,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": -70750910,\"SessionKey\": \"172.30.9.49:9092 -> 172.30.9.54:43457\",\"SourceAddress\": \"172.30.9.49\",\"SourcePort\": 9092,\"TotalLength\": 44,\"UrgentPointer\": 0,\"Window\": 1453}}",
- "{ \"header\": { \"IncLen\": 78,\"OrigLen\": 78,\"TsSec\": 1391743532,\"TsUsec\": 78633},\"ipv4header\": { \"Destination\": -1407317706,\"DestinationAddress\": \"172.30.9.54\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 26235,\"Id\": 27034,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317712,\"SourceAddress\": \"172.30.9.48\",\"Tos\": 0,\"TotalLength\": 64,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": 965354559,\"Checksum\": 6890,\"DataLength\": 12,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.54\",\"DestinationPort\": 37051,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": -1654276327,\"SessionKey\": \"172.30.9.48:9092 -> 172.30.9.54:37051\",\"SourceAddress\": \"172.30.9.48\",\"SourcePort\": 9092,\"TotalLength\": 44,\"UrgentPointer\": 0,\"Window\": 1453}}",
- "{ \"header\": { \"IncLen\": 78,\"OrigLen\": 78,\"TsSec\": 1391743634,\"TsUsec\": 784540},\"ipv4header\": { \"Destination\": -1407317710,\"DestinationAddress\": \"172.30.9.50\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 46490,\"Id\": 6784,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317713,\"SourceAddress\": \"172.30.9.47\",\"Tos\": 0,\"TotalLength\": 64,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": -477288801,\"Checksum\": 60687,\"DataLength\": 12,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.50\",\"DestinationPort\": 53561,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": -1890443606,\"SessionKey\": \"172.30.9.47:9092 -> 172.30.9.50:53561\",\"SourceAddress\": \"172.30.9.47\",\"SourcePort\": 9092,\"TotalLength\": 44,\"UrgentPointer\": 0,\"Window\": 1453}}",
- "{ \"header\": { \"IncLen\": 78,\"OrigLen\": 78,\"TsSec\": 1391743683,\"TsUsec\": 495234},\"ipv4header\": { \"Destination\": -1407317711,\"DestinationAddress\": \"172.30.9.49\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 48322,\"Id\": 4956,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317716,\"SourceAddress\": \"172.30.9.44\",\"Tos\": 0,\"TotalLength\": 64,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": -1825947455,\"Checksum\": 27340,\"DataLength\": 12,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.49\",\"DestinationPort\": 37738,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": -496700614,\"SessionKey\": \"172.30.9.44:9092 -> 172.30.9.49:37738\",\"SourceAddress\": \"172.30.9.44\",\"SourcePort\": 9092,\"TotalLength\": 44,\"UrgentPointer\": 0,\"Window\": 1453}}",
- "{ \"header\": { \"IncLen\": 78,\"OrigLen\": 78,\"TsSec\": 1391743772,\"TsUsec\": 719493},\"ipv4header\": { \"Destination\": -1407317715,\"DestinationAddress\": \"172.30.9.45\",\"Flags\": 2,\"FragmentOffset\": 0,\"HeaderChecksum\": 39105,\"Id\": 14173,\"Ihl\": 20,\"Protocol\": 6,\"Source\": -1407317712,\"SourceAddress\": \"172.30.9.48\",\"Tos\": 0,\"TotalLength\": 64,\"Ttl\": 64,\"Version\": 4},\"tcpheader\": { \"Ack\": 898627232,\"Checksum\": 57115,\"DataLength\": 12,\"DataOffset\": 8,\"DestinationAddress\": \"172.30.9.45\",\"DestinationPort\": 45629,\"Direction\": null,\"Flags\": 24,\"ReassembledLength \": 0,\"RelativeAck\": 0,\"RelativeSeq\": 0,\"Seq\": 1030775351,\"SessionKey\": \"172.30.9.48:9092 -> 172.30.9.45:45629\",\"SourceAddress\": \"172.30.9.48\",\"SourcePort\": 9092,\"TotalLength\": 44,\"UrgentPointer\": 0,\"Window\": 1453}}" };
-
- /** The Constant protoCols. */
- private static final String[] protoCols = { "TCP", "UDP", "SNMP" };
-
- /*
- * (non-Javadoc)
- *
- * @see backtype.storm.spout.ISpout#open(java.util.Map,
- * backtype.storm.task.TopologyContext,
- * backtype.storm.spout.SpoutOutputCollector)
- */
- public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-
- System.out.println("Opening PcapSimulatorSpout");
-
- this.collector = collector;
-
- if (conf.containsKey("storm.topology.pcap.spout.pcap-kafka-simulator-spout.packet.size.in.bytes")) {
-
- messageSize = Integer.valueOf(conf.get("storm.topology.pcap.spout.pcap-kafka-simulator-spout.packet.size.in.bytes").toString());
- pcap = new byte[messageSize];
-
- System.out.println("Using message size : " + messageSize);
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see backtype.storm.spout.ISpout#nextTuple()
- */
- public void nextTuple() {
-
- // System.out.println("nextTuple of PcapSimulatorSpout");
- ipAddr.setLength(0);
- String srcAddr = ipAddr.append(randomIpSegmentGenerator.nextInt(255)).append('.').append(randomIpSegmentGenerator.nextInt(255))
- .append('.').append(randomIpSegmentGenerator.nextInt(255)).append('.').append(randomIpSegmentGenerator.nextInt(255)).toString();
- ipAddr.setLength(0);
- String dstAddr = ipAddr.append(randomIpSegmentGenerator.nextInt(255)).append('.').append(randomIpSegmentGenerator.nextInt(255))
- .append('.').append(randomIpSegmentGenerator.nextInt(255)).append('.').append(randomIpSegmentGenerator.nextInt(255)).toString();
-
- String key = PcapUtils.getSessionKey(srcAddr, dstAddr, String.valueOf(randomProtocolGenerator.nextInt(255)),
- String.valueOf(randomPortGenerator.nextInt(64000)), String.valueOf(randomPortGenerator.nextInt(64000)), "0", "0");
-
- jsonDoc = jsonDocs[randomJsonGenerator.nextInt(8)];
- ts = System.currentTimeMillis() + randomPortGenerator.nextInt();
- randomPcapGenerator.nextBytes(pcap);
-
- collector.emit(new Values(srcAddr, key.toString(), jsonDoc, ts, pcap));
-
- collector.emit("pcap_index_stream", new Values(jsonDoc, key));
- collector.emit("pcap_header_stream", new Values(jsonDoc, key));
- collector.emit("pcap_data_stream", new Values(key.toString(), ts, pcap));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * backtype.storm.topology.IComponent#declareOutputFields(backtype.storm.topology
- * .OutputFieldsDeclarer)
- */
- public void declareOutputFields(OutputFieldsDeclarer declarer) {
-
- System.out.println("Declaring output fields of PcapSimulatorSpout");
-
- declarer.declareStream("pcap_index_stream", new Fields("index_json"));
- declarer.declareStream("pcap_header_stream", new Fields("header_json"));
- declarer.declareStream("pcap_data_stream", new Fields("pcap_id", "timestamp", "pcap"));
-
- }
-
- @Override
- public void ack(Object id) {
- }
-
- @Override
- public void fail(Object id) {
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Asa.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Asa.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Asa.java
deleted file mode 100644
index ed27764..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Asa.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.AsaRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-
-/**
- * Topology for processing Asa messages
- *
- */
-public class Asa{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new AsaRunner();
- runner.initTopology(args, "asa");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Bro.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Bro.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Bro.java
deleted file mode 100644
index f246adb..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Bro.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.BroRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-public class Bro{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new BroRunner();
- runner.initTopology(args, "bro");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/FireEye.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/FireEye.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/FireEye.java
deleted file mode 100644
index 2a7a294..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/FireEye.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-import backtype.storm.generated.InvalidTopologyException;
-import com.apache.metron.topology.runner.FireEyeRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-
-/**
- * Topology for processing FireEye syslog messages
- *
- */
-public class FireEye {
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new FireEyeRunner();
- runner.initTopology(args, "fireeye");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Ise.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Ise.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Ise.java
deleted file mode 100644
index 85099a8..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Ise.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.ISERunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-/**
- * Topology for processing Ise messages
- *
- */
-public class Ise{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new ISERunner();
- runner.initTopology(args, "ise");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Lancope.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Lancope.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Lancope.java
deleted file mode 100644
index 39cd646..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Lancope.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.LancopeRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-
-/**
- * Topology for processing Lancope messages
- *
- */
-public class Lancope{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new LancopeRunner();
- runner.initTopology(args, "lancope");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/PaloAltoFirewall.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/PaloAltoFirewall.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/PaloAltoFirewall.java
deleted file mode 100644
index 822bd60..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/PaloAltoFirewall.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.AsaRunner;
-import com.apache.metron.topology.runner.PaloAltoFirewallRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-
-/**
- * Topology for processing Palo Alto Firewall Syslog messages
- *
- */
-public class PaloAltoFirewall {
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new PaloAltoFirewallRunner();
- runner.initTopology(args, "paloalto");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Pcap.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Pcap.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Pcap.java
deleted file mode 100644
index e01009c..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Pcap.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-import com.apache.metron.topology.runner.PcapRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-
-/**
- * Topology for processing raw packet messages
- *
- */
-
-public class Pcap{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new PcapRunner();
- runner.initTopology(args, "pcap");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Sourcefire.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Sourcefire.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Sourcefire.java
deleted file mode 100644
index b8530a6..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/Sourcefire.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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 com.apache.metron.topology;
-
-import org.apache.commons.configuration.ConfigurationException;
-
-import com.apache.metron.topology.runner.SourcefireRunner;
-import com.apache.metron.topology.runner.TopologyRunner;
-
-import backtype.storm.generated.InvalidTopologyException;
-
-
-/**
- * Topology for processing Sourcefire messages
- *
- */
-public class Sourcefire{
-
- public static void main(String[] args) throws ConfigurationException, Exception, InvalidTopologyException {
-
- TopologyRunner runner = new SourcefireRunner();
- runner.initTopology(args, "sourcefire");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/AsaRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/AsaRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/AsaRunner.java
deleted file mode 100644
index 4c4dcb5..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/AsaRunner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class AsaRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/AsaOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/BroRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/BroRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/BroRunner.java
deleted file mode 100644
index fee72cd..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/BroRunner.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class BroRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/BroExampleOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/FireEyeRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/FireEyeRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/FireEyeRunner.java
deleted file mode 100644
index db59415..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/FireEyeRunner.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class FireEyeRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/FireeyeExampleOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/ISERunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/ISERunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/ISERunner.java
deleted file mode 100644
index 3d3d663..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/ISERunner.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class ISERunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/ISESampleOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/LancopeRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/LancopeRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/LancopeRunner.java
deleted file mode 100644
index 6f19920..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/LancopeRunner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.parsing.parsers.BasicLancopeParser;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class LancopeRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/LancopeExampleOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PaloAltoFirewallRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PaloAltoFirewallRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PaloAltoFirewallRunner.java
deleted file mode 100644
index 65634da..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PaloAltoFirewallRunner.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class PaloAltoFirewallRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/PaloaltoOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
-
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PcapRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PcapRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PcapRunner.java
deleted file mode 100644
index c588017..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/PcapRunner.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.parsing.PcapParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class PcapRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/PCAPExampleOutput";
-
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
-
- System.out.println("[Metron] Initializing Test Spout");
-
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
- @Override
- boolean initializeParsingBolt(String topology_name, String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
- PcapParserBolt pcapParser = new PcapParserBolt().withTsPrecision(config.getString("bolt.parser.ts.precision"));
-
- builder.setBolt(name, pcapParser,
- config.getInt("bolt.parser.parallelism.hint"))
- .setNumTasks(config.getInt("bolt.parser.num.tasks"))
- .shuffleGrouping(messageUpstreamComponent);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/3854e075/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/SourcefireRunner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/SourcefireRunner.java b/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/SourcefireRunner.java
deleted file mode 100644
index f0ec83a..0000000
--- a/metron-streaming/Metron-Topologies/src/main/java/com/apache/metron/topology/runner/SourcefireRunner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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 com.apache.metron.topology.runner;
-
-import com.apache.metron.filters.GenericMessageFilter;
-import com.apache.metron.parser.interfaces.MessageParser;
-import com.apache.metron.parsing.AbstractParserBolt;
-import com.apache.metron.parsing.TelemetryParserBolt;
-import com.apache.metron.test.spouts.GenericInternalTestSpout;
-
-public class SourcefireRunner extends TopologyRunner{
-
- static String test_file_path = "SampleInput/SourcefireExampleOutput";
-
- @Override
- public boolean initializeParsingBolt(String topology_name,
- String name) {
- try {
-
- String messageUpstreamComponent = messageComponents.get(messageComponents.size()-1);
-
- System.out.println("[Metron] ------" + name + " is initializing from " + messageUpstreamComponent);
-
-
- String class_name = config.getString("bolt.parser.adapter");
-
- if(class_name == null)
- {
- System.out.println("[Metron] Parser adapter not set. Please set bolt.indexing.adapter in topology.conf");
- throw new Exception("Parser adapter not set");
- }
-
- Class loaded_class = Class.forName(class_name);
- MessageParser parser = (MessageParser) loaded_class.newInstance();
-
-
- AbstractParserBolt parser_bolt = new TelemetryParserBolt()
- .withMessageParser(parser)
- .withOutputFieldName(topology_name)
- .withMessageFilter(new GenericMessageFilter())
- .withMetricConfig(config);
-
- builder.setBolt(name, parser_bolt,
- config.getInt("bolt.parser.parallelism.hint"))
- .shuffleGrouping(messageUpstreamComponent)
- .setNumTasks(config.getInt("bolt.parser.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- return true;
- }
-
- @Override
- public boolean initializeTestingSpout(String name) {
- try {
-
- System.out.println("[Metron] Initializing Test Spout");
-
- GenericInternalTestSpout testSpout = new GenericInternalTestSpout()
- .withFilename(test_file_path).withRepeating(
- config.getBoolean("spout.test.parallelism.repeat"));
-
- builder.setSpout(name, testSpout,
- config.getInt("spout.test.parallelism.hint")).setNumTasks(
- config.getInt("spout.test.num.tasks"));
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
- return true;
- }
-
-
-
-}