metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sirs...@apache.org
Subject [63/85] incubator-metron git commit: Move all com/apache folders to org/apache
Date Thu, 14 Jan 2016 17:03:58 GMT
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicLancopeParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicLancopeParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicLancopeParserTest.java
deleted file mode 100644
index 93b6d25..0000000
--- a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicLancopeParserTest.java
+++ /dev/null
@@ -1,160 +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.parsing.test;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Map;
-
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-import org.json.simple.parser.ParseException;
-
-import com.apache.metron.parsing.parsers.BasicLancopeParser;
-import com.apache.metron.test.AbstractSchemaTest;
-
- /**
- * <ul>
- * <li>Title: Junit for LancopeParserTest</li>
- * <li>Description: </li>
- * <li>Created: Aug 25, 2014</li>
- * </ul>
- * @version $Revision: 1.1 $
- */
-public class BasicLancopeParserTest extends AbstractSchemaTest {
-    
-    /**
-     * The inputStrings.
-     */
-     private static String[] inputStrings;    
-
-
-    /**
-     * The parser.
-     */
-    private static BasicLancopeParser parser=null;   
-
-    /**
-     * Constructs a new <code>BasicLancopeParserTest</code> instance.
-     * @param name
-     */
-
-    public BasicLancopeParserTest(String name) {
-        super(name);
-    }
-
-    /**
-     
-     * @throws java.lang.Exception
-     */
-    protected static void setUpBeforeClass() throws Exception {        
-    }
-
-    /**
-     
-     * @throws java.lang.Exception
-     */
-    protected static void tearDownAfterClass() throws Exception {
-    }
-
-    /* 
-     * (non-Javadoc)
-     * @see junit.framework.TestCase#setUp()
-     */
-
-    protected void setUp() throws Exception {
-        super.setUp("com.apache.metron.parsing.test.BasicLancopeParserTest");
-        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
-        BasicLancopeParserTest.setParser(new BasicLancopeParser());   
-        
-        URL schema_url = getClass().getClassLoader().getResource(
-            "TestSchemas/LancopeSchema.json");
-        super.setSchemaJsonString(super.readSchemaFromFile(schema_url));      
-    }
-
-    /* 
-     * (non-Javadoc)
-     * @see junit.framework.TestCase#tearDown()
-     */
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Test method for {@link com.apache.metron.parsing.parsers.BasicLancopeParser#parse(byte[])}.
-     * @throws Exception 
-     * @throws IOException 
-     */
-    public void testParse() throws IOException, Exception {
-        
-        for (String inputString : getInputStrings()) {
-            JSONObject parsed = parser.parse(inputString.getBytes());
-            assertNotNull(parsed);
-        
-            System.out.println(parsed);
-            JSONParser parser = new JSONParser();
-
-            Map<?, ?> json=null;
-            try {
-                json = (Map<?, ?>) parser.parse(parsed.toJSONString());
-                assertEquals(true, validateJsonData(super.getSchemaJsonString(), json.toString()));
-            } catch (ParseException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    /**
-    * Returns the parser.
-    * @return the parser.
-    */
-   
-   public static BasicLancopeParser getParser() {
-       return parser;
-   }
-
-   /**
-    * Sets the parser.
-    * @param parser the parser.
-    */
-   
-   public static void setParser(BasicLancopeParser parser) {
-   
-       BasicLancopeParserTest.parser = parser;
-   }
-
-   /**
-    * Returns the inputStrings.
-    * @return the inputStrings.
-    */
-   
-   public static String[] getInputStrings() {
-       return inputStrings;
-   }
-
-   /**
-    * Sets the inputStrings.
-    * @param inputStrings the inputStrings.
-    */
-   
-   public static void setInputStrings(String[] inputStrings) {
-   
-       BasicLancopeParserTest.inputStrings = inputStrings;
-   }   
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
deleted file mode 100644
index 7ed17ee..0000000
--- a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package com.apache.metron.parsing.test;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-import org.json.simple.parser.ParseException;
-
-import com.apache.metron.parsing.parsers.BasicPaloAltoFirewallParser;
-import com.apache.metron.test.AbstractConfigTest;
-
-public class BasicPaloAltoFirewallParserTest extends AbstractConfigTest {
-    /**
-    * The inputStrings.
-    */
-   private static String[] inputStrings;
-
-    /**
-     * Constructs a new <code>BasicPaloAltoFirewallParserTest</code> instance.
-     * @throws Exception
-     */ 
-    public BasicPaloAltoFirewallParserTest() throws Exception {
-        super();        
-    }
-
-     /**
-     * Sets the inputStrings.
-     * @param inputStrings the inputStrings.
-     */
-        
-    public static void setInputStrings(String[] inputStrings) {
-    
-        BasicPaloAltoFirewallParserTest.inputStrings = inputStrings;
-    }
-
-     /**
-     * The paParser.
-     */
-    private BasicPaloAltoFirewallParser paParser=null;
-
-		/**
-		 * @throws java.lang.Exception
-		 */
-		public static void setUpBeforeClass() throws Exception {
-		}
-
-		/**
-		 * @throws java.lang.Exception
-		 */
-		public static void tearDownAfterClass() throws Exception {
-			setPAStrings(null);
-		}
-
-		/**
-		 * @throws java.lang.Exception
-		 */
-		public void setUp() throws Exception {
-	          super.setUp("com.apache.metron.parsing.test.BasicPaloAltoFirewallParserTest");
-	          setPAStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
-	          paParser = new BasicPaloAltoFirewallParser();           
-		}
-
-		/**
-		 * 	
-		 * 	
-		 * @throws java.lang.Exception
-		 */
-		public void tearDown() throws Exception {
-			paParser = null;
-		}
-
-		/**
-		 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
-		 */
-		@SuppressWarnings({ "rawtypes" })
-		public void testParse() {
-			for (String inputString : getInputStrings()) {
-				JSONObject parsed = paParser.parse(inputString.getBytes());
-				assertNotNull(parsed);
-			
-				System.out.println(parsed);
-				JSONParser parser = new JSONParser();
-
-				Map json=null;
-				try {
-					json = (Map) parser.parse(parsed.toJSONString());
-				} catch (ParseException e) {
-					e.printStackTrace();
-				}
-				Iterator iter = json.entrySet().iterator();
-				
-
-				while (iter.hasNext()) {
-					Map.Entry entry = (Map.Entry) iter.next();
-					String key = (String) entry.getKey();
-					String value = (String) json.get(key).toString();
-					assertNotNull(value);
-				}
-			}
-		}
-
-		/**
-		 * Returns  Input String
-		 */
-		public static String[] getInputStrings() {
-			return inputStrings;
-		}
-
-			
-		/**
-		 * Sets  Input String
-		 */	
-		public static void setPAStrings(String[] strings) {
-			BasicPaloAltoFirewallParserTest.inputStrings = strings;
-		}
-        
-        /**
-         * Returns the paParser.
-         * @return the paParser.
-         */
-        public BasicPaloAltoFirewallParser getPaParser() {
-            return paParser;
-        }
-
-        /**
-         * Sets the paParser.
-         * @param paParser the paParser.
-         */
-        
-        public void setPaParser(BasicPaloAltoFirewallParser paParser) {
-        
-            this.paParser = paParser;
-        }
-
-	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicSourcefireParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicSourcefireParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicSourcefireParserTest.java
deleted file mode 100644
index 3e7deff..0000000
--- a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BasicSourcefireParserTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- * 
- */
-package com.apache.metron.parsing.test;
-
-
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-import org.json.simple.parser.ParseException;
-
-import com.apache.metron.parsing.parsers.BasicSourcefireParser;
-import com.apache.metron.test.AbstractConfigTest;
-
-/**
- * <ul>
- * <li>Title: Test For SourceFireParser</li>
- * <li>Description: </li>
- * <li>Created: July 8, 2014</li>
- * </ul>
- * @version $Revision: 1.0 $
- */
-public class BasicSourcefireParserTest extends AbstractConfigTest
-{
-     /**
-     * The sourceFireStrings.
-     */    
-    private static String[] sourceFireStrings;
-    
-     /**
-     * The sourceFireParser.
-     */
-    private BasicSourcefireParser sourceFireParser=null;
-
-
-    /**
-     * Constructs a new <code>BasicSourcefireParserTest</code> instance.
-     * @throws Exception
-     */
-     
-    public BasicSourcefireParserTest() throws Exception {
-        super();  
-    }
-    
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void setUpBeforeClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void tearDownAfterClass() throws Exception {
-		setSourceFireStrings(null);
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public void setUp() throws Exception {
-        super.setUp("com.apache.metron.parsing.test.BasicSoureceFireParserTest");
-        setSourceFireStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
-        sourceFireParser = new BasicSourcefireParser();
-	}
-
-	/**
-	 * 	
-	 * 	
-	 * @throws java.lang.Exception
-	 */
-	public void tearDown() throws Exception {
-		sourceFireParser = null;
-	}
-
-	/**
-	 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
-	 */
-	@SuppressWarnings({ "rawtypes", "unused" })
-	public void testParse() {
-		for (String sourceFireString : getSourceFireStrings()) {
-		    byte[] srcBytes = sourceFireString.getBytes();
-			JSONObject parsed = sourceFireParser.parse(sourceFireString.getBytes());
-			assertNotNull(parsed);
-		
-			System.out.println(parsed);
-			JSONParser parser = new JSONParser();
-
-			Map json=null;
-			try {
-				json = (Map) parser.parse(parsed.toJSONString());
-			} catch (ParseException e) {
-				e.printStackTrace();
-			}
-			Iterator iter = json.entrySet().iterator();
-			
-
-			while (iter.hasNext()) {
-				Map.Entry entry = (Map.Entry) iter.next();
-				String key = (String) entry.getKey();
-				String value = (String) json.get("original_string").toString();
-				assertNotNull(value);
-			}
-		}
-	}
-
-	/**
-	 * Returns SourceFire Input String
-	 */
-	public static String[] getSourceFireStrings() {
-		return sourceFireStrings;
-	}
-
-		
-	/**
-	 * Sets SourceFire Input String
-	 */	
-	public static void setSourceFireStrings(String[] strings) {
-		BasicSourcefireParserTest.sourceFireStrings = strings;
-	}
-    /**
-    * Returns the sourceFireParser.
-    * @return the sourceFireParser.
-    */
-   
-   public BasicSourcefireParser getSourceFireParser() {
-       return sourceFireParser;
-   }
-
-   /**
-    * Sets the sourceFireParser.
-    * @param sourceFireParser the sourceFireParser.
-    */
-   
-   public void setSourceFireParser(BasicSourcefireParser sourceFireParser) {
-   
-       this.sourceFireParser = sourceFireParser;
-   }	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BroParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BroParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BroParserTest.java
deleted file mode 100644
index 05a9380..0000000
--- a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/BroParserTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.apache.metron.parsing.test;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-import org.json.simple.parser.ParseException;
-
-import com.apache.metron.parsing.parsers.BasicBroParser;
-import com.apache.metron.test.AbstractConfigTest;
-
-/**
- * <ul>
- * <li>Title: Test For BroParser</li>
- * <li>Description: </li>
- * <li>Created: July 8, 2014</li>
- * </ul>
- * @version $Revision: 1.0 $
- */
-
- /**
- * <ul>
- * <li>Title: </li>
- * <li>Description: </li>
- * <li>Created: Feb 20, 2015 </li>
- * </ul>
- * @author $Author: $
- * @version $Revision: 1.1 $
- */
-public class BroParserTest extends AbstractConfigTest {
-	
-	
-	/**
-	 * The inputStrings.
-	 */
-	private static String[] inputStrings;
-
-     /**
-     * The parser.
-     */
-    private BasicBroParser parser=null;
-	
-    /**
-     * Constructs a new <code>BroParserTest</code> instance.
-     * @throws Exception 
-     */
-    public BroParserTest() throws Exception {
-        super();
-    }	
-
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void setUpBeforeClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void tearDownAfterClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public void setUp() throws Exception {
-        super.setUp("com.apache.metron.parsing.test.BroParserTest");
-        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
-        parser = new BasicBroParser();  
-	}
-	
-	/**
-	 * @throws ParseException
-	 * Tests for Parse Method
-	 * Parses Static json String and checks if any spl chars are present in parsed string.
-	 */
-	@SuppressWarnings({ "unused", "rawtypes" })
-	public void testParse() throws ParseException {
-
-		for (String inputString : getInputStrings()) {
-			JSONObject cleanJson = parser.parse(inputString.getBytes());
-			assertNotNull(cleanJson);
-			System.out.println(cleanJson);
-
-			Pattern p = Pattern.compile("[^\\._a-z0-9 ]",
-					Pattern.CASE_INSENSITIVE);
-
-			JSONParser parser = new JSONParser();
-
-			Map json = (Map) cleanJson;
-			Map output = new HashMap();
-			Iterator iter = json.entrySet().iterator();
-
-			while (iter.hasNext()) {
-				Map.Entry entry = (Map.Entry) iter.next();
-				String key = (String) entry.getKey();
-
-				Matcher m = p.matcher(key);
-				boolean b = m.find();
-				// Test False
-				assertFalse(b);
-			}
-		}
-
-	}
-
-	/**
-	 * Returns Input String
-	 */
-	public static String[] getInputStrings() {
-		return inputStrings;
-	}
-
-	/**
-	 * Sets SourceFire Input String
-	 */
-	public static void setInputStrings(String[] strings) {
-		BroParserTest.inputStrings = strings;
-	}
-	
-    /**
-     * Returns the parser.
-     * @return the parser.
-     */
-    
-    public BasicBroParser getParser() {
-        return parser;
-    }
-
-
-    /**
-     * Sets the parser.
-     * @param parser the parser.
-     */
-    
-    public void setParser(BasicBroParser parser) {
-    
-        this.parser = parser;
-    }	
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/GrokAsaParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/GrokAsaParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/GrokAsaParserTest.java
deleted file mode 100644
index d6a31af..0000000
--- a/metron-streaming/Metron-MessageParsers/src/test/java/com/apache/metron/parsing/test/GrokAsaParserTest.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.apache.metron.parsing.test;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.json.simple.JSONObject;
-import org.json.simple.parser.JSONParser;
-import org.json.simple.parser.ParseException;
-
-import com.apache.metron.parsing.parsers.GrokAsaParser;
-import com.apache.metron.test.AbstractConfigTest;
-
-
- /**
- * <ul>
- * <li>Title: </li>
- * <li>Description: </li>
- * <li>Created: Feb 17, 2015 by: </li>
- * </ul>
- * @author $Author:  $
- * @version $Revision: 1.1 $
- */
-public class GrokAsaParserTest extends AbstractConfigTest{
-     /**
-     * The grokAsaStrings.
-     */
-    private static String[] grokAsaStrings=null;
- 
-     /**
-     * The grokAsaParser.
-     */
-     
-    private GrokAsaParser grokAsaParser=null;
-    
-     /**
-     * Constructs a new <code>GrokAsaParserTest</code> instance.
-     * @throws Exception
-     */
-     
-    public GrokAsaParserTest() throws Exception {
-          super();  
-        
-    }
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void setUpBeforeClass() throws Exception {
-	}
-
-	/**
-	 * @throws java.lang.Exception
-	 */
-	public static void tearDownAfterClass() throws Exception {
-		setGrokAsaStrings(null);
-	}
-
-    /* 
-     * (non-Javadoc)
-     * @see junit.framework.TestCase#setUp()
-     */
-	public void setUp() throws Exception {
-          super.setUp("com.apache.metron.parsing.test.GrokAsaParserTest");
-          setGrokAsaStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
-          grokAsaParser = new GrokAsaParser();		
-	}
-
-		/**
-		 * 	
-		 * 	
-		 * @throws java.lang.Exception
-		 */
-		public void tearDown() throws Exception {
-			grokAsaParser = null;
-		}
-
-		/**
-		 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
-		 */
-		@SuppressWarnings({ "rawtypes" })
-		public void testParse() {
-		    
-			for (String grokAsaString : getGrokAsaStrings()) {
-				JSONObject parsed = grokAsaParser.parse(grokAsaString.getBytes());
-				assertNotNull(parsed);
-			
-				System.out.println(parsed);
-				JSONParser parser = new JSONParser();
-
-				Map json=null;
-				try {
-					json = (Map) parser.parse(parsed.toJSONString());
-				} catch (ParseException e) {
-					e.printStackTrace();
-				}
-				//Ensure JSON returned is not null/empty
-				assertNotNull(json);
-				
-				Iterator iter = json.entrySet().iterator();
-				
-
-				while (iter.hasNext()) {
-					Map.Entry entry = (Map.Entry) iter.next();
-					assertNotNull(entry);
-					
-					String key = (String) entry.getKey();
-					assertNotNull(key);
-					
-					String value = (String) json.get("CISCO_TAGGED_SYSLOG").toString();
-					assertNotNull(value);
-				}
-			}
-		}
-
-		/**
-		 * Returns GrokAsa Input String
-		 */
-		public static String[] getGrokAsaStrings() {
-			return grokAsaStrings;
-		}
-
-			
-		/**
-		 * Sets GrokAsa Input String
-		 */	
-		public static void setGrokAsaStrings(String[] strings) {
-			GrokAsaParserTest.grokAsaStrings = strings;
-		}
-	    
-	    /**
-	     * Returns the grokAsaParser.
-	     * @return the grokAsaParser.
-	     */
-	    
-	    public GrokAsaParser getGrokAsaParser() {
-	        return grokAsaParser;
-	    }
-
-
-	    /**
-	     * Sets the grokAsaParser.
-	     * @param grokAsaParser the grokAsaParser.
-	     */
-	    
-	    public void setGrokAsaParser(GrokAsaParser grokAsaParser) {
-	    
-	        this.grokAsaParser = grokAsaParser;
-	    }
-		
-	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicBroParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicBroParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicBroParserTest.java
new file mode 100644
index 0000000..50b50e2
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicBroParserTest.java
@@ -0,0 +1,103 @@
+package com.apache.metron.parsing.test;
+
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicBroParser;
+
+public class BasicBroParserTest extends TestCase {
+
+	/**
+	 * The parser.
+	 */
+	private BasicBroParser broParser = null;
+	private JSONParser jsonParser = null;
+
+	/**
+	 * Constructs a new <code>BasicBroParserTest</code> instance.
+	 * 
+	 * @throws Exception
+	 */
+	public BasicBroParserTest() throws Exception {
+		broParser = new BasicBroParser();
+		jsonParser = new JSONParser();		
+	}
+
+	@SuppressWarnings("rawtypes")
+	public void testHttpBroMessage() throws ParseException {
+		String rawMessage = "{\"http\":{\"ts\":1402307733473,\"uid\":\"CTo78A11g7CYbbOHvj\",\"id.orig_h\":\"192.249.113.37\",\"id.orig_p\":58808,\"id.resp_h\":\"72.163.4.161\",\"id.resp_p\":80,\"trans_depth\":1,\"method\":\"GET\",\"host\":\"www.cisco.com\",\"uri\":\"/\",\"user_agent\":\"curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3\",\"request_body_len\":0,\"response_body_len\":25523,\"status_code\":200,\"status_msg\":\"OK\",\"tags\":[],\"resp_fuids\":[\"FJDyMC15lxUn5ngPfd\"],\"resp_mime_types\":[\"text/html\"]}}";
+		
+		Map rawMessageMap = (Map) jsonParser.parse(rawMessage);
+		JSONObject rawJson = (JSONObject) rawMessageMap.get(rawMessageMap.keySet().iterator().next());
+		
+		JSONObject broJson = broParser.parse(rawMessage.getBytes());
+		assertEquals(broJson.get("timestamp").toString(), rawJson.get("ts").toString());
+		assertEquals(broJson.get("ip_src_addr").toString(), rawJson.get("id.orig_h").toString());
+		assertEquals(broJson.get("ip_dst_addr").toString(), rawJson.get("id.resp_h").toString());
+		assertEquals(broJson.get("ip_src_port").toString(), rawJson.get("id.orig_p").toString());
+		assertEquals(broJson.get("ip_dst_port").toString(), rawJson.get("id.resp_p").toString());
+		assertTrue(broJson.get("original_string").toString().startsWith(rawMessageMap.keySet().iterator().next().toString().toUpperCase()));
+		
+		assertEquals(broJson.get("uid").toString(), rawJson.get("uid").toString());
+		assertEquals(broJson.get("method").toString(), rawJson.get("method").toString());
+		assertEquals(broJson.get("host").toString(), rawJson.get("host").toString());
+		assertEquals(broJson.get("resp_mime_types").toString(), rawJson.get("resp_mime_types").toString());
+	}
+	
+	@SuppressWarnings("rawtypes")
+	public void testDnsBroMessage() throws ParseException {
+		String rawMessage = "{\"dns\":{\"ts\":1402308259609,\"uid\":\"CuJT272SKaJSuqO0Ia\",\"id.orig_h\":\"10.122.196.204\",\"id.orig_p\":33976,\"id.resp_h\":\"144.254.71.184\",\"id.resp_p\":53,\"proto\":\"udp\",\"trans_id\":62418,\"query\":\"www.cisco.com\",\"qclass\":1,\"qclass_name\":\"C_INTERNET\",\"qtype\":28,\"qtype_name\":\"AAAA\",\"rcode\":0,\"rcode_name\":\"NOERROR\",\"AA\":true,\"TC\":false,\"RD\":true,\"RA\":true,\"Z\":0,\"answers\":[\"www.cisco.com.akadns.net\",\"origin-www.cisco.com\",\"2001:420:1201:2::a\"],\"TTLs\":[3600.0,289.0,14.0],\"rejected\":false}}";
+		
+		Map rawMessageMap = (Map) jsonParser.parse(rawMessage);
+		JSONObject rawJson = (JSONObject) rawMessageMap.get(rawMessageMap.keySet().iterator().next());
+		
+		JSONObject broJson = broParser.parse(rawMessage.getBytes());
+		assertEquals(broJson.get("timestamp").toString(), rawJson.get("ts").toString());
+		assertEquals(broJson.get("ip_src_addr").toString(), rawJson.get("id.orig_h").toString());
+		assertEquals(broJson.get("ip_dst_addr").toString(), rawJson.get("id.resp_h").toString());
+		assertEquals(broJson.get("ip_src_port").toString(), rawJson.get("id.orig_p").toString());
+		assertEquals(broJson.get("ip_dst_port").toString(), rawJson.get("id.resp_p").toString());
+		assertTrue(broJson.get("original_string").toString().startsWith(rawMessageMap.keySet().iterator().next().toString().toUpperCase()));
+		
+		assertEquals(broJson.get("qtype").toString(), rawJson.get("qtype").toString());
+		assertEquals(broJson.get("trans_id").toString(), rawJson.get("trans_id").toString());
+	}
+	
+	@SuppressWarnings("rawtypes")
+	public void testFilesBroMessage() throws ParseException {
+		String rawMessage = "{\"files\":{\"analyzers\": [\"X509\",\"MD5\",\"SHA1\"],\"conn_uids\":[\"C4tygJ3qxJBEJEBCeh\"],\"depth\": 0,\"duration\": 0.0,\"fuid\":\"FZEBC33VySG0nHSoO9\",\"is_orig\": false,\"local_orig\": false,\"md5\": \"eba37166385e3ef42464ed9752e99f1b\",\"missing_bytes\": 0,\"overflow_bytes\": 0,\"rx_hosts\": [\"10.220.15.205\"],\"seen_bytes\": 1136,\"sha1\": \"73e42686657aece354fbf685712361658f2f4357\",\"source\": \"SSL\",\"timedout\": false,\"ts\": \"1425845251334\",\"tx_hosts\": [\"68.171.237.7\"]}}";
+		
+		Map rawMessageMap = (Map) jsonParser.parse(rawMessage);
+		JSONObject rawJson = (JSONObject) rawMessageMap.get(rawMessageMap.keySet().iterator().next());
+		
+		JSONObject broJson = broParser.parse(rawMessage.getBytes());
+		assertEquals(broJson.get("timestamp").toString(), rawJson.get("ts").toString());
+		assertEquals(broJson.get("ip_src_addr").toString(), ((JSONArray)rawJson.get("tx_hosts")).get(0).toString());
+		assertEquals(broJson.get("ip_dst_addr").toString(), ((JSONArray)rawJson.get("rx_hosts")).get(0).toString());
+		assertTrue(broJson.get("original_string").toString().startsWith(rawMessageMap.keySet().iterator().next().toString().toUpperCase()));
+		
+		assertEquals(broJson.get("fuid").toString(), rawJson.get("fuid").toString());
+		assertEquals(broJson.get("md5").toString(), rawJson.get("md5").toString());
+		assertEquals(broJson.get("analyzers").toString(), rawJson.get("analyzers").toString());
+	}
+	
+	@SuppressWarnings("rawtypes")
+	public void testProtocolKeyCleanedUp() throws ParseException {
+		String rawMessage = "{\"ht*tp\":{\"ts\":1402307733473,\"uid\":\"CTo78A11g7CYbbOHvj\",\"id.orig_h\":\"192.249.113.37\",\"id.orig_p\":58808,\"id.resp_h\":\"72.163.4.161\",\"id.resp_p\":80,\"trans_depth\":1,\"method\":\"GET\",\"host\":\"www.cisco.com\",\"uri\":\"/\",\"user_agent\":\"curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3\",\"request_body_len\":0,\"response_body_len\":25523,\"status_code\":200,\"status_msg\":\"OK\",\"tags\":[],\"resp_fuids\":[\"FJDyMC15lxUn5ngPfd\"],\"resp_mime_types\":[\"text/html\"]}}";
+		
+		Map rawMessageMap = (Map) jsonParser.parse(rawMessage);
+		JSONObject rawJson = (JSONObject) rawMessageMap.get(rawMessageMap.keySet().iterator().next());
+		
+		JSONObject broJson = broParser.parse(rawMessage.getBytes());
+		
+		assertEquals(broJson.get("timestamp").toString(), rawJson.get("ts").toString());
+		assertEquals(broJson.get("ip_src_addr").toString(), rawJson.get("id.orig_h").toString());
+		assertTrue(broJson.get("original_string").toString().startsWith("HTTP"));
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicFireEyeParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicFireEyeParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicFireEyeParserTest.java
new file mode 100644
index 0000000..7d72714
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicFireEyeParserTest.java
@@ -0,0 +1,141 @@
+/**
+ * 
+ */
+package com.apache.metron.parsing.test;
+
+
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicFireEyeParser;
+import com.apache.metron.test.AbstractConfigTest;
+
+/**
+ * <ul>
+ * <li>Title: Test For SourceFireParser</li>
+ * <li>Description: </li>
+ * <li>Created: July 8, 2014</li>
+ * </ul>
+ * @version $Revision: 1.0 $
+ */
+public class BasicFireEyeParserTest extends AbstractConfigTest
+{
+   /**
+    * The inputStrings.
+    */
+    private static String[] inputStrings;
+ 
+   /**
+    * The parser.
+    */
+    private BasicFireEyeParser parser=null;
+
+	
+   /**
+    * Constructs a new <code>BasicFireEyeParserTest</code> instance.
+    * @throws Exception
+    */ 
+    public BasicFireEyeParserTest() throws Exception {
+        super();
+    }
+
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void setUpBeforeClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void tearDownAfterClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public void setUp() throws Exception {
+        super.setUp("com.apache.metron.parsing.test.BasicFireEyeParserTest");
+        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+        parser = new BasicFireEyeParser();  
+	}
+
+	/**
+	 * 	
+	 * 	
+	 * @throws java.lang.Exception
+	 */
+	public void tearDown() throws Exception {
+		parser = null;
+        setInputStrings(null);		
+	}
+
+	/**
+	 * Test method for {@link com.apache.metron.parsing.parsers.BasicFireEyeParser#parse(java.lang.String)}.
+	 */
+	@SuppressWarnings({ "rawtypes"})
+	public void testParse() {
+		for (String inputString : getInputStrings()) {
+			JSONObject parsed = parser.parse(inputString.getBytes());
+			assertNotNull(parsed);
+		
+			JSONParser parser = new JSONParser();
+
+			Map json=null;
+			try {
+				json = (Map) parser.parse(parsed.toJSONString());
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+			Iterator iter = json.entrySet().iterator();
+			
+			assertNotNull(json);
+			assertFalse(json.isEmpty());
+			
+
+			while (iter.hasNext()) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				String key = (String) entry.getKey();
+				String value = (String) json.get(key).toString();
+				assertNotNull(value);
+			}
+		}
+	}
+
+	/**
+	 * Returns Input String
+	 */
+	public static String[] getInputStrings() {
+		return inputStrings;
+	}
+		
+	/**
+	 * Sets SourceFire Input String
+	 */	
+	public static void setInputStrings(String[] strings) {
+		BasicFireEyeParserTest.inputStrings = strings;
+	}
+	
+    /**
+     * Returns the parser.
+     * @return the parser.
+     */
+    public BasicFireEyeParser getParser() {
+        return parser;
+    }
+
+    /**
+     * Sets the parser.
+     * @param parser the parser.
+     */
+     public void setParser(BasicFireEyeParser parser) {
+    
+        this.parser = parser;
+     }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicIseParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicIseParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicIseParserTest.java
new file mode 100644
index 0000000..7343ad7
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicIseParserTest.java
@@ -0,0 +1,169 @@
+/*
+ * 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.parsing.test;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicIseParser;
+import com.apache.metron.test.AbstractSchemaTest;
+
+
+/**
+ * <ul>
+ * <li>Title: Basic ISE Parser</li>
+ * <li>Description: Junit Test Case for BasicISE Parser</li>
+ * <li>Created: AUG 25, 2014</li>
+ * </ul>
+ * 
+ * @version $Revision: 1.1 $
+ */
+
+public class BasicIseParserTest extends AbstractSchemaTest {
+    /**
+     * The inputStrings.
+     */
+     private static String[] inputStrings;   
+
+	 /**
+	 * The parser.
+	 */
+	private static BasicIseParser parser = null;
+
+
+	/**
+	 * Constructs a new <code>BasicIseParserTest</code> instance.
+	 * 
+	 * @param name
+	 */
+
+	public BasicIseParserTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * 
+	 * @throws java.lang.Exception
+	 */
+	protected static void setUpBeforeClass() throws Exception {
+	}
+
+	/**
+	 * 
+	 * @throws java.lang.Exception
+	 */
+	protected static void tearDownAfterClass() throws Exception {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+
+	protected void setUp() throws Exception {
+        super.setUp("com.apache.metron.parsing.test.BasicLancopeParserTest");
+        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+        BasicIseParserTest.setIseParser(new BasicIseParser());
+		
+		URL schema_url = getClass().getClassLoader().getResource(
+				"TestSchemas/IseSchema.json");
+		 super.setSchemaJsonString(super.readSchemaFromFile(schema_url));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Test method for
+	 * {@link com.apache.metron.parsing.parsers.BasicIseParser#parse(byte[])}.
+	 * 
+	 * @throws IOException
+	 * @throws Exception
+	 */
+	public void testParse() throws ParseException, IOException, Exception {
+        for (String inputString : getInputStrings()) {
+            JSONObject parsed = parser.parse(inputString.getBytes());
+            assertNotNull(parsed);
+        
+            System.out.println(parsed);
+            JSONParser parser = new JSONParser();
+
+            Map<?, ?> json=null;
+            try {
+                json = (Map<?, ?>) parser.parse(parsed.toJSONString());
+                assertEquals(true, validateJsonData(super.getSchemaJsonString(), json.toString()));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+        }
+	}
+
+	/**
+	 * Returns the iseParser.
+	 * 
+	 * @return the iseParser.
+	 */
+
+	public BasicIseParser getIseParser() {
+		return parser;
+	}
+
+	/**
+	 * Sets the iseParser.
+	 * 
+	 * @param iseParser
+	 */
+
+
+	public static void setIseParser(BasicIseParser parser) {
+
+		BasicIseParserTest.parser = parser;
+	}
+   /**
+    * Returns the inputStrings.
+    * @return the inputStrings.
+    */
+   
+   public static String[] getInputStrings() {
+       return inputStrings;
+   }
+
+   /**
+    * Sets the inputStrings.
+    * @param inputStrings the inputStrings.
+    */
+   
+   public static void setInputStrings(String[] inputStrings) {
+       BasicIseParserTest.inputStrings = inputStrings;
+   }   
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicLancopeParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicLancopeParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicLancopeParserTest.java
new file mode 100644
index 0000000..93b6d25
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicLancopeParserTest.java
@@ -0,0 +1,160 @@
+  /*
+ * 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.parsing.test;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicLancopeParser;
+import com.apache.metron.test.AbstractSchemaTest;
+
+ /**
+ * <ul>
+ * <li>Title: Junit for LancopeParserTest</li>
+ * <li>Description: </li>
+ * <li>Created: Aug 25, 2014</li>
+ * </ul>
+ * @version $Revision: 1.1 $
+ */
+public class BasicLancopeParserTest extends AbstractSchemaTest {
+    
+    /**
+     * The inputStrings.
+     */
+     private static String[] inputStrings;    
+
+
+    /**
+     * The parser.
+     */
+    private static BasicLancopeParser parser=null;   
+
+    /**
+     * Constructs a new <code>BasicLancopeParserTest</code> instance.
+     * @param name
+     */
+
+    public BasicLancopeParserTest(String name) {
+        super(name);
+    }
+
+    /**
+     
+     * @throws java.lang.Exception
+     */
+    protected static void setUpBeforeClass() throws Exception {        
+    }
+
+    /**
+     
+     * @throws java.lang.Exception
+     */
+    protected static void tearDownAfterClass() throws Exception {
+    }
+
+    /* 
+     * (non-Javadoc)
+     * @see junit.framework.TestCase#setUp()
+     */
+
+    protected void setUp() throws Exception {
+        super.setUp("com.apache.metron.parsing.test.BasicLancopeParserTest");
+        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+        BasicLancopeParserTest.setParser(new BasicLancopeParser());   
+        
+        URL schema_url = getClass().getClassLoader().getResource(
+            "TestSchemas/LancopeSchema.json");
+        super.setSchemaJsonString(super.readSchemaFromFile(schema_url));      
+    }
+
+    /* 
+     * (non-Javadoc)
+     * @see junit.framework.TestCase#tearDown()
+     */
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    /**
+     * Test method for {@link com.apache.metron.parsing.parsers.BasicLancopeParser#parse(byte[])}.
+     * @throws Exception 
+     * @throws IOException 
+     */
+    public void testParse() throws IOException, Exception {
+        
+        for (String inputString : getInputStrings()) {
+            JSONObject parsed = parser.parse(inputString.getBytes());
+            assertNotNull(parsed);
+        
+            System.out.println(parsed);
+            JSONParser parser = new JSONParser();
+
+            Map<?, ?> json=null;
+            try {
+                json = (Map<?, ?>) parser.parse(parsed.toJSONString());
+                assertEquals(true, validateJsonData(super.getSchemaJsonString(), json.toString()));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    /**
+    * Returns the parser.
+    * @return the parser.
+    */
+   
+   public static BasicLancopeParser getParser() {
+       return parser;
+   }
+
+   /**
+    * Sets the parser.
+    * @param parser the parser.
+    */
+   
+   public static void setParser(BasicLancopeParser parser) {
+   
+       BasicLancopeParserTest.parser = parser;
+   }
+
+   /**
+    * Returns the inputStrings.
+    * @return the inputStrings.
+    */
+   
+   public static String[] getInputStrings() {
+       return inputStrings;
+   }
+
+   /**
+    * Sets the inputStrings.
+    * @param inputStrings the inputStrings.
+    */
+   
+   public static void setInputStrings(String[] inputStrings) {
+   
+       BasicLancopeParserTest.inputStrings = inputStrings;
+   }   
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
new file mode 100644
index 0000000..7ed17ee
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicPaloAltoFirewallParserTest.java
@@ -0,0 +1,136 @@
+package com.apache.metron.parsing.test;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicPaloAltoFirewallParser;
+import com.apache.metron.test.AbstractConfigTest;
+
+public class BasicPaloAltoFirewallParserTest extends AbstractConfigTest {
+    /**
+    * The inputStrings.
+    */
+   private static String[] inputStrings;
+
+    /**
+     * Constructs a new <code>BasicPaloAltoFirewallParserTest</code> instance.
+     * @throws Exception
+     */ 
+    public BasicPaloAltoFirewallParserTest() throws Exception {
+        super();        
+    }
+
+     /**
+     * Sets the inputStrings.
+     * @param inputStrings the inputStrings.
+     */
+        
+    public static void setInputStrings(String[] inputStrings) {
+    
+        BasicPaloAltoFirewallParserTest.inputStrings = inputStrings;
+    }
+
+     /**
+     * The paParser.
+     */
+    private BasicPaloAltoFirewallParser paParser=null;
+
+		/**
+		 * @throws java.lang.Exception
+		 */
+		public static void setUpBeforeClass() throws Exception {
+		}
+
+		/**
+		 * @throws java.lang.Exception
+		 */
+		public static void tearDownAfterClass() throws Exception {
+			setPAStrings(null);
+		}
+
+		/**
+		 * @throws java.lang.Exception
+		 */
+		public void setUp() throws Exception {
+	          super.setUp("com.apache.metron.parsing.test.BasicPaloAltoFirewallParserTest");
+	          setPAStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+	          paParser = new BasicPaloAltoFirewallParser();           
+		}
+
+		/**
+		 * 	
+		 * 	
+		 * @throws java.lang.Exception
+		 */
+		public void tearDown() throws Exception {
+			paParser = null;
+		}
+
+		/**
+		 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
+		 */
+		@SuppressWarnings({ "rawtypes" })
+		public void testParse() {
+			for (String inputString : getInputStrings()) {
+				JSONObject parsed = paParser.parse(inputString.getBytes());
+				assertNotNull(parsed);
+			
+				System.out.println(parsed);
+				JSONParser parser = new JSONParser();
+
+				Map json=null;
+				try {
+					json = (Map) parser.parse(parsed.toJSONString());
+				} catch (ParseException e) {
+					e.printStackTrace();
+				}
+				Iterator iter = json.entrySet().iterator();
+				
+
+				while (iter.hasNext()) {
+					Map.Entry entry = (Map.Entry) iter.next();
+					String key = (String) entry.getKey();
+					String value = (String) json.get(key).toString();
+					assertNotNull(value);
+				}
+			}
+		}
+
+		/**
+		 * Returns  Input String
+		 */
+		public static String[] getInputStrings() {
+			return inputStrings;
+		}
+
+			
+		/**
+		 * Sets  Input String
+		 */	
+		public static void setPAStrings(String[] strings) {
+			BasicPaloAltoFirewallParserTest.inputStrings = strings;
+		}
+        
+        /**
+         * Returns the paParser.
+         * @return the paParser.
+         */
+        public BasicPaloAltoFirewallParser getPaParser() {
+            return paParser;
+        }
+
+        /**
+         * Sets the paParser.
+         * @param paParser the paParser.
+         */
+        
+        public void setPaParser(BasicPaloAltoFirewallParser paParser) {
+        
+            this.paParser = paParser;
+        }
+
+	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicSourcefireParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicSourcefireParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicSourcefireParserTest.java
new file mode 100644
index 0000000..3e7deff
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BasicSourcefireParserTest.java
@@ -0,0 +1,142 @@
+/**
+ * 
+ */
+package com.apache.metron.parsing.test;
+
+
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicSourcefireParser;
+import com.apache.metron.test.AbstractConfigTest;
+
+/**
+ * <ul>
+ * <li>Title: Test For SourceFireParser</li>
+ * <li>Description: </li>
+ * <li>Created: July 8, 2014</li>
+ * </ul>
+ * @version $Revision: 1.0 $
+ */
+public class BasicSourcefireParserTest extends AbstractConfigTest
+{
+     /**
+     * The sourceFireStrings.
+     */    
+    private static String[] sourceFireStrings;
+    
+     /**
+     * The sourceFireParser.
+     */
+    private BasicSourcefireParser sourceFireParser=null;
+
+
+    /**
+     * Constructs a new <code>BasicSourcefireParserTest</code> instance.
+     * @throws Exception
+     */
+     
+    public BasicSourcefireParserTest() throws Exception {
+        super();  
+    }
+    
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void setUpBeforeClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void tearDownAfterClass() throws Exception {
+		setSourceFireStrings(null);
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public void setUp() throws Exception {
+        super.setUp("com.apache.metron.parsing.test.BasicSoureceFireParserTest");
+        setSourceFireStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+        sourceFireParser = new BasicSourcefireParser();
+	}
+
+	/**
+	 * 	
+	 * 	
+	 * @throws java.lang.Exception
+	 */
+	public void tearDown() throws Exception {
+		sourceFireParser = null;
+	}
+
+	/**
+	 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
+	 */
+	@SuppressWarnings({ "rawtypes", "unused" })
+	public void testParse() {
+		for (String sourceFireString : getSourceFireStrings()) {
+		    byte[] srcBytes = sourceFireString.getBytes();
+			JSONObject parsed = sourceFireParser.parse(sourceFireString.getBytes());
+			assertNotNull(parsed);
+		
+			System.out.println(parsed);
+			JSONParser parser = new JSONParser();
+
+			Map json=null;
+			try {
+				json = (Map) parser.parse(parsed.toJSONString());
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+			Iterator iter = json.entrySet().iterator();
+			
+
+			while (iter.hasNext()) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				String key = (String) entry.getKey();
+				String value = (String) json.get("original_string").toString();
+				assertNotNull(value);
+			}
+		}
+	}
+
+	/**
+	 * Returns SourceFire Input String
+	 */
+	public static String[] getSourceFireStrings() {
+		return sourceFireStrings;
+	}
+
+		
+	/**
+	 * Sets SourceFire Input String
+	 */	
+	public static void setSourceFireStrings(String[] strings) {
+		BasicSourcefireParserTest.sourceFireStrings = strings;
+	}
+    /**
+    * Returns the sourceFireParser.
+    * @return the sourceFireParser.
+    */
+   
+   public BasicSourcefireParser getSourceFireParser() {
+       return sourceFireParser;
+   }
+
+   /**
+    * Sets the sourceFireParser.
+    * @param sourceFireParser the sourceFireParser.
+    */
+   
+   public void setSourceFireParser(BasicSourcefireParser sourceFireParser) {
+   
+       this.sourceFireParser = sourceFireParser;
+   }	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BroParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BroParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BroParserTest.java
new file mode 100644
index 0000000..05a9380
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/BroParserTest.java
@@ -0,0 +1,146 @@
+package com.apache.metron.parsing.test;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.BasicBroParser;
+import com.apache.metron.test.AbstractConfigTest;
+
+/**
+ * <ul>
+ * <li>Title: Test For BroParser</li>
+ * <li>Description: </li>
+ * <li>Created: July 8, 2014</li>
+ * </ul>
+ * @version $Revision: 1.0 $
+ */
+
+ /**
+ * <ul>
+ * <li>Title: </li>
+ * <li>Description: </li>
+ * <li>Created: Feb 20, 2015 </li>
+ * </ul>
+ * @author $Author: $
+ * @version $Revision: 1.1 $
+ */
+public class BroParserTest extends AbstractConfigTest {
+	
+	
+	/**
+	 * The inputStrings.
+	 */
+	private static String[] inputStrings;
+
+     /**
+     * The parser.
+     */
+    private BasicBroParser parser=null;
+	
+    /**
+     * Constructs a new <code>BroParserTest</code> instance.
+     * @throws Exception 
+     */
+    public BroParserTest() throws Exception {
+        super();
+    }	
+
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void setUpBeforeClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void tearDownAfterClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public void setUp() throws Exception {
+        super.setUp("com.apache.metron.parsing.test.BroParserTest");
+        setInputStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+        parser = new BasicBroParser();  
+	}
+	
+	/**
+	 * @throws ParseException
+	 * Tests for Parse Method
+	 * Parses Static json String and checks if any spl chars are present in parsed string.
+	 */
+	@SuppressWarnings({ "unused", "rawtypes" })
+	public void testParse() throws ParseException {
+
+		for (String inputString : getInputStrings()) {
+			JSONObject cleanJson = parser.parse(inputString.getBytes());
+			assertNotNull(cleanJson);
+			System.out.println(cleanJson);
+
+			Pattern p = Pattern.compile("[^\\._a-z0-9 ]",
+					Pattern.CASE_INSENSITIVE);
+
+			JSONParser parser = new JSONParser();
+
+			Map json = (Map) cleanJson;
+			Map output = new HashMap();
+			Iterator iter = json.entrySet().iterator();
+
+			while (iter.hasNext()) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				String key = (String) entry.getKey();
+
+				Matcher m = p.matcher(key);
+				boolean b = m.find();
+				// Test False
+				assertFalse(b);
+			}
+		}
+
+	}
+
+	/**
+	 * Returns Input String
+	 */
+	public static String[] getInputStrings() {
+		return inputStrings;
+	}
+
+	/**
+	 * Sets SourceFire Input String
+	 */
+	public static void setInputStrings(String[] strings) {
+		BroParserTest.inputStrings = strings;
+	}
+	
+    /**
+     * Returns the parser.
+     * @return the parser.
+     */
+    
+    public BasicBroParser getParser() {
+        return parser;
+    }
+
+
+    /**
+     * Sets the parser.
+     * @param parser the parser.
+     */
+    
+    public void setParser(BasicBroParser parser) {
+    
+        this.parser = parser;
+    }	
+}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/GrokAsaParserTest.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/GrokAsaParserTest.java b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/GrokAsaParserTest.java
new file mode 100644
index 0000000..d6a31af
--- /dev/null
+++ b/metron-streaming/Metron-MessageParsers/src/test/java/org/apache/metron/parsing/test/GrokAsaParserTest.java
@@ -0,0 +1,149 @@
+package com.apache.metron.parsing.test;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
+
+import com.apache.metron.parsing.parsers.GrokAsaParser;
+import com.apache.metron.test.AbstractConfigTest;
+
+
+ /**
+ * <ul>
+ * <li>Title: </li>
+ * <li>Description: </li>
+ * <li>Created: Feb 17, 2015 by: </li>
+ * </ul>
+ * @author $Author:  $
+ * @version $Revision: 1.1 $
+ */
+public class GrokAsaParserTest extends AbstractConfigTest{
+     /**
+     * The grokAsaStrings.
+     */
+    private static String[] grokAsaStrings=null;
+ 
+     /**
+     * The grokAsaParser.
+     */
+     
+    private GrokAsaParser grokAsaParser=null;
+    
+     /**
+     * Constructs a new <code>GrokAsaParserTest</code> instance.
+     * @throws Exception
+     */
+     
+    public GrokAsaParserTest() throws Exception {
+          super();  
+        
+    }
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void setUpBeforeClass() throws Exception {
+	}
+
+	/**
+	 * @throws java.lang.Exception
+	 */
+	public static void tearDownAfterClass() throws Exception {
+		setGrokAsaStrings(null);
+	}
+
+    /* 
+     * (non-Javadoc)
+     * @see junit.framework.TestCase#setUp()
+     */
+	public void setUp() throws Exception {
+          super.setUp("com.apache.metron.parsing.test.GrokAsaParserTest");
+          setGrokAsaStrings(super.readTestDataFromFile(this.getConfig().getString("logFile")));
+          grokAsaParser = new GrokAsaParser();		
+	}
+
+		/**
+		 * 	
+		 * 	
+		 * @throws java.lang.Exception
+		 */
+		public void tearDown() throws Exception {
+			grokAsaParser = null;
+		}
+
+		/**
+		 * Test method for {@link com.apache.metron.parsing.parsers.BasicSourcefireParser#parse(java.lang.String)}.
+		 */
+		@SuppressWarnings({ "rawtypes" })
+		public void testParse() {
+		    
+			for (String grokAsaString : getGrokAsaStrings()) {
+				JSONObject parsed = grokAsaParser.parse(grokAsaString.getBytes());
+				assertNotNull(parsed);
+			
+				System.out.println(parsed);
+				JSONParser parser = new JSONParser();
+
+				Map json=null;
+				try {
+					json = (Map) parser.parse(parsed.toJSONString());
+				} catch (ParseException e) {
+					e.printStackTrace();
+				}
+				//Ensure JSON returned is not null/empty
+				assertNotNull(json);
+				
+				Iterator iter = json.entrySet().iterator();
+				
+
+				while (iter.hasNext()) {
+					Map.Entry entry = (Map.Entry) iter.next();
+					assertNotNull(entry);
+					
+					String key = (String) entry.getKey();
+					assertNotNull(key);
+					
+					String value = (String) json.get("CISCO_TAGGED_SYSLOG").toString();
+					assertNotNull(value);
+				}
+			}
+		}
+
+		/**
+		 * Returns GrokAsa Input String
+		 */
+		public static String[] getGrokAsaStrings() {
+			return grokAsaStrings;
+		}
+
+			
+		/**
+		 * Sets GrokAsa Input String
+		 */	
+		public static void setGrokAsaStrings(String[] strings) {
+			GrokAsaParserTest.grokAsaStrings = strings;
+		}
+	    
+	    /**
+	     * Returns the grokAsaParser.
+	     * @return the grokAsaParser.
+	     */
+	    
+	    public GrokAsaParser getGrokAsaParser() {
+	        return grokAsaParser;
+	    }
+
+
+	    /**
+	     * Sets the grokAsaParser.
+	     * @param grokAsaParser the grokAsaParser.
+	     */
+	    
+	    public void setGrokAsaParser(GrokAsaParser grokAsaParser) {
+	    
+	        this.grokAsaParser = grokAsaParser;
+	    }
+		
+	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/CellTimestampComparator.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/CellTimestampComparator.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/CellTimestampComparator.java
deleted file mode 100644
index 43a4f28..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/CellTimestampComparator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.apache.metron.pcapservice;
-
-import java.util.Comparator;
-
-import org.apache.hadoop.hbase.Cell;
-
-/**
- * Comparator created for sorting pcaps cells based on the timestamp (asc).
- * 
- * @author Sayi
- */
-public class CellTimestampComparator implements Comparator<Cell> {
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-   */
-  
-  public int compare(Cell o1, Cell o2) {
-    return Long.valueOf(o1.getTimestamp()).compareTo(o2.getTimestamp());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/ConfigurationUtil.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/ConfigurationUtil.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/ConfigurationUtil.java
deleted file mode 100644
index 51f85fe..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/ConfigurationUtil.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package com.apache.metron.pcapservice;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.springframework.util.Assert;
-
-import com.apache.metron.configuration.ConfigurationManager;
-
-
-
-/**
- * utility class for this module which loads commons configuration to fetch
- * properties from underlying resources to communicate with hbase.
- * 
- * @author Sayi
- */
-public class ConfigurationUtil {
-
-	/** Configuration definition file name for fetching pcaps from hbase */
-	private static final String configDefFileName = "config-definition-hbase.xml";
-	
-	/** property configuration. */
-	private static Configuration propConfiguration = null;
-
-
-	/**
-	 * The Enum SizeUnit.
-	 */
-	public enum SizeUnit {
-
-		/** The kb. */
-		KB,
-		/** The mb. */
-		MB
-	};
-
-	/** The Constant DEFAULT_HCONNECTION_RETRY_LIMIT. */
-	private static final int DEFAULT_HCONNECTION_RETRY_LIMIT = 0;
-
-	/**
-	 * Loads configuration resources 
-	 * @return Configuration
-	 */
-	public static Configuration getConfiguration() {
-		if(propConfiguration == null){
-			propConfiguration =  ConfigurationManager.getConfiguration(configDefFileName);
-		}
-		return propConfiguration;
-	}
-
-	/**
-	 * Returns the configured default result size in bytes, if the user input is
-	 * null; otherwise, returns the user input after validating with the
-	 * configured max value. Throws IllegalArgumentException if : 1. input is
-	 * less than or equals to 0 OR 2. input is greater than configured
-	 * {hbase.scan.max.result.size} value
-	 * 
-	 * @param input
-	 *            the input
-	 * @return long
-	 */
-	public static long validateMaxResultSize(String input) {
-		if (input == null) {
-			return getDefaultResultSize();
-		}
-		// validate the user input
-		long value = convertToBytes(Long.parseLong(input), getResultSizeUnit());
-		Assert.isTrue(
-				isAllowableResultSize(value),
-				"'maxResponseSize' param value must be positive and less than {hbase.scan.max.result.size} value");
-		return convertToBytes(value, getResultSizeUnit());
-	}
-
-	/**
-	 * Checks if is allowable result size.
-	 * 
-	 * @param input
-	 *            the input
-	 * @return true, if is allowable result size
-	 */
-	public static boolean isAllowableResultSize(long input) {
-		if (input <= 0 || input > getMaxResultSize()) {
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * Returns the configured default result size in bytes.
-	 * 
-	 * @return long
-	 */
-	public static long getDefaultResultSize() {
-		float value = ConfigurationUtil.getConfiguration().getFloat(
-				"hbase.scan.default.result.size");
-		return convertToBytes(value, getResultSizeUnit());
-	}
-
-	/**
-	 * Returns the configured max result size in bytes.
-	 * 
-	 * @return long
-	 */
-	public static long getMaxResultSize() {
-		float value = ConfigurationUtil.getConfiguration().getFloat(
-				"hbase.scan.max.result.size");
-		return convertToBytes(value, getResultSizeUnit());
-	}
-
-	/**
-	 * Returns the configured max row size in bytes.
-	 * 
-	 * @return long
-	 */
-	public static long getMaxRowSize() {
-		float maxRowSize = ConfigurationUtil.getConfiguration().getFloat(
-				"hbase.table.max.row.size");
-		return convertToBytes(maxRowSize, getRowSizeUnit());
-	}
-
-	/**
-	 * Gets the result size unit.
-	 * 
-	 * @return the result size unit
-	 */
-	public static SizeUnit getResultSizeUnit() {
-		return SizeUnit.valueOf(ConfigurationUtil.getConfiguration()
-				.getString("hbase.scan.result.size.unit"));
-	}
-
-	/**
-	 * Gets the row size unit.
-	 * 
-	 * @return the row size unit
-	 */
-	public static SizeUnit getRowSizeUnit() {
-		return SizeUnit.valueOf(ConfigurationUtil.getConfiguration()
-				.getString("hbase.table.row.size.unit"));
-	}
-
-	/**
-	 * Gets the connection retry limit.
-	 * 
-	 * @return the connection retry limit
-	 */
-	public static int getConnectionRetryLimit() {
-		return ConfigurationUtil.getConfiguration().getInt(
-				"hbase.hconnection.retries.number",
-				DEFAULT_HCONNECTION_RETRY_LIMIT);
-	}
-
-	/**
-	 * Checks if is default include reverse traffic.
-	 * 
-	 * @return true, if is default include reverse traffic
-	 */
-	public static boolean isDefaultIncludeReverseTraffic() {
-		return ConfigurationUtil.getConfiguration().getBoolean(
-				"pcaps.include.reverse.traffic");
-	}
-
-	/**
-	 * Gets the table name.
-	 * 
-	 * @return the table name
-	 */
-	public static byte[] getTableName() {
-		return Bytes.toBytes(ConfigurationUtil.getConfiguration().getString(
-				"hbase.table.name"));
-	}
-
-	/**
-	 * Gets the column family.
-	 * 
-	 * @return the column family
-	 */
-	public static byte[] getColumnFamily() {
-		return Bytes.toBytes(ConfigurationUtil.getConfiguration().getString(
-				"hbase.table.column.family"));
-	}
-
-	/**
-	 * Gets the column qualifier.
-	 * 
-	 * @return the column qualifier
-	 */
-	public static byte[] getColumnQualifier() {
-		return Bytes.toBytes(ConfigurationUtil.getConfiguration().getString(
-				"hbase.table.column.qualifier"));
-	}
-
-	/**
-	 * Gets the max versions.
-	 * 
-	 * @return the max versions
-	 */
-	public static int getMaxVersions() {
-		return ConfigurationUtil.getConfiguration().getInt(
-				"hbase.table.column.maxVersions");
-	}
-
-	/**
-	 * Gets the configured tokens in rowkey.
-	 * 
-	 * @return the configured tokens in rowkey
-	 */
-	public static int getConfiguredTokensInRowkey() {
-		return ConfigurationUtil.getConfiguration().getInt(
-				"hbase.table.row.key.tokens");
-	}
-
-	/**
-	 * Gets the minimum tokens in inputkey.
-	 * 
-	 * @return the minimum tokens in inputkey
-	 */
-	public static int getMinimumTokensInInputkey() {
-		return ConfigurationUtil.getConfiguration().getInt(
-				"rest.api.input.key.min.tokens");
-	}
-
-	/**
-	 * Gets the appending token digits.
-	 * 
-	 * @return the appending token digits
-	 */
-	public static int getAppendingTokenDigits() {
-		return ConfigurationUtil.getConfiguration().getInt(
-				"hbase.table.row.key.token.appending.digits");
-	}
-
-	/**
-	 * Convert to bytes.
-	 * 
-	 * @param value
-	 *            the value
-	 * @param unit
-	 *            the unit
-	 * @return the long
-	 */
-	public static long convertToBytes(float value, SizeUnit unit) {
-		if (SizeUnit.KB == unit) {
-			return (long) (value * 1024);
-		}
-		if (SizeUnit.MB == unit) {
-			return (long) (value * 1024 * 1024);
-		}
-		return (long) value;
-	}
-
-	/**
-	 * The main method.
-	 * 
-	 * @param args
-	 *            the arguments
-	 */
-	public static void main(String[] args) {
-		long r1 = getMaxRowSize();
-		System.out.println("getMaxRowSizeInBytes = " + r1);
-		long r2 = getMaxResultSize();
-		System.out.println("getMaxAllowableResultSizeInBytes = " + r2);
-
-		SizeUnit u1 = getRowSizeUnit();
-		System.out.println("getMaxRowSizeUnit = " + u1.toString());
-		SizeUnit u2 = getResultSizeUnit();
-		System.out.println("getMaxAllowableResultsSizeUnit = " + u2.toString());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigConstants.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigConstants.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigConstants.java
deleted file mode 100644
index bd3eecb..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.apache.metron.pcapservice;
-
-/**
- * HBase configuration properties.
- * 
- * @author Sayi
- */
-public class HBaseConfigConstants {
-
-  /** The Constant HBASE_ZOOKEEPER_QUORUM. */
-  public static final String HBASE_ZOOKEEPER_QUORUM = "hbase.zookeeper.quorum";
-
-  /** The Constant HBASE_ZOOKEEPER_CLIENT_PORT. */
-  public static final String HBASE_ZOOKEEPER_CLIENT_PORT = "hbase.zookeeper.clientPort";
-
-  /** The Constant HBASE_ZOOKEEPER_SESSION_TIMEOUT. */
-  public static final String HBASE_ZOOKEEPER_SESSION_TIMEOUT = "zookeeper.session.timeout";
-
-  /** The Constant HBASE_ZOOKEEPER_RECOVERY_RETRY. */
-  public static final String HBASE_ZOOKEEPER_RECOVERY_RETRY = "zookeeper.recovery.retry";
-
-  /** The Constant HBASE_CLIENT_RETRIES_NUMBER. */
-  public static final String HBASE_CLIENT_RETRIES_NUMBER = "hbase.client.retries.number";
-
-  /** The delimeter. */
-  String delimeter = "-";
-
-  /** The regex. */
-  String regex = "\\-";
-
-  /** The Constant PCAP_KEY_DELIMETER. */
-  public static final String PCAP_KEY_DELIMETER = "-";
-
-  /** The Constant START_KEY. */
-  public static final String START_KEY = "startKey";
-
-  /** The Constant END_KEY. */
-  public static final String END_KEY = "endKey";
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigurationUtil.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigurationUtil.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigurationUtil.java
deleted file mode 100644
index 6061a5d..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/HBaseConfigurationUtil.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * 
- */
-package com.apache.metron.pcapservice;
-
-import java.io.IOException;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.client.HConnection;
-import org.apache.hadoop.hbase.client.HConnectionManager;
-import org.apache.log4j.Logger;
-import org.mortbay.log.Log;
-
-/**
- * Utility class which creates HConnection instance when the first request is
- * received and registers a shut down hook which closes the connection when the
- * JVM exits. Creates new connection to the cluster only if the existing
- * connection is closed for unknown reasons. Also creates Configuration with
- * HBase resources using configuration properties.
- * 
- * @author Sayi
- * 
- */
-public class HBaseConfigurationUtil {
-
-  /** The Constant LOGGER. */
-  private static final Logger LOGGER = Logger
-      .getLogger(HBaseConfigurationUtil.class);
-
-  /** Configuration which holds all HBase properties. */
-  private static Configuration config;
-
-  /**
-   * A cluster connection which knows how to find master node and locate regions
-   * on the cluster.
-   */
-  private static HConnection clusterConnection = null;
-
-  /**
-   * Creates HConnection instance when the first request is received and returns
-   * the same instance for all subsequent requests if the connection is still
-   * open.
-   * 
-   * @return HConnection instance
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public static HConnection getConnection() throws IOException {
-    if (!connectionAvailable()) {
-      synchronized (HBaseConfigurationUtil.class) {
-        createClusterConncetion();
-      }
-    }
-    return clusterConnection;
-  }
-
-  /**
-   * Creates the cluster conncetion.
-   * 
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  private static void createClusterConncetion() throws IOException {
-    try {
-      if (connectionAvailable()) {
-        return;
-      }
-      clusterConnection = HConnectionManager.createConnection(read());
-      addShutdownHook();
-      System.out.println("Created HConnection and added shutDownHook");
-    } catch (IOException e) {
-      LOGGER
-          .error(
-              "Exception occurred while creating HConnection using HConnectionManager",
-              e);
-      throw e;
-    }
-  }
-
-  /**
-   * Connection available.
-   * 
-   * @return true, if successful
-   */
-  private static boolean connectionAvailable() {
-    if (clusterConnection == null) {
-      System.out.println("clusterConnection=" + clusterConnection);
-      return false;
-    }
-    System.out.println("clusterConnection.isClosed()="
-        + clusterConnection.isClosed());
-    return clusterConnection != null && !clusterConnection.isClosed();
-  }
-
-  /**
-   * Adds the shutdown hook.
-   */
-  private static void addShutdownHook() {
-    Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
-      public void run() {
-        System.out
-            .println("Executing ShutdownHook HBaseConfigurationUtil : Closing HConnection");
-        try {
-          clusterConnection.close();
-        } catch (IOException e) {
-          Log.debug("Caught ignorable exception ", e);
-        }
-      }
-    }, "HBaseConfigurationUtilShutDown"));
-  }
-
-  /**
-   * Closes the underlying connection to cluster; ignores if any exception is
-   * thrown.
-   */
-  public static void closeConnection() {
-    if (clusterConnection != null) {
-      try {
-        clusterConnection.close();
-      } catch (IOException e) {
-        Log.debug("Caught ignorable exception ", e);
-      }
-    }
-  }
-
-  /**
-   * This method creates Configuration with HBase resources using configuration
-   * properties. The same Configuration object will be used to communicate with
-   * all HBase tables;
-   * 
-   * @return Configuration object
-   */
-  public static Configuration read() {
-    if (config == null) {
-      synchronized (HBaseConfigurationUtil.class) {
-        if (config == null) {
-          config = HBaseConfiguration.create();
-
-          config.set(
-              HBaseConfigConstants.HBASE_ZOOKEEPER_QUORUM,
-              ConfigurationUtil.getConfiguration().getString(
-                  "hbase.zookeeper.quorum"));
-          config.set(
-              HBaseConfigConstants.HBASE_ZOOKEEPER_CLIENT_PORT,
-              ConfigurationUtil.getConfiguration().getString(
-                  "hbase.zookeeper.clientPort"));
-          config.set(
-              HBaseConfigConstants.HBASE_CLIENT_RETRIES_NUMBER,
-              ConfigurationUtil.getConfiguration().getString(
-                  "hbase.client.retries.number"));
-          config.set(
-              HBaseConfigConstants.HBASE_ZOOKEEPER_SESSION_TIMEOUT,
-              ConfigurationUtil.getConfiguration().getString(
-                  "zookeeper.session.timeout"));
-          config.set(
-              HBaseConfigConstants.HBASE_ZOOKEEPER_RECOVERY_RETRY,
-              ConfigurationUtil.getConfiguration().getString(
-                  "zookeeper.recovery.retry"));
-        }
-      }
-    }
-    return config;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapGetter.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapGetter.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapGetter.java
deleted file mode 100644
index 3bb10c2..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapGetter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * 
- */
-package com.apache.metron.pcapservice;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * interface to all 'keys' based pcaps fetching methods.
- * 
- * @author Sayi
- */
-public interface IPcapGetter {
-
-  /**
-   * Gets the pcaps for the input list of keys and lastRowKey.
-   * 
-   * @param keys
-   *          the list of keys for which pcaps are to be retrieved
-   * @param lastRowKey
-   *          last row key from the previous partial response
-   * @param startTime
-   *          the start time in system milliseconds to be used to filter the
-   *          pcaps. The value is set to '0' if the caller sends negative value
-   * @param endTime
-   *          the end time in system milliseconds to be used to filter the
-   *          pcaps. The value is set to Long.MAX_VALUE if the caller sends
-   *          negative value. 'endTime' must be greater than the 'startTime'.
-   * @param includeReverseTraffic
-   *          indicates whether or not to include pcaps from the reverse traffic
-   * @param includeDuplicateLastRow
-   *          indicates whether or not to include the last row from the previous
-   *          partial response
-   * @param maxResultSize
-   *          the max result size
-   * @return PcapsResponse with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public PcapsResponse getPcaps(List<String> keys, String lastRowKey,
-      long startTime, long endTime, boolean includeReverseTraffic,
-      boolean includeDuplicateLastRow, long maxResultSize) throws IOException;
-
-  /**
-   * Gets the pcaps for the input key.
-   * 
-   * @param key
-   *          the key for which pcaps is to be retrieved.
-   * @param startTime
-   *          the start time in system milliseconds to be used to filter the
-   *          pcaps. The value is set to '0' if the caller sends negative value
-   * @param endTime
-   *          the end time in system milliseconds to be used to filter the
-   *          pcaps.The value is set to Long.MAX_VALUE if the caller sends
-   *          negative value. 'endTime' must be greater than the 'startTime'.
-   * @param includeReverseTraffic
-   *          indicates whether or not to include pcaps from the reverse traffic
-   * @return PcapsResponse with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public PcapsResponse getPcaps(String key, long startTime, long endTime,
-      boolean includeReverseTraffic) throws IOException;
-
-  /**
-   * Gets the pcaps for the input list of keys.
-   * 
-   * @param keys
-   *          the list of keys for which pcaps are to be retrieved.
-   * @return PcapsResponse with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public PcapsResponse getPcaps(List<String> keys) throws IOException;
-
-  /**
-   * Gets the pcaps for the input key.
-   * 
-   * @param key
-   *          the key for which pcaps is to be retrieved.
-   * @return PcapsResponse with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public PcapsResponse getPcaps(String key) throws IOException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/7c5661ea/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapScanner.java
----------------------------------------------------------------------
diff --git a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapScanner.java b/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapScanner.java
deleted file mode 100644
index 195c5d6..0000000
--- a/metron-streaming/Metron-Pcap_Service/src/main/java/com/apache/metron/pcapservice/IPcapScanner.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.apache.metron.pcapservice;
-
-import java.io.IOException;
-
-/**
- * The Interface for all pcaps fetching methods based on key range.
- */
-public interface IPcapScanner {
-
-  /**
-   * Gets the pcaps for between startKey (inclusive) and endKey (exclusive).
-   * 
-   * @param startKey
-   *          the start key of a key range for which pcaps is to be retrieved.
-   * @param endKey
-   *          the end key of a key range for which pcaps is to be retrieved.
-   * @param maxResponseSize
-   *          indicates the maximum response size in MegaBytes(MB). User needs
-   *          to pass positive value and must be less than 60 (MB)
-   * @param startTime
-   *          the start time in system milliseconds to be used to filter the
-   *          pcaps. The value is set to '0' if the caller sends negative value
-   * @param endTime
-   *          the end time in system milliseconds to be used to filter the
-   *          pcaps. The value is set Long.MAX_VALUE if the caller sends
-   *          negative value
-   * @return byte array with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public byte[] getPcaps(String startKey, String endKey, long maxResponseSize,
-      long startTime, long endTime) throws IOException;
-
-  /**
-   * Gets the pcaps for between startKey (inclusive) and endKey (exclusive).
-   * 
-   * @param startKey
-   *          the start key (inclusive) of a key range for which pcaps is to be
-   *          retrieved.
-   * @param endKey
-   *          the end key (exclusive) of a key range for which pcaps is to be
-   *          retrieved.
-   * @return byte array with all matching pcaps merged together
-   * @throws IOException
-   *           Signals that an I/O exception has occurred.
-   */
-  public byte[] getPcaps(String startKey, String endKey) throws IOException;
-
-}


Mime
View raw message