eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [1/2] eagle git commit: [EAGLE-895] Improve alert engine metadata to organize by siteId
Date Thu, 16 Feb 2017 05:24:21 GMT
Repository: eagle
Updated Branches:
  refs/heads/master 7681287cb -> 49ca3b0ec


http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java
index 1839a99..63b1d82 100755
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java
+++ b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java
@@ -25,9 +25,12 @@ import org.apache.eagle.log.entity.meta.IndexDefinition;
 import org.apache.eagle.log.entity.old.GenericDeleter;
 import org.apache.eagle.log.entity.test.TestLogAPIEntity;
 import org.apache.eagle.service.hbase.TestHBaseBase;
+import org.junit.AfterClass;
 import org.junit.Assert;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -35,371 +38,377 @@ import java.util.List;
 
 public class TestTestLogAPIEntity extends TestHBaseBase {
 
-	@Test 
-	public void testGetValue() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		}
-
-		Assert.assertNotNull(ed);
-		Assert.assertNotNull(ed.getQualifierGetterMap());
-		TestLogAPIEntity e = new TestLogAPIEntity();
-		e.setField1(1);
-		e.setField2(2);
-		e.setField3(3);
-		e.setField4(4L);
-		e.setField5(5.0);
-		e.setField6(6.0);
-		e.setField7("7");
-		e.setTags(new HashMap<String, String>());
-		e.getTags().put("tag1", "value1");
-
-		Assert.assertNotNull(ed.getQualifierGetterMap().get("field1"));
-		Assert.assertEquals(1, ed.getValue(e, "field1"));
-		Assert.assertEquals(2, ed.getValue(e, "field2"));
-		Assert.assertEquals(3L, ed.getValue(e, "field3"));
-		Assert.assertEquals(4L, ed.getValue(e, "field4"));
-		Assert.assertEquals(5.0, ed.getValue(e, "field5"));
-		Assert.assertEquals(6.0, ed.getValue(e, "field6"));
-		Assert.assertEquals("7", ed.getValue(e, "field7"));
-		Assert.assertEquals("value1", ed.getValue(e, "tag1"));
-	}
-	
-	@Test
-	public void testIndexDefinition() throws InstantiationException, IllegalAccessException {
-		
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		}
-		Assert.assertNotNull(ed);
-		IndexDefinition[] indexDefinitions = ed.getIndexes();
-		Assert.assertNotNull(indexDefinitions);
-		Assert.assertEquals(2, indexDefinitions.length);
-		for (IndexDefinition def : indexDefinitions) {
-			Assert.assertNotNull(def.getIndexName());
-			Assert.assertNotNull(def.getIndexColumns());
-			Assert.assertEquals(1, def.getIndexColumns().length);
-		}
-	}
-	
-	@Test
-	public void testWriteEmptyIndexFieldAndDeleteWithoutPartition() throws Exception {
-		EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		}
-		String[] partitions = ed.getPartitions();
-		ed.setPartitions(null);
-		
-		try {
-			List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
-			TestLogAPIEntity e = new TestLogAPIEntity();
-			e.setField1(1);
-			e.setField2(2);
-			e.setField3(3);
-			e.setField4(4L);
-			e.setField5(5.0);
-			e.setField6(5.0);
-			e.setField7("7");
-			e.setTags(new HashMap<String, String>());
+    @BeforeClass
+    public static void createTable() throws IllegalAccessException, InstantiationException, IOException {
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        hbase.createTable(ed.getTable(), ed.getColumnFamily());
+    }
+
+    @Test
+    public void testGetValue() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+
+        Assert.assertNotNull(ed);
+        Assert.assertNotNull(ed.getQualifierGetterMap());
+        TestLogAPIEntity e = new TestLogAPIEntity();
+        e.setField1(1);
+        e.setField2(2);
+        e.setField3(3);
+        e.setField4(4L);
+        e.setField5(5.0);
+        e.setField6(6.0);
+        e.setField7("7");
+        e.setTags(new HashMap<String, String>());
+        e.getTags().put("tag1", "value1");
+
+        Assert.assertNotNull(ed.getQualifierGetterMap().get("field1"));
+        Assert.assertEquals(1, ed.getValue(e, "field1"));
+        Assert.assertEquals(2, ed.getValue(e, "field2"));
+        Assert.assertEquals(3L, ed.getValue(e, "field3"));
+        Assert.assertEquals(4L, ed.getValue(e, "field4"));
+        Assert.assertEquals(5.0, ed.getValue(e, "field5"));
+        Assert.assertEquals(6.0, ed.getValue(e, "field6"));
+        Assert.assertEquals("7", ed.getValue(e, "field7"));
+        Assert.assertEquals("value1", ed.getValue(e, "tag1"));
+    }
+
+    @Test
+    public void testIndexDefinition() throws InstantiationException, IllegalAccessException {
+
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+        Assert.assertNotNull(ed);
+        IndexDefinition[] indexDefinitions = ed.getIndexes();
+        Assert.assertNotNull(indexDefinitions);
+        Assert.assertEquals(2, indexDefinitions.length);
+        for (IndexDefinition def : indexDefinitions) {
+            Assert.assertNotNull(def.getIndexName());
+            Assert.assertNotNull(def.getIndexColumns());
+            Assert.assertEquals(1, def.getIndexColumns().length);
+        }
+    }
+
+    @Test
+    public void testWriteEmptyIndexFieldAndDeleteWithoutPartition() throws Exception {
+        EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        // hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
+
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+        String[] partitions = ed.getPartitions();
+        ed.setPartitions(null);
+
+        try {
+            List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
+            TestLogAPIEntity e = new TestLogAPIEntity();
+            e.setField1(1);
+            e.setField2(2);
+            e.setField3(3);
+            e.setField4(4L);
+            e.setField5(5.0);
+            e.setField6(5.0);
+            e.setField7("7");
+            e.setTags(new HashMap<String, String>());
             e.getTags().put("tag1", "value1");
-			list.add(e);
-	
-			GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-			List<String> result = writer.write(list);
-			Assert.assertNotNull(result);
-			
-			List<byte[]> indexRowkeys = new ArrayList<byte[]>();
-			IndexDefinition[] indexDefs = ed.getIndexes();
-			for (IndexDefinition index : indexDefs) {
-				byte[] indexRowkey = index.generateIndexRowkey(e);
-				indexRowkeys.add(indexRowkey);
-			}
-			byte[][] qualifiers = new byte[7][];
-			qualifiers[0] = "a".getBytes();
-			qualifiers[1] = "b".getBytes();
-			qualifiers[2] = "c".getBytes();
-			qualifiers[3] = "d".getBytes();
-			qualifiers[4] = "e".getBytes();
-			qualifiers[5] = "f".getBytes();
-			qualifiers[6] = "g".getBytes();
-			
-			UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			InternalLog log = reader.read();
-			Assert.assertNotNull(log);
-	
-			TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			TestLogAPIEntity e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			
-			log = reader.read();
-			Assert.assertNotNull(log);
-			newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-	
-			GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
-			deleter.delete(list);
-			
-			reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-		} finally {
-			ed.setPartitions(partitions);
-		}
-		hbase.deleteTable(entityDefinition.getTable());
-	}
-	
-
-	/*
-	 *  testWriteEmptyIndexFieldAndDeleteWithPartition(eagle.log.entity.TestTestLogAPIEntity): expected:<86400000> but was:<0>
-	 */
-	//@Test
-	public void testWriteEmptyIndexFieldAndDeleteWithPartition() throws Exception {
+            list.add(e);
+
+            GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
+            List<String> result = writer.write(list);
+            Assert.assertNotNull(result);
+
+            List<byte[]> indexRowkeys = new ArrayList<byte[]>();
+            IndexDefinition[] indexDefs = ed.getIndexes();
+            for (IndexDefinition index : indexDefs) {
+                byte[] indexRowkey = index.generateIndexRowkey(e);
+                indexRowkeys.add(indexRowkey);
+            }
+            byte[][] qualifiers = new byte[7][];
+            qualifiers[0] = "a".getBytes();
+            qualifiers[1] = "b".getBytes();
+            qualifiers[2] = "c".getBytes();
+            qualifiers[3] = "d".getBytes();
+            qualifiers[4] = "e".getBytes();
+            qualifiers[5] = "f".getBytes();
+            qualifiers[6] = "g".getBytes();
+
+            UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            InternalLog log = reader.read();
+            Assert.assertNotNull(log);
+
+            TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            TestLogAPIEntity e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+
+            log = reader.read();
+            Assert.assertNotNull(log);
+            newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+
+            GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
+            deleter.delete(list);
+
+            reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+        } finally {
+            ed.setPartitions(partitions);
+        }
+        // hbase.deleteTable(entityDefinition.getTable());
+    }
+
+
+    /*
+     *  testWriteEmptyIndexFieldAndDeleteWithPartition(eagle.log.entity.TestTestLogAPIEntity): expected:<86400000> but was:<0>
+     */
+    //@Test
+    public void testWriteEmptyIndexFieldAndDeleteWithPartition() throws Exception {
         EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		}
-		String[] partitions = ed.getPartitions();
-		String[] newPart = new String[2];
-		newPart[0] = "cluster";
-		newPart[1] = "datacenter";
-		ed.setPartitions(newPart);
-		
-		try {
-			List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
-			TestLogAPIEntity e = new TestLogAPIEntity();
-			e.setField1(1);
-			e.setField2(2);
-			e.setField3(3);
-			e.setField4(4L);
-			e.setField5(5.0);
-			e.setField6(5.0);
-			e.setField7("7");
-			e.setTags(new HashMap<String, String>());
-			e.getTags().put("cluster", "test4UT");
-			e.getTags().put("datacenter", "dc1");
-			list.add(e);
-	
-			GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-			List<String> result = writer.write(list);
-			Assert.assertNotNull(result);
-			
-			List<byte[]> indexRowkeys = new ArrayList<byte[]>();
-			IndexDefinition[] indexDefs = ed.getIndexes();
-			for (IndexDefinition index : indexDefs) {
-				byte[] indexRowkey = index.generateIndexRowkey(e);
-				indexRowkeys.add(indexRowkey);
-			}
-			byte[][] qualifiers = new byte[9][];
-			qualifiers[0] = "a".getBytes();
-			qualifiers[1] = "b".getBytes();
-			qualifiers[2] = "c".getBytes();
-			qualifiers[3] = "d".getBytes();
-			qualifiers[4] = "e".getBytes();
-			qualifiers[5] = "f".getBytes();
-			qualifiers[6] = "g".getBytes();
-			qualifiers[7] = "cluster".getBytes();
-			qualifiers[8] = "datacenter".getBytes();
-			
-			UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			InternalLog log = reader.read();
-			Assert.assertNotNull(log);
-	
-			TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			TestLogAPIEntity e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
-			Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
-			Assert.assertEquals(EntityConstants.FIXED_WRITE_TIMESTAMP, e1.getTimestamp());
-
-			log = reader.read();
-			Assert.assertNotNull(log);
-			newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
-			Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
-			Assert.assertEquals(EntityConstants.FIXED_WRITE_TIMESTAMP, e1.getTimestamp());
-
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-
-			GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
-			deleter.delete(list);
-			
-			reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-		} finally {
-			ed.setPartitions(partitions);
-		}
-		hbase.deleteTable(entityDefinition.getTable());
-	}
-
-	/**
-	 * testWriteEmptyIndexFieldAndDeleteWithPartitionAndTimeSeries(eagle.log.entity.TestTestLogAPIEntity): expected:<1434809555569> but was:<0>
-	 */
-	
-	//@Test
-	public void testWriteEmptyIndexFieldAndDeleteWithPartitionAndTimeSeries() throws Exception {
+        // hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
+
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+        String[] partitions = ed.getPartitions();
+        String[] newPart = new String[2];
+        newPart[0] = "cluster";
+        newPart[1] = "datacenter";
+        ed.setPartitions(newPart);
+
+        try {
+            List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
+            TestLogAPIEntity e = new TestLogAPIEntity();
+            e.setField1(1);
+            e.setField2(2);
+            e.setField3(3);
+            e.setField4(4L);
+            e.setField5(5.0);
+            e.setField6(5.0);
+            e.setField7("7");
+            e.setTags(new HashMap<String, String>());
+            e.getTags().put("cluster", "test4UT");
+            e.getTags().put("datacenter", "dc1");
+            list.add(e);
+
+            GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
+            List<String> result = writer.write(list);
+            Assert.assertNotNull(result);
+
+            List<byte[]> indexRowkeys = new ArrayList<byte[]>();
+            IndexDefinition[] indexDefs = ed.getIndexes();
+            for (IndexDefinition index : indexDefs) {
+                byte[] indexRowkey = index.generateIndexRowkey(e);
+                indexRowkeys.add(indexRowkey);
+            }
+            byte[][] qualifiers = new byte[9][];
+            qualifiers[0] = "a".getBytes();
+            qualifiers[1] = "b".getBytes();
+            qualifiers[2] = "c".getBytes();
+            qualifiers[3] = "d".getBytes();
+            qualifiers[4] = "e".getBytes();
+            qualifiers[5] = "f".getBytes();
+            qualifiers[6] = "g".getBytes();
+            qualifiers[7] = "cluster".getBytes();
+            qualifiers[8] = "datacenter".getBytes();
+
+            UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            InternalLog log = reader.read();
+            Assert.assertNotNull(log);
+
+            TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            TestLogAPIEntity e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+            Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
+            Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
+            Assert.assertEquals(EntityConstants.FIXED_WRITE_TIMESTAMP, e1.getTimestamp());
+
+            log = reader.read();
+            Assert.assertNotNull(log);
+            newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+            Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
+            Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
+            Assert.assertEquals(EntityConstants.FIXED_WRITE_TIMESTAMP, e1.getTimestamp());
+
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+
+            GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
+            deleter.delete(list);
+
+            reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+        } finally {
+            ed.setPartitions(partitions);
+        }
+        // hbase.deleteTable(entityDefinition.getTable());
+    }
+
+    /**
+     * testWriteEmptyIndexFieldAndDeleteWithPartitionAndTimeSeries(eagle.log.entity.TestTestLogAPIEntity): expected:<1434809555569> but was:<0>
+     */
+
+    //@Test
+    public void testWriteEmptyIndexFieldAndDeleteWithPartitionAndTimeSeries() throws Exception {
         EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		}
-		String[] partitions = ed.getPartitions();
-		String[] newPart = new String[2];
-		newPart[0] = "cluster";
-		newPart[1] = "datacenter";
-		ed.setPartitions(newPart);
-		boolean isTimeSeries = ed.isTimeSeries();
-		ed.setTimeSeries(true);
-		long now = System.currentTimeMillis();
-		
-		try {
-			List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
-			TestLogAPIEntity e = new TestLogAPIEntity();
-			e.setField1(1);
-			e.setField2(2);
-			e.setField3(3);
-			e.setField4(4L);
-			e.setField5(5.0);
-			e.setField6(5.0);
-			e.setField7("7");
-			e.setTags(new HashMap<String, String>());
-			e.getTags().put("cluster", "test4UT");
-			e.getTags().put("datacenter", "dc1");
-			e.setTimestamp(now);
-			list.add(e);
-	
-			GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-			List<String> result = writer.write(list);
-			Assert.assertNotNull(result);
-			
-			List<byte[]> indexRowkeys = new ArrayList<byte[]>();
-			IndexDefinition[] indexDefs = ed.getIndexes();
-			for (IndexDefinition index : indexDefs) {
-				byte[] indexRowkey = index.generateIndexRowkey(e);
-				indexRowkeys.add(indexRowkey);
-			}
-			byte[][] qualifiers = new byte[9][];
-			qualifiers[0] = "a".getBytes();
-			qualifiers[1] = "b".getBytes();
-			qualifiers[2] = "c".getBytes();
-			qualifiers[3] = "d".getBytes();
-			qualifiers[4] = "e".getBytes();
-			qualifiers[5] = "f".getBytes();
-			qualifiers[6] = "g".getBytes();
-			qualifiers[7] = "cluster".getBytes();
-			qualifiers[8] = "datacenter".getBytes();
-			
-			UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			InternalLog log = reader.read();
-			Assert.assertNotNull(log);
-	
-			TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			TestLogAPIEntity e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
-			Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
-			Assert.assertEquals(now, e1.getTimestamp());
-
-			log = reader.read();
-			Assert.assertNotNull(log);
-			newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
-			Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
-			e1 = (TestLogAPIEntity)newEntity;
-			Assert.assertEquals(e.getField1(), e1.getField1());
-			Assert.assertEquals(e.getField2(), e1.getField2());
-			Assert.assertEquals(e.getField3(), e1.getField3());
-			Assert.assertEquals(e.getField4(), e1.getField4());
-			Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
-			Assert.assertEquals(e.getField6(), e1.getField6());
-			Assert.assertEquals(e.getField7(), e1.getField7());
-			Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
-			Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
-			Assert.assertEquals(now, e1.getTimestamp());
-
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-
-			GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
-			deleter.delete(list);
-			
-			reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
-			reader.open();
-			log = reader.read();
-			Assert.assertNull(log);
-			reader.close();
-		} finally {
-			ed.setPartitions(partitions);
-			ed.setTimeSeries(isTimeSeries);
-		}
-		hbase.deleteTable(entityDefinition.getTable());
-	}
+        // hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
+
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+        String[] partitions = ed.getPartitions();
+        String[] newPart = new String[2];
+        newPart[0] = "cluster";
+        newPart[1] = "datacenter";
+        ed.setPartitions(newPart);
+        boolean isTimeSeries = ed.isTimeSeries();
+        ed.setTimeSeries(true);
+        long now = System.currentTimeMillis();
+
+        try {
+            List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
+            TestLogAPIEntity e = new TestLogAPIEntity();
+            e.setField1(1);
+            e.setField2(2);
+            e.setField3(3);
+            e.setField4(4L);
+            e.setField5(5.0);
+            e.setField6(5.0);
+            e.setField7("7");
+            e.setTags(new HashMap<String, String>());
+            e.getTags().put("cluster", "test4UT");
+            e.getTags().put("datacenter", "dc1");
+            e.setTimestamp(now);
+            list.add(e);
+
+            GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
+            List<String> result = writer.write(list);
+            Assert.assertNotNull(result);
+
+            List<byte[]> indexRowkeys = new ArrayList<byte[]>();
+            IndexDefinition[] indexDefs = ed.getIndexes();
+            for (IndexDefinition index : indexDefs) {
+                byte[] indexRowkey = index.generateIndexRowkey(e);
+                indexRowkeys.add(indexRowkey);
+            }
+            byte[][] qualifiers = new byte[9][];
+            qualifiers[0] = "a".getBytes();
+            qualifiers[1] = "b".getBytes();
+            qualifiers[2] = "c".getBytes();
+            qualifiers[3] = "d".getBytes();
+            qualifiers[4] = "e".getBytes();
+            qualifiers[5] = "f".getBytes();
+            qualifiers[6] = "g".getBytes();
+            qualifiers[7] = "cluster".getBytes();
+            qualifiers[8] = "datacenter".getBytes();
+
+            UniqueIndexLogReader reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            InternalLog log = reader.read();
+            Assert.assertNotNull(log);
+
+            TaggedLogAPIEntity newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            TestLogAPIEntity e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+            Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
+            Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
+            Assert.assertEquals(now, e1.getTimestamp());
+
+            log = reader.read();
+            Assert.assertNotNull(log);
+            newEntity = HBaseInternalLogHelper.buildEntity(log, ed);
+            Assert.assertEquals(TestLogAPIEntity.class, newEntity.getClass());
+            e1 = (TestLogAPIEntity) newEntity;
+            Assert.assertEquals(e.getField1(), e1.getField1());
+            Assert.assertEquals(e.getField2(), e1.getField2());
+            Assert.assertEquals(e.getField3(), e1.getField3());
+            Assert.assertEquals(e.getField4(), e1.getField4());
+            Assert.assertEquals(e.getField5(), e1.getField5(), 0.001);
+            Assert.assertEquals(e.getField6(), e1.getField6());
+            Assert.assertEquals(e.getField7(), e1.getField7());
+            Assert.assertEquals("test4UT", e1.getTags().get("cluster"));
+            Assert.assertEquals("dc1", e1.getTags().get("datacenter"));
+            Assert.assertEquals(now, e1.getTimestamp());
+
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+
+            GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
+            deleter.delete(list);
+
+            reader = new UniqueIndexLogReader(indexDefs[0], indexRowkeys, qualifiers, null);
+            reader.open();
+            log = reader.read();
+            Assert.assertNull(log);
+            reader.close();
+        } finally {
+            ed.setPartitions(partitions);
+            ed.setTimeSeries(isTimeSeries);
+        }
+        // hbase.deleteTable(entityDefinition.getTable());
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java
index 1b64b20..2904153 100755
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java
+++ b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java
@@ -16,6 +16,7 @@
  */
 package org.apache.eagle.log.entity.repo;
 
+import org.apache.eagle.log.entity.MetricMetadataEntity;
 import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
 import org.junit.Assert;
 import org.junit.Test;
@@ -24,7 +25,7 @@ public class TestEntityRepositoryScanner {
 
 	@Test
 	public void testScan() throws InstantiationException, IllegalAccessException {
-		EntityRepositoryScanner.scan();
-		Assert.assertNotNull(EntityDefinitionManager.getEntityByServiceName("MetricMetadataService"));
+		Assert.assertEquals(MetricMetadataEntity.class,
+				EntityDefinitionManager.getEntityByServiceName("MetricMetadataService").getEntityClass());
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
index 6dcbc78..cf73d46 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
@@ -28,10 +28,7 @@ import org.apache.eagle.storage.operation.QueryStatement;
 import org.apache.eagle.storage.operation.RawQuery;
 import org.apache.eagle.storage.result.ModifyResult;
 import org.apache.eagle.storage.result.QueryResult;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.*;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -40,20 +37,14 @@ import java.util.List;
 
 public class TestHBaseStatement extends TestHBaseBase {
 
-    EntityDefinition entityDefinition;
+    private static EntityDefinition entityDefinition;
 
-    @Before
-    public void setUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
+    @BeforeClass
+    public static void setUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
         entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
         hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
     }
 
-    @After
-    public void cleanUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        hbase.deleteTable(entityDefinition.getTable());
-    }
-
     @Test
     public void testCreate() throws IllegalDataStorageTypeException, IOException {
         final List<TestTimeSeriesAPIEntity> entities = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestWithHBaseCoprocessor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestWithHBaseCoprocessor.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestWithHBaseCoprocessor.java
new file mode 100644
index 0000000..b3d3cfa
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestWithHBaseCoprocessor.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eagle.storage.hbase;
+
+import org.apache.eagle.storage.hbase.query.coprocessor.AggregateProtocolEndPoint;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class TestWithHBaseCoprocessor {
+    private static final Logger LOG = LoggerFactory.getLogger(TestWithHBaseCoprocessor.class);
+    protected static HBaseTestingUtility hbase;
+
+    protected static String getZkZnodeParent() {
+        return "/hbase";
+    }
+
+    @BeforeClass
+    public static void setUpHBase() throws IOException {
+        System.setProperty("config.resource", "/application-co.conf");
+        Configuration conf = HBaseConfiguration.create();
+        conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, AggregateProtocolEndPoint.class.getName());
+        conf.setInt("hbase.master.info.port", -1);//avoid port clobbering
+        conf.setInt("hbase.regionserver.info.port", -1);//avoid port clobbering
+        hbase = new HBaseTestingUtility();
+        try {
+            hbase.startMiniCluster();
+        } catch (Exception e) {
+            LOG.error("Error to start mini cluster: " + e.getMessage(), e);
+            throw new IllegalStateException(e);
+        }
+
+        HTable table = hbase.createTable(String.valueOf("unittest"),"f");
+        HTableDescriptor descriptor = new HTableDescriptor(table.getTableDescriptor());
+        descriptor.addCoprocessor(AggregateProtocolEndPoint.class.getName());
+        hbase.getHBaseAdmin().modifyTable("unittest",descriptor);
+
+        System.setProperty("storage.hbase.autoCreateTable","false");
+        System.setProperty("storage.hbase.coprocessorEnabled", String.valueOf(true));
+        System.setProperty("storage.hbase.zookeeperZnodeParent", getZkZnodeParent());
+        System.setProperty("storage.hbase.zookeeperPropertyClientPort", String.valueOf(hbase.getZkCluster().getClientPort()));
+    }
+
+    @AfterClass
+    public static void shutdownHBase() {
+        try {
+            hbase.shutdownMiniCluster();
+        } catch (Exception e) {
+            LOG.error("Error to shutdown mini cluster: " + e.getMessage(), e);
+            throw new IllegalStateException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java
index be09f4e..0e37272 100755
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java
@@ -16,28 +16,7 @@
  */
 package org.apache.eagle.storage.hbase.aggregate.coprocessor;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
 import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateProtocolEndPoint;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
-
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.junit.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
 import org.apache.eagle.log.entity.GenericEntityWriter;
 import org.apache.eagle.log.entity.meta.EntityDefinition;
@@ -48,12 +27,28 @@ import org.apache.eagle.query.aggregate.AggregateFunctionType;
 import org.apache.eagle.query.aggregate.raw.GroupbyKey;
 import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
 import org.apache.eagle.query.aggregate.raw.GroupbyValue;
-import org.apache.eagle.service.hbase.TestHBaseBase;
+import org.apache.eagle.storage.hbase.TestWithHBaseCoprocessor;
+import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
+import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
+import org.apache.hadoop.hbase.client.HTableInterface;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.io.BytesWritable;
+import org.apache.hadoop.io.DoubleWritable;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
 
 /**
  * @since : 10/30/14,2014
  */
-public class TestGroupAggregateClient extends TestHBaseBase {
+public class TestGroupAggregateClient extends TestWithHBaseCoprocessor {
     HTableInterface table;
     long startTime;
     long endTime;
@@ -64,17 +59,8 @@ public class TestGroupAggregateClient extends TestHBaseBase {
 
     private final static Logger LOG = LoggerFactory.getLogger(TestGroupAggregateClient.class);
 
-    // This is Bad, It will hide TestHBaseBase.setUpHBase!!!!
-    @BeforeClass
-    public static void setUpHBase() {
-        Configuration conf = new Configuration();
-        conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,AggregateProtocolEndPoint.class.getName());
-        TestHBaseBase.setupHBaseWithConfig(conf);
-    }
-
     @Before
     public void setUp() {
-        hbase.createTable("unittest", "f");
         startTime = System.currentTimeMillis();
         try {
             rowkeys = prepareData(num);
@@ -97,16 +83,6 @@ public class TestGroupAggregateClient extends TestHBaseBase {
         scan.setFilter(compiler.filter());
     }
 
-    @After
-    public void shutdown() {
-        try {
-            hbase.deleteTable("unittest");
-            new HTableFactory().releaseHTableInterface(table);
-        } catch (IOException e) {
-            LOG.error(e.getMessage(), e);
-        }
-    }
-
     private List<String> prepareData(int count) throws Exception {
         List<TaggedLogAPIEntity> list = new ArrayList<TaggedLogAPIEntity>();
         EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
index d258691..4845fc5 100755
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.apache.eagle.common.config.EagleConfigFactory;
+import org.apache.eagle.storage.hbase.TestWithHBaseCoprocessor;
 import org.apache.eagle.storage.hbase.query.coprocessor.AggregateProtocolEndPoint;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
@@ -53,30 +54,21 @@ import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl
 /**
  * @since : 11/10/14,2014
  */
-public class TestGroupAggregateTimeSeriesClient extends TestHBaseBase {
+public class TestGroupAggregateTimeSeriesClient extends TestWithHBaseCoprocessor {
 
     private final static Logger LOG = LoggerFactory.getLogger(TestGroupAggregateTimeSeriesClient.class);
 
-    HTableInterface table;
-    long startTime;
-    long endTime;
-    List<String> rowkeys;
-    AggregateClient client;
-    Scan scan;
-    EntityDefinition ed;
-
-    // This is Bad, It will hide TestHBaseBase.setUpHBase!!!!
-    @BeforeClass
-    public static void setUpHBase() {
-        Configuration conf = new Configuration();
-        conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,AggregateProtocolEndPoint.class.getName());
-        TestHBaseBase.setupHBaseWithConfig(conf);
-    }
+    private HTableInterface table;
+    private long startTime;
+    private long endTime;
+    private List<String> rowkeys;
+    private AggregateClient client;
+    private Scan scan;
+    private EntityDefinition ed;
 
     @Before
     public void setUp() throws IllegalAccessException, InstantiationException {
         ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        hbase.createTable("unittest", "f");
         table = EagleConfigFactory.load().getHTable("unittest");
         startTime = System.currentTimeMillis();
         try {

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
index de24b5d..acd6fe7 100755
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
@@ -23,6 +23,7 @@ import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
 import org.apache.eagle.service.hbase.TestHBaseBase;
 import org.apache.eagle.storage.DataStorage;
 import org.apache.eagle.storage.DataStorageManager;
+import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
 import org.apache.eagle.storage.exception.QueryCompileException;
 import org.apache.eagle.storage.operation.CompiledQuery;
 import org.apache.eagle.storage.operation.RawQuery;
@@ -30,6 +31,7 @@ import org.apache.eagle.storage.result.ModifyResult;
 import org.apache.eagle.storage.result.QueryResult;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,10 +41,10 @@ import java.util.*;
 
 public class TestHBaseStorage extends TestHBaseBase {
 
-    static final Logger LOG = LoggerFactory.getLogger(TestHBaseStorage.class);
-    EntityDefinition entityDefinition;
-    DataStorage<String> storage;
-    long baseTimestamp;
+    private static final Logger LOG = LoggerFactory.getLogger(TestHBaseStorage.class);
+    private static EntityDefinition entityDefinition;
+    private static DataStorage<String> storage;
+    private long baseTimestamp;
 
     private TestTimeSeriesAPIEntity newInstance() {
         TestTimeSeriesAPIEntity instance = new TestTimeSeriesAPIEntity();
@@ -64,13 +66,17 @@ public class TestHBaseStorage extends TestHBaseBase {
         return instance;
     }
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeClass
+    public static void initialize() throws IllegalAccessException, InstantiationException, IOException, IllegalDataStorageTypeException {
         entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        entityDefinition.setTags(new String[] {"cluster", "datacenter", "random"});
-
+        entityDefinition.setTags(new String[] {"cluster", "datacenter", "random"});;
+        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
         storage = DataStorageManager.getDataStorageByEagleConfig();
         storage.init();
+    }
+
+    @Before
+    public void setUp() throws Exception {
         GregorianCalendar gc = new GregorianCalendar();
         gc.clear();
         gc.set(2014, 1, 6, 1, 40, 12);

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
index 8620a5b..c664804 100755
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageAggregateWithCoprocessor.java
@@ -20,17 +20,15 @@ import org.apache.eagle.common.DateTimeUtil;
 import org.apache.eagle.log.entity.meta.EntityDefinition;
 import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
 import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.service.hbase.TestHBaseBase;
 import org.apache.eagle.storage.DataStorage;
 import org.apache.eagle.storage.DataStorageManager;
+import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
 import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateProtocolEndPoint;
+import org.apache.eagle.storage.hbase.TestWithHBaseCoprocessor;
 import org.apache.eagle.storage.operation.CompiledQuery;
 import org.apache.eagle.storage.operation.RawQuery;
 import org.apache.eagle.storage.result.ModifyResult;
 import org.apache.eagle.storage.result.QueryResult;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -41,20 +39,11 @@ import org.slf4j.LoggerFactory;
 import java.io.IOException;
 import java.util.*;
 
-public class TestHBaseStorageAggregateWithCoprocessor extends TestHBaseBase {
-    static final Logger LOG = LoggerFactory.getLogger(TestHBaseStorageAggregateWithCoprocessor.class);
-    EntityDefinition entityDefinition;
-    DataStorage<String> storage;
-    long baseTimestamp;
-
-    // This is Bad, It will hide TestHBaseBase.setUpHBase!!!!
-    @BeforeClass
-    public static void setUpHBase() {
-        System.setProperty("config.resource", "/application-co.conf");
-        Configuration conf = new Configuration();
-        conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, AggregateProtocolEndPoint.class.getName());
-        TestHBaseBase.setupHBaseWithConfig(conf);
-    }
+public class TestHBaseStorageAggregateWithCoprocessor extends TestWithHBaseCoprocessor {
+    private static final Logger LOG = LoggerFactory.getLogger(TestHBaseStorageAggregateWithCoprocessor.class);
+    private static EntityDefinition entityDefinition;
+    private static DataStorage<String> storage;
+    private long baseTimestamp;
 
     private TestTimeSeriesAPIEntity newInstance() {
         TestTimeSeriesAPIEntity instance = new TestTimeSeriesAPIEntity();
@@ -76,13 +65,16 @@ public class TestHBaseStorageAggregateWithCoprocessor extends TestHBaseBase {
         return instance;
     }
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeClass
+    public static void prepare() throws IllegalAccessException, InstantiationException, IllegalDataStorageTypeException, IOException {
         entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        entityDefinition.setTags(new String[] {"cluster", "datacenter", "random"});
-
+        entityDefinition.setTags(new String[]{"cluster", "datacenter", "random"});
         storage = DataStorageManager.getDataStorageByEagleConfig();
         storage.init();
+    }
+
+    @Before
+    public void setUp() throws Exception {
         GregorianCalendar gc = new GregorianCalendar();
         gc.clear();
         gc.set(2014, 1, 6, 1, 40, 12);

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
index dd81eee..b6af836 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
@@ -17,21 +17,26 @@
 package org.apache.eagle.storage.hbase.spi;
 
 import org.apache.eagle.service.hbase.TestHBaseBase;
+import org.apache.eagle.storage.DataStorage;
 import org.apache.eagle.storage.DataStorageManager;
 import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
 import org.apache.eagle.storage.hbase.HBaseStorage;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.io.IOException;
+
 /**
  * @since 3/20/15
  */
-public class TestHBaseStorageLoader  extends TestHBaseBase {
+public class TestHBaseStorageLoader extends TestHBaseBase {
     @Test
-    public void testHBaseStorageLoader() throws IllegalDataStorageTypeException {
-
-        Assert.assertTrue(DataStorageManager.getDataStorageByEagleConfig() instanceof HBaseStorage);
-        Assert.assertTrue(DataStorageManager.newDataStorage("hbase") instanceof HBaseStorage);
-
+    public void testHBaseStorageLoader() throws IllegalDataStorageTypeException, IOException {
+        DataStorage hBaseStorage1 = DataStorageManager.getDataStorageByEagleConfig();
+        DataStorage hBaseStorage2 = DataStorageManager.newDataStorage("hbase");
+        Assert.assertTrue(hBaseStorage1 instanceof HBaseStorage);
+        Assert.assertTrue(hBaseStorage2 instanceof HBaseStorage);
+        hBaseStorage1.close();
+        hBaseStorage2.close();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties
index ba06033..9c6875d 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties
@@ -12,7 +12,7 @@
 # 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.
-log4j.rootLogger=DEBUG, stdout
+log4j.rootLogger=INFO, stdout
 # standard output
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java b/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java
index f985ca8..6268428 100644
--- a/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java
+++ b/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java
@@ -92,9 +92,12 @@ public class ExampleApplicationProviderTest extends ApplicationTestBase {
         statusUpdateService.updateApplicationEntityStatus(applicationEntity);
         // Stop application
         applicationResource.stopApplication(new ApplicationOperations.StopOperation(applicationEntity.getUuid()));
-        statusUpdateService.updateApplicationEntityStatus(applicationEntity);
+
+        awaitApplicationStop(applicationEntity);
+
         // Uninstall application
         applicationResource.uninstallApplication(new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
+
         try {
             applicationResource.getApplicationEntityByUUID(applicationEntity.getUuid());
             Assert.fail("Application instance (UUID: " + applicationEntity.getUuid() + ") should have been uninstalled");

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-jpm/eagle-jpm-web/src/test/java/org/apache/eagle/app/jpm/JPMWebApplicationTest.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-web/src/test/java/org/apache/eagle/app/jpm/JPMWebApplicationTest.java b/eagle-jpm/eagle-jpm-web/src/test/java/org/apache/eagle/app/jpm/JPMWebApplicationTest.java
index 00c6a91..6cfad57 100644
--- a/eagle-jpm/eagle-jpm-web/src/test/java/org/apache/eagle/app/jpm/JPMWebApplicationTest.java
+++ b/eagle-jpm/eagle-jpm-web/src/test/java/org/apache/eagle/app/jpm/JPMWebApplicationTest.java
@@ -84,6 +84,7 @@ public class JPMWebApplicationTest extends ApplicationTestBase {
 //        // Stop application
 //        applicationResource.stopApplication(new ApplicationOperations.StopOperation(applicationEntity.getUuid()));
         //Uninstall application
+        awaitApplicationStop(applicationEntity);
         applicationResource.uninstallApplication(new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
         try {
             applicationResource.getApplicationEntityByUUID(applicationEntity.getUuid());

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-security/eagle-security-hdfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/TestHdfsAuditLogApplication.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/TestHdfsAuditLogApplication.java b/eagle-security/eagle-security-hdfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/TestHdfsAuditLogApplication.java
index e09f55d..5e76fd8 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/TestHdfsAuditLogApplication.java
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/TestHdfsAuditLogApplication.java
@@ -32,7 +32,6 @@ import org.junit.Test;
 import java.util.HashMap;
 import java.util.Map;
 
-@Ignore
 public class TestHdfsAuditLogApplication extends ApplicationTestBase {
 
     @Inject
@@ -43,7 +42,7 @@ public class TestHdfsAuditLogApplication extends ApplicationTestBase {
     ApplicationStatusUpdateService statusUpdateService;
 
     @Test
-    public void testHdfsAuditLogApplication() {
+    public void testHdfsAuditLogApplication() throws InterruptedException {
         // Create local site
         SiteEntity siteEntity = new SiteEntity();
         siteEntity.setSiteId("test_site");
@@ -52,7 +51,7 @@ public class TestHdfsAuditLogApplication extends ApplicationTestBase {
         siteResource.createSite(siteEntity);
         Assert.assertNotNull(siteEntity.getUuid());
 
-        ApplicationOperations.InstallOperation installOperation = new ApplicationOperations.InstallOperation("test_site", "HdfsAuditLogApplication", ApplicationEntity.Mode.LOCAL);
+        ApplicationOperations.InstallOperation installOperation = new ApplicationOperations.InstallOperation("test_site", "HDFS_AUDIT_LOG_MONITOR_APP", ApplicationEntity.Mode.LOCAL);
         installOperation.setConfiguration(getConf());
         // Install application
         ApplicationEntity applicationEntity = applicationResource.installApplication(installOperation).getData();
@@ -61,7 +60,7 @@ public class TestHdfsAuditLogApplication extends ApplicationTestBase {
         statusUpdateService.updateApplicationEntityStatus(applicationEntity);
         // Stop application
         applicationResource.stopApplication(new ApplicationOperations.StopOperation(applicationEntity.getUuid()));
-        statusUpdateService.updateApplicationEntityStatus(applicationEntity);
+        awaitApplicationStop(applicationEntity);
         // Uninstall application
         applicationResource.uninstallApplication(new ApplicationOperations.UninstallOperation(applicationEntity.getUuid()));
         try {

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java b/eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java
index 4118892..c779201 100644
--- a/eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java
+++ b/eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java
@@ -34,8 +34,10 @@ import org.apache.eagle.app.service.ApplicationHealthCheckService;
 import org.apache.eagle.app.service.ApplicationProviderService;
 import org.apache.eagle.app.spi.ApplicationProvider;
 import org.apache.eagle.common.Version;
+import org.apache.eagle.common.utils.ReflectionsHelper;
 import org.apache.eagle.log.base.taggedlog.EntityJsonModule;
 import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.repo.EntityRepositoryScanner;
 import org.apache.eagle.metadata.service.ApplicationStatusUpdateService;
 import org.apache.eagle.server.authentication.BasicAuthProviderBuilder;
 import org.apache.eagle.server.task.ManagedService;
@@ -72,6 +74,12 @@ class ServerApplication extends Application<ServerConfig> {
 
         LOG.debug("Initializing guice injector context for current ServerApplication");
         guiceBundle.getInjector().injectMembers(this);
+
+        try {
+            EntityRepositoryScanner.scan();
+        } catch (IllegalAccessException | InstantiationException e) {
+            LOG.error("Failed to scan entity repository", e);
+        }
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/eagle/blob/49ca3b0e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2b4fb71..a47309f 100755
--- a/pom.xml
+++ b/pom.xml
@@ -281,8 +281,8 @@
         <!-- Alert Framework -->
         <velocity.version>1.7</velocity.version>
         <javax.mail.version>1.4</javax.mail.version>
-        <extcos4.version>0.4b</extcos4.version>
-        <extcos3.version>0.3b</extcos3.version>
+        <!--<extcos4.version>0.4b</extcos4.version>-->
+        <!--<extcos3.version>0.3b</extcos3.version>-->
         <siddhi.version>3.1.1</siddhi.version>
 
         <!-- Testing -->
@@ -612,11 +612,11 @@
                 <artifactId>antlr4-runtime</artifactId>
                 <version>${antlr4.version}</version>
             </dependency>
-            <dependency>
-                <groupId>net.sf.extcos</groupId>
-                <artifactId>extcos</artifactId>
-                <version>${extcos4.version}</version>
-            </dependency>
+            <!--<dependency>-->
+                <!--<groupId>net.sf.extcos</groupId>-->
+                <!--<artifactId>extcos</artifactId>-->
+                <!--<version>${extcos4.version}</version>-->
+            <!--</dependency>-->
             <dependency>
                 <groupId>org.codehaus.groovy</groupId>
                 <artifactId>groovy-all</artifactId>


Mime
View raw message