eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [1/3] incubator-eagle git commit: [EAGLE-533] Fix storage configuration and remove AppJUnitRunner
Date Thu, 08 Sep 2016 12:24:39 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 3db5cdbac -> c752ed868


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-common/src/test/resources/test-service-config.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-common/src/test/resources/test-service-config.conf b/eagle-core/eagle-common/src/test/resources/test-service-config.conf
deleted file mode 100644
index c4fcffe..0000000
--- a/eagle-core/eagle-common/src/test/resources/test-service-config.conf
+++ /dev/null
@@ -1,31 +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.
-
-
-service {
-	timezone = "UTC"
-	env = "test"
-	host = "localhost"
-	port = 9090
-}
-
-storage{
-	storage-type = "hbase"
-	table-name-prefixed-with-environment = true
-	hbase-zookeeper-quorum = "localhost"
-	hbase-zookeeper-property-clientPort = 2181
-	zookeeper-znode-parent = "/hbase-unsecure"
-	coprocessor-enabled = false
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf
index 25257c5..acf538f 100644
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf
+++ b/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf
@@ -13,16 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-eagle{
-	service{
-		env="dev"
-		host="localhost"
-		port=8080
-		storage-type="hbase"
-		table-name-prefixed-with-environment=false
-		coprocessor-enabled=false
-		hbase-zookeeper-quorum="localhost"
-		hbase-zookeeper-property-clientPort=2181
-		zookeeper-znode-parent="/hbase-unsecure"
+service {
+	env = "dev"
+	host = "localhost"
+	port = 8080
+}
+
+storage {
+	type = "hbase"
+	hbase {
+		tableNamePrefixedWithEnvironment = false
+		coprocessorEnabled = false
+		zookeeperQuorum = "localhost"
+		zookeeperPropertyClientPort = 2181
+		zookeeperZnodeParent = "/hbase-unsecure"
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java
index 6b22e95..a47af9f 100644
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java
+++ b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java
@@ -16,11 +16,11 @@
  */
 package org.apache.eagle.storage;
 
+import org.apache.commons.configuration.Configuration;
 import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.storage.spi.DataStorageServiceLoader;
 import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
+import org.apache.eagle.storage.spi.DataStorageServiceLoader;
 import org.apache.eagle.storage.spi.DataStorageServiceProvider;
-import org.apache.commons.configuration.Configuration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,35 +44,36 @@ public class DataStorageManager {
      */
     public static DataStorage newDataStorage(String type) throws IllegalDataStorageTypeException {
         DataStorageServiceProvider serviceProvider = DataStorageServiceLoader.getInstance().getStorageProviderByType(type);
-        if(serviceProvider == null){
-            throw new IllegalDataStorageTypeException("data storage provider of type: "+type+" is null");
+        if (serviceProvider == null) {
+            throw new IllegalDataStorageTypeException("data storage provider of type: " + type + " is null");
         }
-        DataStorage dataStorage =  serviceProvider.getStorage();
+        DataStorage dataStorage = serviceProvider.getStorage();
         try {
-            LOG.info("Initializing data storage engine: "+dataStorage);
+            LOG.info("Initializing data storage engine: " + dataStorage);
             dataStorage.init();
         } catch (IOException e) {
-            LOG.error("Failed to initialize data storage engine "+dataStorage,e);
+            LOG.error("Failed to initialize data storage engine " + dataStorage, e);
             throw new IllegalStateException(e);
         }
         return dataStorage;
     }
 
     private static DataStorage singletonStorageInstance;
+
     /**
      * get storage class by type configured as eagle.storage.type from eagle configuration: config.properties
      *
      * @return DataStorage instance
-     *
      * @throws IllegalDataStorageTypeException
      */
-    public synchronized static DataStorage getDataStorageByEagleConfig(boolean cache) throws IllegalDataStorageTypeException{
+    public synchronized static DataStorage getDataStorageByEagleConfig(boolean cache) throws IllegalDataStorageTypeException {
         String storageType = EagleConfigFactory.load().getStorageType();
 
-        if(!cache)
+        if (!cache) {
             return newDataStorage(storageType);
+        }
 
-        if(singletonStorageInstance == null) {
+        if (singletonStorageInstance == null) {
             if (storageType == null) {
                 LOG.error(EAGLE_STORAGE_TYPE + " is null, trying default data storage: " + DEFAULT_DATA_STORAGE_TYPE);
                 storageType = DEFAULT_DATA_STORAGE_TYPE;
@@ -84,10 +85,9 @@ public class DataStorageManager {
 
     /**
      * @return DataStorage instance by singleton pattern
-     *
      * @throws IllegalDataStorageTypeException
      */
-    public synchronized static DataStorage getDataStorageByEagleConfig() throws IllegalDataStorageTypeException{
+    public synchronized static DataStorage getDataStorageByEagleConfig() throws IllegalDataStorageTypeException {
         return getDataStorageByEagleConfig(true);
     }
 
@@ -100,8 +100,8 @@ public class DataStorageManager {
      */
     public static DataStorage newDataStorage(Configuration configuration) throws IllegalDataStorageTypeException {
         String storageType = configuration.getString(EAGLE_STORAGE_TYPE);
-        if(storageType == null){
-            throw new IllegalDataStorageTypeException(EAGLE_STORAGE_TYPE+" is null");
+        if (storageType == null) {
+            throw new IllegalDataStorageTypeException(EAGLE_STORAGE_TYPE + " is null");
         }
         return newDataStorage(storageType);
     }
@@ -115,9 +115,9 @@ public class DataStorageManager {
      */
     public static DataStorage newDataStorage(Properties properties) throws IllegalDataStorageTypeException {
         String storageType = (String) properties.get(EAGLE_STORAGE_TYPE);
-        if(storageType == null){
-            LOG.error(EAGLE_STORAGE_TYPE+" is null");
-            throw new IllegalDataStorageTypeException(EAGLE_STORAGE_TYPE+" is null");
+        if (storageType == null) {
+            LOG.error(EAGLE_STORAGE_TYPE + " is null");
+            throw new IllegalDataStorageTypeException(EAGLE_STORAGE_TYPE + " is null");
         }
         return newDataStorage(storageType);
     }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java
index da59a18..2d747ab 100644
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java
+++ b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java
@@ -28,42 +28,43 @@ import java.util.*;
 public class DataStorageServiceLoader {
     private final Logger LOG = LoggerFactory.getLogger(DataStorageServiceLoader.class);
     private final ServiceLoader<DataStorageServiceProvider> serviceLoader;
-    private final Map<String,DataStorageServiceProvider> storageServiceProviders;
+    private final Map<String, DataStorageServiceProvider> storageServiceProviders;
 
-    private DataStorageServiceLoader(){
+    private DataStorageServiceLoader() {
         serviceLoader = ServiceLoader.load(DataStorageServiceProvider.class);
-        storageServiceProviders = new HashMap<String,DataStorageServiceProvider>();
+        storageServiceProviders = new HashMap<String, DataStorageServiceProvider>();
 
         // Load storage providers
         load();
     }
 
     private static DataStorageServiceLoader instance;
-    public static DataStorageServiceLoader getInstance(){
-        if(instance == null){
+
+    public static DataStorageServiceLoader getInstance() {
+        if (instance == null) {
             instance = new DataStorageServiceLoader();
         }
         return instance;
     }
 
-    private void load(){
-        Iterator<DataStorageServiceProvider> dataStorageServiceLoaders =  serviceLoader.iterator();
-        while(dataStorageServiceLoaders.hasNext()){
+    private void load() {
+        Iterator<DataStorageServiceProvider> dataStorageServiceLoaders = serviceLoader.iterator();
+        while (dataStorageServiceLoaders.hasNext()) {
             DataStorageServiceProvider provider = dataStorageServiceLoaders.next();
             String storageType = provider.getType();
 
-            if(storageServiceProviders.containsKey(storageType)) {
+            if (storageServiceProviders.containsKey(storageType)) {
                 LOG.warn("Overrode storage provider: type =" + storageType + ",  provider =  " + provider);
-            }else if(storageType == null){
+            } else if (storageType == null) {
                 LOG.error("Loaded storage provider: type = null , provider = " + provider);
-                throw new IllegalArgumentException("storage type is null from provider: "+provider);
-            }else{
+                throw new IllegalArgumentException("storage type is null from provider: " + provider);
+            } else {
                 LOG.info("Loaded storage provider: type = " + storageType + ", provider = " + provider);
             }
             this.storageServiceProviders.put(storageType, provider);
         }
 
-        LOG.info("Successfully loaded storage engines: "+this.getStorageTypes());
+        LOG.info("Successfully loaded storage engines: " + this.getStorageTypes());
     }
 
     /**
@@ -71,7 +72,7 @@ public class DataStorageServiceLoader {
      *
      * @return supported storage types
      */
-    public Set<String> getStorageTypes(){
+    public Set<String> getStorageTypes() {
         return this.storageServiceProviders.keySet();
     }
 
@@ -79,15 +80,15 @@ public class DataStorageServiceLoader {
      * Reload storage providers
      */
     @SuppressWarnings("unused")
-    public void reload(){
+    public void reload() {
         serviceLoader.reload();
         storageServiceProviders.clear();
         load();
     }
 
     public DataStorageServiceProvider getStorageProviderByType(String type) throws IllegalDataStorageTypeException {
-        if(!storageServiceProviders.containsKey(type)){
-            throw new IllegalDataStorageTypeException("unknown storage type: "+type+", support: "+this.getStorageTypes());
+        if (!storageServiceProviders.containsKey(type)) {
+            throw new IllegalDataStorageTypeException("unknown storage type: " + type + ", support: " + this.getStorageTypes());
         }
         return storageServiceProviders.get(type);
     }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf
index 77093bc..a3e58c1 100644
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf
+++ b/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf
@@ -13,14 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+service {
+  env = "dev"
+  host = "localhost"
+  port = 8080
+}
+
 storage {
-		env="dev"
-		host="localhost"
-		port=8080
-		storage-type="test"
-		table-name-prefixed-with-environment=false
-		coprocessor-enabled=false
-		hbase-zookeeper-quorum="localhost"
-		hbase-zookeeper-property-clientPort=2181
-		zookeeper-znode-parent="/hbase-unsecure"
+  type = "test"
+  hbase {
+    tableNamePrefixedWithEnvironment = false
+    coprocessorEnabled = false
+    zookeeperQuorum = "localhost"
+    zookeeperPropertyClientPort = 2181
+    zookeeperZnodeParent = "/hbase-unsecure"
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorITSuite.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorITSuite.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorITSuite.java
deleted file mode 100644
index d380418..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorITSuite.java
+++ /dev/null
@@ -1,246 +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 org.apache.eagle.storage.hbase.integrationtest;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.test.TestLogAPIEntity;
-import org.apache.eagle.query.ListQueryCompiler;
-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.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.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-@Ignore("Coprocessor Aggregate Client Integration Test.")
-public class CoprocessorITSuite {
-    private HTableInterface table;
-    private long startTime;
-    private long endTime;
-    private List<String> rowkeys;
-    private AggregateClient client;
-    private Scan scan;
-    private int num = 200;
-
-    private static final Logger LOG = LoggerFactory.getLogger(CoprocessorITSuite.class);
-
-    @BeforeClass
-    public static void before() {
-        System.setProperty("config.resource", "/application-sandbox.conf");
-    }
-
-    @Before
-    public void setUp() {
-        startTime = System.currentTimeMillis();
-        try {
-            rowkeys = prepareData(num);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-        endTime = System.currentTimeMillis();
-        table = EagleConfigFactory.load().getHTable("unittest");
-        client = new AggregateClientImpl();
-        scan = new Scan();
-        scan.setCaching(200);
-
-        ListQueryCompiler compiler = null;
-        try {
-            compiler = new ListQueryCompiler("TestLogAPIEntity[@cluster=\"test4UT\" and @datacenter=\"dc1\"]{@field1,@field2}");
-        } catch (Exception e) {
-            Assert.fail(e.getMessage());
-        }
-        scan.setFilter(compiler.filter());
-    }
-
-    private List<String> prepareData(int count) throws Exception {
-        List<TaggedLogAPIEntity> list = new ArrayList<TaggedLogAPIEntity>();
-        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-
-        if (ed == null) {
-            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-        }
-        ed.setTimeSeries(true);
-        for (int i = 0; i < count; i++) {
-            TestLogAPIEntity e = new TestLogAPIEntity();
-            e.setTags(new HashMap<String, String>());
-            e.getTags().put("cluster", "test4UT");
-            e.getTags().put("datacenter", "dc1");
-            e.getTags().put("index", "" + i);
-            e.getTags().put("jobId", "job_" + System.currentTimeMillis());
-            e.setTimestamp(System.currentTimeMillis());
-            e.setField1(1);
-            e.setField2(2);
-            e.setField3(3);
-            e.setField4(4L);
-            e.setField5(5.0);
-            e.setField6(5.0);
-            e.setField7("7");
-            list.add(e);
-        }
-        GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-        LOG.info("Writing {} TestLogAPIEntity entities", list.size());
-        List<String> result = writer.write(list);
-        LOG.info("Finish writing test entities");
-        return result;
-    }
-
-    @Test
-    public void testGroupAggregateCountClient() {
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            final List<GroupbyKeyValue> result = client.aggregate(table, ed,
-                    scan, Arrays.asList("cluster", "datacenter"),
-                    Collections.singletonList(AggregateFunctionType.count),
-                    Collections.singletonList("field2")).getKeyValues();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("COUNT");
-            }
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-        } catch (Exception e) {
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    @Test
-    public void testGroupAggregateAvgClient() {
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.avg), Arrays.asList("field2")).getKeyValues();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("AVG");
-            }
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    @Test
-    public void testGroupAggregateMaxClient() {
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.max), Arrays.asList("field1")).getKeyValues();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("MAX");
-            }
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    @Test
-    public void testGroupAggregateSumClient() {
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("field2")).getKeyValues();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("MAX");
-            }
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    @Test
-    public void testGroupAggregateMinClient() {
-
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.min), Arrays.asList("field2")).getKeyValues();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("MIN");
-            }
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    @Test
-    public void testGroupAggregateMultipleClient() {
-        try {
-            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-            final List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"),
-                    Arrays.asList(AggregateFunctionType.min,
-                            AggregateFunctionType.max,
-                            AggregateFunctionType.avg,
-                            AggregateFunctionType.count,
-                            AggregateFunctionType.sum),
-                    Arrays.asList("field2", "field2", "field2", "field2", "field2")).getKeyValues();
-            logGroupbyKeyValue(result);
-            Assert.assertNotNull(result);
-            Assert.assertTrue(result.size() > 0);
-            Assert.assertEquals(2.0, result.get(0).getValue().get(0).get(), 0.00001);
-            Assert.assertEquals(2.0, result.get(0).getValue().get(1).get(), 0.00001);
-            Assert.assertEquals(2.0, result.get(0).getValue().get(2).get(), 0.00001);
-            Assert.assertTrue(num <= result.get(0).getValue().get(3).get());
-            Assert.assertTrue(2.0 * num <= result.get(0).getValue().get(4).get());
-            Assert.assertEquals("test4UT", new String(result.get(0).getKey().getValue().get(0).copyBytes()));
-            Assert.assertEquals("dc1", new String(result.get(0).getKey().getValue().get(1).copyBytes()));
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.fail(e.getMessage());
-        }
-    }
-
-    private void logGroupbyKeyValue(List<GroupbyKeyValue> keyValues) {
-        for (GroupbyKeyValue keyValue : keyValues) {
-            GroupbyKey key = keyValue.getKey();
-            List<String> keys = new ArrayList<>();
-            for (BytesWritable bytes : key.getValue()) {
-                keys.add(new String(bytes.copyBytes()));
-            }
-            List<Double> vals = new ArrayList<>();
-            GroupbyValue val = keyValue.getValue();
-            for (DoubleWritable dw : val.getValue()) {
-                vals.add(dw.get());
-            }
-            if (LOG.isDebugEnabled()) LOG.debug("KEY: " + keys + ", VALUE: " + vals);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorJarUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorJarUtils.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorJarUtils.java
deleted file mode 100644
index bc7a022..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorJarUtils.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <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.integrationtest;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-import org.apache.commons.io.filefilter.WildcardFileFilter;
-
-import java.io.File;
-import java.util.Collection;
-
-public class CoprocessorJarUtils {
-    public static File getCoprocessorJarFile() {
-        String projectRootDir = System.getProperty("user.dir");
-        String targetDirPath = projectRootDir + "/target/";
-        File targetDirFile = new File(targetDirPath);
-        if (!targetDirFile.exists()) {
-            throw new IllegalStateException(targetDirPath + " not found, please execute 'mvn install -DskipTests' under " + projectRootDir + " to build the project firstly and retry");
-        }
-        String jarFileNameWildCard = "eagle-storage-hbase-*-coprocessor.jar";
-        Collection<File> jarFiles = FileUtils.listFiles(targetDirFile, new WildcardFileFilter(jarFileNameWildCard), TrueFileFilter.INSTANCE);
-        if (jarFiles.size() == 0) {
-            throw new IllegalStateException("jar is not found, please execute 'mvn package -DskipTests' from project root firstly and retry");
-        }
-        return jarFiles.iterator().next();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorToolITSuite.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorToolITSuite.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorToolITSuite.java
deleted file mode 100644
index 8e7497b..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/integrationtest/CoprocessorToolITSuite.java
+++ /dev/null
@@ -1,92 +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
- * <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.integrationtest;
-
-import org.apache.eagle.storage.hbase.tools.CoprocessorTool;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.junit.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-@Ignore("Coprocessor CLI Tool Integration Test.")
-public class CoprocessorToolITSuite {
-    private static final String remoteJarPath = "/tmp/eagle-storage-hbase-latest-coprocessor.jar";
-    private static String localJarPath = null;
-    private static final Logger LOGGER = LoggerFactory.getLogger(CoprocessorToolITSuite.class);
-    private static final String toolITTableName = "coprocessor_it_table";
-
-    static {
-        Configuration.addDefaultResource("hbase-site-sandbox.xml");
-        localJarPath = CoprocessorJarUtils.getCoprocessorJarFile().getPath();
-    }
-
-    private void testRegisterCoprocessor(String tableName) throws Exception {
-        CoprocessorTool.main(new String[]{
-                "--register",
-                "--config", "hbase-site-sandbox.xml",
-                "--table", tableName,
-                "--jar", remoteJarPath,
-                "--localJar", localJarPath});
-    }
-
-    private void testUnregisterCoprocessor(String tableName) throws Exception {
-        CoprocessorTool.main(new String[]{
-                "--unregister",
-                "--config", "hbase-site-sandbox.xml",
-                "--table", tableName
-        });
-    }
-
-    private void ensureTable() throws IOException {
-        LOGGER.info("Creating table {}", toolITTableName);
-        HBaseAdmin admin = new HBaseAdmin(new Configuration());
-        HTableDescriptor hTableDescriptor = new HTableDescriptor(TableName.valueOf(toolITTableName));
-        hTableDescriptor.addFamily(new HColumnDescriptor("f"));
-        admin.createTable(hTableDescriptor);
-        admin.close();
-        LOGGER.info("Created table {}", toolITTableName);
-    }
-
-    @Test
-    public void testRegisterAndUnregisterCoprocessor() throws Exception {
-        try {
-            ensureTable();
-            testRegisterCoprocessor(toolITTableName);
-            testUnregisterCoprocessor(toolITTableName);
-        } finally {
-            deleteTable();
-        }
-    }
-
-    private void deleteTable() throws IOException {
-        HBaseAdmin admin = new HBaseAdmin(new Configuration());
-        admin.disableTable(TableName.valueOf(toolITTableName));
-        admin.deleteTable(TableName.valueOf(toolITTableName));
-        admin.close();
-    }
-
-    @Test
-    public void testRegisterCoprocessor() throws Exception {
-        testRegisterCoprocessor("unittest");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorITSuite.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorITSuite.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorITSuite.java
new file mode 100644
index 0000000..15de0a0
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorITSuite.java
@@ -0,0 +1,246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.storage.hbase.it;
+
+import org.apache.eagle.common.config.EagleConfigFactory;
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.GenericEntityWriter;
+import org.apache.eagle.log.entity.meta.EntityDefinition;
+import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
+import org.apache.eagle.log.entity.test.TestLogAPIEntity;
+import org.apache.eagle.query.ListQueryCompiler;
+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.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.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+@Ignore("Coprocessor Aggregate Client Integration Test.")
+public class CoprocessorITSuite {
+    private HTableInterface table;
+    private long startTime;
+    private long endTime;
+    private List<String> rowkeys;
+    private AggregateClient client;
+    private Scan scan;
+    private int num = 200;
+
+    private static final Logger LOG = LoggerFactory.getLogger(CoprocessorITSuite.class);
+
+    @BeforeClass
+    public static void before() {
+        System.setProperty("config.resource", "/application-it.conf");
+    }
+
+    @Before
+    public void setUp() {
+        startTime = System.currentTimeMillis();
+        try {
+            rowkeys = prepareData(num);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+        endTime = System.currentTimeMillis();
+        table = EagleConfigFactory.load().getHTable("unittest");
+        client = new AggregateClientImpl();
+        scan = new Scan();
+        scan.setCaching(200);
+
+        ListQueryCompiler compiler = null;
+        try {
+            compiler = new ListQueryCompiler("TestLogAPIEntity[@cluster=\"test4UT\" and @datacenter=\"dc1\"]{@field1,@field2}");
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        }
+        scan.setFilter(compiler.filter());
+    }
+
+    private List<String> prepareData(int count) throws Exception {
+        List<TaggedLogAPIEntity> list = new ArrayList<TaggedLogAPIEntity>();
+        EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+
+        if (ed == null) {
+            EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
+            ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
+        }
+        ed.setTimeSeries(true);
+        for (int i = 0; i < count; i++) {
+            TestLogAPIEntity e = new TestLogAPIEntity();
+            e.setTags(new HashMap<String, String>());
+            e.getTags().put("cluster", "test4UT");
+            e.getTags().put("datacenter", "dc1");
+            e.getTags().put("index", "" + i);
+            e.getTags().put("jobId", "job_" + System.currentTimeMillis());
+            e.setTimestamp(System.currentTimeMillis());
+            e.setField1(1);
+            e.setField2(2);
+            e.setField3(3);
+            e.setField4(4L);
+            e.setField5(5.0);
+            e.setField6(5.0);
+            e.setField7("7");
+            list.add(e);
+        }
+        GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
+        LOG.info("Writing {} TestLogAPIEntity entities", list.size());
+        List<String> result = writer.write(list);
+        LOG.info("Finish writing test entities");
+        return result;
+    }
+
+    @Test
+    public void testGroupAggregateCountClient() {
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            final List<GroupbyKeyValue> result = client.aggregate(table, ed,
+                    scan, Arrays.asList("cluster", "datacenter"),
+                    Collections.singletonList(AggregateFunctionType.count),
+                    Collections.singletonList("field2")).getKeyValues();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("COUNT");
+            }
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGroupAggregateAvgClient() {
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.avg), Arrays.asList("field2")).getKeyValues();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("AVG");
+            }
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGroupAggregateMaxClient() {
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.max), Arrays.asList("field1")).getKeyValues();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("MAX");
+            }
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGroupAggregateSumClient() {
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("field2")).getKeyValues();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("MAX");
+            }
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGroupAggregateMinClient() {
+
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.min), Arrays.asList("field2")).getKeyValues();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("MIN");
+            }
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testGroupAggregateMultipleClient() {
+        try {
+            EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
+            final List<GroupbyKeyValue> result = client.aggregate(table, ed, scan, Arrays.asList("cluster", "datacenter"),
+                    Arrays.asList(AggregateFunctionType.min,
+                            AggregateFunctionType.max,
+                            AggregateFunctionType.avg,
+                            AggregateFunctionType.count,
+                            AggregateFunctionType.sum),
+                    Arrays.asList("field2", "field2", "field2", "field2", "field2")).getKeyValues();
+            logGroupbyKeyValue(result);
+            Assert.assertNotNull(result);
+            Assert.assertTrue(result.size() > 0);
+            Assert.assertEquals(2.0, result.get(0).getValue().get(0).get(), 0.00001);
+            Assert.assertEquals(2.0, result.get(0).getValue().get(1).get(), 0.00001);
+            Assert.assertEquals(2.0, result.get(0).getValue().get(2).get(), 0.00001);
+            Assert.assertTrue(num <= result.get(0).getValue().get(3).get());
+            Assert.assertTrue(2.0 * num <= result.get(0).getValue().get(4).get());
+            Assert.assertEquals("test4UT", new String(result.get(0).getKey().getValue().get(0).copyBytes()));
+            Assert.assertEquals("dc1", new String(result.get(0).getKey().getValue().get(1).copyBytes()));
+        } catch (Exception e) {
+            e.printStackTrace();
+            Assert.fail(e.getMessage());
+        }
+    }
+
+    private void logGroupbyKeyValue(List<GroupbyKeyValue> keyValues) {
+        for (GroupbyKeyValue keyValue : keyValues) {
+            GroupbyKey key = keyValue.getKey();
+            List<String> keys = new ArrayList<>();
+            for (BytesWritable bytes : key.getValue()) {
+                keys.add(new String(bytes.copyBytes()));
+            }
+            List<Double> vals = new ArrayList<>();
+            GroupbyValue val = keyValue.getValue();
+            for (DoubleWritable dw : val.getValue()) {
+                vals.add(dw.get());
+            }
+            if (LOG.isDebugEnabled()) LOG.debug("KEY: " + keys + ", VALUE: " + vals);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorJarUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorJarUtils.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorJarUtils.java
new file mode 100644
index 0000000..3126474
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorJarUtils.java
@@ -0,0 +1,41 @@
+/*
+ * 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.it;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.TrueFileFilter;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
+
+import java.io.File;
+import java.util.Collection;
+
+public class CoprocessorJarUtils {
+    public static File getCoprocessorJarFile() {
+        String projectRootDir = System.getProperty("user.dir");
+        String targetDirPath = projectRootDir + "/target/";
+        File targetDirFile = new File(targetDirPath);
+        if (!targetDirFile.exists()) {
+            throw new IllegalStateException(targetDirPath + " not found, please execute 'mvn install -DskipTests' under " + projectRootDir + " to build the project firstly and retry");
+        }
+        String jarFileNameWildCard = "eagle-storage-hbase-*-coprocessor.jar";
+        Collection<File> jarFiles = FileUtils.listFiles(targetDirFile, new WildcardFileFilter(jarFileNameWildCard), TrueFileFilter.INSTANCE);
+        if (jarFiles.size() == 0) {
+            throw new IllegalStateException("jar is not found, please execute 'mvn package -DskipTests' from project root firstly and retry");
+        }
+        return jarFiles.iterator().next();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorToolITSuite.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorToolITSuite.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorToolITSuite.java
new file mode 100644
index 0000000..790c1eb
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/it/CoprocessorToolITSuite.java
@@ -0,0 +1,92 @@
+/*
+ * 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.it;
+
+import org.apache.eagle.storage.hbase.tools.CoprocessorTool;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HColumnDescriptor;
+import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.HBaseAdmin;
+import org.junit.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+@Ignore("Coprocessor CLI Tool Integration Test.")
+public class CoprocessorToolITSuite {
+    private static final String remoteJarPath = "/tmp/eagle-storage-hbase-latest-coprocessor.jar";
+    private static String localJarPath = null;
+    private static final Logger LOGGER = LoggerFactory.getLogger(CoprocessorToolITSuite.class);
+    private static final String toolITTableName = "coprocessor_it_table";
+
+    static {
+        Configuration.addDefaultResource("hbase-site-sandbox.xml");
+        localJarPath = CoprocessorJarUtils.getCoprocessorJarFile().getPath();
+    }
+
+    private void testRegisterCoprocessor(String tableName) throws Exception {
+        CoprocessorTool.main(new String[]{
+                "--register",
+                "--config", "hbase-site-sandbox.xml",
+                "--table", tableName,
+                "--jar", remoteJarPath,
+                "--localJar", localJarPath});
+    }
+
+    private void testUnregisterCoprocessor(String tableName) throws Exception {
+        CoprocessorTool.main(new String[]{
+                "--unregister",
+                "--config", "hbase-site-sandbox.xml",
+                "--table", tableName
+        });
+    }
+
+    private void ensureTable() throws IOException {
+        LOGGER.info("Creating table {}", toolITTableName);
+        HBaseAdmin admin = new HBaseAdmin(new Configuration());
+        HTableDescriptor hTableDescriptor = new HTableDescriptor(TableName.valueOf(toolITTableName));
+        hTableDescriptor.addFamily(new HColumnDescriptor("f"));
+        admin.createTable(hTableDescriptor);
+        admin.close();
+        LOGGER.info("Created table {}", toolITTableName);
+    }
+
+    @Test
+    public void testRegisterAndUnregisterCoprocessor() throws Exception {
+        try {
+            ensureTable();
+            testRegisterCoprocessor(toolITTableName);
+            testUnregisterCoprocessor(toolITTableName);
+        } finally {
+            deleteTable();
+        }
+    }
+
+    private void deleteTable() throws IOException {
+        HBaseAdmin admin = new HBaseAdmin(new Configuration());
+        admin.disableTable(TableName.valueOf(toolITTableName));
+        admin.deleteTable(TableName.valueOf(toolITTableName));
+        admin.close();
+    }
+
+    @Test
+    public void testRegisterCoprocessor() throws Exception {
+        testRegisterCoprocessor("unittest");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-it.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-it.conf b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-it.conf
new file mode 100644
index 0000000..92ed09a
--- /dev/null
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-it.conf
@@ -0,0 +1,27 @@
+# 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.
+
+
+storage {
+  type = "hbase"
+
+  hbase {
+    tableNamePrefixedWithEnvironment = false
+    coprocessorEnabled = true
+    zookeeperQuorum = "sandbox.hortonworks.com"
+    zookeeperPropertyClientPort = 2181
+    zookeeperZnodeParent = "/hbase-unsecure"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-sandbox.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-sandbox.conf b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-sandbox.conf
deleted file mode 100644
index 9ef869c..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application-sandbox.conf
+++ /dev/null
@@ -1,23 +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.
-
-storage {
-  storage-type = "hbase"
-  table-name-prefixed-with-environment = false
-  coprocessor-enabled = true
-  hbase-zookeeper-quorum = "sandbox.hortonworks.com"
-  hbase-zookeeper-property-clientPort = 2181
-  zookeeper-znode-parent = "/hbase-unsecure"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
index d51e3f4..ed0996d 100644
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
+++ b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
@@ -13,14 +13,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-storage {
+service {
   env = "dev"
   host = "localhost"
   port = 8080
-  storage-type = "hbase"
-  table-name-prefixed-with-environment = false
-  coprocessor-enabled = false
-  hbase-zookeeper-quorum = "localhost"
-  hbase-zookeeper-property-clientPort = 2181
-  zookeeper-znode-parent = "/hbase-unsecure"
+}
+
+storage {
+  type = "hbase"
+
+  hbase {
+    tableNamePrefixedWithEnvironment = false
+    coprocessorEnabled = false
+    zookeeperQuorum = "localhost"
+    zookeeperPropertyClientPort = 2181
+    zookeeperZnodeParent = "/hbase-unsecure"
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
index 84bf86e..80009ee 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
@@ -28,19 +28,19 @@ public class JdbcConstants {
     public static final String ROW_KEY_COLUMN_NAME = "uuid";
 
     public static final int DEFAULT_TYPE_FOR_COMPLEX_TYPE = Types.BLOB;
-    public static final int DEFAULT_VARCHAR_SIZE =30000;
+    public static final int DEFAULT_VARCHAR_SIZE = 30000;
 
     // Eagle JDBC Storage Configuration
-    public final static String EAGLE_DB_USERNAME = "storage.storage-username";
-    public final static String EAGLE_DB_PASSWORD = "storage.storage-password";
-    public final static String EAGLE_CONN_URL= "storage.storage-connection-url";
-    public final static String EAGLE_CONN_PROPS= "storage.storage-connection-props";
-    public final static String EAGLE_ADAPTER= "storage.storage-adapter";
-    public final static String EAGLE_DATABASE= "storage.storage-database";
-    public final static String EAGLE_DRIVER_CLASS= "storage.storage-driver-class";
-    public final static String EAGLE_CONN_MAX_SIZE= "storage.storage-connection-max";
+    public static final String EAGLE_DB_USERNAME = "storage.jdbc.username";
+    public static final String EAGLE_DB_PASSWORD = "storage.jdbc.password";
+    public static final String EAGLE_CONN_URL = "storage.jdbc.connectionUrl";
+    public static final String EAGLE_CONN_PROPS = "storage.jdbc.connectionProps";
+    public static final String EAGLE_ADAPTER = "storage.jdbc.adapter";
+    public static final String EAGLE_DATABASE = "storage.jdbc.database";
+    public static final String EAGLE_DRIVER_CLASS = "storage.jdbc.driverClass";
+    public static final String EAGLE_CONN_MAX_SIZE = "storage.jdbc.connectionMax";
 
-    public static final boolean isReservedField(String columnName){
+    public static final boolean isReservedField(String columnName) {
         return TIMESTAMP_COLUMN_NAME.equals(columnName) || METRIC_NAME_COLUMN_NAME.equals(columnName) || ROW_KEY_COLUMN_NAME.equals(columnName);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-derby.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-derby.conf b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-derby.conf
index 6b4aad1..d906188 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-derby.conf
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-derby.conf
@@ -14,13 +14,16 @@
 # limitations under the License.
 
 storage {
-		storage-type="jdbc"
-		storage-adapter="derby"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:derby:memory:eagle;create=true"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
-		storage-connection-max=8
+  type = "jdbc"
+  jdbc {
+    type = "jdbc"
+    adapter = "derby"
+    username = "eagle"
+    password = eagle
+    database = eagle
+    connectionUrl = "jdbc:derby:memory:eagle;create=true"
+    connectionProps = "encoding=UTF-8"
+    driverClass = "org.apache.derby.jdbc.EmbeddedDriver"
+    connectionMax = 8
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-mysql.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-mysql.conf b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-mysql.conf
index 565c42b..3ff1f96 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-mysql.conf
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application-mysql.conf
@@ -13,14 +13,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-storage{
-		storage-type="jdbc"
-		storage-adapter="mysql"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:mysql://localhost:3306/eagle"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="com.mysql.jdbc.Driver"
-		storage-connection-max=8
+storage {
+  type = "jdbc"
+  jdbc {
+    adapter = "mysql"
+    username = "eagle"
+    password = eagle
+    database = eagle
+    connectionUrl = "jdbc:mysql://localhost:3306/eagle"
+    connectionProps = "encoding=UTF-8"
+    driverClass = "com.mysql.jdbc.Driver"
+    connectionMax = 8
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
index 6b4aad1..02bd0db 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
@@ -14,13 +14,15 @@
 # limitations under the License.
 
 storage {
-		storage-type="jdbc"
-		storage-adapter="derby"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:derby:memory:eagle;create=true"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="org.apache.derby.jdbc.EmbeddedDriver"
-		storage-connection-max=8
+  type = "jdbc"
+  jdbc {
+    adapter = "derby"
+    username = "eagle"
+    password = eagle
+    database = eagle
+    connectionUrl = "jdbc:derby:memory:eagle;create=true"
+    connectionProps = "encoding=UTF-8"
+    driverClass = "org.apache.derby.jdbc.EmbeddedDriver"
+    connectionMax = 8
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/unittest.application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/unittest.application.conf b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/unittest.application.conf
index 846d2c3..8bd249c 100644
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/unittest.application.conf
+++ b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/unittest.application.conf
@@ -13,16 +13,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-eagle {
-	service {
-		storage-type="jdbc"
-		storage-adapter="h2"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:h2:tcp//localhost/eagle"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="org.h2.Driver"
-		storage-connection-max=8
-	}
+storage {
+		type="jdbc"
+		jdbc{
+			adapter="h2"
+			username="eagle"
+			password=eagle
+			database=eagle
+			connectionUrl="jdbc:h2:tcp//localhost/eagle"
+			connectionProps="encoding=UTF-8"
+			driverClass="org.h2.Driver"
+			connectionMax=8
+		}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/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 1c801bd..4a54edc 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
@@ -22,7 +22,7 @@ import org.apache.eagle.app.example.extensions.ExampleResource;
 import org.apache.eagle.app.resource.ApplicationResource;
 import org.apache.eagle.app.service.ApplicationOperations;
 import org.apache.eagle.app.test.ApplicationSimulator;
-import org.apache.eagle.app.test.AppJUnitRunner;
+import org.apache.eagle.app.test.ApplicationTestBase;
 import org.apache.eagle.common.module.GlobalScope;
 import org.apache.eagle.metadata.model.ApplicationDesc;
 import org.apache.eagle.metadata.model.ApplicationEntity;
@@ -30,15 +30,13 @@ import org.apache.eagle.metadata.model.SiteEntity;
 import org.apache.eagle.metadata.resource.SiteResource;
 import org.junit.Assert;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-@RunWith(AppJUnitRunner.class)
-public class ExampleApplicationProviderTest {
+public class ExampleApplicationProviderTest extends ApplicationTestBase{
     @Inject private SiteResource siteResource;
     @Inject private ApplicationResource applicationResource;
     @Inject private ApplicationSimulator simulator;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-jpm/eagle-jpm-app/src/test/java/org/apache/eagle/app/jpm/JPMApplicationTest.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-app/src/test/java/org/apache/eagle/app/jpm/JPMApplicationTest.java b/eagle-jpm/eagle-jpm-app/src/test/java/org/apache/eagle/app/jpm/JPMApplicationTest.java
index 9c0ae2a..330af73 100644
--- a/eagle-jpm/eagle-jpm-app/src/test/java/org/apache/eagle/app/jpm/JPMApplicationTest.java
+++ b/eagle-jpm/eagle-jpm-app/src/test/java/org/apache/eagle/app/jpm/JPMApplicationTest.java
@@ -19,19 +19,17 @@ package org.apache.eagle.app.jpm;
 import com.google.inject.Inject;
 import org.apache.eagle.app.resource.ApplicationResource;
 import org.apache.eagle.app.service.ApplicationOperations;
-import org.apache.eagle.app.test.AppJUnitRunner;
+import org.apache.eagle.app.test.ApplicationTestBase;
 import org.apache.eagle.metadata.model.ApplicationEntity;
 import org.apache.eagle.metadata.model.SiteEntity;
 import org.apache.eagle.metadata.resource.SiteResource;
 import org.junit.Assert;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import java.util.HashMap;
 import java.util.Map;
 
-@RunWith(AppJUnitRunner.class)
-public class JPMApplicationTest {
+public class JPMApplicationTest extends ApplicationTestBase{
     @Inject
     private SiteResource siteResource;
     @Inject

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationProviderTest.java b/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationProviderTest.java
index 0a3a3a1..0001986 100644
--- a/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationProviderTest.java
+++ b/eagle-jpm/eagle-jpm-mr-history/src/test/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationProviderTest.java
@@ -17,17 +17,16 @@
 package org.apache.eagle.jpm.mr.history;
 
 import com.google.inject.Inject;
-import org.apache.eagle.app.test.AppJUnitRunner;
 import org.apache.eagle.app.test.ApplicationSimulator;
+import org.apache.eagle.app.test.ApplicationTestBase;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
-@RunWith(AppJUnitRunner.class)
-public class MRHistoryJobApplicationProviderTest {
-    @Inject private ApplicationSimulator simulator;
+public class MRHistoryJobApplicationProviderTest extends ApplicationTestBase {
+    @Inject
+    private ApplicationSimulator simulator;
 
     @Test
-    public void testRunAsManagedApplicationWithSimulator(){
+    public void testRunAsManagedApplicationWithSimulator() {
         simulator.start(MRHistoryJobApplicationProvider.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-jpm/eagle-jpm-mr-running/src/test/java/org/apache/eagle/jpm/mr/running/MRRunningJobApplicationProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-running/src/test/java/org/apache/eagle/jpm/mr/running/MRRunningJobApplicationProviderTest.java b/eagle-jpm/eagle-jpm-mr-running/src/test/java/org/apache/eagle/jpm/mr/running/MRRunningJobApplicationProviderTest.java
index 2b7d429..5403c9a 100644
--- a/eagle-jpm/eagle-jpm-mr-running/src/test/java/org/apache/eagle/jpm/mr/running/MRRunningJobApplicationProviderTest.java
+++ b/eagle-jpm/eagle-jpm-mr-running/src/test/java/org/apache/eagle/jpm/mr/running/MRRunningJobApplicationProviderTest.java
@@ -17,13 +17,11 @@
 package org.apache.eagle.jpm.mr.running;
 
 import com.google.inject.Inject;
-import org.apache.eagle.app.test.AppJUnitRunner;
 import org.apache.eagle.app.test.ApplicationSimulator;
+import org.apache.eagle.app.test.ApplicationTestBase;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
-@RunWith(AppJUnitRunner.class)
-public class MRRunningJobApplicationProviderTest {
+public class MRRunningJobApplicationProviderTest extends ApplicationTestBase{
     @Inject
     private
     ApplicationSimulator simulator;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-security/eagle-security-maprfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/MapRFSAuditLogAppProviderTest.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/MapRFSAuditLogAppProviderTest.java b/eagle-security/eagle-security-maprfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/MapRFSAuditLogAppProviderTest.java
index 5f0d903..61d03f6 100644
--- a/eagle-security/eagle-security-maprfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/MapRFSAuditLogAppProviderTest.java
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/test/java/org/apache/eagle/security/auditlog/MapRFSAuditLogAppProviderTest.java
@@ -17,13 +17,11 @@
 package org.apache.eagle.security.auditlog;
 
 import com.google.inject.Inject;
-import org.apache.eagle.app.test.AppJUnitRunner;
 import org.apache.eagle.app.test.ApplicationSimulator;
+import org.apache.eagle.app.test.ApplicationTestBase;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
-@RunWith(AppJUnitRunner.class)
-public class MapRFSAuditLogAppProviderTest {
+public class MapRFSAuditLogAppProviderTest extends ApplicationTestBase {
     @Inject
     private
     ApplicationSimulator simulator;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-server-assembly/src/main/conf/application.conf
----------------------------------------------------------------------
diff --git a/eagle-server-assembly/src/main/conf/application.conf b/eagle-server-assembly/src/main/conf/application.conf
index ff2d331..0a3352e 100644
--- a/eagle-server-assembly/src/main/conf/application.conf
+++ b/eagle-server-assembly/src/main/conf/application.conf
@@ -13,46 +13,102 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{
-	"coordinator" : {
-		"policiesPerBolt" : 5,
-		"boltParallelism" : 5,
-		"policyDefaultParallelism" : 5,
-		"boltLoadUpbound": 0.8,
-		"topologyLoadUpbound" : 0.8,
-		"numOfAlertBoltsPerTopology" : 5,
-		"zkConfig" : {
-			"zkQuorum" : "server.eagle.apache.org:2181",
-			"zkRoot" : "/alert",
-			"zkSessionTimeoutMs" : 10000,
-			"connectionTimeoutMs" : 10000,
-			"zkRetryTimes" : 3,
-			"zkRetryInterval" : 3000
-		},
-		"metadataService" : {
-			"host" : "localhost",
-			"port" : 9090,
-			"context" : "/rest"
-		},
-		"metadataDynamicCheck" : {
-			"initDelayMillis" : 1000,
-			"delayMillis" : 30000
-		}
-	},
-	"metadata":{
-		"store": "org.apache.eagle.metadata.service.memory.MemoryMetadataStore"
-	},
-	"connection":"jdbc:mysql://server.eagle.apache.org:3306/eagle",
-	"application":{
-		"sink":{
-			"type": "org.apache.eagle.app.sink.KafkaStreamSink"
-		},
-		"storm": {
-			"nimbusHost": "localhost"
-			"nimbusThriftPort": 6627
-		},
-		"provider" : {
-//			"dir" : "/tmp/eagle"
-		}
+# ---------------------------------------------
+# Eagle REST Web Service Configuration
+# ---------------------------------------------
+service {
+	env = "testing"
+	host = "localhost"
+	port = 9090
+	context = "/rest"
+	timezone = "UTC"
+}
+
+# ---------------------------------------------
+# Eagle Deep Storage Configuration
+# ---------------------------------------------
+
+storage {
+	# storage type: ["hbase","jdbc"]
+	# default is "hbase"
+	type = "hbase"
+
+	hbase {
+		# hbase configuration: hbase.zookeeper.quorum
+		# default is "localhost"
+		zookeeperQuorum = "localhost"
+
+		# hbase configuration: hbase.zookeeper.property.clientPort
+		# default is 2181
+		zookeeperPropertyClientPort = 2181
+
+		# hbase configuration: zookeeper.znode.parent
+		# default is "/hbase"
+		zookeeperZnodeParent = "/hbase-unsecure"
+
+		# eagle web login profile: [sandbox, default]
+		# default is sandbox
+		tableNamePrefixedWithEnvironment = false
+
+		# eagle coprocessor enabled or not: [true, false]
+		# default is false
+		coprocessorEnabled = false
+	}
+}
+
+# ---------------------------------------------
+# Eagle Metadata Store Configuration
+# ---------------------------------------------
+metadata {
+	store = org.apache.eagle.metadata.service.memory.MemoryMetadataStore
+	jdbc {
+		username = "root"
+		password = ""
+		driverClassName = com.mysql.jdbc.Driver
+		url = "jdbc:mysql://server.eagle.apache.org:3306/eagle"
+	}
+}
+
+# ---------------------------------------------
+# Eagle Application Configuration
+# ---------------------------------------------
+application {
+	sink {
+		type = org.apache.eagle.app.sink.KafkaStreamSink
+	}
+	storm {
+		nimbusHost = "server.eagle.apache.org"
+		nimbusThriftPort = 6627
 	}
 }
+
+# ---------------------------------------------
+# Eagle Alert Engine Configuration
+# ---------------------------------------------
+
+# Coordinator Configuration
+coordinator {
+	policiesPerBolt = 5
+	boltParallelism = 5
+	policyDefaultParallelism = 5
+	boltLoadUpbound = 0.8
+	topologyLoadUpbound = 0.8
+	numOfAlertBoltsPerTopology = 5
+	zkConfig {
+		zkQuorum = "server.eagle.apache.org:2181"
+		zkRoot = "/alert"
+		zkSessionTimeoutMs = 10000
+		connectionTimeoutMs = 10000
+		zkRetryTimes = 3
+		zkRetryInterval = 3000
+	}
+	metadataService {
+		host = "localhost",
+		port = 9090,
+		context = "/rest"
+	}
+	metadataDynamicCheck {
+		initDelayMillis = 1000
+		delayMillis = 30000
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-server/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/resources/application.conf b/eagle-server/src/main/resources/application.conf
index 2c076af..df482ac 100644
--- a/eagle-server/src/main/resources/application.conf
+++ b/eagle-server/src/main/resources/application.conf
@@ -17,23 +17,44 @@
 # Eagle REST Web Service Configuration
 # ---------------------------------------------
 service {
+  env = "testing"
   host = "localhost"
   port = 9090
   context = "/rest"
+  timezone = "UTC"
 }
 
 # ---------------------------------------------
 # Eagle Deep Storage Configuration
 # ---------------------------------------------
+
 storage {
-  storage-type = "hbase"
-  table-name-prefixed-with-environment = false
-  coprocessor-enabled = false
-  hbase-zookeeper-quorum = "localhost"
-  hbase-zookeeper-property-clientPort = 2181
-  zookeeper-znode-parent = "/hbase-unsecure"
-}
+  # storage type: ["hbase","jdbc"]
+  # default is "hbase"
+  type = "hbase"
+
+  hbase {
+    # hbase configuration: hbase.zookeeper.quorum
+    # default is "localhost"
+    zookeeperQuorum = "localhost"
+
+    # hbase configuration: hbase.zookeeper.property.clientPort
+    # default is 2181
+    zookeeperPropertyClientPort = 2181
 
+    # hbase configuration: zookeeper.znode.parent
+    # default is "/hbase"
+    zookeeperZnodeParent = "/hbase-unsecure"
+
+    # eagle web login profile: [sandbox, default]
+    # default is sandbox
+    tableNamePrefixedWithEnvironment = false
+
+    # eagle coprocessor enabled or not: [true, false]
+    # default is false
+    coprocessorEnabled = false
+  }
+}
 
 # ---------------------------------------------
 # Eagle Metadata Store Configuration

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/c752ed86/eagle-server/src/test/java/org/apache/eagle/server/ServerDebug.java
----------------------------------------------------------------------
diff --git a/eagle-server/src/test/java/org/apache/eagle/server/ServerDebug.java b/eagle-server/src/test/java/org/apache/eagle/server/ServerDebug.java
new file mode 100644
index 0000000..f870f2a
--- /dev/null
+++ b/eagle-server/src/test/java/org/apache/eagle/server/ServerDebug.java
@@ -0,0 +1,49 @@
+/*
+ * 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.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ServerDebug {
+    private static final Logger LOGGER = LoggerFactory.getLogger(ServerDebug.class);
+    private static String serverConf = null;
+
+    static {
+        // Set application.conf
+        if (ServerDebug.class.getResourceAsStream("/application-debug.conf") != null
+            || ServerDebug.class.getResourceAsStream("application-debug.conf") != null) {
+            LOGGER.info("config.resource = application-debug.conf");
+            System.setProperty("config.resource", "application-debug.conf");
+        } else {
+            LOGGER.info("config.resource = application.conf");
+            System.setProperty("config.resource","application.conf");
+        }
+
+        //
+        String userDir = System.getProperty("user.dir");
+        LOGGER.info("user.dir = {}", userDir);
+        serverConf = userDir + "/eagle-server/src/test/resources/configuration.yml";
+    }
+
+    public static void main(String[] args) {
+        LOGGER.info("java {} server {}",ServerDebug.class.getName(),serverConf);
+        ServerMain.main(new String[] {
+            "server", serverConf
+        });
+    }
+}


Mime
View raw message