You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ha...@apache.org on 2016/03/03 19:09:34 UTC

[01/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Repository: incubator-eagle
Updated Branches:
  refs/heads/document [created] 0ea130efe


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/lib/kafka-python/.travis.yml
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.travis.yml b/eagle-external/hadoop_jmx_collector/lib/kafka-python/.travis.yml
deleted file mode 100644
index 7184bc8..0000000
--- a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.travis.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-language: python
-
-python:
-    - 2.6
-    - 2.7
-    - 3.3
-    - 3.4
-    - pypy
-
-env:
-    - UNIT_AND_LINT_ONLY=true
-    - KAFKA_VERSION=0.8.0
-    - KAFKA_VERSION=0.8.1
-    - KAFKA_VERSION=0.8.1.1
-    - KAFKA_VERSION=0.8.2.0
-
-before_install:
-    - sudo apt-get install libsnappy-dev
-    - ./build_integration.sh
-
-install:
-    - pip install tox coveralls
-    - pip install .
-    # Deal with issue on Travis builders re: multiprocessing.Queue :(
-    # See https://github.com/travis-ci/travis-cookbooks/issues/155
-    - sudo rm -rf /dev/shm && sudo ln -s /run/shm /dev/shm
-
-deploy:
-  provider: pypi
-  server: https://pypi.python.org/pypi
-  user: mumrah
-  password:
-    secure: TIZNKxktOm42/LHLDCuKuPqmAfYKekyHL4MqEFpnqDI5T5sHzG9IQaOwppYfQNggHiILUBzk1j6w/FPJunJyd62AFtydkKtIccqENIIAio78afeCRMQDynstNXjDefmt0s90xLGSlLzDMxCEWB4F6frEtPl/8KpNSFB2fvj+HXY=
-  on:
-    tags: true
-    all_branches: true
-    # TODO replace all_branches with "branch: master" after https://github.com/travis-ci/travis-ci/issues/1675 is fixed
-    # branch: master
-
-script:
-  - if [ -n "$UNIT_AND_LINT_ONLY" ]; then tox -e lint,`./travis_selector.sh $TRAVIS_PYTHON_VERSION`; else tox -e `./travis_selector.sh $TRAVIS_PYTHON_VERSION`; fi
-
-after_success:
-  - coveralls


[42/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestExternalBatchWindow.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestExternalBatchWindow.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestExternalBatchWindow.java
deleted file mode 100644
index 7903e0d..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestExternalBatchWindow.java
+++ /dev/null
@@ -1,307 +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.alert.siddhi;
-
-import java.text.MessageFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.core.stream.output.StreamCallback;
-
-/**
- * @since Dec 23, 2015
- *
- */
-public class TestExternalBatchWindow {
-
-    private static SiddhiManager siddhiManager;
-    
-    @BeforeClass
-    public static void beforeClass() {
-        siddhiManager = new SiddhiManager();
-    }
-    
-    @AfterClass
-    public static void afterClass() {
-        siddhiManager.shutdown();
-    }
-
-    @Test
-    public void test02NoMsg() throws Exception {
-        ExecutionPlanRuntime runtime = simpleQueryRuntime();
-
-        final AtomicBoolean recieved = new AtomicBoolean();
-        runtime.addCallback("query", new QueryCallback() {
-
-            @Override
-            public void receive(long arg0, Event[] arg1, Event[] arg2) {
-                recieved.set(true);
-                System.out.println(arg1);
-            }
-        });
-
-        InputHandler input = runtime.getInputHandler("jmxMetric");
-
-        runtime.start();
-        // external events' time stamp less than the window, should not have event recieved in call back.
-        long now = System.currentTimeMillis();
-        int length = 5;
-        for (int i = 0; i < length; i++) {
-            input.send(new Object[] { 15, now + i * 1000 });
-        }
-        
-        Thread.sleep(1000);
-        Assert.assertFalse("Event happens inner external time batch window, should not have event recieved in callback!", recieved.get());
-
-        runtime.shutdown();
-    }
-
-    private ExecutionPlanRuntime simpleQueryRuntime() {
-        String query = "define stream jmxMetric(cpu int, timestamp long); " 
-                + "@info(name='query')"
-                + "from jmxMetric#window.eagle:externalTimeBatch(timestamp, 10 sec) " 
-                + "select avg(cpu) as avgCpu, count(1) as count insert into tmp;";
-
-        return siddhiManager.createExecutionPlanRuntime(query);
-    }
-
-    /**
-     * This case try to capture the case that the window get a chunk of event that exceed the time batch.
-     * In this case, two next processor should be triggered.
-     */
-    @Test
-    public void test03BunchChunkExceedBatch() {
-        // TODO
-    }
-    @Test
-    public void test04MultiThread() {
-        // TODO
-    }
-
-    @Test
-    public void test05ExternalJoin() {
-        // TODO
-    }
-    
-    @Test
-    public void test06EdgeCase() throws Exception {
-        // every 10 sec
-        ExecutionPlanRuntime runtime = simpleQueryRuntime();
-
-        final AtomicInteger recCount = new AtomicInteger(0);
-//        final CountDownLatch latch = new CountDownLatch(2);// for debug
-        runtime.addCallback("query", new QueryCallback() {
-            @Override
-            public void receive(long arg0, Event[] arg1, Event[] arg2) {
-//                latch.countDown();
-                Assert.assertEquals(1, arg1.length);
-                recCount.incrementAndGet();
-                int avgCpu = ((Double) arg1[0].getData()[0]).intValue();
-                if (recCount.get() == 1) {
-                    Assert.assertEquals(15, avgCpu);
-                } else if (recCount.get() == 2) {
-                    Assert.assertEquals(85, avgCpu);
-                }
-                int count = ((Long) arg1[0].getData()[1]).intValue();
-                Assert.assertEquals(3, count);
-            }
-        });
-
-        InputHandler input = runtime.getInputHandler("jmxMetric");
-        runtime.start();
-        // external events' time stamp less than the window, should not have event recieved in call back.
-        long now = 0;
-        int length = 3;
-        for (int i = 0; i < length; i++) {
-            input.send(new Object[] { 15, now + i * 10 });
-        }
-        
-        // second round
-        // if the trigger event mix with the last window, we should see the avgValue is not expected
-        for (int i = 0; i < length; i++) {
-            input.send(new Object[] { 85, now + 10000 + i * 10 }); // the first entity of the second round
-        }
-        // to trigger second round
-        input.send(new Object[] { 10000, now + 10 * 10000 });
-        
-//        latch.await();// for debug
-
-        Thread.sleep(1000);
-        
-        Assert.assertEquals(2, recCount.get());
-    }
-
-    @Test
-    public void test07Pull76() throws Exception {
-        String defaultStream = "define stream LoginEvents (myTime long, ip string, phone string,price int);";
-
-        String query = " @info(name='pull76') "
-                + " from LoginEvents#window.eagle:externalTimeBatch(myTime, 5 sec)  "
-                + " select myTime, phone, ip, price, count(ip) as cntip , "
-                + " min(myTime) as mintime, max(myTime) as maxtime "
-                + " insert into events ;";
-        
-        ExecutionPlanRuntime runtime = siddhiManager.createExecutionPlanRuntime(defaultStream + query);
-
-        InputHandler inputHandler = runtime.getInputHandler("LoginEvents");
-
-        runtime.addCallback("pull76", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                if (inEvents != null) {
-                    System.out.println("======================== START ===============================");
-                    int i = 0;
-                    System.out.println(" Events Size:" + inEvents.length);
-                    for (i = 0; i < inEvents.length; i++) {
-                        Event e = inEvents[i];
-                        System.out.println("----------------------------");
-                        System.out.println(new Date((Long) e.getData(0)));
-                        System.out.println("IP:" + e.getData(2));
-                        System.out.println("price :" + e.getData(3));
-                        System.out.println("count :" + e.getData(4));
-                        System.out.println("mintime :" + new Date((Long) e.getData(5)) );
-                        System.out.println("maxtime :" + new Date((Long) e.getData(6)) );
-                        System.out.println("----------------------------");
-                    }
-                    System.out.println("======================== END  ===============================");
-
-                }
-            }
-        });
-        
-        
-        runtime.start();
-        
-        long start = System.currentTimeMillis();
-        Calendar c = Calendar.getInstance();
-        c.add(Calendar.HOUR, 1);
-        c.add(Calendar.SECOND, 1);
-        int i = 0;
-        for (i = 0; i <= 10000; i++) {
-            c.add(Calendar.SECOND, 1);
-            inputHandler.send(c.getTime().getTime(),
-                    new Object[] { c.getTime().getTime(), new String("192.10.1.1"), "1", new Random().nextInt(1000) });
-        }
-        long end = System.currentTimeMillis();
-        System.out.printf("End : %d ", end - start);
-
-        Thread.sleep(1000);
-        runtime.shutdown();
-    }
-    
-    @Test
-    public void test01DownSampling() throws Exception {
-        String stream = "define stream jmxMetric(cpu int, memory int, bytesIn long, bytesOut long, timestamp long);";
-        String query = "@info(name = 'downSample') " 
-                + "from jmxMetric#window.eagle:externalTimeBatch(timestamp, 10 sec) "
-                + "select "
-                + "avg(cpu) as avgCpu, max(cpu) as maxCpu, min(cpu) as minCpu, "
-                + " '|' as s, "
-                + " avg(memory) as avgMem, max(memory) as maxMem, min(memory) as minMem, "
-                + " '|' as s1, "
-                + " avg(bytesIn) as avgBytesIn, max(bytesIn) as maxBytesIn, min(bytesIn) as minBytesIn, "
-                + " '|' as s2, "
-                + " avg(bytesOut) as avgBytesOut, max(bytesOut) as maxBytesOut, min(bytesOut) as minBytesOut, " 
-                + " '|' as s3, "
-                + " timestamp as timeWindowEnds, "
-                + " '|' as s4, "
-                + " count(1) as metric_count "
-                + " INSERT INTO tmp;";
-
-        SiddhiManager sm = new SiddhiManager();
-        ExecutionPlanRuntime plan = sm.createExecutionPlanRuntime(stream + query);
-
-        InputHandler input = plan.getInputHandler("jmxMetric");
-
-        // stream call back doesn't follow the counter
-        final AtomicInteger counter = new AtomicInteger();
-        {
-            // stream callback
-            plan.addCallback("jmxMetric", new StreamCallback() {
-                @Override
-                public void receive(Event[] arg0) {
-                    counter.addAndGet(arg0.length);
-                }
-            });
-        }
-        final AtomicInteger queryWideCounter = new AtomicInteger();
-        {
-            plan.addCallback("downSample", new QueryCallback() {
-                @Override
-                public void receive(long arg0, Event[] inevents, Event[] removeevents) {
-                    int currentCount = queryWideCounter.addAndGet(inevents.length);
-                    System.out.println(MessageFormat.format("Round {0} ====", currentCount));
-                    System.out.println(" events count " + inevents.length);
-
-                    for (Event e : inevents) {
-                        Object[] tranformedData = e.getData();
-                        for (Object o : tranformedData) {
-                            System.out.print(o);
-                            System.out.print(' ');
-                        }
-                        System.out.println(" events endendend");
-                    }
-                }
-
-            });
-        }
-
-        plan.start();
-
-        int round = 4;
-        int eventsPerRound= 0;
-        long externalTs = System.currentTimeMillis();
-        for (int i = 0; i < round; i++) {
-            eventsPerRound = sendEvent(input, i, externalTs);
-            Thread.sleep(3000);
-        }
-        //
-        sendEvent(input, round, externalTs);
-
-        plan.shutdown();
-        Thread.sleep(1000);
-        Assert.assertEquals(round * eventsPerRound + eventsPerRound, counter.get());
-        Assert.assertEquals(round, queryWideCounter.get());
-    }
-
-    // one round of sending events
-    private int sendEvent(InputHandler input, int ite, long externalTs) throws Exception {
-        int len = 3;
-        Event[] events = new Event[len];
-        for (int i = 0; i < len; i++) {
-            // cpu int, memory int, bytesIn long, bytesOut long, timestamp long
-            events[i] = new Event(externalTs,
-                    new Object[] { 15 + 10 * i * ite, 1500 + 10 * i * ite, 1000L, 2000L, externalTs + ite * 10000 + i * 50 });
-        }
-
-        input.send(events);
-        return len;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiEngine.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiEngine.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiEngine.java
deleted file mode 100644
index acead47..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiEngine.java
+++ /dev/null
@@ -1,243 +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.alert.siddhi;
-
-import java.lang.reflect.Field;
-
-import org.apache.eagle.alert.executor.AlertExecutor;
-import junit.framework.Assert;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.core.util.EventPrinter;
-
-public class TestSiddhiEngine {
-    static final Logger log = LoggerFactory.getLogger(TestSiddhiEngine.class);
-    int alertCount = 0;
-
-    @Test
-    public void TestStrContains() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "" +
-                "@config(async = 'true') " +
-                "define stream typeStream (cmd string, src string, dst string) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream[(cmd == 'rename') and (src == '/tmp/pii') and (str:contains(dst,'/user/hdfs/.Trash/Current/tmp/pii')==true)] " +
-                "select cmd, src, dst " +
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-                alertCount++;
-            }
-        };
-        executionPlanRuntime.addCallback("query1", callback);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"rename", "/tmp/pii", "/user/hdfs/.Trash/Current/tmp/pii"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void TestRegexp() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "" +
-                "@config(async = 'true') " +
-                "define stream typeStream (str string, other string, num double) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream " +
-                "select str as str1, other as other1 , num as num1, count(num) as number " +
-                "having str:regexp(str1, '/usr/data/[0-9]+/[0-9]+/[0-9]+') == true " + 
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                alertCount++;
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        };
-        
-        executionPlanRuntime.addCallback("query1", callback);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"/usr/data/000/001/002", "other", 1.0});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void TestStrEqualsIgnoreCase() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream typeStream (cmd string, src string, dst string) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream[(cmd == 'rename') and (src == '/tmp/pii') and (str:equalsIgnoreCase(dst,'/user/hdfs/.TRAsh/current/TMP/PII')==true)] " +
-                "select cmd, src, dst " +
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                alertCount++;
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        };
-
-        executionPlanRuntime.addCallback("query1", callback);
-
-        Field field = QueryCallback.class.getDeclaredField("query");
-        field.setAccessible(true);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"rename", "/tmp/pii", "/user/HDFS/.Trash/Current/TMP/pii"}); // match case
-        inputHandler.send(new Object[]{"rename", "/tmp/pii", "/user/HDFS/.Trash///Current/TMP/pii"}); //non-match case
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void TestStrContainsIgnoreCase() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream typeStream (cmd string, src string, dst string) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream[(cmd == 'rename') and (src == '/tmp/pii') and (str:containsIgnoreCase(dst,'.TRASH/CURRENT/tMp/pII')==true)] " +
-                "select cmd, src, dst " +
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-                alertCount++;
-            }
-        };
-
-        executionPlanRuntime.addCallback("query1", callback);
-
-        Field field = QueryCallback.class.getDeclaredField("query");
-        field.setAccessible(true);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"rename", "/tmp/pii", "/user/hdfs/.Trash/Current/TMP/pii"}); // match case
-        inputHandler.send(new Object[]{"rename", "/tmp/pii", "/user/hdfs/.Trash///Current/TMP/pii"}); //non-match case
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void TestRegexpIgnoreCase() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream typeStream (str string, other string, num double) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream " +
-                "select str as str1, other as other1 , num as num1, count(num) as number " +
-                "having str:regexpIgnoreCase(str1, '/usr/DATA/[0-9]+/[0-9]+/[0-9]+') == true " +
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                alertCount++;
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        };
-        executionPlanRuntime.addCallback("query1", callback);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"/USR/data/000/001/002", "other", 1.0});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-    
-    @Test
-    public void TestDataObject() throws Exception {
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-        
-        String cseEventStream = "" +
-                "@config(async = 'true') " +
-                "define stream typeStream (dataobj object, str string, first string) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from typeStream " +
-                "select * " +
-                "having str:regexp(str, '/usr/data/[0-9]+/[0-9]+/[0-9]+') == true " + 
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-           public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                alertCount++;
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        };
-
-        executionPlanRuntime.addCallback("query1", callback);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("typeStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{new AlertExecutor(queryString, null, 0, 1, null, null), "/usr/data/000/001/002", "second"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiSlideWindow.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiSlideWindow.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiSlideWindow.java
deleted file mode 100644
index 521317c..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiSlideWindow.java
+++ /dev/null
@@ -1,129 +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.alert.siddhi;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.core.util.EventPrinter;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-public class TestSiddhiSlideWindow {
-
-    int alertCount = 0;
-
-    @Test
-    public void testSlideWindow1() throws Exception{
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream eventStream (user string, path string, cmd string);";
-//        String query = "@info(name = 'query1') from eventStream[cmd == 'open' AND str:regexp(path, '/usr/data/[0-9]+/[0-9]+/[0-9]+')]#window.time(1 sec)"
-//        		     + " select user, path, cmd, count(path) as cnt" 
-//        			 + " group by user"
-//        			 + " having cnt > 3 insert all events into outputStream;";
-
-//        String query = "@info(name = 'query1') from eventStream[cmd == 'open' AND str:regexp(path, '/usr/data/[0-9]+/[0-9]+/[0-9]+')]#window.length(10)"
-//        		+ " select user, path, cmd, count(path) as cnt" 
-//        		+ " group by user"
-//        		+ " having cnt > 3 insert all events into outputStream;";
-
-//      String query = "@info(name = 'query1') from eventStream[cmd == 'open' AND str:regexp(path, '/usr/data/[0-9]+/[0-9]+/[0-9]+')]#window.timeBatch(1 sec)"
-//				+ " select user, path, cmd, count(path) as cnt" 
-//				+ " group by user"
-//				+ " having cnt > 3 insert all events into outputStream;";
-
-        String query = "@info(name = 'query1') from eventStream[cmd == 'open' AND str:regexp(path, '/usr/data/[0-9]+/[0-9]+/[0-9]+')]#window.lengthBatch(10)"
-                + " select user, path, cmd, count(path) as cnt"
-                + " group by user"
-                + " having cnt > 3 insert all events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-                alertCount++;
-            }
-        });
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("eventStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"user", "/usr/data/0000/0000/0000", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/0000/0000/1111", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/0000/0000/2222", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/0000/0000/3333", "open"});
-
-        inputHandler.send(new Object[]{"user", "/usr/data/1111/0000/0000", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/1111/0000/1111", "open"});
-
-        inputHandler.send(new Object[]{"user", "/usr/data/2222/0000/0000", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/2222/0000/1111", "open"});
-        inputHandler.send(new Object[]{"user", "/usr/data/2222/0000/2222", "open"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 0);
-        inputHandler.send(new Object[]{"user", "/usr/data/2222/0000/3333", "open"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void testSlideWindow2() throws Exception{
-        alertCount = 0;
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream eventStream (timeStamp long, user string, path string, cmd string);";
-        String query = "@info(name = 'query1') from eventStream[cmd == 'open' AND str:regexp(path, '/usr/data/[0-9]+/[0-9]+/[0-9]+')]#window.externalTime(timeStamp,1 sec)"
-                + " select user, path, cmd, count(path) as cnt"
-                + " group by user"
-                + " having cnt > 3 insert all events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                alertCount++;
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("eventStream");
-        executionPlanRuntime.start();
-        long curTime = DateTimeUtil.humanDateToMilliseconds("2015-09-17 00:00:00,000");
-        inputHandler.send(new Object[]{curTime, "user", "/usr/data/0000/0000/0000", "open"});
-        Thread.sleep(1100);
-        inputHandler.send(new Object[]{curTime, "user", "/usr/data/0000/0000/1111", "open"});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{curTime, "user", "/usr/data/0000/0000/2222", "open"});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{curTime, "user", "/usr/data/0000/0000/3333", "open"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 1);
-        inputHandler.send(new Object[]{curTime, "user", "/usr/data/0000/0000/5555", "open"});
-        Thread.sleep(100);
-        Assert.assertTrue(alertCount == 2);
-        executionPlanRuntime.shutdown();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiStream.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiStream.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiStream.java
deleted file mode 100644
index 0027bce..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/siddhi/TestSiddhiStream.java
+++ /dev/null
@@ -1,34 +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.alert.siddhi;
-
-import org.apache.eagle.policy.siddhi.SiddhiPolicyEvaluator;
-import org.junit.Assert;
-import org.junit.Test;
-
-
-public class TestSiddhiStream {
-	
-	@Test
-	public void test() {
-		String rule = "from hiveAccessLogStream[sensitivityType=='PHONE_NUMBER'] select user,timestamp,resource,define stream hdfsAuditLogEventStream(eagleAlertContext object, allowed string,cmd string,dst string,host string,securityZone string,sensitivityType string,src string,timestamp long,user string); @info(name = 'query') from hdfsAuditLogEventStream[cmd=='open'] select * insert into outputStream ; insert into outputStream;";
-		Assert.assertFalse(SiddhiPolicyEvaluator.addContextFieldIfNotExist(rule).equals(rule));
-		
-		rule = "from hiveAccessLogStream[sensitivityType=='PHONE_NUMBER'] select    * insert into outputStream;";
-		Assert.assertTrue(SiddhiPolicyEvaluator.addContextFieldIfNotExist(rule).equals(rule));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestAggregation.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestAggregation.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestAggregation.java
deleted file mode 100644
index adcd728..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestAggregation.java
+++ /dev/null
@@ -1,98 +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.alert.state;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.Test;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-
-import junit.framework.Assert;
-import org.wso2.siddhi.core.util.EventPrinter;
-
-public class TestAggregation {
-    @Test
-    public void test01DownSampling() throws Exception {
-        String stream = "define stream jmxMetric(cpu double, memory int, bytesIn int, bytesOut long, timestamp long);";
-        String query = "@info(name = 'downSample') "
-                + "from jmxMetric#window.timeBatch(1 sec) "
-                + "select "
-                + " min(cpu) as minCpu, max(cpu) as maxCpu, avg(cpu) as avgCpu, "
-                + " min(memory) as minMem, max(memory) as maxMem, avg(memory) as avgMem, "
-                + " min(bytesIn) as minBytesIn, max(bytesIn) as maxBytesIn, avg(bytesIn) as avgBytesIn, sum(bytesIn) as totalBytesIn, "
-                + " min(bytesOut) as minBytesOut, max(bytesOut) as maxBytesOut, avg(bytesOut) as avgBytesOut, sum(bytesOut) as totalBytesOut, "
-                + " timestamp as timeWindowEnds "
-                + " INSERT  INTO tmp;";
-
-        SiddhiManager sm = new SiddhiManager();
-        ExecutionPlanRuntime plan = sm.createExecutionPlanRuntime(stream + query);
-
-        final AtomicInteger counter = new AtomicInteger();
-        plan.addCallback("downSample", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-                int count = counter.incrementAndGet();
-                if (count == 1) {
-                    Assert.assertEquals(6000L, inEvents[0].getData(9));
-                } else if(count == 2) {
-                    Assert.assertEquals(6000L, inEvents[0].getData(9));
-                }
-            }
-        });
-        InputHandler input = plan.getInputHandler("jmxMetric");
-
-        plan.start();
-        sendEvent(input);
-        Thread.sleep(100);
-        sendEvent(input);
-        Thread.sleep(1000);
-        sendEvent(input);
-        Thread.sleep(1000);
-        sendEvent(input);
-        Thread.sleep(200);
-        plan.shutdown();
-    }
-
-    // send 3 events
-    private void sendEvent(InputHandler input) throws Exception {
-        int len = 3;
-        Event[] events = new Event[len];
-        for (int i = 0; i < len; i++) {
-            long externalTs = System.currentTimeMillis();
-            // cpu int, memory int, bytesIn long, bytesOut long, timestamp long
-            events[i] = new Event(externalTs + i, new Object[] {
-                    15.0,
-                    15,
-                    1000,
-                    2000L,
-                    externalTs + i
-            });
-        }
-
-        for (Event e : events) {
-            input.send(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiExpiredEvents.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiExpiredEvents.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiExpiredEvents.java
deleted file mode 100644
index e0be82c..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiExpiredEvents.java
+++ /dev/null
@@ -1,129 +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.alert.state;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.core.util.EventPrinter;
-
-/**
- * Created by yonzhang on 11/25/15.
- */
-public class TestSiddhiExpiredEvents {
-    @Test
-    public void testExpiredEventsInLengthWindow() throws Exception{
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream TempStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from TempStream#window.length(3) "
-                + " select *"
-                + " insert all events into DelayedTempStream";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("TempStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"user", "open1"});
-        inputHandler.send(new Object[]{"user", "open2"});
-        inputHandler.send(new Object[]{"user", "open3"});
-        inputHandler.send(new Object[]{"user", "open4"});
-        inputHandler.send(new Object[]{"user", "open5"});
-        inputHandler.send(new Object[]{"user", "open6"});
-        Thread.sleep(1000);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void testExpiredEventsInLengthBatchWindow() throws Exception{
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream TempStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from TempStream#window.lengthBatch(2) "
-                + " select *"
-                + " insert all events into DelayedTempStream";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("TempStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"user", "open1"});
-        inputHandler.send(new Object[]{"user", "open2"});
-        inputHandler.send(new Object[]{"user", "open3"});
-        inputHandler.send(new Object[]{"user", "open4"});
-        inputHandler.send(new Object[]{"user", "open5"});
-        inputHandler.send(new Object[]{"user", "open6"});
-        Thread.sleep(1000);
-        executionPlanRuntime.shutdown();
-    }
-
-    @Test
-    public void testExpireEvents2() throws Exception{
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream TempStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from TempStream#window.length(4) "
-                + " select user, cmd, count(user) as cnt " +
-                " group by user " +
-                "having cnt > 2 "
-                + " insert all events into DelayedTempStream";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("TempStream");
-        executionPlanRuntime.start();
-        inputHandler.send(new Object[]{"user", "open1"});
-        inputHandler.send(new Object[]{"user", "open2"});
-        inputHandler.send(new Object[]{"user", "open3"});
-        inputHandler.send(new Object[]{"user", "open4"});
-        inputHandler.send(new Object[]{"user", "open5"});
-//        inputHandler.send(new Object[]{"user", "open6"});
-//        inputHandler.send(new Object[]{"user", "open7"});
-//        inputHandler.send(new Object[]{"user", "open8"});
-//        inputHandler.send(new Object[]{"user", "open9"});
-        Thread.sleep(1000);
-        executionPlanRuntime.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
deleted file mode 100644
index bd65b9b..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/state/TestSiddhiStateSnapshotAndRestore.java
+++ /dev/null
@@ -1,504 +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.alert.state;
-
-import org.apache.eagle.common.DateTimeUtil;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.core.util.EventPrinter;
-import org.wso2.siddhi.core.util.persistence.InMemoryPersistenceStore;
-import org.wso2.siddhi.core.util.persistence.PersistenceStore;
-
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-
-/**
- * experiment Siddhi state snapshot and restore
- */
-public class TestSiddhiStateSnapshotAndRestore {
-    private ExecutionPlanRuntime setupRuntimeForSimple(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "" +
-                "define stream testStream (cmd string, src string) ;";
-        String queryString = "" +
-                "@info(name = 'query1') " +
-                "from testStream[(cmd == 'rename') and (src == '/tmp/pii')] " +
-                "select cmd, src " +
-                "insert into outputStream ;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + queryString);
-
-        QueryCallback callback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        };
-        executionPlanRuntime.addCallback("query1", callback);
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testSimpleSiddhiQuery() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForSimple();
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii"});
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForSimple();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        restoredRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii"});
-        input.close();
-        restoredRuntime.shutdown();
-    }
-
-    private ExecutionPlanRuntime setupRuntimeForLengthSlideWindow(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream testStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream#window.length(3) "
-                + " select *"
-                + " insert all events into OutputStream";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testLengthSlideWindow() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state-lengthslidewindow";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForLengthSlideWindow();
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_1"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_2"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_3"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_4"});
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForLengthSlideWindow();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        restoredRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_5"});
-        input.close();
-        restoredRuntime.shutdown();
-    }
-
-    private ExecutionPlanRuntime setupRuntimeForLengthSlideWindowWithGroupby(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-
-        String cseEventStream = "define stream testStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream#window.length(50) "
-                + " select user, cmd, count(user) as cnt"
-                + " insert all events into OutputStream";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testLengthSlideWindowWithGroupby() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state-lengthslidewindowwithgroupby";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForLengthSlideWindowWithGroupby();
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_1"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_2"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_3"});
-        executionPlanRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_4"});
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForLengthSlideWindowWithGroupby();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        restoredRuntime.getInputHandler("testStream").send(new Object[]{"rename", "/tmp/pii_5"});
-        input.close();
-        restoredRuntime.shutdown();
-    }
-
-    private ExecutionPlanRuntime setupRuntimeForTimeSlideWindow(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-        String cseEventStream = "define stream testStream (timeStamp long, user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream[cmd == 'open']#window.externalTime(timeStamp,3 sec)"
-                + " select user, timeStamp " +
-                "insert all events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testTimeSlideWindow() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state-timeslidewindow";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForTimeSlideWindow();
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("testStream");
-        long curTime = DateTimeUtil.humanDateToMilliseconds("2015-09-17 00:00:00,000");
-        inputHandler.send(new Object[]{curTime, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 1000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 2000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 3000, "user", "open"});
-
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForTimeSlideWindow();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        inputHandler = restoredRuntime.getInputHandler("testStream");
-        inputHandler.send(new Object[]{curTime + 4000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 5000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 6000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 7000, "user", "open"});
-        Thread.sleep(1000);
-        input.close();
-        restoredRuntime.shutdown();
-    }
-    
-    private ExecutionPlanRuntime setupRuntimeForExternalTimeSlideWindowWithGroupby(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-        String cseEventStream = "define stream testStream (timeStamp long, user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream[cmd == 'open']#window.externalTime(timeStamp,30 sec)"
-                + " select user, timeStamp, count(user) as cnt"
-                + " group by user"
-                + " having cnt > 2"
-               + " insert all events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testExternalTimeSlideWindowWithGroupby() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state-externaltimeslidewindow";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForExternalTimeSlideWindowWithGroupby();
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("testStream");
-        long curTime = DateTimeUtil.humanDateToMilliseconds("2015-09-17 00:00:00,000");
-        inputHandler.send(new Object[]{curTime, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 1000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 2000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 3000, "user", "open"});
-
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForExternalTimeSlideWindowWithGroupby();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        inputHandler = restoredRuntime.getInputHandler("testStream");
-        inputHandler.send(new Object[]{curTime + 4000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 5000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 6000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 7000, "user", "open"});
-        Thread.sleep(1000);
-        input.close();
-        restoredRuntime.shutdown();
-    }
-
-    private ExecutionPlanRuntime setupRuntimeForExternalTimeSlideWindowWithGroupby_2(SiddhiManager siddhiManager){
-        String cseEventStream = "define stream testStream (timeStamp long, user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream[cmd == 'open']#window.externalTime(timeStamp,300 sec)"
-                + " select user, timeStamp, count(user) as cnt"
-                + " group by user"
-                + " insert all events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testExternalTimeSlideWindowWithGroupby_2() throws Exception{
-        SiddhiManager siddhiManager = new SiddhiManager();
-        PersistenceStore persistenceStore = new InMemoryPersistenceStore();
-        siddhiManager.setPersistenceStore(persistenceStore);
-
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForExternalTimeSlideWindowWithGroupby_2(siddhiManager);
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("testStream");
-        executionPlanRuntime.start();
-        long curTime = DateTimeUtil.humanDateToMilliseconds("2015-09-17 00:00:00,000");
-        inputHandler.send(new Object[]{curTime, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 1000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 2000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 3000, "user", "open"});
-        Thread.sleep(100);
-        executionPlanRuntime.persist();
-        executionPlanRuntime.shutdown();
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForExternalTimeSlideWindowWithGroupby_2(siddhiManager);
-        inputHandler = restoredRuntime.getInputHandler("testStream");
-        restoredRuntime.start();
-        restoredRuntime.restoreLastRevision();
-        inputHandler.send(new Object[]{curTime + 4000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 5000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 6000, "user", "open"});
-        inputHandler.send(new Object[]{curTime + 7000, "user", "open"});
-        Thread.sleep(1000);
-        restoredRuntime.shutdown();
-    }
-
-    private ExecutionPlanRuntime setupRuntimeForInternalTimeSlideWindowWithGroupby(){
-        SiddhiManager siddhiManager = new SiddhiManager();
-        String cseEventStream = "define stream testStream (user string, cmd string);";
-        String query = "@info(name = 'query1') from testStream[cmd == 'open']#window.time(5 sec)"
-                + " select user, count(user) as cnt"
-                + " group by user"
-                + " having cnt > 2"
-                + " insert events into outputStream;";
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime("@Plan:name('testPlan') " + cseEventStream + query);
-
-        executionPlanRuntime.addCallback("query1", new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-            }
-        });
-        executionPlanRuntime.start();
-        return executionPlanRuntime;
-    }
-
-    @Test
-    public void testInternalTimeSlideWindowWithGroupby() throws Exception{
-        String tmpdir = System.getProperty("java.io.tmpdir");
-        System.out.println("temporary directory: " + tmpdir);
-
-        String stateFile = tmpdir + "/siddhi-state-internaltimeslidewindow";
-        ExecutionPlanRuntime executionPlanRuntime = setupRuntimeForInternalTimeSlideWindowWithGroupby();
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("testStream");
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-
-        byte[] state = executionPlanRuntime.snapshot();
-        int length = state.length;
-        FileOutputStream output = new FileOutputStream(stateFile);
-        output.write(state);
-        output.close();
-        executionPlanRuntime.shutdown();
-
-        ExecutionPlanRuntime restoredRuntime = setupRuntimeForInternalTimeSlideWindowWithGroupby();
-        FileInputStream input = new FileInputStream(stateFile);
-        byte[] restoredState = new byte[length];
-        input.read(restoredState);
-        restoredRuntime.restore(restoredState);
-        inputHandler = restoredRuntime.getInputHandler("testStream");
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        inputHandler.send(new Object[]{"user", "open"});
-        Thread.sleep(1000);
-        input.close();
-        restoredRuntime.shutdown();
-    }
-
-    private int count;
-    private boolean eventArrived;
-
-    @Before
-    public void init() {
-        count = 0;
-        eventArrived = false;
-    }
-
-    /**
-     * Siddhi does not support external time window based snapshot
-     * @throws InterruptedException
-     */
-    public void persistenceTest7() throws InterruptedException {
-        PersistenceStore persistenceStore = new InMemoryPersistenceStore();
-
-        SiddhiManager siddhiManager = new SiddhiManager();
-        siddhiManager.setPersistenceStore(persistenceStore);
-
-        String executionPlan = "" +
-                "@plan:name('Test') " +
-                "" +
-                "define stream StockStream (symbol string, price float, volume int, timestamp long);" +
-                "" +
-                "@info(name = 'query1')" +
-                "from StockStream#window.externalTime(timestamp,30 sec) " +
-                "select symbol, price, sum(volume) as totalVol, count(symbol) as cnt " +
-                "group by symbol " +
-                "insert into OutStream ";
-
-        QueryCallback queryCallback = new QueryCallback() {
-            @Override
-            public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-                EventPrinter.print(timeStamp, inEvents, removeEvents);
-                eventArrived = true;
-                for (Event inEvent : inEvents) {
-                    count++;
-                    Assert.assertTrue("IBM".equals(inEvent.getData(0)) || "WSO2".equals(inEvent.getData(0)));
-                    if (count == 5) {
-                        Assert.assertEquals(400l, inEvent.getData(2));
-                    }
-                    if (count == 6) {
-                        Assert.assertEquals(200l, inEvent.getData(2));
-                    }
-                }
-            }
-        };
-
-        ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);
-        executionPlanRuntime.addCallback("query1", queryCallback);
-
-        InputHandler inputHandler = executionPlanRuntime.getInputHandler("StockStream");
-        executionPlanRuntime.start();
-        long currentTime = 0;
-
-        inputHandler.send(new Object[]{"IBM", 75.1f, 100, currentTime + 1000});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{"WSO2", 75.2f, 100, currentTime + 2000});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{"IBM", 75.3f, 100, currentTime + 3000});
-
-        Thread.sleep(500);
-        Assert.assertTrue(eventArrived);
-        Assert.assertEquals(3, count);
-
-        //persisting
-        Thread.sleep(500);
-        executionPlanRuntime.persist();
-
-        //restarting execution plan
-        Thread.sleep(500);
-        executionPlanRuntime.shutdown();
-        executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);
-        executionPlanRuntime.addCallback("query1", queryCallback);
-        inputHandler = executionPlanRuntime.getInputHandler("StockStream");
-        executionPlanRuntime.start();
-
-        //loading
-        executionPlanRuntime.restoreLastRevision();
-
-        inputHandler.send(new Object[]{"IBM", 75.4f, 100, currentTime + 4000});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{"IBM", 75.5f, 100, currentTime + 5000});
-        Thread.sleep(100);
-        inputHandler.send(new Object[]{"WSO2", 75.6f, 100, currentTime + 6000});
-
-        //shutdown execution plan
-        Thread.sleep(500);
-        executionPlanRuntime.shutdown();
-
-        Assert.assertEquals(count, 6);
-        Assert.assertEquals(true, eventArrived);
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/application.conf b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/application.conf
deleted file mode 100644
index 524b867..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/application.conf
+++ /dev/null
@@ -1,33 +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.
-
-{
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application" : "UnitTest",
-    "eagleService": {
-      "host": "localhost",
-      "port": 38080,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000,
-    "ignoreDeleteFromSource" : true
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/log4j.properties b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/log4j.properties
deleted file mode 100644
index 71a5dac..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, DRFA, stdout
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-# 30-day backup
-#log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
deleted file mode 100644
index 435b4c3..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-charAt=org.wso2.siddhi.extension.string.CharAtFunctionExtension
-coalesce=org.wso2.siddhi.extension.string.CoalesceFunctionExtension
-concat=org.wso2.siddhi.extension.string.ConcatFunctionExtension
-length=org.wso2.siddhi.extension.string.LengthFunctionExtension
-lower=org.wso2.siddhi.extension.string.LowerFunctionExtension
-regexp=org.wso2.siddhi.extension.string.RegexpFunctionExtension
-repeat=org.wso2.siddhi.extension.string.RepeatFunctionExtension
-replaceAll=org.wso2.siddhi.extension.string.ReplaceAllFunctionExtension
-replaceFirst=org.wso2.siddhi.extension.string.ReplaceFirstFunctionExtension
-reverse=org.wso2.siddhi.extension.string.ReverseFunctionExtension
-strcmp=org.wso2.siddhi.extension.string.StrcmpFunctionExtension
-substr=org.wso2.siddhi.extension.string.SubstrFunctionExtension
-trim=org.wso2.siddhi.extension.string.TrimFunctionExtension
-upper=org.wso2.siddhi.extension.string.UpperFunctionExtension
-hex=org.wso2.siddhi.extension.string.HexFunctionExtension
-unhex=org.wso2.siddhi.extension.string.UnhexFunctionExtension
-contains=org.wso2.siddhi.extension.string.ContainsFunctionExtension
-
-# Eagle Siddhi Extension
-equalsIgnoreCase=org.apache.eagle.policy.siddhi.extension.EqualsIgnoreCaseExtension
-containsIgnoreCase=org.apache.eagle.policy.siddhi.extension.ContainsIgnoreCaseExtension
-regexpIgnoreCase=org.apache.eagle.policy.siddhi.extension.RegexpIgnoreCaseFunctionExtension
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/unittest.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/unittest.conf b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/unittest.conf
deleted file mode 100644
index 1d18b67..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/unittest.conf
+++ /dev/null
@@ -1,65 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "local",
-    "topologyName" : "auditLogProcessTopology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 2,
-      "hdfsAuditLogAlertExecutor*" : 3
-    }
-  },
-  "dataSourceConfig": {
-    "flavor" : "stormkafka",
-    "topic" : "hdfs_audit_log",
-    "zkConnection" : "localhost:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-    "transactionZKServers" : "localhost",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/brokers/topics",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 2,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site": "site1",
-    "application": "hdfsAuditLog",
-    "eagleService": {
-       "host": "localhost",
-       "port": 38080
-    },
-  	"dataJoinPollIntervalSec" : 30,
-    "env"       : "test",
-    "mail.host" : "mailHost.com",
-	  "mail.smtp.port":"25",
-    "mail.debug" : "true"
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : false,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 1000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/pom.xml b/eagle-core/eagle-alert/eagle-alert-service/pom.xml
deleted file mode 100644
index 6bf09d1..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-alert-service</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-alert-service</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-alert-base</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-alert-process</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	  	<dependency>
-  			<groupId>eagle</groupId>
-  			<artifactId>eagle-service-base</artifactId>
-			<version>${project.version}</version>
-  		</dependency>
-	  	<dependency>
-  			<groupId>org.wso2.siddhi</groupId>
-  			<artifactId>siddhi-core</artifactId>
-  		</dependency>
-		<dependency>
-  			<groupId>org.wso2.siddhi</groupId>
-  			<artifactId>siddhi-extension-string</artifactId>
-  		</dependency>
-	</dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/AlertPolicyValidateProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/AlertPolicyValidateProvider.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/AlertPolicyValidateProvider.java
deleted file mode 100644
index 47ddcb9..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/AlertPolicyValidateProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.service.alert;
-
-import java.util.List;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.databind.Module;
-
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible=true)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public abstract class AlertPolicyValidateProvider {
-	public String type;
-
-	public abstract GenericServiceAPIResponseEntity<String> validate();
-	
-	public abstract String PolicyType();
-	
-	public abstract List<Module> BindingModules();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/PolicyValidateResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/PolicyValidateResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/PolicyValidateResource.java
deleted file mode 100644
index e4c19d6..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/PolicyValidateResource.java
+++ /dev/null
@@ -1,64 +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.service.alert;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ServiceLoader;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import com.fasterxml.jackson.databind.Module;
-
-@Path("/policy/validate")
-public class PolicyValidateResource {
-		
-	public static Logger LOG = LoggerFactory.getLogger(PolicyValidateResource.class);
-	
-	@SuppressWarnings({"rawtypes"})
-	@POST
-	@Consumes(MediaType.APPLICATION_JSON)
-	@Produces(MediaType.APPLICATION_JSON)
-	public GenericServiceAPIResponseEntity validatePolicy(String policyToValidate) {
-        ServiceLoader<AlertPolicyValidateProvider> loader = ServiceLoader.load(AlertPolicyValidateProvider.class);
-        Iterator<AlertPolicyValidateProvider> iter = loader.iterator();
-        List<Module> modules = new ArrayList<Module>();
-        while(iter.hasNext()) {
-        	AlertPolicyValidateProvider factory = iter.next();
-            LOG.info("Supported policy type : " + factory.PolicyType());
-            modules.addAll(factory.BindingModules());
-        }
-        AlertPolicyValidateProvider policyValidate = null;
-        try {
-        	policyValidate = JsonSerDeserUtils.deserialize(policyToValidate, AlertPolicyValidateProvider.class, modules);    		
-        }
-        catch (Exception ex) {
-        	LOG.error("Fail consutructing AlertPolicyValidateProvider ", ex);
-        }
-        return policyValidate.validate();
-	}
-}
\ No newline at end of file


[33/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategyImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategyImpl.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategyImpl.java
deleted file mode 100644
index eacefd5..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategyImpl.java
+++ /dev/null
@@ -1,86 +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.partition;
-
-import org.apache.commons.lang3.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-
-public class PartitionStrategyImpl implements PartitionStrategy {
-
-    public DataDistributionDao dao;
-    public PartitionAlgorithm algorithm;
-    public Map<String, Integer> routingTable;
-    public long lastRefreshTime;
-    public long refreshInterval;
-    public long timeRange;
-    public static long DEFAULT_TIME_RANGE = 2 * DateUtils.MILLIS_PER_DAY;
-    public static long DEFAULT_REFRESH_INTERVAL = 2 * DateUtils.MILLIS_PER_HOUR;
-    private final Logger LOG = LoggerFactory.getLogger(PartitionStrategyImpl.class);
-
-    public PartitionStrategyImpl(DataDistributionDao dao, PartitionAlgorithm algorithm, long refreshInterval, long timeRange) {
-        this.dao = dao;
-        this.algorithm = algorithm;
-        this.refreshInterval = refreshInterval;
-        this.timeRange = timeRange;
-    }
-
-    public PartitionStrategyImpl(DataDistributionDao dao, PartitionAlgorithm algorithm) {
-        this(dao, algorithm, DEFAULT_REFRESH_INTERVAL, DEFAULT_TIME_RANGE);
-    }
-
-    public boolean needRefresh() {
-        if (System.currentTimeMillis() > lastRefreshTime + refreshInterval) {
-            lastRefreshTime = System.currentTimeMillis();
-            return true;
-        }
-        return false;
-    }
-
-    public Map<String, Integer> generateRoutingTable(int buckNum) {
-        try {
-            long currentTime = System.currentTimeMillis();
-            List<Weight> weights = dao.fetchDataDistribution(currentTime - timeRange, currentTime);
-            routingTable = algorithm.partition(weights, buckNum);
-            return routingTable;
-        }
-        catch (Exception ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    @Override
-    public int balance(String key, int buckNum) {
-        if (needRefresh()) {
-            LOG.info("Going to refresh routing table");
-            routingTable = generateRoutingTable(buckNum);
-            LOG.info("Finish refresh routing table");
-        }
-        if (routingTable.containsKey(key)) {
-            return routingTable.get(key);
-        }
-        else {
-            return Math.abs(key.hashCode()) % buckNum;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/Weight.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/Weight.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/Weight.java
deleted file mode 100644
index 14d005d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/Weight.java
+++ /dev/null
@@ -1,30 +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.partition;
-
-public class Weight {
-    public String key;
-    public Double value;
-
-    public Weight(String key, Double value) {
-        this.key = key;
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/Collector.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/Collector.scala b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/Collector.scala
deleted file mode 100644
index 5361001..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/Collector.scala
+++ /dev/null
@@ -1,21 +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.datastream
-
-trait Collector[-R] {
-  def collect(r : R);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/FlatMapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/FlatMapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/FlatMapper.scala
deleted file mode 100644
index ddea46f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/FlatMapper.scala
+++ /dev/null
@@ -1,25 +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.datastream
-
-trait FlatMapper[T] extends Serializable {
-  def flatMap(input : Seq[AnyRef], collector : Collector[T])
-}
-
-case class FlatMapperWrapper[T](func:(Any,Collector[T]) => Unit) extends FlatMapper[T]{
-  override def flatMap(input: Seq[AnyRef], collector: Collector[T]): Unit = func(input,collector)
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/StormStreamExecutor.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/StormStreamExecutor.scala b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/StormStreamExecutor.scala
deleted file mode 100644
index 836c7eb..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/StormStreamExecutor.scala
+++ /dev/null
@@ -1,69 +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.datastream
-
-import com.typesafe.config.Config
-import scala.collection.JavaConverters._
-
-trait StormStreamExecutor[R <: Any] extends FlatMapper[R] {
-  def prepareConfig(config : Config)
-  def init
-  def fields : Array[String]
-}
-
-trait JavaStormStreamExecutor[R <: AnyRef] extends FlatMapper[R] {
-  def prepareConfig(config : Config)
-  def init
-  def fields : Array[String]
-  override def toString() = this.getClass.getSimpleName
-
-  override def flatMap(input : Seq[AnyRef], collector : Collector[R]) = flatMap(input.asJava,collector)
-
-  def flatMap(input : java.util.List[AnyRef], collector : Collector[R])
-}
-
-abstract class StormStreamExecutor1[T0] extends StormStreamExecutor[Tuple1[T0]] {
-  override def fields = Array("f0")
-}
-
-abstract class JavaStormStreamExecutor1[T0] extends JavaStormStreamExecutor[Tuple1[T0]] {
-  override def fields = Array("f0")
-}
-
-abstract class  StormStreamExecutor2[T0, T1] extends StormStreamExecutor[Tuple2[T0, T1]] {
-  override def fields = Array("f0", "f1")
-}
-
-abstract class  JavaStormStreamExecutor2[T0, T1] extends JavaStormStreamExecutor[Tuple2[T0, T1]] {
-  override def fields = Array("f0", "f1")
-}
-
-abstract class  StormStreamExecutor3[T0, T1, T2] extends StormStreamExecutor[Tuple3[T0, T1, T2]] {
-  override def fields = Array("f0", "f1", "f2")
-}
-
-abstract class  JavaStormStreamExecutor3[T0, T1, T2] extends JavaStormStreamExecutor[Tuple3[T0, T1, T2]] {
-  override def fields = Array("f0", "f1", "f2")
-}
-
-abstract class  StormStreamExecutor4[T0, T1, T2, T3] extends StormStreamExecutor[Tuple4[T0, T1, T2, T3]] {
-  override def fields = Array("f0", "f1", "f2", "f3")
-}
-
-abstract class  JavaStormStreamExecutor4[T0, T1, T2, T3] extends JavaStormStreamExecutor[Tuple4[T0, T1, T2, T3]] {
-  override def fields = Array("f0", "f1", "f2", "f3")
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/pom.xml b/eagle-core/eagle-data-process/pom.xml
deleted file mode 100644
index 90b125b..0000000
--- a/eagle-core/eagle-data-process/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>eagle</groupId>
-        <artifactId>eagle-core</artifactId>
-        <version>0.3.0</version>
-    </parent>
-    <artifactId>eagle-data-process-parent</artifactId>
-    <packaging>pom</packaging>
-    <description>Eagle Data Process Framework</description>
-    <modules>
-        <module>eagle-stream-process-base</module>
-    	<module>eagle-storm-jobrunning-spout</module>
-    	<module>eagle-job-common</module>
-        <module>eagle-stream-process-api</module>
-        <module>eagle-stream-pipeline</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml b/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
deleted file mode 100644
index ab9a253..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-embed-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-embed-hbase</artifactId>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-testing-util</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.slf4j</groupId>-->
-            <!--<artifactId>slf4j-log4j12</artifactId>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>test-jar</id>
-                        <phase>test-compile</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/eagle-topology-init.sh b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/eagle-topology-init.sh
deleted file mode 100755
index 62b1e83..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/eagle-topology-init.sh
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-export EAGLE_SERVICE_USER=admin
-export EAGLE_SERVICE_PASSWD=secret
-export EAGLE_SERVICE_HOST=localhost
-export EAGLE_SERVICE_PORT=38080
-
-#####################################################################
-#            Import stream metadata for HDFS
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for HDFS... "
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"hdfsAuditLog"}, "enabled": "true", "config" : "{\"hdfsEndpoint\":\"hdfs://sandbox.hortonworks.com:8020\"}", "desc":"HDFS"}]'
-
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream"},"desc":"alert event stream from hdfs audit log"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"dataSource":"hdfsAuditLog","alertExecutorId":"hdfsAuditLogAlertExecutor","streamName":"hdfsAuditLogEventStream"},"desc":"alert executor for hdfs audit log event stream"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"src"},"attrDescription":"source directory or file, such as /tmp","attrType":"string","category":"","attrValueResolver":"eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"dst"},"attrDescription":"destination directory, such as /tmp","attrType":"string","category":"","attrValueResolver":"eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"host"},"attrDescription":"hostname, such as localhost","attrType":"st
 ring","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"allowed"},"attrDescription":"true, false or none","attrType":"bool","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"user"},"attrDescription":"process user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"cmd"},"attrDescription":"file/directory operation, such as getfileinfo, open, listStatus and so on","attrType":"string","category":"","attrValueResolver":"eagle.ser
 vice.security.hdfs.resolver.HDFSCommandResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"sensitivityType"},"attrDescription":"mark such as AUDITLOG, SECURITYLOG","attrType":"string","category":"","attrValueResolver":"eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"securityZone"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":""}]'
-
-#####################################################################
-#            Import stream metadata for HIVE
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-echo ""
-echo "Importing AlertDataSourceService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"hiveQueryLog"},"enabled": "true", "config" : "{\"accessType\":\"metastoredb_jdbc\",\"password\":\"hive\",\"user\":\"hive\",\"jdbcDriverClassName\":\"com.mysql.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"}", "desc":"HIVE"}]'
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream"},"desc":"alert event stream from hive query"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"dataSource":"hiveQueryLog","alertExecutorId":"hiveAccessAlertByRunningJob","streamName":"hiveAccessLogStream"},"desc":"alert executor for hive query log event stream"}]'
-
-## AlertStreamSchemaServiceService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"process user","attrValueResolver":"","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"user"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"hive sql command, such as SELECT, INSERT and DELETE","attrValueResolver":"eagle.service.security.hive.resolver.HiveCommandResolver","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"command"}},{"prefix":"alertStreamSchema","category":"","attrType":"long","attrDescription":"milliseconds of the datetime","attrValueResolver":"","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"timestamp"}},{"prefix":"alertStreamSchem
 a","category":"","attrType":"string","attrDescription":"/database/table/column or /database/table/*","attrValueResolver":"eagle.service.security.hive.resolver.HiveMetadataResolver","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"resource"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"mark such as PHONE_NUMBER","attrValueResolver":"eagle.service.security.hive.resolver.HiveSensitivityTypeResolver","tags":{"dataSource":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"sensitivityType"}}]'
-
-#####################################################################
-#            Import stream metadata for UserProfile
-#####################################################################
-echo ""
-echo "Importing AlertDataSourceService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"userProfile"}, "enabled": "true", "config" : "{\"features\":\"getfileinfo,open,listStatus,setTimes,setPermission,rename,mkdirs,create,setReplication,contentSummary,delete,setOwner,fsck\"}", "desc":"USERPROFILE"}]'
-
-echo ""
-echo "Importing AlertDefinitionService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
-     -d '[ { "prefix": "alertdef", "tags": { "site": "sandbox", "dataSource": "userProfile", "alertExecutorId": "userProfileAnomalyDetectionExecutor", "policyId": "userProfile", "policyType": "MachineLearning" }, "desc": "user profile anomaly detection", "policyDef": "{\"type\":\"MachineLearning\",\"alertContext\":{\"site\":\"sandbox\",\"dataSource\":\"userProfile\",\"component\":\"testComponent\",\"description\":\"ML based user profile anomaly detection\",\"severity\":\"WARNING\",\"notificationByEmail\":\"true\"},\"algorithms\":[{\"name\":\"EigenDecomposition\",\"evaluator\":\"eagle.security.userprofile.impl.UserProfileAnomalyEigenEvaluator\",\"description\":\"EigenBasedAnomalyDetection\",\"features\":\"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck\"},{\"name\":\"KDE\",\"evaluator\":\"eagle.security.userprofile.impl.UserProfileAnomalyKDEEvaluator\",\"description\":\"DensityBasedAnomalyDetection
 \",\"features\":\"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck\"}]}", "dedupeDef": "{\"alertDedupIntervalMin\":\"0\",\"emailDedupIntervalMin\":\"0\"}", "notificationDef": "", "remediationDef": "", "enabled": true } ]'
-
-echo ""
-echo "Importing AlertExecutorService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertExecutorService" \
-      -d '[ { "prefix": "alertExecutor", "tags":{ "site":"sandbox", "dataSource":"userProfile", "alertExecutorId" : "userProfileAnomalyDetectionExecutor", "streamName":"userActivity" }, "desc": "user activity data source" } ]'
-
-echo ""
-echo "Importing AlertStreamService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertStreamService" \
-     -d '[ { "prefix": "alertStream", "tags": { "streamName": "userActivity", "site":"sandbox", "dataSource":"userProfile" }, "alertExecutorIdList": [ "userProfileAnomalyDetectionExecutor" ] } ]'
-
-## Finished
-echo ""
-echo "Finished initialization for eagle topology"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/prepare-dev-data.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/prepare-dev-data.sh b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/prepare-dev-data.sh
deleted file mode 100755
index b7f6b28..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/prepare-dev-data.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-./eagle-topology-init.sh
-./sample-policy-create.sh
-./sample-sensitivity-resource-create.sh
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-policy-create.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-policy-create.sh b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-policy-create.sh
deleted file mode 100755
index 307c542..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-policy-create.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-export EAGLE_SERVICE_USER=admin
-export EAGLE_SERVICE_PASSWD=secret
-export EAGLE_SERVICE_HOST=localhost
-export EAGLE_SERVICE_PORT=38080
-
-#### create hdfs policy sample in sandbox
-echo "create hdfs policy sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d \
-'[{"tags":{"site":"sandbox","dataSource":"hdfsAuditLog","alertExecutorId":"hdfsAuditLogAlertExecutor","policyId":"viewPrivate","policyType":"siddhiCEPEngine"},"desc":"view private file","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from hdfsAuditLogEventStream[(cmd=='\'open\'') and (src=='\'/tmp/private\'')] select * insert into outputStream\"}","dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}","notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]","remediationDef":"","enabled":true}]'
-
-#### create hive policy sample in sandbox
-echo "create hive policy sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d \
-'[{"tags":{"site":"sandbox","dataSource":"hiveQueryLog","alertExecutorId":"hiveAccessAlertByRunningJob","policyId":"queryPhoneNumber","policyType":"siddhiCEPEngine"},"desc":"query sensitive hive data","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from hiveAccessLogStream[(sensitivityType=='\'PHONE_NUMBER\'')] select * insert into outputStream;\"}","dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}","notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]","remediationDef":"","enabled":"true"}]'

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-sensitivity-resource-create.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-sensitivity-resource-create.sh b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-sensitivity-resource-create.sh
deleted file mode 100755
index daefba6..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/initdata/sample-sensitivity-resource-create.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-export EAGLE_SERVICE_USER=admin
-export EAGLE_SERVICE_PASSWD=secret
-export EAGLE_SERVICE_HOST=localhost
-export EAGLE_SERVICE_PORT=38080
-
-#### create hive sensitivity sample in sandbox
-echo "create hive sensitivity sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=HiveResourceSensitivityService" -d '[{"tags":{"site" : "sandbox", "hiveResource":"/xademo/customer_details/phone_number"}, "sensitivityType": "PHONE_NUMBER"}]'
-
-
-#### create hdfs sensitivity sample in sandbox
-echo "create hdfs sensitivity sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FileSensitivityService" -d '[{"tags":{"site" : "sandbox", "filedir":"/tmp/private"}, "sensitivityType": "PRIVATE"}]'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/EmbeddedHbase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/EmbeddedHbase.java b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/EmbeddedHbase.java
deleted file mode 100644
index 7bfb409..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/EmbeddedHbase.java
+++ /dev/null
@@ -1,132 +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.service.hbase;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.MiniHBaseCluster;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- */
-public class EmbeddedHbase {
-    private HBaseTestingUtility util;
-    private MiniHBaseCluster hBaseCluster;
-    private static EmbeddedHbase hbase;
-    private int port;    
-    private String znode;
-    private static int DEFAULT_PORT = 2181;
-    private static String DEFAULT_ZNODE = "/hbase-unsecure";
-	private static final Logger LOG = LoggerFactory.getLogger(EmbeddedHbase.class);
-	
-    private EmbeddedHbase(int port, String znode) {
-    	this.port = port;
-    	this.znode = znode;    	
-    }
-    
-    private EmbeddedHbase(int port) {
-    	this(port, DEFAULT_ZNODE);
-    }
-    
-    public static EmbeddedHbase getInstance() {
-    	if (hbase == null) {
-    		synchronized(EmbeddedHbase.class) {
-    			if (hbase == null) {
-    				hbase = new EmbeddedHbase();
-    				hbase.start();   						
-    			}
-    		}
-    	}
-    	return hbase;
-    }
-    
-    private EmbeddedHbase() {
-    	this(DEFAULT_PORT, DEFAULT_ZNODE);
-    }
-
-    public void start() {
-    	try {
-	    	util = new HBaseTestingUtility();
-	        Configuration conf= util.getConfiguration();
-	        conf.setInt("test.hbase.zookeeper.property.clientPort", port);
-	        conf.set("zookeeper.znode.parent", znode);
-	        conf.setInt("hbase.zookeeper.property.maxClientCnxns", 200);
-	        conf.setInt("hbase.master.info.port", -1);//avoid port clobbering
-	        // start mini hbase cluster
-	        hBaseCluster = util.startMiniCluster();
-	        Configuration config = hBaseCluster.getConf();
-	        
-	        config.set("zookeeper.session.timeout", "120000");
-	        config.set("hbase.zookeeper.property.tickTime", "6000");
-	        config.set(HConstants.HBASE_CLIENT_PAUSE, "3000");
-	        config.set(HConstants.HBASE_CLIENT_RETRIES_NUMBER, "1");
-	        config.set(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, "60000");
-	        
-	        Runtime.getRuntime().addShutdownHook(new Thread() {
-	            @Override
-	            public void run() {
-	            	shutdown();
-	            }
-	        }); 
-    	}
-    	catch (Throwable t) {
-    		LOG.error("Got an exception: ",t);
-    	}
-    }
-
-    public void shutdown() {    	
-    	try {
-            util.shutdownMiniCluster();
-        }
-    	catch (Throwable t) {
-    		LOG.info("Got an exception, " + t , t.getCause());
-    		try {
-                util.shutdownMiniCluster();
-    		}
-    		catch (Throwable t1) {
-    		}
-    	}
-    }
-    
-    public void createTable(String tableName, String cf) {
-    	try {    		
-    		util.createTable(tableName, cf);
-    	}
-    	catch (Exception ex) {
-    		LOG.warn("Create table failed, probably table already existed, table name: " + tableName);
-    	}
-    }
-    
-    public void deleteTable(String tableName){
-    	try {
-    		util.deleteTable(tableName);
-    	}
-    	catch (Exception ex) {
-    		LOG.warn("Delete table failed, probably table not existed, table name: " + tableName);
-    	}
-    }
-
-    public static void main(String[] args){
-        EmbeddedHbase hbase = new EmbeddedHbase(12181);
-        hbase.start();
-        for(String table : new Tables().getTables()){
-            hbase.createTable(table, "f");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/Tables.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/Tables.java b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/Tables.java
deleted file mode 100644
index f8941bc..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/java/org/apache/eagle/service/hbase/Tables.java
+++ /dev/null
@@ -1,51 +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.service.hbase;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Tables {
-    List<String> tables = new ArrayList<String>();
-    public Tables(){
-        tables.add("eagle_metric");
-
-        tables.add("actiondetail");
-        tables.add("alertdetail");
-        tables.add("alertgroup");
-        tables.add("alertmeta");
-        tables.add("alertMetaEntity");
-
-        // for alert framework
-        tables.add("alertDataSource");
-        tables.add("alertStream");
-        tables.add("alertExecutor");
-        tables.add("alertStreamSchema");
-        tables.add("alertdef");
-
-        // for security
-        tables.add("hiveResourceSensitivity");
-        tables.add("fileSensitivity");
-        tables.add("ipzone");
-        tables.add("mlmodel");
-        tables.add("userprofile");
-    }
-
-    public List<String> getTables(){
-        return this.tables;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/main/resources/hbase-default.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/resources/hbase-default.xml b/eagle-core/eagle-embed/eagle-embed-hbase/src/main/resources/hbase-default.xml
deleted file mode 100644
index 62cdff1..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/main/resources/hbase-default.xml
+++ /dev/null
@@ -1,935 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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.
- */
--->
-<configuration>
-  <property>
-    <name>hbase.rootdir</name>
-    <value>file:///tmp/hbase-${user.name}/hbase</value>
-    <description>The directory shared by region servers and into
-      which HBase persists.  The URL should be 'fully-qualified'
-      to include the filesystem scheme.  For example, to specify the
-      HDFS directory '/hbase' where the HDFS instance's namenode is
-      running at namenode.example.org on port 9000, set this value to:
-      hdfs://namenode.example.org:9000/hbase.  By default HBase writes
-      into /tmp.  Change this configuration else all data will be lost
-      on machine restart.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.port</name>
-    <value>60000</value>
-    <description>The port the HBase Master should bind to.</description>
-  </property>
-  <property>
-    <name>hbase.cluster.distributed</name>
-    <value>false</value>
-    <description>The mode the cluster will be in. Possible values are
-      false for standalone mode and true for distributed mode.  If
-      false, startup will run all HBase and ZooKeeper daemons together
-      in the one JVM.
-    </description>
-  </property>
-  <property>
-    <name>hbase.tmp.dir</name>
-    <value>/tmp/hbase-${user.name}</value>
-    <description>Temporary directory on the local filesystem.
-      Change this setting to point to a location more permanent
-      than '/tmp' (The '/tmp' directory is often cleared on
-      machine restart).
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.info.port</name>
-    <value>60010</value>
-    <description>The port for the HBase Master web UI.
-      Set to -1 if you do not want a UI instance run.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.info.bindAddress</name>
-    <value>0.0.0.0</value>
-    <description>The bind address for the HBase Master web UI
-    </description>
-  </property>
-  <property>
-    <name>hbase.client.write.buffer</name>
-    <value>2097152</value>
-    <description>Default size of the HTable clien write buffer in bytes.
-      A bigger buffer takes more memory -- on both the client and server
-      side since server instantiates the passed write buffer to process
-      it -- but a larger buffer size reduces the number of RPCs made.
-      For an estimate of server-side memory-used, evaluate
-      hbase.client.write.buffer * hbase.regionserver.handler.count
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.port</name>
-    <value>60020</value>
-    <description>The port the HBase RegionServer binds to.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.info.port</name>
-    <value>60030</value>
-    <description>The port for the HBase RegionServer web UI
-      Set to -1 if you do not want the RegionServer UI to run.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.info.port.auto</name>
-    <value>false</value>
-    <description>Whether or not the Master or RegionServer
-      UI should search for a port to bind to. Enables automatic port
-      search if hbase.regionserver.info.port is already in use.
-      Useful for testing, turned off by default.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.info.bindAddress</name>
-    <value>0.0.0.0</value>
-    <description>The address for the HBase RegionServer web UI
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.class</name>
-    <value>org.apache.hadoop.hbase.ipc.HRegionInterface</value>
-    <description>The RegionServer interface to use.
-      Used by the client opening proxy to remote region server.
-    </description>
-  </property>
-  <property>
-    <name>hbase.client.pause</name>
-    <value>1000</value>
-    <description>General client pause value.  Used mostly as value to wait
-      before running a retry of a failed get, region lookup, etc.</description>
-  </property>
-  <property>
-    <name>hbase.client.retries.number</name>
-    <value>10</value>
-    <description>Maximum retries.  Used as maximum for all retryable
-      operations such as fetching of the root region from root region
-      server, getting a cell's value, starting a row update, etc.
-      Default: 10.
-    </description>
-  </property>
-  <property>
-    <name>hbase.bulkload.retries.number</name>
-    <value>0</value>
-    <description>Maximum retries.  This is maximum number of iterations
-      to atomic bulk loads are attempted in the face of splitting operations
-      0 means never give up.  Default: 0.
-    </description>
-  </property>
-  <property>
-    <name>hbase.client.scanner.caching</name>
-    <value>1</value>
-    <description>Number of rows that will be fetched when calling next
-      on a scanner if it is not served from (local, client) memory. Higher
-      caching values will enable faster scanners but will eat up more memory
-      and some calls of next may take longer and longer times when the cache is empty.
-      Do not set this value such that the time between invocations is greater
-      than the scanner timeout; i.e. hbase.regionserver.lease.period
-    </description>
-  </property>
-  <property>
-    <name>hbase.client.keyvalue.maxsize</name>
-    <value>10485760</value>
-    <description>Specifies the combined maximum allowed size of a KeyValue
-      instance. This is to set an upper boundary for a single entry saved in a
-      storage file. Since they cannot be split it helps avoiding that a region
-      cannot be split any further because the data is too large. It seems wise
-      to set this to a fraction of the maximum region size. Setting it to zero
-      or less disables the check.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.lease.period</name>
-    <value>60000</value>
-    <description>HRegion server lease period in milliseconds. Default is
-      60 seconds. Clients must report in within this period else they are
-      considered dead.</description>
-  </property>
-  <property>
-    <name>hbase.regionserver.handler.count</name>
-    <value>10</value>
-    <description>Count of RPC Listener instances spun up on RegionServers.
-      Same property is used by the Master for count of master handlers.
-      Default is 10.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.msginterval</name>
-    <value>3000</value>
-    <description>Interval between messages from the RegionServer to Master
-      in milliseconds.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.optionallogflushinterval</name>
-    <value>1000</value>
-    <description>Sync the HLog to the HDFS after this interval if it has not
-      accumulated enough entries to trigger a sync. Default 1 second. Units:
-      milliseconds.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.regionSplitLimit</name>
-    <value>2147483647</value>
-    <description>Limit for the number of regions after which no more region
-      splitting should take place. This is not a hard limit for the number of
-      regions but acts as a guideline for the regionserver to stop splitting after
-      a certain limit. Default is set to MAX_INT; i.e. do not block splitting.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.logroll.period</name>
-    <value>3600000</value>
-    <description>Period at which we will roll the commit log regardless
-      of how many edits it has.</description>
-  </property>
-  <property>
-    <name>hbase.regionserver.logroll.errors.tolerated</name>
-    <value>2</value>
-    <description>The number of consecutive WAL close errors we will allow
-      before triggering a server abort.  A setting of 0 will cause the
-      region server to abort if closing the current WAL writer fails during
-      log rolling.  Even a small value (2 or 3) will allow a region server
-      to ride over transient HDFS errors.</description>
-  </property>
-  <property>
-    <name>hbase.regionserver.hlog.reader.impl</name>
-    <value>org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader</value>
-    <description>The HLog file reader implementation.</description>
-  </property>
-  <property>
-    <name>hbase.regionserver.hlog.writer.impl</name>
-    <value>org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter</value>
-    <description>The HLog file writer implementation.</description>
-  </property>
-  <property>
-    <name>hbase.regionserver.nbreservationblocks</name>
-    <value>4</value>
-    <description>The number of resevoir blocks of memory release on
-      OOME so we can cleanup properly before server shutdown.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.dns.interface</name>
-    <value>default</value>
-    <description>The name of the Network Interface from which a ZooKeeper server
-      should report its IP address.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.dns.nameserver</name>
-    <value>default</value>
-    <description>The host name or IP address of the name server (DNS)
-      which a ZooKeeper server should use to determine the host name used by the
-      master for communication and display purposes.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.dns.interface</name>
-    <value>default</value>
-    <description>The name of the Network Interface from which a region server
-      should report its IP address.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.dns.nameserver</name>
-    <value>default</value>
-    <description>The host name or IP address of the name server (DNS)
-      which a region server should use to determine the host name used by the
-      master for communication and display purposes.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.dns.interface</name>
-    <value>default</value>
-    <description>The name of the Network Interface from which a master
-      should report its IP address.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.dns.nameserver</name>
-    <value>default</value>
-    <description>The host name or IP address of the name server (DNS)
-      which a master should use to determine the host name used
-      for communication and display purposes.
-    </description>
-  </property>
-  <property>
-    <name>hbase.balancer.period
-    </name>
-    <value>300000</value>
-    <description>Period at which the region balancer runs in the Master.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regions.slop</name>
-    <value>0.2</value>
-    <description>Rebalance if any regionserver has average + (average * slop) regions.
-      Default is 20% slop.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.logcleaner.ttl</name>
-    <value>600000</value>
-    <description>Maximum time a HLog can stay in the .oldlogdir directory,
-      after which it will be cleaned by a Master thread.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.logcleaner.plugins</name>
-    <value>org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner</value>
-    <description>A comma-separated list of LogCleanerDelegate invoked by
-      the LogsCleaner service. These WAL/HLog cleaners are called in order,
-      so put the HLog cleaner that prunes the most HLog files in front. To
-      implement your own LogCleanerDelegate, just put it in HBase's classpath
-      and add the fully qualified class name here. Always add the above
-      default log cleaners in the list.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.global.memstore.upperLimit</name>
-    <value>0.4</value>
-    <description>Maximum size of all memstores in a region server before new
-      updates are blocked and flushes are forced. Defaults to 40% of heap
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.global.memstore.lowerLimit</name>
-    <value>0.35</value>
-    <description>When memstores are being forced to flush to make room in
-      memory, keep flushing until we hit this mark. Defaults to 35% of heap.
-      This value equal to hbase.regionserver.global.memstore.upperLimit causes
-      the minimum possible flushing to occur when updates are blocked due to
-      memstore limiting.
-    </description>
-  </property>
-  <property>
-    <name>hbase.server.thread.wakefrequency</name>
-    <value>10000</value>
-    <description>Time to sleep in between searches for work (in milliseconds).
-      Used as sleep interval by service threads such as log roller.
-    </description>
-  </property>
-  <property>
-    <name>hbase.server.versionfile.writeattempts</name>
-    <value>3</value>
-    <description>
-      How many time to retry attempting to write a version file
-      before just aborting. Each attempt is seperated by the
-      hbase.server.thread.wakefrequency milliseconds.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.memstore.flush.size</name>
-    <value>134217728</value>
-    <description>
-      Memstore will be flushed to disk if size of the memstore
-      exceeds this number of bytes.  Value is checked by a thread that runs
-      every hbase.server.thread.wakefrequency.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.preclose.flush.size</name>
-    <value>5242880</value>
-    <description>
-      If the memstores in a region are this size or larger when we go
-      to close, run a "pre-flush" to clear out memstores before we put up
-      the region closed flag and take the region offline.  On close,
-      a flush is run under the close flag to empty memory.  During
-      this time the region is offline and we are not taking on any writes.
-      If the memstore content is large, this flush could take a long time to
-      complete.  The preflush is meant to clean out the bulk of the memstore
-      before putting up the close flag and taking the region offline so the
-      flush that runs under the close flag has little to do.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.memstore.block.multiplier</name>
-    <value>2</value>
-    <description>
-      Block updates if memstore has hbase.hregion.block.memstore
-      time hbase.hregion.flush.size bytes.  Useful preventing
-      runaway memstore during spikes in update traffic.  Without an
-      upper-bound, memstore fills such that when it flushes the
-      resultant flush files take a long time to compact or split, or
-      worse, we OOME.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.memstore.mslab.enabled</name>
-    <value>true</value>
-    <description>
-      Enables the MemStore-Local Allocation Buffer,
-      a feature which works to prevent heap fragmentation under
-      heavy write loads. This can reduce the frequency of stop-the-world
-      GC pauses on large heaps.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.max.filesize</name>
-    <value>10737418240</value>
-    <description>
-      Maximum HStoreFile size. If any one of a column families' HStoreFiles has
-      grown to exceed this value, the hosting HRegion is split in two.
-      Default: 10G.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hstore.compactionThreshold</name>
-    <value>3</value>
-    <description>
-      If more than this number of HStoreFiles in any one HStore
-      (one HStoreFile is written per flush of memstore) then a compaction
-      is run to rewrite all HStoreFiles files as one.  Larger numbers
-      put off compaction but when it runs, it takes longer to complete.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hstore.blockingStoreFiles</name>
-    <value>7</value>
-    <description>
-      If more than this number of StoreFiles in any one Store
-      (one StoreFile is written per flush of MemStore) then updates are
-      blocked for this HRegion until a compaction is completed, or
-      until hbase.hstore.blockingWaitTime has been exceeded.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hstore.blockingWaitTime</name>
-    <value>90000</value>
-    <description>
-      The time an HRegion will block updates for after hitting the StoreFile
-      limit defined by hbase.hstore.blockingStoreFiles.
-      After this time has elapsed, the HRegion will stop blocking updates even
-      if a compaction has not been completed.  Default: 90 seconds.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hstore.compaction.max</name>
-    <value>10</value>
-    <description>Max number of HStoreFiles to compact per 'minor' compaction.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hregion.majorcompaction</name>
-    <value>86400000</value>
-    <description>The time (in miliseconds) between 'major' compactions of all
-      HStoreFiles in a region.  Default: 1 day.
-      Set to 0 to disable automated major compactions.
-    </description>
-  </property>
-  <property>
-    <name>hbase.mapreduce.hfileoutputformat.blocksize</name>
-    <value>65536</value>
-    <description>The mapreduce HFileOutputFormat writes storefiles/hfiles.
-      This is the minimum hfile blocksize to emit.  Usually in hbase, writing
-      hfiles, the blocksize is gotten from the table schema (HColumnDescriptor)
-      but in the mapreduce outputformat context, we don't have access to the
-      schema so get blocksize from Configuration.  The smaller you make
-      the blocksize, the bigger your index and the less you fetch on a
-      random-access.  Set the blocksize down if you have small cells and want
-      faster random-access of individual cells.
-    </description>
-  </property>
-  <property>
-    <name>hfile.block.cache.size</name>
-    <value>0.25</value>
-    <description>
-      Percentage of maximum heap (-Xmx setting) to allocate to block cache
-      used by HFile/StoreFile. Default of 0.25 means allocate 25%.
-      Set to 0 to disable but it's not recommended.
-    </description>
-  </property>
-  <property>
-    <name>hbase.hash.type</name>
-    <value>murmur</value>
-    <description>The hashing algorithm for use in HashFunction. Two values are
-      supported now: murmur (MurmurHash) and jenkins (JenkinsHash).
-      Used by bloom filters.
-    </description>
-  </property>
-  <property>
-    <name>hfile.block.index.cacheonwrite</name>
-    <value>false</value>
-    <description>
-      This allows to put non-root multi-level index blocks into the block
-      cache at the time the index is being written.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.checksum.verify</name>
-    <value>false</value>
-    <description>
-      Allow hbase to do checksums rather than using hdfs checksums. This is a backwards
-      incompatible change.
-    </description>
-  </property>
-  <property>
-    <name>hfile.index.block.max.size</name>
-    <value>131072</value>
-    <description>
-      When the size of a leaf-level, intermediate-level, or root-level
-      index block in a multi-level block index grows to this size, the
-      block is written out and a new block is started.
-    </description>
-  </property>
-  <property>
-    <name>hfile.format.version</name>
-    <value>2</value>
-    <description>
-      The HFile format version to use for new files. Set this to 1 to test
-      backwards-compatibility. The default value of this option should be
-      consistent with FixedFileTrailer.MAX_VERSION.
-    </description>
-  </property>
-  <property>
-    <name>io.storefile.bloom.block.size</name>
-    <value>131072</value>
-    <description>
-      The size in bytes of a single block ("chunk") of a compound Bloom
-      filter. This size is approximate, because Bloom blocks can only be
-      inserted at data block boundaries, and the number of keys per data
-      block varies.
-    </description>
-  </property>
-  <property>
-    <name>io.storefile.bloom.cacheonwrite</name>
-    <value>false</value>
-    <description>
-      Enables cache-on-write for inline blocks of a compound Bloom filter.
-    </description>
-  </property>
-  <property>
-    <name>hbase.rs.cacheblocksonwrite</name>
-    <value>false</value>
-    <description>
-      Whether an HFile block should be added to the block cache when the
-      block is finished.
-    </description>
-  </property>
-  <property>
-    <name>hbase.rpc.engine</name>
-    <value>org.apache.hadoop.hbase.ipc.WritableRpcEngine</value>
-    <description>Implementation of org.apache.hadoop.hbase.ipc.RpcEngine to be
-      used for client / server RPC call marshalling.
-    </description>
-  </property>
-
-  <!-- The following properties configure authentication information for
-       HBase processes when using Kerberos security.  There are no default
-       values, included here for documentation purposes -->
-  <property>
-    <name>hbase.master.keytab.file</name>
-    <value></value>
-    <description>Full path to the kerberos keytab file to use for logging in
-      the configured HMaster server principal.
-    </description>
-  </property>
-  <property>
-    <name>hbase.master.kerberos.principal</name>
-    <value></value>
-    <description>Ex. "hbase/_HOST@EXAMPLE.COM".  The kerberos principal name
-      that should be used to run the HMaster process.  The principal name should
-      be in the form: user/hostname@DOMAIN.  If "_HOST" is used as the hostname
-      portion, it will be replaced with the actual hostname of the running
-      instance.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.keytab.file</name>
-    <value></value>
-    <description>Full path to the kerberos keytab file to use for logging in
-      the configured HRegionServer server principal.
-    </description>
-  </property>
-  <property>
-    <name>hbase.regionserver.kerberos.principal</name>
-    <value></value>
-    <description>Ex. "hbase/_HOST@EXAMPLE.COM".  The kerberos principal name
-      that should be used to run the HRegionServer process.  The principal name
-      should be in the form: user/hostname@DOMAIN.  If "_HOST" is used as the
-      hostname portion, it will be replaced with the actual hostname of the
-      running instance.  An entry for this principal must exist in the file
-      specified in hbase.regionserver.keytab.file
-    </description>
-  </property>
-
-  <!-- Additional configuration specific to HBase security -->
-  <property>
-    <name>hadoop.policy.file</name>
-    <value>hbase-policy.xml</value>
-    <description>The policy configuration file used by RPC servers to make
-      authorization decisions on client requests.  Only used when HBase
-      security is enabled.
-    </description>
-  </property>
-  <property>
-    <name>hbase.superuser</name>
-    <value></value>
-    <description>List of users or groups (comma-separated), who are allowed
-      full privileges, regardless of stored ACLs, across the cluster.
-      Only used when HBase security is enabled.
-    </description>
-  </property>
-  <property>
-    <name>hbase.auth.key.update.interval</name>
-    <value>86400000</value>
-    <description>The update interval for master key for authentication tokens
-      in servers in milliseconds.  Only used when HBase security is enabled.
-    </description>
-  </property>
-  <property>
-    <name>hbase.auth.token.max.lifetime</name>
-    <value>604800000</value>
-    <description>The maximum lifetime in milliseconds after which an
-      authentication token expires.  Only used when HBase security is enabled.
-    </description>
-  </property>
-
-  <property>
-    <name>zookeeper.session.timeout</name>
-    <value>180000</value>
-    <description>ZooKeeper session timeout.
-      HBase passes this to the zk quorum as suggested maximum time for a
-      session (This setting becomes zookeeper's 'maxSessionTimeout').  See
-      http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkSessions
-      "The client sends a requested timeout, the server responds with the
-      timeout that it can give the client. " In milliseconds.
-    </description>
-  </property>
-  <property>
-    <name>zookeeper.znode.parent</name>
-    <value>/hbase</value>
-    <description>Root ZNode for HBase in ZooKeeper. All of HBase's ZooKeeper
-      files that are configured with a relative path will go under this node.
-      By default, all of HBase's ZooKeeper file path are configured with a
-      relative path, so they will all go under this directory unless changed.
-    </description>
-  </property>
-  <property>
-    <name>zookeeper.znode.rootserver</name>
-    <value>root-region-server</value>
-    <description>Path to ZNode holding root region location. This is written by
-      the master and read by clients and region servers. If a relative path is
-      given, the parent folder will be ${zookeeper.znode.parent}. By default,
-      this means the root location is stored at /hbase/root-region-server.
-    </description>
-  </property>
-
-  <property>
-    <name>zookeeper.znode.acl.parent</name>
-    <value>acl</value>
-    <description>Root ZNode for access control lists.</description>
-  </property>
-
-  <property>
-    <name>hbase.coprocessor.region.classes</name>
-    <value></value>
-    <description>A comma-separated list of Coprocessors that are loaded by
-      default on all tables. For any override coprocessor method, these classes
-      will be called in order. After implementing your own Coprocessor, just put
-      it in HBase's classpath and add the fully qualified class name here.
-      A coprocessor can also be loaded on demand by setting HTableDescriptor.
-    </description>
-  </property>
-
-  <property>
-    <name>hbase.coprocessor.master.classes</name>
-    <value></value>
-    <description>A comma-separated list of
-      org.apache.hadoop.hbase.coprocessor.MasterObserver coprocessors that are
-      loaded by default on the active HMaster process. For any implemented
-      coprocessor methods, the listed classes will be called in order. After
-      implementing your own MasterObserver, just put it in HBase's classpath
-      and add the fully qualified class name here.
-    </description>
-  </property>
-
-  <!--
-  The following three properties are used together to create the list of
-  host:peer_port:leader_port quorum servers for ZooKeeper.
-  -->
-  <property>
-    <name>hbase.zookeeper.quorum</name>
-    <value>localhost</value>
-    <description>Comma separated list of servers in the ZooKeeper Quorum.
-      For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
-      By default this is set to localhost for local and pseudo-distributed modes
-      of operation. For a fully-distributed setup, this should be set to a full
-      list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh
-      this is the list of servers which we will start/stop ZooKeeper on.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.peerport</name>
-    <value>2888</value>
-    <description>Port used by ZooKeeper peers to talk to each other.
-      See http://hadoop.apache.org/zookeeper/docs/r3.1.1/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
-      for more information.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.leaderport</name>
-    <value>3888</value>
-    <description>Port used by ZooKeeper for leader election.
-      See http://hadoop.apache.org/zookeeper/docs/r3.1.1/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
-      for more information.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.useMulti</name>
-    <value>true</value>
-    <description>Instructs HBase to make use of ZooKeeper's multi-update functionality.
-      This allows certain ZooKeeper operations to complete more quickly and prevents some issues
-      with rare ZooKeeper failure scenarios (see the release note of HBASE-6710 for an example).
-      IMPORTANT: only set this to true if all ZooKeeper servers in the cluster are on version 3.4+
-      and will not be downgraded.  ZooKeeper versions before 3.4 do not support multi-update and will
-      not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495).
-      NOTE: this and future versions of HBase are only supported to work with
-      versions of ZooKeeper with multi support (CDH4+), so it is safe to use ZK.multi.
-    </description>
-  </property>
-  <!-- End of properties used to generate ZooKeeper host:port quorum list. -->
-
-  <!--
-  Beginning of properties that are directly mapped from ZooKeeper's zoo.cfg.
-  All properties with an "hbase.zookeeper.property." prefix are converted for
-  ZooKeeper's configuration. Hence, if you want to add an option from zoo.cfg,
-  e.g.  "initLimit=10" you would append the following to your configuration:
-    <property>
-      <name>hbase.zookeeper.property.initLimit</name>
-      <value>10</value>
-    </property>
-  -->
-  <property>
-    <name>hbase.zookeeper.property.initLimit</name>
-    <value>10</value>
-    <description>Property from ZooKeeper's config zoo.cfg.
-      The number of ticks that the initial synchronization phase can take.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.property.syncLimit</name>
-    <value>5</value>
-    <description>Property from ZooKeeper's config zoo.cfg.
-      The number of ticks that can pass between sending a request and getting an
-      acknowledgment.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.property.dataDir</name>
-    <value>${hbase.tmp.dir}/zookeeper</value>
-    <description>Property from ZooKeeper's config zoo.cfg.
-      The directory where the snapshot is stored.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.property.clientPort</name>
-    <value>2181</value>
-    <description>Property from ZooKeeper's config zoo.cfg.
-      The port at which the clients will connect.
-    </description>
-  </property>
-  <property>
-    <name>hbase.zookeeper.property.maxClientCnxns</name>
-    <value>300</value>
-    <description>Property from ZooKeeper's config zoo.cfg.
-      Limit on number of concurrent connections (at the socket level) that a
-      single client, identified by IP address, may make to a single member of
-      the ZooKeeper ensemble. Set high to avoid zk connection issues running
-      standalone and pseudo-distributed.
-    </description>
-  </property>
-  <!-- End of properties that are directly mapped from ZooKeeper's zoo.cfg -->
-  <property>
-    <name>hbase.rest.port</name>
-    <value>8080</value>
-    <description>The port for the HBase REST server.</description>
-  </property>
-  <property>
-    <name>hbase.rest.readonly</name>
-    <value>false</value>
-    <description>
-      Defines the mode the REST server will be started in. Possible values are:
-      false: All HTTP methods are permitted - GET/PUT/POST/DELETE.
-      true: Only the GET method is permitted.
-    </description>
-  </property>
-
-  <property skipInDoc="true">
-    <name>hbase.defaults.for.version</name>
-    <value>0.94.2-cdh4.2.1</value>
-    <description>
-      This defaults file was compiled for version 0.94.2-cdh4.2.1. This variable is used
-      to make sure that a user doesn't have an old version of hbase-default.xml on the
-      classpath.
-    </description>
-  </property>
-  <property>
-    <name>hbase.defaults.for.version.skip</name>
-    <value>true</value>
-    <description>
-      Set to true to skip the 'hbase.defaults.for.version' check.
-      Setting this to true can be useful in contexts other than
-      the other side of a maven generation; i.e. running in an
-      ide.  You'll want to set this boolean to true to avoid
-      seeing the RuntimException complaint: "hbase-default.xml file
-      seems to be for and old version of HBase (0.94.2-cdh4.2.1), this
-      version is X.X.X-SNAPSHOT"
-    </description>
-  </property>
-  <property>
-    <name>hbase.coprocessor.abortonerror</name>
-    <value>false</value>
-    <description>
-      Set to true to cause the hosting server (master or regionserver) to
-      abort if a coprocessor throws a Throwable object that is not IOException or
-      a subclass of IOException. Setting it to true might be useful in development
-      environments where one wants to terminate the server as soon as possible to
-      simplify coprocessor failure analysis.
-    </description>
-  </property>
-  <property>
-    <name>hbase.online.schema.update.enable</name>
-    <value>false</value>
-    <description>
-      Set true to enable online schema changes.  This is an experimental feature.
-      There are known issues modifying table schemas at the same time a region
-      split is happening so your table needs to be quiescent or else you have to
-      be running with splits disabled.
-    </description>
-  </property>
-  <property>
-    <name>dfs.support.append</name>
-    <value>true</value>
-    <description>Does HDFS allow appends to files?
-      This is an hdfs config. set in here so the hdfs client will do append support.
-      You must ensure that this config. is true serverside too when running hbase
-      (You will have to restart your cluster after setting it).
-    </description>
-  </property>
-  <property>
-    <name>hbase.thrift.minWorkerThreads</name>
-    <value>16</value>
-    <description>
-      The "core size" of the thread pool. New threads are created on every
-      connection until this many threads are created.
-    </description>
-  </property>
-  <property>
-    <name>hbase.thrift.maxWorkerThreads</name>
-    <value>1000</value>
-    <description>
-      The maximum size of the thread pool. When the pending request queue
-      overflows, new threads are created until their number reaches this number.
-      After that, the server starts dropping connections.
-    </description>
-  </property>
-  <property>
-    <name>hbase.thrift.maxQueuedRequests</name>
-    <value>1000</value>
-    <description>
-      The maximum number of pending Thrift connections waiting in the queue. If
-      there are no idle threads in the pool, the server queues requests. Only
-      when the queue overflows, new threads are added, up to
-      hbase.thrift.maxQueuedRequests threads.
-    </description>
-  </property>
-  <property>
-    <name>hbase.offheapcache.percentage</name>
-    <value>0</value>
-    <description>
-      The amount of off heap space to be allocated towards the experimental
-      off heap cache. If you desire the cache to be disabled, simply set this
-      value to 0.
-    </description>
-  </property>
-  <property>
-    <name>hbase.data.umask.enable</name>
-    <value>false</value>
-    <description>Enable, if true, that file permissions should be assigned
-      to the files written by the regionserver
-    </description>
-  </property>
-  <property>
-    <name>hbase.data.umask</name>
-    <value>000</value>
-    <description>File permissions that should be used to write data
-      files when hbase.data.umask.enable is true
-    </description>
-  </property>
-
-  <property>
-    <name>hbase.metrics.showTableName</name>
-    <value>true</value>
-    <description>Whether to include the prefix "tbl.tablename" in per-column family metrics.
-      If true, for each metric M, per-cf metrics will be reported for tbl.T.cf.CF.M, if false,
-      per-cf metrics will be aggregated by column-family across tables, and reported for cf.CF.M.
-      In both cases, the aggregated metric M across tables and cfs will be reported.
-    </description>
-  </property>
-  <property>
-    <name>hbase.table.archive.directory</name>
-    <value>.archive</value>
-    <description>Per-table directory name under which to backup files for a
-      table. Files are moved to the same directories as they would be under the
-      table directory, but instead are just one level lower (under
-      table/.archive/... rather than table/...). Currently only applies to HFiles.</description>
-  </property>
-  <property>
-    <name>hbase.master.hfilecleaner.plugins</name>
-    <value>org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner</value>
-    <description>A comma-separated list of HFileCleanerDelegate invoked by
-      the HFileCleaner service. These HFiles cleaners are called in order,
-      so put the cleaner that prunes the most files in front. To
-      implement your own HFileCleanerDelegate, just put it in HBase's classpath
-      and add the fully qualified class name here. Always add the above
-      default log cleaners in the list as they will be overwritten in hbase-site.xml.
-    </description>
-  </property>
-  <property>
-    <name>hbase.rest.threads.max</name>
-    <value>100</value>
-    <description>
-      The maximum number of threads of the REST server thread pool.
-      Threads in the pool are reused to process REST requests. This
-      controls the maximum number of requests processed concurrently.
-      It may help to control the memory used by the REST server to
-      avoid OOM issues. If the thread pool is full, incoming requests
-      will be queued up and wait for some free threads. The default
-      is 100.
-    </description>
-  </property>
-  <property>
-    <name>hbase.rest.threads.min</name>
-    <value>2</value>
-    <description>
-      The minimum number of threads of the REST server thread pool.
-      The thread pool always has at least these number of threads so
-      the REST server is ready to serve incoming requests. The default
-      is 2.
-    </description>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-hbase/src/test/java/org/apache/eagle/service/hbase/TestHBaseBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-hbase/src/test/java/org/apache/eagle/service/hbase/TestHBaseBase.java b/eagle-core/eagle-embed/eagle-embed-hbase/src/test/java/org/apache/eagle/service/hbase/TestHBaseBase.java
deleted file mode 100644
index 87fffcd..0000000
--- a/eagle-core/eagle-embed/eagle-embed-hbase/src/test/java/org/apache/eagle/service/hbase/TestHBaseBase.java
+++ /dev/null
@@ -1,35 +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.service.hbase;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class TestHBaseBase {
-    protected static EmbeddedHbase hbase;
-
-    @BeforeClass
-    public static void setUpHBase() {
-        hbase = EmbeddedHbase.getInstance();
-    }
-
-    @Test
-    public void test() {
-
-    }
-
-}
\ No newline at end of file


[19/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MapSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MapSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MapSerDeser.java
deleted file mode 100755
index d16fe3a..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MapSerDeser.java
+++ /dev/null
@@ -1,168 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * Serialization/deserialization for map type
- *
- */
-@SuppressWarnings("rawtypes")
-public class MapSerDeser implements EntitySerDeser<Map> {
-
-	@SuppressWarnings({ "unchecked" })
-	@Override
-	public Map deserialize(byte[] bytes) {
-		if (bytes == null || bytes.length == 0) {
-			return null;
-		}
-		final Map map = new TreeMap();
-		int offset = 0;
-		// get size of int array
-		final int size = ByteUtil.bytesToInt(bytes, offset);
-		offset += 4;
-		
-		for (int i = 0; i < size; ++i) {
-			final int keyID = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final Class<?> keyClass = EntityDefinitionManager.getClassByID(keyID);
-			if (keyClass == null) {
-				throw new IllegalArgumentException("Unsupported key type ID: " + keyID);
-			}
-			final EntitySerDeser keySerDer = EntityDefinitionManager.getSerDeser(keyClass);
-			final int keyLength = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final byte[] keyContent = new byte[keyLength];
-			System.arraycopy(bytes, offset, keyContent, 0, keyLength);
-			offset += keyLength;
-			final Object key = keySerDer.deserialize(keyContent);
-			
-			final int valueID = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final Class<?> valueClass = EntityDefinitionManager.getClassByID(valueID);
-			if (valueClass == null) {
-				throw new IllegalArgumentException("Unsupported value type ID: " + valueID);
-			}
-			final EntitySerDeser valueSerDer = EntityDefinitionManager.getSerDeser(valueClass);
-			final int valueLength = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final byte[] valueContent = new byte[valueLength];
-			System.arraycopy(bytes, offset, valueContent, 0, valueLength);
-			offset += valueLength;
-			final Object value = valueSerDer.deserialize(valueContent);
-			
-			map.put(key, value);
-		}
-		return map;
-	}
-
-	/**
-	 *  size + key1 type ID + key1 length + key1 binary content + value1 type id + value length + value1 binary content + ...
-	 *   4B        4B             4B             key1 bytes            4B              4B              value1 bytes
-	 */
-	@SuppressWarnings({ "unchecked" })
-	@Override
-	public byte[] serialize(Map map) {
-		if(map == null)
-			return null;
-		final int size = map.size();
-		final int[] keyIDs = new int[size];
-		final int[] valueIDs = new int[size];
-		final byte[][] keyBytes = new byte[size][];
-		final byte[][] valueBytes = new byte[size][];
-		
-		int totalSize = 4 + size * 16;
-		int i = 0;
-		Iterator iter = map.entrySet().iterator();
-		while (iter.hasNext()) {
-			final Map.Entry entry = (Map.Entry)iter.next();
-			final Object key = entry.getKey();
-			final Object value = entry.getValue();
-			Class<?> keyClass = key.getClass();
-			Class<?> valueClass = NullObject.class;
-			if (value != null) {
-				valueClass = value.getClass();
-			}
-			int keyTypeID = EntityDefinitionManager.getIDBySerDerClass(keyClass);
-			int valueTypeID = 0; // default null object
-			if (valueClass != null) {
-				valueTypeID = EntityDefinitionManager.getIDBySerDerClass(valueClass);
-			}
-			if (keyTypeID == -1) {
-				if (key instanceof Map) {
-					keyClass = Map.class;
-					keyTypeID = EntityDefinitionManager.getIDBySerDerClass(keyClass);
-				} else {
-					throw new IllegalArgumentException("Unsupported class: " + keyClass.getName());
-				}
-			}
-			if (valueTypeID == -1) {
-				if (value instanceof Map) {
-					valueClass = Map.class;
-					valueTypeID = EntityDefinitionManager.getIDBySerDerClass(valueClass);
-				} else {
-					throw new IllegalArgumentException("Unsupported class: " + valueClass.getName());
-				}
-			}
-			keyIDs[i] = keyTypeID;
-			valueIDs[i] = valueTypeID;
-			final EntitySerDeser keySerDer = EntityDefinitionManager.getSerDeser(keyClass);
-			final EntitySerDeser valueSerDer = EntityDefinitionManager.getSerDeser(valueClass);
-			if (keySerDer == null) {
-				throw new IllegalArgumentException("Unsupported class: " + keyClass.getName());
-			}
-			if (valueSerDer == null) {
-				throw new IllegalArgumentException("Unsupported class: " + valueClass.getName());
-			}
-			keyBytes[i] = keySerDer.serialize(key);
-			valueBytes[i] = valueSerDer.serialize(value);
-			totalSize += keyBytes[i].length + valueBytes[i].length;
-			++i;
-		}
-		final byte[] result = new byte[totalSize];
-		int offset = 0;
-		ByteUtil.intToBytes(size, result, offset);
-		offset += 4;
-		for (i = 0; i < size; ++i) {
-			ByteUtil.intToBytes(keyIDs[i], result, offset);
-			offset += 4;
-			ByteUtil.intToBytes(keyBytes[i].length, result, offset);
-			offset += 4;
-			System.arraycopy(keyBytes[i], 0, result, offset, keyBytes[i].length);
-			offset += keyBytes[i].length;
-			
-			ByteUtil.intToBytes(valueIDs[i], result, offset);
-			offset += 4;
-			ByteUtil.intToBytes(valueBytes[i].length, result, offset);
-			offset += 4;
-			System.arraycopy(valueBytes[i], 0, result, offset, valueBytes[i].length);
-			offset += valueBytes[i].length;
-		}
-		return result;
-	}
-
-	@Override
-	public Class<Map> type() {
-		return Map.class;
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Metric.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Metric.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Metric.java
deleted file mode 100644
index 0e3e776..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Metric.java
+++ /dev/null
@@ -1,29 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Metric {
-	// interval with million seconds
-	long interval() default 60000;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MetricDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MetricDefinition.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MetricDefinition.java
deleted file mode 100755
index 06bbed3..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/MetricDefinition.java
+++ /dev/null
@@ -1,68 +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.log.entity.meta;
-
-import org.apache.hadoop.io.Writable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-public class MetricDefinition implements Writable {
-	private final static Logger LOG = LoggerFactory.getLogger(MetricDefinition.class);
-	private long interval;
-	private Class<?> singleTimestampEntityClass;
-	public long getInterval() {
-		return interval;
-	}
-	public void setInterval(long interval) {
-		this.interval = interval;
-	}
-	public Class<?> getSingleTimestampEntityClass() {
-		return singleTimestampEntityClass;
-	}
-	public void setSingleTimestampEntityClass(Class<?> singleTimestampEntityClass) {
-		this.singleTimestampEntityClass = singleTimestampEntityClass;
-	}
-
-	private final static String EMPTY="";
-	@Override
-	public void write(DataOutput out) throws IOException {
-		if(LOG.isDebugEnabled()) LOG.debug("Writing metric definition: interval = "+interval+" singleTimestampEntityClass = "+ this.singleTimestampEntityClass);
-		out.writeLong(interval);
-		if(this.singleTimestampEntityClass == null){
-			out.writeUTF(EMPTY);
-		}else {
-			out.writeUTF(this.singleTimestampEntityClass.getName());
-		}
-	}
-
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		interval = in.readLong();
-		String singleTimestampEntityClassName = in.readUTF();
-		if(!EMPTY.equals(singleTimestampEntityClassName)) {
-			try {
-				this.singleTimestampEntityClass = Class.forName(singleTimestampEntityClassName);
-			} catch (ClassNotFoundException e) {
-				if(LOG.isDebugEnabled()) LOG.warn("Class " + singleTimestampEntityClassName + " not found ");
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndex.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndex.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndex.java
deleted file mode 100755
index 9fb05a3..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndex.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface NonUniqueIndex {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndexes.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndexes.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndexes.java
deleted file mode 100755
index ff11397..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NonUniqueIndexes.java
+++ /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.
- */
-package org.apache.eagle.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface NonUniqueIndexes {
-	
-	public NonUniqueIndex[] value();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullObject.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullObject.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullObject.java
deleted file mode 100644
index 1b99fcd..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullObject.java
+++ /dev/null
@@ -1,21 +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.log.entity.meta;
-
-public class NullObject {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullSerDeser.java
deleted file mode 100755
index 1778788..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/NullSerDeser.java
+++ /dev/null
@@ -1,37 +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.log.entity.meta;
-
-public class NullSerDeser implements EntitySerDeser<NullObject>{
-
-	private static final byte[] EMPTY_NULL_ARRAY = new byte[0];
-	
-	@Override
-	public NullObject deserialize(byte[] bytes) {
-		return null;
-	}
-
-	@Override
-	public byte[] serialize(NullObject t) {
-		return EMPTY_NULL_ARRAY;
-	}
-
-	@Override
-	public Class<NullObject> type() {
-		return NullObject.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Partition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Partition.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Partition.java
deleted file mode 100644
index cb60016..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Partition.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Partition annotation will impact the rowkey generation for Eagle entities. Once an entity class 
- * has defined the partition fields for an Eagle entity, the hash codes of the defined partition 
- * fields will be placed just after prefix field, and before timestamp field.
- * 
- *
- */
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Partition
-{
-    /**
-     * Order in which annotated tags are to be regarded as data partitions.
-     */
-    public String[] value() default { };
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Prefix.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Prefix.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Prefix.java
deleted file mode 100644
index 36f404c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Prefix.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Prefix {
-	String value() default "";
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Qualifier.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Qualifier.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Qualifier.java
deleted file mode 100755
index a8fc8d2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Qualifier.java
+++ /dev/null
@@ -1,100 +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.log.entity.meta;
-
-import org.apache.hadoop.io.Writable;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class Qualifier implements Writable{
-	private final static Logger LOG = LoggerFactory.getLogger(Qualifier.class);
-
-	private String displayName;
-	private String qualifierName;
-	private EntitySerDeser<Object> serDeser;
-	@JsonIgnore
-	public EntitySerDeser<Object> getSerDeser() {
-		return serDeser;
-	}
-	public void setSerDeser(EntitySerDeser<Object> serDeser) {
-		this.serDeser = serDeser;
-	}
-	public String getDisplayName() {
-		return displayName;
-	}
-	public void setDisplayName(String displayName) {
-		this.displayName = displayName;
-	}
-	public String getQualifierName() {
-		return qualifierName;
-	}
-	public void setQualifierName(String qualifierName) {
-		this.qualifierName = qualifierName;
-	}
-	
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		sb.append("displayName:");
-		sb.append(displayName);
-		sb.append(",");
-		sb.append("qualifierName:");
-		sb.append(qualifierName);
-		sb.append(",");
-		sb.append("serDeser class:");
-		sb.append(serDeser.getClass().getName());
-		return sb.toString();
-	}
-
-	@Override
-	public void write(DataOutput out) throws IOException {
-		out.writeUTF(displayName);
-		out.writeUTF(qualifierName);
-		out.writeUTF(serDeser.getClass().getName());
-	}
-
-	private final static Map<String, EntitySerDeser> _entitySerDeserCache = new HashMap<String,EntitySerDeser>();
-
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		displayName = in.readUTF();
-		qualifierName = in.readUTF();
-		String serDeserClassName = in.readUTF();
-
-		EntitySerDeser _cached = _entitySerDeserCache.get(serDeserClassName);
-		if(_cached != null){
-			this.serDeser = _cached;
-		}else {
-			try {
-				if (LOG.isDebugEnabled()) LOG.debug("Creating new instance for " + serDeserClassName);
-				Class serDeserClass = Class.forName(serDeserClassName);
-				this.serDeser = (EntitySerDeser) serDeserClass.newInstance();
-				_entitySerDeserCache.put(serDeserClassName, this.serDeser);
-			} catch (Exception e) {
-				if (LOG.isDebugEnabled()) {
-					LOG.warn("Class not found for " + serDeserClassName + ": " + e.getMessage(), e);
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Service.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Service.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Service.java
deleted file mode 100644
index 22d70ed..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Service.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Service {
-	String value() default "";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ServicePath.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ServicePath.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ServicePath.java
deleted file mode 100644
index 8c712d0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ServicePath.java
+++ /dev/null
@@ -1,34 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * This class is for service client for generic entity creation API (entities and metrics)
- *
- */
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ServicePath {
-
-    public String path() default "";
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringArraySerDeser.java
deleted file mode 100755
index 635065b..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringArraySerDeser.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.meta;
-
-import java.io.UnsupportedEncodingException;
-
-import org.apache.eagle.common.ByteUtil;
-
-/**
- * String array entity serializer and deserializer
- *
- */
-public class StringArraySerDeser implements EntitySerDeser<String[]> {
-
-	public static final int MAX_STRING_LENGTH = 65535;
-	public static final String UTF_8 = "UTF-8";
-	
-	@Override
-	public String[] deserialize(byte[] bytes) {
-		if(bytes == null || bytes.length < 4)
-			return null;
-		int offset = 0;
-		// get size of int array
-		final int size = ByteUtil.bytesToInt(bytes, offset);
-		offset += 4;
-		final String[] strings = new String[size];
-		try {
-			for(int i = 0; i < size; i++) {
-				final int len = ByteUtil.bytesToInt(bytes, offset);
-				offset += 4;
-				strings[i] = new String(bytes, offset, len, UTF_8);
-				offset += len;
-			}
-		} catch (UnsupportedEncodingException e) {
-			throw new IllegalArgumentException("Invalid byte array");
-		}
-		return strings;
-	}
-	
-	/**
-	 *  size + str1 length + str1 + str2 length + str2 + ...
-	 *   4B        4B         n1B        4B        n2B
-	 *  
-	 * @param obj
-	 * @return
-	 */
-	@Override
-	public byte[] serialize(String[] array) {
-		if(array == null)
-			return null;
-		final int size = array.length;
-		final byte[][] tmp = new byte[size][];
-		int total = 4 + 4 * size;
-		for (int i = 0; i < size; ++i) {
-			try {
-				tmp[i] = array[i].getBytes(UTF_8);
-			} catch (UnsupportedEncodingException e) {
-				throw new IllegalArgumentException("String doesn't support UTF-8 encoding: " + array[i]);
-			}
-			total += tmp[i].length;
-		}
-		final byte[] result = new byte[total];
-		int offset = 0;
-		ByteUtil.intToBytes(size, result, offset);
-		offset += 4;
-		for (int i = 0; i < size; ++i) {
-			ByteUtil.intToBytes(tmp[i].length, result, offset);
-			offset += 4;
-			System.arraycopy(tmp[i], 0, result, offset, tmp[i].length);
-			offset += tmp[i].length;
-		}
-		return result;
-	}
-
-	@Override
-	public Class<String[]> type() {
-		return String[].class;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringSerDeser.java
deleted file mode 100755
index eef6e4f..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/StringSerDeser.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.meta;
-
-public class StringSerDeser implements EntitySerDeser<String> {
-
-	public StringSerDeser(){}
-
-	@Override
-	public String deserialize(byte[] bytes){
-		return new String(bytes);
-	}
-	
-	@Override
-	public byte[] serialize(String obj){
-		if(obj == null)
-			return null;
-		return obj.getBytes();
-	}
-
-	@Override
-	public Class<String> type() {
-		return String.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Table.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Table.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Table.java
deleted file mode 100644
index ac722cd..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Table.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Table {
-	String value() default "";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Tags.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Tags.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Tags.java
deleted file mode 100644
index ac9b328..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Tags.java
+++ /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.
- */
-package org.apache.eagle.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * specify list of tag names which are used by embracing hbase table
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Tags {
-	String[] value() default {""};
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/TimeSeries.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/TimeSeries.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/TimeSeries.java
deleted file mode 100644
index 01023bc..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/TimeSeries.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TimeSeries {
-	boolean value() default true;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericByRowkeyReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericByRowkeyReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericByRowkeyReader.java
deleted file mode 100644
index 43a7073..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericByRowkeyReader.java
+++ /dev/null
@@ -1,78 +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.log.entity.old;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogObjectMapper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-public class GenericByRowkeyReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericByRowkeyReader.class);
-
-	private TaggedLogObjectMapper mapper;
-	private String table;
-	private String columnFamily;
-	private boolean outputAll;
-	private List<String> outputColumns;
-	private GenericReader.EntityFactory entityFactory;
-	
-	public GenericByRowkeyReader(TaggedLogObjectMapper mapper, GenericReader.EntityFactory entityFactory, String table, String columnFamily, boolean outputAll, List<String> outputColumns){
-		this.mapper = mapper;
-		this.entityFactory = entityFactory;
-		this.table = table;
-		this.columnFamily = columnFamily;
-		this.outputAll = outputAll;
-		this.outputColumns = outputColumns;
-	}
-	
-	public List<TaggedLogAPIEntity> read(List<String> rowkeys) throws IOException{
-		HBaseLogByRowkeyReader reader = new HBaseLogByRowkeyReader(this.table, this.columnFamily, 
-				outputAll, outputColumns);
-		List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-		try{
-			reader.open();
-			for(String rowkeyString : rowkeys){
-				byte[] rowkey = EagleBase64Wrapper.decode(rowkeyString);
-				InternalLog log = reader.get(rowkey);
-				TaggedLogAPIEntity entity = entityFactory.create();
-				entities.add(entity);
-				entity.setTags(log.getTags());
-				entity.setTimestamp(log.getTimestamp());
-				entity.setEncodedRowkey(log.getEncodedRowkey());
-				entity.setPrefix(log.getPrefix());
-				Map<String, byte[]> qualifierValues = log.getQualifierValues();
-				mapper.populateQualifierValues(entity, qualifierValues);
-			}
-		}catch(IOException ex){
-			LOG.error("Fail read by rowkey", ex);
-			throw ex;
-		}finally{
-			reader.close();
-		}
-		
-		return entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericDeleter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericDeleter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericDeleter.java
deleted file mode 100755
index e97b522..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericDeleter.java
+++ /dev/null
@@ -1,135 +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.log.entity.old;
-
-import java.io.IOException;
-import java.util.*;
-
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.InternalLog;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-
-public class GenericDeleter {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericDeleter.class);
-
-	private final HBaseLogDeleter deleter;
-	private final HBaseLogByRowkeyReader reader;
-	
-	
-	public GenericDeleter(EntityDefinition ed) {
-		this(ed.getTable(), ed.getColumnFamily());
-	}
-	
-	public GenericDeleter(String table, String columnFamily) {
-		this.deleter = new HBaseLogDeleter(table, columnFamily);
-		this.reader = new HBaseLogByRowkeyReader(table, columnFamily, true, null);
-	}
-
-    public void deleteByRowkeys(List<byte[]> rowkeys) throws Exception {
-        try {
-            deleter.open();
-            deleter.deleteRowkeys(rowkeys);
-        } catch (IOException e) {
-            LOG.error(e.getMessage(), e);
-            throw e;
-        }
-    }
-
-    public void deleteByEncodedRowkeys(List<String> encodedRowkeys) throws Exception {
-        try {
-            deleter.open();
-            deleter.deleteRowByRowkey(encodedRowkeys);
-        } catch (IOException e) {
-            LOG.error(e.getMessage(), e);
-            throw e;
-        }
-    }
-	
-	public List<String> delete(List<? extends TaggedLogAPIEntity> entities) throws Exception{
-        List<String> encodedRowkey = new LinkedList<String>();
-		try{
-			deleter.open();
-			final Map<Class<? extends TaggedLogAPIEntity>, List<TaggedLogAPIEntity>> entityClassMap = classifyEntities(entities);
-			for (Map.Entry<Class<? extends TaggedLogAPIEntity>, List<TaggedLogAPIEntity>> entry : entityClassMap.entrySet()) {
-				final Class<? extends TaggedLogAPIEntity> clazz = entry.getKey();
-				final List<? extends TaggedLogAPIEntity> entityList = entry.getValue();
-
-				final EntityDefinition entityDef = EntityDefinitionManager.getEntityDefinitionByEntityClass(clazz);
-				// TODO: we should fix this hardcoded prefix hack
-				fixPrefixAndTimestampIssue(entityList, entityDef);
-
-				final List<byte[]> rowkeys = RowkeyHelper.getRowkeysByEntities(entityList, entityDef);
-				// Check index
-				final IndexDefinition[] indexes = entityDef.getIndexes();
-				if (indexes != null && indexes.length > 0) {
-					reader.open();
-					final List<InternalLog> logs = reader.get(rowkeys);
-					final List<TaggedLogAPIEntity> newEntities = HBaseInternalLogHelper.buildEntities(logs, entityDef);
-					for (TaggedLogAPIEntity entity : newEntities) {
-						// Add index rowkeys
-						for (IndexDefinition index : indexes) {
-							final byte[] indexRowkey = index.generateIndexRowkey(entity);
-							rowkeys.add(indexRowkey);
-						}
-					}
-				}
-                for(byte[] rowkey:rowkeys) {
-                    encodedRowkey.add(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-                }
-				deleter.deleteRowkeys(rowkeys);
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail writing tagged log", ioe);
-			throw ioe;
-		}finally{
-			deleter.close();
-	 	}
-        return encodedRowkey;
-	}
-
-	private void fixPrefixAndTimestampIssue(List<? extends TaggedLogAPIEntity> entities, EntityDefinition entityDef) {
-		for (TaggedLogAPIEntity e : entities) {
-			e.setPrefix(entityDef.getPrefix());
-			if (!entityDef.isTimeSeries()) {
-				e.setTimestamp(EntityConstants.FIXED_WRITE_TIMESTAMP); // set timestamp to MAX, then actually stored 0
-			}
-		}
-	}
-
-	private Map<Class<? extends TaggedLogAPIEntity>, List<TaggedLogAPIEntity>> classifyEntities(List<? extends TaggedLogAPIEntity> entities) {
-		final Map<Class<? extends TaggedLogAPIEntity>, List<TaggedLogAPIEntity>> result = new 
-				HashMap<Class<? extends TaggedLogAPIEntity>, List<TaggedLogAPIEntity>>();
-		for (TaggedLogAPIEntity entity : entities) {
-			final Class<? extends TaggedLogAPIEntity> clazz = entity.getClass();
-			List<TaggedLogAPIEntity> list = result.get(clazz);
-			if (list == null) {
-				list = new ArrayList<TaggedLogAPIEntity>();
-				result.put(clazz, list);
-			}
-			list.add(entity);
-		}
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericReader.java
deleted file mode 100644
index 76e314b..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericReader.java
+++ /dev/null
@@ -1,115 +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.log.entity.old;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogObjectMapper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.common.DateTimeUtil;
-
-public class GenericReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericReader.class);
-
-	public interface EntityFactory{
-		public TaggedLogAPIEntity create();
-	}
-	
-	private Schema schema;
-	private EntityFactory entityFactory;
-	private TaggedLogObjectMapper mapper;
-	
-	public GenericReader(TaggedLogObjectMapper mapper, Schema schema, EntityFactory factory){
-		this.mapper = mapper;
-		this.schema = schema;
-		this.entityFactory = factory;
-	}
-	
-	public List<TaggedLogAPIEntity> read(String startTime, 
-			String endTime, List<String> tagNameValues, List<String> outputTags, 
-			List<String> outputFields, String startRowkey, int pageSize) throws Exception{
-		Date start = DateTimeUtil.humanDateToDate(startTime);
-		Date end = DateTimeUtil.humanDateToDate(endTime);
-		
-		// decode the query parameters
-		// TODO should support one tag has multiple tag values
-		Map<String, List<String>> searchTags = new HashMap<String, List<String>>();
-		for(String tagNameValue : tagNameValues){
-			String[] tmp = tagNameValue.split("=");
-			if(tmp == null || tmp.length <=1){
-				continue; // silently ignore this parameter
-			}
-			List<String> tagValues = searchTags.get(tmp[0]);
-			if(tagValues == null){
-				tagValues = new ArrayList<String>();
-				searchTags.put(tmp[0], tagValues);
-			}
-			tagValues.add(tmp[1]);
-		}
-		
-		int numTags = outputTags.size();
-		int numFields = outputFields.size();
-		byte[][] outputQualifiers = new byte[numTags+numFields][];
-		int i = 0;
-		for(String tag : outputTags){
-			outputQualifiers[i++] = tag.getBytes();
-		}
-		for(String field : outputFields){
-			outputQualifiers[i++] = field.getBytes();
-		}
-		// shortcut to avoid read when pageSize=0
-		List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-		if(pageSize <= 0){
-			return entities; // return empty entities
-		}
-
-		HBaseLogReader reader = new HBaseLogReader(schema, start, end, searchTags, startRowkey, outputQualifiers);
-		try{
-			reader.open();
-			InternalLog log;
-			int count = 0;
-			while ((log = reader.read()) != null) {
-				TaggedLogAPIEntity entity = entityFactory.create();
-				entity.setTags(log.getTags());
-				entity.setTimestamp(log.getTimestamp());
-				entity.setEncodedRowkey(log.getEncodedRowkey());
-				entity.setPrefix(log.getPrefix());
-				entities.add(entity);
-				
-				Map<String, byte[]> qualifierValues = log.getQualifierValues();
-				mapper.populateQualifierValues(entity, qualifierValues);
-				if(++count == pageSize)
-					break;
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail reading log", ioe);
-			throw ioe;
-		}finally{
-			reader.close();
-		}		
-		return entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericWriter.java
deleted file mode 100644
index 3d29237..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/GenericWriter.java
+++ /dev/null
@@ -1,93 +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.log.entity.old;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogObjectMapper;
-import org.apache.eagle.log.entity.HBaseLogWriter;
-import org.apache.eagle.log.entity.InternalLog;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-public class GenericWriter {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericWriter.class);
-
-	private String table;
-	private String columnFamily;
-	private TaggedLogObjectMapper mapper;
-	
-	public GenericWriter(TaggedLogObjectMapper mapper, String table, String columnFamily){
-		this.mapper = mapper;
-		this.table = table;
-		this.columnFamily = columnFamily;
-	}
-	
-	public List<String> write(List<? extends TaggedLogAPIEntity> entities) throws IOException{
-		HBaseLogWriter writer = new HBaseLogWriter(table, columnFamily);
-		List<String> rowkeys = new ArrayList<String>();
-		
-		try{
-			writer.open();
-			for(TaggedLogAPIEntity entity : entities){
-				InternalLog log = new InternalLog();
-				Map<String, String> inputTags = entity.getTags();
-				Map<String, String> tags = new TreeMap<String, String>();
-				for(Map.Entry<String, String> entry : inputTags.entrySet()){
-					tags.put(entry.getKey(), entry.getValue());
-				}
-				log.setTags(tags);
-				log.setTimestamp(entity.getTimestamp());
-				log.setPrefix(entity.getPrefix());
-				log.setQualifierValues(mapper.createQualifierValues(entity));
-				byte[] rowkey  = writer.write(log);
-				rowkeys.add(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail writing tagged log", ioe);
-			throw ioe;
-		}finally{
-			writer.close();
-	 	}
-		return rowkeys;
-	}
-	
-	public void updateByRowkey(List<? extends TaggedLogAPIEntity> entities) throws IOException{
-		HBaseLogWriter writer = new HBaseLogWriter(table, columnFamily);
-		try{
-			writer.open();
-			for(TaggedLogAPIEntity entity : entities){
-				byte[] rowkey = EagleBase64Wrapper.decode(entity.getEncodedRowkey());
-				InternalLog log = new InternalLog();
-				log.setQualifierValues(mapper.createQualifierValues(entity));
-				writer.updateByRowkey(rowkey, log);
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail writing tagged log", ioe);
-			throw ioe;
-		}finally{
-			writer.close();
-	 	}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogByRowkeyReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogByRowkeyReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogByRowkeyReader.java
deleted file mode 100644
index 37e55ac..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogByRowkeyReader.java
+++ /dev/null
@@ -1,161 +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.log.entity.old;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.NavigableMap;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.NoSuchRowException;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-/**
- * Get details of rowkey and qualifiers given a raw rowkey. This function mostly is used for inspecting one row's content 
- * This only supports single column family, which is mostly used in log application 
- */
-public class HBaseLogByRowkeyReader implements Closeable{
-	private String table;
-	private String columnFamily;
-	private byte[][] outputQualifiers;
-	private boolean includingAllQualifiers;
-	private HTableInterface tbl;
-	private boolean isOpen;
-	
-	/**
-	 * if includingAllQualifiers is true, then the fourth argument outputQualifiers is ignored
-	 * if includingAllQualifiers is false, then need calculate based on the fourth argument outputQualifiers
-	 */
-	public HBaseLogByRowkeyReader(String table, String columnFamily, boolean includingAllQualifiers, List<String> qualifiers){
-		this.table = table;
-		this.columnFamily = columnFamily;
-		if(qualifiers != null){
-			this.outputQualifiers = new byte[qualifiers.size()][];
-			int i = 0;
-			for(String qualifier : qualifiers){
-				this.outputQualifiers[i++] = qualifier.getBytes();
-			}
-		}
-		this.includingAllQualifiers = includingAllQualifiers;
-	}
-	
-	
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(this.table);
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-		
-		isOpen = true;
-	}
-
-	/**
-	 * Here all qualifiers' values goes into qualifierValues of InternalLog as given a row, we can't differentiate it's a tag or a field
-	 * @param rowkeys
-	 * @return
-	 * @throws IOException
-	 */
-	public List<InternalLog> get(List<byte[]> rowkeys) throws IOException, NoSuchRowException {
-		final List<Get> gets = createGets(rowkeys);
-		final Result[] results = tbl.get(gets);
-		final List<InternalLog> logs = new ArrayList<InternalLog>();
-		for (Result result : results) {
-			final InternalLog log = buildLog(result);
-			logs.add(log);
-		}
-		return logs;
-	}
-	
-	private List<Get> createGets(List<byte[]> rowkeys) {
-		final List<Get> gets = new ArrayList<Get>();
-		for (byte[] rowkey : rowkeys) {
-			final Get get = createGet(rowkey);
-			gets.add(get);
-		}
-		return gets;
-	}
-
-
-	private Get createGet(byte[] rowkey) {
-		final Get get = new Get(rowkey);
-		byte[] cf = this.columnFamily.getBytes();
-		if(includingAllQualifiers){
-			get.addFamily(cf);
-		}else{
-			for(byte[] outputQualifier : outputQualifiers){
-				get.addColumn(cf, outputQualifier);
-			}
-		}
-		return get;
-	}
-
-
-	/**
-	 * Here all qualifiers' values goes into qualifierValues of InternalLog as given a row, we can't differentiate it's a tag or a field
-	 * @param rowkey
-	 * @return
-	 * @throws IOException
-	 */
-	public InternalLog get(byte[] rowkey) throws IOException, NoSuchRowException{
-		final Get get = createGet(rowkey);
-		final Result result = tbl.get(get);
-		final InternalLog log = buildLog(result);
-		return log;
-	}
-	
-	private InternalLog buildLog(Result result) {
-		final InternalLog log = new InternalLog();
-		final byte[] rowkey = result.getRow();
-		log.setEncodedRowkey(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-		long timestamp = ByteUtil.bytesToLong(rowkey, 4);
-		timestamp = Long.MAX_VALUE - timestamp;
-		log.setTimestamp(timestamp);
-		Map<String, byte[]> qualifierValues = new HashMap<String, byte[]>();
-		log.setQualifierValues(qualifierValues);
-		NavigableMap<byte[], byte[]> map = result.getFamilyMap(this.columnFamily.getBytes());
-		if(map == null){
-			throw new NoSuchRowException(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-		}
-		for(Map.Entry<byte[], byte[]> entry : map.entrySet()){
-			byte[] qualifier = entry.getKey();
-			byte[] value = entry.getValue();
-			qualifierValues.put(new String(qualifier), value);
-		}
-		return log;
-	}
-
-
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogDeleter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogDeleter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogDeleter.java
deleted file mode 100644
index 3460949..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogDeleter.java
+++ /dev/null
@@ -1,131 +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.log.entity.old;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.hadoop.hbase.client.Delete;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-public class HBaseLogDeleter implements LogDeleter{
-	private HTableInterface tbl;
-	private String table;
-	private String columnFamily;
-	
-	public HBaseLogDeleter(String table, String columnFamily) {
-		this.table = table;
-		this.columnFamily = columnFamily;
-	}
-	
-	@Override
-	public void open() throws IOException {
-		try{
-			tbl = EagleConfigFactory.load().getHTable(this.table);
-		}catch(RuntimeException ex){
-			throw new IOException(ex);
-		}
-	}
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-	
-	@Override
-	public void flush() throws IOException{
-		throw new IllegalArgumentException("Not supported flush for hbase delete");
-	}
-	
-	/**
-	 * support delete by constructing a rowkey or by encoded rowkey passed from client
-	 */
-	@Override
-	public void delete(InternalLog log) throws IOException{
-		final byte[] rowkey = RowkeyHelper.getRowkey(log);
-		final Delete delete = createDelete(rowkey);
-		tbl.delete(delete);
-	}
-	
-	public void delete(TaggedLogAPIEntity entity, EntityDefinition entityDef) throws Exception {
-		final byte[] rowkey = RowkeyHelper.getRowkey(entity, entityDef);
-		final Delete delete = createDelete(rowkey);
-		tbl.delete(delete);
-	}
-	
-	/**
-	 * Batch delete
-	 * @param logs
-	 * @throws IOException
-	 */
-	public void delete(List<InternalLog> logs) throws IOException{
-		final List<byte[]> rowkeys = RowkeyHelper.getRowkeysByLogs(logs);
-		deleteRowkeys(rowkeys);
-	}
-
-
-	/**
-	 * Batch delete
-	 * @throws Exception
-	 */
-	public void deleteEntities(List<? extends TaggedLogAPIEntity> entities, EntityDefinition entityDef) throws Exception{
-		final List<byte[]> rowkeys = RowkeyHelper.getRowkeysByEntities(entities, entityDef);
-		deleteRowkeys(rowkeys);
-	}
-	
-	/**
-	 * Batch delete
-	 * @throws IOException
-	 */
-	public void deleteRowkeys(List<byte[]> rowkeys) throws IOException {
-		final List<Delete> deletes = new ArrayList<Delete>(rowkeys.size());
-		for (byte[] rowkey : rowkeys) {
-			final Delete delete = createDelete(rowkey);
-			deletes.add(delete);
-		}
-		tbl.delete(deletes);
-	}
-	
-	@Override
-	public void deleteRowByRowkey(String encodedRowkey) throws IOException{
-		byte[] row = EagleBase64Wrapper.decode(encodedRowkey);
-		final Delete delete = createDelete(row);
-		tbl.delete(delete);
-	}
-
-	public void deleteRowByRowkey(List<String> encodedRowkeys) throws IOException {
-		final List<byte[]> rowkeys = RowkeyHelper.getRowkeysByEncodedRowkeys(encodedRowkeys);
-		deleteRowkeys(rowkeys);
-	}
-	
-	private Delete createDelete(byte[] row) throws IOException{
-		Delete delete = new Delete(row);
-		delete.deleteFamily(columnFamily.getBytes());
-		return delete;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogReader.java
deleted file mode 100755
index c75b94f..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/HBaseLogReader.java
+++ /dev/null
@@ -1,247 +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.log.entity.old;
-
-import java.io.IOException;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.LogReader;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.client.ResultScanner;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
-import org.apache.hadoop.hbase.filter.FilterList;
-import org.apache.hadoop.hbase.filter.RegexStringComparator;
-import org.apache.hadoop.hbase.filter.RowFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-public class HBaseLogReader implements LogReader {
-	private static Logger LOG = LoggerFactory.getLogger(HBaseLogReader.class);
-
-	protected byte[][] qualifiers;
-	private HTableInterface tbl;
-	private byte[] startKey;
-	private byte[] stopKey;
-	protected Map<String, List<String>> searchTags;
-
-	private ResultScanner rs;
-	private boolean isOpen = false;
-	
-	private Schema schema;
-
-	public HBaseLogReader(Schema schema, Date startTime, Date endTime, 
-			Map<String, List<String>> searchTags, String lastScanKey,
-			byte[][] outputQualifier){
-		this.schema = schema;
-		this.qualifiers = outputQualifier;
-		this.startKey = buildRowKey(schema.getPrefix(), startTime);
-		if (lastScanKey == null) {
-			this.stopKey = buildRowKey(schema.getPrefix(), endTime);
-		} else {
-			// build stop key
-			this.stopKey = EagleBase64Wrapper.decode(lastScanKey);
-			// concat byte 0 to exclude this stopKey
-			this.stopKey = ByteUtil.concat(this.stopKey, new byte[] { 0 });
-		}
-		this.searchTags = searchTags;
-	}
-	
-	/**
-	 * TODO If the required field is null for a row, then this row will not be fetched. That could be a problem for counting
-	 * Need another version of read to strictly get the number of rows which will return all the columns for a column family
-	 */
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(schema.getTable());
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-
-		String rowkeyRegex = buildRegex2(searchTags);
-		RegexStringComparator regexStringComparator = new RegexStringComparator(
-				rowkeyRegex);
-		regexStringComparator.setCharset(Charset.forName("ISO-8859-1"));
-		RowFilter filter = new RowFilter(CompareOp.EQUAL, regexStringComparator);
-		FilterList filterList = new FilterList();
-		filterList.addFilter(filter);
-		Scan s1 = new Scan();
-		// reverse timestamp, startRow is stopKey, and stopRow is startKey
-		s1.setStartRow(stopKey);
-		s1.setStopRow(startKey);
-		s1.setFilter(filterList);
-		// TODO the # of cached rows should be minimum of (pagesize and 100)
-		s1.setCaching(100);
-		// TODO not optimized for all applications
-		s1.setCacheBlocks(true);
-		// scan specified columnfamily and qualifiers
-		for(byte[] qualifier : qualifiers){
-			s1.addColumn(schema.getColumnFamily().getBytes(), qualifier);
-		}
-		rs = tbl.getScanner(s1);
-		isOpen = true;
-	}
-
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-		if(rs != null){
-			rs.close();
-		}
-	}
-
-	public void flush() throws IOException {
-		tbl.flushCommits();
-	}
-
-	private byte[] buildRowKey(String appName, Date t){
-		byte[] key = new byte[4 + 8];
-		byte[] b = ByteUtil.intToBytes(appName.hashCode());
-		System.arraycopy(b, 0, key, 0, 4);
-		// reverse timestamp
-		long ts = Long.MAX_VALUE - t.getTime();
-		System.arraycopy(ByteUtil.longToBytes(ts), 0, key, 4, 8);
-		return key;
-	}
-
-	/**
-	 * one search tag may have multiple values which have OR relationship, and relationship between
-	 * different search tags is AND
-	 * the query is like "(TAG1=value11 OR TAG1=value12) AND TAG2=value2"
-	 * @param tags
-	 * @return
-	 */
-	protected String buildRegex2(Map<String, List<String>> tags){
-		// TODO need consider that \E could be part of tag, refer to https://github.com/OpenTSDB/opentsdb/blob/master/src/core/TsdbQuery.java
-		SortedMap<Integer, List<Integer>> tagHash = new TreeMap<Integer, List<Integer>>();
-
-		for(Map.Entry<String, List<String>> entry : tags.entrySet()){
-			String tagName = entry.getKey();
-			List<String> stringValues = entry.getValue();
-			List<Integer> hashValues = new ArrayList<Integer>(1);
-			for(String value : stringValues){
-				hashValues.add(value.hashCode());
-			}
-			tagHash.put(tagName.hashCode(), hashValues);
-		}
-		// <tag1:3><value1:3> ... <tagn:3><valuen:3>
-		StringBuilder sb = new StringBuilder();
-		sb.append("(?s)");
-		sb.append("^(?:.{12})");
-		sb.append("(?:.{").append(8).append("})*"); // for any number of tags
-		for (Map.Entry<Integer, List<Integer>> entry : tagHash.entrySet()) {
-			try {
-				sb.append("\\Q");
-				sb.append(new String(ByteUtil.intToBytes(entry.getKey()), "ISO-8859-1")).append("\\E");
-				List<Integer> hashValues = entry.getValue();
-				sb.append("(?:");
-				boolean first = true;
-				for(Integer value : hashValues){
-					if(!first){
-						sb.append('|');
-					}
-					sb.append("\\Q");
-					sb.append(new String(ByteUtil.intToBytes(value), "ISO-8859-1"));
-					sb.append("\\E");
-					first = false;
-				}
-				sb.append(")");
-				sb.append("(?:.{").append(8).append("})*"); // for any number of tags
-					} catch (Exception ex) {
-						LOG.error("Constructing regex error", ex);
-					}
-				}
-				sb.append("$");
-				if (LOG.isDebugEnabled()) {
-					LOG.debug("Pattern is " + sb.toString());
-				}
-				return sb.toString();
-	}
-	
-	public InternalLog read() throws IOException {
-		if (rs == null)
-			throw new IllegalArgumentException(
-					"ResultScanner must be initialized before reading");
-
-		InternalLog t = null;
-
-		Result r = rs.next();
-		if (r != null) {
-			byte[] row = r.getRow();
-			// skip the first 4 bytes : prefix
-			long timestamp = ByteUtil.bytesToLong(row, 4);
-			// reverse timestamp
-			timestamp = Long.MAX_VALUE - timestamp;
-			int count = 0; 
-			if(qualifiers != null){
-				count = qualifiers.length;
-			}
-			byte[][] values = new byte[count][];
-			Map<String, byte[]> allQualifierValues = new HashMap<String, byte[]>();
-			for (int i = 0; i < count; i++) {
-				// TODO if returned value is null, it means no this column for this row, so why set null to the object?
-				values[i] = r.getValue(schema.getColumnFamily().getBytes(), qualifiers[i]);
-				allQualifierValues.put(new String(qualifiers[i]), values[i]);
-			}
-			t = buildObject(row, timestamp, allQualifierValues);
-		}
-
-		return t;
-	}
-
-	public InternalLog buildObject(byte[] row, long timestamp,
-			Map<String, byte[]> allQualifierValues) {
-		InternalLog alertDetail = new InternalLog();
-		String myRow = EagleBase64Wrapper.encodeByteArray2URLSafeString(row);
-		alertDetail.setEncodedRowkey(myRow);
-		alertDetail.setPrefix(schema.getPrefix());
-		alertDetail.setSearchTags(searchTags);
-		alertDetail.setTimestamp(timestamp);
-
-		Map<String, byte[]> logQualifierValues = new HashMap<String, byte[]>();
-		Map<String, String> logTags = new HashMap<String, String>();
-		for (Map.Entry<String, byte[]> entry : allQualifierValues.entrySet()) {
-			if (schema.isTag(entry.getKey())) {
-				if (entry.getValue() != null) {
-					logTags.put(entry.getKey(), new String(entry.getValue()));
-				}
-			} else {
-				logQualifierValues.put(entry.getKey(),entry.getValue());
-			}
-		}
-		alertDetail.setQualifierValues(logQualifierValues);
-		alertDetail.setTags(logTags);
-		return alertDetail;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/LogDeleter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/LogDeleter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/LogDeleter.java
deleted file mode 100644
index c5087e7..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/LogDeleter.java
+++ /dev/null
@@ -1,34 +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.log.entity.old;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-import org.apache.eagle.log.entity.InternalLog;
-
-public interface LogDeleter extends Closeable{
-	public void flush() throws IOException;
-
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-
-	public void delete(InternalLog log) throws IOException;
-	
-	public void deleteRowByRowkey(String encodedRowkey) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/RowkeyHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/RowkeyHelper.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/RowkeyHelper.java
deleted file mode 100644
index f2bdd15..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/RowkeyHelper.java
+++ /dev/null
@@ -1,85 +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.log.entity.old;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.RowkeyBuilder;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-public final class RowkeyHelper {
-
-	public static byte[] getRowkey(TaggedLogAPIEntity entity, EntityDefinition entityDef) throws Exception {
-		byte[] rowkey = null;
-		if(entity.getEncodedRowkey() != null && !(entity.getEncodedRowkey().isEmpty())){
-			rowkey = EagleBase64Wrapper.decode(entity.getEncodedRowkey());
-		}else{
-			InternalLog log = HBaseInternalLogHelper.convertToInternalLog(entity, entityDef);
-			rowkey = RowkeyBuilder.buildRowkey(log);
-		}
-		return rowkey;
-	}
-
-	public static List<byte[]> getRowkeysByEntities(List<? extends TaggedLogAPIEntity> entities, EntityDefinition entityDef) throws Exception {
-		final List<byte[]> result = new ArrayList<byte[]>(entities.size());
-		for (TaggedLogAPIEntity entity : entities) {
-			final byte[] rowkey = getRowkey(entity, entityDef);
-			result.add(rowkey);
-		}
-		return result;
-	}
-	
-
-	public static byte[] getRowkey(InternalLog log) {
-		byte[] rowkey = null;
-		if(log.getEncodedRowkey() != null && !(log.getEncodedRowkey().isEmpty())){
-			rowkey = EagleBase64Wrapper.decode(log.getEncodedRowkey());
-		}else{
-			rowkey = RowkeyBuilder.buildRowkey(log);
-		}
-		return rowkey;
-	}
-
-	public static List<byte[]> getRowkeysByLogs(List<InternalLog> logs) {
-		final List<byte[]> result = new ArrayList<byte[]>(logs.size());
-		for (InternalLog log : logs) {
-			final byte[] rowkey = getRowkey(log);
-			result.add(rowkey);
-		}
-		return result;
-	}
-
-	public static byte[] getRowkey(String encodedRowkey) {
-		byte[] rowkey = EagleBase64Wrapper.decode(encodedRowkey);
-		return rowkey;
-	}
-
-	public static List<byte[]> getRowkeysByEncodedRowkeys(List<String> encodedRowkeys) {
-		final List<byte[]> result = new ArrayList<byte[]>(encodedRowkeys.size());
-		for (String encodedRowkey : encodedRowkeys) {
-			byte[] rowkey = EagleBase64Wrapper.decode(encodedRowkey);
-			result.add(rowkey);
-		}
-		return result;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/Schema.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/Schema.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/Schema.java
deleted file mode 100644
index 55556bd..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/old/Schema.java
+++ /dev/null
@@ -1,24 +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.log.entity.old;
-
-public interface Schema {
-	public boolean isTag(String qualifier);
-	public String getTable();
-	public String getColumnFamily();
-	public String getPrefix();
-}


[24/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayListSortedSet.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayListSortedSet.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayListSortedSet.java
deleted file mode 100644
index ef47624..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayListSortedSet.java
+++ /dev/null
@@ -1,106 +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.common;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-public class CircularArrayListSortedSet<E> {
-
-	private final CircularArrayList<E> list;
-    private final Comparator<? super E> comparator;
-
-	public CircularArrayListSortedSet(E[] array) {
-		this.list = new CircularArrayList<E>(array);
-		this.comparator = null;
-	}
-	
-	public CircularArrayListSortedSet(E[] array, Comparator<? super E> comparator) {
-		this.list = new CircularArrayList<E>(array);
-		this.comparator = comparator;
-	}
-	
-    public int capacity() {
-        return list.capacity();
-    }
-    
-    public int head() {
-    	return list.head();
-    }
-    
-    public int tail() {
-    	return list.tail();
-    }
-    
-    public boolean isFull() {
-    	return list.isFull();
-    }
-  
-    public void clear() {
-    	list.clear();
-    }
-    
-    public int size() {
-    	return list.size();
-    }
-  
-    public E get(int i) {
-        return list.get(i);
-    }
-    
-    @SuppressWarnings("unchecked")
-	public int binarySearch(E e) {
-    	if (comparator != null) {
-    		return Collections.binarySearch(list, e, comparator);
-    	} else {
-    		return Collections.binarySearch((List<? extends Comparable<? super E>>)list, e);
-    	}
-    }
-    
-    public int replace(E e) {
-    	int index = binarySearch(e);
-    	if (index < 0) {
-    		return -1;
-    	}
-    	list.set(index, e);
-    	return index;
-    }
-  
-    public int insert(E e) {
-    	int index = binarySearch(e);
-    	if (index > 0) {
-    		return -1;
-    	}
-    	index = 0 - index - 1;
-    	list.add(index, e);
-    	return index;
-    }
-  
-    public E remove(int i) {
-    	return list.remove(i);
-    }
-    
-    public int remove(E e) {
-    	final int index = binarySearch(e);
-    	if (index > 0) {
-        	list.remove(index);
-        	return index;
-    	}
-    	return -1;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
deleted file mode 100644
index 58794ca..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/DateTimeUtil.java
+++ /dev/null
@@ -1,138 +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.common;
-import org.apache.eagle.common.config.EagleConfigFactory;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-/**
- * be aware that SimpleDateFormat instantiation is expensive, so if that's under a tight loop, probably we need
- * a thread local SimpleDateFormat object
- */
-public class DateTimeUtil {
-	public static final long ONESECOND = 1L * 1000L;
-	public static final long ONEMINUTE = 1L * 60L * 1000L;
-	public static final long ONEHOUR = 1L * 60L * 60L * 1000L;
-	public static final long ONEDAY = 24L * 60L * 60L * 1000L;
-    private static TimeZone CURRENT_TIME_ZONE = EagleConfigFactory.load().getTimeZone();
-	
-	public static Date humanDateToDate(String date) throws ParseException{
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		return sdf.parse(date);
-	}
-	
-	public static String secondsToHumanDate(long seconds){
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date t = new Date();
-		t.setTime(seconds*1000);
-		return sdf.format(t);
-	}
-	
-	public static String millisecondsToHumanDateWithMilliseconds(long milliseconds){
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date t = new Date();
-		t.setTime(milliseconds);
-		return sdf.format(t);
-	}
-	
-	public static String millisecondsToHumanDateWithSeconds(long milliseconds){
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-//        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date t = new Date();
-		t.setTime(milliseconds);
-		return sdf.format(t);
-	}
-	
-	public static long humanDateToSeconds(String date) throws ParseException{
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date d = sdf.parse(date);
-		return d.getTime()/1000;
-	}
-	
-	public static long humanDateToMilliseconds(String date) throws ParseException{
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date d = sdf.parse(date);
-		return d.getTime();
-	}
-	
-	
-	public static long humanDateToMillisecondsWithoutException(String date){
-		try{
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
-            sdf.setTimeZone(CURRENT_TIME_ZONE);
-			Date d = sdf.parse(date);
-			return d.getTime();
-		}catch(ParseException ex){
-			return 0L;
-		}
-	}
-	
-	public static long humanDateToSecondsWithoutException(String date){
-		try{
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            sdf.setTimeZone(CURRENT_TIME_ZONE);
-			Date d = sdf.parse(date);
-			return (d.getTime() / 1000);
-		}catch(ParseException ex){
-			return 0L;
-		}
-	}
-	/**
-	 * this could be accurate only when timezone is UTC
-	 * for the timezones other than UTC, there is possibly issue, for example
-	 * assume timezone is GMT+8 in China
-	 * When user time is "2014-07-15 05:00:00", it will be converted to timestamp first, internally it would be  "2014-07-14 21:00:00" in UTC timezone. When rounded down to day, the internal time would 
-	 * be changed to "2014-07-14 00:00:00", and that means the user time is "2014-07-14 08:00:00". But originally user wants to round it to "2014-07-15 00:00:00"
-	 * 
-	 * @param field
-	 * @param timeInMillis the seconds elapsed since 1970-01-01 00:00:00
-	 * @return
-	 */
-	public static long roundDown(int field, long timeInMillis){
-		switch(field){
-			case Calendar.DAY_OF_MONTH:
-			case Calendar.DAY_OF_WEEK:
-			case Calendar.DAY_OF_YEAR:
-				return (timeInMillis - timeInMillis % (24*60*60*1000));
-			case Calendar.HOUR:
-				return (timeInMillis - timeInMillis % (60*60*1000));
-			case Calendar.MINUTE:
-				return (timeInMillis - timeInMillis % (60*1000));
-			case Calendar.SECOND:
-				return (timeInMillis - timeInMillis % (1000));
-			default:
-				return 0L;
-		}
-	}
-
-	public static String format(long milliseconds, String format) {
-		SimpleDateFormat sdf = new SimpleDateFormat(format);
-        sdf.setTimeZone(CURRENT_TIME_ZONE);
-		Date t = new Date();
-		t.setTime(milliseconds);
-		return sdf.format(t);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleBase64Wrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleBase64Wrapper.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleBase64Wrapper.java
deleted file mode 100644
index e31ef99..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleBase64Wrapper.java
+++ /dev/null
@@ -1,32 +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.common;
-
-import org.apache.commons.net.util.Base64;
-
-/**
- * wrap base64 encoding and decoding, so reduce the confuse of using many Base64 methods. 
- */
-public class EagleBase64Wrapper {
-	public static String encodeByteArray2URLSafeString(byte[] bytes){
-		return Base64.encodeBase64URLSafeString(bytes);
-	}
-	
-	public static byte[] decode(String input){
-		return Base64.decodeBase64(input);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleExceptionWrapper.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleExceptionWrapper.java
deleted file mode 100644
index 1fc4e85..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/EagleExceptionWrapper.java
+++ /dev/null
@@ -1,42 +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.common;
-
-public class EagleExceptionWrapper {
-	private final static int MAX_DEPTH = 10;
-	
-	public static String wrap(Exception ex){
-		return wrap(ex, EagleExceptionWrapper.MAX_DEPTH);
-	}
-	
-	public static String wrap(Exception ex, int maxdepth){
-		int d = maxdepth;
-		if(d <= 0)
-			d = EagleExceptionWrapper.MAX_DEPTH;
-		int index = 0;
-		StringBuffer sb = new StringBuffer();
-		sb.append(ex);
-		sb.append(System.getProperty("line.separator"));
-		for(StackTraceElement element : ex.getStackTrace()){
-			sb.append(element.toString());
-			sb.append(System.getProperty("line.separator"));
-			if(++index >= d)
-				break;
-		}
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Environment.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Environment.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Environment.java
deleted file mode 100644
index dd69ed5..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Environment.java
+++ /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.
- */
-package org.apache.eagle.common;
-
-public enum Environment {
-	dev,
-	test,
-	prod,
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/OS.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/OS.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/OS.java
deleted file mode 100644
index 05e8db1..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/OS.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.common;
-
-public class OS {
-
-	private final static String os = System.getProperty("os.name")
-			.toLowerCase();
-
-	public static boolean isWindows() {
-		return (os.indexOf("win") >= 0);
-	}
-
-	public static boolean isMac() {
-		return (os.indexOf("mac") >= 0);
-	}
-
-	public static boolean isUnix() {
-		return (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0 || os
-				.indexOf("aix") > 0);
-	}
-
-	public static boolean isSolaris() {
-		return (os.indexOf("sunos") >= 0);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
deleted file mode 100755
index afd095b..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfig.java
+++ /dev/null
@@ -1,57 +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.common.config;
-
-import com.typesafe.config.Config;
-import org.apache.hadoop.hbase.client.HTableInterface;
-
-import java.util.TimeZone;
-import java.util.concurrent.ThreadPoolExecutor;
-
-public interface EagleConfig {
-
-    boolean isCoprocessorEnabled();
-
-	HTableInterface getHTable(String tableName);
-
-    String getStorageType();
-
-    ThreadPoolExecutor getExecutor();
-
-	String getZKQuorum();
-
-	String getZKPort();
-
-	String getServiceHost();
-
-	int getServicePort();
-
-    String getEnv();
-
-    boolean isTableNamePrefixedWithEnvironment();
-	
-    int getHBaseClientScanCacheSize();
-
-    TimeZone getTimeZone();
-    
-    boolean isServiceAuditingEnabled();
-
-    /**
-     * @return root config
-     */
-    Config getConfig();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
deleted file mode 100644
index 720dc35..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigConstants.java
+++ /dev/null
@@ -1,59 +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.common.config;
-
-public final class EagleConfigConstants {
-    public final static String SERVICE_ENV = "eagle.service.env";
-    public final static String SERVICE_HOST = "eagle.service.host";
-    public final static String SERVICE_PORT = "eagle.service.port";
-    public final static String SERVICE_HBASE_ZOOKEEPER_QUORUM = "eagle.service.hbase-zookeeper-quorum";
-    public final static String SERVICE_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT = "eagle.service.hbase-zookeeper-property-clientPort";
-    public final static String SERVICE_ZOOKEEPER_ZNODE_PARENT = "eagle.service.zookeeper-znode-parent";
-    public final static String SERVICE_HBASE_CLIENT_IPC_POOL_SIZE = "eagle.service.hbase-client-ipc-pool-size";
-    public final static String SERVICE_STORAGE_TYPE = "eagle.service.storage-type";
-    public final static String SERVICE_COPROCESSOR_ENABLED = "eagle.service.coprocessor-enabled";
-    public final static String SERVICE_TABLE_NAME_PREFIXED_WITH_ENVIRONMENT = "eagle.service.table-name-prefixed-with-environment";
-    public final static String SERVICE_HBASE_CLIENT_SCAN_CACHE_SIZE = "eagle.service.hbase-client-scan-cache-size";
-    public final static String SERVICE_THREADPOOL_CORE_SIZE = "eagle.service.threadpool-core-size";
-    public final static String SERVICE_THREADPOOL_MAX_SIZE = "eagle.service.threadpool-max-size";
-    public final static String SERVICE_THREADPOOL_SHRINK_SIZE = "eagle.service.threadpool-shrink-size";
-    public final static String SERVICE_AUDITING_ENABLED = "eagle.service.audit-enabled";
-
-    public final static String EAGLE_TIME_ZONE = "eagle.timezone";
-    public final static String DEFAULT_EAGLE_TIME_ZONE = "UTC";
-
-    public final static int DEFAULT_THREAD_POOL_CORE_SIZE = 10;
-    public final static int DEFAULT_THREAD_POOL_MAX_SIZE = 20;
-    public final static long DEFAULT_THREAD_POOL_SHRINK_TIME = 60000L;
-    public final static String DEFAULT_SERVICE_HOST = "localhost";
-    public final static String DEFAULT_STORAGE_TYPE = "hbase";
-    public final static int DEFAULT_SERVICE_PORT = 8080;
-    public final static String DEFAULT_ZOOKEEPER_ZNODE_PARENT = "/hbase-unsecure";
-
-    public final static String EAGLE_PROPS="eagleProps";
-    public final static String EAGLE_SERVICE = "eagleService";
-    public final static String HOST = "host";
-    public final static String PORT = "port";
-    public final static String USERNAME = "username";
-    public final static String PASSWORD = "password";
-
-    public final static String SITE = "site";
-    @Deprecated
-    public final static String DATA_SOURCE = "dataSource";
-    public final static String APPLICATION = "application";
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
deleted file mode 100755
index ed04f75..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigFactory.java
+++ /dev/null
@@ -1,191 +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.common.config;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.HTablePool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.TimeZone;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-public class EagleConfigFactory implements EagleConfig {
-	private static final Logger LOG = LoggerFactory.getLogger(EagleConfigFactory.class);
-
-	private String env;
-	private String zkQuorum;
-	private String zkPort;
-
-    private Configuration hbaseConf;
-	private String eagleServiceHost;
-	private int eagleServicePort;
-    private String storageType;
-    private Config config;
-    private TimeZone timeZone;
-
-    public boolean isCoprocessorEnabled() {
-		return isCoprocessorEnabled;
-	}
-
-	private boolean isCoprocessorEnabled;
-
-	private boolean tableNamePrefixedWithEnv;
-
-	private HTablePool pool;
-	private int hbaseClientScanCacheSize = 1000;
-
-	private ThreadPoolExecutor executor = null;
-
-	private static EagleConfigFactory manager = new EagleConfigFactory();
-
-	private EagleConfigFactory(){
-		init();
-		this.pool = new HTablePool(this.hbaseConf, 10);
-	}
-	
-	public static EagleConfig load(){
-		return manager;
-	}
-	
-	public HTableInterface getHTable(String tableName){
-        return pool.getTable(tableName);
-    }
-
-    private String getString(Config config,String path,String defaultValue){
-        if(config.hasPath(path)){
-            return config.getString(path);
-        }else{
-            return defaultValue;
-        }
-    }
-
-    public String getStorageType() {
-        return storageType;
-    }
-
-    public ThreadPoolExecutor getExecutor() {
-        return executor;
-    }
-
-    private void init(){
-        this.config = ConfigFactory.load();
-        this.timeZone = TimeZone.getTimeZone((config.hasPath(EagleConfigConstants.EAGLE_TIME_ZONE)? config.getString(EagleConfigConstants.EAGLE_TIME_ZONE): EagleConfigConstants.DEFAULT_EAGLE_TIME_ZONE));
-        this.env = config.hasPath(EagleConfigConstants.SERVICE_ENV) ? config.getString(EagleConfigConstants.SERVICE_ENV):"dev";
-		this.zkQuorum = config.hasPath(EagleConfigConstants.SERVICE_HBASE_ZOOKEEPER_QUORUM) ? config.getString(EagleConfigConstants.SERVICE_HBASE_ZOOKEEPER_QUORUM):null;
-		this.zkPort = config.hasPath(EagleConfigConstants.SERVICE_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT) ? config.getString(EagleConfigConstants.SERVICE_HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT): null;
-        String zkZnodeParent = config.hasPath(EagleConfigConstants.SERVICE_ZOOKEEPER_ZNODE_PARENT)? config.getString(EagleConfigConstants.SERVICE_ZOOKEEPER_ZNODE_PARENT): EagleConfigConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT;
-		String clientIPCPoolSize = getString(config, EagleConfigConstants.SERVICE_HBASE_CLIENT_IPC_POOL_SIZE, "10");
-		this.hbaseConf = HBaseConfiguration.create();
-
-        if (this.zkQuorum != null)
-            this.hbaseConf.set("hbase.zookeeper.quorum", this.zkQuorum);
-
-		if (this.zkPort != null)
-            this.hbaseConf.set("hbase.zookeeper.property.clientPort", this.zkPort);
-
-        if(zkZnodeParent != null)
-            this.hbaseConf.set("zookeeper.znode.parent", zkZnodeParent);
-        else
-            this.hbaseConf.set("zookeeper.znode.parent", EagleConfigConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
-
-        this.hbaseConf.set("hbase.client.ipc.pool.size", clientIPCPoolSize);
-
-		this.eagleServiceHost = config.hasPath(EagleConfigConstants.SERVICE_HOST) ? config.getString(EagleConfigConstants.SERVICE_HOST) : EagleConfigConstants.DEFAULT_SERVICE_HOST;
-        this.storageType = config.hasPath(EagleConfigConstants.SERVICE_STORAGE_TYPE) ? config.getString(EagleConfigConstants.SERVICE_STORAGE_TYPE) : EagleConfigConstants.DEFAULT_STORAGE_TYPE;
-        this.isCoprocessorEnabled = config.hasPath(EagleConfigConstants.SERVICE_COPROCESSOR_ENABLED) && config.getBoolean(EagleConfigConstants.SERVICE_COPROCESSOR_ENABLED);
-		this.eagleServicePort = config.hasPath(EagleConfigConstants.SERVICE_PORT) ? config.getInt(EagleConfigConstants.SERVICE_PORT) : EagleConfigConstants.DEFAULT_SERVICE_PORT;
-        this.tableNamePrefixedWithEnv = config.hasPath(EagleConfigConstants.SERVICE_TABLE_NAME_PREFIXED_WITH_ENVIRONMENT) && config.getBoolean(EagleConfigConstants.SERVICE_TABLE_NAME_PREFIXED_WITH_ENVIRONMENT);
-        this.hbaseClientScanCacheSize = config.hasPath(EagleConfigConstants.SERVICE_HBASE_CLIENT_SCAN_CACHE_SIZE)? config.getInt(EagleConfigConstants.SERVICE_HBASE_CLIENT_SCAN_CACHE_SIZE) : hbaseClientScanCacheSize;
-        // initilize eagle service thread pool for parallel execution of hbase scan etc.
-		int threadPoolCoreSize = config.hasPath(EagleConfigConstants.SERVICE_THREADPOOL_CORE_SIZE)? config.getInt(EagleConfigConstants.SERVICE_THREADPOOL_CORE_SIZE): EagleConfigConstants.DEFAULT_THREAD_POOL_CORE_SIZE;
-		int threadPoolMaxSize = config.hasPath(EagleConfigConstants.SERVICE_THREADPOOL_MAX_SIZE) ? config.getInt(EagleConfigConstants.SERVICE_THREADPOOL_MAX_SIZE) : EagleConfigConstants.DEFAULT_THREAD_POOL_MAX_SIZE;
-		long threadPoolShrinkTime = config.hasPath(EagleConfigConstants.SERVICE_THREADPOOL_SHRINK_SIZE) ? config.getLong(EagleConfigConstants.SERVICE_THREADPOOL_SHRINK_SIZE) : EagleConfigConstants.DEFAULT_THREAD_POOL_SHRINK_TIME;
-		this.isServiceAuditingEnabled = config.hasPath(EagleConfigConstants.SERVICE_AUDITING_ENABLED) && config.getBoolean(EagleConfigConstants.SERVICE_AUDITING_ENABLED);
-		
-		this.executor = new ThreadPoolExecutor(threadPoolCoreSize, threadPoolMaxSize, threadPoolShrinkTime, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
-
-		LOG.info("Successfully initialized config");
-
-		if(LOG.isDebugEnabled()) {
-			if(this.isCoprocessorEnabled){
-				LOG.debug("Eagle HBase Coprocessor is enabled");
-			}else{
-				LOG.debug("Eagle HBase Coprocessor is disabled");
-			}
-		}
-	}
-
-    @Override
-	public String getZKQuorum(){
-		return this.zkQuorum;
-    }
-
-    @Override
-	public String getZKPort(){
-		return this.zkPort;
-	}
-
-    @Override
-	public String getServiceHost() {
-		return eagleServiceHost;
-	}
-
-    @Override
-	public int getServicePort() {
-		return eagleServicePort;
-	}
-
-    @Override
-	public String getEnv() {
-		return env;
-	}
-
-    @Override
-	public boolean isTableNamePrefixedWithEnvironment(){
-		return this.tableNamePrefixedWithEnv;
-	}
-
-    @Override
-	public int getHBaseClientScanCacheSize(){
-		return this.hbaseClientScanCacheSize;
-	}
-
-    @Override
-    public TimeZone getTimeZone() {
-        return this.timeZone;
-    }
-
-    @Override
-    public Config getConfig() {
-        return this.config;
-    }
-    
-    // added for jira EAGLE-47
-    boolean isServiceAuditingEnabled;
-    
-    @Override
-	public boolean isServiceAuditingEnabled() {
-		return isServiceAuditingEnabled;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
deleted file mode 100644
index fe3e190..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/config/EagleConfigHelper.java
+++ /dev/null
@@ -1,51 +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.common.config;
-
-import com.typesafe.config.Config;
-
-public class EagleConfigHelper {
-
-    public static String getServiceHost(Config config) {
-        return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-    }
-
-    public static int getServicePort(Config config) {
-        return config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-    }
-
-    public static String getServiceUser(Config config) {
-        return config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) ?
-               config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) : null;
-    }
-
-    public static String getServicePassword(Config config) {
-        return config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD) ?
-                config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD) : null;
-    }
-
-    public static String getSite(Config config) {
-        return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
-    }
-
-    public static String getApplication(Config config) {
-        return config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
deleted file mode 100755
index e647a2f..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/email/EagleMailClient.java
+++ /dev/null
@@ -1,248 +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.common.email;
-
-import java.io.File;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.activation.FileDataSource;
-import javax.mail.Authenticator;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Multipart;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-
-import org.apache.commons.configuration.AbstractConfiguration;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.apache.velocity.runtime.RuntimeConstants;
-import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.netflix.config.ConcurrentMapConfiguration;
-
-public class EagleMailClient {
-//	private static final String CONFIG_FILE = "config.properties";
-	private static final String BASE_PATH = "templates/";
-	private static final String AUTH_CONFIG = "mail.smtp.auth";
-	private static final String DEBUG_CONFIG = "mail.debug";
-	private static final String USER_CONFIG = "mail.user";
-	private static final String PWD_CONFIG = "mail.pwd";
-
-	private VelocityEngine velocityEngine;
-	private Session session;
-	private static final Logger LOG = LoggerFactory.getLogger(EagleMailClient.class);
-
-	public EagleMailClient() {
-		this(new ConcurrentMapConfiguration());
-	}
-	
-	public EagleMailClient(AbstractConfiguration configuration) {
-		try {
-			ConcurrentMapConfiguration con = (ConcurrentMapConfiguration)configuration;
-			velocityEngine = new VelocityEngine();
-			velocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
-			velocityEngine.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
-			velocityEngine.init();
-
-			con.setProperty("mail.transport.protocol", "smtp");
-			final Properties config = con.getProperties();
-			if(Boolean.parseBoolean(config.getProperty(AUTH_CONFIG))){
-				session = Session.getDefaultInstance(config, new Authenticator() {
-					protected PasswordAuthentication getPasswordAuthentication() {
-						return new PasswordAuthentication(config.getProperty(USER_CONFIG), config.getProperty(PWD_CONFIG));
-					}
-				});
-			}
-			else session = Session.getDefaultInstance(config, new Authenticator() {});
-			final String debugMode =  config.getProperty(DEBUG_CONFIG, "false");
-			final boolean debug =  Boolean.parseBoolean(debugMode);
-			session.setDebug(debug);
-		} catch (Exception e) {
-            LOG.error("Failed connect to smtp server",e);
-		}
-	}
-
-	private boolean _send(String from, String to, String cc, String title,
-			String content) {
-		Message msg = new MimeMessage(session);
-		try {
-			msg.setFrom(new InternetAddress(from));
-			msg.setSubject(title);
-			if (to != null) {
-				msg.setRecipients(Message.RecipientType.TO,
-						InternetAddress.parse(to));
-			}
-			if (cc != null) {
-				msg.setRecipients(Message.RecipientType.CC,
-						InternetAddress.parse(cc));
-			}
-			//msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(DEFAULT_BCC_ADDRESS));
-			msg.setContent(content, "text/html;charset=utf-8");
-			LOG.info(String.format("Going to send mail: from[%s], to[%s], cc[%s], title[%s]", from, to, cc, title));
-			Transport.send(msg);
-			return true;
-		} catch (AddressException e) {
-			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
-			return false;
-		} catch (MessagingException e) {
-			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
-			return false;
-		}
-	}
-
-	private boolean _send(String from,String to,String cc,String title,String content,List<MimeBodyPart> attachments){
-		MimeMessage  mail = new MimeMessage(session);
-		try {
-			mail.setFrom(new InternetAddress(from));
-			mail.setSubject(title);
-			if (to != null) {
-				mail.setRecipients(Message.RecipientType.TO,
-						InternetAddress.parse(to));
-			}
-			if (cc != null) {
-				mail.setRecipients(Message.RecipientType.CC,
-						InternetAddress.parse(cc));
-			}
-			
-			//mail.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(DEFAULT_BCC_ADDRESS));
-
-			MimeBodyPart mimeBodyPart = new MimeBodyPart();
-			mimeBodyPart.setContent(content,"text/html;charset=utf-8");
-
-			Multipart  multipart = new MimeMultipart();
-			multipart.addBodyPart(mimeBodyPart);
-
-			for(MimeBodyPart attachment:attachments){
-				multipart.addBodyPart(attachment);
-			}
-
-			mail.setContent(multipart);
-//			mail.setContent(content, "text/html;charset=utf-8");
-			LOG.info(String.format("Going to send mail: from[%s], to[%s], cc[%s], title[%s]", from, to, cc, title));
-			Transport.send(mail);
-			return true;
-		} catch (AddressException e) {
-			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
-			return false;
-		} catch (MessagingException e) {
-			LOG.info("Send mail failed, got an AddressException: " + e.getMessage(), e);
-			return false;
-		}
-	}
-
-	public boolean send(String from, String to, String cc, String title,
-			String content) {
-		return this._send(from, to, cc, title, content);
-	}
-
-	public boolean send(String from, String to, String cc, String title,
-			String templatePath, VelocityContext context) {
-		Template t = null;
-		try {
-			t = velocityEngine.getTemplate(BASE_PATH + templatePath);
-		} catch (ResourceNotFoundException ex) {
-		}
-		if (t == null) {
-			try {
-				t = velocityEngine.getTemplate(templatePath);
-			} catch (ResourceNotFoundException e) {
-				t = velocityEngine.getTemplate("/" + templatePath);
-			}
-		}
-		final StringWriter writer = new StringWriter();
-		t.merge(context, writer);
-		if(LOG.isDebugEnabled()) LOG.debug(writer.toString());
-		return this.send(from, to, cc, title, writer.toString());
-	}
-
-	public boolean send(String from, String to, String cc, String title,
-	                    String templatePath, VelocityContext context, Map<String,File> attachments) {
-		if (attachments == null || attachments.isEmpty()) {
-			return send(from, to, cc, title, templatePath, context);
-		}
-		Template t = null;
-
-		List<MimeBodyPart> mimeBodyParts = new ArrayList<MimeBodyPart>();
-		Map<String,String> cid = new HashMap<String,String>();
-
-		for (Map.Entry<String,File> entry : attachments.entrySet()) {
-			final String attachment = entry.getKey();
-			final File attachmentFile  = entry.getValue();
-			final MimeBodyPart mimeBodyPart = new MimeBodyPart();
-			if(attachmentFile !=null && attachmentFile.exists()){
-				DataSource source = new FileDataSource(attachmentFile);
-				try {
-					mimeBodyPart.setDataHandler(new DataHandler(source));
-					mimeBodyPart.setFileName(attachment);
-					mimeBodyPart.setDisposition(MimeBodyPart.ATTACHMENT);
-					mimeBodyPart.setContentID(attachment);
-					cid.put(attachment,mimeBodyPart.getContentID());
-					mimeBodyParts.add(mimeBodyPart);
-				} catch (MessagingException e) {
-					LOG.error("Generate mail failed, got exception while attaching files: " + e.getMessage(), e);
-				}
-			}else{
-				LOG.error("Attachment: " + attachment + " is null or not exists");
-			}
-		}
-		//TODO remove cid, because not used at all
-		if(LOG.isDebugEnabled()) LOG.debug("Cid maps: "+cid);
-		context.put("cid", cid);
-
-		try {
-			t = velocityEngine.getTemplate(BASE_PATH + templatePath);
-		} catch (ResourceNotFoundException ex) {
-//			LOGGER.error("Template not found:"+BASE_PATH + templatePath, ex);
-		}
-
-		if (t == null) {
-			try {
-				t = velocityEngine.getTemplate(templatePath);
-			} catch (ResourceNotFoundException e) {
-				try {
-					t = velocityEngine.getTemplate("/" + templatePath);
-				}
-				catch (Exception ex) {
-					LOG.error("Template not found:"+ "/" + templatePath, ex);
-				}
-			}
-		}
-
-		final StringWriter writer = new StringWriter();
-		t.merge(context, writer);
-		if(LOG.isDebugEnabled()) LOG.debug(writer.toString());
-		return this._send(from, to, cc, title, writer.toString(), mimeBodyParts);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/metric/AlertContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/metric/AlertContext.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/metric/AlertContext.java
deleted file mode 100644
index 0d1faa1..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/metric/AlertContext.java
+++ /dev/null
@@ -1,66 +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.common.metric;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * not thread safe
- */
-public class AlertContext implements Serializable{
-	private Map<String, String> properties = new HashMap<String, String>();
-	
-	public AlertContext(){
-	}
-	
-	public AlertContext(AlertContext context){
-		this.properties = new HashMap<String, String>(context.properties);
-	}
-	
-	public String removeProperty(String name)
-	{
-		return properties.remove(name);
-	}
-	
-	public AlertContext addProperty(String name, String value){
-		properties.put(name, value);
-		return this;
-	}
-
-	public AlertContext addAll(Map<String,String> propHash){
-		this.properties.putAll(propHash);
-		return this;
-	}
-	
-	public String getProperty(String name){
-		return properties.get(name);
-	}
-	
-	public String toString(){
-		return properties.toString();
-	}
-	
-	public Map<String, String> getProperties(){
-		return properties;
-	}
-	
-	public void setProperties(Map<String, String> properties){
-		this.properties = properties;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopAccountService.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopAccountService.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopAccountService.java
deleted file mode 100644
index 0b4893a..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopAccountService.java
+++ /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.
- */
-package org.apache.eagle.common.service;
-
-import java.util.List;
-
-public interface HadoopAccountService {
-	public List<HadoopUser> searchByUsername(List<String> username);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopUser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopUser.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopUser.java
deleted file mode 100644
index 2e84f77..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/HadoopUser.java
+++ /dev/null
@@ -1,44 +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.common.service;
-
-import java.util.List;
-
-/**
- * @since : 7/11/14,2014
- */
-public class HadoopUser {
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	protected String username;
-
-	public List<String> getEmail() {
-		return email;
-	}
-
-	public void setEmail(List<String> emails) {
-		this.email = emails;
-	}
-
-	protected List<String> email;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java
deleted file mode 100644
index 31f1d01..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/LdapService.java
+++ /dev/null
@@ -1,259 +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.common.service;
-
-
-import org.apache.eagle.common.config.EagleConfig;
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.*;
-import java.util.*;
-
-/**
- * @since : 7/11/14,2014
- */
-public class LdapService {
-    private final static Logger LOG = LoggerFactory.getLogger(LdapService.class);
-
-    private final List<String> ldapSrvs;
-    private String ldapCerts;
-    private final String securityPrincipal;
-    private final String securityCredentials;
-
-    public final static String SECURITY_PRINCIPAL_CONFIG_NAME = "eagle.ldap.security-principal";
-    public final static String SECURITY_CREDENTIALS_CONFIG_NAME = "eagle.ldap.security-credentials";
-    public final static String LDAP_SERVER_CONFIG_NAME = "eagle.ldap.server";
-    public final static String LDAP_CERTS_CONFIG_NAME = "eagle.ldap.certs";
-    public final static String DEFAULT_LDAP_CERTS_FILE_NAME = "jssecacerts";
-
-    private LdapService(){
-        EagleConfig manager = EagleConfigFactory.load();
-        securityPrincipal = manager.getConfig().getString(SECURITY_PRINCIPAL_CONFIG_NAME);
-        securityCredentials = manager.getConfig().getString(SECURITY_CREDENTIALS_CONFIG_NAME);
-        String ldapServer = manager.getConfig().getString(LDAP_SERVER_CONFIG_NAME);
-        if(LOG.isDebugEnabled())
-            LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME+":"+securityPrincipal);
-        if(securityCredentials!=null){
-            if(LOG.isDebugEnabled())
-                LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME+": (hidden for security, length: "+securityCredentials.length()+")");
-        }else{
-            LOG.warn(SECURITY_CREDENTIALS_CONFIG_NAME+":"+null);
-        }
-        if(LOG.isDebugEnabled())
-            LOG.debug(LDAP_SERVER_CONFIG_NAME+":"+ldapServer);
-
-        ldapSrvs = Arrays.asList(ldapServer.split(","));
-        ldapCerts = manager.getConfig().getString(LDAP_CERTS_CONFIG_NAME);
-        if(ldapCerts == null) {
-            ldapCerts = LdapService.class.getClassLoader().getResource(DEFAULT_LDAP_CERTS_FILE_NAME).getPath();
-        }else if(!ldapCerts.startsWith("/") && !ldapCerts.matches("[a-zA-Z]+:.*")) {
-            ldapCerts = LdapService.class.getClassLoader().getResource(ldapCerts).getPath();
-        }
-        if(LOG.isDebugEnabled()) {
-            LOG.debug(SECURITY_PRINCIPAL_CONFIG_NAME +": "+securityPrincipal);
-            if(securityCredentials == null){
-                LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME +": null");
-            }else{
-                LOG.debug(SECURITY_CREDENTIALS_CONFIG_NAME +": (hidden, length: "+securityCredentials .length()+")");
-            }
-
-            LOG.debug(LDAP_SERVER_CONFIG_NAME +": "+ldapSrvs);
-            LOG.debug(LDAP_CERTS_CONFIG_NAME +": "+ldapCerts);
-        }
-    }
-
-    private static LdapService instance;
-
-    public static LdapService getInstance(){
-        if(instance == null){
-            instance = new LdapService();
-        }
-        return instance;
-    }
-
-    protected DirContext getDirContext(int id) {
-        if (ldapCerts != null) {
-            System.setProperty("javax.net.ssl.keyStore", ldapCerts);
-            System.setProperty("javax.net.ssl.trustStore", ldapCerts);
-        }
-
-        String host = ldapSrvs.get(id);
-
-        Hashtable<String, String> env = new Hashtable<String, String>();
-//		if (ldapCerts != null) {
-        env.put(Context.SECURITY_PROTOCOL, "ssl");
-//		}
-        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-        env.put(Context.PROVIDER_URL, host);
-        env.put(Context.SECURITY_AUTHENTICATION, "simple");
-        env.put(Context.SECURITY_PRINCIPAL, securityPrincipal);
-        env.put(Context.SECURITY_CREDENTIALS, securityCredentials);
-        env.put("java.naming.ldap.attributes.binary", "objectSID");
-        env.put("java.naming.ldap.factory.socket","hadoop.eagle.common.service.TrustAllSSLSocketFactory");
-
-        DirContext ctx = null;
-        try {
-            ctx = new InitialDirContext(env);
-        } catch (Exception e) {
-            ctx = null;
-            LOG.error("LDAP authentication failed with exception: " + e.getMessage(), e);
-        }
-        return ctx;
-    }
-
-    public final static String CN= "cn";
-    public final static String DISPLAY_NAME =  "displayName";
-    public final static String DESCRIPTION= "description";
-    public final static String SAMACCOUNT_NAME= "sAMAccountName";
-    public final static String TELEPHONE_NUMBER= "telephonenumber";
-    public final static String GIVEN_NAME= "givenName";
-    public final static String UID_NUMBER =  "uidNumber";
-    public final static String L = "l";
-    public final static String ST = "st";
-    public final static String CO = "co";
-    public final static String MEMBER_OF = "memberof";
-    public final static String SN =  "sn";
-    public final static String MAIL = "mail";
-    public final static String DISTINGUISHED_NAME =  "distinguishedName";
-
-    protected SearchControls getSearchControl() {
-        SearchControls sc = new SearchControls();
-
-        String[] attributeFilter = new String[15];
-        attributeFilter[0] = CN;
-        attributeFilter[1] =  DISPLAY_NAME ;
-        attributeFilter[2] = DESCRIPTION;
-        attributeFilter[3] =  SAMACCOUNT_NAME;
-        attributeFilter[4] =  TELEPHONE_NUMBER;
-        attributeFilter[5] = GIVEN_NAME;
-        attributeFilter[6] = UID_NUMBER;
-        attributeFilter[7] = L;
-        attributeFilter[8] = ST;
-        attributeFilter[9] =CO;
-        attributeFilter[10] = MEMBER_OF;
-        attributeFilter[11] = SN;
-        attributeFilter[12] = MAIL;
-        attributeFilter[13] = DISTINGUISHED_NAME;
-
-        sc.setReturningAttributes(attributeFilter);
-        sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
-
-        return sc;
-    }
-
-    public Map<String, String> getUserInfo(String userName) {
-        Map<String, String> infos = null;
-        for (int i = 0; i < ldapSrvs.size(); i++) {
-            if(LOG.isDebugEnabled()) LOG.debug("Using server: "+ldapSrvs.get(i));
-            infos = getUserInfo(i, userName);
-            if (infos.size() > 0)
-                break;
-        }
-        return infos;
-    }
-
-    public Map<String, String> getUserInfo(int id, String userName) {
-        if(LOG.isDebugEnabled()) LOG.debug("Ldap get user information for id:"+id+", username:"+userName);
-        DirContext ctx = getDirContext(id);
-        Map<String, String> infos = new HashMap<String, String>();
-
-        if (ctx != null) {
-            try {
-                SearchControls sc = getSearchControl();
-                String filter = "(&(objectClass=user)(sAMAccountName=" + userName + "))";
-                NamingEnumeration<?> results = ctx.search("OU=Accounts_User,DC=corp,DC=company1,DC=com", filter, sc);
-
-                while (results.hasMore()) {
-                    SearchResult sr = (SearchResult) results.next();
-                    Attributes attrs = sr.getAttributes();
-
-                    for (NamingEnumeration<?> ae = attrs.getAll(); ae.hasMoreElements();) {
-                        Attribute attr = (Attribute) ae.next();
-                        String attrId = attr.getID();
-                        for (NamingEnumeration<?> vals = attr.getAll(); vals.hasMore();) {
-                            String thing = vals.next().toString();
-                            infos.put(attrId, thing);
-                        }
-                    }
-                }
-            } catch (NamingException e) {
-                LOG.error("LDAP authentication failed with exception: "+e.getMessage(),e);
-            }
-        }
-
-        if(LOG.isDebugEnabled()) LOG.debug(infos.toString());
-        return infos;
-    }
-
-    public boolean authenticate(String userName, String password) {
-        for (int i = 0; i < ldapSrvs.size(); i++) {
-            if (authenticate(i, userName, password))
-                return true;
-        }
-        return false;
-    }
-
-    public boolean authenticate(int id, String userName, String password) {
-        boolean result = false;
-
-        DirContext ctx = getDirContext(id);
-        if (ctx != null) {
-            try {
-                SearchControls sc = getSearchControl();
-                String filter = "(&(objectClass=user)(sAMAccountName=" + userName + "))";
-                NamingEnumeration<?> results = ctx.search("OU=Accounts_User,DC=corp,DC=company1,DC=com", filter, sc);
-
-                String userDN = null;
-                if (results.hasMore()) {
-                    while (results.hasMore()) {
-                        SearchResult sr = (SearchResult) results.next();
-                        Attributes attrs = sr.getAttributes();
-
-                        userDN = attrs.get("distinguishedName").get().toString();
-                    }
-                }
-                ctx.close();
-
-                if (userDN != null) {
-                    Hashtable<String, String> uenv = new Hashtable<String, String>();
-//					if (ldapCerts != null) {
-                    uenv.put(Context.SECURITY_PROTOCOL, "ssl");
-//					}
-                    uenv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
-                    uenv.put(Context.PROVIDER_URL, ldapSrvs.get(id));
-                    uenv.put(Context.SECURITY_AUTHENTICATION, "simple");
-                    uenv.put(Context.SECURITY_PRINCIPAL, userDN);
-                    uenv.put(Context.SECURITY_CREDENTIALS, password);
-                    uenv.put("java.naming.ldap.factory.socket","hadoop.eagle.common.service.TrustAllSSLSocketFactory");
-                    DirContext uctx = new InitialDirContext(uenv);
-                    uctx.close();
-
-                    result = true;
-                }
-            } catch (NamingException e) {
-                LOG.error("LDAP authentication failed with exception: " + e.getMessage(), e);
-            }
-        }
-
-        return result;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/POSTResultEntityBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/POSTResultEntityBase.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/POSTResultEntityBase.java
deleted file mode 100644
index e0daeb7..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/POSTResultEntityBase.java
+++ /dev/null
@@ -1,42 +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.common.service;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success", "exception"})
-public class POSTResultEntityBase {
-	private boolean success;
-	private String exception;
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/TrustAllSSLSocketFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/TrustAllSSLSocketFactory.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/TrustAllSSLSocketFactory.java
deleted file mode 100644
index 9facc82..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/service/TrustAllSSLSocketFactory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.common.service;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.security.cert.X509Certificate;
-
-public class TrustAllSSLSocketFactory extends SSLSocketFactory
-{
-	private SSLSocketFactory socketFactory;
-	public TrustAllSSLSocketFactory()
-	{
-		try {
-			SSLContext ctx = SSLContext.getInstance("SSL");
-//			ctx.init(null, new TrustManager[]{new TrustAnyTrustManager() {}}, new SecureRandom());
-			ctx.init(null, new TrustManager[]{new TrustAnyTrustManager() {}}, null);
-			socketFactory = ctx.getSocketFactory();
-		} catch ( Exception ex ){ ex.printStackTrace(System.err);  /* handle exception */ }
-	}
-	public static SocketFactory getDefault(){
-		return new TrustAllSSLSocketFactory();
-	}
-	@Override
-	public String[] getDefaultCipherSuites()
-	{
-		return socketFactory.getDefaultCipherSuites();
-	}
-	@Override
-	public String[] getSupportedCipherSuites()
-	{
-		return socketFactory.getSupportedCipherSuites();
-	}
-	@Override
-	public Socket createSocket(Socket socket, String string, int i, boolean bln) throws IOException
-	{
-		return socketFactory.createSocket(socket, string, i, bln);
-	}
-	@Override
-	public Socket createSocket(String string, int i) throws IOException, UnknownHostException
-	{
-		return socketFactory.createSocket(string, i);
-	}
-	@Override
-	public Socket createSocket(String string, int i, InetAddress ia, int i1) throws IOException, UnknownHostException
-	{
-		return socketFactory.createSocket(string, i, ia, i1);
-	}
-	@Override
-	public Socket createSocket(InetAddress ia, int i) throws IOException
-	{
-		return socketFactory.createSocket(ia, i);
-	}
-	@Override
-	public Socket createSocket(InetAddress ia, int i, InetAddress ia1, int i1) throws IOException
-	{
-		return socketFactory.createSocket(ia, i, ia1, i1);
-	}
-
-	private static class TrustAnyTrustManager implements X509TrustManager {
-		@Override
-		public void checkClientTrusted( final X509Certificate[] chain, final String authType ) {
-		}
-		@Override
-		public void checkServerTrusted( final X509Certificate[] chain, final String authType ) {
-		}
-		@Override
-		public X509Certificate[] getAcceptedIssuers() {
-			return null;
-		}
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/resources/footer.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/resources/footer.vm b/eagle-core/eagle-query/eagle-common/src/main/resources/footer.vm
deleted file mode 100755
index 89cf245..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/resources/footer.vm
+++ /dev/null
@@ -1,25 +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.
- *
- * @version 0.3.0
- *#
-	</td>
-  </tr>
-  </tr>
-</table>
-<!-- End of wrapper table -->
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/resources/header.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/resources/header.vm b/eagle-core/eagle-query/eagle-common/src/main/resources/header.vm
deleted file mode 100755
index 6731aee..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/resources/header.vm
+++ /dev/null
@@ -1,303 +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.
- *
- * @version 0.3.0
- *#
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-  <title></title>
-  <style type="text/css">
-    /* Based on The MailChimp Reset INLINE: Yes. */
-    /* Client-specific Styles */
-    .outlook a {
-      color: #091D42;
-      padding: 0;
-      text-decoration: none;
-    }
-
-    /* Force Outlook to provide a "view in browser" menu link. */
-    body {
-      width: 100% !important;
-      -webkit-text-size-adjust: 100%;
-      -ms-text-size-adjust: 100%;
-      margin: 0;
-      padding: 0;
-    }
-
-    /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
-    .ExternalClass {
-      width: 100%;
-    }
-
-    /* Force Hotmail to display emails at full width */
-    .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
-      line-height: 100%;
-    }
-
-    /* Forces Hotmail to display normal line spacing.  More on that: http://www.emailonacid.com/forum/viewthread/43/ */
-    #backgroundTable {
-      margin: 0;
-      padding: 0;
-      width: 100% !important;
-      line-height: 100% !important;
-        border: 1pt solid #BFB8AF;
-        background-color: #fff;
-    }
-
-    /* End reset */
-
-    /* Some sensible defaults for images
-    Bring inline: Yes. */
-    img {
-      outline: none;
-      text-decoration: none;
-      -ms-interpolation-mode: bicubic;
-    }
-
-    a img {
-      border: none;
-    }
-
-    .image_fix {
-      display: block;
-    }
-
-    /* Yahoo paragraph fix
-    Bring inline: Yes. */
-    p {
-      margin: 1em 0;
-    }
-
-    /* Hotmail header color reset
-    Bring inline: Yes. */
-    h1, h2, h3, h4, h5, h6 {
-      color: black !important;
-    }
-
-    h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
-      color: blue !important;
-    }
-
-    h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
-      color: red !important; /* Preferably not the same color as the normal header link color.  There is limited support for psuedo classes in email clients, this was added just for good measure. */
-    }
-
-    h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
-      color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
-    }
-
-    table{
-        width: 100%;
-    }
-
-    /* Outlook 07, 10 Padding issue fix
-    Bring inline: No.*/
-    table td {
-      border-collapse: collapse;
-    }
-
-    /* Remove spacing around Outlook 07, 10 tables
-    Bring inline: Yes */
-    table {
-      border-collapse: collapse;
-      mso-table-lspace: 0pt;
-      mso-table-rspace: 0pt;
-    }
-
-    /* Styling your links has become much simpler with the new Yahoo.  In fact, it falls in line with the main credo of styling in email and make sure to bring your styles inline.  Your link colors will be uniform across clients when brought inline.
-    Bring inline: Yes. */
-    a {
-      color: orange;
-    }
-
-    /***************************************************
-    ****************************************************
-    MOBILE TARGETING
-    ****************************************************
-    ***************************************************/
-    @media only screen and (max-device-width: 480px) {
-      /* Part one of controlling phone number linking for mobile. */
-      a[href^="tel"], a[href^="sms"] {
-        text-decoration: none;
-        color: blue; /* or whatever your want */
-        pointer-events: none;
-        cursor: default;
-      }
-
-      .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
-        text-decoration: default;
-        color: orange !important;
-        pointer-events: auto;
-        cursor: default;
-      }
-
-    }
-
-    /* More Specific Targeting */
-
-    @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
-      /* You guessed it, ipad (tablets, smaller screens, etc) */
-      /* repeating for the ipad */
-      a[href^="tel"], a[href^="sms"] {
-        text-decoration: none;
-        color: blue; /* or whatever your want */
-        pointer-events: none;
-        cursor: default;
-      }
-
-      .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
-        text-decoration: default;
-        color: orange !important;
-        pointer-events: auto;
-        cursor: default;
-      }
-    }
-
-    @media only screen and (-webkit-min-device-pixel-ratio: 2) {
-      /* Put your iPhone 4g styles in here */
-    }
-
-    /* Android targeting */
-    @media only screen and (-webkit-device-pixel-ratio: .75) {
-      /* Put CSS for low density (ldpi) Android layouts in here */
-    }
-
-    @media only screen and (-webkit-device-pixel-ratio: 1) {
-      /* Put CSS for medium density (mdpi) Android layouts in here */
-    }
-
-    @media only screen and (-webkit-device-pixel-ratio: 1.5) {
-      /* Put CSS for high density (hdpi) Android layouts in here */
-    }
-
-    /* end Android targeting */
-    .head{
-      font-family:Helvetica, Arial;
-      font-size:30px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 25px 0 15px 0;
-      valign:middle;
-      font-weight: 500;
-      border-bottom: 1px solid #cccccc;
-    }
-
-    .head2{
-      font-family:Helvetica, Arial;
-      font-size:24px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 20px 0 10px 0;
-      valign:middle;
-      font-weight: 500;
-    }
-
-    .text{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 0.5em 0em 0.5em 0em;
-      valign:middle;
-    }
-
-    .info {
-      font-family:Helvetica, Arial;
-      font-size:16px;
-      text-decoration:none;
-      text-align:left;
-      padding-left:10px;
-      border-left: 3px solid #396A92;
-      background-color: #9AB4CB;
-      color:#091D42;
-      align:left;
-      padding: 1em 0em 1em 1em;
-      valign:middle;
-    }
-
-    .table-border{
-      border: 1px solid #ddd;
-      border-radius: 4px 4px 0 0;
-      box-shadow: none;
-    }
-
-    .table-border-th{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      border-top: 1px solid #cccccc;
-      border-right: 1px solid #cccccc;
-      padding: 8px;
-    }
-    .table-border-td{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      border-top: 1px solid #cccccc;
-      border-right: 1px solid #cccccc;
-      padding: 8px;
-      word-break: break-all;
-    }
-
-    .foot{
-      font-family:Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      padding: 0.5em 0em 0.5em 0.5em;
-      border-top: 1px solid #cccccc;
-      color:#777;
-    }
-
-  /* extend by hchen9 */
-
-  </style>
-
-  <!-- Targeting Windows Mobile -->
-  <!--[if IEMobile 7]>
-  <style type="text/css">
-
-  </style>
-  <![endif]-->
-
-  <!-- ***********************************************
-  ****************************************************
-  END MOBILE TARGETING
-  ****************************************************
-  ************************************************ -->
-
-  <!--[if gte mso 9]>
-  <style>
-    /* Target Outlook 2007 and 2010 */
-  </style>
-  <![endif]-->
-</head>
-<body>
-<!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. -->
-<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" width="100%">
-  <tr>
-    <td valign="top" style="padding-left: 10px">

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/resources/templates/tec_alert.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/resources/templates/tec_alert.vm b/eagle-core/eagle-query/eagle-common/src/main/resources/templates/tec_alert.vm
deleted file mode 100755
index 75c47d1..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/resources/templates/tec_alert.vm
+++ /dev/null
@@ -1,113 +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.
- *
- * @version 0.3.0
- *#
-#parse("header.vm")
-<table cellpadding="0" cellspacing="0" border="0" align="left" width="800" style="">
-  <tr>
-    <td class="head" width="800">
-      <span style="color: #091D42">Eagle Service <small style="color: #999999;">$startTime ~ $endTime</small></span>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Statistics
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-        <tr>
-          <th class="table-border-th" style="width: 25%">type</th>
-          <th class="table-border-th" style="width: 25%">count</th>
-          <th class="table-border-th" style="width: 25%">type</th>
-          <th class="table-border-th" style="width: 25%">count</th>
-        </tr>
-        </thead>
-        <tbody>
-        #foreach($key in $statistics.keySet())
-          #if( $foreach.count % 2 == 1 )
-          <tr>
-          #end
-            <td class="table-border-td">$key</td>
-            <td class="table-border-td">$statistics.get($key)</td>
-          #if( $foreach.count % 2 == 0)
-          </tr>
-          #end
-          #if( $foreach.count % 2 == 1 && !$foreach.hasNext )
-          	<td class="table-border-td"></td>
-            <td class="table-border-td"></td>
-          </tr>
-          #end
-       	#end
-        </tbody>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Detail Info
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td class="info" width="800">
-      <span>
-          These are the alerts that we can not find its hostname.
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-          <tr>
-            <th class="table-border-th">hostname</th>
-            <th class="table-border-th">date_reception</th>
-            <th class="table-border-th">type</th>
-            <th class="table-border-th">origin</th>
-            <th class="table-border-th">msg</th>
-          </tr>
-        </thead>
-        <tbody>
-        #foreach($entry in $noHostnameItems)
-          <tr>
-            <td class="table-border-td">$entry.hostname</td>
-            <td class="table-border-td">$entry.date_reception</td>
-            <td class="table-border-td">$entry.type</td>
-            <td class="table-border-td">$entry.origin</td>
-            <td class="table-border-td">$entry.msg</td>
-          </tr>
-       	#end
-        </tbody>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td class="foot" width="800">
-      <span class="outlook">
-         Copyright &copy; 2013 <a href="http://123.dc1.xyz.com:9090/eagle-web/ui/eagle.html"
-                  target ="_blank" title="Hadoop Eagle">Hadoop Eagle</a>
-      </span>
-    </td>
-  </tr>
-</table>
-#parse("footer.vm")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestByteUtil.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestByteUtil.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestByteUtil.java
deleted file mode 100644
index 1cf6b8c..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestByteUtil.java
+++ /dev/null
@@ -1,112 +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.common;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestByteUtil {
-	
-	@Test
-	public void testLongAndBytesConversion() {
-		long origValue = 0x1234567812345678L;
-		byte[] bytes = ByteUtil.longToBytes(origValue);
-		checkNonZeros(bytes);
-		long value = ByteUtil.bytesToLong(bytes);
-		Assert.assertEquals(origValue, value);
-		bytes = new byte[16];
-		checkZeros(bytes);
-		ByteUtil.longToBytes(origValue, bytes, 4);
-		checkZeros(bytes, 0, 4);
-		checkZeros(bytes, 12, 16);
-		checkNonZeros(bytes, 4, 12);
-		value = ByteUtil.bytesToLong(bytes, 4);
-		Assert.assertEquals(origValue, value);
-	}
-	
-	@Test
-	public void testDoubleAndBytesConversion() {
-		double origValue =  (double)0x1234567812345678L;
-		byte[] bytes = ByteUtil.doubleToBytes(origValue);
-		checkNonZeros(bytes);
-		double value = ByteUtil.bytesToDouble(bytes);
-		Assert.assertEquals(origValue, value);
-		bytes = new byte[16];
-		checkZeros(bytes);
-		ByteUtil.doubleToBytes(origValue, bytes, 4);
-		checkZeros(bytes, 0, 4);
-		checkZeros(bytes, 12, 16);
-		checkNonZeros(bytes, 4, 12);
-		value = ByteUtil.bytesToDouble(bytes, 4);
-		Assert.assertEquals(origValue, value);
-	}
-	
-	@Test
-	public void testIntAndBytesConversion() {
-		int origValue = 0x12345678;
-		byte[] bytes = ByteUtil.intToBytes(origValue);
-		Assert.assertEquals(4, bytes.length);
-		Assert.assertEquals(0x12, bytes[0]);
-		Assert.assertEquals(0x34, bytes[1]);
-		Assert.assertEquals(0x56, bytes[2]);
-		Assert.assertEquals(0x78, bytes[3]);
-		checkNonZeros(bytes);
-		int value = ByteUtil.bytesToInt(bytes);
-		Assert.assertEquals(origValue, value);
-		bytes = new byte[12];
-		checkZeros(bytes);
-		ByteUtil.intToBytes(origValue, bytes, 4);
-		checkZeros(bytes, 0, 4);
-		checkZeros(bytes, 8, 12);
-		checkNonZeros(bytes, 4, 8);
-		value = ByteUtil.bytesToInt(bytes, 4);
-		Assert.assertEquals(origValue, value);
-	}
-
-	@Test
-	public void testShortAndBytesConversion() {
-		short origValue = 0x1234;
-		byte[] bytes = ByteUtil.shortToBytes(origValue);
-		Assert.assertEquals(2, bytes.length);
-		Assert.assertEquals(0x12, bytes[0]);
-		Assert.assertEquals(0x34, bytes[1]);
-		checkNonZeros(bytes);
-		short value = ByteUtil.bytesToShort(bytes);
-		Assert.assertEquals(origValue, value);
-	}
-
-	private void checkZeros(byte[] bytes) {
-		checkZeros(bytes, 0, bytes.length);
-	}
-	
-	private void checkZeros(byte[] bytes, int i, int j) {
-		for (int k = i; k < j; ++k) {
-			Assert.assertEquals((byte)0, bytes[k]);
-		}
-	}
-
-	private void checkNonZeros(byte[] bytes) {
-		checkNonZeros(bytes, 0, bytes.length);
-	}
-	
-	private void checkNonZeros(byte[] bytes, int i, int j) {
-		for (int k = i; k < j; ++k) {
-			Assert.assertNotSame((byte)0, bytes[k]);
-		}
-	}
-}



[32/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-server/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/pom.xml b/eagle-core/eagle-embed/eagle-embed-server/pom.xml
deleted file mode 100644
index d5b5e50..0000000
--- a/eagle-core/eagle-embed/eagle-embed-server/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-embed-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-	<artifactId>eagle-embed-server</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-embed-server</name>
-	<dependencies>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-core</artifactId>
-	    </dependency>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-el</artifactId>
-	    </dependency>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-jasper</artifactId>
-	    </dependency>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-logging-juli</artifactId>
-	    </dependency>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-logging-log4j</artifactId>
-	    </dependency>
-	    <dependency>
-			<groupId>org.apache.tomcat.embed</groupId>
-			<artifactId>tomcat-embed-websocket</artifactId>
-	    </dependency>
-  		<dependency>
-          	<groupId>log4j</groupId>
-  			<artifactId>log4j</artifactId>
-        </dependency>        
-        <!--<dependency>-->
-            <!--<groupId>org.slf4j</groupId>-->
-            <!--<artifactId>slf4j-log4j12</artifactId>-->
-        <!--</dependency>-->
-      	<dependency>
-       		<groupId>org.slf4j</groupId>
-			<artifactId>log4j-over-slf4j</artifactId>
-      	</dependency>
-	</dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>test-jar</id>
-                        <phase>test-compile</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-server/runEmbeddedServer.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/runEmbeddedServer.sh b/eagle-core/eagle-embed/eagle-embed-server/runEmbeddedServer.sh
deleted file mode 100755
index a1ac537..0000000
--- a/eagle-core/eagle-embed/eagle-embed-server/runEmbeddedServer.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
-mvn -X exec:java -Dexec.mainClass="org.apache.eagle.service.embedded.tomcat.EmbeddedServer" -Dexec.args="../../../eagle-security/eagle-security-webservice/target/eagle-service 38080"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-server/src/main/java/org/apache/eagle/service/embedded/tomcat/EmbeddedServer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/src/main/java/org/apache/eagle/service/embedded/tomcat/EmbeddedServer.java b/eagle-core/eagle-embed/eagle-embed-server/src/main/java/org/apache/eagle/service/embedded/tomcat/EmbeddedServer.java
deleted file mode 100644
index 35d3967..0000000
--- a/eagle-core/eagle-embed/eagle-embed-server/src/main/java/org/apache/eagle/service/embedded/tomcat/EmbeddedServer.java
+++ /dev/null
@@ -1,109 +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.service.embedded.tomcat;
-
-import java.io.File;
-
-import org.apache.catalina.LifecycleState;
-import org.apache.catalina.startup.Tomcat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class EmbeddedServer {
-	
-	private static EmbeddedServer server;
-	private Tomcat tomcat;
-	private String webappDirLocation;
-	private int port;
-	private static int DEFAULT_TOMCAT_PORT = 38080;
-	private static final Logger LOG = LoggerFactory.getLogger(EmbeddedServer.class);
-		
-	public static void main(String[] args) {
-        // args: webappLocation, port
-        int tomcatPort;
-        if (args.length > 1) {
-            tomcatPort = Integer.valueOf(args[1]);
-        } else {
-            tomcatPort = DEFAULT_TOMCAT_PORT;
-        }
-        new EmbeddedServer(args[0], tomcatPort).start();
-	}
-
-	private EmbeddedServer(String webappDirLocation) {
-		this(webappDirLocation, DEFAULT_TOMCAT_PORT);
-	}
-	
-	private EmbeddedServer(String webappDirLocation, int port) {
-		this.webappDirLocation = webappDirLocation;
-		this.port = port;
-	}
-	
-    public static EmbeddedServer getInstance(String webappDirLocation) {
-    	if (server == null) {
-    		synchronized(EmbeddedServer.class) {
-    			if (server == null) {
-    				server = new EmbeddedServer(webappDirLocation);
-    				server.start();   						
-    			}
-    		}
-    	}
-    	return server;
-    }
-
-	public int getPort() {
-		return port;
-	}
-	
-	public void start() {
-		tomcat = new Tomcat();
-		tomcat.setHostname("localhost");
-		tomcat.setPort(port);
-		try {
-			tomcat.addWebapp("/eagle-service", new File(webappDirLocation).getAbsolutePath());
-			tomcat.start();
-
-		} catch (Exception ex) {
-			LOG.error("Got an exception " + ex.getMessage());
-		}
-
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            @Override
-            public void run() {
-            	try {            		
-            		shutdown();
-            	}
-            	catch (Throwable t) {
-            		LOG.error("Got an exception why shutting down..." + t.getMessage());
-            	}
-            }
-        });
-		try {
-			Thread.sleep(10000000);
-		}catch(Exception ex){
-			ex.printStackTrace();
-		}
-	}
-	
-	public void shutdown() throws Throwable {
-	  	if (tomcat.getServer() != null && tomcat.getServer().getState() != LifecycleState.DESTROYED) {
-	        if (tomcat.getServer().getState() != LifecycleState.STOPPED) {
-	        	tomcat.stop();
-	        }
-	        tomcat.destroy();
-	    }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/eagle-embed-server/src/test/java/org/apache/eagle/service/embedded/tomcat/TestEmbeddedServer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/eagle-embed-server/src/test/java/org/apache/eagle/service/embedded/tomcat/TestEmbeddedServer.java b/eagle-core/eagle-embed/eagle-embed-server/src/test/java/org/apache/eagle/service/embedded/tomcat/TestEmbeddedServer.java
deleted file mode 100644
index 1351ac7..0000000
--- a/eagle-core/eagle-embed/eagle-embed-server/src/test/java/org/apache/eagle/service/embedded/tomcat/TestEmbeddedServer.java
+++ /dev/null
@@ -1,26 +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.service.embedded.tomcat;
-
-public class TestEmbeddedServer {
-	
-	//@Test
-	public void test() throws Throwable{
-		String webappDirLocation = "../../../eagle-webservice/target/eagle-service";
-		EmbeddedServer.getInstance(webappDirLocation);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-embed/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-embed/pom.xml b/eagle-core/eagle-embed/pom.xml
deleted file mode 100644
index 098e9a6..0000000
--- a/eagle-core/eagle-embed/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-core</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-embed-parent</artifactId>
-    <packaging>pom</packaging>
-
-    <modules>
-        <module>eagle-embed-hbase</module>
-        <module>eagle-embed-server</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
deleted file mode 100644
index ed0ac4d..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>eagle</groupId>
-    <artifactId>eagle-machinelearning-parent</artifactId>
-    <version>0.3.0</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <artifactId>eagle-machinelearning-base</artifactId>
-  <name>eagle-machinelearning-base</name>
-  <url>http://maven.apache.org</url>
-  <dependencies>
-    <dependency>
-    	<groupId>eagle</groupId>
-    	<artifactId>eagle-alert-process</artifactId>
-    	<version>${project.version}</version>
-    </dependency>
-  </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAlgorithmEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAlgorithmEvaluator.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAlgorithmEvaluator.java
deleted file mode 100644
index 800b6e0..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAlgorithmEvaluator.java
+++ /dev/null
@@ -1,50 +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.ml;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.ml.model.MLAlgorithm;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-
-/**
- * Machine Learning Algorithm Evaluator
- */
-public interface MLAlgorithmEvaluator {
-    /**
-     * Prepare Machine learning algorithm
-     *
-     * @param algorithm MLAlgorithm instance
-     */
-    public void init(MLAlgorithm algorithm, Config config, PolicyEvaluationContext context);
-
-    /**
-     * Evaluate input user profile model
-     *
-     * @param data ValuesArray
-     * @throws Exception
-     */
-	public void evaluate(ValuesArray data) throws Exception;
-
-    /**
-     * Register callback
-     *
-     * @param callbackObj MachineLearningCallback
-     * @throws Exception
-     */
-	public void register(MLAnomalyCallback callbackObj) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAnomalyCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAnomalyCallback.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAnomalyCallback.java
deleted file mode 100644
index 5005c42..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLAnomalyCallback.java
+++ /dev/null
@@ -1,28 +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.ml;
-
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.ml.model.MLCallbackResult;
-
-public interface MLAnomalyCallback {
-    /**
-     * @param callbackResult call-backed result
-     * @param alertContext context
-     */
-	void receive(MLCallbackResult callbackResult,PolicyEvaluationContext alertContext);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLConstants.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLConstants.java
deleted file mode 100644
index 9197d59..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLConstants.java
+++ /dev/null
@@ -1,24 +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.ml;
-
-public class MLConstants {
-	public final static String ML_MODEL_SERVICE_NAME = "MLModelService";
-	public final static String ALGORITHM = "algorithm";
-	public final static String USER = "user";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLModelDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLModelDAO.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLModelDAO.java
deleted file mode 100644
index 13eb7e1..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLModelDAO.java
+++ /dev/null
@@ -1,30 +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.ml;
-
-import org.apache.eagle.ml.model.MLModelAPIEntity;
-
-import java.util.List;
-
-public interface MLModelDAO {
-    /**
-     * @param user
-     * @param algorithm
-     * @return
-     */
-	List<MLModelAPIEntity> findMLModelByContext(String user, String algorithm);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLPolicyEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLPolicyEvaluator.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLPolicyEvaluator.java
deleted file mode 100644
index 36bcaec..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/MLPolicyEvaluator.java
+++ /dev/null
@@ -1,170 +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.ml;
-
-import com.typesafe.config.Config;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.ml.impl.MLAnomalyCallbackImpl;
-import org.apache.eagle.ml.model.MLAlgorithm;
-import org.apache.eagle.ml.model.MLPolicyDefinition;
-import org.apache.eagle.ml.utils.MLReflectionUtils;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.PolicyEvaluator;
-import org.apache.eagle.policy.PolicyManager;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-public class MLPolicyEvaluator implements PolicyEvaluator<AlertDefinitionAPIEntity> {
-	private static Logger LOG = LoggerFactory.getLogger(MLPolicyEvaluator.class);
-    private volatile MLRuntime mlRuntime;
-	private Config config;
-	private Map<String,String> context;
-	private final PolicyEvaluationContext<AlertDefinitionAPIEntity, AlertAPIEntity> evalContext;
-
-	private class MLRuntime{
-		MLPolicyDefinition mlPolicyDef;
-		MLAlgorithmEvaluator[] mlAlgorithmEvaluators;
-		List<MLAnomalyCallback> mlAnomalyCallbacks = new ArrayList<>();
-	}
-
-	public MLPolicyEvaluator(Config config, PolicyEvaluationContext<AlertDefinitionAPIEntity, AlertAPIEntity> evalContext, AbstractPolicyDefinition policyDef, String[] sourceStreams){
-		this(config, evalContext, policyDef, sourceStreams, false);
-	}
-
-	/**
-	 * needValidation does not take effect for machine learning use case
-	 * @param policyDef
-	 * @param sourceStreams
-	 * @param needValidation
-	 */
-	public MLPolicyEvaluator(Config config, PolicyEvaluationContext<AlertDefinitionAPIEntity, AlertAPIEntity> evalContext, AbstractPolicyDefinition policyDef, String[] sourceStreams, boolean needValidation){
-		this.config = config;
-		this.evalContext = evalContext;
-        LOG.info("Initializing policy named: " + evalContext.policyId);
-        this.context = new HashMap<>();
-        this.context.put(Constants.SOURCE_STREAMS, StringUtils.join(sourceStreams,","));
-		this.init(policyDef);
-	}
-
-	public void init(AbstractPolicyDefinition policyDef){
-		LOG.info("Initializing MLPolicyEvaluator ...");
-		try{
-			mlRuntime = newMLRuntime((MLPolicyDefinition) policyDef);
-		}catch(Exception e){
-			LOG.error("ML Runtime creation failed: " + e.getMessage());
-		}
-	}
-
-	private MLRuntime newMLRuntime(MLPolicyDefinition mlPolicyDef) {
-		MLRuntime runtime = new MLRuntime();
-
-		try{
-			runtime.mlPolicyDef = mlPolicyDef;
-
-			LOG.info("policydef: " + ((runtime.mlPolicyDef == null)? "policy definition is null": "policy definition is not null"));
-			Properties alertContext = runtime.mlPolicyDef.getContext();
-			LOG.info("alert context received null? " + ((alertContext == null? "yes": "no")));
-			MLAnomalyCallback callbackImpl = new MLAnomalyCallbackImpl(this, config);
-			runtime.mlAnomalyCallbacks.add(callbackImpl);
-
-			MLAlgorithm[] mlAlgorithms = mlPolicyDef.getAlgorithms();
-			runtime.mlAlgorithmEvaluators = new MLAlgorithmEvaluator[mlAlgorithms.length];
-			LOG.info("mlAlgorithms size:: " + mlAlgorithms.length);
-			int i = 0; 
-			for(MLAlgorithm algorithm:mlAlgorithms){
-                MLAlgorithmEvaluator mlAlgorithmEvaluator = MLReflectionUtils.newMLAlgorithmEvaluator(algorithm);
-                mlAlgorithmEvaluator.init(algorithm, config, evalContext);
-				runtime.mlAlgorithmEvaluators[i] =  mlAlgorithmEvaluator;
-				LOG.info("mlAlgorithmEvaluator: " + mlAlgorithmEvaluator.toString());
-						mlAlgorithmEvaluator.register(callbackImpl);
-				i++;
-			}
-		}catch(Exception ex){
-            LOG.error("Failed to create runtime for policy named: "+this.getPolicyName(),ex);
-		}
-		return runtime;
-	}
-	
-	@Override
-	public void evaluate(ValuesArray data) throws Exception {
-		LOG.info("Evaluate called with input: " + data.size());
-		synchronized(mlRuntime){
-			for(MLAlgorithmEvaluator mlAlgorithm:mlRuntime.mlAlgorithmEvaluators){
-				mlAlgorithm.evaluate(data);
-			}
-		}
-	}
-
-	@Override
-	public void onPolicyUpdate(AlertDefinitionAPIEntity newAlertDef) {
-		LOG.info("onPolicyUpdate called");
-		AbstractPolicyDefinition policyDef = null;		
-		try {
-			policyDef = JsonSerDeserUtils.deserialize(newAlertDef.getPolicyDef(), 
-					AbstractPolicyDefinition.class, PolicyManager.getInstance().getPolicyModules(newAlertDef.getTags().get("policyType")));
-		} catch (Exception ex) {
-			LOG.error("initial policy def error, ", ex);
-		}
-		MLRuntime previous = mlRuntime;
-		mlRuntime = newMLRuntime((MLPolicyDefinition) policyDef);
-		synchronized (previous) {
-			previous.mlAnomalyCallbacks = null;
-			previous.mlAlgorithmEvaluators = null;
-			previous.mlPolicyDef = null; 
-		}
-		previous = null;
-	}
-
-	@Override
-	public void onPolicyDelete() {
-		LOG.info("onPolicyDelete called");
-		MLRuntime previous = mlRuntime;
-		synchronized (previous) {
-			previous.mlAnomalyCallbacks = null;
-			previous.mlAlgorithmEvaluators = null;
-			previous.mlPolicyDef = null; 
-		}
-		previous = null;
-	}
-
-    public String getPolicyName() {
-		return evalContext.policyId;
-	}
-	
-	@Override
-	public Map<String, String> getAdditionalContext() {
-		return this.context;
-	}
-	
-	public List<String> getOutputStreamAttrNameList() {
-		return new ArrayList<String>();
-	}
-
-	@Override
-	public boolean isMarkdownEnabled() { return false; }
-
-	@Override
-	public String getMarkdownReason() { return null; }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLAnomalyCallbackImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLAnomalyCallbackImpl.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLAnomalyCallbackImpl.java
deleted file mode 100644
index a889361..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLAnomalyCallbackImpl.java
+++ /dev/null
@@ -1,107 +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.ml.impl;
-
-import java.lang.management.ManagementFactory;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.ml.MLAnomalyCallback;
-import org.apache.eagle.ml.MLPolicyEvaluator;
-import org.apache.eagle.ml.model.MLCallbackResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.typesafe.config.Config;
-
-public class MLAnomalyCallbackImpl implements MLAnomalyCallback {
-	private static Logger LOG = LoggerFactory.getLogger(MLAnomalyCallbackImpl.class);
-	private MLPolicyEvaluator mlAlertEvaluator;
-	private Config config;
-
-
-    public static final String source = ManagementFactory.getRuntimeMXBean().getName();
-	
-	public MLAnomalyCallbackImpl(MLPolicyEvaluator mlAlertEvaluator, Config config){
-		this.mlAlertEvaluator = mlAlertEvaluator;
-		this.config = config;
-	}
-
-    /**
-     * TODO: generate alert
-     *
-     * @param aResult
-     * @param alertContext context
-     */
-	@Override
-	public void receive(MLCallbackResult aResult,PolicyEvaluationContext alertContext) {
-		LOG.info("Receive called with : " + aResult.toString());
-        AlertAPIEntity alert = renderAlert(aResult,alertContext);
-        alertContext.alertExecutor.onEvalEvents(alertContext, Arrays.asList(alert));
-	}
-
-    private AlertAPIEntity renderAlert(MLCallbackResult aResult,PolicyEvaluationContext alertContext){
-        String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
-        String applicatioin = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-
-        AlertAPIEntity entity = new AlertAPIEntity();
-        entity.setDescription(aResult.toString());
-
-        Map<String, String> tags = new HashMap<>();
-        tags.put(EagleConfigConstants.SITE, site);
-        tags.put(EagleConfigConstants.APPLICATION, applicatioin);
-        tags.put(Constants.SOURCE_STREAMS, (String)alertContext.evaluator.getAdditionalContext().get(Constants.SOURCE_STREAMS));
-        tags.put(Constants.POLICY_ID, alertContext.policyId);
-        tags.put(Constants.ALERT_SOURCE, source);
-        tags.put(Constants.ALERT_EXECUTOR_ID, alertContext.alertExecutor.getExecutorId());
-        entity.setTags(tags);
-
-        entity.setTimestamp(aResult.getTimestamp());
-
-        AlertContext context = new AlertContext();
-
-        if(aResult.getContext() != null) context.addAll(aResult.getContext());
-
-        String alertMessage = "Anomaly activities detected by algorithm ["+aResult.getAlgorithmName()+"] with information: " + aResult.toString() ;
-        context.addProperty(Constants.ALERT_EVENT, aResult.toString());
-        context.addProperty(Constants.ALERT_MESSAGE, alertMessage);
-        context.addProperty(Constants.ALERT_TIMESTAMP_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()));
-
-        try {
-            site = config.getString("eagleProps.site");
-            applicatioin = config.getString("eagleProps.application");
-            context.addProperty(EagleConfigConstants.APPLICATION, applicatioin);
-            context.addProperty(EagleConfigConstants.SITE, site);
-        } catch (Exception ex) {
-            LOG.error("site, dataSource not set in config file, ", ex);
-        }
-
-        context.addProperty(EagleConfigConstants.APPLICATION, applicatioin);
-        context.addProperty(EagleConfigConstants.SITE, site);
-        context.addProperty(Constants.POLICY_NAME, alertContext.policyId);
-
-        entity.setAlertContext(context);
-        return entity;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLModelDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLModelDAOImpl.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLModelDAOImpl.java
deleted file mode 100644
index 1e3067e..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLModelDAOImpl.java
+++ /dev/null
@@ -1,62 +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.ml.impl;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.ml.MLConstants;
-import org.apache.eagle.ml.MLModelDAO;
-import org.apache.eagle.ml.model.MLModelAPIEntity;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.apache.commons.lang.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class MLModelDAOImpl implements MLModelDAO {
-	private final Logger LOG = LoggerFactory.getLogger(MLModelDAOImpl.class);
-	private final EagleServiceConnector connector;
-
-	public MLModelDAOImpl(EagleServiceConnector connector){
-		this.connector = connector;
-	}
-
-	@Override
-	public List<MLModelAPIEntity> findMLModelByContext(String user, String algorithm) {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = MLConstants.ML_MODEL_SERVICE_NAME + "[@user=\"" + user + "\" AND @algorithm=\""
-						+ algorithm + "\"]{*}";
-			GenericServiceAPIResponseEntity<MLModelAPIEntity> response =  client.search().startTime(0)
-																		                 .endTime(10 * DateUtils.MILLIS_PER_DAY)
-																		                 .pageSize(Integer.MAX_VALUE)
-																		                 .query(query)
-																	                     .send();
-            if(!response.isSuccess()) {
-                LOG.error(String.format("Failed to get model for user: %s, algorithm: %s, due to: %s",user,algorithm,response.getException()));
-            }
-
-            client.close();
-            return response.getObj();
-		} catch (Exception ex) {
-			LOG.info("Got an exception when query machinelearning model service ", ex);
-			throw new IllegalStateException(ex);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLPolicyEvaluatorServiceProviderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLPolicyEvaluatorServiceProviderImpl.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLPolicyEvaluatorServiceProviderImpl.java
deleted file mode 100644
index d0ac75f..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/impl/MLPolicyEvaluatorServiceProviderImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.ml.impl;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.PolicyEvaluator;
-import org.apache.eagle.policy.PolicyEvaluatorServiceProvider;
-import org.apache.eagle.ml.MLPolicyEvaluator;
-import org.apache.eagle.ml.model.MLPolicyDefinition;
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.jsontype.NamedType;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-public class MLPolicyEvaluatorServiceProviderImpl implements PolicyEvaluatorServiceProvider {
-
-	private final static String ALERT_CONTEXT = "alertContext";
-
-	@Override
-	public String getPolicyType() {
-		return Constants.policyType.MachineLearning.name();
-	}
-
-	@Override
-	public Class<? extends PolicyEvaluator> getPolicyEvaluator() {
-		return MLPolicyEvaluator.class;
-	}
-
-	@Override
-	public List<Module> getBindingModules() {
-		Module module1 = new SimpleModule(Constants.POLICY_DEFINITION).registerSubtypes(new NamedType(MLPolicyDefinition.class, getPolicyType()));
-		Module module2 = new SimpleModule(ALERT_CONTEXT).registerSubtypes(new NamedType(Properties.class, getPolicyType()));
-		return Arrays.asList(module1, module2);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLAlgorithm.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLAlgorithm.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLAlgorithm.java
deleted file mode 100644
index 24b4bad..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLAlgorithm.java
+++ /dev/null
@@ -1,61 +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.ml.model;
-
-import java.io.Serializable;
-
-public class MLAlgorithm implements Serializable {
-    private static final long serialVersionUID = -223531147520123L;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    private String name;
-    private String evaluator;
-    private String description;
-
-    public String getFeatures() {
-        return features;
-    }
-
-    public void setFeatures(String features) {
-        this.features = features;
-    }
-
-    private String features;
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getEvaluator() {
-        return evaluator;
-    }
-
-    public void setEvaluator(String evaluator) {
-        this.evaluator = evaluator;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLCallbackResult.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLCallbackResult.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLCallbackResult.java
deleted file mode 100644
index b457973..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLCallbackResult.java
+++ /dev/null
@@ -1,137 +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.ml.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class MLCallbackResult {
-	private boolean isAnomaly;
-	private List<String> feature;
-	private double confidence;
-	private long timestamp;
-	private List<String> datapoints;
-	private String id;
-	private String algorithmName;
-
-    public Map<String, String> getContext() {
-        return context;
-    }
-
-    public void setContext(Map<String, String> context) {
-        this.context = context;
-    }
-
-    public void setAlgorithmName(String algorithmName) {
-        this.algorithmName = algorithmName;
-    }
-
-    private Map<String,String> context;
-
-	public String getAlgorithmName() {
-		return algorithmName;
-	}
-	public void setAlgorithm(String algorithmName) {
-		this.algorithmName = algorithmName;
-	}
-	public MLCallbackResult(){
-		feature = new ArrayList<String>();
-		setDatapoints(new ArrayList<String>());
-	}
-	public boolean isAnomaly() {
-		return isAnomaly;
-	}
-	public void setAnomaly(boolean isAnomaly) {
-		this.isAnomaly = isAnomaly;
-	}
-	public List<String> getFeature() {
-		return feature;
-	}
-	public void setFeature(List<String> feature) {
-		this.feature = feature;
-	}
-
-	private boolean doesFeatureExist(String f){
-		boolean alreadyExist = false;
-		for(String s:feature){
-			if(s.equalsIgnoreCase(f))
-				alreadyExist = true;
-		}
-		return alreadyExist;
-	}
-	public void setFeature(String aFeature) {
-		if(doesFeatureExist(aFeature) == false)
-			feature.add(aFeature);
-	}
-	public double getConfidence() {
-		return confidence;
-	}
-	public void setConfidence(double confidence) {
-		this.confidence = confidence;
-	} 
-	public String toString(){
-		StringBuffer resultStr = new StringBuffer(); 
-		resultStr.append("datapoint :<");
-		int i=0; 
-		for(String d:datapoints){
-			if(i < datapoints.size()-1){
-				resultStr.append(d.trim()); 
-				resultStr.append(",");
-				i++;
-			}else
-				resultStr.append(d.trim());
-		}
-		resultStr.append("> for user: ").append(id).append(" is anomaly: ").append(this.isAnomaly).append(" at timestamp: ").append(this.timestamp);
-		if(this.isAnomaly){
-			//resultStr.append(" with confidence: " + this.confidence);
-			resultStr.append(" with algorithm: " + algorithmName);
-			resultStr.append(" with features: ");
-			int p=0;
-			resultStr.append("["); 
-			for(String s:feature){
-				if(p < feature.size()-1){
-					resultStr.append(s.trim());
-					resultStr.append(",");
-					p++;
-				}else
-					resultStr.append(s.trim());
-			}
-			resultStr.append("]");
-		}
-		return resultStr.toString();
-	}
-	
-	public long getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-	public List<String> getDatapoints() {
-		return datapoints;
-	}
-	public void setDatapoints(List<String> datapoints) {
-		this.datapoints = datapoints;
-	}
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLEntityRepository.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLEntityRepository.java
deleted file mode 100644
index 883847a..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLEntityRepository.java
+++ /dev/null
@@ -1,25 +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.ml.model;
-
-import org.apache.eagle.log.entity.repo.EntityRepository;
-
-public class MLEntityRepository extends EntityRepository {
-	public MLEntityRepository() {
-		entitySet.add(MLModelAPIEntity.class);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLModelAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLModelAPIEntity.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLModelAPIEntity.java
deleted file mode 100644
index 6f91ca6..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLModelAPIEntity.java
+++ /dev/null
@@ -1,67 +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.ml.model;
-
-import org.apache.eagle.ml.MLConstants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.Tags;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-/**
- * DDL for creating the table
- * create 'mlmodel', {NAME => 'f', BLOOMFILTER => 'ROW', VERSIONS => '1', COMPRESSION => 'SNAPPY'}
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("mlmodel")
-@ColumnFamily("f")
-@Prefix("mlmodel")
-@Service(MLConstants.ML_MODEL_SERVICE_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site","user", "algorithm"})
-public class MLModelAPIEntity extends TaggedLogAPIEntity{
-	@Column("b")
-	private String content;
-    @Column("c")
-    private long version;
-
-    public String getContent() {
-		return content;
-	}
-
-	public void setContent(String content) {
-		this.content = content;
-		valueChanged("content");
-	}
-
-    public long getVersion() {
-        return version;
-    }
-
-    public void setVersion(long version) {
-        this.version = version;
-        valueChanged("version");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLPolicyDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLPolicyDefinition.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLPolicyDefinition.java
deleted file mode 100644
index 70e0f71..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/model/MLPolicyDefinition.java
+++ /dev/null
@@ -1,82 +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.ml.model;
-
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-import java.util.Properties;
-
-/**
- {  
-   "type":"MachineLearning",
-   "context":{
-      "site":"dev",
-      "dataSource":"userprofile"
-      "component":"dev-component",
-      "description":"ML based user profile anomaly detection",
-      "severity":"WARNING",
-      "notificationByEmail":"true"
-   },
-   "algorithms":[
-      {
-         "name":"eagle.security.userprofile.util.EigenBasedAnomalyDetection",
-         "description":"EigenBasedAnomalyDetection",
-         "features":"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete"
-      },
-      {  
-         "name":"eagle.security.userprofile.util.KDEBasedAnomalyDetection",
-         "description":"DensityBasedAnomalyDetection",
-         "features":"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete"
-      }
-   ]
-}
-   version field is used for model update, so eagle framework can understand that something changes.
-
- */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible=true)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class MLPolicyDefinition extends AbstractPolicyDefinition{
-	private String version;
-	private Properties context;
-    private MLAlgorithm[] algorithms;
-
-    public MLAlgorithm[] getAlgorithms() {
-        return algorithms;
-    }
-
-    public void setAlgorithms(MLAlgorithm[] algorithms) {
-        this.algorithms = algorithms;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public Properties getContext() {
-        return context;
-    }
-
-    public void setContext(Properties context) {
-        this.context = context;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/utils/MLReflectionUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/utils/MLReflectionUtils.java b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/utils/MLReflectionUtils.java
deleted file mode 100644
index fe70165..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/java/org/apache/eagle/ml/utils/MLReflectionUtils.java
+++ /dev/null
@@ -1,38 +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.ml.utils;
-
-import org.apache.eagle.ml.MLAlgorithmEvaluator;
-import org.apache.eagle.ml.model.MLAlgorithm;
-
-/**
- * @since 8/14/15
- */
-public class MLReflectionUtils {
-    /**
-     * Create a new MLAlgorithmEvaluator based on MLAlgorithm
-     *
-     * @param algorithm MLAlgorithm
-     * @return MLAlgorithmEvaluator object instance
-     * @throws ClassNotFoundException
-     * @throws IllegalAccessException
-     * @throws InstantiationException
-     */
-    public static MLAlgorithmEvaluator newMLAlgorithmEvaluator(MLAlgorithm algorithm) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
-        return (MLAlgorithmEvaluator) Class.forName(algorithm.getEvaluator()).newInstance();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
deleted file mode 100644
index d7a2754..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.ml.impl.MLPolicyEvaluatorServiceProviderImpl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
deleted file mode 100644
index d7a2754..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.ml.impl.MLPolicyEvaluatorServiceProviderImpl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/application.conf b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/application.conf
deleted file mode 100644
index 2125cbc..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/application.conf
+++ /dev/null
@@ -1,57 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "topologyName" : "securityLogProcessTopology",
-    "mode" : "local",
-    "parallelismConfig" : {
-    }
-  },
-  "dataSourceConfig": {
-    "flavor" : "stormhdfs",
-    "hdfsConnection" : "10.225.92.42:9000",
-    "hdfsPath" : "/tmp/user1",
-    "copyToPath" : "/Users/user1/Security/hive_files/weeks_file/MLDemo_testing/consolidated",
-    "fileFormat" : "CSV",
-    "typeOperation" : "user profile generation",
-    "userlist": "/UserList.txt",
-    "containsFileHeader": true
-  },
-  "eagleProps" : {
-    "application" : "hdfsAuditLog-ML",
-    "env" : "test",
-    "mail.host" : "mailHost.com",
-    "mail.debug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "alertExecutorConfigs" : {
-     "userAnomalousActivityDetectionAlertExecutor" : {
-       "parallelism" : 2,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-     }
-  },
-  "dynamicConfigSource" : {
-     "eagleServiceHost" : "localhost",
-     "eagleServicePort" : "8080",
-     "enabled"          : "true"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/log4j.properties b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/log4j.properties
deleted file mode 100644
index 71a5dac..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, DRFA, stdout
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-# 30-day backup
-#log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/ml-policyDef-UserProfile.txt
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/ml-policyDef-UserProfile.txt b/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/ml-policyDef-UserProfile.txt
deleted file mode 100644
index 2f4bcb1..0000000
--- a/eagle-core/eagle-machinelearning/eagle-machinelearning-base/src/test/resources/ml-policyDef-UserProfile.txt
+++ /dev/null
@@ -1,51 +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.
- */
-
-{
-   "type":"MachineLearning",
-   "fileTypes":[
-      {
-         "type":"CSV",
-         "containsHeader":"true",
-         "fileParserClass":"eagle.ml.CSVFileFormatParser"
-      }
-   ],
-   "alertContext":{
-      "cluster":"testCluster",
-      "datacenter":"testDataCenter",
-      "component":"testComponent",
-      "description":"ML based user profile anomaly detection",
-      "severity":"WARNING",
-      "notificationByEmail":"true"
-   },
-   "algorithms":[
-      {
-         "name":"org.apache.eagle.security.userprofile.util.EigenBasedAnomalyDetection",
-         "description":"EigenBasedAnomalyDetection",
-         "modelPath":"/models/",
-         "featureSet":"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck",
-         "type":"CSV"
-      },
-      {
-         "name":"org.apache.eagle.security.userprofile.util.KDEBasedAnomalyDetection",
-         "description":"DensityBasedAnomalyDetection",
-         "modelPath":"/models/",
-         "featureSet":"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck",
-         "type":"CSV"
-      }
-   ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-machinelearning/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-machinelearning/pom.xml b/eagle-core/eagle-machinelearning/pom.xml
deleted file mode 100644
index 24514d0..0000000
--- a/eagle-core/eagle-machinelearning/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-core</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-machinelearning-parent</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>eagle-machinelearning-base</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/pom.xml b/eagle-core/eagle-metric/pom.xml
deleted file mode 100644
index c12a2b9..0000000
--- a/eagle-core/eagle-metric/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-core</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-metric</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-metric</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>io.dropwizard.metrics</groupId>
-			<artifactId>metrics-core</artifactId>
-			<version>3.1.2</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-client-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-	</dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/MetricConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/MetricConstants.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/MetricConstants.java
deleted file mode 100644
index 54c069d..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/MetricConstants.java
+++ /dev/null
@@ -1,24 +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.metric;
-
-public class MetricConstants {
-    public static final String GENERIC_METRIC_ENTITY_ENDPOINT = "GenericMetricService";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleCounterMetric.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleCounterMetric.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleCounterMetric.java
deleted file mode 100644
index 0a7f70e..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleCounterMetric.java
+++ /dev/null
@@ -1,73 +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.metric.reportor;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Arrays;
-
-public class EagleCounterMetric extends EagleMetric {
-
-    private static final Logger LOG = LoggerFactory.getLogger(EagleCounterMetric.class);
-
-    public EagleCounterMetric(long latestUserTimeClock, String name, double value, long granularity) {
-        super(latestUserTimeClock, name, value, granularity);
-    }
-
-    public EagleCounterMetric(EagleCounterMetric metric) {
-        super(metric);
-    }
-
-    public long trim(long latestUserTimeClock) {
-        return latestUserTimeClock / granularity * granularity;
-    }
-
-    public void flush(long latestUserTimeClock) {
-        for (EagleMetricListener listener : metricListeners) {
-            EagleCounterMetric newEagleMetric = new EagleCounterMetric(this);
-            newEagleMetric.name = MetricKeyCodeDecoder.addTimestampToMetricKey(trim(latestUserTimeClock), newEagleMetric.name);
-            listener.onMetricFlushed(Arrays.asList((EagleMetric)newEagleMetric));
-        }
-    }
-
-    public boolean checkIfNeedFlush(long currentUserTimeClock) {
-        if (currentUserTimeClock - latestUserTimeClock > granularity) {
-            return true;
-        }
-        return false;
-    }
-
-    public boolean update(double d, long currentUserTimeClock) {
-        Boolean readyToFlushed = checkIfNeedFlush(currentUserTimeClock);
-        if (!readyToFlushed) {
-            if (currentUserTimeClock < latestUserTimeClock) {
-                LOG.warn("Something must be wrong, event should come in order of userTimeClock");
-            }
-            value.addAndGet(d);
-        }
-        else {
-            flush(latestUserTimeClock);
-            value.getAndSet(1);
-            latestUserTimeClock = currentUserTimeClock;
-        }
-        return readyToFlushed;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleGaugeMetric.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleGaugeMetric.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleGaugeMetric.java
deleted file mode 100644
index e6fc098..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleGaugeMetric.java
+++ /dev/null
@@ -1,45 +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.metric.reportor;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Arrays;
-import java.util.Map;
-
-public class EagleGaugeMetric extends EagleMetric {
-
-    private static final Logger LOG = LoggerFactory.getLogger(EagleGaugeMetric.class);
-
-    public EagleGaugeMetric(long latestUserTimeClock, String name, double value) {
-        super(latestUserTimeClock, name, value, 0);
-    }
-
-    public EagleGaugeMetric(EagleGaugeMetric metric) {
-        super(metric);
-    }
-
-    public boolean update(double d, long currentUserTimeClock) {
-        value.getAndSet(d);
-        this.latestUserTimeClock = currentUserTimeClock;
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetric.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetric.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetric.java
deleted file mode 100644
index e45a8ce..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetric.java
+++ /dev/null
@@ -1,64 +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.metric.reportor;
-
-import com.google.common.util.concurrent.AtomicDouble;
-import org.apache.commons.lang.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class EagleMetric implements IEagleMetric {
-
-    public long latestUserTimeClock;
-    public AtomicDouble value;
-    public String name;
-    public long granularity;
-    public List<EagleMetricListener> metricListeners = new ArrayList<>();
-    private static final Logger LOG = LoggerFactory.getLogger(EagleCounterMetric.class);
-
-    public EagleMetric(EagleMetric metric) {
-        this.latestUserTimeClock = metric.latestUserTimeClock;
-        this.name = metric.name;
-        this.value = new AtomicDouble(metric.value.doubleValue());
-        this.granularity = metric.granularity;
-    }
-
-    public EagleMetric(long latestUserTimeClock, String name, double value, long granularity) {
-        this.latestUserTimeClock = latestUserTimeClock;
-        this.name = name;
-        this.value = new AtomicDouble(value);
-        this.granularity = granularity;
-    }
-
-    public EagleMetric(long latestUserTimeClock, String metricName, double value) {
-        this(latestUserTimeClock, metricName, value, 5 * DateUtils.MILLIS_PER_MINUTE);
-    }
-
-    public void registerListener(EagleMetricListener listener) {
-        metricListeners.add(listener);
-    }
-
-    public Double getValue() {
-        return value.doubleValue();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricKey.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricKey.java
deleted file mode 100644
index daf6ddf..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricKey.java
+++ /dev/null
@@ -1,28 +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.metric.reportor;
-
-import java.util.Map;
-
-public class EagleMetricKey {
-    public String metricName;
-    public Map<String, String> tags;
-    public long timestamp;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricListener.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricListener.java
deleted file mode 100644
index d8fe7b2..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleMetricListener.java
+++ /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.
- *
- */
-
-package org.apache.eagle.metric.reportor;
-
-import java.util.List;
-
-public interface EagleMetricListener {
-
-    /**
-     * The method should be called in thread-safe mode
-     * @param metrics
-     */
-    void onMetricFlushed(List<EagleMetric> metrics);
-}



[44/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManagerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManagerImpl.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManagerImpl.java
deleted file mode 100644
index 2c77f1f..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManagerImpl.java
+++ /dev/null
@@ -1,158 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.notification.base.NotificationConstants;
-import org.apache.eagle.notification.utils.NotificationPluginUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.dao.PolicyDefinitionEntityDAOImpl;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Created on 2/10/16.
- */
-public class NotificationPluginManagerImpl implements NotificationPluginManager {
-    private static final Logger LOG = LoggerFactory.getLogger(NotificationPluginManagerImpl.class);
-    // mapping from policy Id to NotificationPlugin instance
-    private Map<String, Collection<NotificationPlugin>> policyNotificationMapping = new ConcurrentHashMap<>(1); //only one write thread
-    private Config config;
-
-    public NotificationPluginManagerImpl(Config config){
-        this.config = config;
-        internalInit();
-    }
-
-    private void internalInit(){
-        // iterate all policy ids, keep those notification which belong to plugins
-        PolicyDefinitionDAO policyDefinitionDao = new PolicyDefinitionEntityDAOImpl(new EagleServiceConnector( config ) , Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME);
-        String site = config.getString("eagleProps.site");
-        String application = config.getString("eagleProps.application");
-        try{
-            List<AlertDefinitionAPIEntity> activeAlertDefs = policyDefinitionDao.findActivePolicies( site , application);
-            // initialize all loaded plugins
-            NotificationPluginLoader.getInstance().init(config);
-            for(NotificationPlugin plugin : NotificationPluginLoader.getInstance().getNotificationMapping().values()){
-                plugin.init(config, activeAlertDefs);
-            }
-            // build policy and plugin mapping
-            for( AlertDefinitionAPIEntity entity : activeAlertDefs ){
-                Map<String, NotificationPlugin> plugins = pluginsForPolicy(entity);
-                policyNotificationMapping.put(entity.getTags().get(Constants.POLICY_ID) , plugins.values());
-            }
-        }catch (Exception ex ){
-            LOG.error("Error initializing poliy/notification mapping ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-
-    @Override
-    public void notifyAlert(AlertAPIEntity entity) {
-        String policyId = entity.getTags().get(Constants.POLICY_ID);
-        Collection<NotificationPlugin> plugins = policyNotificationMapping.get(policyId);
-        if(plugins == null || plugins.size() == 0) {
-            LOG.debug("no plugin found for policy " + policyId);
-            return;
-        }
-        for(NotificationPlugin plugin : plugins){
-            try {
-                LOG.info("execute notification plugin " + plugin);
-                plugin.onAlert(entity);
-            }catch(Exception ex){
-                LOG.error("fail invoking plugin's onAlert, continue ", ex);
-            }
-        }
-    }
-
-    @Override
-    public void updateNotificationPlugins(AlertDefinitionAPIEntity alertDef, boolean isDelete) {
-        try {
-            // Update Notification Plugin about the change in AlertDefinition
-            String policyId = alertDef.getTags().get(Constants.POLICY_ID);
-            if(isDelete){
-                // iterate all plugins and delete this policy
-                for(NotificationPlugin plugin : policyNotificationMapping.get(policyId)){
-                    plugin.update(policyId, null, true);
-                }
-                policyNotificationMapping.remove(policyId);
-                LOG.info("Deleted notifications for policy " + policyId);
-                return;
-            }
-
-            Map<String, NotificationPlugin> plugins = pluginsForPolicy(alertDef);
-            // calculate difference between current plugins and previous plugin
-            Collection<NotificationPlugin> previousPlugins = policyNotificationMapping.get(policyId);
-            if(previousPlugins != null) {
-                Collection<NotificationPlugin> deletedPlugins = CollectionUtils.subtract(previousPlugins, plugins.values());
-                LOG.info("Going to delete plugins " + deletedPlugins + ", for policy " + policyId);
-                for (NotificationPlugin plugin : deletedPlugins) {
-                    plugin.update(policyId, null, true);
-                }
-            }
-
-            // iterate current notifications and update it individually
-            List<Map<String,String>> notificationConfigCollection = NotificationPluginUtils.deserializeNotificationConfig(alertDef.getNotificationDef());
-            for( Map<String,String> notificationConf : notificationConfigCollection ) {
-                String notificationType = notificationConf.get(NotificationConstants.NOTIFICATION_TYPE);
-                // for backward compatibility, use email for default notification type
-                if(notificationType == null){
-                    notificationType = NotificationConstants.EMAIL_NOTIFICATION;
-                }
-                NotificationPlugin plugin = plugins.get(notificationType);
-                if(plugin != null){
-                    plugin.update(policyId, notificationConf, false);
-                }
-            }
-
-            policyNotificationMapping.put(policyId, plugins.values());// update policy - notification types map
-            LOG.info("Successfully broadcasted policy updates to all Notification Plugins ...");
-        } catch (Exception e) {
-            LOG.error("Error broadcasting policy notification changes ", e);
-        }
-    }
-
-    private Map<String, NotificationPlugin> pluginsForPolicy(AlertDefinitionAPIEntity policy) throws Exception{
-        NotificationPluginLoader loader = NotificationPluginLoader.getInstance();
-        loader.init(config);
-        Map<String, NotificationPlugin> plugins = loader.getNotificationMapping();
-        // mapping from notificationType to plugin
-        Map<String, NotificationPlugin>  notifications = new HashMap<>();
-        List<Map<String,String>> notificationConfigCollection = NotificationPluginUtils.deserializeNotificationConfig(policy.getNotificationDef());
-        for( Map<String,String> notificationConf : notificationConfigCollection ){
-            String notificationType = notificationConf.get(NotificationConstants.NOTIFICATION_TYPE);
-            // for backward compatibility, by default notification type is email if notification type is not specified
-            if(notificationType == null){
-                LOG.warn("notificationType is null so use default notification type email for this policy  " + policy);
-                notifications.put(NotificationConstants.EMAIL_NOTIFICATION, plugins.get(NotificationConstants.EMAIL_NOTIFICATION));
-            }else if(!plugins.containsKey(notificationType)){
-                LOG.warn("No NotificationPlugin supports this notificationType " + notificationType);
-            }else {
-                notifications.put(notificationType, plugins.get(notificationType));
-            }
-        }
-        return notifications;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/utils/NotificationPluginUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/utils/NotificationPluginUtils.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/utils/NotificationPluginUtils.java
deleted file mode 100644
index 350ecb5..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/utils/NotificationPluginUtils.java
+++ /dev/null
@@ -1,68 +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.notification.utils;
-
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.type.CollectionType;
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigObject;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Common methods for Notification Plugin
- */
-public class NotificationPluginUtils {
-	/**
-	 * Fetch Notification specific property value
-	 * @param key
-	 * @return
-	 * @throws Exception
-     */
-	public static String getPropValue(Config config, String key ) throws Exception {
-		if( config.getObject("eagleNotificationProps") == null )
-			throw new Exception("Eagle Notification Properties not found in application.conf ");
-		ConfigObject notificationConf = config.getObject("eagleNotificationProps");
-		return notificationConf.get(key).unwrapped().toString();
-	}
-
-	/**
-	 * Deserialize Notification Definition and convert all config to Key Value Pairs
-	 * @param notificationDef
-	 * @return
-	 * @throws Exception
-     */
-	public static List<Map<String,String>> deserializeNotificationConfig( String notificationDef ) throws Exception {
-		ObjectMapper mapper = new ObjectMapper();
-		CollectionType mapCollectionType = mapper.getTypeFactory().constructCollectionType(List.class, Map.class);
-		return mapper.readValue( notificationDef , mapCollectionType);
-	}
-
-	/**
-	 * Object to JSON String
-	 * @param obj
-	 * @return
-	 * @throws Exception
-     */
-	public static String objectToStr( Object obj ) throws  Exception {
-		ObjectMapper mapper = new ObjectMapper();
-		return mapper.writeValueAsString(obj);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
deleted file mode 100644
index 4ceabad..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/ALERT_DEFAULT.vm
+++ /dev/null
@@ -1,275 +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.
-  -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<meta name="viewport" content="width=device-width"/>
-		<style>
-			body {
-				width:100% !important;
-				min-width: 100%;
-				-webkit-text-size-adjust:100%;
-				-ms-text-size-adjust:100%;
-				margin:0;
-				padding:0;
-			}
-
-			table {
-				border-spacing: 0;
-				border-collapse: collapse;
-			}
-
-			table th,
-			table td {
-				padding: 3px 0 3px 0;
-			}
-
-			.body {
-				width: 100%;
-			}
-
-			p,a,h1,h2,h3,ul,ol,li {
-				font-family: Helvetica, Arial, sans-serif;
-				font-weight: normal;
-				margin: 0;
-				padding: 0;
-			}
-			p {
-				font-size: 14px;
-				line-height: 19px;
-			}
-			a {
-				color: #3294b1;
-			}
-			h1 {
-				font-size: 36px;
-				margin: 15px 0 5px 0;
-			}
-			h2 {
-				font-size: 32px;
-			}
-			h3 {
-				font-size: 28px;
-			}
-
-			ul,ol {
-				margin: 0 0 0 25px;
-				padding: 0;
-			}
-
-			.btn {
-				background: #2ba6cb !important;
-				border: 1px solid #2284a1;
-				padding: 10px 20px 10px 20px;
-				text-align: center;
-			}
-			.btn:hover {
-				background: #2795b6 !important;
-			}
-			.btn a {
-				color: #FFFFFF;
-				text-decoration: none;
-				font-weight: bold;
-				padding: 10px 20px 10px 20px;
-			}
-
-			.tableBordered {
-				border-top: 1px solid #b9e5ff;
-			}
-			.tableBordered th {
-				background: #ECF8FF;
-			}
-			.tableBordered th p {
-				font-weight: bold;
-				color: #3294b1;
-			}
-			.tableBordered th,
-			.tableBordered td {
-				color: #333333;
-				border-bottom: 1px solid #b9e5ff;
-				text-align: center;
-				padding-bottom: 5px;
-			}
-
-			.panel {
-				height: 100px;
-			}
-		</style>
-	</head>
-	<body>
-		#set ( $elem = $alertList[0] )
-		#set ( $alertUrl = $elem["alertDetailUrl"] )
-		#set ( $policyUrl = $elem["policyDetailUrl"] )
-		<table class="body">
-			<tr>
-				<td align="center" valign="top" style="background: #999999; padding: 0 0 0 0;">
-					<!-- Eagle Header -->
-					<table width="580">
-						<tr>
-							<td style="padding: 0 0 0 0;" align="left" >
-								<p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
-							</td>
-							<td style="padding: 0 0 0 0;" align="right">
-								<p style="color:#FFFFFF;font-weight: bold;">DAM Alert</p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-
-			<tr>
-				<td align="center" valign="top">
-					<!-- Eagle Body -->
-					<table width="580">
-						<tr>
-							<!-- Title -->
-							<td align="center">
-								<h1>Malicious Data Operation Detected</h1>
-							</td>
-						</tr>
-						<tr>
-							<!-- Time -->
-							<td>
-								<table width="580">
-									<tr>
-										<td>
-											<p><b>Detected Time: $elem["alertTimestamp"]</b></p>
-										</td>
-										#set ( $severity = $elem["severity"] )
-										#if (!$severity || ("$severity" == ""))
-											#set ( $elem["severity"] = "WARNING")
-										#end
-										<td align="right">
-											<p><b>
-												Severity:
-									            #if ($elem["severity"] == "WARNING")
-													<span>$elem["severity"]</span>												
-    											#else
-													<span style="color: #FF0000;">$elem["severity"]</span>
-    											#end
-											</b></p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Description -->
-							<td valign="top" style="background: #ECF8FF; border: 1px solid #b9e5ff; padding: 10px 10px 12px 10px;">
-								<p>$elem["alertMessage"]</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$alertUrl">View Alert Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Basic Information:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information Content -->
-							<td>
-								<table class="tableBordered" width="580">
-									<tr>
-										<th>
-											<p>Site</p>
-										</th>
-										<th>
-											<p>Data Source</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["site"]</p>
-										</td>
-										<td>
-											<p>$elem["dataSource"]</p>
-										</td>
-									</tr>
-									<tr>
-										<th>
-											<p>Alert Type</p>
-										</th>
-										<th>
-											<p>Policy Name</p>
-										</th>
-										<th>
-											<p>Severity</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>DAM Alert</p>
-										</td>									
-										<td>
-											<p>$elem["policyId"]</p>
-										</td>
-										<td>
-											<p>$elem["severity"]</p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$policyUrl">View Policy Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>						
-						<tr>
-							<!-- Actions Required -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Actions Required:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Possible Root Causes Content -->
-							<td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
-								<p> Malicious data operation found, please check.</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Copyright -->
-							<td align="center">
-								<p><a href="http://123.xyz.com/alerts/alertlist.html">Copyright 2014 @ Hadoop Eagle</a></p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-		</table>
-	</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/application.conf b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/application.conf
deleted file mode 100644
index d57172b..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/application.conf
+++ /dev/null
@@ -1,69 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hdfsAuditLog-topology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsAuditLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "sandbox_hdfs_audit_log",
-    "zkConnection" : "127.0.0.1:2181",
-    "brokerZkPath" : "/brokers",
-    "zkConnectionTimeoutMS" : 15000,
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-    "transactionZKServers" : "127.0.0.1",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "consumerGroupId" : "eagle.hdfsaudit.consumer",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner",
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "dataSource": "hdfsAuditLog",
-  	"dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailhost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000
-  },
-  "eagleNotificationProps" : {
-    "kafka_broker":"192.168.56.101:6667"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/notification-plugins-init.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/notification-plugins-init.sh b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/notification-plugins-init.sh
deleted file mode 100644
index 0293f9d..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/resources/notification-plugins-init.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-CUR_DIR=$(dirname $0)
-source $CUR_DIR/../../../../../../eagle-assembly/src/main/bin/eagle-env.sh
-
-#####################################################################
-#     Import notification plugin configuration into Eagle Service   #
-#####################################################################
-
-## AlertNotificationService : schema for notifcation plugin configuration
-echo ""
-echo "Importing notification plugin configurations ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertNotificationService" \
- -d '
- [
-     {
-       "prefix": "alertNotifications",
-       "tags": {
-         "notificationType": "email"
-       },
-       "className": "org.apache.eagle.notification.plugin.AlertEmailPlugin",
-       "description": "send alert to email",
-       "enabled":true
-     },
-     {
-       "prefix": "alertNotifications",
-       "tags": {
-         "notificationType": "kafka"
-       },
-       "className": "org.apache.eagle.notification.plugin.AlertKafkaPlugin",
-       "description": "send alert to kafka bus",
-       "enabled":true
-     },
-     {
-       "prefix": "alertNotifications",
-       "tags": {
-         "notificationType": "eagleStore"
-       },
-       "className": "org.apache.eagle.notification.plugin.AlertEagleStorePlugin",
-       "description": "send alert to eagle store",
-       "enabled":true
-     }
- ]
- '
-
-## Finished
-echo ""
-echo "Finished initialization for alert notification plugins"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEagleStorePlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEagleStorePlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEagleStorePlugin.java
deleted file mode 100644
index 74c8e40..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEagleStorePlugin.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.notifications.testcases;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.notification.plugin.AlertEagleStorePlugin;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.Arrays;
-
-/**
- * Created on 2/11/16.
- */
-public class TestAlertEagleStorePlugin {
-    @Ignore // only work when eagle service is up
-    @Test
-    public void testEagleStorePlugin() throws Exception{
-        AlertEagleStorePlugin plugin = new AlertEagleStorePlugin();
-        Config config = ConfigFactory.load();
-        AlertDefinitionAPIEntity def = new AlertDefinitionAPIEntity();
-        def.setNotificationDef("");
-        plugin.init(config, Arrays.asList(def));
-
-        AlertAPIEntity alert = new AlertAPIEntity();
-        alert.setDescription("");
-        plugin.onAlert(alert);
-        Assert.assertTrue(plugin.getStatus().successful);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEmailPlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEmailPlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEmailPlugin.java
deleted file mode 100644
index b44c238..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertEmailPlugin.java
+++ /dev/null
@@ -1,56 +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.notifications.testcases;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.notification.plugin.AlertEmailPlugin;
-import org.apache.eagle.policy.common.Constants;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-
-/**
- * Created on 2/11/16.
- */
-public class TestAlertEmailPlugin {
-    @Ignore // only works when there is correct email setup and eagle service
-    @Test
-    public void testAlertEmailPlugin() throws Exception{
-        AlertEmailPlugin plugin = new AlertEmailPlugin();
-        Config config = ConfigFactory.load();
-        AlertDefinitionAPIEntity def = new AlertDefinitionAPIEntity();
-        def.setTags(new HashMap<String, String>());
-        def.getTags().put(Constants.POLICY_ID, "testPolicyId");
-        def.setNotificationDef("[{\"notificationType\":\"email\",\"sender\":\"eagle@apache.org\",\"recipients\":\"eagle@apache.org\",\"subject\":\"last check point time lag found.\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]");
-        plugin.init(config, Arrays.asList(def));
-
-        AlertAPIEntity alert = new AlertAPIEntity();
-        alert.setTags(new HashMap<String, String>());
-        alert.getTags().put(Constants.POLICY_ID, "testPolicyId");
-        alert.setDescription("");
-        alert.setAlertContext(new AlertContext());
-        plugin.onAlert(alert);
-        Assert.assertTrue(plugin.getStatus().successful);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertKafkaPlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertKafkaPlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertKafkaPlugin.java
deleted file mode 100644
index b5ed63e..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestAlertKafkaPlugin.java
+++ /dev/null
@@ -1,61 +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.notifications.testcases;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.notification.plugin.AlertKafkaPlugin;
-import org.apache.eagle.notification.plugin.KafkaProducerSingleton;
-import org.apache.eagle.notification.utils.NotificationPluginUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.kafka.clients.producer.KafkaProducer;
-import org.apache.kafka.clients.producer.ProducerRecord;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class TestAlertKafkaPlugin {
-	@Ignore // only work when kafka is ready for use
-	@Test
-	public void testAlertToKafkaBus() throws Exception
-	{
-		AlertKafkaPlugin plugin = new AlertKafkaPlugin();
-		Config config = ConfigFactory.load();
-		AlertDefinitionAPIEntity def = new AlertDefinitionAPIEntity();
-		def.setTags(new HashMap<String, String>());
-		def.getTags().put(Constants.POLICY_ID, "testPolicyId");
-		def.setNotificationDef("[{\"notificationType\":\"kafka\",\"topic\":\"testTopic\"}]");
-		plugin.init(config, Arrays.asList(def));
-
-		AlertAPIEntity alert = new AlertAPIEntity();
-		alert.setTags(new HashMap<String, String>());
-		alert.getTags().put(Constants.POLICY_ID, "testPolicyId");
-		alert.setDescription("");
-		alert.setAlertContext(new AlertContext());
-		plugin.onAlert(alert);
-		Thread.sleep(1000); // wait for message sent out
-		Assert.assertTrue(plugin.getStatus().successful);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestGetAllNotifications.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestGetAllNotifications.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestGetAllNotifications.java
deleted file mode 100644
index 2749648..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestGetAllNotifications.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.apache.eagle.notifications.testcases;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AlertNotificationEntity;
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.notification.dao.AlertNotificationDAO;
-import org.apache.eagle.notification.dao.AlertNotificationDAOImpl;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.List;
-
-public class TestGetAllNotifications {
-    @Ignore
-    @Test
-    public void  getAllNotification() throws Exception {
-        Config config = EagleConfigFactory.load().getConfig();
-        AlertNotificationDAO dao = new AlertNotificationDAOImpl( new EagleServiceConnector(config));
-        List<AlertNotificationEntity> list = dao.findAlertNotificationTypes();
-        System.out.println(" Fetch all Notifications : "+list);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestNotificationPluginLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestNotificationPluginLoader.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestNotificationPluginLoader.java
deleted file mode 100644
index 624343b..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/java/org/apache/eagle/notifications/testcases/TestNotificationPluginLoader.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.notifications.testcases;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.notification.base.NotificationConstants;
-import org.apache.eagle.notification.plugin.NotificationPluginLoader;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Created on 2/10/16.
- */
-public class TestNotificationPluginLoader {
-    @Ignore //only work when connected to eagle service
-    @Test
-    public void testLoader(){
-        Config config = ConfigFactory.load();
-        NotificationPluginLoader loader = NotificationPluginLoader.getInstance();
-        loader.init(config);
-        Assert.assertTrue(loader.getNotificationMapping().keySet().contains(NotificationConstants.EAGLE_STORE));
-        Assert.assertTrue(loader.getNotificationMapping().keySet().contains(NotificationConstants.KAFKA_STORE));
-        Assert.assertTrue(loader.getNotificationMapping().keySet().contains(NotificationConstants.EMAIL_NOTIFICATION));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/application.conf b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/application.conf
deleted file mode 100644
index 2c5e770..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/application.conf
+++ /dev/null
@@ -1,69 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hdfsAuditLog-topology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsAuditLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "sandbox_hdfs_audit_log",
-    "zkConnection" : "127.0.0.1:2181",
-    "brokerZkPath" : "/brokers",
-    "zkConnectionTimeoutMS" : 15000,
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-    "transactionZKServers" : "127.0.0.1",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "consumerGroupId" : "eagle.hdfsaudit.consumer",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner",
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "hdfsAuditLog",
-  	"dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailhost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000
-  },
-  "eagleNotificationProps" : {
-    "kafka_broker":"192.168.56.101:6667"
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/log4j.properties b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/log4j.properties
deleted file mode 100644
index 3499c46..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=./logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/pom.xml b/eagle-core/eagle-alert/eagle-alert-process/pom.xml
deleted file mode 100644
index fdf059d..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/pom.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.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.
-  -->
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>eagle</groupId>
-        <artifactId>eagle-alert-parent</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-	<packaging>jar</packaging>
-	<artifactId>eagle-alert-process</artifactId>
-    <name>eagle-alert-process</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-    		<artifactId>eagle-embed-server</artifactId>
-    		<version>${project.version}</version>
-            <scope>test</scope>
-    	</dependency>
-		<dependency>
-        	<groupId>eagle</groupId>
-    		<artifactId>eagle-embed-server</artifactId>
-    		<version>${project.version}</version>
-    	    <classifier>tests</classifier>
-    	    <scope>test</scope>
-    	</dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <exclusions>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm</artifactId>
-                </exclusion>
-            </exclusions>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm</artifactId>
-                </exclusion>
-            </exclusions>
-            <scope>test</scope>
-        </dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-alert-base</artifactId>
-			<version>${project.version}</version>
-        </dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-metric</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-	  	<dependency>
-  			<groupId>org.wso2.siddhi</groupId>
-  			<artifactId>siddhi-core</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.log4j.wso2</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>jdk.tools</groupId>
-                    <artifactId>jdk.tools</artifactId>
-                </exclusion>
-            </exclusions>
-  		</dependency>
-	  	<dependency>
-  			<groupId>org.wso2.siddhi</groupId>
-  			<artifactId>siddhi-extension-string</artifactId>
-  		</dependency>
-  		<dependency>
-          	<groupId>log4j</groupId>
-  			<artifactId>log4j</artifactId>
-        </dependency>
-      	<dependency>
-       		<groupId>org.slf4j</groupId>
-			<artifactId>log4j-over-slf4j</artifactId>
-      	</dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-alert-notification-plugin</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	</dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>test-jar</id>
-                        <phase>test-compile</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
deleted file mode 100644
index 584abc7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/DeduplicatorConfig.java
+++ /dev/null
@@ -1,37 +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.alert.config;
-
-import java.io.Serializable;
-
-public class DeduplicatorConfig implements Serializable{
-	private static final long serialVersionUID = 1L;
-	public int getAlertDedupIntervalMin() {
-		return alertDedupIntervalMin;
-	}
-	public void setAlertDedupIntervalMin(int alertDedupIntervalMin) {
-		this.alertDedupIntervalMin = alertDedupIntervalMin;
-	}
-	public int getEmailDedupIntervalMin() {
-		return emailDedupIntervalMin;
-	}
-	public void setEmailDedupIntervalMin(int emailDedupIntervalMin) {
-		this.emailDedupIntervalMin = emailDedupIntervalMin;
-	}
-	private int alertDedupIntervalMin;
-	private int emailDedupIntervalMin;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/EmailNotificationConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/EmailNotificationConfig.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/EmailNotificationConfig.java
deleted file mode 100644
index 4816bc9..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/EmailNotificationConfig.java
+++ /dev/null
@@ -1,49 +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.alert.config;
-
-public class EmailNotificationConfig extends NotificationConfig{
-	private static final long serialVersionUID = 1L;
-	private String sender;
-	private String recipients;
-	private String tplFileName;
-	private String subject;
-	public String getSubject() {
-		return subject;
-	}
-	public void setSubject(String subject) {
-		this.subject = subject;
-	}
-	public String getRecipients() {
-		return recipients;
-	}
-	public void setRecipients(String recipients) {
-		this.recipients = recipients;
-	}
-	public String getSender() {
-		return sender;
-	}
-	public void setSender(String sender) {
-		this.sender = sender;
-	}
-	public String getTplFileName() {
-		return tplFileName;
-	}
-	public void setTplFileName(String tplFileName) {
-		this.tplFileName = tplFileName;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/NotificationConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/NotificationConfig.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/NotificationConfig.java
deleted file mode 100644
index 76f2d56..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/NotificationConfig.java
+++ /dev/null
@@ -1,44 +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.alert.config;
-
-import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "flavor", visible=true)
-public class NotificationConfig implements Serializable{
-	private static final long serialVersionUID = 1L;
-	private String id;
-	private String flavor;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getFlavor() {
-		return flavor;
-	}
-
-	public void setFlavor(String flavor) {
-		this.flavor = flavor;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/Remediation.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/Remediation.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/Remediation.java
deleted file mode 100644
index ec52508..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/config/Remediation.java
+++ /dev/null
@@ -1,32 +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.alert.config;
-
-import java.io.Serializable;
-
-public class Remediation implements Serializable{
-	private static final long serialVersionUID = 1L;
-	private String id;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
deleted file mode 100644
index 051df33..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertDeduplicationExecutorBase.java
+++ /dev/null
@@ -1,192 +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.alert.dedup;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.config.DeduplicatorConfig;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.policy.DynamicPolicyLoader;
-import org.apache.eagle.policy.PolicyLifecycleMethods;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.datastream.JavaStormStreamExecutor2;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.sun.jersey.client.impl.CopyOnWriteHashMap;
-import com.typesafe.config.Config;
-import scala.Tuple2;
-
-public abstract class AlertDeduplicationExecutorBase extends JavaStormStreamExecutor2<String, AlertAPIEntity> implements PolicyLifecycleMethods<AlertDefinitionAPIEntity> {
-	private static final long serialVersionUID = 1L;
-	private static final Logger LOG = LoggerFactory.getLogger(AlertDeduplicationExecutorBase.class);
-	protected Config config;
-	protected DEDUP_TYPE dedupType;
-
-	private List<String> alertExecutorIdList;
-	private volatile CopyOnWriteHashMap<String, DefaultDeduplicator<AlertAPIEntity>> alertDedups;
-	private PolicyDefinitionDAO<AlertDefinitionAPIEntity> dao;
-
-	public enum DEDUP_TYPE {
-		ENTITY,
-		EMAIL
-	}
-
-	public AlertDeduplicationExecutorBase(List<String> alertExecutorIdList, DEDUP_TYPE dedupType, PolicyDefinitionDAO<AlertDefinitionAPIEntity> dao){
-		this.alertExecutorIdList = alertExecutorIdList;
-		this.dedupType = dedupType;
-		this.dao = dao;
-	}
-	
-	@Override
-	public void prepareConfig(Config config) {
-		this.config = config;
-	}
-	
-	public DefaultDeduplicator<AlertAPIEntity> createAlertDedup(AlertDefinitionAPIEntity alertDef) {
-		DeduplicatorConfig dedupConfig = null;
-		try {
-			dedupConfig = JsonSerDeserUtils.deserialize(alertDef.getDedupeDef(), DeduplicatorConfig.class);
-		}
-		catch (Exception ex) {
-			LOG.warn("Initial dedupConfig error, " + ex.getMessage());
-		}
-
-        if (dedupConfig != null) {
-			if (dedupType.equals(DEDUP_TYPE.ENTITY)) {
-				return new DefaultDeduplicator<>(dedupConfig.getAlertDedupIntervalMin());
-			} else if (dedupType.equals(DEDUP_TYPE.EMAIL)) {
-				return new DefaultDeduplicator<>(dedupConfig.getEmailDedupIntervalMin());
-			}
-		}
-
-		return null;
-	}
-	
-	@Override
-	public void init() {		
-        String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
-        String dataSource = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-	    Map<String, Map<String, AlertDefinitionAPIEntity>> initialAlertDefs;	    	    
-	    try {
-	 		initialAlertDefs = dao.findActivePoliciesGroupbyExecutorId(site, dataSource);
-	    }
-	    catch (Exception ex) {
- 			LOG.error("fail to initialize initialAlertDefs: ", ex);
-	        throw new IllegalStateException("fail to initialize initialAlertDefs: ", ex);
-        }
-	    Map<String, DefaultDeduplicator<AlertAPIEntity>> tmpDeduplicators = new HashMap<String, DefaultDeduplicator<AlertAPIEntity>>();
-        if(initialAlertDefs == null || initialAlertDefs.isEmpty()){
-            LOG.warn("No alert definitions was found for site: "+site+", dataSource: "+dataSource);
-        } else {
-		    for (String alertExecutorId: alertExecutorIdList) {
-			    if(initialAlertDefs.containsKey(alertExecutorId)){
-                    for(AlertDefinitionAPIEntity alertDef : initialAlertDefs.get(alertExecutorId).values()){
-                       try {
-                          DefaultDeduplicator<AlertAPIEntity> deduplicator = createAlertDedup(alertDef);
-                          if (deduplicator != null)
-                              tmpDeduplicators.put(alertDef.getTags().get(Constants.POLICY_ID), deduplicator);
-                          else LOG.warn("The dedup interval is not set, alertDef: " + alertDef);
-                        }
-                        catch (Throwable t) {
-                            LOG.error("Got an exception when initial dedup config, probably dedup config is not set: " + t.getMessage() + "," + alertDef);
-                        }
-                    }
-                } else {
-                    LOG.info(String.format("No alert definitions found for site: %s, dataSource: %s, alertExecutorId: %s",site,dataSource,alertExecutorId));
-                }
-		    }
-        }
-
-		alertDedups = new CopyOnWriteHashMap<>();
-		alertDedups.putAll(tmpDeduplicators);
-		DynamicPolicyLoader<AlertDefinitionAPIEntity> policyLoader = DynamicPolicyLoader.getInstanceOf(AlertDefinitionAPIEntity.class);
-		policyLoader.init(initialAlertDefs, dao, config);
-		for (String alertExecutorId : alertExecutorIdList) {
-		 	policyLoader.addPolicyChangeListener(alertExecutorId, this);
-		}
-	}
-
-    @Override
-    public void flatMap(java.util.List<Object> input, Collector<Tuple2<String, AlertAPIEntity>> outputCollector){
-        String policyId = (String) input.get(0);
-        AlertAPIEntity alertEntity = (AlertAPIEntity) input.get(1);
-        DefaultDeduplicator<AlertAPIEntity> dedup;
-        synchronized(alertDedups) {
-            dedup = alertDedups.get(policyId);
-        }
-
-        List<AlertAPIEntity> ret = Arrays.asList(alertEntity);
-        if (dedup == null) {
-            LOG.warn("Dedup config for policyId " + policyId + " is not set or is not a valid config");
-        } else {
-            if (dedup.getDedupIntervalMin() == -1) {
-                LOG.warn("the dedup interval is set as -1, which mean all alerts should be deduped(skipped)");
-                return;
-            }
-            ret = dedup.dedup(ret);
-        }
-        for (AlertAPIEntity entity : ret) {
-            outputCollector.collect(new Tuple2(policyId, entity));
-        }
-    }
-
-	public void onPolicyCreated(Map<String, AlertDefinitionAPIEntity> added) {
-		if(LOG.isDebugEnabled()) LOG.debug("Alert dedup config to be added : " + added);
-		for(AlertDefinitionAPIEntity alertDef : added.values()){
-			LOG.info("Alert dedup config really added " + alertDef);
-			DefaultDeduplicator<AlertAPIEntity> dedup = createAlertDedup(alertDef);
-			if (dedup != null) {
-				synchronized(alertDedups) {		
-					alertDedups.put(alertDef.getTags().get(Constants.POLICY_ID), dedup);
-				}
-			}
-		}
-	}
-	
-	public void onPolicyChanged(Map<String, AlertDefinitionAPIEntity> changed) {
-		LOG.info("Alert dedup config changed : " + changed);
-		for(AlertDefinitionAPIEntity alertDef : changed.values()){
-			LOG.info("Alert dedup config really changed " + alertDef);
-			DefaultDeduplicator<AlertAPIEntity> dedup = createAlertDedup(alertDef);
-			if (dedup != null) {
-				synchronized(alertDedups) {
-					alertDedups.put(alertDef.getTags().get(Constants.POLICY_ID), dedup);
-				}
-			}
-		}
-	}
-	
-	public void onPolicyDeleted(Map<String, AlertDefinitionAPIEntity> deleted) {
-		LOG.info("alert dedup config deleted : " + deleted);
-		for(AlertDefinitionAPIEntity alertDef : deleted.values()){
-			LOG.info("alert dedup config deleted " + alertDef);
-			// no cleanup to do, just remove it
-			synchronized(alertDedups) {		
-				alertDedups.remove(alertDef.getTags().get(Constants.POLICY_ID));
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEmailDeduplicationExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEmailDeduplicationExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEmailDeduplicationExecutor.java
deleted file mode 100644
index 8947d2c..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEmailDeduplicationExecutor.java
+++ /dev/null
@@ -1,30 +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.alert.dedup;
-
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-
-import java.util.List;
-
-public class AlertEmailDeduplicationExecutor extends AlertDeduplicationExecutorBase {
-
-	private static final long serialVersionUID = 1L;
-
-	public AlertEmailDeduplicationExecutor(List<String> alertExecutorIdList, PolicyDefinitionDAO dao){
-		super(alertExecutorIdList, DEDUP_TYPE.EMAIL, dao);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEntityDeduplicationExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEntityDeduplicationExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEntityDeduplicationExecutor.java
deleted file mode 100644
index b30dbda..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/AlertEntityDeduplicationExecutor.java
+++ /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.
- */
-package org.apache.eagle.alert.dedup;
-
-import java.util.List;
-
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-
-public class AlertEntityDeduplicationExecutor extends AlertDeduplicationExecutorBase {
-
-	private static final long serialVersionUID = 1L;
-
-	public AlertEntityDeduplicationExecutor(List<String> alertExecutorIdList, PolicyDefinitionDAO<AlertDefinitionAPIEntity> dao){
-		super(alertExecutorIdList, DEDUP_TYPE.ENTITY, dao);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
deleted file mode 100644
index b968e38..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/DefaultDeduplicator.java
+++ /dev/null
@@ -1,116 +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.alert.dedup;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class DefaultDeduplicator<T extends TaggedLogAPIEntity> implements EntityDeduplicator<T>{
-	protected long dedupIntervalMin;
-	protected Map<EntityTagsUniq, Long> entites = new HashMap<EntityTagsUniq, Long>();
-	public static Logger LOG = LoggerFactory.getLogger(DefaultDeduplicator.class);
-	
-	public static enum AlertDeduplicationStatus{
-		NEW,
-		DUPLICATED,
-		IGNORED
-	}
-	
-	public DefaultDeduplicator() {
-		this.dedupIntervalMin = 0;
-	}
-	
-	public DefaultDeduplicator(long intervalMin) {
-		this.dedupIntervalMin = intervalMin;
-	}
-	
-	public void clearOldCache() {
-		List<EntityTagsUniq> removedkeys = new ArrayList<EntityTagsUniq>();
-		for (Entry<EntityTagsUniq, Long> entry : entites.entrySet()) {
-			EntityTagsUniq entity = entry.getKey();
-			if (System.currentTimeMillis() - 7 * DateUtils.MILLIS_PER_DAY > entity.createdTime) {
-				removedkeys.add(entry.getKey());
-			}
-		}
-		for (EntityTagsUniq alertKey : removedkeys) {
-			entites.remove(alertKey);
-		}
-	}
-	
-	public AlertDeduplicationStatus checkDedup(EntityTagsUniq key){
-		long current = key.timestamp;
-		if(!entites.containsKey(key)){
-			entites.put(key, current);
-			return AlertDeduplicationStatus.NEW;
-		}
-		
-		long last = entites.get(key);
-		if(current - last >= dedupIntervalMin * DateUtils.MILLIS_PER_MINUTE){
-			entites.put(key, current);
-			return AlertDeduplicationStatus.DUPLICATED;
-		}
-		
-		return AlertDeduplicationStatus.IGNORED;
-	}
-	
-	public List<T> dedup(List<T> list) {
-		clearOldCache();
-		List<T> dedupList = new ArrayList<T>();
-        int totalCount = list.size();
-        int dedupedCount = 0;
-		for(T entity: list) {
-			if (entity.getTags() == null) {
-				if(LOG.isDebugEnabled()) LOG.debug("Tags is null, don't know how to deduplicate, do nothing");
-			} else {
-                AlertDeduplicationStatus status = checkDedup(new EntityTagsUniq(entity.getTags(), entity.getTimestamp()));
-                if (!status.equals(AlertDeduplicationStatus.IGNORED)) {
-                    dedupList.add(entity);
-                } else {
-                    dedupedCount++;
-                    if (LOG.isDebugEnabled())
-                        LOG.debug(String.format("Entity is skipped because it's duplicated: " + entity.toString()));
-                }
-            }
-		}
-
-        if(dedupedCount>0){
-            LOG.info(String.format("Skipped %s of %s alerts because they are duplicated",dedupedCount,totalCount));
-        }else if(LOG.isDebugEnabled()){
-            LOG.debug(String.format("Skipped %s of %s duplicated alerts",dedupedCount,totalCount));
-        }
-
-		return dedupList;
-	}
-
-	public EntityDeduplicator<T> setDedupIntervalMin(long dedupIntervalMin) {
-		this.dedupIntervalMin = dedupIntervalMin;
-		return this;
-	}
-	
-	public long getDedupIntervalMin() {
-		return dedupIntervalMin;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
deleted file mode 100644
index e108b94..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityDeduplicator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.alert.dedup;
-
-import java.util.List;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-/**
- * Dedup Eagle entities.
- *
- * @param <T> Eagle entity
- */
-public interface EntityDeduplicator<T extends TaggedLogAPIEntity> {
-	
-	EntityDeduplicator<T> setDedupIntervalMin(long intervalMin);
-	
-	long getDedupIntervalMin();
-	
-	List<T> dedup(List<T> list);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityTagsUniq.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityTagsUniq.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityTagsUniq.java
deleted file mode 100644
index 81c8ba6..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/dedup/EntityTagsUniq.java
+++ /dev/null
@@ -1,81 +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.alert.dedup;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @since Mar 19, 2015
- */
-public class EntityTagsUniq {
-	public Map<String, String> tags;
-	public Long timestamp;	 // entity's timestamp
-	public long createdTime; // entityTagsUniq's created time, for cache removal;
-	
-	private static final Logger LOG = LoggerFactory.getLogger(EntityTagsUniq.class);
-	
-	public EntityTagsUniq(Map<String, String> tags, long timestamp) {
-		this.tags = new HashMap<String, String>(tags);
-		this.timestamp = timestamp;
-		this.createdTime = System.currentTimeMillis();
-	}
-	
-	@Override	
-	public boolean equals(Object obj) {		
-		if (obj instanceof EntityTagsUniq) {
-			EntityTagsUniq au = (EntityTagsUniq) obj;
-			if (tags.size() != au.tags.size()) return false;
-			for (Entry<String, String> keyValue : au.tags.entrySet()) {
-				boolean keyExist = tags.containsKey(keyValue.getKey());
-				// sanity check
-				if (tags.get(keyValue.getKey()) == null || keyValue.getValue() == null) {
-					return true;
-				}
-				if ( !keyExist || !tags.get(keyValue.getKey()).equals(keyValue.getValue())) {				
-					return false;
-				}
-			}
-			return true; 
-		}
-		return false;
-	}
-	
-	@Override
-	public int hashCode() {	
-		int hashCode = 0;
-		for (Map.Entry<String,String> entry : tags.entrySet()) {
-            if(entry.getValue() == null) {
-                LOG.warn("Tag value for key ["+entry.getKey()+"] is null, skipped for hash code");
-            }else {
-                try {
-                    hashCode ^= entry.getValue().hashCode();
-                } catch (Throwable t) {
-                    LOG.info("Got exception because of entry: " + entry, t);
-                }
-            }
-		}
-		return hashCode;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutor.java
deleted file mode 100644
index 2eee6c5..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.alert.executor;
-
-import org.apache.eagle.policy.ResultRender;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.policy.PolicyPartitioner;
-import org.apache.eagle.policy.executor.PolicyProcessExecutor;
-import org.apache.eagle.alert.siddhi.SiddhiAlertAPIEntityRender;
-
-public class AlertExecutor extends PolicyProcessExecutor<AlertDefinitionAPIEntity, AlertAPIEntity> {
-
-	private final SiddhiAlertAPIEntityRender resultRender = new SiddhiAlertAPIEntityRender();
-
-	public AlertExecutor(String alertExecutorId, PolicyPartitioner partitioner, int numPartitions, int partitionSeq,
-			PolicyDefinitionDAO<AlertDefinitionAPIEntity> alertDefinitionDao, String[] sourceStreams) {
-		super(alertExecutorId, partitioner, numPartitions, partitionSeq, alertDefinitionDao, sourceStreams,
-				AlertDefinitionAPIEntity.class);
-	}
-
-	@Override
-	public ResultRender<AlertDefinitionAPIEntity, AlertAPIEntity> getResultRender() {
-		return resultRender;
-	}
-}


[15/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/WritableList.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/WritableList.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/WritableList.java
deleted file mode 100755
index f9932a5..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/WritableList.java
+++ /dev/null
@@ -1,104 +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.query.aggregate.raw;
-
-import org.apache.hadoop.io.Writable;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.ParameterizedType;
-import java.util.ArrayList;
-
-/**
- * @since : 11/6/14,2014
- */
-public class WritableList<E extends Writable> extends ArrayList<E> implements Writable{
-	private Class<E> itemTypeClass;
-
-	public WritableList(Class<E> typeClass){
-		this.itemTypeClass = typeClass;
-	}
-
-	public WritableList(Class<E> typeClass,int initialCapacity){
-		super(initialCapacity);
-		this.itemTypeClass = typeClass;
-	}
-
-
-	/**
-	 * <h3> Get item class by </h3>
-	 * <pre>
-	 * (Class<E>) ((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0];
-	 * </pre>
-	 */
-	@Deprecated
-	public WritableList(){
-		this.itemTypeClass = (Class<E>) ((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0];
-	}
-
-	private void check() throws IOException{
-		if(this.itemTypeClass == null){
-			throw new IOException("Class Type of WritableArrayList<E extends Writable> is null");
-		}
-	}
-
-	public Class<E> getItemClass(){
-		return itemTypeClass;
-	}
-
-	/**
-	 * Serialize the fields of this object to <code>out</code>.
-	 *
-	 * @param out <code>DataOuput</code> to serialize this object into.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void write(DataOutput out) throws IOException {
-		this.check();
-		out.writeInt(this.size());
-		for(Writable item: this){
-			item.write(out);
-		}
-	}
-
-	/**
-	 * Deserialize the fields of this object from <code>in</code>.
-	 * <p/>
-	 * <p>For efficiency, implementations should attempt to re-use storage in the
-	 * existing object where possible.</p>
-	 *
-	 * @param in <code>DataInput</code> to deseriablize this object from.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.check();
-		int size = in.readInt();
-		for(int i=0;i<size;i++){
-			try {
-				E item = itemTypeClass.newInstance();
-				item.readFields(in);
-				this.add(item);
-			} catch (InstantiationException e) {
-				throw new IOException("Got exception to create instance for class: "+itemTypeClass+": "+e.getMessage(),e);
-			} catch (IllegalAccessException e) {
-				throw new IOException("Got exception to create instance for class: "+itemTypeClass+": "+e.getMessage(),e);
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/AbstractAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/AbstractAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/AbstractAggregator.java
deleted file mode 100755
index 0837382..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/AbstractAggregator.java
+++ /dev/null
@@ -1,184 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.EntityCreationListener;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.IllegalAggregateFieldTypeException;
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.commons.beanutils.PropertyUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class AbstractAggregator implements Aggregator, EntityCreationListener{
-	private final static Logger LOG = LoggerFactory.getLogger(AbstractAggregator.class);
-
-	private static final String UNASSIGNED = "unassigned";
-	protected List<String> groupbyFields;
-	protected List<AggregateFunctionType> aggregateFunctionTypes;
-	protected List<String> aggregatedFields;
-	// a cache to know immediately if groupby field should come from tags(true) or qualifiers(false)
-	private Boolean[] _groupbyFieldPlacementCache;
-	private Method[] _aggregateFieldReflectedMethodCache;
-
-	public AbstractAggregator(List<String> groupbyFields, List<AggregateFunctionType> aggregateFuntionTypes, List<String> aggregatedFields){
-		this.groupbyFields = groupbyFields;
-		this.aggregateFunctionTypes = aggregateFuntionTypes;
-		this.aggregatedFields = aggregatedFields;
-		_aggregateFieldReflectedMethodCache = new Method[this.aggregatedFields.size()];
-		_groupbyFieldPlacementCache = new Boolean[this.groupbyFields.size()];
-	}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity) throws Exception{
-		accumulate(entity);
-	}
-	
-	public abstract Object result();
-	
-	protected String createGroupFromTags(TaggedLogAPIEntity entity, String groupbyField, int i){
-		String groupbyFieldValue = entity.getTags().get(groupbyField);
-		if(groupbyFieldValue != null){
-			_groupbyFieldPlacementCache[i] = true;
-			return groupbyFieldValue;
-		}
-		return null;
-	}
-	
-	protected String createGroupFromQualifiers(TaggedLogAPIEntity entity, String groupbyField, int i){
-		try{
-			PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(entity, groupbyField);
-			if(pd == null)
-				return null;
-//			_groupbyFieldPlacementCache.put(groupbyField, false);
-			_groupbyFieldPlacementCache[i] = false;
-			return (String)(pd.getReadMethod().invoke(entity));
-		}catch(NoSuchMethodException ex){
-			return null;
-		}catch(InvocationTargetException ex){
-			return null;
-		}catch(IllegalAccessException ex){
-			return null;
-		}
-	}
-	
-	protected String determineGroupbyFieldValue(TaggedLogAPIEntity entity, String groupbyField, int i){
-		Boolean placement = _groupbyFieldPlacementCache[i];
-		String groupbyFieldValue = null; 
-		if(placement != null){
-			groupbyFieldValue = placement.booleanValue() ? createGroupFromTags(entity, groupbyField, i) : createGroupFromQualifiers(entity, groupbyField, i); 
-		}else{
-			groupbyFieldValue = createGroupFromTags(entity, groupbyField, i);
-			if(groupbyFieldValue == null){
-				groupbyFieldValue = createGroupFromQualifiers(entity, groupbyField, i);
-			}
-		}
-		groupbyFieldValue = (groupbyFieldValue == null ? UNASSIGNED : groupbyFieldValue);
-		return groupbyFieldValue;
-	}
-	
-	/**
-	 * TODO For count aggregation, special treatment is the value is always 0 unless we support count(*) or count(<fieldname>) which counts number of rows or 
-	 * number of non-null field
-	 * For other aggregation, like sum,min,max,avg, we should resort to qualifiers
-	 * @param entity
-	 * @return
-	 */
-	protected List<Double> createPreAggregatedValues(TaggedLogAPIEntity entity) throws Exception{
-		List<Double> values = new ArrayList<Double>();
-		int functionIndex = 0;
-		for(AggregateFunctionType type : aggregateFunctionTypes){
-			if(type.name().equals(AggregateFunctionType.count.name())){
-				values.add(new Double(1));
-			}else{
-				// find value in qualifier by checking java bean
-				String aggregatedField = aggregatedFields.get(functionIndex);
-				if(TokenConstant.isExpression(aggregatedField)){
-					try {
-						String expr = TokenConstant.parseExpressionContent(aggregatedField);
-						values.add(ExpressionParser.eval(expr, entity));
-					}catch (Exception ex){
-						LOG.error("Failed to evaluate expression-based aggregation: " + aggregatedField, ex);
-						throw ex;
-					}
-				}else {
-					try {
-						Method m = _aggregateFieldReflectedMethodCache[functionIndex];
-						if (m == null) {
-//						pd = PropertyUtils.getPropertyDescriptor(entity, aggregatedField);
-//						if (pd == null) {
-//							final String errMsg = "Field/tag " + aggregatedField + " is not defined for entity " + entity.getClass().getSimpleName();
-//							logger.error(errMsg);
-//							throw new Exception(errMsg);
-//						}
-//						Object obj = pd.getReadMethod().invoke(entity);
-							String tmp = aggregatedField.substring(0, 1).toUpperCase() + aggregatedField.substring(1);
-							m = entity.getClass().getMethod("get" + tmp);
-							_aggregateFieldReflectedMethodCache[functionIndex] = m;
-						}
-						Object obj = m.invoke(entity);
-						values.add(numberToDouble(obj));
-					} catch (Exception ex) {
-						LOG.error("Cannot do aggregation for field " + aggregatedField, ex);
-						throw ex;
-					}
-				}
-			}
-			functionIndex++;
-		}
-		return values;
-	}
-	
-	/**
-	 * TODO this is a hack, we need elegant way to convert type to a broad precision
-     *
-	 * @param obj
-	 * @return
-	 */
-	protected Double numberToDouble(Object obj){
-		if(obj instanceof Double)
-			return (Double)obj;
-		if(obj instanceof Integer){
-			return new Double(((Integer)obj).doubleValue());
-		}
-		if(obj instanceof Long){
-			return new Double(((Long)obj).doubleValue());
-		}
-		// TODO hack to support string field for demo purpose, should be removed
-		if(obj == null){
-			return new Double(0.0);
-		}
-		if(obj instanceof String){
-			try{
-				return new Double((String)obj);
-			}catch(Exception ex){
-				LOG.warn("Datapoint ignored because it can not be converted to correct number for " + obj, ex);
-				return new Double(0.0);
-			}
-		}
-		
-		throw new IllegalAggregateFieldTypeException(obj.getClass().toString() + " type is not support. The aggregated field must be numeric type, int, long or double");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/Aggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/Aggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/Aggregator.java
deleted file mode 100755
index 1e70e91..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/Aggregator.java
+++ /dev/null
@@ -1,29 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public interface Aggregator {
-    /**
-     * Accumulate callback
-     *
-     * @param entity accumulated entity instance
-     * @throws Exception
-     */
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/EntityCreationListenerFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/EntityCreationListenerFactory.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/EntityCreationListenerFactory.java
deleted file mode 100644
index 7e35bec..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/EntityCreationListenerFactory.java
+++ /dev/null
@@ -1,25 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.log.entity.EntityCreationListener;
-
-public class EntityCreationListenerFactory {
-	public static EntityCreationListener synchronizedEntityCreationListener(EntityCreationListener listener){
-		return new SynchronizedEntityCreationListener(listener);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/FlatAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/FlatAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/FlatAggregator.java
deleted file mode 100755
index e12fea3..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/FlatAggregator.java
+++ /dev/null
@@ -1,61 +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.query.aggregate.timeseries;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-
-/**
- * Not thread safe
- */
-public class FlatAggregator extends AbstractAggregator{
-	protected GroupbyBucket bucket;
-
-    /**
-     * @param groupbyFields
-     * @param aggregateFuntionTypes
-     * @param aggregatedFields
-     */
-	public FlatAggregator(List<String> groupbyFields, List<AggregateFunctionType> aggregateFuntionTypes, List<String> aggregatedFields){
-		super(groupbyFields, aggregateFuntionTypes, aggregatedFields);
-		bucket = new GroupbyBucket(this.aggregateFunctionTypes);
-	}
-	
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception{
-		List<String> groupbyFieldValues = createGroup(entity);
-		List<Double> preAggregatedValues = createPreAggregatedValues(entity);
-		bucket.addDatapoint(groupbyFieldValues, preAggregatedValues);
-	}
-	
-	public Map<List<String>, List<Double>> result(){
-		return bucket.result(); 
-	}
-	
-	protected List<String> createGroup(TaggedLogAPIEntity entity){
-		List<String> groupbyFieldValues = new ArrayList<String>();
-		int i = 0;
-		for(String groupbyField : groupbyFields){
-			String groupbyFieldValue = determineGroupbyFieldValue(entity, groupbyField, i++);
-			groupbyFieldValues.add(groupbyFieldValue);
-		}
-		return groupbyFieldValues;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyBucket.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyBucket.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyBucket.java
deleted file mode 100755
index ea57edb..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyBucket.java
+++ /dev/null
@@ -1,241 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.query.QueryConstants;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class GroupbyBucket {
-	private final static Logger LOG = LoggerFactory.getLogger(GroupbyBucket.class);
-	
-	public static Map<String, FunctionFactory> _functionFactories = 
-			new HashMap<>();
-    
-	// TODO put this logic to AggregatorFunctionType
-	static{
-		_functionFactories.put(AggregateFunctionType.count.name(), new CountFactory());
-		_functionFactories.put(AggregateFunctionType.sum.name(), new SumFactory());
-		_functionFactories.put(AggregateFunctionType.min.name(), new MinFactory());
-		_functionFactories.put(AggregateFunctionType.max.name(), new MaxFactory());
-		_functionFactories.put(AggregateFunctionType.avg.name(), new AvgFactory());
-	}
-	
-	private List<AggregateFunctionType> types;
-//	private SortedMap<List<String>, List<Function>> group2FunctionMap = 
-//			new TreeMap<List<String>, List<Function>>(new GroupbyFieldsComparator());
-	
-	private Map<List<String>, List<Function>> group2FunctionMap = new HashMap<>(); //new GroupbyFieldsComparator());
-	
-	public GroupbyBucket(List<AggregateFunctionType> types){
-		this.types = types;
-	}
-	
-	public void addDatapoint(List<String> groupbyFieldValues, List<Double> values){
-		// LOG.info("DEBUG: addDatapoint: groupby=["+StringUtils.join(groupbyFieldValues,",")+"], values=["+StringUtils.join(values, ",")+"]");
-		
-		// locate groupby bucket
-		List<Function> functions = group2FunctionMap.get(groupbyFieldValues);
-		if(functions == null){
-			functions = new ArrayList<Function>();
-			for(AggregateFunctionType type : types){
-				functions.add(_functionFactories.get(type.name()).createFunction());
-			}
-			group2FunctionMap.put(groupbyFieldValues, functions);
-		}
-		int functionIndex = 0;
-		for(Double v : values){
-			functions.get(functionIndex).run(v);
-			functionIndex++;
-		}
-	}
-	
-	public Map<List<String>, List<Double>> result(){
-		Map<List<String>, List<Double>> result = new HashMap<List<String>, List<Double>>();
-		for(Map.Entry<List<String>, List<Function>> entry : this.group2FunctionMap.entrySet()){
-			List<Double> values = new ArrayList<Double>();
-			for(Function f : entry.getValue()){
-				values.add(f.result());
-			}
-			result.put(entry.getKey(), values);
-		}
-		return result;
-	}
-
-	public List<GroupbyKeyValue> getGroupbyKeyValue(){
-		List<GroupbyKeyValue>  results = new ArrayList<GroupbyKeyValue>();
-		
-		for(Map.Entry<List<String>, List<Function>> entry : this.group2FunctionMap.entrySet()){
-			GroupbyKey key = new GroupbyKey();
-			for(String keyStr:entry.getKey()){
-				try {
-					key.addValue(keyStr.getBytes(QueryConstants.CHARSET));
-				} catch (UnsupportedEncodingException e) {
-					LOG.error(e.getMessage(),e);
-				}
-			}
-			GroupbyValue value = new GroupbyValue();
-			for(Function f : entry.getValue()){
-				value.add(f.result());
-				value.addMeta(f.count());
-			}
-			results.add(new GroupbyKeyValue(key,value));
-		}
-		
-		return results;
-	}
-	
-	public static interface FunctionFactory{
-		public Function createFunction();
-	}
-	
-	public static abstract class Function{
-		protected int count;
-
-		public abstract void run(double v);
-		public abstract double result();
-		public int count(){
-			return count;
-		}
-		public void incrCount(){
-			count ++;
-		}
-	}
-
-	private static class CountFactory implements FunctionFactory{
-		@Override
-		public Function createFunction(){
-			return new Count();
-		}
-	}
-	
-	
-	private static class Count extends Sum{
-		public Count(){
-			super();
-		}
-	}
-	
-	private static class SumFactory implements FunctionFactory{
-		@Override
-		public Function createFunction(){
-			return new Sum();
-		}
-	}
-	
-	private static class Sum extends Function{
-		private double summary;
-		public Sum(){
-			this.summary = 0.0;
-		}
-		@Override
-		public void run(double v){
-			this.incrCount();
-			this.summary += v;
-		}
-		
-		@Override
-		public double result(){
-			return this.summary;
-		}
-	}
-	
-	private static class MinFactory implements FunctionFactory{
-		@Override
-		public Function createFunction(){
-			return new Min();
-		}
-	}
-	public static class Min extends Function{
-		private double minimum;
-		public Min(){
-			// TODO is this a bug, or only positive numeric calculation is supported
-			this.minimum = Double.MAX_VALUE;
-		}
-
-		@Override
-		public void run(double v){
-			if(v < minimum){
-				minimum = v;
-			}
-			this.incrCount();
-		}
-		
-		@Override
-		public double result(){
-			return minimum;
-		}
-	}
-	
-	private static class MaxFactory implements FunctionFactory{
-		@Override
-		public Function createFunction(){
-			return new Max();
-		}
-	}
-	public static class Max extends Function{
-		private double maximum;
-		public Max(){
-			// TODO is this a bug, or only positive numeric calculation is supported
-			this.maximum = 0.0;
-		}
-		@Override
-		public void run(double v){
-			if(v > maximum){
-				maximum = v;
-			}
-			this.incrCount();
-		}
-		
-		@Override
-		public double result(){
-			return maximum;
-		}
-	}
-	
-	private static class AvgFactory implements FunctionFactory{
-		@Override
-		public Function createFunction(){
-			return new Avg();
-		}
-	}
-	public static class Avg extends Function{
-		private double total;
-		public Avg(){
-			this.total = 0.0;
-		}
-		@Override
-		public void run(double v){
-			total += v;
-			this.incrCount();
-		}
-		@Override
-		public double result(){
-			return this.total/this.count;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyFieldsComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyFieldsComparator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyFieldsComparator.java
deleted file mode 100644
index 6635483..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/GroupbyFieldsComparator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate.timeseries;
-
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * this is default comparator for aggregation. The behavior is to sort by groupby fields ascendantly
- */
-public class GroupbyFieldsComparator implements Comparator<List<String>>{
-	@Override 
-    public int compare(List<String> list1, List<String> list2){
-		if(list1 == null || list2 == null || list1.size() != list2.size())
-			throw new IllegalArgumentException("2 list of groupby fields must be non-null and have the same size");
-		int r = 0;
-		int index = 0;
-		for(String s1 : list1){
-			r = s1.compareTo(list2.get(index++));
-			if(r != 0)
-				return r;
-		}
-		return r;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregateEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregateEntity.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregateEntity.java
deleted file mode 100644
index 9e78233..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregateEntity.java
+++ /dev/null
@@ -1,67 +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.query.aggregate.timeseries;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.SortedSet;
-import java.util.TreeMap;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class HierarchicalAggregateEntity {
-	private String key;
-	private List<GroupbyBucket.Function> tmpValues = new ArrayList<GroupbyBucket.Function>();
-	private List<Double> values = new ArrayList<Double>();
-	private SortedMap<String, HierarchicalAggregateEntity> children = new TreeMap<String, HierarchicalAggregateEntity>();
-	private SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> sortedList = null;
-
-	public SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> getSortedList() {
-		return sortedList;
-	}
-	public void setSortedList(
-			SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> sortedList) {
-		this.sortedList = sortedList;
-	}
-	public List<GroupbyBucket.Function> getTmpValues() {
-		return tmpValues;
-	}
-	public void setTmpValues(List<GroupbyBucket.Function> tmpValues) {
-		this.tmpValues = tmpValues;
-	}
-	public String getKey() {
-		return key;
-	}
-	public void setKey(String key) {
-		this.key = key;
-	}
-	public List<Double> getValues() {
-		return values;
-	}
-	public void setValues(List<Double> values) {
-		this.values = values;
-	}
-	public SortedMap<String, HierarchicalAggregateEntity> getChildren() {
-		return children;
-	}
-	public void setChildren(SortedMap<String, HierarchicalAggregateEntity> children) {
-		this.children = children;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregator.java
deleted file mode 100755
index ecb80ac..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/HierarchicalAggregator.java
+++ /dev/null
@@ -1,82 +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.query.aggregate.timeseries;
-
-import java.util.List;
-import java.util.SortedMap;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-
-public class HierarchicalAggregator extends AbstractAggregator{
-	private HierarchicalAggregateEntity root = new HierarchicalAggregateEntity();
-
-	public HierarchicalAggregator(List<String> groupbyFields, List<AggregateFunctionType> aggregateFuntionTypes, List<String> aggregatedFields){
-		super(groupbyFields, aggregateFuntionTypes, aggregatedFields);
-	}
-
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception{
-		List<Double> preAggregatedValues = createPreAggregatedValues(entity);
-		// aggregate to root first
-		addDatapoint(root, preAggregatedValues);
-		// go through hierarchical tree
-		HierarchicalAggregateEntity current = root;
-		int i = 0;
-		for(String groupbyField : groupbyFields){
-			// determine groupbyFieldValue from tag or fields
-			String groupbyFieldValue = determineGroupbyFieldValue(entity, groupbyField, i);
-			SortedMap<String, HierarchicalAggregateEntity> children = current.getChildren();
-			if(children.get(groupbyFieldValue) == null){
-				HierarchicalAggregateEntity tmp = new HierarchicalAggregateEntity();
-				children.put(groupbyFieldValue, tmp);
-			}
-			children.get(groupbyFieldValue).setKey(groupbyFieldValue);
-			addDatapoint(children.get(groupbyFieldValue), preAggregatedValues);
-			current = children.get(groupbyFieldValue);
-		}
-	}
-
-	private void addDatapoint(HierarchicalAggregateEntity entity, List<Double> values){
-		List<GroupbyBucket.Function> functions = entity.getTmpValues();
-		// initialize list of function
-		if(functions.isEmpty()){
-			for(AggregateFunctionType type : aggregateFunctionTypes){
-				functions.add(GroupbyBucket._functionFactories.get(type.name()).createFunction());
-			}
-		}
-		int functionIndex = 0;
-		for(Double v : values){
-			functions.get(functionIndex).run(v);
-			functionIndex++;
-		}
-	}
-
-	private void finalizeHierarchicalAggregateEntity(HierarchicalAggregateEntity entity){
-		for(GroupbyBucket.Function f : entity.getTmpValues()){
-			entity.getValues().add(f.result());
-		}
-		for(HierarchicalAggregateEntity child : entity.getChildren().values()){
-			finalizeHierarchicalAggregateEntity(child);
-		}
-		entity.setTmpValues(null);
-	}
-
-	public HierarchicalAggregateEntity result(){
-		finalizeHierarchicalAggregateEntity(root);
-		return this.root;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostFlatAggregateSort.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostFlatAggregateSort.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostFlatAggregateSort.java
deleted file mode 100644
index f62d2c2..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostFlatAggregateSort.java
+++ /dev/null
@@ -1,93 +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.query.aggregate.timeseries;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-public class PostFlatAggregateSort {
-	private static SortedSet<Map.Entry<List<String>, List<Double>>> sortByValue(Map<List<String>, List<Double>> map, List<SortOption> sortOptions) {
-	    SortedSet<Map.Entry<List<String>, List<Double>>> sortedEntries = new TreeSet<Map.Entry<List<String>, List<Double>>>(new MapEntryComparator(sortOptions));
-	    sortedEntries.addAll(map.entrySet());
-	    return sortedEntries;
-	}
-
-	/**
-	 * sort aggregated results with sort options
-	 * @param aggregatedResult aggregated result set, but it is not sorted
-	 * @sortOptions sorting options
-	 * @topN top N results will be returned if topN is specified. If it's not specified (as default value 0), all results will be returned
-	 */
-	public static List<Map.Entry<List<String>, List<Double>>> sort(Map<List<String>, List<Double>> aggregatedResult, List<SortOption> sortOptions, int topN){
-		SortedSet<Map.Entry<List<String>, List<Double>>> allList = sortByValue(aggregatedResult, sortOptions);
-		List<Map.Entry<List<String>, List<Double>>> result = new ArrayList<Map.Entry<List<String>, List<Double>>>();
-		for (Map.Entry<List<String>, List<Double>> entry : allList) {
-			result.add(entry);
-			if (topN > 0 && result.size() >= topN) {
-				break;
-			}
-		}
-		return result;
-	}
-
-	private static class MapEntryComparator implements Comparator<Map.Entry<List<String>, List<Double>>>{
-		private List<SortOption> sortOptions;
-		public MapEntryComparator(List<SortOption> sortOptions){
-			this.sortOptions = sortOptions;
-		}
-		/**
-		 * default to sort by all groupby fields
-		 */
-		@Override
-        public int compare(Map.Entry<List<String>, List<Double>> e1, Map.Entry<List<String>, List<Double>> e2){
-			int r = 0;
-			List<String> keyList1 = e1.getKey();
-			List<Double> valueList1 = e1.getValue();
-			List<String> keyList2 = e2.getKey();
-			List<Double> valueList2 = e2.getValue();
-			for(SortOption so : sortOptions){
-				int index = so.getIndex();
-				if (index == -1) {
-					continue;
-				}
-				if(!so.isInGroupby()){  // sort fields come from functions
-					Double value1 = valueList1.get(index);
-					Double value2 = valueList2.get(index);
-					r = value1.compareTo(value2);
-				}else{  // sort fields come from groupby fields
-					String key1 = keyList1.get(index);
-					String key2 = keyList2.get(index);
-					r = key1.compareTo(key2);
-				}
-				if(r == 0) continue;
-				if(!so.isAscendant()){
-					r = -r;
-				}
-				return r;
-			}
-			// default to sort by groupby fields ascendently
-			if(r ==0){ // TODO is this check necessary
-				return new GroupbyFieldsComparator().compare(keyList1, keyList2);
-			}
-			return r;
-        }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostHierarchicalAggregateSort.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostHierarchicalAggregateSort.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostHierarchicalAggregateSort.java
deleted file mode 100644
index 7b0997b..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/PostHierarchicalAggregateSort.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
- *
- *    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.query.aggregate.timeseries;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-public class PostHierarchicalAggregateSort {
-
-	private static SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> sortByValue(HierarchicalAggregateEntity entity, List<SortOption> sortOptions) {
-	    SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> sortedEntries = new TreeSet<Map.Entry<String, HierarchicalAggregateEntity>>(new MapEntryComparator(sortOptions));
-	    sortedEntries.addAll(entity.getChildren().entrySet());
-	    return sortedEntries;
-	}
-
-	/**
-	 * sort aggregated results with sort options
-     *
-     * @param result
-     * @param sortOptions
-     * @return
-     */
-	public static HierarchicalAggregateEntity sort(HierarchicalAggregateEntity result, List<SortOption> sortOptions){
-		SortedSet<Map.Entry<String, HierarchicalAggregateEntity>> tmp = sortByValue(result, sortOptions);
-		result.setSortedList(tmp);
-		result.setChildren(null);
-		for(Map.Entry<String, HierarchicalAggregateEntity> entry : tmp){
-			sort(entry.getValue(), sortOptions);
-		}
-		return result;
-	}
-
-	private static class MapEntryComparator implements Comparator<Map.Entry<String, HierarchicalAggregateEntity>>{
-		private List<SortOption> sortOptions;
-
-		public MapEntryComparator(List<SortOption> sortOptions){
-			this.sortOptions = sortOptions;
-		}
-
-		/**
-		 * default to sort by all groupby fields
-		 */
-		@Override
-        public int compare(Map.Entry<String, HierarchicalAggregateEntity> e1, Map.Entry<String, HierarchicalAggregateEntity> e2){
-			int r = 0;
-			String key1 = e1.getKey();
-			List<Double> valueList1 = e1.getValue().getValues();
-			String key2 = e2.getKey();
-			List<Double> valueList2 = e2.getValue().getValues();
-			for(SortOption so : sortOptions){
-				int index = so.getIndex();
-				if (index == -1) {
-					continue;
-				}
-				if(!so.isInGroupby()){  // sort fields come from functions
-					Double value1 = valueList1.get(index);
-					Double value2 = valueList2.get(index);
-					r = value1.compareTo(value2);
-				}  
-				// sort fields come from groupby fields, then silently ignored
-				
-				if(r == 0) continue;
-				if(!so.isAscendant()){
-					r = -r;
-				}
-				return r;
-			}
-			// default to sort by groupby fields ascendently
-			if(r ==0){
-				return key1.compareTo(key2);
-			}
-			return r;
-        }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOption.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOption.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOption.java
deleted file mode 100644
index d1578ac..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOption.java
+++ /dev/null
@@ -1,49 +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.query.aggregate.timeseries;
-
-/**
- * sum(field1), max(field2) groupby(field3, field4) sort by field1 asc, field3 desc
- * There are 2 SortOption object, then
- * the 1st one is inGroupby=false, index=0, ascendent=true
- * the 2nd one is inGroupby=true, index=1, ascendent=false
- *
- */
-public class SortOption {
-	private boolean inGroupby; // sort field defaultly is not from groupby fields 
-	private int index; // index relative to list of groupby fields or list of functions
-	private boolean ascendant; //asc or desc
-
-	public boolean isInGroupby() {
-		return inGroupby;
-	}
-	public void setInGroupby(boolean inGroupby) {
-		this.inGroupby = inGroupby;
-	}
-	public int getIndex() {
-		return index;
-	}
-	public void setIndex(int index) {
-		this.index = index;
-	}
-	public boolean isAscendant() {
-		return ascendant;
-	}
-	public void setAscendant(boolean ascendant) {
-		this.ascendant = ascendant;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOptionsParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOptionsParser.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOptionsParser.java
deleted file mode 100644
index 1360e0c..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SortOptionsParser.java
+++ /dev/null
@@ -1,69 +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.query.aggregate.timeseries;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SortOptionsParser {
-	private static final Logger LOG = LoggerFactory.getLogger(SortOptionsParser.class);
-	private static Pattern pattern = Pattern.compile("^(.+)\\s+(asc|desc)$");
-		
-	public static List<SortOption> parse(List<String> groupbyFields, List<String> aggregatedFields, List<String> sortOptions, List<String> sortFields){
-		List<SortOption> list = new ArrayList<SortOption>();
-		for(String sortOption : sortOptions){
-			Matcher m = pattern.matcher(sortOption);
-			if(!m.find()){
-				throw new IllegalArgumentException("sort option must have the format of <groupbyfield|function> asc|desc");
-			}
-			String field = m.group(1);
-			if (sortFields != null) {
-				sortFields.add(field);
-			}
-			SortOption so = new SortOption();
-			list.add(so);
-			so.setAscendant(m.group(2).equals("asc") ? true : false);
-			int index = aggregatedFields.indexOf(field); 
-			if(index > -1){
-				so.setInGroupby(false);
-				so.setIndex(index);
-				continue;
-			}
-			if(groupbyFields != null){  // if groupbyFields is not provided, ignore this sort field
-				index = groupbyFields.indexOf(field);
-				if(index > -1){
-					so.setInGroupby(true);
-					so.setIndex(index);
-					continue;
-				}
-			}
-			logNonExistingSortByField(field);
-			so.setInGroupby(false);
-			so.setIndex(-1);
-		}
-		return list;
-	}
-	
-	private static void logNonExistingSortByField(String sortByField){
-		LOG.warn("Sortby field is neither in aggregated fields or groupby fields, ignore " + sortByField);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedAggregator.java
deleted file mode 100755
index d8b781e..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedAggregator.java
+++ /dev/null
@@ -1,35 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class SynchronizedAggregator implements Aggregator{
-	private Object mutex = new Object();
-	private Aggregator agg;
-	
-	public SynchronizedAggregator(Aggregator agg){
-		this.agg = agg;
-	}
-	
-	@Override
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception{
-		synchronized(mutex){
-			agg.accumulate(entity);
-		}
-	}
-}	

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedEntityCreationListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedEntityCreationListener.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedEntityCreationListener.java
deleted file mode 100644
index 7c1412e..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/SynchronizedEntityCreationListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate.timeseries;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.EntityCreationListener;
-
-public class SynchronizedEntityCreationListener implements EntityCreationListener{
-	private Object mutex = new Object();
-	private EntityCreationListener listener;
-	
-	public SynchronizedEntityCreationListener(EntityCreationListener listener){
-		this.listener = listener;
-	}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity) throws Exception{
-		synchronized(mutex){
-			listener.entityCreated(entity);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesAggregator.java
deleted file mode 100755
index 5bebe13..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesAggregator.java
+++ /dev/null
@@ -1,169 +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.query.aggregate.timeseries;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyAggregatable;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO Assuming that data point comes in the sequence of occurrence time desc or asc would 
- * save memory for holding all the data in the memory
- *
- * <h3>Aggregate Bucket Structure</h3>
- * <pre>
- * {
- *  ["key<SUB>1</SUB>","key<SUB>2</SUB>",...,(entity.getTimestamp() - startTime)/intervalms]:[value<SUB>1</SUB>,value<SUB>2</SUB>,...,value<SUB>n</SUB>]
- * }
- * </pre>
- *
- */
-public class TimeSeriesAggregator extends FlatAggregator implements GroupbyKeyAggregatable {
-	private final static Logger LOG = LoggerFactory.getLogger(TimeSeriesAggregator.class);
-	private static final int DEFAULT_DATAPOINT_MAX_COUNT = 1000;
-	private long startTime;
-	private long endTime;
-	private long intervalms;
-	private int numFunctions;
-	private int ignoredEntityCounter = 0;
-	
-	public TimeSeriesAggregator(List<String> groupbyFields, List<AggregateFunctionType> aggregateFuntionTypes, List<String> aggregatedFields,
-			long startTime, long endTime, long intervalms){
-		super(groupbyFields, aggregateFuntionTypes, aggregatedFields);
-		// guard to avoid too many data points returned
-//		validateTimeRange(startTime, endTime, intervalms);
-		this.startTime = startTime;
-		this.endTime = endTime;
-		this.intervalms = intervalms;
-		this.numFunctions = aggregateFuntionTypes.size();
-	}
-
-//	@Deprecated
-//	public static void validateTimeRange(long startTime, long endTime, long intervalms){
-//		if(startTime >= endTime || intervalms <= 0){
-//			throw new IllegalArgumentException("invalid argument, startTime should be less than endTime and interval must be greater than 0, starTime is " + startTime + " and endTime is " + endTime + ", interval is " + intervalms);
-//		}
-//		if((endTime-startTime)/intervalms > DEFAULT_DATAPOINT_MAX_COUNT){
-//			throw new IllegalArgumentException("invalid argument, # of datapoints should be less than " + DEFAULT_DATAPOINT_MAX_COUNT + ", current # of datapoints is " + (endTime-startTime)/intervalms);
-//		}
-//	}
-	
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception{
-		List<String> groupbyFieldValues = createGroup(entity);
-		// TODO: make sure timestamp be in range of this.startTime to this.endTime in outer side
-		// guard the time range to avoid to accumulate entities whose timestamp is bigger than endTime
-		if(entity.getTimestamp() >= this.endTime || entity.getTimestamp() < this.startTime){
-			if(LOG.isDebugEnabled()) LOG.debug("Ignore in-coming entity whose timestamp > endTime or < startTime, timestamp: " + entity.getTimestamp() + ", startTime:" + startTime + ", endTime:" + endTime);
-			this.ignoredEntityCounter ++;
-			return;
-		}
-		// time series bucket index
-		long located =(entity.getTimestamp() - startTime)/intervalms; 
-		groupbyFieldValues.add(String.valueOf(located));
-		List<Double> preAggregatedValues = createPreAggregatedValues(entity);
-		bucket.addDatapoint(groupbyFieldValues, preAggregatedValues);
-	}
-	
-	public Map<List<String>, List<Double>> result(){
-		if(this.ignoredEntityCounter > 0)
-			LOG.warn("Ignored "+this.ignoredEntityCounter+" entities for reason: timestamp > "+this.endTime+" or < "+this.startTime);
-		return bucket.result();
-	}
-
-	/**
-	 * Support new aggregate result
-	 *
-	 * @return
-	 */
-	@Override
-	public List<GroupbyKeyValue> getGroupbyKeyValues(){
-		if(this.ignoredEntityCounter > 0)
-			LOG.warn("Ignored "+this.ignoredEntityCounter+" entities for reason: timestamp > "+this.endTime+" or < "+this.startTime);
-		return bucket.getGroupbyKeyValue();
-	}
-	
-	public Map<List<String>, List<double[]>> getMetric(){
-		// groupbyfields+timeseriesbucket --> aggregatedvalues for different function
-		Map<List<String>, List<Double>> result = bucket.result();
-//		Map<List<String>, List<double[]>> timeseriesDatapoints = new HashMap<List<String>, List<double[]>>();
-//		/**
-//		 * bug fix: startTime is inclusive and endTime is exclusive
-//		 */
-////		int numDatapoints =(int)((endTime-startTime)/intervalms + 1);
-//		int numDatapoints =(int)((endTime-1-startTime)/intervalms + 1);
-//		for(Map.Entry<List<String>, List<Double>> entry : result.entrySet()){
-//			// get groups
-//			List<String> groupbyFields = entry.getKey();
-//			List<String> copy = new ArrayList<String>(groupbyFields);
-//			String strTimeseriesIndex = copy.remove(copy.size()-1);
-//			List<double[]> functionValues = timeseriesDatapoints.get(copy);
-//			if(functionValues == null){
-//				functionValues = new ArrayList<double[]>();
-//				timeseriesDatapoints.put(copy, functionValues);
-//				for(int i=0; i<numFunctions; i++){
-//					functionValues.add(new double[numDatapoints]);
-//				}
-//			}
-//			int timeseriesIndex = Integer.valueOf(strTimeseriesIndex);
-//			int functionIndex = 0;
-//			for(double[] values : functionValues){
-//				values[timeseriesIndex] = entry.getValue().get(functionIndex);
-//				functionIndex++;
-//			}
-//		}
-//		return timeseriesDatapoints;
-		return toMetric(result,(int)((endTime-1-startTime)/intervalms + 1),this.numFunctions);
-	}
-
-	public static Map<List<String>, List<double[]>> toMetric(Map<List<String>, List<Double>> result,int numDatapoints,int numFunctions){
-		Map<List<String>, List<double[]>> timeseriesDatapoints = new HashMap<List<String>, List<double[]>>();
-		/**
-		 * bug fix: startTime is inclusive and endTime is exclusive
-		 */
-//		int numDatapoints =(int)((endTime-startTime)/intervalms + 1);
-//		int numDatapoints =(int)((endTime-1-startTime)/intervalms + 1);
-		for(Map.Entry<List<String>, List<Double>> entry : result.entrySet()){
-			// get groups
-			List<String> groupbyFields = entry.getKey();
-			List<String> copy = new ArrayList<String>(groupbyFields);
-			String strTimeseriesIndex = copy.remove(copy.size()-1);
-			List<double[]> functionValues = timeseriesDatapoints.get(copy);
-			if(functionValues == null){
-				functionValues = new ArrayList<double[]>();
-				timeseriesDatapoints.put(copy, functionValues);
-				for(int i=0; i<numFunctions; i++){
-					functionValues.add(new double[numDatapoints]);
-				}
-			}
-			int timeseriesIndex = Integer.valueOf(strTimeseriesIndex);
-			int functionIndex = 0;
-			for(double[] values : functionValues){
-				values[timeseriesIndex] = entry.getValue().get(functionIndex);
-				functionIndex++;
-			}
-		}
-		return timeseriesDatapoints;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesBucket.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesBucket.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesBucket.java
deleted file mode 100644
index d662658..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesBucket.java
+++ /dev/null
@@ -1,76 +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.query.aggregate.timeseries;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * only numeric aggregation is supported and number type supported is double
- */
-public class TimeSeriesBucket {
-	private final static Logger LOG = LoggerFactory.getLogger(TimeSeriesBucket.class);
-	private long startTime;
-	private long endTime;
-	private long interval;
-	
-	// map of aggregation function to aggregated values 
-	List<double[]> aggregatedValues = new ArrayList<double[]>();
-	
-	// align from the startTime
-	/**
-	 * 
-	 * @param startTime milliseconds
-	 * @param endTime milliseconds
-	 * @param intervalMillseconds
-	 * @param aggFunctions
-	 */
-	public TimeSeriesBucket(long startTime, long endTime, long intervalms, int numAggFunctions){
-		int count =(int)((endTime-startTime)/intervalms);
-		for(int i=0; i<numAggFunctions; i++){
-			aggregatedValues.add(new double[count]);
-		}
-	}
-	
-	/**
-	 * add datapoint which has a list of values for different aggregate functions
-	 * for example, sum(numHosts), count(*), avg(timespan) etc
-	 * @param timestamp
-	 * @param values
-	 */
-	public void addDataPoint(long timestamp, List<Double> values){
-		// locate timeseries bucket
-		if(timestamp < startTime || timestamp > endTime){
-			LOG.warn("timestamp<startTime or timestamp>endTime, ignore this datapoint." + timestamp + "," + startTime + ":" + endTime);
-			return;
-		}
-		int located =(int)((timestamp - startTime)/interval);
-		int index = 0;
-		for(Double src : values){
-			double[] timeSeriesValues = aggregatedValues.get(index);
-			timeSeriesValues[located] += src;
-			index++;
-		}
-	}
-	
-	public List<double[]> aggregatedValues(){
-		return this.aggregatedValues;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesPostFlatAggregateSort.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesPostFlatAggregateSort.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesPostFlatAggregateSort.java
deleted file mode 100644
index c0a6e06..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/TimeSeriesPostFlatAggregateSort.java
+++ /dev/null
@@ -1,151 +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.query.aggregate.timeseries;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-public class TimeSeriesPostFlatAggregateSort {
-	// private static final Logger logger =
-	// LoggerFactory.getLogger(PostFlatAggregateSort.class);
-
-	private static SortedSet<Map.Entry<List<String>, List<Double>>> sortByValue(
-			Map<List<String>, List<Double>> mapForSort,
-			List<SortOption> sortOptions) {
-		SortedSet<Map.Entry<List<String>, List<Double>>> sortedEntries = new TreeSet<Map.Entry<List<String>, List<Double>>>(
-				new MapEntryComparator(sortOptions));
-		sortedEntries.addAll(mapForSort.entrySet());
-		return sortedEntries;
-	}
-
-	/**
-	 * sort aggregated results with sort options
-	 * 
-	 * @param entity
-	 */
-	public static List<Map.Entry<List<String>, List<double[]>>> sort(
-			Map<List<String>, List<Double>> mapForSort,
-			Map<List<String>, List<double[]>> valueMap,
-			List<SortOption> sortOptions, int topN) {
-
-		processIndex(sortOptions);
-		List<Map.Entry<List<String>, List<double[]>>> result = new ArrayList<Map.Entry<List<String>, List<double[]>>>();
-		SortedSet<Map.Entry<List<String>, List<Double>>> sortedSet = sortByValue(
-				mapForSort, sortOptions);
-		for (Map.Entry<List<String>, List<Double>> entry : sortedSet) {
-			List<String> key = entry.getKey();
-			List<double[]> value = valueMap.get(key);
-			if (value != null) {
-				Map.Entry<List<String>, List<double[]>> newEntry = new ImmutableEntry<List<String>, List<double[]>>(key, value);
-				result.add(newEntry);
-				if (topN > 0 && result.size() >= topN) {
-					break;
-				}
-			}
-		}
-		return result;
-	}
-
-	private static void processIndex(List<SortOption> sortOptions) {
-		for (int i = 0; i < sortOptions.size(); ++i) {
-			SortOption so = sortOptions.get(i);
-			so.setIndex(i);
-		}
-	}
-
-	private static class MapEntryComparator implements
-			Comparator<Map.Entry<List<String>, List<Double>>> {
-		private List<SortOption> sortOptions;
-
-		public MapEntryComparator(List<SortOption> sortOptions) {
-			this.sortOptions = sortOptions;
-		}
-
-		/**
-		 * default to sort by all groupby fields
-		 */
-		@Override
-		public int compare(Map.Entry<List<String>, List<Double>> e1,
-				Map.Entry<List<String>, List<Double>> e2) {
-			int r = 0;
-			List<String> keyList1 = e1.getKey();
-			List<Double> valueList1 = e1.getValue();
-			List<String> keyList2 = e2.getKey();
-			List<Double> valueList2 = e2.getValue();
-			for (SortOption so : sortOptions) {
-				int index = so.getIndex();
-				if (index == -1) {
-					continue;
-				}
-				if (!so.isInGroupby()) { // sort fields come from functions
-					Double value1 = valueList1.get(index);
-					Double value2 = valueList2.get(index);
-					r = value1.compareTo(value2);
-				} else { // sort fields come from groupby fields
-					String key1 = keyList1.get(index);
-					String key2 = keyList2.get(index);
-					r = key1.compareTo(key2);
-				}
-				if (r == 0)
-					continue;
-				if (!so.isAscendant()) {
-					r = -r;
-				}
-				return r;
-			}
-			// default to sort by groupby fields ascendently
-			if (r == 0) { // TODO is this check necessary
-				return new GroupbyFieldsComparator()
-						.compare(keyList1, keyList2);
-			}
-			return r;
-		}
-	}
-
-	static class ImmutableEntry<K, V> implements Map.Entry<K, V>, Serializable {
-		private final K key;
-		private final V value;
-
-		ImmutableEntry(K key, V value) {
-			this.key = key;
-			this.value = value;
-		}
-
-		@Override
-		public K getKey() {
-			return key;
-		}
-
-		@Override
-		public V getValue() {
-			return value;
-		}
-
-		@Override
-		public final V setValue(V value) {
-			throw new UnsupportedOperationException();
-		}
-
-		private static final long serialVersionUID = 0;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestGroupbyKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestGroupbyKey.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestGroupbyKey.java
deleted file mode 100755
index b07229b..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestGroupbyKey.java
+++ /dev/null
@@ -1,74 +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.query.aggregate.raw;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestGroupbyKey {
-	@Test
-	public void testGroupbyKey(){
-		GroupbyKey key1 = new GroupbyKey();
-		Assert.assertEquals(0, key1.getValue().size());
-		
-		key1.addValue(new byte[]{1, 3, 5});
-		Assert.assertEquals(1, key1.getValue().size());
-		
-		key1.clear();
-		Assert.assertEquals(0, key1.getValue().size());
-		
-		key1.addValue(new byte[]{1, 3, 5});
-		GroupbyKey key2 = new GroupbyKey();
-		key2.addValue(new byte[]{1, 3, 5});
-		Assert.assertEquals(key1, key2);
-		
-		GroupbyKey key3 = new GroupbyKey(key1);
-		Assert.assertEquals(key1, key3);
-		Assert.assertEquals(key2, key3);
-	}
-	
-	@Test
-	public void testGroupbyKeyComparator(){
-		GroupbyKeyComparator comparator = new GroupbyKeyComparator();
-		GroupbyKey key1 = new GroupbyKey();
-		key1.addValue("hello".getBytes());
-		GroupbyKey key2 = new GroupbyKey();
-		key2.addValue("world".getBytes());
-		int r = comparator.compare(key1, key2);
-		Assert.assertTrue(r < 0);
-		
-		key2.clear();
-		key2.addValue("friend".getBytes());
-		r = comparator.compare(key1, key2);
-		Assert.assertTrue(r > 0);
-		
-		key2.clear();
-		key2.addValue("hello".getBytes());
-		r = comparator.compare(key1, key2);
-		Assert.assertTrue(r == 0);
-		
-		key1.clear();
-		key2.clear();
-		key1.addValue("hello".getBytes());
-		key1.addValue("tom".getBytes());
-		key2.addValue("hello".getBytes());
-		key2.addValue("jackie".getBytes());
-		r = comparator.compare(key1, key2);
-		Assert.assertTrue(r > 0);
-	}
-}


[26/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceAsyncClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceAsyncClient.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceAsyncClient.java
deleted file mode 100644
index 48e71f5..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceAsyncClient.java
+++ /dev/null
@@ -1,117 +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.service.client;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.Future;
-
-/**
- * @see IEagleServiceClient
- */
-public interface EagleServiceAsyncClient extends Closeable{
-    /**
-     *
-     * @param <E>
-     * @param entities
-     * @param serviceName
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities,final String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param entityClass
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities,final Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities,final String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities,final Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param request
-     * @return
-     */
-    Future<GenericServiceAPIResponseEntity<String>> delete(final EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException, IOException;
-
-    /**
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities,final String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities,final Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param request
-     * @return
-     */
-    <E extends Object> Future<GenericServiceAPIResponseEntity<String>> search(final EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceClientException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceClientException.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceClientException.java
deleted file mode 100644
index d3845db..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceClientException.java
+++ /dev/null
@@ -1,64 +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.service.client;
-
-/**
- * Default Eagle service client exception class
- */
-public class EagleServiceClientException extends Exception {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1710851110199812779L;
-
-	/**
-	 * Default constructor of EagleServiceClientException
-	 */
-    public EagleServiceClientException() {
-        super();
-    }
-
-    /**
-     * Constructor of EagleServiceClientException
-     * 
-     * @param message error message
-     */
-    public EagleServiceClientException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor of EagleServiceClientException
-     * 
-     * @param message error message
-     * @param cause the cause of the exception
-     * 
-     */
-    public EagleServiceClientException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructor of EagleServiceClientException
-     * 
-     * @param cause the cause of the exception
-     */
-    public EagleServiceClientException(Throwable cause) {
-        super(cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
deleted file mode 100644
index 2b2b1ac..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceConnector.java
+++ /dev/null
@@ -1,70 +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.service.client;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.common.config.EagleConfigConstants;
-
-import java.io.Serializable;
-
-/**
- * Some common codes to enable DAO through eagle service including service host/post, credential population etc.
- */
-public class EagleServiceConnector implements Serializable{
-    private final String eagleServiceHost;
-    private final Integer eagleServicePort;
-    private String username;
-    private String password;
-
-    public String getEagleServiceHost(){
-        return this.eagleServiceHost;
-    }
-
-    public Integer getEagleServicePort(){
-        return this.eagleServicePort;
-    }
-
-    public String getUsername(){
-        return username;
-    }
-
-    public String getPassword(){
-        return password;
-    }
-
-    public EagleServiceConnector(String eagleServiceHost, Integer eagleServicePort) {
-        this(eagleServiceHost, eagleServicePort, null, null);
-    }
-
-    public EagleServiceConnector(String eagleServiceHost, Integer eagleServicePort, String username, String password) {
-        this.eagleServiceHost = eagleServiceHost;
-        this.eagleServicePort = eagleServicePort;
-        this.username = username;
-        this.password = password;
-    }
-
-    public EagleServiceConnector(Config config){
-        this.eagleServiceHost = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-        this.eagleServicePort = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-        if (config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) &&
-                config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD)) {
-            this.username = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME);
-            this.password = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceGroupByQueryRequest.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceGroupByQueryRequest.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceGroupByQueryRequest.java
deleted file mode 100644
index e9e58c3..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceGroupByQueryRequest.java
+++ /dev/null
@@ -1,173 +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.service.client;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.List;
-
-public class EagleServiceGroupByQueryRequest {
-	
-	private String filter;
-	private String startRowkey;
-	private int pageSize;
-	private String startTime;
-	private String endTime;
-	private List<String> groupBys;
-	private List<String> returns;
-	private List<String> orderBys;
-	private String metricName;
-	private int intervalMin;
-	
-	public String getMetricName() {
-		return metricName;
-	}
-	public void setMetricName(String metricName) {
-		this.metricName = metricName;
-	}
-	public String getFilter() {
-		return filter;
-	}
-	public void setFilter(String filter) {
-		this.filter = filter;
-	}
-	public String getStartRowkey() {
-		return startRowkey;
-	}
-	public void setStartRowkey(String startRowkey) {
-		this.startRowkey = startRowkey;
-	}
-	public int getPageSize() {
-		return pageSize;
-	}
-	public void setPageSize(int pageSize) {
-		this.pageSize = pageSize;
-	}
-	public String getStartTime() {
-		return startTime;
-	}
-	public void setStartTime(String startTime) {
-		this.startTime = startTime;
-	}
-	public String getEndTime() {
-		return endTime;
-	}
-	public void setEndTime(String endTime) {
-		this.endTime = endTime;
-	}
-	public List<String> getGroupBys() {
-		return groupBys;
-	}
-	public void setGroupBys(List<String> groupBys) {
-		this.groupBys = groupBys;
-	}
-	public List<String> getOrderBys() {
-		return orderBys;
-	}
-	public void setOrderBys(List<String> orderBys) {
-		this.orderBys = orderBys;
-	}
-	public List<String> getReturns() {
-		return returns;
-	}
-	public void setReturns(List<String> returns) {
-		this.returns = returns;
-	}
-	
-	public String getQueryParameterString(String service) throws EagleServiceClientException {
-		if (pageSize <= 0) {
-			throw new EagleServiceClientException("pageSize can't be less than 1, pageSize: " + pageSize);
-		}
-		try {
-			final String query = getQuery();
-			final StringBuilder sb = new StringBuilder();
-			// query
-			sb.append("query=").append(service).append(URLEncoder.encode(query, "UTF-8"));
-			// startRowkey
-			if (startRowkey != null) {
-				sb.append("&startRowkey=").append(startRowkey);
-			}
-			// pageSize
-			sb.append("&pageSize=").append(this.pageSize);
-			if (startTime != null || endTime != null) {
-				sb.append("&startTime=").append(URLEncoder.encode(startTime, "UTF-8"));
-				sb.append("&endTime=").append(URLEncoder.encode(endTime, "UTF-8"));
-			}
-			
-			// metricName
-			if(metricName != null){
-				sb.append("&metricName=" + metricName);
-			}
-			
-			if (intervalMin != 0) {
-				sb.append("&timeSeries=true&intervalmin=" + intervalMin);
-			}
-			return sb.toString();
-		} catch (UnsupportedEncodingException e) {
-			throw new EagleServiceClientException("Got an UnsupportedEncodingException" + e.getMessage(), e);
-		}
-	}
-	
-	private String getQuery() {
-		final StringBuilder sb = new StringBuilder();
-		sb.append("[").append(filter).append("]<");
-		boolean first = true;
-		if (groupBys != null && groupBys.size() > 0) {
-			for (String groupBy : groupBys) {
-				if (first) {
-					first = false;
-				} else {
-					sb.append(",");
-				}
-				sb.append("@").append(groupBy);
-			}
-		}
-		sb.append(">{");
-		if (returns != null && returns.size() > 0) {
-			first = true;
-			for (String returnFiled : returns) {
-				if (first) {
-					first = false;
-				} else {
-					sb.append(",");
-				}
-				sb.append(returnFiled);
-			}
-		}
-		sb.append("}");
-		if (orderBys != null && orderBys.size() > 0) {
-			sb.append(".{");
-			first = true;
-			for (String orderBy : orderBys) {
-				if (first) {
-					first = false;
-				} else {
-					sb.append(",");
-				}
-				sb.append(orderBy);
-			}
-			sb.append("}");
-		}
-		return sb.toString();
-	}
-	public int getIntervalMin() {
-		return intervalMin;
-	}
-	public void setIntervalMin(int intervalMin) {
-		this.intervalMin = intervalMin;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryBuilder.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryBuilder.java
deleted file mode 100644
index 106ebc6..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryBuilder.java
+++ /dev/null
@@ -1,107 +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.service.client;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Builder helper class to create EagleServiceQueryRequest
- */
-public final class EagleServiceQueryBuilder {
-
-	private final EagleServiceQueryRequest request = new EagleServiceQueryRequest();
-	
-	public EagleServiceQueryBuilder addSearchTag(String tagKey, String tagValue) throws EagleServiceClientException {
-		if (tagKey == null || tagValue == null) {
-			throw new EagleServiceClientException("tagKey or tagValue is null, tagKey: " + tagKey + ", tagValue: " + tagValue);
-		}
-		List<EagleServiceQueryRequest.Tag> searchTags = request.getSearchTags();
-		if (searchTags == null) {
-			searchTags = new ArrayList<EagleServiceQueryRequest.Tag>();
-			request.setSearchTags(searchTags);
-		}
-		if (!containsTag(tagKey, tagValue)) {
-			final EagleServiceQueryRequest.Tag tag = new EagleServiceQueryRequest.Tag();
-			tag.setKey(tagKey);
-			tag.setValue(tagValue);
-			searchTags.add(tag);
-		}
-		return this;
-	}
-	
-	public EagleServiceQueryRequest buildRequest() throws EagleServiceClientException {
-		return request;
-	}
-	
-	public EagleServiceQueryBuilder setStartTime(long startTime) {
-		request.setStartTime(startTime);
-		return this;
-	}
-	
-	public EagleServiceQueryBuilder setEndTime(long endTime) {
-		request.setEndTime(endTime);
-		return this;
-	}
-	
-	public EagleServiceQueryBuilder setPageSize(int pageSize) throws EagleServiceClientException {
-		if (pageSize <= 0) {
-			throw new EagleServiceClientException("pageSize can't be less than 1");
-		}
-		request.setPageSize(pageSize);
-		return this;
-	}
-
-	public EagleServiceQueryBuilder addReturnTag(String tagKey) throws EagleServiceClientException {
-		if (tagKey == null) {
-			throw new EagleServiceClientException("tagKey can't be null");
-		}
-		List<String> returnTags = request.getReturnTags();
-		if (returnTags == null) {
-			returnTags = new ArrayList<String>();
-			request.setReturnTags(returnTags);
-		}
-		if (!returnTags.contains(tagKey)) {
-			returnTags.add(tagKey);
-		}
-		return this;
-	}
-	
-	public EagleServiceQueryBuilder addReturnField(String field) throws EagleServiceClientException {
-		if (field == null) {
-			throw new EagleServiceClientException("field can't be null");
-		}
-		List<String> returnFields = request.getReturnFields();
-		if (returnFields == null) {
-			returnFields = new ArrayList<String>();
-			request.setReturnFields(returnFields);
-		}
-		if (!returnFields.contains(field)) {
-			returnFields.add(field);
-		}
-		return this;
-	}
-
-	private boolean containsTag(String tagKey, String tagValue) {
-		for (EagleServiceQueryRequest.Tag tag : request.getSearchTags()) {
-			if (tag.getKey().equals(tagKey) && tag.getValue().equals(tagValue)) {
-				return true;
-			}
-		}
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryRequest.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryRequest.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryRequest.java
deleted file mode 100644
index 37dcb44..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceQueryRequest.java
+++ /dev/null
@@ -1,151 +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.service.client;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Eagle service query parameter request
- */
-public class EagleServiceQueryRequest {
-
-	// instance members
-	private long startTime;
-	private long endTime;
-	private int pageSize;
-	private List<Tag> searchTags;
-	private List<String> returnTags;
-	private List<String> returnFields;
-
-	public static class Tag {
-		private String key;
-		private String value;
-		
-		public String getKey() {
-			return key;
-		}
-		public void setKey(String key) {
-			this.key = key;
-		}
-		public String getValue() {
-			return value;
-		}
-		public void setValue(String value) {
-			this.value = value;
-		}
-	}
-
-	public long getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(long startTime) {
-		this.startTime = startTime;
-	}
-
-	public long getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(long endTime) {
-		this.endTime = endTime;
-	}
-
-	public int getPageSize() {
-		return pageSize;
-	}
-
-	public void setPageSize(int pageSize) {
-		this.pageSize = pageSize;
-	}
-
-	public List<Tag> getSearchTags() {
-		return searchTags;
-	}
-
-	public void setSearchTags(List<Tag> searchTags) {
-		this.searchTags = searchTags;
-	}
-
-	public List<String> getReturnTags() {
-		return returnTags;
-	}
-
-	public void setReturnTags(List<String> returnTags) {
-		this.returnTags = returnTags;
-	}
-
-	public List<String> getReturnFields() {
-		return returnFields;
-	}
-
-	public void setReturnFields(List<String> returnFields) {
-		this.returnFields = returnFields;
-	}
-
-	public String getQueryParameterString() throws EagleServiceClientException {
-		if (pageSize <= 0) {
-			throw new EagleServiceClientException("pageSize can't be less than 1, pageSize: " + pageSize);
-		}
-		if (startTime > endTime || (startTime == endTime && startTime != 0)) {
-			throw new EagleServiceClientException("Invalid startTime and endTime, startTime: " + startTime + ", endTime: " + endTime);
-		}
-		int returnSize = 0;
-		if (returnTags != null) {
-			returnSize += returnTags.size();
-		}
-		if (returnFields != null) {
-			returnSize += returnFields.size();
-		}
-		if (returnSize == 0) {
-			throw new EagleServiceClientException("Invalid request, no return tag or field added");
-		}
-		final StringBuilder sb = new StringBuilder();
-		sb.append("pageSize=").append(this.pageSize);
-		if (endTime > 0) {
-			final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd%20HH:mm:ss");
-            format.setTimeZone(EagleConfigFactory.load().getTimeZone());
-			Date date = new Date(startTime);
-			String timeString = format.format(date);
-			sb.append("&startTime=").append(timeString);
-			date.setTime(endTime);
-			timeString = format.format(date);
-			sb.append("&endTime=").append(timeString);
-		}
-		if (searchTags != null) {
-			for (Tag tag : searchTags) {
-				sb.append("&tagNameValue=").append(tag.getKey()).append("%3D").append(tag.getValue());
-			}
-		}
-		if (returnTags != null) {
-			for (String tagKey : returnTags) {
-				sb.append("&outputTag=").append(tagKey);
-			}
-		}
-		if (returnFields != null) {
-			for (String field : returnFields) {
-				sb.append("&outputField=").append(field);
-			}
-		}
-		return sb.toString();
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceSingleEntityQueryRequest.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceSingleEntityQueryRequest.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceSingleEntityQueryRequest.java
deleted file mode 100755
index 58b2764..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/EagleServiceSingleEntityQueryRequest.java
+++ /dev/null
@@ -1,211 +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.service.client;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-public class EagleServiceSingleEntityQueryRequest {
-	private String query;
-	private String startRowkey;
-	private int pageSize;
-	private long startTime;
-	private long endTime;
-	private boolean treeAgg;
-	private String metricName;
-	private boolean filterIfMissing;
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    private boolean verbose;
-	
-	public String getMetricName() {
-		return metricName;
-	}
-
-	public void setMetricName(String metricName) {
-		this.metricName = metricName;
-	}
-
-	public String getQuery() {
-		return query;
-	}
-
-	public void setQuery(String query) {
-		this.query = query;
-	}
-
-	public String getStartRowkey() {
-		return startRowkey;
-	}
-
-	public void setStartRowkey(String startRowkey) {
-		this.startRowkey = startRowkey;
-	}
-
-	public boolean isTreeAgg() {
-		return treeAgg;
-	}
-
-	public void setTreeAgg(boolean treeAgg) {
-		this.treeAgg = treeAgg;
-	}
-
-	public long getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(long startTime) {
-		this.startTime = startTime;
-	}
-
-	public long getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(long endTime) {
-		this.endTime = endTime;
-	}
-
-	public int getPageSize() {
-		return pageSize;
-	}
-
-	public void setPageSize(int pageSize) {
-		this.pageSize = pageSize;
-	}
-	
-	public boolean getFilterIfMissing() {
-		return filterIfMissing;
-	}
-
-	public void setFilterIfMissing(boolean filterIfMissing) {
-		this.filterIfMissing = filterIfMissing;
-	}
-
-	public String getQueryParameterString() throws EagleServiceClientException {
-		if (pageSize < 0) {
-			throw new EagleServiceClientException("pageSize can't be less than 0, pageSize: " + pageSize);
-		}
-
-		// startTime and endTime is optional
-		
-		final StringBuilder sb = new StringBuilder();
-		// query
-//        try {
-//            sb.append("query=").append(URLEncoder.encode(query,"UTF-8"));
-            sb.append("query=").append(query);
-//        } catch (UnsupportedEncodingException e) {
-//            throw new EagleServiceClientException(e);
-//        }
-
-        // startRowkey
-		if (startRowkey != null) {
-			sb.append("&startRowkey=").append(startRowkey);
-		}
-		// pageSize
-		sb.append("&pageSize=").append(this.pageSize);
-		if (startTime !=0 || endTime != 0) {
-			Date date = new Date(startTime);
-			SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd%20HH:mm:ss");
-            dateFormatter.setTimeZone(EagleConfigFactory.load().getTimeZone());
-			String timeString = dateFormatter.format(date);
-			sb.append("&startTime=").append(timeString);
-			date.setTime(endTime);
-			timeString = dateFormatter.format(date);
-			sb.append("&endTime=").append(timeString);
-		}
-		// tree aggregate
-		sb.append("&treeAgg=").append(treeAgg);
-		
-		// for metric read
-		if(metricName != null){
-			sb.append("&metricName=").append(metricName);
-		}
-		
-		if (filterIfMissing == true) { 
-			sb.append("&filterIfMissing=").append("true");
-		}
-		return sb.toString();
-	}
-
-    public static Builder build(){
-        return new Builder();
-    }
-
-    public static class Builder{
-        private final EagleServiceSingleEntityQueryRequest rawQuery;
-        public Builder(){
-            this.rawQuery= new EagleServiceSingleEntityQueryRequest();
-        }
-        public EagleServiceSingleEntityQueryRequest done(){
-            return this.rawQuery;
-        }
-        public Builder query(String query) {
-            this.rawQuery.setQuery(query);
-            return this;
-        }
-
-        public Builder startTime(long startTime) {
-            this.rawQuery.setStartTime(startTime);
-            return this;
-        }
-
-        public Builder endTime(long endTime) {
-            this.rawQuery.setEndTime(endTime);
-            return this;
-        }
-
-        public Builder pageSize(int pageSize) {
-            this.rawQuery.setPageSize(pageSize);
-            return this;
-        }
-
-        public Builder startRowkey(String startRowkey) {
-            this.rawQuery.setStartRowkey(startRowkey);
-            return this;
-        }
-
-        public Builder treeAgg(boolean treeAgg) {
-            this.rawQuery.setTreeAgg(treeAgg);
-            return this;
-        }
-
-        public Builder filerIfMissing(boolean filterIfMissing) {
-            this.rawQuery.setFilterIfMissing(filterIfMissing);
-            return this;
-        }
-
-        public Builder metricName(String metricName) {
-            this.rawQuery.setMetricName(metricName);
-            return this;
-        }
-
-        public Builder verbose(Boolean verbose) {
-            this.rawQuery.setVerbose(verbose);
-            return this;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceClient.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceClient.java
deleted file mode 100644
index ce62eee..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceClient.java
+++ /dev/null
@@ -1,129 +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.service.client;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import com.sun.jersey.api.client.Client;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.List;
-
-public interface IEagleServiceClient extends IEagleServiceRequestBuilder, Closeable {
-
-    Client getJerseyClient();
-
-    IEagleServiceClient silence(boolean silence);
-
-    /**
-     *
-     * @param <E>
-     * @param entities
-     * @param serviceName
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities,String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param entityClass
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities,Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities,String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities,Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param request
-     * @return
-     */
-    GenericServiceAPIResponseEntity<String> delete(EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException, IOException;
-
-    /**
-     *
-     * @param ids
-     * @param serviceName
-     * @return
-     * @throws EagleServiceClientException
-     * @throws IOException
-     */
-    GenericServiceAPIResponseEntity<String> deleteById(List<String> ids,String serviceName) throws EagleServiceClientException, IOException;
-
-    /**
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities,String serviceName) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param entities
-     * @param <E>
-     * @return
-     */
-    <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities,Class<E> entityClass) throws IOException, EagleServiceClientException;
-
-    /**
-     *
-     * @param request
-     * @return
-     */
-    <E extends Object> GenericServiceAPIResponseEntity<E> search(EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceRequestBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceRequestBuilder.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceRequestBuilder.java
deleted file mode 100644
index 1264b30..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/IEagleServiceRequestBuilder.java
+++ /dev/null
@@ -1,83 +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.service.client;
-
-import org.apache.eagle.service.client.impl.*;
-
-/**
- *
- * IEagleServiceClient extension interfaces
- *
- * @see IEagleServiceClient
- */
-public interface IEagleServiceRequestBuilder {
-    /**
-     * Search pipe API
-     *
-     * @return
-     */
-    SearchRequestBuilder search();
-
-    /**
-     * Search pipe API
-     *
-     * @param query
-     * @return
-     */
-    SearchRequestBuilder search(String query);
-
-    /**
-     *
-     * Delete pipe API
-     *
-     * @return
-     */
-    DeleteRequestBuilder delete();
-
-    /**
-     * Metric sender
-     *
-     * @param metricName
-     * @return
-     */
-    MetricSender metric(String metricName);
-
-    /**
-     * Batch entities sender
-     *
-     * @param batchSize
-     * @return
-     */
-    BatchSender batch(int batchSize);
-
-    /**
-     * Async service client requester
-     *
-     * @return
-     */
-    EagleServiceAsyncClient async();
-
-    /**
-     * Parallel service client requester
-     *
-     * @param parallelNum
-     * @return
-     */
-    ConcurrentSender parallel(int parallelNum);
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListGroupByQueryAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListGroupByQueryAPIResponseEntity.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListGroupByQueryAPIResponseEntity.java
deleted file mode 100644
index e59513b..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListGroupByQueryAPIResponseEntity.java
+++ /dev/null
@@ -1,90 +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.service.client;
-
-import java.util.List;
-import java.util.Map;
-
-public class ListGroupByQueryAPIResponseEntity {
-
-	private boolean success;
-	private String exception;
-	private int totalResults;
-	private long elapsedms;
-	private List<Entry> obj;
-	private long lastTimestamp;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public int getTotalResults() {
-		return totalResults;
-	}
-	public void setTotalResults(int totalResults) {
-		this.totalResults = totalResults;
-	}
-	public List<Entry> getObj() {
-		return obj;
-	}
-	public void setObj(List<Entry> obj) {
-		this.obj = obj;
-	}
-	
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-
-	public void setLastTimestamp(long lastTimestamp) {
-		this.lastTimestamp = lastTimestamp;
-	}
-
-	public static class Entry implements Map.Entry<List<String>, List<Double>> {
-
-		private List<String> key;
-		private List<Double> value;
-		public List<String> getKey() {
-			return key;
-		}
-		public void setKey(List<String> key) {
-			this.key = key;
-		}
-		public List<Double> getValue() {
-			return value;
-		}
-		@Override
-		public List<Double> setValue(List<Double> value) {
-			List<Double> old = this.value;
-			this.value = value;
-			return old;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListQueryAPIResponseConvertHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListQueryAPIResponseConvertHelper.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListQueryAPIResponseConvertHelper.java
deleted file mode 100644
index 3e71f4e..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListQueryAPIResponseConvertHelper.java
+++ /dev/null
@@ -1,117 +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.service.client;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
-
-/**
- * TODO: It's just a temporary solution. We need fix jersy and jackson mapping issue so the class
- * can be safely removed. 
- *
- */
-public final class ListQueryAPIResponseConvertHelper {
-
-	
-	private static final Map<Class<?>, Map<String, Method>> BEAN_SETTER_MAP = new ConcurrentHashMap<Class<?>, Map<String, Method>>();
-	private static final String SETTER_PREFIX = "set";
-	
-	@SuppressWarnings({ "unchecked" })
-	public static ListQueryAPIResponseEntity convert(Class<? extends TaggedLogAPIEntity> clazz, ListQueryAPIResponseEntity response) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, JsonGenerationException, JsonMappingException, IOException {
-		if (response == null || response.getObj() == null) {
-			return response;
-		}
-		final List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-		final Object obj = response.getObj();
-		final Map<String, Method> settings = getOrCreateSetterMap(clazz);
-		final Collection<Map<String, Object>> objs = (Collection<Map<String, Object>>) obj;
-		for (Map<String, Object> map : objs) {
-			final TaggedLogAPIEntity entity = clazz.newInstance();
-			for (Map.Entry<String, Object> entry : map.entrySet()) {
-				final String propertyName = entry.getKey();
-				Object value = entry.getValue();
-				final Method method = settings.get(propertyName);
-				final Type type = method.getGenericParameterTypes()[0];
-				if ((type == double.class || type == Double.class || type == long.class || type == Long.class)
-					&& (value.equals("NaN"))) {
-					value = 0;
-				}					
-				
-				final Class<?> parameterClass = method.getParameterTypes()[0];
-				if (value instanceof Number || value instanceof String || parameterClass.isInstance(value)) {
-					try {
-						method.invoke(entity, value);
-					}
-					catch (Exception e){
-						e.printStackTrace();
-					}
-				} else {
-					ObjectMapper om = new ObjectMapper();
-					String objJson = om.writeValueAsString(value);
-					value = om.readValue(objJson, parameterClass);
-					method.invoke(entity, value);
-				}
-			}
-			entities.add(entity);
-		}
-		response.setObj(entities);
-		return response;
-	}
-	
-	private static Map<String, Method> getOrCreateSetterMap(Class<?> clazz) {
-		Map<String, Method> setterMap = BEAN_SETTER_MAP.get(clazz);
-		if (setterMap == null) {
-			setterMap = createSetterMap(clazz);
-		}
-		return setterMap;
-	}
-
-	private static Map<String, Method> createSetterMap(Class<?> clazz) {
-		final Map<String, Method> setterMap = new HashMap<String, Method>();
-		final Method[] methods = clazz.getMethods();
-		final StringBuilder sb = new StringBuilder(100);
-		for (Method m : methods) {
-			final String methodName = m.getName();
-			if (methodName.startsWith(SETTER_PREFIX) && methodName.length() > SETTER_PREFIX.length()) {
-				sb.setLength(0);
-				final char c = methodName.charAt(3);
-				sb.append(Character.toLowerCase(c));
-				sb.append(methodName.substring(4));
-				String propertyName = sb.toString(); 
-				setterMap.put(propertyName, m);
-			}
-		}
-		BEAN_SETTER_MAP.put(clazz, setterMap);
-		return setterMap;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListTimeSeriesQueryAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListTimeSeriesQueryAPIResponseEntity.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListTimeSeriesQueryAPIResponseEntity.java
deleted file mode 100644
index 80c6aeb..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ListTimeSeriesQueryAPIResponseEntity.java
+++ /dev/null
@@ -1,84 +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.service.client;
-
-import java.util.List;
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonPropertyOrder;
-
-@JsonPropertyOrder({ "success", "exception", "elapsems", "totalResults", "elapsedms", "obj" })
-public class ListTimeSeriesQueryAPIResponseEntity {
-
-	private boolean success;
-	private String exception;
-	private int totalResults;
-	private long elapsedms;
-	private List<Entry> obj;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public int getTotalResults() {
-		return totalResults;
-	}
-	public void setTotalResults(int totalResults) {
-		this.totalResults = totalResults;
-	}
-	public List<Entry> getObj() {
-		return obj;
-	}
-	public void setObj(List<Entry> obj) {
-		this.obj = obj;
-	}
-	
-	public static class Entry implements Map.Entry<List<String>, List<double[]>> {
-
-		private List<String> key;
-		private List<double[]> value;
-		public List<String> getKey() {
-			return key;
-		}
-		public void setKey(List<String> key) {
-			this.key = key;
-		}
-		public List<double[]> getValue() {
-			return value;
-		}
-		@Override
-		public List<double[]> setValue(List<double[]> value) {
-			List<double[]> old = this.value;
-			this.value = value;
-			return old;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/RowkeyQueryAPIResponseConvertHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/RowkeyQueryAPIResponseConvertHelper.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/RowkeyQueryAPIResponseConvertHelper.java
deleted file mode 100644
index 7dc39f0..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/RowkeyQueryAPIResponseConvertHelper.java
+++ /dev/null
@@ -1,110 +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.service.client;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.RowkeyQueryAPIResponseEntity;
-
-/**
- * TODO: It's just a temporary solution. We need fix jersy and jackson mapping issue so the class
- * can be safely removed. 
- *
- */
-public final class RowkeyQueryAPIResponseConvertHelper {
-
-	
-	private static final Map<Class<?>, Map<String, Method>> BEAN_SETTER_MAP = new ConcurrentHashMap<Class<?>, Map<String, Method>>();
-	private static final String SETTER_PREFIX = "set";
-	
-	@SuppressWarnings({ "unchecked" })
-	public static RowkeyQueryAPIResponseEntity convert(Class<? extends TaggedLogAPIEntity> clazz, RowkeyQueryAPIResponseEntity response) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, JsonGenerationException, JsonMappingException, IOException {
-		if (response == null || response.getObj() == null) {
-			return response;
-		}		
-		final Object obj = response.getObj();
-		final Map<String, Method> settings = getOrCreateSetterMap(clazz);
-		final Map<String, Object> map = (Map<String, Object>) obj;
-		final TaggedLogAPIEntity entity = clazz.newInstance();
-		for (Map.Entry<String, Object> entry : map.entrySet()) {
-			final String propertyName = entry.getKey();
-			Object value = entry.getValue();
-			final Method method = settings.get(propertyName);
-			final Type type = method.getGenericParameterTypes()[0];
-			if ((type == double.class || type == Double.class || type == long.class || type == Long.class)
-				&& (value.equals("NaN"))) {
-				value = 0;
-			}					
-			
-			final Class<?> parameterClass = method.getParameterTypes()[0];
-			if (value instanceof Number || value instanceof String || parameterClass.isInstance(value)) {
-				try {
-					method.invoke(entity, value);
-				}
-				catch (Exception e){
-					e.printStackTrace();
-				}
-			} else {
-				ObjectMapper om = new ObjectMapper();
-				String objJson = om.writeValueAsString(value);
-				value = om.readValue(objJson, parameterClass);
-				method.invoke(entity, value);
-			}
-		}
-		response.setObj(entity);
-		return response;
-	}
-	
-	private static Map<String, Method> getOrCreateSetterMap(Class<?> clazz) {
-		Map<String, Method> setterMap = BEAN_SETTER_MAP.get(clazz);
-		if (setterMap == null) {
-			setterMap = createSetterMap(clazz);
-		}
-		return setterMap;
-	}
-
-	private static Map<String, Method> createSetterMap(Class<?> clazz) {
-		final Map<String, Method> setterMap = new HashMap<String, Method>();
-		final Method[] methods = clazz.getMethods();
-		final StringBuilder sb = new StringBuilder(100);
-		for (Method m : methods) {
-			final String methodName = m.getName();
-			if (methodName.startsWith(SETTER_PREFIX) && methodName.length() > SETTER_PREFIX.length()) {
-				sb.setLength(0);
-				final char c = methodName.charAt(3);
-				sb.append(Character.toLowerCase(c));
-				sb.append(methodName.substring(4));
-				String propertyName = sb.toString(); 
-				setterMap.put(propertyName, m);
-			}
-		}
-		BEAN_SETTER_MAP.put(clazz, setterMap);
-		return setterMap;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ServiceConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ServiceConfig.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ServiceConfig.java
deleted file mode 100644
index 1dbf75b..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/ServiceConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- *    Licensed to the Apache Software Foundation (ASF) under one or more
- *    contributor license agreements.  See the NOTICE file distributed with
- *    this work for additional information regarding copyright ownership.
- *    The ASF licenses this file to You under the Apache License, Version 2.0
- *    (the "License"); you may not use this file except in compliance with
- *    the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- *
- */
-
-package org.apache.eagle.service.client;
-
-import java.io.Serializable;
-
-public class ServiceConfig implements Serializable{
-    public String serviceHost;
-    public Integer servicePort;
-    public String username;
-    public String password;
-
-    public ServiceConfig() {
-
-    }
-
-    public ServiceConfig(String serviceHost, Integer servicePort, String username, String password) {
-        this.serviceHost = serviceHost;
-        this.servicePort = servicePort;
-        this.username = username;
-        this.password = password;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/TimeSeriesGroupByAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/TimeSeriesGroupByAPIResponseEntity.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/TimeSeriesGroupByAPIResponseEntity.java
deleted file mode 100644
index e1d6618..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/TimeSeriesGroupByAPIResponseEntity.java
+++ /dev/null
@@ -1,101 +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.service.client;
-
-import java.util.List;
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-//@JsonPropertyOrder({ "success", "exception", "elapsems", "totalResults", "elapsedms", "obj", "lastTimestamp" })
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class TimeSeriesGroupByAPIResponseEntity {
-	private boolean success;
-	private String exception;
-	private int totalResults;
-	private long elapsedms;
-	private List<Entry> obj;
-	private long lastTimestamp;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public int getTotalResults() {
-		return totalResults;
-	}
-	public void setTotalResults(int totalResults) {
-		this.totalResults = totalResults;
-	}
-	public List<Entry> getObj() {
-		return obj;
-	}
-	public void setObj(List<Entry> obj) {
-		this.obj = obj;
-	}
-	
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-	public void setLastTimestamp(long lastTimestamp) {
-		this.lastTimestamp = lastTimestamp;
-	}
-
-	public static class Entry implements Map.Entry<List<String>, List<Double[]>> {
-
-		private List<String> key;
-		private List<Double[]> value;
-		public List<String> getKey() {
-			return key;
-		}
-		public void setKey(List<String> key) {
-			this.key = key;
-		}
-
-		@Override
-		public List<Double[]> getValue() {
-			return value;
-		}
-
-		@Override
-		public List<Double[]> setValue(List<Double[]> value) {
-			List<Double[]> old = this.value;
-			this.value = value;
-			return old;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/BatchSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/BatchSender.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/BatchSender.java
deleted file mode 100644
index ba3e6ab..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/BatchSender.java
+++ /dev/null
@@ -1,93 +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.service.client.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-
-public class BatchSender implements Closeable {
-    private final static Logger LOG = LoggerFactory.getLogger(BatchSender.class);
-    private final List<TaggedLogAPIEntity> entityBucket;
-    private final IEagleServiceClient client;
-
-    protected int getBatchSize() {
-        return batchSize;
-    }
-
-    protected void setBatchSize(int batchSize) {
-        if(batchSize<0) throw new IllegalArgumentException("batch size should be "+batchSize);
-        this.batchSize = batchSize;
-    }
-
-    private int batchSize;
-
-    public BatchSender(IEagleServiceClient client, int batchSize){
-        this.setBatchSize(batchSize);
-        this.client = client;
-        this.entityBucket = new LinkedList<TaggedLogAPIEntity>();
-    }
-
-    public BatchSender send(TaggedLogAPIEntity entity) throws IOException, EagleServiceClientException {
-        this.entityBucket.add(entity);
-        if(this.entityBucket.size()>=this.batchSize){
-            flush();
-        }
-        return this;
-    }
-
-    public BatchSender send(List<TaggedLogAPIEntity> entities) throws IOException, EagleServiceClientException {
-        this.entityBucket.addAll(entities);
-        if(this.entityBucket.size()>= this.batchSize){
-            flush();
-        }
-        return this;
-    }
-
-    public void flush() throws IOException, EagleServiceClientException {
-        if(this.entityBucket.size() == 0 && LOG.isDebugEnabled()){
-            LOG.debug("No entities to flush");
-            return;
-        }
-
-        LOG.info("Writing "+this.entityBucket.size()+" entities");
-        GenericServiceAPIResponseEntity<String> response = this.client.create(this.entityBucket);
-        if(!response.isSuccess()){
-            LOG.error("Got service exception: "+response.getException());
-            throw new IOException("Service exception"+response.getException());
-        }else{
-            this.entityBucket.clear();
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        try {
-            flush();
-        } catch (EagleServiceClientException e) {
-            throw new IOException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/ConcurrentSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/ConcurrentSender.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/ConcurrentSender.java
deleted file mode 100644
index 0c2aad0..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/ConcurrentSender.java
+++ /dev/null
@@ -1,170 +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.service.client.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.SynchronousQueue;
-
-public class ConcurrentSender implements Closeable{
-    private final int parallelNum;
-    private final IEagleServiceClient client;
-    private final SynchronousQueue<TaggedLogAPIEntity> queue;
-    private final List<Handler> handlers;
-    private int batchSize = 1000;
-    private long batchInterval = 3 * 1000;
-    private boolean isStarted = false;
-
-    private final static Logger LOG = LoggerFactory.getLogger(ConcurrentSender.class);
-
-    public ConcurrentSender(IEagleServiceClient client, int parallelNum) {
-        this.parallelNum = parallelNum;
-        this.client = client;
-        this.queue= new SynchronousQueue<TaggedLogAPIEntity>();
-        this.handlers = Collections.synchronizedList(new LinkedList<Handler>());
-    }
-
-    public void start(){
-        if(!this.isStarted) {
-            LOG.info("Starting with handlers = " + this.parallelNum + ", batchSize = " + this.batchSize + ", batchInterval (ms) = " + this.batchInterval);
-
-            for (int i = 0; i < this.parallelNum; i++) {
-                Handler handler = new Handler(this.queue, this.client, this.batchSize, this.batchInterval);
-
-                Thread thread = new Thread(handler);
-                thread.setDaemon(true);
-                thread.setName("Sender-" + i);
-                this.handlers.add(handler);
-                thread.start();
-            }
-
-            this.isStarted = true;
-        }else{
-            LOG.warn("Already started");
-        }
-    }
-
-    public ConcurrentSender batchSize(int batchSize){
-        this.batchSize = batchSize;
-        return this;
-    }
-
-    public ConcurrentSender batchInterval(long batchInterval){
-        this.batchInterval = batchInterval;
-        return this;
-    }
-
-    public ConcurrentSender send(final List<? extends TaggedLogAPIEntity> entities) throws InterruptedException {
-        for(TaggedLogAPIEntity entity:entities){
-            this.send(entity);
-        }
-        return this;
-    }
-
-    public ConcurrentSender send(final TaggedLogAPIEntity entity) throws InterruptedException {
-        if(!this.isStarted){
-            this.start();
-        }
-        this.queue.put(entity);
-        return this;
-    }
-
-    @Override
-    public void close() throws IOException {
-        for(Handler handler: handlers){
-            handler.close();
-        }
-    }
-
-    private class Handler extends BatchSender implements Runnable{
-        private final long batchInterval;
-        private final SynchronousQueue<TaggedLogAPIEntity> localQueue;
-
-        private boolean isStopped;
-        private long lastFlushTime;
-
-        public Handler(SynchronousQueue<TaggedLogAPIEntity> queue, IEagleServiceClient client, int batchSize, long batchInterval) {
-            super(client, batchSize);
-            this.localQueue = queue;
-            this.batchInterval = batchInterval;
-        }
-
-        @Override
-        public void run() {
-            if(LOG.isDebugEnabled()) LOG.debug("Starting ...");
-            lastFlushTime = System.currentTimeMillis();
-
-            while(!isStopped){
-                TaggedLogAPIEntity entity = null;
-                try {
-                    entity = this.localQueue.take();
-                } catch (InterruptedException e) {
-                    LOG.error(e.getMessage(),e);
-                }
-
-                if(entity!=null){
-                    try {
-                        this.send(entity);
-                    } catch (IOException e) {
-                        LOG.error(e.getMessage(),e);
-                    } catch (EagleServiceClientException e) {
-                        LOG.error(e.getMessage(),e);
-                    }
-                    long currentTimestamp = System.currentTimeMillis();
-
-                    if((currentTimestamp - this.lastFlushTime) >= this.batchInterval){
-                        if(LOG.isDebugEnabled())
-                            LOG.info(String.format("%s - %s >= %s",currentTimestamp,this.lastFlushTime,this.batchInterval));
-
-                        try {
-                            this.flush();
-                        } catch (IOException e) {
-                            LOG.error(e.getMessage(),e);
-                        } catch (EagleServiceClientException e) {
-                            LOG.error(e.getMessage(),e);
-                        }
-                    }
-                }else{
-                    LOG.warn("Got null entity");
-                }
-            }
-
-            if(LOG.isDebugEnabled()) LOG.debug("Stopping ...");
-        }
-
-        @Override
-        public void close() throws IOException {
-            this.isStopped = true;
-            super.close();
-        }
-
-        @Override
-        public void flush() throws IOException, EagleServiceClientException {
-            super.flush();
-            this.lastFlushTime = System.currentTimeMillis();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/DeleteRequestBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/DeleteRequestBuilder.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/DeleteRequestBuilder.java
deleted file mode 100644
index ba708d6..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/DeleteRequestBuilder.java
+++ /dev/null
@@ -1,137 +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.service.client.impl;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.EagleServiceSingleEntityQueryRequest;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.List;
-
-public class DeleteRequestBuilder {
-    private final IEagleServiceClient client;
-    private List<String> deleteIds = null;
-    private EagleServiceSingleEntityQueryRequest request;
-
-    private final static Logger LOG = LoggerFactory.getLogger(DeleteRequestBuilder.class);
-    private String serviceName;
-
-    public DeleteRequestBuilder(IEagleServiceClient client){
-        this.client = client;
-    }
-
-    public DeleteRequestBuilder byId(List<String> ids){
-        this.deleteIds = ids;
-        return this;
-    }
-
-    public DeleteRequestBuilder byQuery(String query){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        try {
-            this.request.setQuery(URLEncoder.encode(query, "UTF-8"));
-        } catch (UnsupportedEncodingException e) {
-            LOG.error(e.getMessage(),e);
-        }
-        return this;
-    }
-
-    public DeleteRequestBuilder serviceName(String serviceName){
-        this.serviceName = serviceName;
-        return this;
-    }
-
-    public DeleteRequestBuilder startRowkey(String startRowkey){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setStartRowkey(startRowkey);
-        return this;
-    }
-
-    public DeleteRequestBuilder pageSize(int pageSize){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setPageSize(pageSize);
-        return this;
-    }
-
-    public DeleteRequestBuilder startTime(long startTime){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setStartTime(startTime);
-        return this;
-    }
-
-    public DeleteRequestBuilder startTime(String startTime){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setStartTime(DateTimeUtil.humanDateToMillisecondsWithoutException(startTime));
-        return this;
-    }
-
-    public DeleteRequestBuilder endTime(long endTime){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setEndTime(endTime);
-        return this;
-    }
-
-    public DeleteRequestBuilder endTime(String endTime){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setEndTime(DateTimeUtil.humanDateToMillisecondsWithoutException(endTime));
-        return this;
-    }
-
-    public DeleteRequestBuilder timeRange(String startTime,String endTime){
-        this.startTime(startTime);
-        this.endTime(endTime);
-        return this;
-    }
-
-    public DeleteRequestBuilder timeRange(long startTime,long endTime){
-        this.startTime(startTime);
-        this.endTime(endTime);
-        return this;
-    }
-
-    public DeleteRequestBuilder treeAgg(boolean treeAgg){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setTreeAgg(treeAgg);
-        return this;
-    }
-
-    public DeleteRequestBuilder metricName(String metricName){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setMetricName(metricName);
-        return this;
-    }
-
-    public DeleteRequestBuilder filterIfMissing(Boolean filterIfMissing){
-        if(this.request==null)  this.request = new EagleServiceSingleEntityQueryRequest();
-        this.request.setFilterIfMissing(filterIfMissing);
-        return this;
-    }
-
-    public GenericServiceAPIResponseEntity<String> send() throws EagleServiceClientException, IOException {
-        if(this.deleteIds!=null){
-            return client.deleteById(this.deleteIds,this.serviceName);
-        }else {
-            return client.delete(this.request);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceAsyncClientImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceAsyncClientImpl.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceAsyncClientImpl.java
deleted file mode 100644
index 7bdfab8..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceAsyncClientImpl.java
+++ /dev/null
@@ -1,156 +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.service.client.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceAsyncClient;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.EagleServiceSingleEntityQueryRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-
-public class EagleServiceAsyncClientImpl implements EagleServiceAsyncClient {
-    private final IEagleServiceClient client;
-    private final static Logger LOG = LoggerFactory.getLogger(EagleServiceAsyncClientImpl.class);
-
-    public EagleServiceAsyncClientImpl(IEagleServiceClient client) {
-        this.client = client;
-    }
-
-    @Override
-    public void close() throws IOException {
-        if(LOG.isDebugEnabled()) LOG.debug("Executor service is shutting down");
-        this.client.getJerseyClient().getExecutorService().shutdown();
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities, final String serviceName) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.create(entities,serviceName);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities, final Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.create(entities,entityClass);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> create(final List<E> entities) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.create(entities);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.delete(entities);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities, final String serviceName) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.delete(entities, serviceName);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> delete(final List<E> entities, final Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.create(entities,entityClass);
-            }
-        });
-    }
-
-    @Override
-    public Future<GenericServiceAPIResponseEntity<String>> delete(final EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException, IOException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.delete(request);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.update(entities);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities, final String serviceName) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.update(entities, serviceName);
-            }
-        });
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> Future<GenericServiceAPIResponseEntity<String>> update(final List<E> entities, final Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.update(entities, entityClass);
-            }
-        });
-    }
-
-    @Override
-    public <E> Future<GenericServiceAPIResponseEntity<String>> search(final EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException {
-        return this.client.getJerseyClient().getExecutorService().submit(new Callable<GenericServiceAPIResponseEntity<String>>() {
-            @Override
-            public GenericServiceAPIResponseEntity<String> call() throws Exception {
-                return client.search(request);
-            }
-        });
-    }
-}
\ No newline at end of file



[17/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestEntityQualifierHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestEntityQualifierHelper.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestEntityQualifierHelper.java
deleted file mode 100755
index 090fbc8..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestEntityQualifierHelper.java
+++ /dev/null
@@ -1,182 +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.log.entity.filter;
-
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-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 junit.framework.Assert;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.List;
-
-/**
-* @since : 10/15/14 2014
-*/
-public class TestEntityQualifierHelper {
-	private EntityDefinition ed;
-	@Before
-	public void setUp(){
-		try {
-			if(EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity") == null){
-				EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-			}
-			ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-		} catch (InstantiationException e) {
-			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-		} catch (IllegalAccessException e) {
-			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-		}
-	}
-
-	@Test
-	public void testEd(){
-		Assert.assertNotNull(ed);
-		Assert.assertNotNull(ed.getQualifierNameMap().get("a"));
-		Assert.assertNull(ed.getQualifierNameMap().get("notexist"));
-	}
-
-	@Test
-	public void  testIntEntityQualifierHelper(){
-		byte[] value = EntityQualifierUtils.toBytes(ed, "field1", "2");
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(1)) > 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(2)) == 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(3)) < 0);
-	}
-
-	@Test
-	public void  testStringEntityQualifierHelper(){
-		byte[] value = EntityQualifierUtils.toBytes(ed, "field7", "xyz");
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes("xyy")) > 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes("xyz")) == 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes("xzz")) < 0);
-
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes("xy")) > 0);
-	}
-
-	@Test
-	public void  testDoubleEntityQualifierHelper(){
-		byte[] value = EntityQualifierUtils.toBytes(ed, "field5", "1.0");
-		Assert.assertTrue(Bytes.compareTo(value,Bytes.toBytes(0.5)) > 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(1.0)) == 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(2.2)) < 0);
-
-//      TODO There is problem with negative double
-//		Assert.assertTrue(Bytes.compareTo(Bytes.toBytes(-0.6),Bytes.toBytes(-0.5)) < 0);
-	}
-
-	@Test
-	public void  testLongEntityQualifierHelper(){
-		byte[] value = EntityQualifierUtils.toBytes(ed, "field4", "100000");
-		Assert.assertTrue(Bytes.compareTo(value,Bytes.toBytes(100000l-1l )) > 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(100000l)) == 0);
-		Assert.assertTrue(Bytes.compareTo(value, Bytes.toBytes(100000l + 1l)) < 0);
-	}
-
-	@Test
-	public void  testNegativeLongEntityQualifierHelper(){
-		Exception ex = null;
-		try{
-			byte[] value = EntityQualifierUtils.toBytes(ed, "field4", "-100000");
-		}catch (IllegalArgumentException e){
-			ex = e;
-		}
-		Assert.assertNull(ex);
-	}
-
-	@Test
-	public void testParseAsList(){
-		List<String> set = EntityQualifierUtils.parseList("(\"abc1\",\"abc2\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("abc1",set.toArray()[0]);
-		Assert.assertEquals("abc2",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(1,\"abc2\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("1",set.toArray()[0]);
-		Assert.assertEquals("abc2",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(-1.5,\"abc2\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("-1.5",set.toArray()[0]);
-		Assert.assertEquals("abc2",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(-1.5,\"-1.5,abc\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("-1.5",set.toArray()[0]);
-		Assert.assertEquals("-1.5,abc",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(-1.5,\"\\\"abc\\\"\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("-1.5",set.toArray()[0]);
-		Assert.assertEquals("\"abc\"",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(-1.5,\"-1.5,\\\"abc\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("-1.5",set.toArray()[0]);
-		Assert.assertEquals("-1.5,\"abc",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(\"\\\"-1.5\\\",abc1\",\"-1.5,\\\"abc2\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("\"-1.5\",abc1",set.toArray()[0]);
-		Assert.assertEquals("-1.5,\"abc2",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(-1.5,\"-1.5,\"abc\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("-1.5",set.toArray()[0]);
-		Assert.assertEquals("-1.5,\"abc",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(\"\\\"value1,part1\\\",\\\"value1,part2\\\"\",\"value2\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("\"value1,part1\",\"value1,part2\"",set.toArray()[0]);
-		Assert.assertEquals("value2",set.toArray()[1]);
-
-		////////////////////////////////
-		// Bad Format
-		////////////////////////////////
-		set = EntityQualifierUtils.parseList("(\"a,b)");
-		Assert.assertEquals(1,set.size());
-		Assert.assertEquals("a,b",set.toArray()[0]);
-
-		set = EntityQualifierUtils.parseList("(a,b\")");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("a",set.toArray()[0]);
-		Assert.assertEquals("b",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(a\",b)");
-		Assert.assertEquals(1,set.size());
-		Assert.assertEquals("a\",b",set.toArray()[0]);
-
-		set = EntityQualifierUtils.parseList("(abc,def)");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("abc",set.toArray()[0]);
-		Assert.assertEquals("def",set.toArray()[1]);
-
-		set = EntityQualifierUtils.parseList("(1.5,def)");
-		Assert.assertEquals(2,set.size());
-		Assert.assertEquals("1.5",set.toArray()[0]);
-		Assert.assertEquals("def",set.toArray()[1]);
-	}
-
-//	@Test
-//	public void testEscapeRegExp(){
-//		Assert.assertEquals("abc\\.def",EntityQualifierHelper.escapeRegExp("abc.def"));
-//	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestExpressionComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestExpressionComparator.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestExpressionComparator.java
deleted file mode 100755
index bdeed52..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestExpressionComparator.java
+++ /dev/null
@@ -1,195 +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.log.entity.filter;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.parser.ComparisonOperator;
-import org.apache.eagle.query.parser.TokenType;
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class TestExpressionComparator {
-    @Test
-    public void testCompareToForEval(){
-        QualifierFilterEntity entity = new QualifierFilterEntity();
-        // a+b >= a+100.0
-        entity.setKey("a/b");
-        entity.setKeyType(TokenType.EXP);
-        entity.setValue("c");
-        entity.setValueType(TokenType.EXP);
-        entity.setOp(ComparisonOperator.GREATER_OR_EQUAL);
-        EntityDefinition qualifierDisplayNameMap = null;
-        BooleanExpressionComparator comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        Map<String,Double> context = new HashMap<String,Double>();
-        Assert.assertEquals("Should return 0 because not given enough variable",0,comparator.compareTo(context));
-
-        context.put("a", 80.0);
-        context.put("b",20.0);
-        context.put("c",3.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",80.0);
-        context.put("b",20.0);
-        context.put("c",4.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",80.0);
-        context.put("b",20.0);
-        context.put("c",5.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        // Return false once any Double.isInfinite ( 80.0 / 0.0 )
-        Assert.assertTrue(Double.isInfinite( 80.0 / 0.0 ));
-        context.put("a",80.0);
-        context.put("b",0.0);
-        context.put("c", 5.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-    }
-
-    @Test
-    public void testCompareToForOp(){
-        QualifierFilterEntity entity = new QualifierFilterEntity();
-
-        // a+b >= a+100.0
-        entity.setKey("a + b");
-        entity.setValue("a + 100.0");
-        entity.setOp(ComparisonOperator.GREATER_OR_EQUAL);
-        EntityDefinition qualifierDisplayNameMap = new EntityDefinition();
-
-        BooleanExpressionComparator comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        Map<String,Double> context = new HashMap<String,Double>();
-        context.put("a",100.1);
-        context.put("b",100.1);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",100.1);
-        context.put("b",100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",100.0);
-        context.put("b",99.9);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",-100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        // a+b = a+100.0
-        entity.setOp(ComparisonOperator.GREATER);
-        comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        context.put("a",100.1);
-        context.put("b",100.1);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",100.1);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",100.0);
-        context.put("b",99.9);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",-100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        // a+b = a+100.0
-        entity.setOp(ComparisonOperator.LESS);
-        comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        context.put("a",100.1);
-        context.put("b",100.1);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",100.1);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",100.0);
-        context.put("b",99.9);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",-100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        // a+b <= a+100.0
-        entity.setOp(ComparisonOperator.LESS_OR_EQUAL);
-        comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        context.put("a",100.1);
-        context.put("b",100.1);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",100.1);
-        context.put("b",100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",100.0);
-        context.put("b",99.9);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",-100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        entity.setOp(ComparisonOperator.NOT_EQUAL);
-        comparator = new BooleanExpressionComparator(entity,qualifierDisplayNameMap);
-
-        context.put("a",100.1);
-        context.put("b",100.1);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",100.1);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",100.0);
-        context.put("b",99.9);
-        Assert.assertEquals(1,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b",100.0);
-        Assert.assertEquals(0,comparator.compareTo(context));
-
-        context.put("a",-200.0);
-        context.put("b", -100.0);
-        Assert.assertEquals(1,comparator.compareTo(context));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestHBaseFilterBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestHBaseFilterBuilder.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestHBaseFilterBuilder.java
deleted file mode 100755
index 968be28..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestHBaseFilterBuilder.java
+++ /dev/null
@@ -1,282 +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.log.entity.filter;
-
-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.parser.EagleQueryParseException;
-import org.apache.eagle.query.parser.EagleQueryParser;
-import org.apache.eagle.query.parser.ORExpression;
-import junit.framework.Assert;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FilterList;
-import org.apache.hadoop.hbase.filter.RowFilter;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TestHBaseFilterBuilder {
-	private final static Logger LOG = LoggerFactory.getLogger(TestHBaseFilterBuilder.class);
-	private EntityDefinition ed;
-
-	private Filter buildFilter(String query) throws EagleQueryParseException {
-		ORExpression expression = new EagleQueryParser(query).parse();
-		HBaseFilterBuilder builder = new HBaseFilterBuilder(ed,expression);
-		Filter filterList =  builder.buildFilters();
-		LOG.info("\n" + expression + " \n=> " + filterList);
-		return filterList;
-	}
-
-	@Before
-	public void setUp(){
-		try {
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-			if(ed == null){
-				EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-				ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-			}
-		} catch (InstantiationException e) {
-			Assert.fail(e.getMessage());
-		} catch (IllegalAccessException e) {
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	/**
-	 * Should success without exception
-	 */
-	@Test
-	public void testQueryParseAndBuildFilterSuccess(){
-		String[] queries = new String[]{
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID = \"job_1234\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID = \"PigLatin: \\\"quoted_pig_job_name_value\\\"\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID in (\"job_1234\",\"job_4567\")",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID in (1234,\"job_4567\")",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID in (1234,\"sample job name: \\\"quoted_job_name_value\\\"\")",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID CONTAINS \"job_1234\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID CONTAINS job_1234",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID NOT CONTAINS \"job_456\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is \"job_789\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is not \"job_789\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is null",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is not null",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is NULL",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID is not NULL",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID = NULL",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID != null",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID =~ \".*job_1234.*\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID !=~ \".*job_1234.*\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID !=~ \"\\\\|_\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 ",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field3 = 100000",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field5 = 1.56",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field5 > 1.56",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field5 >= 1.56",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field5 < 1.56",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 = 1 and @field5 <= 1.56",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 < 100000)\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 in (\"100000\",\"1\"))\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 in (\"100000\",\"1\"))\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field7 in (\"\\\"value1-part1,value1-part2\\\"\",\"value2\"))\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 not in (\"100000\",\"1\"))\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 NOT IN (\"100000\",\"1\"))\"",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field7 NOT IN (\"\\\"value1-part1,value1-part2\\\"\",\"value2\"))\"",
-			// expression filter
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and EXP{field3/field7 - field2} > 12",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field5 > EXP{field3/field7 - field2}",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and EXP{field3/field7 - field2} > EXP{field1 * field2}",
-			"@cluster = \"cluster1\" and @datacenter = \"dc1\" and EXP{field3/field7 - field2} > EXP{field1 * field2}",
-		};
-		for(String query: queries){
-			try {
-				Filter filter = buildFilter(query);
-				Assert.assertNotNull(filter);
-			} catch (EagleQueryParseException e) {
-				Assert.fail(e.getMessage());
-			} catch (Exception ex){
-				Assert.fail(ex.getMessage());
-			}
-		}
-	}
-
-	/**
-	 * Should throw exception
-	 */
-	@Test
-	public void testNegativeQueryParseSuccessfullyButBuildFilterFailed(){
-		String[] queries = new String[]{
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @tag < \"job_1234\"",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @tag <= \"job_1234\"",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @tag >= \"job_1234\"",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 < null",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 <= null",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 > NULL",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 >= NULL",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 =~ NULL",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 !=~ NULL",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 contains NULL",
-				"@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field1 not contains NULL"
-		};
-		for(String query: queries){
-			try {
-				@SuppressWarnings("unused")
-				Filter filter = buildFilter(query);
-				Assert.fail("Should throw exception: "+query);
-			} catch (IllegalArgumentException e) {
-				LOG.info("Expect exception: " + e.getMessage());
-			} catch (EagleQueryParseException e) {
-				Assert.fail("Should parse successfully: "+query);
-			}
-		}
-	}
-
-	@Test
-	public void testParsedFilter(){
-		String q1 = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field3 = 100000";
-		try {
-			FilterList filterList = (FilterList) buildFilter(q1);
-			Assert.assertEquals(FilterList.Operator.MUST_PASS_ONE,filterList.getOperator());
-			Assert.assertEquals(1,filterList.getFilters().size());
-			Assert.assertEquals(2,((FilterList) filterList.getFilters().get(0)).getFilters().size());
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		}
-
-		String q2 = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 < 100000)";
-		try {
-			FilterList filterList = (FilterList) buildFilter(q2);
-			Assert.assertEquals(FilterList.Operator.MUST_PASS_ONE,filterList.getOperator());
-			Assert.assertEquals(2,filterList.getFilters().size());
-			Assert.assertEquals(2,((FilterList) filterList.getFilters().get(0)).getFilters().size());
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		}
-
-		// Test parse success but bad type of value
-		String q3 = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and ( @field3 = 100000 or @field3 < \"bad_int_100000\")";
-		boolean q3Ex = false;
-		try {
-			Assert.assertNull(buildFilter(q3));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (IllegalArgumentException e){
-			LOG.debug("Expect: ", e);
-			Assert.assertTrue(e.getCause() instanceof NumberFormatException);
-			q3Ex = true;
-		}
-		Assert.assertTrue(q3Ex);
-	}
-
-	@Test
-	public void testWithUnescapedString(){
-		///////////////////////////////////
-		// Tag filter with IN or EQUAL
-		// Should use RowKeyFilter only
-		///////////////////////////////////
-		String query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID = \"job.1234\"";
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertFalse("Should use rowkey filter only",filter.toString().matches(".*job.1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID in (\"job_1234\")";
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertFalse("Should use rowkey filter only",filter.toString().matches(".*job_1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID in (\"job.1234\")";
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertFalse("Should use rowkey filter only",filter.toString().matches(".*job.*1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-
-		///////////////////////////////
-		// Tag with other operators
-		///////////////////////////////
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID =~ \"job_1234\"";
-
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertTrue(filter.toString().matches(".*job_1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @jobID =~ \"job.1234\"";
-
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertTrue(filter.toString().matches(".*job.1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-
-		///////////////////////////////
-		// Tag with IN
-		// Should escape regexp chars
-		///////////////////////////////
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field7 = \"job_1234\"";
-
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertTrue(filter.toString().matches(".*job_1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			ex.printStackTrace();
-			Assert.fail(ex.getMessage());
-		}
-
-		query = "@cluster = \"cluster1\" and @datacenter = \"dc1\" and @field7 in (\"job.1234\",\"others\")";
-
-		try {
-			FilterList filter = (FilterList) buildFilter(query);
-			Assert.assertEquals(RowFilter.class, ((FilterList) filter.getFilters().get(0)).getFilters().get(0).getClass());
-			Assert.assertTrue(filter.toString().matches(".*job\\.1234.*"));
-		} catch (EagleQueryParseException e) {
-			Assert.fail(e.getMessage());
-		} catch (Exception ex){
-			Assert.fail(ex.getMessage());
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestTypedByteArrayComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestTypedByteArrayComparator.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestTypedByteArrayComparator.java
deleted file mode 100755
index 1c0f416..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/filter/TestTypedByteArrayComparator.java
+++ /dev/null
@@ -1,61 +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.log.entity.filter;
-
-import org.apache.eagle.log.entity.meta.DoubleSerDeser;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.log.entity.meta.IntSerDeser;
-import org.apache.eagle.log.entity.meta.LongSerDeser;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * @since 2014/11/17
- */
-public class TestTypedByteArrayComparator {
-    @Test
-    public void testCompare(){
-        EntitySerDeser serDeser = new DoubleSerDeser();
-        TypedByteArrayComparator comparator = new TypedByteArrayComparator(serDeser.serialize(0.9),serDeser.type());
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(0.8)) > 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(1.1)) < 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(0.9)) == 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(- 0.9)) > 0);
-
-        serDeser = new IntSerDeser();
-        comparator = new TypedByteArrayComparator(serDeser.serialize(9),serDeser.type());
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(8)) > 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(11)) < 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(9)) == 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(-9)) > 0);
-
-        serDeser = new LongSerDeser();
-        comparator = new TypedByteArrayComparator(serDeser.serialize(9l),serDeser.type());
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(8l)) > 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(11l)) < 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(9l)) == 0);
-        Assert.assertTrue(comparator.compareTo(serDeser.serialize(-9l)) > 0);
-    }
-
-    @Test
-    public void testClassName(){
-        Assert.assertEquals("long",long.class.getName());
-        Assert.assertEquals("java.lang.Long", Long.class.getName());
-        Assert.assertEquals("long",long.class.toString());
-        Assert.assertEquals("class java.lang.Long", Long.class.toString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestArraySerDeser.java
deleted file mode 100755
index 4807b07..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestArraySerDeser.java
+++ /dev/null
@@ -1,64 +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.log.entity.meta;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestArraySerDeser {
-	
-	@Test
-	public void testIntArraySerDeser(){
-		IntArraySerDeser serDeser = new IntArraySerDeser();
-		int[] ints = new int[] {1, 34, 21, 82};
-		byte[] bytes = serDeser.serialize(ints);
-		Assert.assertEquals((ints.length+1)*4, bytes.length);
-		int[] targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(ints.length, targets.length);
-		for(int i=0; i<ints.length; i++){
-			Assert.assertEquals(ints[i], targets[i]);
-		}
-	}
-	
-	@Test
-	public void testDoubleArraySerDeser(){
-		DoubleArraySerDeser serDeser = new DoubleArraySerDeser();
-		double[] doubles = new double[] {1.0, 34.0, 21.0, 82.0};
-		byte[] bytes = serDeser.serialize(doubles);
-		Assert.assertEquals(4 + doubles.length*8, bytes.length);
-		double[] targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(doubles.length, targets.length);
-		for(int i=0; i<doubles.length; i++){
-			Assert.assertEquals(doubles[i], targets[i]);
-		}
-	}
-
-	@Test
-	public void testStringArraySerDeser(){
-		StringArraySerDeser serDeser = new StringArraySerDeser();
-		String[] sources = new String[] {"a", "", "1", "2", "3"};
-		byte[] bytes = serDeser.serialize(sources);
-		Assert.assertEquals(4 + sources.length*4 + 4, bytes.length);
-		String[] targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.length, targets.length);
-		for(int i=0; i<sources.length; i++){
-			Assert.assertEquals(sources[i], targets[i]);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestEntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestEntityDefinitionManager.java
deleted file mode 100755
index ccbca71..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestEntityDefinitionManager.java
+++ /dev/null
@@ -1,35 +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.log.entity.meta;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.test.TestLogAPIEntity;
-import junit.framework.Assert;
-import org.junit.Test;
-
-public class TestEntityDefinitionManager {
-    @Test
-    public void testCreateEntityDefinition(){
-        EntityDefinition entityDefinition = EntityDefinitionManager.createEntityDefinition(TestLogAPIEntity.class);
-        Assert.assertNotNull(entityDefinition);
-    }
-    @Test
-    public void testCreateMetricEntityDefinition(){
-        EntityDefinition entityDefinition = EntityDefinitionManager.createEntityDefinition(GenericMetricEntity.class);
-        Assert.assertNotNull(entityDefinition);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestListSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestListSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestListSerDeser.java
deleted file mode 100644
index 6908815..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestListSerDeser.java
+++ /dev/null
@@ -1,101 +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.log.entity.meta;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestListSerDeser {
-
-	@SuppressWarnings("rawtypes")
-	@Test
-	public void testStringListSerDeser() {
-		ListSerDeser serDeser = new ListSerDeser();
-		List<String> sources = new ArrayList<String>();
-		sources.add("value1");
-		sources.add("value2");
-		sources.add("value3");		
-				
-		byte[] bytes = serDeser.serialize(sources);
-		Assert.assertEquals(4 + sources.size() * 8 + 18, bytes.length);
-		List targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-		
-		Assert.assertTrue(targets.contains("value1"));
-		Assert.assertTrue(targets.contains("value2"));
-		Assert.assertTrue(targets.contains("value3"));
-	}
-
-	
-	@SuppressWarnings("rawtypes")
-	@Test
-	public void testIntegerMapSerDeser() {
-		ListSerDeser serDeser = new ListSerDeser();
-		List<Integer> sources = new ArrayList<Integer>();
-		sources.add(1);
-		sources.add(2);
-		sources.add(3);
-		
-		byte[] bytes = serDeser.serialize(sources);
-		Assert.assertEquals(4 + sources.size() * 8 + 12, bytes.length);
-		List targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-		
-		Assert.assertTrue(targets.contains(1));
-		Assert.assertTrue(targets.contains(2));
-		Assert.assertTrue(targets.contains(3));
-	}
-
-	
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	@Test
-	public void testListListSerDeser() {
-		ListSerDeser serDeser = new ListSerDeser();
-		List<List<String>> sources = new ArrayList<List<String>>();
-		List<String> list1 = new ArrayList<String>();
-		list1.add("value1");
-		list1.add("value2");
-		list1.add("value3");
-		sources.add(list1);
-		
-		List<String> list2 = new ArrayList<String>();
-		list2.add("value4");
-		list2.add("value5");		
-		sources.add(list2);
-		
-		byte[] bytes = serDeser.serialize(sources);
-		List targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-
-		list1 = (List)targets.get(0);
-		Assert.assertNotNull(list1);
-		Assert.assertEquals(3, list1.size());
-		Assert.assertTrue(list1.contains("value1"));
-		Assert.assertTrue(list1.contains("value2"));
-		Assert.assertTrue(list1.contains("value3"));
-
-		list2 = (List)targets.get(1);
-		Assert.assertNotNull(list2);
-		Assert.assertEquals(2, list2.size());
-		Assert.assertTrue(list2.contains("value4"));
-		Assert.assertTrue(list2.contains("value5"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestMapSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestMapSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestMapSerDeser.java
deleted file mode 100644
index 29a704d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/meta/TestMapSerDeser.java
+++ /dev/null
@@ -1,106 +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.log.entity.meta;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestMapSerDeser {
-
-	@SuppressWarnings("rawtypes")
-	@Test
-	public void testStringToStringMapSerDeser() {
-		MapSerDeser serDeser = new MapSerDeser();
-		Map<String, String> sources = new HashMap<String, String>();
-		sources.put("test1", "value1");
-		sources.put("test2", null);
-		sources.put("test3", "value3");
-		
-		byte[] bytes = serDeser.serialize(sources);
-		Assert.assertEquals(4 + sources.size() * 16 + 27, bytes.length);
-		Map targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-		
-		Assert.assertEquals("value1", targets.get("test1"));
-		Assert.assertNull(targets.get("test2"));
-		Assert.assertEquals("value3", targets.get("test3"));
-	}
-
-	
-	@SuppressWarnings("rawtypes")
-	@Test
-	public void testStringToIntegerMapSerDeser() {
-		MapSerDeser serDeser = new MapSerDeser();
-		Map<String, Integer> sources = new HashMap<String, Integer>();
-		sources.put("test1", 1);
-		sources.put("test2", null);
-		sources.put("test3", 3);
-		
-		byte[] bytes = serDeser.serialize(sources);
-		Assert.assertEquals(4 + sources.size() * 16 + 23, bytes.length);
-		Map targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-		
-		Assert.assertEquals(1, targets.get("test1"));
-		Assert.assertNull(targets.get("test2"));
-		Assert.assertEquals(3, targets.get("test3"));
-	}
-
-	
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	@Test
-	public void testStringToMapMapSerDeser() {
-		MapSerDeser serDeser = new MapSerDeser();
-		Map<String, Map<String, String>> sources = new HashMap<String, Map<String, String>>();
-		Map<String, String> map1 = new HashMap<String, String>();
-		map1.put("key11", "value11");
-		map1.put("key12", null);
-		map1.put("key13", "value13");
-		sources.put("test1", map1);
-		sources.put("test2", null);
-		Map<String, String> map3 = new HashMap<String, String>();
-		map3.put("key31", "value31");
-		map3.put("key32", null);
-		map3.put("key33", "value33");
-		sources.put("test3", map3);
-		
-		byte[] bytes = serDeser.serialize(sources);
-		Map targets = serDeser.deserialize(bytes);
-		Assert.assertEquals(sources.size(), targets.size());
-
-		map1 = (Map)targets.get("test1");
-		Assert.assertNotNull(map1);
-		Assert.assertEquals(3, map1.size());
-		Assert.assertEquals("value11", map1.get("key11"));
-		Assert.assertNull(map1.get("key12"));
-		Assert.assertEquals("value13", map1.get("key13"));
-		
-		Assert.assertNull(targets.get("test2"));
-		
-		map3 = (Map)targets.get("test3");
-		Assert.assertNotNull(map3);
-		Assert.assertEquals(3, map3.size());
-		Assert.assertEquals("value31", map3.get("key31"));
-		Assert.assertNull(map3.get("key32"));
-		Assert.assertEquals("value33", map3.get("key33"));
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100755
index 1b64b20..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/repo/TestEntityRepositoryScanner.java
+++ /dev/null
@@ -1,30 +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.log.entity.repo;
-
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestEntityRepositoryScanner {
-
-	@Test
-	public void testScan() throws InstantiationException, IllegalAccessException {
-		EntityRepositoryScanner.scan();
-		Assert.assertNotNull(EntityDefinitionManager.getEntityByServiceName("MetricMetadataService"));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionParser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionParser.java
deleted file mode 100755
index 0206b68..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionParser.java
+++ /dev/null
@@ -1,256 +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.log.expression;
-/**
- * 
- */
-
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.util.List;
-
-/**
- * @since Nov 10, 2014
- */
-public class TestExpressionParser {
-			
-	@Test
-	public void testSingleVariable() throws Exception{
-		String exprStr = "mapProgress";		
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("mapProgress", 100.0)
-							 .eval();
-		Assert.assertEquals(value, 100.0);
-		List<String> dependentFields = parser.getDependentFields();
-		Assert.assertEquals(dependentFields.size(), 1);
-		Assert.assertEquals(dependentFields.get(0), "mapProgress");
-	}
-	
-	@Test
-	public void testgetDependency() throws Exception{
-		/** NOTICE: expression should be enclosure with "EXP{}" , This is for making antlr easy to parse  
-		  * variable name cannot be "pi" OR "E", there are parssi builtin constants */
-		String exprStr = "min(mAx, Max) / abs(MAX)";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		List<String> variables =  parser.getDependentFields();
-		Assert.assertEquals(variables.size(), 3);
-		Assert.assertTrue(variables.contains("mAx"));
-		Assert.assertTrue(variables.contains("Max"));
-		Assert.assertTrue(variables.contains("MAX"));
-	}
-
-	@Test
-	public void testFunction() throws Exception{
-		String exprStr = "min(mapProgress, reduceProgress) / abs(endTime - startTime)";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("mapProgress", 100.0)
-							 .setVariable("reduceProgress", 20.0)
-							 .setVariable("endTime", 1415590100000.0)
-							 .setVariable("startTime", 1415590000000.0)
-							 .eval();
-		Assert.assertEquals(value, 0.0002);
-	}
-	
-	@Test
-	public void testOperator() throws Exception{
-		String exprStr = "(a+b*c) / (2*(d-e))";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 200.0)
-							 .setVariable("b", 400.0)
-							 .setVariable("c", 3.0)
-							 .setVariable("d", 225.0)
-							 .setVariable("e", -125.0)
-							 .eval();
-		Assert.assertEquals(value, 2.0);
-	}
-	
-	@Test
-	public void testOperatorWithFunction() throws Exception{
-		String exprStr = "(max(a, b)* min(a, b)) / abs(a-b+c-d)";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 300.0)
-							 .setVariable("b", 200.0)
-							 .setVariable("c", -300.0)
-							 .setVariable("d", -300.0)
-							 .eval();
-		Assert.assertEquals(value, 600.0);
-	}
-
-	@Test
-	public void testWithAtFieldName() throws Exception{
-		String exprStr = "(max(a, b)* min(a, b)) / abs(a-b+c-d)";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 300.0)
-							 .setVariable("b", 200.0)
-							 .setVariable("c", -300.0)
-							 .setVariable("d", -300.0)
-							 .eval();
-		Assert.assertEquals(value, 600.0);
-	}
-
-	@Test
-	public void testConstant() throws Exception {
-		String exprStr = "a";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 300.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 300.0);
-
-		value = parser.setVariable("a", 200.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 200.0);
-	}
-
-	@Test
-	public void testBooleanExpression() throws Exception {
-		String exprStr = "a > b";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 300.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 1.0);
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 0.0);
-
-		exprStr = "a < b";
-		parser = new ExpressionParser(exprStr);
-		value = parser.setVariable("a", 300.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 0.0);
-
-		value = parser.setVariable("a", 400.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 0.0);
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0);
-
-		// !!! Not support well >=
-		exprStr = "a >= b";
-		parser = new ExpressionParser(exprStr);
-		value = parser.setVariable("a", 300.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 0.0); // expect 1.0
-
-		value = parser.setVariable("a", 400.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0); // expect 1.0
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0); // expect 0.0
-
-		exprStr = "a <= b";
-		parser = new ExpressionParser(exprStr);
-		value = parser.setVariable("a", 300.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0);
-
-		value = parser.setVariable("a", 400.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 0.0);
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0);
-
-		exprStr = "a = b";
-		parser = new ExpressionParser(exprStr);
-		value = parser.setVariable("a", 300.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 1.0);
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertEquals(value, 0.0);
-	}
-
-	@Test
-	public void testParsiiBug() throws Exception {
-		// !!! Not support >=
-		String exprStr = "a >= b";
-		ExpressionParser parser = new ExpressionParser(exprStr);
-		Double value = parser.setVariable("a", 300.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 0.0); // expect 1.0
-
-		value = parser.setVariable("a", 400.0)
-				.setVariable("b", 300.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0); // expect 1.0
-
-		value = parser.setVariable("a", 100.0)
-				.setVariable("b", 200.0)
-				.setVariable("c", -300.0)
-				.setVariable("d", -300.0)
-				.eval();
-		Assert.assertTrue(value == 1.0); // expect 0.0
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionPerformance.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionPerformance.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionPerformance.java
deleted file mode 100755
index 0a2b729..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/expression/TestExpressionPerformance.java
+++ /dev/null
@@ -1,120 +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.log.expression;
-
-import org.junit.Assert;
-import org.junit.Test;
-import parsii.eval.Expression;
-import parsii.eval.Parser;
-import parsii.eval.Scope;
-
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * @since Nov 4, 2014
- */
-
-public class TestExpressionPerformance {
-
-	public interface ExpressionParser {
-		double parse(String exprStr, Map<String, Double> tuple) throws Exception;
-	}
-	
-	public class ParsiiParser implements ExpressionParser{
-		public Expression expression;
-		
-		public double parse(String exprStr, Map<String, Double> tuple) throws Exception{		
-			Scope scope = Scope.create();
-			if (expression == null) {
-				expression = Parser.parse(exprStr, scope);
-			}
-			for(String valName : tuple.keySet()) {
-				Object value = tuple.get(valName);
-				if(value instanceof Number) {
-					scope.getVariable(valName).setValue(((Number)value).doubleValue());
-				}
-			}
-			return expression.evaluate();
-		}
-	}
-	
-	public long doParse(ExpressionParser parser, String exprStr, List<String> parameters) throws Exception{
-		long startTime = System.currentTimeMillis();
-		int parNum = parameters.size();
-		Map<String, Double> tuple = new HashMap<String, Double>();
-		for (int i = 1; i < 100000; i++) {
-			for (int j = 0; j < parNum; j++) {
-				tuple.put(parameters.get(j), (double) (i * 3 + j));				
-			}
-			parser.parse(exprStr, tuple);
-		}
-		long endTime = System.currentTimeMillis();
-		return endTime - startTime;
-	}
-	
-	@Test
-	public void TestPerformance() throws Exception{
-		List<ExpressionParser> parsers = new ArrayList<ExpressionParser>();
-		parsers.add(new ParsiiParser());
-
-		String exprStr = "a + b / c * 2"; 
-		List<String> parameters = new ArrayList<String>();
-		parameters.add("a");
-		parameters.add("b");
-		parameters.add("c");
-		
-		Map<String, Long> timeComsued = new HashMap<String, Long>();
-		
-		for (int i = 0; i < 10; i++) {
-			for (ExpressionParser parser : parsers) {
-				String name = parser.getClass().getName();
-				if (timeComsued.get(name) == null) {
-					timeComsued.put(name, 0L);
-				}
-				timeComsued.put(name, timeComsued.get(name) + doParse(parser, exprStr, parameters));			
-			}
-		}
-		for (Entry<String, Long> time : timeComsued.entrySet()) {
-			System.out.println("time consumed of " + time.getKey() + ": " + time.getValue() +"ms");
-		}
-	}
-
-	@Test
-	public void TestEvaluatoinValid() throws Exception{
-		List<ExpressionParser> parsers = new ArrayList<ExpressionParser>();
-		parsers.add(new ParsiiParser());
-
-		String exprStr = "max(a, 3 * b) + min(b, 10000) / abs(c * 2)";
-		Map<String ,Double> tuples = new HashMap<String, Double>();
-		tuples.put("a", 20.5);
-		tuples.put("b", 123.7);
-		tuples.put("c", 97.57);
-		DecimalFormat df = new DecimalFormat("#.00");
-		for (ExpressionParser parser : parsers) {			
-			System.out.println(parser.getClass().getName() + " : " + parser.parse(exprStr, tuples));
-			Assert.assertEquals(df.format(parser.parse(exprStr, tuples)), "371.73");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 25257c5..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +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.
-
-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"
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-entity-base/src/test/resources/log4j.properties
deleted file mode 100644
index dccbc70..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, stdout
-#eagle.log.dir=./logs
-#eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-## Daily Rolling File Appender
-#log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-#log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-#log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-##log4j.appender.DRFA.MaxBackupIndex=30
-#log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-#
-## Pattern format: Date LogLevel LoggerName LogMessage
-#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/pom.xml b/eagle-core/eagle-query/eagle-query-base/pom.xml
deleted file mode 100644
index ccd42d0..0000000
--- a/eagle-core/eagle-query/eagle-query-base/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-query-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-query-base</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-antlr</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericEntityQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericEntityQuery.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericEntityQuery.java
deleted file mode 100755
index 1319f43..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericEntityQuery.java
+++ /dev/null
@@ -1,74 +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.query;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @since : 10/30/14,2014
- */
-public class GenericEntityQuery implements GenericQuery,EntityCreationListener {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityQuery.class);
-
-	private List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-	private StreamReader reader;
-
-	public GenericEntityQuery(String serviceName, SearchCondition condition, String metricName) throws IllegalAccessException, InstantiationException {
-		if(serviceName.equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-			if(LOG.isDebugEnabled()) LOG.debug("List metric query");
-			if(metricName == null || metricName.isEmpty()){
-				throw new IllegalArgumentException("metricName should not be empty for metric list query");
-			}
-			if(!condition.getOutputFields().contains(GenericMetricEntity.VALUE_FIELD)){
-				condition.getOutputFields().add(GenericMetricEntity.VALUE_FIELD);
-			}
-			reader = new GenericEntityStreamReader(serviceName, condition,metricName);
-		}else{
-			if(LOG.isDebugEnabled()) LOG.debug("List entity query");
-			reader = new GenericEntityStreamReader(serviceName, condition);
-		}
-		reader.register(this);
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity){
-		entities.add(entity);
-	}
-
-	@Override
-	public List<TaggedLogAPIEntity> result() throws Exception{
-		if(LOG.isDebugEnabled()) LOG.debug("Start reading as batch mode");
-		reader.readAsStream();
-		return entities;
-	}
-
-	@Override
-	public long getFirstTimeStamp() {
-		return reader.getFirstTimestamp();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericQuery.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericQuery.java
deleted file mode 100755
index d3af151..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/GenericQuery.java
+++ /dev/null
@@ -1,46 +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.query;
-
-import java.util.List;
-
-/**
- * @since : 10/30/14,2014
- */
-public interface GenericQuery {
-	/**
-	 * Throw all exceptions to http server
-	 *
-     * @param <T> result entity type
-	 * @return result entities list
-	 *
-     * @throws Exception
-	 */
-	<T> List<T> result() throws Exception;
-
-	/**
-	 * Get last/largest timestamp on all rows
-	 *
-	 * @return last timestamp
-	 */
-	long getLastTimestamp();
-
-	/**
-	 * Get first timestamp on all rows
-	 */
-	long getFirstTimeStamp();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java
deleted file mode 100755
index c630c41..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/ListQueryCompiler.java
+++ /dev/null
@@ -1,380 +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.query;
-
-import org.apache.eagle.log.entity.filter.HBaseFilterBuilder;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-import org.apache.eagle.query.aggregate.timeseries.SortOptionsParser;
-import org.apache.eagle.query.parser.EagleQueryParseException;
-import org.apache.eagle.query.parser.EagleQueryParser;
-import org.apache.eagle.query.parser.ORExpression;
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.AggregateFunctionTypeMatcher;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FilterList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class ListQueryCompiler {
-	private final static Logger LOG = LoggerFactory.getLogger(ListQueryCompiler.class);
-	/**
-	 * syntax is <EntityName>[<Filter>]{<Projection>}
-	 */
-	private final static String listRegex = "^([^\\[]+)\\[([^\\]]*)\\]\\{(.+)\\}$";
-	private final static Pattern _listPattern = Pattern.compile(listRegex);
-
-	/**
-	 * syntax is @<fieldname>
-	 */
-	private final static String _fnAnyPattern = "*";
-	private final static Pattern _fnPattern = TokenConstant.ID_PATTERN;
-
-	/**
-	 * syntax is @<expression>
-	 */
-	private final static String expRegex = "^(EXP\\{.*\\})(\\s+AS)?(\\s+.*)?$";
-	private final static Pattern _expPattern = Pattern.compile(expRegex,Pattern.CASE_INSENSITIVE);
-
-	/**
-	 * syntax is <EntityName>[<Filter>]<GroupbyFields>{<AggregateFunctions>}
-	 */
-
-	/** The regular expression before add EXP{<Expression>} in query **/
-	private final static String aggRegex = "^([^\\[]+)\\[([^\\]]*)\\]<([^>]*)>\\{(.+)\\}$";
-	private final static Pattern _aggPattern = Pattern.compile(aggRegex);
-
-	private final static String sortRegex = "^([^\\[]+)\\[([^\\]]*)\\]<([^>]*)>\\{(.+)\\}\\.\\{(.+)\\}$";
-	private final static Pattern _sortPattern = Pattern.compile(sortRegex);
-	
-	private String _serviceName;
-	private Filter _filter;
-	private List<String> _outputFields;
-	private List<String> _groupbyFields;
-	private List<AggregateFunctionType> _aggregateFunctionTypes;
-	private List<String> _aggregateFields;
-	private List<AggregateFunctionType> _sortFunctionTypes;
-	private List<String> _sortFields;
-	private Map<String,String> _outputAlias;
-
-	/**
-	 * Filed that must be required in filter
-	 *
-	 * @return
-	 */
-	public Set<String> getFilterFields() {
-		return _filterFields;
-	}
-
-	private Set<String> _filterFields;
-	private List<SortOption> _sortOptions;
-	private boolean _hasAgg;
-	private List<String[]> _partitionValues;
-	private boolean _filterIfMissing;
-	private ORExpression _queryExpression;
-	private boolean _outputAll = false;
-
-	public ListQueryCompiler(String query) throws Exception {
-		this(query, false);
-	}
-	
-	public ListQueryCompiler(String query, boolean filterIfMissing) throws Exception{
-		this._filterIfMissing = filterIfMissing;
-		Matcher m = _listPattern.matcher(query);
-		if(m.find()){
-			if(m.groupCount() != 3)
-				throw new IllegalArgumentException("List query syntax is <EntityName>[<Filter>]{<Projection>}");
-			compileCollectionQuery(m);
-			_hasAgg = false;
-			partitionConstraintValidate(query);
-			return;
-		}
-		
-		/** match sort pattern fist, otherwise some sort query will be mismatch as agg pattern */
-		m = _sortPattern.matcher(query);
-		if(m.find()){
-			if(m.groupCount() != 5)
-				throw new IllegalArgumentException("Aggregate query syntax is <EntityName>[<Filter>]<GroupbyFields>{<AggregateFunctions>}.{<SortOptions>}");
-			compileAggregateQuery(m);
-			_hasAgg = true;
-			partitionConstraintValidate(query);
-			return;
-		}
-		
-		m = _aggPattern.matcher(query);
-		if(m.find()){
-			if(m.groupCount() != 4)
-			//if(m.groupCount() < 4 || m.groupCount() > 5)
-				throw new IllegalArgumentException("Aggregate query syntax is <EntityName>[<Filter>]<GroupbyFields>{<AggregateFunctions>}.{<SortOptions>}");
-			compileAggregateQuery(m);
-			_hasAgg = true;
-			partitionConstraintValidate(query);
-			return;
-		}
-		
-		throw new IllegalArgumentException("List query syntax is <EntityName>[<Filter>]{<Projection>} \n Aggregate query syntax is <EntityName>[<Filter>]<GroupbyFields>{<AggregateFunctions>}.{<SortOptions>}");
-	}
-	
-	/**
-	 * TODO: For now we don't support one query to query multiple partitions. In future if partition is defined 
-	 * for the entity, internally We need to spawn multiple queries and send one query for each search condition 
-	 * for each partition
-	 * 
-	 * @param query input query to compile
-	 */
-	private void partitionConstraintValidate(String query) {
-		if (_partitionValues != null && _partitionValues.size() > 1) {
-			final String[] values = _partitionValues.get(0);
-			for (int i = 1; i < _partitionValues.size(); ++i) {
-				final String[] tmpValues = _partitionValues.get(i);
-				for (int j = 0; j < values.length; ++j) {
-					if (values[j] == null || (!values[j].equals(tmpValues[j]))) {
-						final String errMsg = "One query for multiple partitions is NOT allowed for now! Query: " + query;
-						LOG.error(errMsg);
-						throw new IllegalArgumentException(errMsg);
-					}
-				}
-			}
-		}
-	}
-
-	public boolean hasAgg(){
-		return _hasAgg;
-	}
-	
-	public List<String[]> getQueryPartitionValues() {
-		return _partitionValues;
-	}
-	
-	public ORExpression getQueryExpression() {
-		return _queryExpression;
-	}
-	
-	private void checkEntityExistence(String entityName) throws EagleQueryParseException {
-		try {
-			if(EntityDefinitionManager.getEntityByServiceName(entityName) == null)
-				throw new EagleQueryParseException(entityName + " entity does not exist!");
-		} catch (InstantiationException e) {
-			final String errMsg = "Got an InstantiationException: " + e.getMessage();
-			throw new EagleQueryParseException(entityName + " entity does not exist! " + errMsg);
-		} catch (IllegalAccessException e) {
-			final String errMsg = "Got an IllegalAccessException: " + e.getMessage();
-			throw new EagleQueryParseException(entityName + " entity does not exist! " + errMsg);
-		}
-	}
-	
-	public String deleteAtSign(String expression) {
-		return expression.replace("@", "");
-	}
-	
-	private void compileCollectionQuery(Matcher m) throws EagleQueryParseException{
-		_serviceName = m.group(1);
-		checkEntityExistence(_serviceName);
-		if(_outputFields==null) _outputFields = new ArrayList<String>();
-		String qy = m.group(2);
-		_filter = compileQy(qy);
-		String prjFields = m.group(3);
-		String[] tmp = prjFields.split(",");
-		for(String str : tmp){
-			str = str.trim();
-			Matcher fnMatcher = _fnPattern.matcher(str);
-			Matcher expMatcher = _expPattern.matcher(str);
-			if(fnMatcher.find()) {
-				if (fnMatcher.groupCount() == 1)
-					_outputFields.add(fnMatcher.group(1));				
-			}else if(_fnAnyPattern.equals(str)){
-				if(LOG.isDebugEnabled()) LOG.debug("Output all fields");
-				// _outputFields.add(_fnAnyPattern);
-				this._outputAll = true;
-			}else if (expMatcher.find()) {
-				String expr = deleteAtSign(expMatcher.group(1));
-				String alias = expMatcher.group(3);
-				try {
-					String exprContent = TokenConstant.parseExpressionContent(expr);
-					_outputFields.addAll(ExpressionParser.parse(exprContent).getDependentFields());
-					if(alias!=null) {
-						if(_outputAlias == null) _outputAlias = new HashMap<String, String>();
-						_outputAlias.put(exprContent,alias.trim());
-					}
-				} catch (Exception ex){
-					LOG.error("Failed to parse expression: " + expr + ", exception: " + ex.getMessage(), ex);
-				} finally {
-					_outputFields.add(expr);
-				}
-			} else {
-				throw new IllegalArgumentException("Field name syntax must be @<FieldName> or * or Expression in syntax EXP{<Expression>}");
-			}
-		}
-	}
-	
-	private void compileAggregateQuery(Matcher m) throws EagleQueryParseException{
-		_serviceName = m.group(1);
-		checkEntityExistence(_serviceName);
-		String qy = m.group(2);
-		_filter = compileQy(qy);
-		String groupbyFields = m.group(3);
-		// groupbyFields could be empty
-		List<String> groupbyFieldList = null;
-		_groupbyFields = new ArrayList<String>();
-		if(!groupbyFields.isEmpty()){
-			groupbyFieldList = Arrays.asList(groupbyFields.split(","));
-			for(String str : groupbyFieldList){
-				Matcher fnMatcher = _fnPattern.matcher(str.trim());
-				if(!fnMatcher.find() || fnMatcher.groupCount() != 1)
-					throw new IllegalArgumentException("Field name syntax must be @<FieldName>");
-				_groupbyFields.add(fnMatcher.group(1));
-			}
-		}
-		String functions = m.group(4);
-		// functions
-		List<String> functionList = Arrays.asList(functions.split(","));
-		_aggregateFunctionTypes = new ArrayList<AggregateFunctionType>();
-		_aggregateFields = new ArrayList<String>();
-		for(String function : functionList){
-			AggregateFunctionTypeMatcher matcher = AggregateFunctionType.matchAll(function.trim());
-			if(!matcher.find()){
-				throw new IllegalArgumentException("Aggregate function must have format of count|sum|avg|max|min(<fieldname|expression>)");
-			}
-			_aggregateFunctionTypes.add(matcher.type());
-			String aggField = deleteAtSign(matcher.field().trim());
-			try {
-				if(_outputFields == null) _outputFields = new ArrayList<String>();
-				if(TokenConstant.isExpression(aggField)) {
-					_outputFields.addAll(ExpressionParser.parse(TokenConstant.parseExpressionContent(aggField)).getDependentFields());
-				}else{
-					_outputFields.add(aggField);
-				}
-			} catch (Exception ex){
-				LOG.error("Failed to parse expression: " + aggField + ", exception: " + ex.getMessage(), ex);
-			} finally {
-				_aggregateFields.add(aggField);
-			}
-		}
-		
-		// sort options
-		if(m.groupCount() < 5 || m.group(5) == null) // no sort options
-			return;
-		String sortOptions = m.group(5);
-		if(sortOptions != null){
-			LOG.info("SortOptions: " + sortOptions);
-			List<String> sortOptionList = Arrays.asList(sortOptions.split(","));
-			List<String> rawSortFields = new ArrayList<String>();
-			this._sortOptions = SortOptionsParser.parse(groupbyFieldList, functionList, sortOptionList, rawSortFields);
-			this._sortFunctionTypes = new ArrayList<>();
-			this._sortFields = new ArrayList<>();
-			for (String sortField : rawSortFields) {
-				AggregateFunctionTypeMatcher matcher = AggregateFunctionType.matchAll(sortField);
-				if(matcher.find()) {
-					_sortFunctionTypes.add(matcher.type());
-					_sortFields.add(deleteAtSign(matcher.field().trim()));
-				}
-			}
-		}
-	}
-	
-	/**
-	 * 1. syntax level - use antlr to pass the queries
-	 * 2. semantics level - can't distinguish tag or qualifier
-	 * @param qy
-	 * @return
-	 */
-	private Filter compileQy(String qy) throws EagleQueryParseException{
-		try {
-			EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(_serviceName);
-			if(qy == null || qy.isEmpty()){
-				if (ed.getPartitions() == null) {
-					if(LOG.isDebugEnabled()) LOG.warn("Query string is empty, full table scan query: " + qy);
-					// For hbase 0.98+, empty FilterList() will filter all rows, so we need return null instead
-                    return null;
-				} else {
-					final String errMsg = "Entity " + ed.getEntityClass().getSimpleName() + " defined partition, "
-							+ "but query doesn't provide partition condition! Query: " + qy; 
-					LOG.error(errMsg);
-					throw new IllegalArgumentException(errMsg);
-				}
-			}
-			EagleQueryParser parser = new EagleQueryParser(qy);
-			_queryExpression = parser.parse();
-			
-			//TODO: build customize filter for EXP{<Expression>}
-			HBaseFilterBuilder builder = new HBaseFilterBuilder(ed, _queryExpression, _filterIfMissing);
-			FilterList flist = builder.buildFilters();
-			_partitionValues = builder.getPartitionValues();
-			_filterFields = builder.getFilterFields();
-			return flist;
-		} catch (InstantiationException e) {
-			final String errMsg = "Got an InstantiationException: " + e.getMessage();
-			throw new EagleQueryParseException(_serviceName + " entity does not exist! " + errMsg);
-		} catch (IllegalAccessException e) {
-			final String errMsg = "Got an IllegalAccessException: " + e.getMessage();
-			throw new EagleQueryParseException(_serviceName + " entity does not exist! " + errMsg);
-		}
-	}
-	
-	public String serviceName(){
-		return _serviceName;
-	}
-	
-	public List<String> outputFields(){
-		return _outputFields;
-	}
-
-	public Filter filter(){
-		return _filter;
-	}
-	
-	public List<String> groupbyFields(){
-		return _groupbyFields;
-	}
-	
-	public List<AggregateFunctionType> aggregateFunctionTypes(){
-		return _aggregateFunctionTypes;
-	}
-	
-	public List<String> aggregateFields(){
-		return _aggregateFields;
-	}
-	
-	public List<SortOption> sortOptions(){
-		return _sortOptions;
-	}
-
-	public List<AggregateFunctionType> sortFunctions() {
-		return _sortFunctionTypes;
-	}
-	
-	public List<String> sortFields() {
-		return _sortFields;
-	}
-
-	/**
-	 * Output all fields (i.e. has * in out fields)
-	 *
-	 * @return
-	 */
-	public boolean isOutputAll(){ return _outputAll;}
-	public Map<String,String> getOutputAlias(){
-		return _outputAlias;
-	}
-}



[48/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/LICENSE
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/LICENSE b/eagle-assembly/src/main/lib/tomcat/LICENSE
deleted file mode 100644
index 0532f5b..0000000
--- a/eagle-assembly/src/main/lib/tomcat/LICENSE
+++ /dev/null
@@ -1,1050 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
-
-
-
-APACHE TOMCAT SUBCOMPONENTS:
-
-Apache Tomcat includes a number of subcomponents with separate copyright notices
-and license terms. Your use of these subcomponents is subject to the terms and
-conditions of the following licenses.
-
-
-For the ecj-x.x.x.jar component:
-
-Eclipse Public License - v 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
-CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and
-
-b) in the case of each subsequent Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and are
-distributed by that particular Contributor. A Contribution 'originates' from a
-Contributor if it was added to the Program by such Contributor itself or anyone
-acting on such Contributor's behalf. Contributions do not include additions to
-the Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii) are not
-derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents" mean patent claims licensable by a Contributor which are
-necessarily infringed by the use or sale of its Contribution alone or when
-combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide, royalty-free copyright license to
-reproduce, prepare derivative works of, publicly display, publicly perform,
-distribute and sublicense the Contribution of such Contributor, if any, and such
-derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
-Patents to make, use, sell, offer to sell, import and otherwise transfer the
-Contribution of such Contributor, if any, in source code and object code form.
-This patent license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor, such
-addition of the Contribution causes such combination to be covered by the
-Licensed Patents. The patent license shall not apply to any other combinations
-which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to
-its Contributions set forth herein, no assurances are provided by any
-Contributor that the Program does not infringe the patent or other intellectual
-property rights of any other entity. Each Contributor disclaims any liability to
-Recipient for claims brought by any other entity based on infringement of
-intellectual property rights or otherwise. As a condition to exercising the
-rights and licenses granted hereunder, each Recipient hereby assumes sole
-responsibility to secure any other intellectual property rights needed, if any.
-For example, if a third party patent license is required to allow Recipient to
-distribute the Program, it is Recipient's responsibility to acquire that license
-before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its
-own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title and
-non-infringement, and implied warranties or conditions of merchantability and
-fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability for
-damages, including direct, indirect, special, incidental and consequential
-damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are offered by
-that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such Contributor,
-and informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the
-Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if
-any, in a manner that reasonably allows subsequent Recipients to identify the
-originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with
-respect to end users, business partners and the like. While this license is
-intended to facilitate the commercial use of the Program, the Contributor who
-includes the Program in a commercial product offering should do so in a manner
-which does not create potential liability for other Contributors. Therefore, if
-a Contributor includes the Program in a commercial product offering, such
-Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
-every other Contributor ("Indemnified Contributor") against any losses, damages
-and costs (collectively "Losses") arising from claims, lawsuits and other legal
-actions brought by a third party against the Indemnified Contributor to the
-extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may
-participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product
-offering, Product X. That Contributor is then a Commercial Contributor. If that
-Commercial Contributor then makes performance claims, or offers warranties
-related to Product X, those performance claims and warranties are such
-Commercial Contributor's responsibility alone. Under this section, the
-Commercial Contributor would have to defend claims against the other
-Contributors related to those performance claims and warranties, and if a court
-requires any other Contributor to pay any damages as a result, the Commercial
-Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
-IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
-Recipient is solely responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its exercise of
-rights under this Agreement , including but not limited to the risks and costs
-of program errors, compliance with applicable laws, damage to or loss of data,
-programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
-PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
-GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable
-law, it shall not affect the validity or enforceability of the remainder of the
-terms of this Agreement, and without further action by the parties hereto, such
-provision shall be reformed to the minimum extent necessary to make such
-provision valid and enforceable.
-
-If Recipient institutes patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Program itself
-(excluding combinations of the Program with other software or hardware)
-infringes such Recipient's patent(s), then such Recipient's rights granted under
-Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and does
-not cure such failure in a reasonable period of time after becoming aware of
-such noncompliance. If all Recipient's rights under this Agreement terminate,
-Recipient agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient's obligations under this Agreement
-and any licenses granted by Recipient relating to the Program shall continue and
-survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in
-order to avoid inconsistency the Agreement is copyrighted and may only be
-modified in the following manner. The Agreement Steward reserves the right to
-publish new versions (including revisions) of this Agreement from time to time.
-No one other than the Agreement Steward has the right to modify this Agreement.
-The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
-may assign the responsibility to serve as the Agreement Steward to a suitable
-separate entity. Each new version of the Agreement will be given a
-distinguishing version number. The Program (including Contributions) may always
-be distributed subject to the version of the Agreement under which it was
-received. In addition, after a new version of the Agreement is published,
-Contributor may elect to distribute the Program (including its Contributions)
-under the new version. Except as expressly stated in Sections 2(a) and 2(b)
-above, Recipient receives no rights or licenses to the intellectual property of
-any Contributor under this Agreement, whether expressly, by implication,
-estoppel or otherwise. All rights in the Program not expressly granted under
-this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to this
-Agreement will bring a legal action under this Agreement more than one year
-after the cause of action arose. Each party waives its rights to a jury trial in
-any resulting litigation.
-
-
-For the Windows Installer component:
-
-    * All NSIS source code, plug-ins, documentation, examples, header files and
-       graphics, with the exception of the compression modules and where
-       otherwise noted, are licensed under the zlib/libpng license.
-    * The zlib compression module for NSIS is licensed under the zlib/libpng
-       license.
-    * The bzip2 compression module for NSIS is licensed under the bzip2 license.
-    * The lzma compression module for NSIS is licensed under the Common Public
-       License version 1.0.
-
-zlib/libpng license
-
-This software is provided 'as-is', without any express or implied warranty. In
-no event will the authors be held liable for any damages arising from the use of
-this software.
-
-Permission is granted to anyone to use this software for any purpose, including
-commercial applications, and to alter it and redistribute it freely, subject to
-the following restrictions:
-
-   1. The origin of this software must not be misrepresented; you must not claim
-       that you wrote the original software. If you use this software in a
-       product, an acknowledgment in the product documentation would be
-       appreciated but is not required.
-   2. Altered source versions must be plainly marked as such, and must not be
-       misrepresented as being the original software.
-   3. This notice may not be removed or altered from any source distribution.
-
-bzip2 license
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice,
-       this list of conditions and the following disclaimer.
-   2. The origin of this software must not be misrepresented; you must not claim
-       that you wrote the original software. If you use this software in a
-       product, an acknowledgment in the product documentation would be
-       appreciated but is not required.
-   3. Altered source versions must be plainly marked as such, and must not be
-       misrepresented as being the original software.
-   4. The name of the author may not be used to endorse or promote products
-       derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGE.
-
-Julian Seward, Cambridge, UK.
-
-jseward@acm.org
-Common Public License version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
-CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
-a) in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and b) in the case of each subsequent
-Contributor:
-
-i) changes to the Program, and
-
-ii) additions to the Program;
-
-where such changes and/or additions to the Program originate from and are
-distributed by that particular Contributor. A Contribution 'originates' from a
-Contributor if it was added to the Program by such Contributor itself or anyone
-acting on such Contributor's behalf. Contributions do not include additions to
-the Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii) are not
-derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are
-necessarily infringed by the use or sale of its Contribution alone or when
-combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement,
-including all Contributors.
-
-2. GRANT OF RIGHTS
-
-a) Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide, royalty-free copyright license to
-reproduce, prepare derivative works of, publicly display, publicly perform,
-distribute and sublicense the Contribution of such Contributor, if any, and such
-derivative works, in source code and object code form.
-
-b) Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
-Patents to make, use, sell, offer to sell, import and otherwise transfer the
-Contribution of such Contributor, if any, in source code and object code form.
-This patent license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor, such
-addition of the Contribution causes such combination to be covered by the
-Licensed Patents. The patent license shall not apply to any other combinations
-which include the Contribution. No hardware per se is licensed hereunder.
-
-c) Recipient understands that although each Contributor grants the licenses to
-its Contributions set forth herein, no assurances are provided by any
-Contributor that the Program does not infringe the patent or other intellectual
-property rights of any other entity. Each Contributor disclaims any liability to
-Recipient for claims brought by any other entity based on infringement of
-intellectual property rights or otherwise. As a condition to exercising the
-rights and licenses granted hereunder, each Recipient hereby assumes sole
-responsibility to secure any other intellectual property rights needed, if any.
-For example, if a third party patent license is required to allow Recipient to
-distribute the Program, it is Recipient's responsibility to acquire that license
-before distributing the Program.
-
-d) Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its
-own license agreement, provided that:
-
-a) it complies with the terms and conditions of this Agreement; and
-
-b) its license agreement:
-
-i) effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title and
-non-infringement, and implied warranties or conditions of merchantability and
-fitness for a particular purpose;
-
-ii) effectively excludes on behalf of all Contributors all liability for
-damages, including direct, indirect, special, incidental and consequential
-damages, such as lost profits;
-
-iii) states that any provisions which differ from this Agreement are offered by
-that Contributor alone and not by any other party; and
-
-iv) states that source code for the Program is available from such Contributor,
-and informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
-a) it must be made available under this Agreement; and
-
-b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the
-Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if
-any, in a manner that reasonably allows subsequent Recipients to identify the
-originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with
-respect to end users, business partners and the like. While this license is
-intended to facilitate the commercial use of the Program, the Contributor who
-includes the Program in a commercial product offering should do so in a manner
-which does not create potential liability for other Contributors. Therefore, if
-a Contributor includes the Program in a commercial product offering, such
-Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
-every other Contributor ("Indemnified Contributor") against any losses, damages
-and costs (collectively "Losses") arising from claims, lawsuits and other legal
-actions brought by a third party against the Indemnified Contributor to the
-extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor to
-control, and cooperate with the Commercial Contributor in, the defense and any
-related settlement negotiations. The Indemnified Contributor may participate in
-any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product
-offering, Product X. That Contributor is then a Commercial Contributor. If that
-Commercial Contributor then makes performance claims, or offers warranties
-related to Product X, those performance claims and warranties are such
-Commercial Contributor's responsibility alone. Under this section, the
-Commercial Contributor would have to defend claims against the other
-Contributors related to those performance claims and warranties, and if a court
-requires any other Contributor to pay any damages as a result, the Commercial
-Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
-IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
-Recipient is solely responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its exercise of
-rights under this Agreement, including but not limited to the risks and costs of
-program errors, compliance with applicable laws, damage to or loss of data,
-programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
-PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
-GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable
-law, it shall not affect the validity or enforceability of the remainder of the
-terms of this Agreement, and without further action by the parties hereto, such
-provision shall be reformed to the minimum extent necessary to make such
-provision valid and enforceable.
-
-If Recipient institutes patent litigation against a Contributor with respect to
-a patent applicable to software (including a cross-claim or counterclaim in a
-lawsuit), then any patent licenses granted by that Contributor to such Recipient
-under this Agreement shall terminate as of the date such litigation is filed. In
-addition, if Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
-itself (excluding combinations of the Program with other software or hardware)
-infringes such Recipient's patent(s), then such Recipient's rights granted under
-Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to
-comply with any of the material terms or conditions of this Agreement and does
-not cure such failure in a reasonable period of time after becoming aware of
-such noncompliance. If all Recipient's rights under this Agreement terminate,
-Recipient agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient's obligations under this Agreement
-and any licenses granted by Recipient relating to the Program shall continue and
-survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in
-order to avoid inconsistency the Agreement is copyrighted and may only be
-modified in the following manner. The Agreement Steward reserves the right to
-publish new versions (including revisions) of this Agreement from time to time.
-No one other than the Agreement Steward has the right to modify this Agreement.
-IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
-as the Agreement Steward to a suitable separate entity. Each new version of the
-Agreement will be given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the Agreement
-under which it was received. In addition, after a new version of the Agreement
-is published, Contributor may elect to distribute the Program (including its
-Contributions) under the new version. Except as expressly stated in Sections
-2(a) and 2(b) above, Recipient receives no rights or licenses to the
-intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the
-intellectual property laws of the United States of America. No party to this
-Agreement will bring a legal action under this Agreement more than one year
-after the cause of action arose. Each party waives its rights to a jury trial in
-any resulting litigation.
-
-Special exception for LZMA compression module
-
-Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for
-NSIS, expressly permit you to statically or dynamically link your code (or bind
-by name) to the files from the LZMA compression module for NSIS without
-subjecting your linked code to the terms of the Common Public license version
-1.0. Any modifications or additions to files from the LZMA compression module
-for NSIS, however, are subject to the terms of the Common Public License version
-1.0.
-
-
-For the following XML Schemas for Java EE Deployment Descriptors:
- - javaee_5.xsd
- - javaee_web_services_1_2.xsd
- - javaee_web_services_client_1_2.xsd
- - javaee_6.xsd
- - javaee_web_services_1_3.xsd
- - javaee_web_services_client_1_3.xsd
- - jsp_2_2.xsd
- - web-app_3_0.xsd
- - web-common_3_0.xsd
- - web-fragment_3_0.xsd
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-   1.1. Contributor. means each individual or entity that creates or contributes
-        to the creation of Modifications.
-
-   1.2. Contributor Version. means the combination of the Original Software,
-        prior Modifications used by a Contributor (if any), and the
-        Modifications made by that particular Contributor.
-
-   1.3. Covered Software. means (a) the Original Software, or (b) Modifications,
-        or (c) the combination of files containing Original Software with files
-        containing Modifications, in each case including portions thereof.
-
-   1.4. Executable. means the Covered Software in any form other than Source
-        Code.
-
-   1.5. Initial Developer. means the individual or entity that first makes
-        Original Software available under this License.
-
-   1.6. Larger Work. means a work which combines Covered Software or portions
-        thereof with code not governed by the terms of this License.
-
-   1.7. License. means this document.
-
-   1.8. Licensable. means having the right to grant, to the maximum extent
-        possible, whether at the time of the initial grant or subsequently
-        acquired, any and all of the rights conveyed herein.
-
-   1.9. Modifications. means the Source Code and Executable form of any of the
-        following:
-
-        A. Any file that results from an addition to, deletion from or
-           modification of the contents of a file containing Original Software
-           or previous Modifications;
-
-        B. Any new file that contains any part of the Original Software or
-           previous Modification; or
-
-        C. Any new file that is contributed or otherwise made available under
-           the terms of this License.
-
-   1.10. Original Software. means the Source Code and Executable form of
-         computer software code that is originally released under this License.
-
-   1.11. Patent Claims. means any patent claim(s), now owned or hereafter
-         acquired, including without limitation, method, process, and apparatus
-         claims, in any patent Licensable by grantor.
-
-   1.12. Source Code. means (a) the common form of computer software code in
-         which modifications are made and (b) associated documentation included
-         in or with such code.
-
-   1.13. You. (or .Your.) means an individual or a legal entity exercising
-         rights under, and complying with all of the terms of, this License. For
-         legal entities, .You. includes any entity which controls, is controlled
-         by, or is under common control with You. For purposes of this
-         definition, .control. means (a) the power, direct or indirect, to cause
-         the direction or management of such entity, whether by contract or
-         otherwise, or (b) ownership of more than fifty percent (50%) of the
-         outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-      2.1. The Initial Developer Grant.
-
-      Conditioned upon Your compliance with Section 3.1 below and subject to
-      third party intellectual property claims, the Initial Developer hereby
-      grants You a world-wide, royalty-free, non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or trademark)
-            Licensable by Initial Developer, to use, reproduce, modify, display,
-            perform, sublicense and distribute the Original Software (or
-            portions thereof), with or without Modifications, and/or as part of
-            a Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using or selling of
-            Original Software, to make, have made, use, practice, sell, and
-            offer for sale, and/or otherwise dispose of the Original Software
-            (or portions thereof).
-
-        (c) The licenses granted in Sections 2.1(a) and (b) are effective on the
-            date Initial Developer first distributes or otherwise makes the
-            Original Software available to a third party under the terms of this
-            License.
-
-        (d) Notwithstanding Section 2.1(b) above, no patent license is granted:
-            (1) for code that You delete from the Original Software, or (2) for
-            infringements caused by: (i) the modification of the Original
-            Software, or (ii) the combination of the Original Software with
-            other software or devices.
-
-    2.2. Contributor Grant.
-
-    Conditioned upon Your compliance with Section 3.1 below and subject to third
-    party intellectual property claims, each Contributor hereby grants You a
-    world-wide, royalty-free, non-exclusive license:
-
-        (a) under intellectual property rights (other than patent or trademark)
-            Licensable by Contributor to use, reproduce, modify, display,
-            perform, sublicense and distribute the Modifications created by such
-            Contributor (or portions thereof), either on an unmodified basis,
-            with other Modifications, as Covered Software and/or as part of a
-            Larger Work; and
-
-        (b) under Patent Claims infringed by the making, using, or selling of
-            Modifications made by that Contributor either alone and/or in
-            combination with its Contributor Version (or portions of such
-            combination), to make, use, sell, offer for sale, have made, and/or
-            otherwise dispose of: (1) Modifications made by that Contributor (or
-            portions thereof); and (2) the combination of Modifications made by
-            that Contributor with its Contributor Version (or portions of such
-            combination).
-
-        (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on
-            the date Contributor first distributes or otherwise makes the
-            Modifications available to a third party.
-
-        (d) Notwithstanding Section 2.2(b) above, no patent license is granted:
-            (1) for any code that Contributor has deleted from the Contributor
-            Version; (2) for infringements caused by: (i) third party
-            modifications of Contributor Version, or (ii) the combination of
-            Modifications made by that Contributor with other software (except
-            as part of the Contributor Version) or other devices; or (3) under
-            Patent Claims infringed by Covered Software in the absence of
-            Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-      3.1. Availability of Source Code.
-      Any Covered Software that You distribute or otherwise make available in
-      Executable form must also be made available in Source Code form and that
-      Source Code form must be distributed only under the terms of this License.
-      You must include a copy of this License with every copy of the Source Code
-      form of the Covered Software You distribute or otherwise make available.
-      You must inform recipients of any such Covered Software in Executable form
-      as to how they can obtain such Covered Software in Source Code form in a
-      reasonable manner on or through a medium customarily used for software
-      exchange.
-
-      3.2. Modifications.
-      The Modifications that You create or to which You contribute are governed
-      by the terms of this License. You represent that You believe Your
-      Modifications are Your original creation(s) and/or You have sufficient
-      rights to grant the rights conveyed by this License.
-
-      3.3. Required Notices.
-      You must include a notice in each of Your Modifications that identifies
-      You as the Contributor of the Modification. You may not remove or alter
-      any copyright, patent or trademark notices contained within the Covered
-      Software, or any notices of licensing or any descriptive text giving
-      attribution to any Contributor or the Initial Developer.
-
-      3.4. Application of Additional Terms.
-      You may not offer or impose any terms on any Covered Software in Source
-      Code form that alters or restricts the applicable version of this License
-      or the recipients. rights hereunder. You may choose to offer, and to
-      charge a fee for, warranty, support, indemnity or liability obligations to
-      one or more recipients of Covered Software. However, you may do so only on
-      Your own behalf, and not on behalf of the Initial Developer or any
-      Contributor. You must make it absolutely clear that any such warranty,
-      support, indemnity or liability obligation is offered by You alone, and
-      You hereby agree to indemnify the Initial Developer and every Contributor
-      for any liability incurred by the Initial Developer or such Contributor as
-      a result of warranty, support, indemnity or liability terms You offer.
-
-      3.5. Distribution of Executable Versions.
-      You may distribute the Executable form of the Covered Software under the
-      terms of this License or under the terms of a license of Your choice,
-      which may contain terms different from this License, provided that You are
-      in compliance with the terms of this License and that the license for the
-      Executable form does not attempt to limit or alter the recipient.s rights
-      in the Source Code form from the rights set forth in this License. If You
-      distribute the Covered Software in Executable form under a different
-      license, You must make it absolutely clear that any terms which differ
-      from this License are offered by You alone, not by the Initial Developer
-      or Contributor. You hereby agree to indemnify the Initial Developer and
-      every Contributor for any liability incurred by the Initial Developer or
-      such Contributor as a result of any such terms You offer.
-
-      3.6. Larger Works.
-      You may create a Larger Work by combining Covered Software with other code
-      not governed by the terms of this License and distribute the Larger Work
-      as a single product. In such a case, You must make sure the requirements
-      of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-      4.1. New Versions.
-      Sun Microsystems, Inc. is the initial license steward and may publish
-      revised and/or new versions of this License from time to time. Each
-      version will be given a distinguishing version number. Except as provided
-      in Section 4.3, no one other than the license steward has the right to
-      modify this License.
-
-      4.2. Effect of New Versions.
-      You may always continue to use, distribute or otherwise make the Covered
-      Software available under the terms of the version of the License under
-      which You originally received the Covered Software. If the Initial
-      Developer includes a notice in the Original Software prohibiting it from
-      being distributed or otherwise made available under any subsequent version
-      of the License, You must distribute and make the Covered Software
-      available under the terms of the version of the License under which You
-      originally received the Covered Software. Otherwise, You may also choose
-      to use, distribute or otherwise make the Covered Software available under
-      the terms of any subsequent version of the License published by the
-      license steward.
-
-      4.3. Modified Versions.
-      When You are an Initial Developer and You want to create a new license for
-      Your Original Software, You may create and use a modified version of this
-      License if You: (a) rename the license and remove any references to the
-      name of the license steward (except to note that the license differs from
-      this License); and (b) otherwise make it clear that the license contains
-      terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-   COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN .AS IS. BASIS, WITHOUT
-   WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-   LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS,
-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK
-   AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD
-   ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL
-   DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-   SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-   ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED
-   HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-      6.1. This License and the rights granted hereunder will terminate
-           automatically if You fail to comply with terms herein and fail to
-           cure such breach within 30 days of becoming aware of the breach.
-           Provisions which, by their nature, must remain in effect beyond the
-           termination of this License shall survive.
-
-      6.2. If You assert a patent infringement claim (excluding declaratory
-           judgment actions) against Initial Developer or a Contributor (the
-           Initial Developer or Contributor against whom You assert such claim
-           is referred to as .Participant.) alleging that the Participant
-           Software (meaning the Contributor Version where the Participant is a
-           Contributor or the Original Software where the Participant is the
-           Initial Developer) directly or indirectly infringes any patent, then
-           any and all rights granted directly or indirectly to You by such
-           Participant, the Initial Developer (if the Initial Developer is not
-           the Participant) and all Contributors under Sections 2.1 and/or 2.2
-           of this License shall, upon 60 days notice from Participant terminate
-           prospectively and automatically at the expiration of such 60 day
-           notice period, unless if within such 60 day period You withdraw Your
-           claim with respect to the Participant Software against such
-           Participant either unilaterally or pursuant to a written agreement
-           with Participant.
-
-      6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
-           user licenses that have been validly granted by You or any
-           distributor hereunder prior to termination (excluding licenses
-           granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-   UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
-   NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
-   OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF
-   ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
-   INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-   LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
-   COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
-   LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
-   SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR
-   DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY.S NEGLIGENCE TO THE EXTENT
-   APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-   EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS
-   EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-   The Covered Software is a .commercial item,. as that term is defined in 48
-   C.F.R. 2.101 (Oct. 1995), consisting of .commercial computer software. (as
-   that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and commercial
-   computer software documentation. as such terms are used in 48 C.F.R. 12.212
-   (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-   through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered
-   Software with only those rights set forth herein. This U.S. Government Rights
-   clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or
-   provision that addresses Government rights in computer software under this
-   License.
-
-9. MISCELLANEOUS.
-
-   This License represents the complete agreement concerning subject matter
-   hereof. If any provision of this License is held to be unenforceable, such
-   provision shall be reformed only to the extent necessary to make it
-   enforceable. This License shall be governed by the law of the jurisdiction
-   specified in a notice contained within the Original Software (except to the
-   extent applicable law, if any, provides otherwise), excluding such
-   jurisdiction's conflict-of-law provisions. Any litigation relating to this
-   License shall be subject to the jurisdiction of the courts located in the
-   jurisdiction and venue specified in a notice contained within the Original
-   Software, with the losing party responsible for costs, including, without
-   limitation, court costs and reasonable attorneys. fees and expenses. The
-   application of the United Nations Convention on Contracts for the
-   International Sale of Goods is expressly excluded. Any law or regulation
-   which provides that the language of a contract shall be construed against
-   the drafter shall not apply to this License. You agree that You alone are
-   responsible for compliance with the United States export administration
-   regulations (and the export control laws and regulation of any other
-   countries) when You use, distribute or otherwise make available any Covered
-   Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-   As between Initial Developer and the Contributors, each party is responsible
-   for claims and damages arising, directly or indirectly, out of its
-   utilization of rights under this License and You agree to work with Initial
-   Developer and Contributors to distribute such responsibility on an equitable
-   basis. Nothing herein is intended or shall be deemed to constitute any
-   admission of liability.
-
-   NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
-   LICENSE (CDDL)
-
-   The code released under the CDDL shall be governed by the laws of the State
-   of California (excluding conflict-of-law provisions). Any litigation relating
-   to this License shall be subject to the jurisdiction of the Federal Courts of
-   the Northern District of California and the state courts of the State of
-   California, with venue lying in Santa Clara County, California.
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/NOTICE
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/NOTICE b/eagle-assembly/src/main/lib/tomcat/NOTICE
deleted file mode 100644
index e610066..0000000
--- a/eagle-assembly/src/main/lib/tomcat/NOTICE
+++ /dev/null
@@ -1,36 +0,0 @@
-Apache Tomcat
-Copyright 1999-2015 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-The Windows Installer is built with the Nullsoft
-Scriptable Install System (NSIS), which is
-open source software.  The original software and
-related information is available at
-http://nsis.sourceforge.net.
-
-Java compilation software for JSP pages is provided by Eclipse,
-which is open source software.  The original software and
-related information is available at
-http://www.eclipse.org.
-
-For the bayeux implementation
-The org.apache.cometd.bayeux API is derivative work originating at the Dojo Foundation
-* Copyright 2007-2008 Guy Molinari
-* Copyright 2007-2008 Filip Hanik
-* Copyright 2007 Dojo Foundation
-* Copyright 2007 Mort Bay Consulting Pty. Ltd.
-
-The original XML Schemas for Java EE Deployment Descriptors:
- - javaee_5.xsd
- - javaee_web_services_1_2.xsd
- - javaee_web_services_client_1_2.xsd
- - javaee_6.xsd
- - javaee_web_services_1_3.xsd
- - javaee_web_services_client_1_3.xsd
- - jsp_2_2.xsd
- - web-app_3_0.xsd
- - web-common_3_0.xsd
- - web-fragment_3_0.xsd
-may be obtained from http://java.sun.com/xml/ns/javaee/

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/RELEASE-NOTES
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/RELEASE-NOTES b/eagle-assembly/src/main/lib/tomcat/RELEASE-NOTES
deleted file mode 100644
index 8dda10b..0000000
--- a/eagle-assembly/src/main/lib/tomcat/RELEASE-NOTES
+++ /dev/null
@@ -1,230 +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.
-================================================================================
-
-
-                     Apache Tomcat Version 7.0.59
-                            Release Notes
-
-
-=========
-CONTENTS:
-=========
-
-* Dependency Changes
-* API Stability
-* JNI Based Applications
-* Bundled APIs
-* Web application reloading and static fields in shared libraries
-* Tomcat on Linux
-* Enabling SSI and CGI Support
-* Security manager URLs
-* Symlinking static resources
-* Viewing the Tomcat Change Log
-* Cryptographic software notice
-* When all else fails
-
-
-===================
-Dependency Changes:
-===================
-Tomcat 7.0 is designed to run on Java SE 6 and later.
-
-In addition, Tomcat 7.0 uses the Eclipse JDT Java compiler for
-compiling JSP pages.  This means you no longer need to have the complete
-Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment
-(JRE) is sufficient.  The Eclipse JDT Java compiler is bundled with the
-binary Tomcat distributions.  Tomcat can also be configured to use the
-compiler from the JDK to compile JSPs, or any other Java compiler supported
-by Apache Ant.
-
-
-==============
-API Stability:
-==============
-The public interfaces for the following classes are fixed and will not be
-changed at all during the remaining lifetime of the 7.x series:
-- javax/**/*
-
-The public interfaces for the following classes may be added to in order to
-resolve bugs and/or add new features. No existing interface will be removed or
-changed although it may be deprecated.
-- org/apache/catalina/*
-- org/apache/catalina/comet/*
-
-Note: As Tomcat 7 matures, the above list will be added to. The list is not
-      considered complete at this time.
-
-The remaining classes are considered part of the Tomcat internals and may change
-without notice between point releases.
-
-
-=======================
-JNI Based Applications:
-=======================
-Applications that require native libraries must ensure that the libraries have
-been loaded prior to use.  Typically, this is done with a call like:
-
-  static {
-    System.loadLibrary("path-to-library-file");
-  }
-
-in some class.  However, the application must also ensure that the library is
-not loaded more than once.  If the above code were placed in a class inside
-the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the
-application were reloaded, the loadLibrary() call would be attempted a second
-time.
-
-To avoid this problem, place classes that load native libraries outside of the
-web application, and ensure that the loadLibrary() call is executed only once
-during the lifetime of a particular JVM.
-
-
-=============
-Bundled APIs:
-=============
-A standard installation of Tomcat 7.0 makes all of the following APIs available
-for use by web applications (by placing them in "lib"):
-* annotations-api.jar (Annotations package)
-* catalina.jar (Tomcat Catalina implementation)
-* catalina-ant.jar (Tomcat Catalina Ant tasks)
-* catalina-ha.jar (High availability package)
-* catalina-tribes.jar (Group communication)
-* ecj-4.4.jar (Eclipse JDT Java compiler)
-* el-api.jar (EL 2.2 API)
-* jasper.jar (Jasper 2 Compiler and Runtime)
-* jasper-el.jar (Jasper 2 EL implementation)
-* jsp-api.jar (JSP 2.2 API)
-* servlet-api.jar (Servlet 3.0 API)
-* tomcat7-websocket.jar (WebSocket 1.1 implementation)
-* tomcat-api.jar (Interfaces shared by Catalina and Jasper)
-* tomcat-coyote.jar (Tomcat connectors and utility classes)
-* tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP)
-* tomcat-jdbc.jar (Tomcat's database connection pooling solution)
-* tomcat-util.jar (Various utilities)
-* websocket-api.jar (WebSocket 1.1 API)
-
-You can make additional APIs available to all of your web applications by
-putting unpacked classes into a "classes" directory (not created by default),
-or by placing them in JAR files in the "lib" directory.
-
-To override the XML parser implementation or interfaces, use the endorsed
-mechanism of the JVM. The default configuration defines JARs located in
-"endorsed" as endorsed.
-
-
-================================================================
-Web application reloading and static fields in shared libraries:
-================================================================
-Some shared libraries (many are part of the JDK) keep references to objects
-instantiated by the web application. To avoid class loading related problems
-(ClassCastExceptions, messages indicating that the classloader
-is stopped, etc.), the shared libraries state should be reinitialized.
-
-Something which might help is to avoid putting classes which would be
-referenced by a shared static field in the web application classloader,
-and putting them in the shared classloader instead (JARs should be put in the
-"lib" folder, and classes should be put in the "classes" folder).
-
-
-================
-Tomcat on Linux:
-================
-GLIBC 2.2 / Linux 2.4 users should define an environment variable:
-export LD_ASSUME_KERNEL=2.2.5
-
-Redhat Linux 9.0 users should use the following setting to avoid
-stability problems:
-export LD_ASSUME_KERNEL=2.4.1
-
-There are some Linux bugs reported against the NIO sendfile behavior, make sure you
-have a JDK that is up to date, or disable sendfile behavior in the Connector.<br/>
-6427312: (fc) FileChannel.transferTo() throws IOException "system call interrupted"<br/>
-5103988: (fc) FileChannel.transferTo should return -1 for EAGAIN instead throws IOException<br/>
-6253145: (fc) FileChannel.transferTo on Linux fails when going beyond 2GB boundary<br/>
-6470086: (fc) FileChannel.transferTo(2147483647, 1, channel) cause "Value too large" exception<br/>
-
-
-=============================
-Enabling SSI and CGI Support:
-=============================
-Because of the security risks associated with CGI and SSI available
-to web applications, these features are disabled by default.  
-
-To enable and configure CGI support, please see the cgi-howto.html page.
-
-To enable and configue SSI support, please see the ssi-howto.html page.
-
-
-======================
-Security manager URLs:
-======================
-In order to grant security permissions to JARs located inside the
-web application repository, use URLs of of the following format
-in your policy file:
-
-file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar
-
-
-============================
-Symlinking static resources:
-============================
-By default, Unix symlinks will not work when used in a web application to link
-resources located outside the web application root directory.
-
-This behavior is optional, and the "allowLinking" flag may be used to disable
-the check.
-
-
-==============================
-Viewing the Tomcat Change Log:
-==============================
-See changelog.html in this directory.
-
-
-=============================
-Cryptographic software notice
-=============================
-This distribution includes cryptographic software.  The country in
-which you currently reside may have restrictions on the import,
-possession, use, and/or re-export to another country, of
-encryption software.  BEFORE using any encryption software, please
-check your country's laws, regulations and policies concerning the
-import, possession, or use, and re-export of encryption software, to
-see if this is permitted.  See <http://www.wassenaar.org/> for more
-information.
-
-The U.S. Government Department of Commerce, Bureau of Industry and
-Security (BIS), has classified this software as Export Commodity
-Control Number (ECCN) 5D002.C.1, which includes information security
-software using or performing cryptographic functions with asymmetric
-algorithms.  The form and manner of this Apache Software Foundation
-distribution makes it eligible for export under the License Exception
-ENC Technology Software Unrestricted (TSU) exception (see the BIS
-Export Administration Regulations, Section 740.13) for both object
-code and source code.
-
-The following provides more details on the included cryptographic
-software:
-  - Tomcat includes code designed to work with JSSE
-  - Tomcat includes code designed to work with OpenSSL
-
-
-====================
-When all else fails:
-====================
-See the FAQ
-http://tomcat.apache.org/faq/

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/RUNNING.txt
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/RUNNING.txt b/eagle-assembly/src/main/lib/tomcat/RUNNING.txt
deleted file mode 100644
index 3b2854e..0000000
--- a/eagle-assembly/src/main/lib/tomcat/RUNNING.txt
+++ /dev/null
@@ -1,478 +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.
-================================================================================
-
-            ===================================================
-            Running The Apache Tomcat 7.0 Servlet/JSP Container
-            ===================================================
-
-Apache Tomcat 7.0 requires a Java Standard Edition Runtime
-Environment (JRE) version 6 or later.
-
-=============================
-Running With JRE 6 Or Later
-=============================
-
-(1) Download and Install a Java SE Runtime Environment (JRE)
-
-(1.1) Download a Java SE Runtime Environment (JRE),
-      release version 6 or later, from
-      http://www.oracle.com/technetwork/java/javase/downloads/index.html
-
-(1.2) Install the JRE according to the instructions included with the
-      release.
-
-      You may also use a full Java Development Kit (JDK) rather than just
-      a JRE.
-
-
-(2) Download and Install Apache Tomcat
-
-(2.1) Download a binary distribution of Tomcat from:
-
-      http://tomcat.apache.org/
-
-(2.2) Unpack the binary distribution so that it resides in its own
-      directory (conventionally named "apache-tomcat-[version]").
-
-      For the purposes of the remainder of this document, the name
-      "CATALINA_HOME" is used to refer to the full pathname of that
-      directory.
-
-NOTE:  As an alternative to downloading a binary distribution, you can
-create your own from the Tomcat source code, as described in
-"BUILDING.txt".  You can either
-
-  a)  Do the full "release" build and find the created distribution in the
-      "output/release" directory and then proceed with unpacking as above, or
-
-  b)  Do a simple build and use the "output/build" directory as
-      "CATALINA_HOME".  Be warned that there are some differences between the
-      contents of the "output/build" directory and a full "release"
-      distribution.
-
-
-(3) Configure Environment Variables
-
-Tomcat is a Java application and does not use environment variables. The
-variables are used by the Tomcat startup scripts. The scripts use the variables
-to prepare the command that starts Tomcat.
-
-(3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional)
-
-The CATALINA_HOME environment variable should be set to the location of the
-root directory of the "binary" distribution of Tomcat.
-
-An example was given in (2.2) above.
-
-The Tomcat startup scripts have some logic to set this variable
-automatically if it is absent, based on the location of the startup script
-in *nix and on the current directory in Windows. That logic might not work
-in all circumstances, so setting the variable explicitly is recommended.
-
-The CATALINA_BASE environment variable specifies location of the root
-directory of the "active configuration" of Tomcat. It is optional. It
-defaults to be equal to CATALINA_HOME.
-
-Using distinct values for the CATALINA_HOME and CATALINA_BASE variables is
-recommended to simplify further upgrades and maintenance. It is documented
-in the "Multiple Tomcat Instances" section below.
-
-
-(3.2) Set JRE_HOME or JAVA_HOME (required)
-
-These variables are used to specify location of a Java Runtime
-Environment or of a Java Development Kit that is used to start Tomcat.
-
-The JRE_HOME variable is used to specify location of a JRE. The JAVA_HOME
-variable is used to specify location of a JDK.
-
-Using JAVA_HOME provides access to certain additional startup options that
-are not allowed when JRE_HOME is used.
-
-If both JRE_HOME and JAVA_HOME are specified, JRE_HOME is used.
-
-The recommended place to specify these variables is a "setenv" script. See
-below.
-
-
-(3.3) Other variables (optional)
-
-Other environment variables exist, besides the four described above.
-See the comments at the top of catalina.bat or catalina.sh scripts for
-the list and a description of each of them.
-
-One frequently used variable is CATALINA_OPTS. It allows specification of
-additional options for the java command that starts Tomcat.
-
-See the Java documentation for the options that affect the Java Runtime
-Environment.
-
-See the "System Properties" page in the Tomcat Configuration Reference for
-the system properties that are specific to Tomcat.
-
-A similar variable is JAVA_OPTS. It is used less frequently. It allows
-specification of options that are used both to start and to stop Tomcat as well
-as for other commands.
-
-Note: Do not use JAVA_OPTS to specify memory limits. You do not need much
-memory for a small process that is used to stop Tomcat. Those settings
-belong to CATALINA_OPTS.
-
-Another frequently used variable is CATALINA_PID (on *nix only). It
-specifies the location of the file where process id of the forked Tomcat
-java process will be written. This setting is optional. It will enable the
-following features:
-
- *  better protection against duplicate start attempts and
- *  allows forceful termination of Tomcat process when it does not react to
-    the standard shutdown command.
-
-
-(3.4) Using the "setenv" script (optional, recommended)
-
-Apart from CATALINA_HOME and CATALINA_BASE, all environment variables can
-be specified in the "setenv" script. The script is placed either into
-CATALINA_BASE/bin or into CATALINA_HOME/bin directory and is named
-setenv.bat (on Windows) or setenv.sh (on *nix). The file has to be
-readable.
-
-By default the setenv script file is absent. If the script file is present
-both in CATALINA_BASE and in CATALINA_HOME, the one in CATALINA_BASE is
-preferred.
-
-For example, to configure the JRE_HOME and CATALINA_PID variables you can
-create the following script file:
-
-On Windows, %CATALINA_BASE%\bin\setenv.bat:
-
-  set "JRE_HOME=%ProgramFiles%\Java\jre6"
-  exit /b 0
-
-On *nix, $CATALINA_BASE/bin/setenv.sh:
-
-  JRE_HOME=/usr/java/latest
-  CATALINA_PID="$CATALINA_BASE/tomcat.pid"
-
-
-The CATALINA_HOME and CATALINA_BASE variables cannot be configured in the
-setenv script, because they are used to locate that file.
-
-All the environment variables described here and the "setenv" script are
-used only if you use the standard scripts to launch Tomcat. For example, if
-you have installed Tomcat as a service on Windows, the service wrapper
-launches Java directly and does not use the script files.
-
-
-(4) Start Up Tomcat
-
-(4.1) Tomcat can be started by executing one of the following commands:
-
-  On Windows:
-
-      %CATALINA_HOME%\bin\startup.bat
-
-    or
-
-      %CATALINA_HOME%\bin\catalina.bat start
-
-  On *nix:
-
-      $CATALINA_HOME/bin/startup.sh
-
-    or
-
-      $CATALINA_HOME/bin/catalina.sh start
-
-(4.2) After startup, the default web applications included with Tomcat will be
-      available by visiting:
-
-      http://localhost:8080/
-
-(4.3) Further information about configuring and running Tomcat can be found in
-      the documentation included here, as well as on the Tomcat web site:
-
-      http://tomcat.apache.org/
-
-
-(5) Shut Down Tomcat
-
-(5.1) Tomcat can be shut down by executing one of the following commands:
-
-  On Windows:
-
-      %CATALINA_HOME%\bin\shutdown.bat
-
-    or
-
-      %CATALINA_HOME%\bin\catalina.bat stop
-
-  On *nix:
-
-      $CATALINA_HOME/bin/shutdown.sh
-
-    or
-
-      $CATALINA_HOME/bin/catalina.sh stop
-
-==================================================
-Advanced Configuration - Multiple Tomcat Instances
-==================================================
-
-In many circumstances, it is desirable to have a single copy of a Tomcat
-binary distribution shared among multiple users on the same server.  To make
-this possible, you can set the CATALINA_BASE environment variable to the
-directory that contains the files for your 'personal' Tomcat instance.
-
-When running with a separate CATALINA_HOME and CATALINA_BASE, the files
-and directories are split as following:
-
-In CATALINA_BASE:
-
- * bin  - Only the following files:
-
-           * setenv.sh (*nix) or setenv.bat (Windows),
-           * tomcat-juli.jar
-
-          The setenv scripts were described above. The tomcat-juli library
-          is documented in the Logging chapter in the User Guide.
-
- * conf - Server configuration files (including server.xml)
-
- * lib  - Libraries and classes, as explained below
-
- * logs - Log and output files
-
- * webapps - Automatically loaded web applications
-
- * work - Temporary working directories for web applications
-
- * temp - Directory used by the JVM for temporary files (java.io.tmpdir)
-
-
-In CATALINA_HOME:
-
- * bin  - Startup and shutdown scripts
-
-          The following files will be used only if they are absent in
-          CATALINA_BASE/bin:
-
-          setenv.sh (*nix), setenv.bat (Windows), tomcat-juli.jar
-
- * lib  - Libraries and classes, as explained below
-
- * endorsed - Libraries that override standard "Endorsed Standards"
-              libraries provided by JRE. See Classloading documentation
-              in the User Guide for details.
-
-              By default this "endorsed" directory is absent.
-
-In the default configuration the JAR libraries and classes both in
-CATALINA_BASE/lib and in CATALINA_HOME/lib will be added to the common
-classpath, but the ones in CATALINA_BASE will be added first and thus will
-be searched first.
-
-The idea is that you may leave the standard Tomcat libraries in
-CATALINA_HOME/lib and add other ones such as database drivers into
-CATALINA_BASE/lib.
-
-In general it is advised to never share libraries between web applications,
-but put them into WEB-INF/lib directories inside the applications. See
-Classloading documentation in the User Guide for details.
-
-
-It might be useful to note that the values of CATALINA_HOME and
-CATALINA_BASE can be referenced in the XML configuration files processed
-by Tomcat as ${catalina.home} and ${catalina.base} respectively.
-
-For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
-
- * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
-   file as CATALINA_BASE/conf/Catalina/localhost/manager.xml
-
- * Add docBase attribute as shown below.
-
-The file will look like the following:
-
-  <?xml version="1.0" encoding="UTF-8"?>
-  <Context docBase="${catalina.home}/webapps/manager"
-    antiResourceLocking="false" privileged="true" >
-    <Valve className="org.apache.catalina.valves.RemoteAddrValve"
-         allow="127\.0\.0\.1" />
-  </Context>
-
-See Deployer chapter in User Guide and Context and Host chapters in the
-Configuration Reference for more information on contexts and web
-application deployment.
-
-
-================
-Troubleshooting
-================
-
-There are only really 2 things likely to go wrong during the stand-alone
-Tomcat install:
-
-(1) The most common hiccup is when another web server (or any process for that
-    matter) has laid claim to port 8080.  This is the default HTTP port that
-    Tomcat attempts to bind to at startup.  To change this, open the file:
-
-       $CATALINA_HOME/conf/server.xml
-
-    and search for '8080'.  Change it to a port that isn't in use, and is
-    greater than 1024, as ports less than or equal to 1024 require superuser
-    access to bind under UNIX.
-
-    Restart Tomcat and you're in business.  Be sure that you replace the "8080"
-    in the URL you're using to access Tomcat.  For example, if you change the
-    port to 1977, you would request the URL http://localhost:1977/ in your
-    browser.
-
-(2) The 'localhost' machine isn't found.  This could happen if you're behind a
-    proxy.  If that's the case, make sure the proxy configuration for your
-    browser knows that you shouldn't be going through the proxy to access the
-    "localhost".
-
-    In Firefox, this is under Tools/Preferences -> Advanced/Network ->
-    Connection -> Settings..., and in Internet Explorer it is Tools ->
-    Internet Options -> Connections -> LAN Settings.
-
-
-====================
-Optional Components
-====================
-
-The following optional components may be included with the Apache Tomcat binary
-distribution. If they are not included, you can install them separately.
-
- 1. Apache Tomcat Native library
-
- 2. Apache Commons Daemon service launcher
-
-Both of them are implemented in C language and as such have to be compiled
-into binary code. The binary code will be specific for a platform and CPU
-architecture and it must match the Java Runtime Environment executables
-that will be used to launch Tomcat.
-
-The Windows-specific binary distributions of Apache Tomcat include binary
-files for these components. On other platforms you would have to look for
-binary versions elsewhere or compile them yourself.
-
-If you are new to Tomcat, do not bother with these components to start with.
-If you do use them, do not forget to read their documentation.
-
-
-Apache Tomcat Native library
------------------------------
-
-It is a library that allows to use the "Apr" variant of HTTP and AJP
-protocol connectors in Apache Tomcat. It is built around OpenSSL and Apache
-Portable Runtime (APR) libraries. Those are the same libraries as used by
-Apache HTTPD Server project.
-
-This feature was especially important in the old days when Java performance
-was poor. It is less important nowadays, but it is still used and respected
-by many. See Tomcat documentation for more details.
-
-For further reading:
-
- - Apache Tomcat documentation
-
-    * Documentation for APR/Native library in the Tomcat User's Guide
-
-      http://tomcat.apache.org/tomcat-7.0-doc/apr.html
-
-    * Documentation for the HTTP and AJP protocol connectors in the Tomcat
-      Configuration Reference
-
-      http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
-
-      http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html
-
- - Apache Tomcat Native project home
-
-      http://tomcat.apache.org/native-doc/
-
- - Other projects
-
-    * OpenSSL
-
-      http://openssl.org/
-
-    * Apache Portable Runtime
-
-      http://apr.apache.org/
-
-    * Apache HTTP Server
-
-      http://httpd.apache.org/
-
-To disable Apache Tomcat Native library:
-
- - To disable Apache Tomcat Native library when it is installed, or
- - To remove the warning that is logged during Tomcat startup when the
-   library is not installed:
-
-   Edit the "conf/server.xml" file and remove "AprLifecycleListener" from
-   it.
-
-The binary file of Apache Tomcat Native library is usually named
-
-  - "tcnative-1.dll" on Windows
-  - "libtcnative-1.so" on *nix systems
-
-
-Apache Commons Daemon
-----------------------
-
-Apache Commons Daemon project provides wrappers that can be used to
-install Apache Tomcat as a service on Windows or as a daemon on *nix
-systems.
-
-The Windows-specific implementation of Apache Commons Daemon is called
-"procrun". The *nix-specific one is called "jsvc".
-
-For further reading:
-
- - Apache Commons Daemon project
-
-      http://commons.apache.org/daemon/
-
- - Apache Tomcat documentation
-
-    * Installing Apache Tomcat
-
-      http://tomcat.apache.org/tomcat-7.0-doc/setup.html
-
-    * Windows service HOW-TO
-
-      http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
-
-The binary files of Apache Commons Daemon in Apache Tomcat distributions
-for Windows are named:
-
-  - "tomcat7.exe"
-  - "tomcat7w.exe"
-
-These files are renamed copies of "prunsrv.exe" and "prunmgr.exe" from
-Apache Commons Daemon distribution. The file names have a meaning: they are
-used as the service name to register the service in Windows, as well as the
-key name to store distinct configuration for this installation of
-"procrun". If you would like to install several instances of Tomcat 7.0
-in parallel, you have to further rename those files, using the same naming
-scheme.

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar b/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar
deleted file mode 100644
index 8f43864..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/bootstrap.jar and /dev/null differ


[07/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
deleted file mode 100755
index 5835738..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
+++ /dev/null
@@ -1,146 +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.query.coprocessor.impl;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.eagle.storage.hbase.query.coprocessor.*;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.client.coprocessor.Batch;
-import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Not thread safe
- *
- * @since : 11/2/14,2014
- */
-public class AggregateClientImpl implements AggregateClient {
-	private final static Logger LOG = LoggerFactory.getLogger(AggregateClient.class);
-	private AggregateResultCallback callback;
-
-	private void checkNotNull(Object obj,String name) {
-		if(obj==null) throw new NullPointerException(name+" is null");
-	}
-
-	@Override
-	public AggregateResult aggregate(final HTableInterface table,
-	                                       final EntityDefinition entityDefinition,
-	                                       final Scan scan,
-	                                       final List<String> groupbyFields,
-	                                       final List<AggregateFunctionType> aggregateFuncTypes,
-	                                       final List<String> aggregatedFields,
-	                                       final boolean timeSeries,
-	                                       final long startTime,
-	                                       final long endTime,
-	                                       final long intervalMin) throws IOException {
-		checkNotNull(entityDefinition,"entityDefinition");
-		final List<AggregateFunctionType> _aggregateFuncTypes = convertToCoprocessorAggregateFunc(aggregateFuncTypes);
-		final List<byte[]> _aggregateFuncTypesBytes = AggregateFunctionType.toBytesList(_aggregateFuncTypes);
-//		if(timeSeries) TimeSeriesAggregator.validateTimeRange(startTime,endTime,intervalMin);
-		callback = new AggregateResultCallbackImpl(aggregateFuncTypes);
-		try{
-			if(!LOG.isDebugEnabled()){
-				LOG.info("Going to exec coprocessor: "+AggregateProtocol.class.getSimpleName());
-			}else{
-				LOG.debug("Going to exec coprocessor: "+AggregateProtocol.class.getName());
-			}
-
-//			table.coprocessorExec(AggregateProtocol.class,scan.getStartRow(),scan.getStopRow(),new Batch.Call<AggregateProtocol, AggregateResult>(){
-//				@Override
-//				public AggregateResult call(AggregateProtocol instance) throws IOException {
-//					if(timeSeries){
-//						return instance.aggregate(entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields,startTime,endTime,intervalMin);
-//					}else{
-//						return instance.aggregate(entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields);
-//					}
-//				}
-//			},callback);
-
-          table.coprocessorService(AggregateProtos.AggregateProtocol.class, scan.getStartRow(), scan.getStopRow(), new Batch.Call<AggregateProtos.AggregateProtocol, AggregateProtos.AggregateResult>() {
-              @Override
-              public AggregateProtos.AggregateResult call(AggregateProtos.AggregateProtocol instance) throws IOException {
-                  BlockingRpcCallback<AggregateProtos.AggregateResult> rpcCallback = new BlockingRpcCallback<AggregateProtos.AggregateResult>();
-                  if(timeSeries){
-                      AggregateProtos.TimeSeriesAggregateRequest timeSeriesAggregateRequest = ProtoBufConverter
-                              .toPBTimeSeriesRequest(
-                                      entityDefinition,
-                                      scan,
-                                      groupbyFields,
-                                      _aggregateFuncTypesBytes,
-                                      aggregatedFields,
-                                      startTime,
-                                      endTime,
-                                      intervalMin);
-                      instance.timeseriesAggregate(null, timeSeriesAggregateRequest, rpcCallback);
-                      return rpcCallback.get();
-					}else{
-                      AggregateProtos.AggregateRequest aggregateRequest = ProtoBufConverter.toPBRequest(
-                                      entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields);
-                      instance.aggregate(null, aggregateRequest, rpcCallback);
-                      return rpcCallback.get();
-					}
-              }
-          }, callback);
-		} catch (Throwable t){
-			LOG.error(t.getMessage(),t);
-			throw new IOException(t);
-		}
-		return callback.result();
-	}
-	
-//	@Override
-//	public void result(final GroupbyKeyValueCreationListener[] listeners) {
-//		callback.asyncRead(Arrays.asList(listeners));
-//	}
-
-	@Override
-	public AggregateResult  aggregate(HTableInterface table, EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<AggregateFunctionType> aggregateFuncTypes, List<String> aggregatedFields) throws IOException {
-		return this.aggregate(table,entityDefinition,scan,groupbyFields,aggregateFuncTypes,aggregatedFields,false,0,0,0);
-	}
-
-	/**
-	 *
-	 * <h4>
-	 *   Convert client side funcs to server side funcs, especially for <b>avg</b>
-	 * </h4>
-	 * <ul>
-	 *  <li><b>avg</b>:
-	 *    Coprocessor[ <b>&lt;sum,count&gt;</b>] => Callback[(sum<SUB>1</SUB>+sum<SUB>2</SUB>+...+sum<SUB>n</SUB>)/(count<SUB>1</SUB>+count<SUB>2</SUB>+...+count<SUB>n</SUB>)]
-	 * </li>
-	 * </ul>
-	 * @param funcs List&lt;AggregateFunctionType&gt;
-	 * @return
-	 */
-	private List<AggregateFunctionType> convertToCoprocessorAggregateFunc(List<AggregateFunctionType> funcs){
-		List<AggregateFunctionType> copy = new ArrayList<AggregateFunctionType>(funcs);
-		for(int i=0;i<funcs.size();i++){
-			AggregateFunctionType func = copy.get(i);
-			if(AggregateFunctionType.avg.equals(func)){
-				copy.set(i,AggregateFunctionType.sum);
-			}
-		}
-		return copy;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
deleted file mode 100755
index 2e0248f..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
+++ /dev/null
@@ -1,143 +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.query.coprocessor.impl;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResultCallback;
-import org.apache.eagle.storage.hbase.query.coprocessor.ProtoBufConverter;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.query.aggregate.raw.*;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since : 11/3/14,2014
- */
-public class AggregateResultCallbackImpl implements AggregateResultCallback {
-	private final static Logger LOG = LoggerFactory.getLogger(AggregateResultCallback.class);
-	private Map<GroupbyKey,List<Function>> groupedFuncs = new HashMap<GroupbyKey, List<Function>>();
-	private List<FunctionFactory> functionFactories = new ArrayList<FunctionFactory>();
-	private int numFuncs = 0;
-	private long kvCounter = 0;
-	private int regionCounter = 0;
-	private long startTimestamp;
-	private long stopTimestamp;
-	
-	// Start RPC call time (i.e constructor initialized time)
-	private final long _start;
-	
-	public AggregateResultCallbackImpl(List<AggregateFunctionType> aggregateFunctionTypes){
-		this.numFuncs = aggregateFunctionTypes.size();
-		for(AggregateFunctionType type: aggregateFunctionTypes){
-			 functionFactories.add(FunctionFactory.locateFunctionFactory(type));
-		}
-		this._start = System.currentTimeMillis();
-	}
-
-//	@Override
-	public void update(byte[] region, byte[] row, AggregateResult result) {
-		AggregateResult _result = result;
-		regionCounter ++;
-		kvCounter += _result.getKeyValues().size();
-		if(this.startTimestamp == 0 || this.startTimestamp > _result.getStartTimestamp()){
-			this.startTimestamp = _result.getStartTimestamp();
-		}
-		if(this.stopTimestamp == 0 || this.stopTimestamp < _result.getStopTimestamp()){
-			this.stopTimestamp = _result.getStopTimestamp();
-		}
-		for(GroupbyKeyValue keyValue:_result.getKeyValues()){
-			update(keyValue);
-		}
-	}
-
-	public void update(GroupbyKeyValue keyValue) {
-		// Incr kvCounter if call #update(GroupbyKeyValue) directly
-		// instead of #update(byte[] region, byte[] row, AggregateResult result)
-		if(this.getKVCounter() == 0) this.kvCounter ++;
-		// Accumulate key value for GroubyKey mapped Functions
-		GroupbyKey groupedKey = keyValue.getKey();
-		List<Function> funcs = groupedFuncs.get(groupedKey);
-		if(funcs==null){
-			funcs = new ArrayList<Function>();
-			for(FunctionFactory functionFactory:this.functionFactories){
-				funcs.add(functionFactory.createFunction());
-			}
-			groupedFuncs.put(groupedKey, funcs);
-		}
-		for(int i=0;i<this.numFuncs;i++){
-			int intCount = 1;
-			byte[] count = keyValue.getValue().getMeta(i).getBytes();
-			if(count != null){
-				intCount = ByteUtil.bytesToInt(count);
-			}
-			funcs.get(i).run(keyValue.getValue().get(i).get(), intCount);
-		}
-	}
-
-	public long getKVCounter(){
-		return this.kvCounter;
-	}
-
-	public long getRegionCounter(){
-		return this.regionCounter;
-	}
-
-	public AggregateResult result(){
-		List<GroupbyKeyValue> mergedKeyValues = new ArrayList<GroupbyKeyValue>();
-		for(Map.Entry<GroupbyKey,List<Function>> entry:this.groupedFuncs.entrySet()){
-			GroupbyValue value = new GroupbyValue(this.numFuncs);
-			for(Function func:entry.getValue()){
-				double _result = func.result();
-				int _count = func.count();
-				value.add(_result);
-				value.addMeta(_count);
-			}
-			mergedKeyValues.add(new GroupbyKeyValue(entry.getKey(),value));
-		}
-		
-		final long _stop = System.currentTimeMillis();
-		if(this.getRegionCounter() > 0) {
-			LOG.info(String.format("result = %d rows, startTime = %d, endTime = %d, source = %d rows, regions = %d, , spend = %d ms", mergedKeyValues.size(),this.startTimestamp,this.stopTimestamp, this.getKVCounter(), this.getRegionCounter(),(_stop - _start)));
-		}else{
-			LOG.info(String.format("result = %d rows, startTime = %d, endTime = %d, source = %d rows, spend = %d ms", mergedKeyValues.size(),this.startTimestamp,this.stopTimestamp,this.getKVCounter(), (_stop - _start)));
-		}
-		AggregateResult result = new AggregateResult();
-		result.setKeyValues(mergedKeyValues);
-		result.setStartTimestamp(this.startTimestamp);
-		result.setStopTimestamp(this.stopTimestamp);
-		return result;
-	}
-
-    @Override
-    public void update(byte[] region, byte[] row, AggregateProtos.AggregateResult result) {
-        try {
-            if(result == null) throw new IllegalStateException(new CoprocessorException("result is null"));
-            this.update(region,row, ProtoBufConverter.fromPBResult(result));
-        } catch (IOException e) {
-            LOG.error("Failed to convert PB-Based message",e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
deleted file mode 100755
index 7d81872..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
+++ /dev/null
@@ -1,111 +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.
- */
-/**
- *
- * <h1>Eagle Aggregation Coprocessor</h1>
- *
- * <h2>Deployment and Usage</h2>
- * <ol>
- * 	<li>
- *  Firstly deploy jar files to cluster on local file system or HDFS.<br/>
- * 	</li>
- * 	<li>
- * 	Secondly configure in <code>hbase-site.xml</code> as following:
- * 	<pre>&lt;property&gt;
- *   &lt;name>hbase.coprocessor.region.classes&lt;/name&gt;
- *   &lt;value>AggregateProtocolEndPoint&lt;/value&gt;
- * &lt;/property&gt;
- * 	</pre>
- * 	Or register on related hbase tables
- * 	<pre> hbase(main):005:0>  alter 't1', METHOD => 'table_att', 'coprocessor'=>'hdfs:///foo.jar|AggregateProtocolEndPoint|1001|'</pre>
- * 	</li>
- * 	<li>
- * <code>
- * AggregateClient client = new AggregateClientImpl();
- * client.aggregate
- * AggregateResult result = client.result
- * 
- * </code>
- * </li>
- * </ol>
- * 
- * <h2>Performance</h2>
- *
- * <b>NOTE:</b>
- * For single node of HBase, aggregation with coprocessor will be at least double faster than that on single client server,
- * and as HBase scale to more nodes, the aggregation performance will be linear scaled too, while aggregation on
- * client side will be more and more slow limit by computing and memory resource as well as network transmission on single
- * hot server machine.
- *
- * <br />
- * <br />
- * <b>A simple benchmark report for reference</b>
- * <br/>
- * <table border="1">
- *     <thead>
- *         <tr>
- *             <th>Region Servers</th> <th>Record Count</th>
- *             <th>Coprocessor</th><th>No-Coprocessor</th><th>Aggregation</th>
- *         </tr>
- *     </thead>
- *     <tbody>
- *         <tr>
- *             <td rowspan="10">1</td><td rowspan="10">1000,000</td>
- *             <td>10193 ms</td><td>21988 ms</t...@datacenter>{count}</td>
- *         </tr>
- *         <tr>
- *             <td>10010 ms</td><td>22547 ms</t...@datacenter>{sum(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10334 ms</td><td>23433 ms</t...@datacenter>{avg(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10045 ms</td><td>22690 ms</t...@datacenter>{max(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10190 ms</td><td>21902 ms</t...@datacenter>{min(numTotalMaps)}</td>
- *         </tr>
- *     </tbody>
- * </table>
- * <h2>Reference</h2>
- * <a href="https://blogs.apache.org/hbase/entry/coprocessor_introduction">
- * 	Coprocessor Introduction 
- * </a>
- * (Trend Micro Hadoop Group: Mingjie Lai, Eugene Koontz, Andrew Purtell)
- * 
- * <h2>TO-DO</h2>
- * <ol>
- * <li>
- *   TODO: Pass writable self-described entity definition into HBase coprocessor instead of serviceName in String
- *
- *   Because using serviceName to get entity definition will reply on entity API code under eagle-app, so that
- *   when modifying or creating new entities, we have to update coprocessor jar in HBase side
- *   (hchen9@xyz.com)
- * </li>
- * <li>
- * 	 TODO: Using String.format instead substrings addition for long log to avoid recreating string objects
- * </li>
- * </ol>
- *
- * </table>
- * @see eagle.query.aggregate.coprocessor.AggregateClient
- * @see eagle.query.aggregate.coprocessor.AggregateResult
- * @see eagle.query.aggregate.coprocessor.AggregateProtocol
- * 
- * @since   : 11/10/14,2014
- */
-package org.apache.eagle.storage.hbase.query.coprocessor;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/spi/HBaseStorageServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/spi/HBaseStorageServiceProvider.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/spi/HBaseStorageServiceProvider.java
deleted file mode 100644
index 1ee1c52..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/spi/HBaseStorageServiceProvider.java
+++ /dev/null
@@ -1,38 +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.spi;
-
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.hbase.HBaseStorage;
-import org.apache.eagle.storage.spi.DataStorageServiceProvider;
-
-/**
- * @since 3/20/15
- */
-public final class HBaseStorageServiceProvider implements DataStorageServiceProvider {
-    private final static String HBASE = "hbase";
-
-    @Override
-    public String getType() {
-        return HBASE;
-    }
-
-    @Override
-    public DataStorage getStorage() {
-        return new HBaseStorage();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto b/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
deleted file mode 100644
index c3385a1..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
+++ /dev/null
@@ -1,65 +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.
- *
- * Compile: protoc -I ~/Workspace/hbase/hbase-protocol/src/main/protobuf/ -I src/main/protobuf --java_out=src/main/java src/main/protobuf/AggregateProtocol.proto
- */
-option java_package = "org.apache.eagle.storage.hbase.query.coprocessor.generated";
-option java_outer_classname = "AggregateProtos";
-option java_generic_services = true;
-option java_generate_equals_and_hash = true;
-option optimize_for = SPEED;
-
-/**
- * HBase Client.proto
- */
-import "Client.proto";
-
-//
-//message ScanWrapper{
-//    required bytes byte_array = 1;
-//}
-
-message EntityDefinition {
-    required bytes byte_array = 1;
-}
-
-message AggregateResult {
-    required bytes byte_array = 1;
-}
-
-message AggregateRequest {
-    required EntityDefinition entity_definition = 1;
-    required Scan scan = 2;
-    repeated string groupby_fields= 3;
-    repeated bytes aggregate_func_types = 4;
-    repeated string aggregated_fields = 5;
-}
-
-message TimeSeriesAggregateRequest {
-    required EntityDefinition entity_definition = 1;
-    required Scan scan = 2;
-    repeated string groupby_fields= 3;
-    repeated bytes aggregate_func_types = 4;
-    repeated string aggregated_fields = 5;
-    required int64 start_time = 6;
-    required int64 end_time = 7;
-    required int64 interval_min = 8;
-}
-
-service AggregateProtocol {
-    rpc aggregate(AggregateRequest) returns (AggregateResult);
-    rpc timeseriesAggregate(TimeSeriesAggregateRequest) returns (AggregateResult);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider b/eagle-core/eagle-query/eagle-storage-hbase/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
deleted file mode 100644
index 97758b7..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.storage.hbase.spi.HBaseStorageServiceProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 5572724..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
+++ /dev/null
@@ -1,103 +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;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.operation.CreateStatement;
-import junit.framework.Assert;
-
-import org.apache.eagle.storage.operation.QueryStatement;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.service.hbase.TestHBaseBase;
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.operation.RawQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.apache.eagle.common.DateTimeUtil;
-
-/**
- * @since 3/23/15
- */
-public class TestHBaseStatement extends TestHBaseBase {
-
-    EntityDefinition entityDefinition;
-
-    @Before
-    public 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 {
-        List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-        TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-        entity.setField1(1);
-        entity.setField2(2);
-        entity.setField3(10000000l);
-        entity.setField4(10000000l);
-        entity.setField5(0.12345678);
-        entity.setTags(new HashMap<String, String>() {{
-            put("cluster", "test");
-            put("datacenter", "test");
-            put("name","unit.test.name");
-        }});
-
-        entities.add(entity);
-
-        CreateStatement createStatement = new CreateStatement(entities,"TestTimeSeriesAPIEntity");
-        ModifyResult resultSet = createStatement.execute(DataStorageManager.newDataStorage("hbase"));
-
-        Assert.assertEquals(1, resultSet.getIdentifiers().size());
-
-        createStatement = new CreateStatement(entities,"TestTimeSeriesAPIEntity");
-        resultSet = createStatement.execute(DataStorageManager.newDataStorage("hbase"));
-
-        Assert.assertEquals(1, resultSet.getIdentifiers().size());
-    }
-
-    @Test
-    public void testQuery() throws IllegalDataStorageTypeException, IOException {
-        testCreate();
-        RawQuery query = new RawQuery();
-        query.setQuery("TestTimeSeriesAPIEntity[@cluster=\"test\" AND @datacenter = \"test\"]{*}");
-        query.setPageSize(Integer.MAX_VALUE);
-        query.setFilterIfMissing(false);
-        query.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(0));
-        query.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()+25 * 3600 * 1000));
-        QueryStatement queryStatement = new QueryStatement(query);
-        QueryResult<?> entityResult = queryStatement.execute(DataStorageManager.newDataStorage("hbase"));
-        assert entityResult != null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStorage.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStorage.java
deleted file mode 100644
index 76cc507..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStorage.java
+++ /dev/null
@@ -1,34 +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;
-
-import org.junit.Test;
-
-/**
- * @since 3/23/15
- */
-public class TestHBaseStorage {
-    @Test
-    public void testCreate(){
-
-    }
-
-    @Test
-    public void testQuery(){
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
deleted file mode 100755
index 4e7254e..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
+++ /dev/null
@@ -1,184 +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.aggregate.coprocessor;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResultCallback;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateResultCallbackImpl;
-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.common.ByteUtil;
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class TestAggregateResultCallback {
-    @Test
-    public void testUpdate(){
-        // -----------------------------------------------------------------------------
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b      |       1.0      2.0        3.0         4.0         5.0      | 3
-        // a,b      |       2        3          6           5           6        | 6
-        // a,b,c    |       3        3          5           5           6        | 5
-        // a,b,c    |       4        5          5           5           7        | 5
-        // -----------------------------------------------------------------------------
-        // a,b      |       2        2          9           1           11       | 9
-        // a,b,c    |       4        3          10          1           13       | 10
-        // -----------------------------------------------------------------------------
-
-        AggregateResultCallback callback = new AggregateResultCallbackImpl(Arrays.asList(
-                        AggregateFunctionType.max,
-                        AggregateFunctionType.min,
-                        AggregateFunctionType.count,
-                        AggregateFunctionType.avg,
-                        AggregateFunctionType.sum));
-        AggregateResult result1 = AggregateResult.build(
-                Arrays.asList(
-                    new String[]{"a","b"},
-                    new String[]{"a","b"},
-                    new String[]{"a","b","c"},
-                    new String[]{"a","b","c"}
-                ),
-                Arrays.asList(
-                    new double[]{1.0,2.0,3.0,4.0,5.0},
-                    new double[]{2.0,3.0,6.0,5.0,6.0},
-                    new double[]{3.0,3.0,5.0,5.0,6.0},
-                    new double[]{4.0,5.0,5.0,5.0,7.0}
-                ),
-                Arrays.asList(3,6,5,5),
-                System.currentTimeMillis(),
-                System.currentTimeMillis()
-        );
-        callback.update(null,null,result1);
-        AggregateResult callbackResult = callback.result();
-        Assert.assertEquals(2,callbackResult.getKeyValues().size());
-
-        // == ROW-#0 ==
-        // Should be:
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b,c    |       4        3          10          1           13       | 10
-        GroupbyKeyValue row0 = callbackResult.getKeyValues().get(0);
-//        Assert.assertEquals("a",new String(row0.getKey().getValue().get(0).copyBytes()));
-//        Assert.assertEquals("b",new String(row0.getKey().getValue().get(1).copyBytes()));
-        Assert.assertEquals(new GroupbyKey(Arrays.asList("a".getBytes(),"b".getBytes(),"c".getBytes())),row0.getKey());
-        Assert.assertEquals(4.0,row0.getValue().get(0).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(0).getBytes()));
-        Assert.assertEquals(3.0, row0.getValue().get(1).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(1).getBytes()));
-        Assert.assertEquals(10.0,row0.getValue().get(2).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(2).getBytes()));
-        Assert.assertEquals(1.0,row0.getValue().get(3).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(3).getBytes()));
-        Assert.assertEquals(13.0,row0.getValue().get(4).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(4).getBytes()));
-
-        // == ROW-#1 ==
-        // Should be:
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b      |       2        2          9           1           11       | 9
-        GroupbyKeyValue row1 = callbackResult.getKeyValues().get(1);
-        Assert.assertEquals(new GroupbyKey(Arrays.asList("a".getBytes(),"b".getBytes())),row1.getKey());
-        Assert.assertEquals(2.0,row1.getValue().get(0).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(2.0, row1.getValue().get(1).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(9.0,row1.getValue().get(2).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(1.0,row1.getValue().get(3).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(11.0,row1.getValue().get(4).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-    }
-
-    @Test
-    public void testAggregateResultTimestamp(){
-        AggregateResult result1 = new AggregateResult();
-        result1.setStartTimestamp(2l);
-        result1.setStopTimestamp(4l);
-        AggregateResult result2 = new AggregateResult();
-        result2.setStartTimestamp(1l);
-        result2.setStopTimestamp(3l);
-        AggregateResultCallback  callback = new AggregateResultCallbackImpl(new ArrayList<AggregateFunctionType>());
-        callback.update(null,null,result1);
-        callback.update(null,null,result2);
-        AggregateResult result3 = callback.result();
-        Assert.assertEquals(1l,result3.getStartTimestamp());
-        Assert.assertEquals(4l,result3.getStopTimestamp());
-    }
-
-    @Test
-    public void testUpdatePerformance(){
-        AggregateResultCallback callback = new AggregateResultCallbackImpl(
-                Arrays.asList(
-                        AggregateFunctionType.max,
-                        AggregateFunctionType.min,
-                        AggregateFunctionType.count,
-                        AggregateFunctionType.avg));
-
-        for(int i=0;i<1000000;i++) {
-            AggregateResult result1 = new AggregateResult();
-            result1.setStartTimestamp(System.currentTimeMillis());
-            List<GroupbyKeyValue> keyValues = new ArrayList<GroupbyKeyValue>();
-
-            // <a,b> - <1*3, 2*3, 3*3, 4*3>
-            GroupbyKey key = new GroupbyKey();
-            key.addValue("a".getBytes());
-            key.addValue("b".getBytes());
-            GroupbyValue value = new GroupbyValue();
-            value.add(1.0);
-            value.add(2.0);
-            value.add(3.0);
-            value.add(4.0);
-            value.addMeta(3);
-            value.addMeta(3);
-            value.addMeta(3);
-            value.addMeta(3);
-            keyValues.add(new GroupbyKeyValue(key, value));
-
-            // <a,b> - <1*3, 2*3, 3*3, 4*3>
-            GroupbyKey key2 = new GroupbyKey();
-            key2.addValue("a".getBytes());
-            key2.addValue("b".getBytes());
-            GroupbyValue value2 = new GroupbyValue();
-            value2.add(2.0);
-            value2.add(3.0);
-            value2.add(4.0);
-            value2.add(5.0);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            keyValues.add(new GroupbyKeyValue(key2, value2));
-            result1.setKeyValues(keyValues);
-            result1.setStopTimestamp(System.currentTimeMillis());
-            callback.update(null, null, result1);
-        }
-        AggregateResult result2 = callback.result();
-        Assert.assertNotNull(result2);
-        Assert.assertTrue(result2.getStopTimestamp() > result2.getStartTimestamp());
-        Assert.assertTrue(result2.getStartTimestamp() > 0);
-        Assert.assertTrue(result2.getStopTimestamp() > 0);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100755
index e5e93c4..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateClient.java
+++ /dev/null
@@ -1,253 +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.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.impl.AggregateClientImpl;
-import junit.framework.Assert;
-
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-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.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.junit.After;
-import org.junit.Before;
-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;
-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.service.hbase.TestHBaseBase;
-
-/**
- * @since : 10/30/14,2014
- */
-public class TestGroupAggregateClient extends TestHBaseBase {
-	HTableInterface table;
-	long startTime;
-	long endTime;
-	List<String> rowkeys;
-	AggregateClient client;
-	Scan scan;
-	int num = 200;
-
-	private final static Logger LOG = LoggerFactory.getLogger(TestGroupAggregateClient.class);
-
-	@Before
-	public void setUp(){
-		hbase.createTable("unittest", "f");
-		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());
-	}
-	
-	@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);
-
-		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.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");
-			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());
-			list.add(e);
-
-		}
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		LOG.info("Writing "+list.size()+" TestLogAPIEntity entities");
-		List<String> result = writer.write(list);
-		LOG.info("Finish writing test entities");
-		return result;
-	}
-
-	//@Test
-	public void testGroupAggregateCountClient(){
-		try {
-			EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.count),Arrays.asList("field2")).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("COUNT");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-			Assert.assertTrue(result.size()>0);
-		} catch (Exception e) {
-			e.printStackTrace();
-			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");
-			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("test4UT", new String(result.get(0).getKey().getValue().get(0).copyBytes()));
-			Assert.assertEquals("dc1", new String(result.get(0).getKey().getValue().get(1).copyBytes()));
-			Assert.assertEquals(2.0, result.get(0).getValue().get(0).get());
-			Assert.assertEquals(2.0, result.get(0).getValue().get(1).get());
-			Assert.assertEquals(2.0, result.get(0).getValue().get(2).get());
-			Assert.assertTrue(num <= result.get(0).getValue().get(3).get());
-			Assert.assertTrue(2.0 * num <= result.get(0).getValue().get(4).get());
-		} 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<String>();
-			for(BytesWritable bytes:key.getValue()){
-				keys.add(new String(bytes.copyBytes()));
-			}
-			List<Double> vals = new ArrayList<Double>();
-			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/0ea130ef/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
deleted file mode 100755
index d0197fb..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
+++ /dev/null
@@ -1,218 +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.aggregate.coprocessor;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import junit.framework.Assert;
-
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-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.Before;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-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.TestTimeSeriesAPIEntity;
-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.service.hbase.TestHBaseBase;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
-
-/**
- * @since : 11/10/14,2014
- */
-public class TestGroupAggregateTimeSeriesClient extends TestHBaseBase {
-
-	private final static Logger LOG = LoggerFactory.getLogger(TestGroupAggregateTimeSeriesClient.class);
-
-	HTableInterface table;
-	long startTime;
-	long endTime;
-	List<String> rowkeys;
-	AggregateClient client;
-	Scan scan;
-	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 {
-			rowkeys = prepareData(1000);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-		endTime = System.currentTimeMillis();
-
-		client = new AggregateClientImpl();
-		scan = new Scan();
-		ListQueryCompiler compiler = null;
-		try {
-			compiler = new ListQueryCompiler("TestTimeSeriesAPIEntity[@cluster=\"test4UT\" and @datacenter = \"dc1\"]{@field1,@field2}");
-		} catch (Exception e) {
-			Assert.fail(e.getMessage());
-		}
-		scan.setFilter(compiler.filter());
-//		scan.setStartRow(EagleBase64Wrapper.decode(rowkeys.get(0)));
-//		scan.setStopRow(EagleBase64Wrapper.decode(rowkeys.get(rowkeys.size()-1)));
-	}
-
-	private List<String> prepareData(int count) throws Exception {
-		List<TestTimeSeriesAPIEntity> list = new ArrayList<TestTimeSeriesAPIEntity>();
-
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestTimeSeriesAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-		}
-
-		for(int i=0;i<count;i++){
-			TestTimeSeriesAPIEntity e = new TestTimeSeriesAPIEntity();
-			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");
-			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());
-			list.add(e);
-		}
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		return result;
-	}
-
-
-	//@Test
-	public void testGroupTimeSeriesAggCountClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.count),Arrays.asList("count"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("COUNT");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMaxClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.max),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MAX");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMinClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.min),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MIN");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggAvgClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.min),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MIN");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggSumClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.sum),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("SUM");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMultipleClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan,
-					Arrays.asList("cluster","datacenter"),
-					Arrays.asList(AggregateFunctionType.max,AggregateFunctionType.min,AggregateFunctionType.avg,AggregateFunctionType.sum,AggregateFunctionType.count),
-					Arrays.asList("field2","field2","field2","field2","field2"),true,startTime,System.currentTimeMillis(),16).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MUTILPLE");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} 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<String>();
-			for(BytesWritable bytes:key.getValue()){
-				keys.add(new String(bytes.copyBytes()));
-			}
-			List<Double> vals = new ArrayList<Double>();
-			GroupbyValue val = keyValue.getValue();
-			for(DoubleWritable dw:val.getValue()){
-				vals.add(dw.get());
-			}
-			if(LOG.isDebugEnabled()) LOG.debug("KEY: " + keys + ", VALUE: " + vals);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index cc5913a..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorage.java
+++ /dev/null
@@ -1,29 +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.spi;
-
-import org.junit.Test;
-
-/**
- * @since 3/23/15
- */
-public class TestHBaseStorage {
-    @Test
-    public void testCreate(){
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index bd54c1c..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
+++ /dev/null
@@ -1,43 +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.spi;
-
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.hbase.HBaseStorage;
-import junit.framework.Assert;
-import org.junit.Test;
-
-/**
- * @since 3/20/15
- */
-public class TestHBaseStorageLoader {
-    @Test
-    public void testHBaseStorageLoader() {
-        try {
-            assert DataStorageManager.getDataStorageByEagleConfig() instanceof HBaseStorage;
-        } catch (IllegalDataStorageTypeException e) {
-            Assert.fail(e.getMessage());
-        }
-
-        try {
-            assert DataStorageManager.newDataStorage("hbase") instanceof HBaseStorage;
-        } catch (IllegalDataStorageTypeException e) {
-            Assert.fail(e.getMessage());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 25257c5..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +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.
-
-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"
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index d59ded6..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +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.
-
-log4j.rootLogger=INFO, stdout
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
deleted file mode 100644
index c3b48be..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-query-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-storage-jdbc</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ddlutils</groupId>
-            <artifactId>ddlutils</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.torque</groupId>
-            <artifactId>torque-runtime</artifactId>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 7fb4dbd..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
+++ /dev/null
@@ -1,37 +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.jdbc;
-
-/**
- * Jdbc Storage Constants
- */
-public class JdbcConstants {
-    // Eagle JDBC Schema
-    public static final String TIMESTAMP_COLUMN_NAME = "timestamp";
-    public static final String METRIC_NAME_COLUMN_NAME = "metric";
-    public static final String ROW_KEY_COLUMN_NAME = "uuid";
-
-    // Eagle JDBC Storage Configuration
-    public final static String EAGLE_DB_USERNAME = "eagle.service.storage-username";
-    public final static String EAGLE_DB_PASSWORD = "eagle.service.storage-password";
-    public final static String EAGLE_CONN_URL= "eagle.service.storage-connection-url";
-    public final static String EAGLE_CONN_PROPS= "eagle.service.storage-connection-props";
-    public final static String EAGLE_ADAPTER= "eagle.service.storage-adapter";
-    public final static String EAGLE_DATABASE= "eagle.service.storage-database";
-    public final static String EAGLE_DRIVER_CLASS= "eagle.service.storage-driver-class";
-    public final static String EAGLE_CONN_MAX_SIZE= "eagle.service.storage-connection-max";
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
deleted file mode 100644
index 66b3c5a..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
+++ /dev/null
@@ -1,211 +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.jdbc;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.DataStorageBase;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityDeleter;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityReader;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityDeleterImpl;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityReaderImpl;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityUpdater;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityWriter;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityUpdaterImpl;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityWriterImpl;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinitionManager;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since 3/18/15
- */
-@SuppressWarnings("unchecked")
-public class JdbcStorage extends DataStorageBase {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcStorage.class);
-
-    @Override
-    public void init() throws IOException {
-        try {
-            JdbcEntityDefinitionManager.load();
-            ConnectionManagerFactory.getInstance();
-        } catch (Exception e) {
-            LOG.error("Failed to initialize connection manager",e);
-            throw new IOException(e);
-        }
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> update(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityUpdater updater = new JdbcEntityUpdaterImpl(jdbcEntityDefinition);
-            int updated = updater.update(entities);
-            result.setSize(updated);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> create(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityWriter writer = new JdbcEntityWriterImpl(jdbcEntityDefinition);
-            List<String> keys = writer.write(entities);
-            result.setIdentifiers(keys);
-            result.setSize(keys.size());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> delete(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.delete(entities);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public ModifyResult<String> deleteByID(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.deleteByIds(ids);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public ModifyResult<String> delete(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.deleteByQuery(query);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public <E extends Object> QueryResult<E> query(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        QueryResult<E> result = new QueryResult<E>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityReader reader = new JdbcEntityReaderImpl(jdbcEntityDefinition);
-            List<E> entities = reader.query(query);
-            result.setData(entities);
-            if(entities!=null) {
-                result.setSize(entities.size());
-            }else{
-                result.setSize(0);
-            }
-            if(query.isHasAgg()){
-                result.setEntityType((Class<E>) Map.class);
-            }else {
-                result.setEntityType((Class<E>) entityDefinition.getEntityClass());
-            }
-            result.setFirstTimestamp(reader.getResultFirstTimestamp());
-            result.setLastTimestamp(reader.getResultLastTimestamp());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E> QueryResult<E> queryById(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        QueryResult<E> result = new QueryResult<E>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityReader reader = new JdbcEntityReaderImpl(jdbcEntityDefinition);
-            List<E> entities = reader.query(ids);
-            result.setData(entities);
-            if(entities!=null) {
-                result.setSize(entities.size());
-            }else{
-                result.setSize(0);
-            }
-            result.setEntityType((Class<E>) entityDefinition.getEntityClass());
-            result.setFirstTimestamp(reader.getResultFirstTimestamp());
-            result.setLastTimestamp(reader.getResultLastTimestamp());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public void close() throws IOException {
-        try {
-            ConnectionManagerFactory.getInstance().shutdown();
-        } catch (Exception e) {
-            throw new IOException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
deleted file mode 100644
index d1f7dbf..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
+++ /dev/null
@@ -1,100 +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.jdbc.conn;
-
-/**
- * @since 3/26/15
- */
-public class ConnectionConfig {
-    public String getAdapter() {
-        return adapter;
-    }
-
-    public void setAdapter(String adapter) {
-        this.adapter = adapter;
-    }
-
-    private String adapter;
-
-    public String getDatabaseName() {
-        return databaseName;
-    }
-
-    public void setDatabaseName(String databaseName) {
-        this.databaseName = databaseName;
-    }
-
-    private String databaseName;
-    private String driverClassName;
-    private String connectionUrl;
-    private String userName;
-    private String password;
-    private String connectionProperties;
-
-    /**
-     * Max active connections number
-     */
-    private int connectionMaxActive = 8;
-
-    public int getConnectionMaxActive() {
-        return connectionMaxActive;
-    }
-
-    public void setConnectionMaxActive(int connectionMaxActive) {
-        this.connectionMaxActive = connectionMaxActive;
-    }
-
-    public String getConnectionProperties() {
-        return connectionProperties;
-    }
-
-    public void setConnectionProperties(String connectionProperties) {
-        this.connectionProperties = connectionProperties;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getDriverClassName() {
-        return driverClassName;
-    }
-
-    public void setDriverClassName(String driverClassName) {
-        this.driverClassName = driverClassName;
-    }
-
-    public String getConnectionUrl() {
-        return connectionUrl;
-    }
-
-    public void setConnectionUrl(String connectionUrl) {
-        this.connectionUrl = connectionUrl;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-}



[02/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/eagle-singlenode.json
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/eagle-singlenode.json b/eagle-external/eagle-docker/resource/eagle-singlenode.json
deleted file mode 100644
index a693c7d..0000000
--- a/eagle-external/eagle-docker/resource/eagle-singlenode.json
+++ /dev/null
@@ -1,122 +0,0 @@
-{
-"configurations": [
-    {
-      "hdfs-site": {
-        "dfs.permissions.enabled": "false"
-      },
-      "hive-site": {
-        "javax.jdo.option.ConnectionUserName": "hive",
-        "javax.jdo.option.ConnectionPassword": "hive"
-      }
-    },
-    {
-       "hadoop-env": {
-          "properties" : {
-            "content" : "\r\n# Set Hadoop-specific environment variables here.\r\n\r\n# The only required environment variable is JAVA_HOME.  All others are\r\n# optional.  When running a distributed configuration it is best to\r\n# set JAVA_HOME in this file, so that it is correctly defined on\r\n# remote nodes.\r\n\r\n# The java implementation to use.  Required.\r\nexport JAVA_HOME={{java_home}}\r\nexport HADOOP_HOME_WARN_SUPPRESS=1\r\n\r\n# Hadoop home directory\r\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\r\n\r\n# Hadoop Configuration Directory\r\n\r\n{# this is different for HDP1 #}\r\n# Path to jsvc required by secure HDP 2.0 datanode\r\nexport JSVC_HOME={{jsvc_path}}\r\n\r\n\r\n# The maximum amount of heap to use, in MB. Default is 1000.\r\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\r\n\r\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\r\n\r\n# Extra Java runtime options.  Empty by default.\r\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=tr
 ue ${HADOOP_OPTS}\"\r\n\r\n# Command specific options appended to HADOOP_OPTS when specified\r\nexport HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSize={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT,KAFKA_HDFS_AUDIT ${HADOOP_NAMENODE_OPTS}\"\r\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d
 %H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\r\n\r\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\r\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\r\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCE
 R_OPTS}\"\r\n\r\nexport HADOOP_SECONDARYNAMENODE_OPTS=$HADOOP_NAMENODE_OPTS\r\n\r\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\r\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\r\n\r\n# On secure datanodes, user to run the datanode as after dropping privileges\r\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\r\n\r\n# Extra ssh options.  Empty by default.\r\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\r\n\r\n# Where log files are stored.  $HADOOP_HOME/logs by default.\r\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\r\n\r\n# History server logs\r\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\r\n\r\n# Where log files are stored in the secure data environment.\r\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_DN_USER\r\n\r\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\r\n# e
 xport HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\r\n\r\n# host:path where hadoop code should be rsync'd from.  Unset by default.\r\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\r\n\r\n# Seconds to sleep between slave commands.  Unset by default.  This\r\n# can be useful in large clusters, where, e.g., slave rsyncs can\r\n# otherwise arrive faster than the master can service them.\r\n# export HADOOP_SLAVE_SLEEP=0.1\r\n\r\n# The directory where pid files are stored. /tmp by default.\r\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\r\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\r\n\r\n# History server pid\r\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\r\n\r\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\r\n\r\n# A string representing this instance of hadoop. $USER by default.\r\nexport HADOOP_IDENT_STRING=$USER\r\n\r\n# The scheduling priority for daemon processes.  See 'm
 an nice'.\r\n\r\n# export HADOOP_NICENESS=10\r\n\r\n# Use libraries from standard classpath\r\nJAVA_JDBC_LIBS=\"\"\r\n#Add libraries required by mysql connector\r\nfor jarFile in `ls /usr/share/java/*mysql* 2>/dev/null`\r\ndo\r\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\r\ndone\r\n# Add libraries required by oracle connector\r\nfor jarFile in `ls /usr/share/java/*ojdbc* 2>/dev/null`\r\ndo\r\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\r\ndone\r\n# Add libraries required by nodemanager\r\nMAPREDUCE_LIBS={{mapreduce_libs_path}}\r\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}:/usr/hdp/current/eagle/lib/log4jkafka/lib/*\r\n\r\n# added to the HADOOP_CLASSPATH\r\nif [ -d \"/usr/hdp/current/tez-client\" ]; then\r\n  if [ -d \"/etc/tez/conf/\" ]; then\r\n    # When using versioned RPMs, the tez-client will be a symlink to the current folder of tez in HDP.\r\n    export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:/usr/hdp/current/tez-client/*:/usr/hdp/current/tez
 -client/lib/*:/etc/tez/conf/\r\n  fi\r\nfi\r\n\r\n# Setting path to hdfs command line\r\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\r\n\r\n# Mostly required for hadoop 2.0\r\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\r\n\r\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\r\n"
-	  }
-        }
-    },
-    {
-      "hdfs-log4j": {
-        "properties": {
-          "content" : "\r\n#\r\n# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n#\r\n#  http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n#\r\n\r\n\r\n# Define some default values that can be overridden by system properties\r\n# To change daemon root logger use hadoo
 p_root_logger in hadoop-env\r\nhadoop.root.logger=INFO,console\r\nhadoop.log.dir=.\r\nhadoop.log.file=hadoop.log\r\n\r\n\r\n# Define the root logger to the system property \"hadoop.root.logger\".\r\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\r\n\r\n# Logging Threshold\r\nlog4j.threshhold=ALL\r\n\r\n#\r\n# Daily Rolling File Appender\r\n#\r\n\r\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\r\n\r\n# Rollver at midnight\r\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\r\n\r\n# 30-day backup\r\n#log4j.appender.DRFA.MaxBackupIndex=30\r\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\r\n\r\n# Pattern format: Date LogLevel LoggerName LogMessage\r\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\n# Debugging Pattern format\r\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\r\n\r\n\r\n#\r\n# console\r\n# Add \"console\" to rootlog
 ger above if you want to use this\r\n#\r\n\r\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\r\nlog4j.appender.console.target=System.err\r\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\r\n\r\n#\r\n# TaskLog Appender\r\n#\r\n\r\n#Default values\r\nhadoop.tasklog.taskid=null\r\nhadoop.tasklog.iscleanup=false\r\nhadoop.tasklog.noKeepSplits=4\r\nhadoop.tasklog.totalLogFileSize=100\r\nhadoop.tasklog.purgeLogSplits=true\r\nhadoop.tasklog.logsRetainHours=12\r\n\r\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\r\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\r\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\r\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\r\n\r\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\n\r\n#\r\n#Security audit appender\r\
 n#\r\nhadoop.security.logger=INFO,console\r\nhadoop.security.log.maxfilesize=256MB\r\nhadoop.security.log.maxbackupindex=20\r\nlog4j.category.SecurityLogger=${hadoop.security.logger}\r\nhadoop.security.log.file=SecurityAuth.audit\r\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\r\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\r\n\r\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\r\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\r\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\r\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\r\n\r\n#\r\n# hdfs audit l
 ogging\r\n#\r\nhdfs.audit.logger=INFO,console\r\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\r\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false\r\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\r\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\r\n\r\nlog4j.appender.KAFKA_HDFS_AUDIT=org.apache.eagle.log4j.kafka.KafkaLog4jAppender\r\nlog4j.appender.KAFKA_HDFS_AUDIT.Topic=sandbox_hdfs_audit_log\r\nlog4j.appender.KAFKA_HDFS_AUDIT.BrokerList=sandbox.eagle.incubator.apache.org:6667\r\nlog4j.appender.KAFKA_HDFS_AUDIT.KeyClass=org.apache.eagle.log4j.kafka.hadoop.AuditLogKeyer\r\nlog4j.appender.KAFKA_HDFS_AUDIT.Layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.KAFKA_HDFS_AUDIT
 .Layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.KAFKA_HDFS_AUDIT.ProducerType=async\r\nlog4j.appender.KAFKA_HDFS_AUDIT.BatchSize=1\r\nlog4j.appender.KAFKA_HDFS_AUDIT.QueueSize=1\r\n\r\n#\r\n# mapred audit logging\r\n#\r\nmapred.audit.logger=INFO,console\r\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\r\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\r\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\r\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\r\n\r\n#\r\n# Rolling File Appender\r\n#\r\n\r\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\r\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\r\n\r\n# Logfile size and and 30-day backups\r\nlog4j.appender.RFA.MaxFileSize=256MB\r\
 nlog4j.appender.RFA.MaxBackupIndex=10\r\n\r\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\r\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\r\n\r\n\r\n# Custom Logging levels\r\n\r\nhadoop.metrics.log.level=INFO\r\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\r\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\r\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\r\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\r\n\r\n# Jets3t library\r\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\r\n\r\n#\r\n# Null Appender\r\n# Trap security logger on the hadoop client side\r\n#\r\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\r\n\r\n#\r\n# Event Counter Appender\r\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\r\n#\r\nlog4j.appender.EventCounter
 =org.apache.hadoop.log.metrics.EventCounter\r\n\r\n# Removes \"deprecated\" messages\r\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\r\n\r\n#\r\n# HDFS block state change log from block manager\r\n#\r\n# Uncomment the following to suppress normal block state change\r\n# messages from BlockManager in NameNode.\r\n#log4j.logger.BlockStateChange=WARN\r\n"
-         }
-      }
-    }
-  ],
-  "host_groups": [
-    {
-      "name": "master",
-      "components": [
-        {
-          "name": "APP_TIMELINE_SERVER"
-        },
-        {
-          "name": "HISTORYSERVER"
-        },
-        {
-          "name": "HBASE_REGIONSERVER"
-        },
-        {
-          "name": "WEBHCAT_SERVER"
-        },
-        {
-          "name": "HCAT"
-        },
-        {
-          "name": "HBASE_CLIENT"
-        },
-        {
-          "name": "NAMENODE"
-        },
-        {
-          "name": "AMBARI_SERVER"
-        },
-        {
-          "name": "HDFS_CLIENT"
-        },
-        {
-          "name": "HIVE_CLIENT"
-        },
-        {
-          "name": "NODEMANAGER"
-        },
-        {
-          "name": "DATANODE"
-        },
-        {
-          "name": "RESOURCEMANAGER"
-        },
-        {
-          "name": "ZOOKEEPER_SERVER"
-        },
-        {
-          "name": "ZOOKEEPER_CLIENT"
-        },
-        {
-          "name": "HBASE_MASTER"
-        },
-        {
-          "name": "HIVE_SERVER"
-        },
-        {
-          "name": "SECONDARY_NAMENODE"
-        },
-        {
-          "name": "HIVE_METASTORE"
-        },
-        {
-          "name": "YARN_CLIENT"
-        },
-        {
-          "name": "MAPREDUCE2_CLIENT"
-        },
-        {
-          "name": "MYSQL_SERVER"
-        },
-        { "name": "GANGLIA_SERVER"},
-
-	{ "name": "GANGLIA_MONITOR"},
-	
-	{ "name": "KAFKA_BROKER"},
-        {
-          "name" : "DRPC_SERVER"
-        },
-        {
-          "name" : "NIMBUS"
-        },
-        {
-          "name" : "STORM_UI_SERVER"
-        },
-        { "name" : "SUPERVISOR"}
-      ],
-
-      "cardinality": "1"
-    }
-  ],
-  "Blueprints": {
-    "blueprint_name": "hdp-singlenode-eagle",
-    "stack_name": "HDP",
-    "stack_version": "2.2"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/install-cluster.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/install-cluster.sh b/eagle-external/eagle-docker/resource/install-cluster.sh
deleted file mode 100755
index 4acd384..0000000
--- a/eagle-external/eagle-docker/resource/install-cluster.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-
-export PATH=/usr/jdk64/jdk1.7.0_67/bin:$PATH
-
-
-./ambari-shell.sh << EOF
-blueprint add --file /tmp/eagle-singlenode.json
-blueprint add --file /tmp/eagle-multinode.json
-cluster build --blueprint $BLUEPRINT
-cluster autoAssign
-cluster create --exitOnFinish true
-EOF
-
-clear
-
-SERF_RPC_ADDR=${AMBARISERVER_PORT_7373_TCP##*/}
-serf event --rpc-addr=$SERF_RPC_ADDR eagle
-
-./wait-for-eagle.sh
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/serf/etc/ambari.json
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/serf/etc/ambari.json b/eagle-external/eagle-docker/resource/serf/etc/ambari.json
deleted file mode 100644
index 4409e84..0000000
--- a/eagle-external/eagle-docker/resource/serf/etc/ambari.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "event_handlers": [
-    "member-join=/usr/local/serf/handlers/ambari-bootstrap",
-    "user:eagle=/usr/local/serf/handlers/eagle"
-  ],
-  "tags" : {
-    "ambari-agent": "true"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/serf/handlers/eagle
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/serf/handlers/eagle b/eagle-external/eagle-docker/resource/serf/handlers/eagle
deleted file mode 100755
index 7f7df4b..0000000
--- a/eagle-external/eagle-docker/resource/serf/handlers/eagle
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# install Eagle on the Ambari server instance
-if [[ "$SERF_TAG_AMBARI_SERVER" == "true" ]] ;then
-  echo run eagle install script
-  nohup /usr/hdp/current/eagle/deploy.sh > /var/log/eagle-deploy.log
-fi

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/wait-for-eagle.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/wait-for-eagle.sh b/eagle-external/eagle-docker/resource/wait-for-eagle.sh
deleted file mode 100755
index 3b6ab11..0000000
--- a/eagle-external/eagle-docker/resource/wait-for-eagle.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-: ${EAGLE_HOST:=$AMBARISERVER_PORT_9099_TCP_ADDR}
-: ${SLEEP:=2}
-: ${DEBUG:=1}
-
-: ${EAGLE_HOST:? eagle server address is mandatory, fallback is a linked containers exposed 9099}
-
-debug() {
-  [ $DEBUG -gt 0 ] && echo [DEBUG] "$@" 1>&2
-}
-
-get-server-state() {
-  curl -s -o /dev/null -w "%{http_code}" $AMBARISERVER_PORT_9099_TCP_ADDR:9099/eagle-service/index.html
-}
-
-debug waits for eagle to start on: $EAGLE_HOST
-while ! get-server-state | grep 200 &>/dev/null ; do
-  [ $DEBUG -gt 0 ] && echo -n .
-  sleep $SLEEP
-done
-[ $DEBUG -gt 0 ] && echo
-debug eagle web started: $EAGLE_HOST:9099/eagle-service

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/pom.xml b/eagle-external/eagle-log4jkafka/pom.xml
deleted file mode 100644
index 2c4871b..0000000
--- a/eagle-external/eagle-log4jkafka/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-external-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <packaging>jar</packaging>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>eagle-log4jkafka</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.slf4j</groupId>-->
-            <!--<artifactId>slf4j-log4j12</artifactId>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka-clients</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka_${scala.version}</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.scalatest</groupId>
-            <artifactId>scalatest_${scala.version}</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <sourceDirectory>src/main/scala</sourceDirectory>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>compile</goal>
-                            <goal>testCompile</goal>
-                        </goals>
-                        <configuration>
-                            <args>
-                                <arg>-make:transitive</arg>
-                                <arg>-dependencyfile</arg>
-                                <arg>${project.build.directory}/.scala_dependencies</arg>
-                            </args>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <useFile>false</useFile>
-                    <disableXmlReport>true</disableXmlReport>
-                    <includes>
-                        <include>**/*Test.*</include>
-                        <include>**/Test*.*</include>
-                        <include>**/*Suite.*</include>
-                    </includes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/build.xml</descriptor>
-                    <finalName>eagle-log4jkafka</finalName>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/assembly/build.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/assembly/build.xml b/eagle-external/eagle-log4jkafka/src/assembly/build.xml
deleted file mode 100644
index 54030eb..0000000
--- a/eagle-external/eagle-log4jkafka/src/assembly/build.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.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.
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>build</id>
-    <formats>
-        <format>dir</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>lib/</outputDirectory>
-            <useProjectArtifact>false</useProjectArtifact>
-            <unpack>false</unpack>
-            <scope>runtime</scope>
-            <includes>
-                <include>org.apache.kafka:kafka_2.10</include>
-                <include>org.apache.kafka:kafka-clients</include>
-                <include>com.yammer.metrics:metrics-core</include>
-                <include>org.scala-lang:scala-library</include>
-            </includes>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>${project.basedir}/target</directory>
-            <outputDirectory>lib/</outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-            <excludes>
-                <exclude>*-tests.jar</exclude>
-                <exclude>*-sources.jar</exclude>
-            </excludes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/target/conf</directory>
-            <outputDirectory>conf/</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/resources/conf/log4j-template.properties
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/resources/conf/log4j-template.properties b/eagle-external/eagle-log4jkafka/src/main/resources/conf/log4j-template.properties
deleted file mode 100644
index d67ea03..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/resources/conf/log4j-template.properties
+++ /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.
-
-
-# Name configure audit appender through "hdfs.audit.logger"
-#hdfs.audit.logger=INFO,console, KAFKA_HDFS_AUDIT,DRFAAUDIT
-#log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}
-#log4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false
-#
-
-log4j.appender.KAFKA_HDFS_AUDIT=org.apache.eagle.log4j.kafka.KafkaLog4jAppender
-log4j.appender.KAFKA_HDFS_AUDIT.Topic=sandbox_hdfs_audit_log
-log4j.appender.KAFKA_HDFS_AUDIT.BrokerList=sandbox.hortonworks.com:6667
-log4j.appender.KAFKA_HDFS_AUDIT.KeyClass=org.apache.eagle.log4j.kafka.hadoop.AuditLogKeyer
-log4j.appender.KAFKA_HDFS_AUDIT.Layout=org.apache.log4j.PatternLayout
-log4j.appender.KAFKA_HDFS_AUDIT.Layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
-log4j.appender.KAFKA_HDFS_AUDIT.ProducerType=async
-log4j.appender.KAFKA_HDFS_AUDIT.BatchSize=1
-log4j.appender.KAFKA_HDFS_AUDIT.QueueSize=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/JKafkaLog4jAppender.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/JKafkaLog4jAppender.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/JKafkaLog4jAppender.scala
deleted file mode 100644
index b3519cc..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/JKafkaLog4jAppender.scala
+++ /dev/null
@@ -1,136 +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.log4j.kafka
-
-import java.util.{Date, Properties}
-
-import kafka.producer.async.MissingConfigException
-import kafka.utils.{Logging, Utils}
-import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord}
-import org.apache.log4j.AppenderSkeleton
-import org.apache.log4j.helpers.LogLog
-import org.apache.log4j.spi.LoggingEvent
-
-class JKafkaLog4jAppender extends AppenderSkeleton with Logging {
-  var topic: String = null
-  var brokerList: String = null
-  var compressionType: String = null
-  var retries: Int = 0
-  var requiredNumAcks: Int = Int.MaxValue
-  var syncSend: Boolean = false
-
-  var keyClass: String = null
-  var keyer: Keyer = null
-
-  var topicClass: String = null
-  var topicPicker: TopicPicker = null
-
-  private var producer: KafkaProducer[Array[Byte],Array[Byte]] = null
-
-  def getTopic: String = topic
-  def setTopic(topic: String) { this.topic = topic }
-
-  def getBrokerList: String = brokerList
-  def setBrokerList(brokerList: String) { this.brokerList = brokerList }
-
-  def getCompressionType: String = compressionType
-  def setCompressionType(compressionType: String) { this.compressionType = compressionType }
-
-  def getRequiredNumAcks: Int = requiredNumAcks
-  def setRequiredNumAcks(requiredNumAcks: Int) { this.requiredNumAcks = requiredNumAcks }
-
-  def getSyncSend: Boolean = syncSend
-  def setSyncSend(syncSend: Boolean) { this.syncSend = syncSend }
-
-  def getRetries: Int = retries
-  def setRetries(retries: Int) { this.retries = retries }
-
-  def getKeyClass: String = keyClass
-  def setKeyClass(keyClass: String) { this.keyClass = keyClass }
-
-  def getTopicClass: String  = topicClass
-  def setTopicClass(topicClass: String) { this.topicClass = topicClass }
-
-  var keyPattern: String = null
-
-  def getKeyPattern:String = keyPattern
-
-  def setKeyPattern(keyPattern: String) { this.keyPattern = keyPattern }
-
-  override def activateOptions() {
-    // check for config parameter validity
-    val props = new Properties()
-    if(brokerList != null)
-      props.put(org.apache.kafka.clients.producer.ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, brokerList)
-    if(props.isEmpty)
-      throw new MissingConfigException("The bootstrap servers property should be specified")
-    
-    // if(topic == null)
-    if(topic == null && topicClass == null)
-      throw new MissingConfigException("topic must be specified by the Kafka log4j appender")
-
-    props.put("topic",topic)
-
-    if(keyPattern != null) props.put("keyPattern", keyPattern)
-
-    if(compressionType != null) props.put(org.apache.kafka.clients.producer.ProducerConfig.COMPRESSION_TYPE_CONFIG, compressionType)
-    if(requiredNumAcks != Int.MaxValue) props.put(org.apache.kafka.clients.producer.ProducerConfig.ACKS_CONFIG, requiredNumAcks.toString)
-    if(retries > 0) props.put(org.apache.kafka.clients.producer.ProducerConfig.RETRIES_CONFIG, retries.toString)
-    props.put(org.apache.kafka.clients.producer.ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer")
-    props.put(org.apache.kafka.clients.producer.ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArraySerializer")
-    producer = new KafkaProducer[Array[Byte],Array[Byte]](props)
-
-    if(keyClass != null){
-      keyer = Utils.createObject[Keyer](keyClass,props)
-      LogLog.debug("Instantiated Key class " +  keyClass)
-    }
-
-    if(topicClass != null){
-      topicPicker = Utils.createObject[TopicPicker](topicClass,props)
-      LogLog.debug("Instantiated Topic class: " + topicClass)
-    }
-    LogLog.debug("Kafka producer connected to " +  brokerList)
-    LogLog.debug("Logging for topic: " + topic)
-  }
-
-  override def append(event: LoggingEvent)  {
-    val message = subAppend(event)
-    LogLog.debug("[" + new Date(event.getTimeStamp).toString + "]" + message)
-    // val response = producer.send(new ProducerRecord[Array[Byte],Array[Byte]](topic, message.getBytes()))
-    val keyBytes = if(keyer != null) keyer.getKey(message).getBytes() else null
-    val messageTopic = if(topicPicker != null) topicPicker.getTopic(message) else topic
-    val response = producer.send(new ProducerRecord[Array[Byte],Array[Byte]](messageTopic, keyBytes, message.getBytes()))
-    if (syncSend) response.get
-  }
-
-  def subAppend(event: LoggingEvent): String = {
-    if(this.layout == null)
-      event.getRenderedMessage
-    else
-      this.layout.format(event)
-  }
-
-  override def close() {
-    if(!this.closed) {
-      this.closed = true
-      producer.close()
-    }
-  }
-
-  override def requiresLayout: Boolean = true
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/KafkaLog4jAppender.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/KafkaLog4jAppender.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/KafkaLog4jAppender.scala
deleted file mode 100644
index ee09294..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/KafkaLog4jAppender.scala
+++ /dev/null
@@ -1,163 +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.log4j.kafka
-
-import java.util.{Date, Properties}
-
-import kafka.producer.async.MissingConfigException
-import kafka.producer.{KeyedMessage, Producer, ProducerConfig}
-import kafka.utils.{Logging, Utils}
-import org.apache.log4j.AppenderSkeleton
-import org.apache.log4j.helpers.LogLog
-import org.apache.log4j.spi.LoggingEvent
-
-class KafkaLog4jAppender extends AppenderSkeleton with Logging {
-  var topic:String = null
-  var serializerClass:String = null
-  var brokerList:String = null
-  var producerType:String = null
-  var compressionCodec:String = null
-  var enqueueTimeout:String = null
-  var queueSize:String = null
-  var requiredNumAcks: Int = Int.MaxValue
-
-  var keyClass: String = null
-  var keyer: Keyer = null
-
-  var topicClass: String = null
-  var topicPicker: TopicPicker = null
-
-  var batchSize:Int = 20
-
-  var keyPattern: String = null
-
-  def getKeyPattern:String = keyPattern
-
-  def setKeyPattern(keyPattern: String) { this.keyPattern = keyPattern }
-
-  private var producer: Producer[String, String] = null
-
-  def getTopic:String = topic
-  def setTopic(topic: String) { this.topic = topic }
-
-  def getBrokerList:String = brokerList
-  def setBrokerList(brokerList: String) { this.brokerList = brokerList }
-
-  def getSerializerClass:String = serializerClass
-  def setSerializerClass(serializerClass:String) { this.serializerClass = serializerClass }
-
-  def getProducerType:String = producerType
-  def setProducerType(producerType:String) { this.producerType = producerType }
-
-  def getCompressionCodec:String = compressionCodec
-  def setCompressionCodec(compressionCodec:String) { this.compressionCodec = compressionCodec }
-
-  def getEnqueueTimeout:String = enqueueTimeout
-  def setEnqueueTimeout(enqueueTimeout:String) { this.enqueueTimeout = enqueueTimeout }
-
-  def getQueueSize:String = queueSize
-  def setQueueSize(queueSize:String) { this.queueSize = queueSize }
-
-  def getRequiredNumAcks:Int = requiredNumAcks
-  def setRequiredNumAcks(requiredNumAcks:Int) { this.requiredNumAcks = requiredNumAcks }
-
-  def getKeyClass: String = keyClass
-  def setKeyClass(keyClass: String) { this.keyClass = keyClass }
-
-  def getTopicClass: String  = topicClass
-  def setTopicClass(topicClass: String) { this.topicClass = topicClass }
-
-  def getBatchSize:Int = batchSize
-  def setBatchSize(batchSize:Int) { this.batchSize = batchSize };
-
-  override def activateOptions() {
-    // check for config parameter validity
-    val props = new Properties()
-    if(brokerList != null)
-      props.put("metadata.broker.list", brokerList)
-    if(props.isEmpty)
-      throw new MissingConfigException("The metadata.broker.list property should be specified")
-    if(topic == null)
-      throw new MissingConfigException("topic must be specified by the Kafka log4j appender")
-    if(serializerClass == null) {
-      serializerClass = "kafka.serializer.StringEncoder"
-      LogLog.debug("Using default encoder - kafka.serializer.StringEncoder")
-    }
-
-    props.put("serializer.class", serializerClass)
-    props.put("batch.num.messages",batchSize.toString)
-
-    if(keyPattern != null) props.put("keyPattern", keyPattern)
-
-    //These have default values in ProducerConfig and AsyncProducerConfig. We don't care if they're not specified
-    if(producerType != null) props.put("producer.type", producerType)
-    if(compressionCodec != null) props.put("compression.codec", compressionCodec)
-    if(enqueueTimeout != null) props.put("queue.enqueue.timeout.ms", enqueueTimeout)
-    if(queueSize != null) props.put("queue.buffering.max.messages", queueSize)
-    if(requiredNumAcks != Int.MaxValue) props.put("request.required.acks", requiredNumAcks.toString)
-
-    val config : ProducerConfig = new ProducerConfig(props)
-
-    producer = new Producer[String, String](config)
-
-    if(keyClass != null){
-      keyer = Utils.createObject[Keyer](keyClass,props)
-      LogLog.debug("Instantiated Key class " +  keyClass)
-    }
-
-    if(topicClass != null) {
-      try {
-        topicPicker = Utils.createObject[TopicPicker](topicClass, props)
-        LogLog.debug("Instantiated Topic class: " + topicClass)
-      }catch {
-        case e: Exception =>{
-          LogLog.error("Failed to instantiate Topic class: "+topicClass,e)
-        }
-      }
-    }
-
-    LogLog.debug("Kafka producer connected to " +  config.brokerList)
-    LogLog.debug("Logging for topic: " + topic)
-  }
-
-  override def append(event: LoggingEvent)  {
-    val message = subAppend(event)
-    LogLog.debug("[" + new Date(event.getTimeStamp).toString + "]" + message)
-
-    val messageKey = if(keyer != null) keyer.getKey(message) else null
-    val messageTopic = if(topicPicker != null) topicPicker.getTopic(message) else topic
-
-    val messageData = new KeyedMessage[String, String](messageTopic, messageKey, message)
-    producer.send(messageData)
-  }
-
-  def subAppend(event: LoggingEvent): String = {
-    if(this.layout == null)
-      event.getRenderedMessage
-    else
-      this.layout.format(event)
-  }
-
-  override def close() {
-    if(!this.closed) {
-      this.closed = true
-      producer.close()
-    }
-  }
-
-  override def requiresLayout: Boolean = false
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/Keyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/Keyer.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/Keyer.scala
deleted file mode 100644
index b25ffbe..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/Keyer.scala
+++ /dev/null
@@ -1,32 +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.log4j.kafka
-
-/**
- * Keyer is used to derive a key from the message. A Key is used to determine kafka partition for the message.
- *
- * Implementations will be constructed via reflection and are required to have a constructor that takes a single
- * VerifiableProperties instance--this allows passing configuration properties into the Keyer implementation.
- */
-trait Keyer {
-  /**
-    * Uses the key to calculate a partition bucket id for routing
-    * the data to the appropriate broker partition
-   * @return returns a key based on the message
-   */
-  def getKey(value: String): String
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/TopicPicker.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/TopicPicker.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/TopicPicker.scala
deleted file mode 100644
index 8ef1ff9..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/TopicPicker.scala
+++ /dev/null
@@ -1,32 +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.log4j.kafka
-
-/**
- * TopicPicker is used to derive a topic from the message.
- *
- * Implementations will be constructed via reflection and are required to have a constructor that takes a single
- * VerifiableProperties instance--this allows passing configuration properties into the TopicPicker implementation.
- *
- * @since  6/26/15
- */
-trait TopicPicker {
-  /**
-   * returns a topic based on the message.
-   */
-  def getTopic(value: String): String
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogKeyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogKeyer.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogKeyer.scala
deleted file mode 100644
index f435d9f..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogKeyer.scala
+++ /dev/null
@@ -1,33 +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.log4j.kafka.hadoop
-
-import java.util.Properties
-import org.apache.eagle.log4j.kafka.Keyer
-
-class AuditLogKeyer(props:Properties) extends Keyer{
-  /**
-   * Uses the key to calculate a partition bucket id for routing
-   * the data to the appropriate broker partition
-   * @return returns a key based on the message
-   */
-  override def getKey(msg: String): String = if(msg != null) AuditLogKeyer.getKey(msg.split("\\s+")) else null
-}
-
-object AuditLogKeyer{
-  def getKey(fields: Array[String]):String = if(fields.length > 5) AuditLogUtils.parseUser(fields(5)) else null
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogUtils.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogUtils.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogUtils.scala
deleted file mode 100644
index 8d206f6..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditLogUtils.scala
+++ /dev/null
@@ -1,29 +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.log4j.kafka.hadoop
-
-object AuditLogUtils {
-  def parseUser(userText: String): String = {
-    var user:String = userText.substring(userText.indexOf("=")+1)
-    if(user.indexOf("@") > -1){
-      user = user.substring(0,user.indexOf("@"))
-    }
-    user
-  }
-
-  def parseIP(ipPort:String):String = ipPort.substring(0,ipPort.indexOf(':') + 1)
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditSecurityLogKeyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditSecurityLogKeyer.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditSecurityLogKeyer.scala
deleted file mode 100644
index 38ff72a..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/AuditSecurityLogKeyer.scala
+++ /dev/null
@@ -1,43 +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.log4j.kafka.hadoop
-
-import java.util.Properties
-import org.apache.eagle.log4j.kafka.Keyer
-
-/**
- * @since  6/26/15
- */
-class AuditSecurityLogKeyer(props:Properties) extends Keyer{
-  /**
-   * Uses the key to calculate a partition bucket id for routing
-   * the data to the appropriate broker partition
-   * @return returns a key based on the message
-   *
-   */
-  val AUDITLOG_SOURCE:String = "FSNamesystem.audit:"
-
-  override def getKey(msg: String): String = {
-    val fields: Array[String] = msg.split("\\s+")
-    if(fields.length > 3){
-      if(fields(3).equals(AUDITLOG_SOURCE))
-        AuditLogKeyer.getKey(fields)
-      else
-        SecurityLogKeyer.getKey(fields)
-    } else null
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/FailedAuthenticationFilter.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/FailedAuthenticationFilter.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/FailedAuthenticationFilter.scala
deleted file mode 100644
index 25d781b..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/FailedAuthenticationFilter.scala
+++ /dev/null
@@ -1,42 +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.log4j.kafka.hadoop
-
-import org.apache.log4j.spi.{Filter, LoggingEvent}
-
-/**
- * @since  6/26/15
- */
-class FailedAuthenticationFilter extends Filter{
-
-  override def decide(event: LoggingEvent): Int = {
-    event.getMessage match {
-      case message: String =>
-        val fields: Array[String] = message.split("\\s+")
-        if (fields.length > 5 && fields(3).equals(FailedAuthenticationFilter.AUTH_LOG_SOURCE) && fields(5).equals(FailedAuthenticationFilter.FAILED)) {
-          Filter.DENY
-        }
-      case _ =>
-    }
-    Filter.NEUTRAL
-  }
-}
-
-object FailedAuthenticationFilter{
-  val AUTH_LOG_SOURCE: String = "SecurityLogger.org.apache.hadoop.ipc.Server:"
-  val FAILED: String = "failed"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/GenericLogKeyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/GenericLogKeyer.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/GenericLogKeyer.scala
deleted file mode 100644
index 0deb152..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/GenericLogKeyer.scala
+++ /dev/null
@@ -1,45 +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.log4j.kafka.hadoop
-
-import java.util.Properties
-import java.util.regex.{Matcher, Pattern}
-import org.apache.eagle.log4j.kafka.Keyer
-
-import scala.util.matching.Regex
-
-class GenericLogKeyer(props:Properties) extends Keyer {
-  /**
-   * Uses the key to calculate a partition bucket id for routing
-   * the data to the appropriate broker partition
-   * @return returns a key based on the message
-   */
-  override def getKey(msg: String): String = {
-    val keyPattern = props.getProperty("keyPattern");
-    if(keyPattern == null) return null
-    val pattern = new Regex(keyPattern, "key");
-    val result = pattern.findFirstMatchIn(msg).getOrElse(null);
-    if (result == null) {
-      return null;
-    }
-    return result.group("key");
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogKeyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogKeyer.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogKeyer.scala
deleted file mode 100644
index 4bf87da..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogKeyer.scala
+++ /dev/null
@@ -1,50 +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.log4j.kafka.hadoop
-
-import java.util.Properties
-
-import org.apache.eagle.log4j.kafka.Keyer
-
-/**
- * @since  6/26/15
- */
-class SecurityLogKeyer(props:Properties) extends Keyer{
-  /**
-   * Uses the key to calculate a partition bucket id for routing
-   * the data to the appropriate broker partition
-   * @return returns a key based on the message
-   */
-  override def getKey(msg: String): String = SecurityLogKeyer.getKey(msg.split("\\s+"))
-}
-
-object SecurityLogKeyer{
-  val FAILED:String = "failed"
-  val SUCCESSFUL: String = "successful"
-
-  def getKey(fields:Array[String]):String = {
-    if (fields.length > 5) {
-      if (fields(5) == SUCCESSFUL) {
-        return if (fields.length > 7) AuditLogUtils.parseUser(fields(7)) else null
-      }
-      else if (fields(5) == FAILED) {
-        return if (fields.length > 7) AuditLogUtils.parseIP(fields(7)) else null
-      }
-    }
-    null
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogTopicPicker.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogTopicPicker.scala b/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogTopicPicker.scala
deleted file mode 100644
index 8a2e0ab..0000000
--- a/eagle-external/eagle-log4jkafka/src/main/scala/org/apache/eagle/log4j/kafka/hadoop/SecurityLogTopicPicker.scala
+++ /dev/null
@@ -1,53 +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.log4j.kafka.hadoop
-
-import java.util.Properties
-import org.apache.eagle.log4j.kafka.TopicPicker
-
-/**
- * @since  6/26/15
- */
-class SecurityLogTopicPicker extends TopicPicker{
-  private var failedAuthnTopic: String = null
-  private var securityTopic: String = null
-
-  val FAILED: String = "failed"
-  val TOPIC: String = "Topic"
-
-  def this(props:Properties){
-    this()
-    val topic = props.getProperty(TOPIC)
-    val topics = if(topic!=null) topic.split(",") else Array(topic)
-
-    if(topics != null){
-      if(topics.length > 0) failedAuthnTopic = topics(0)
-      if(topics.length > 1) securityTopic = topics(1)
-    }
-  }
-
-  /**
-   * returns a topic based on the message.
-   */
-  override def getTopic(value: String): String = {
-    val fields = value.split("\\s+")
-    if(fields.length > 5 && fields(5).equals(FAILED))
-      failedAuthnTopic
-    else
-      securityTopic
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/test/resources/log4j.properties b/eagle-external/eagle-log4jkafka/src/test/resources/log4j.properties
deleted file mode 100644
index 85895a8..0000000
--- a/eagle-external/eagle-log4jkafka/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=DEBUG, console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.target=System.err
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
-
-log4j.appender.KAFKA=org.apache.eagle.log4j.kafka.KafkaLog4jAppender
-log4j.appender.KAFKA.Topic=test
-log4j.appender.KAFKA.BrokerList=sandbox.hortonworks.com:6667
-log4j.appender.KAFKA.KeyClass=org.apache.eagle.log4j.kafka.hadoop.AuditLogKeyer
-log4j.appender.KAFKA.Layout=org.apache.log4j.PatternLayout
-log4j.appender.KAFKA.Layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
-log4j.appender.KAFKA.ProducerType=async
-log4j.appender.KAFKA.BatchSize=1
-log4j.appender.KAFKA.QueueSize=1
-
-log4j.logger.eagle.kafka.producer.TestKafkaAppender$=console,KAFKA
-
-#log4j.logger.kafka.utils.VerifiableProperties=INFO,console

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestGenericLogKeyer.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestGenericLogKeyer.scala b/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestGenericLogKeyer.scala
deleted file mode 100644
index 840dfe7..0000000
--- a/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestGenericLogKeyer.scala
+++ /dev/null
@@ -1,46 +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.log4j.kafka
-
-import java.util.Properties
-import org.apache.eagle.log4j.kafka.hadoop.GenericLogKeyer
-import org.scalatest.{FlatSpec, Matchers}
-
-abstract class TestGenericLogKeyer extends FlatSpec with Matchers  {
-  
-    val hdfsMsg = "2015-07-31 01:54:35,161 INFO FSNamesystem.audit: allowed=true ugi=root (auth:TOKEN) ip=/10.0.0.1 cmd=open src=/tmp/private dst=null perm=null"
-    val props = new Properties()
-    props.put("keyPattern", "ugi=(\\w+)[@\\s+]")
-    props.put("keyPattern2", "user=(\\w+),\\s+")
-    val test = new GenericLogKeyer(props)
-    var keyVal = test.getKey(hdfsMsg)
-    println(keyVal)
-  
-    val hbaseMsg = "2015-11-06 13:14:00,741 TRACE SecurityLogger.org.apache.hadoop.hbase.security.access.AccessController: Access allowed for user root; reason: All users allowed; remote address: /192.168.56.101; request: scan; context: (user=root, scope=hbase:meta, family=info, action=READ)"
-    props.put("keyPattern", "user=(\\w+),\\s+")
-    keyVal = test.getKey(hbaseMsg)
-    println(keyVal)
-  
-    //props.put("keyPattern", "user=(\\w+),\\s+")
-    val props1 = new Properties()
-    val test1 = new GenericLogKeyer(props1)
-    keyVal = test1.getKey(hbaseMsg)
-    println(keyVal)
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestKafkaLog4jAppender.scala
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestKafkaLog4jAppender.scala b/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestKafkaLog4jAppender.scala
deleted file mode 100644
index 3bd9e0e..0000000
--- a/eagle-external/eagle-log4jkafka/src/test/scala/org/apache/eagle/log4j/kafka/TestKafkaLog4jAppender.scala
+++ /dev/null
@@ -1,33 +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.log4j.kafka
-
-import org.scalatest.{Matchers, FlatSpec}
-
-abstract class TestKafkaLog4jAppender extends FlatSpec with Matchers {
-  
-    val test = new KafkaLog4jAppender();
-    test.topic = "sandbox_hdfs_audit_log"
-    test.brokerList = "sandbox.hortonworks.com:6667"
-    test.keyClass = "eagle.log4j.kafka.hadoop.AuditLogKeyer"
-    test.keyPattern = "user=(\\w+),\\s+"
-    test.producerType = "async"
-    test.activateOptions()
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/.gitignore
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/.gitignore b/eagle-external/hadoop_jmx_collector/.gitignore
deleted file mode 100644
index adad264..0000000
--- a/eagle-external/hadoop_jmx_collector/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-config.json
-*.pyc
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/README.md
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/README.md b/eagle-external/hadoop_jmx_collector/README.md
deleted file mode 100644
index cd8d887..0000000
--- a/eagle-external/hadoop_jmx_collector/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--
-{% comment %}
-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.
-{% endcomment %}
--->
-
-
-# Hadoop Jmx Collector
-
-These scripts help to collect Hadoop jmx and evently sent the metrics to stdout or Kafka. Tested with Python 2.7.
-
-### How to use it
-
-  1. Edit the configuration file (json file). For example:
-  
-            {
-             "env": {
-              "site": "sandbox"
-             },
-             "input": {
-              "component": "namenode",
-              "port": "50070",
-              "https": false
-             },
-             "filter": {
-              "monitoring.group.selected": ["hadoop", "java.lang"]
-             },
-             "output": {
-             }
-            }
-
-  2. Run the scripts
-  
-        # for general use
-        python hadoop_jmx_kafka.py > 1.txt
-
-
-### Edit `eagle-collector.conf`
-
-* input
-
-  "port" defines the hadoop service port, such as 50070 => "namenode", 60010 => "hbase master".
-
-* filter
-
-  "monitoring.group.selected" can filter out beans which we care about.
-
-* output 
-  
-  if we left it empty, then the output is stdout by default. 
-
-        "output": {}
-        
-  It also supports Kafka as its output. 
-
-        "output": {
-          "kafka": {
-            "topic": "test_topic",
-            "brokerList": [ "sandbox.hortonworks.com:6667"]
-          }
-        }
-      

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/config-sample.json
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/config-sample.json b/eagle-external/hadoop_jmx_collector/config-sample.json
deleted file mode 100644
index 57c9aae..0000000
--- a/eagle-external/hadoop_jmx_collector/config-sample.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-   "env": {
-    "site": "sandbox",
-     "name_node": {
-       "hosts":["sandbox.hortonworks.com"],
-       "port":50070,
-       "https":false
-     },
-     "resource_manager":{
-       "hosts":["sandbox.hortonworks.com"],
-       "port":50030,
-       "https":false
-     }
-   },
-   "input": {
-    "component": "namenode",
-    "port": "50070",
-    "https": false
-   },
-   "filter": {
-    "monitoring.group.selected": ["hadoop", "java.lang"]
-   },
-   "output": {
-     "kafka": {
-       "topic": "nn_jmx_metric_sandbox",
-       "brokerList": ["sandbox.hortonworks.com:6667"]
-     }
-   }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/hadoop_ha_checker.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/hadoop_ha_checker.py b/eagle-external/hadoop_jmx_collector/hadoop_ha_checker.py
deleted file mode 100644
index 2a5096b..0000000
--- a/eagle-external/hadoop_jmx_collector/hadoop_ha_checker.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# !/usr/bin/python
-#
-# 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.
-#
-
-from metric_collector import MetricCollector, JmxReader, YarnWSReader, Runner
-import logging
-
-class HadoopNNHAChecker(MetricCollector):
-    def run(self):
-        if not self.config["env"].has_key("name_node"):
-            logging.warn("Do nothing for HadoopNNHAChecker as config of env.name_node not found")
-            return
-        name_node_config = self.config["env"]["name_node"]
-        hosts = name_node_config["hosts"]
-        port = name_node_config["port"]
-        https = name_node_config["https"]
-
-        total_count = len(hosts)
-
-        self.collect({
-            "component": "namenode",
-            "metric": "hadoop.namenode.hastate.total.count",
-            "value": total_count
-        })
-
-        active_count = 0
-        standby_count = 0
-        failed_count = 0
-
-        for host in hosts:
-            try:
-                bean = JmxReader(host, port, https).open().get_jmx_bean_by_name(
-                        "Hadoop:service=NameNode,name=FSNamesystem")
-                logging.debug(host + " is " + bean["tag.HAState"])
-                if bean["tag.HAState"] == "active":
-                    active_count += 1
-                else:
-                    standby_count += 1
-            except Exception as e:
-                logging.exception("failed to read jmx from " + host)
-                failed_count += 1
-
-        self.collect({
-            "component": "namenode",
-            "metric": "hadoop.namenode.hastate.active.count",
-            "value": active_count
-        })
-
-        self.collect({
-            "component": "namenode",
-            "metric": "hadoop.namenode.hastate.standby.count",
-            "value": standby_count
-        })
-
-        self.collect({
-            "component": "namenode",
-            "metric": "hadoop.namenode.hastate.failed.count",
-            "value": failed_count
-        })
-
-
-class HadoopRMHAChecker(MetricCollector):
-    def run(self):
-        if not self.config["env"].has_key("resource_manager"):
-            logging.warn("Do nothing for HadoopRMHAChecker as config of env.resource_manager not found")
-            return
-        name_node_config = self.config["env"]["resource_manager"]
-        hosts = name_node_config["hosts"]
-        port = name_node_config["port"]
-        https = name_node_config["https"]
-
-        total_count = len(hosts)
-
-        self.collect({
-            "component": "namenode",
-            "metric": "hadoop.resourcemanager.hastate.total.count",
-            "value": total_count
-        })
-
-        active_count = 0
-        standby_count = 0
-        failed_count = 0
-
-        for host in hosts:
-            try:
-                cluster_info = YarnWSReader(host, port, https).read_cluster_info()
-                if cluster_info["clusterInfo"]["haState"] == "ACTIVE":
-                    active_count += 1
-                else:
-                    standby_count += 1
-            except Exception as e:
-                logging.exception("Failed to read yarn ws from " + host)
-                failed_count += 1
-
-        self.collect({
-            "component": "resourcemanager",
-            "metric": "hadoop.resourcemanager.hastate.active.count",
-            "value": active_count
-        })
-
-        self.collect({
-            "component": "resourcemanager",
-            "metric": "hadoop.resourcemanager.hastate.standby.count",
-            "value": standby_count
-        })
-
-        self.collect({
-            "component": "resourcemanager",
-            "metric": "hadoop.resourcemanager.hastate.failed.count",
-            "value": failed_count
-        })
-
-if __name__ == '__main__':
-    Runner.run(HadoopNNHAChecker(), HadoopRMHAChecker())
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py b/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
deleted file mode 100644
index 8837c30..0000000
--- a/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# !/usr/bin/python
-#
-# 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.
-#
-
-from metric_collector import JmxMetricCollector,JmxMetricListener,Runner
-import json
-
-class NNSafeModeMetric(JmxMetricListener):
-    def on_metric(self, metric):
-        if metric["metric"] == "hadoop.namenode.fsnamesystemstate.fsstate":
-            if metric["value"] == "safeMode":
-                metric["value"] = 1
-            else:
-                metric["value"] = 0
-            self.collector.collect(metric)
-
-
-class NNHAMetric(JmxMetricListener):
-    PREFIX = "hadoop.namenode.fsnamesystem"
-
-    def on_bean(self, bean):
-        if bean["name"] == "Hadoop:service=NameNode,name=FSNamesystem":
-            if bean[u"tag.HAState"] == "active":
-                self.collector.on_bean_kv(self.PREFIX, "hastate", 0)
-            else:
-                self.collector.on_bean_kv(self.PREFIX, "hastate", 1)
-
-
-class MemortUsageMetric(JmxMetricListener):
-    PREFIX = "hadoop.namenode.jvm"
-
-    def on_bean(self, bean):
-        if bean["name"] == "Hadoop:service=NameNode,name=JvmMetrics":
-            memnonheapusedusage = round(float(bean['MemNonHeapUsedM']) / float(bean['MemNonHeapMaxM']) * 100.0, 2)
-            self.collector.on_bean_kv(self.PREFIX, "memnonheapusedusage", memnonheapusedusage)
-            memnonheapcommittedusage = round(float(bean['MemNonHeapCommittedM']) / float(bean['MemNonHeapMaxM']) * 100,
-                                             2)
-            self.collector.on_bean_kv(self.PREFIX, "memnonheapcommittedusage", memnonheapcommittedusage)
-            memheapusedusage = round(float(bean['MemHeapUsedM']) / float(bean['MemHeapMaxM']) * 100, 2)
-            self.collector.on_bean_kv(self.PREFIX, "memheapusedusage", memheapusedusage)
-            memheapcommittedusage = round(float(bean['MemHeapCommittedM']) / float(bean['MemHeapMaxM']) * 100, 2)
-            self.collector.on_bean_kv(self.PREFIX, "memheapcommittedusage", memheapcommittedusage)
-
-
-class JournalTransactionInfoMetric(JmxMetricListener):
-    PREFIX = "hadoop.namenode.journaltransaction"
-
-    def on_bean(self, bean):
-        if bean.has_key("JournalTransactionInfo"):
-            JournalTransactionInfo = json.loads(bean.get("JournalTransactionInfo"))
-            LastAppliedOrWrittenTxId = float(JournalTransactionInfo.get("LastAppliedOrWrittenTxId"))
-            MostRecentCheckpointTxId = float(JournalTransactionInfo.get("MostRecentCheckpointTxId"))
-            self.collector.on_bean_kv(self.PREFIX, "LastAppliedOrWrittenTxId", LastAppliedOrWrittenTxId)
-            self.collector.on_bean_kv(self.PREFIX, "MostRecentCheckpointTxId", MostRecentCheckpointTxId)
-
-
-if __name__ == '__main__':
-    collector = JmxMetricCollector()
-    collector.register(
-            NNSafeModeMetric(),
-            NNHAMetric(),
-            MemortUsageMetric(),
-            JournalTransactionInfoMetric()
-    )
-    Runner.run(collector)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitignore
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitignore b/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitignore
deleted file mode 100644
index 260dbea..0000000
--- a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitignore
+++ /dev/null
@@ -1,30 +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.
-
-# Eagle - Git Ignore Configuration
-#
-# See: https://github.com/github/gitignore/
-
-*.egg-info
-*.pyc
-.tox
-build
-dist
-MANIFEST
-env
-servers/*/kafka-bin
-.coverage
-.noseids
-docs/_build

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitmodules
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitmodules b/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitmodules
deleted file mode 100644
index fe0f4fb..0000000
--- a/eagle-external/hadoop_jmx_collector/lib/kafka-python/.gitmodules
+++ /dev/null
@@ -1,18 +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.
-
-# Eagle - Git Ignore Configuration
-#
-# See: https://github.com/github/gitignore/
\ No newline at end of file



[30/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStatsDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStatsDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStatsDAO.java
deleted file mode 100644
index 12b2b83..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStatsDAO.java
+++ /dev/null
@@ -1,26 +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.policy;
-
-import java.util.Set;
-
-public interface PolicyDistributionStatsDAO {
-    public void reportPolicyMembership(String policyGroupId, Set<String> policyIds);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistroStatsLogReporter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistroStatsLogReporter.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistroStatsLogReporter.java
deleted file mode 100644
index c4033f0..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistroStatsLogReporter.java
+++ /dev/null
@@ -1,50 +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.policy;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Set;
-
-/**
- * just append log
- */
-public class PolicyDistroStatsLogReporter implements PolicyDistributionStatsDAO{
-    private static Logger LOG = LoggerFactory.getLogger(PolicyDistroStatsLogReporter.class);
-
-    @Override
-    public void reportPolicyMembership(String policyGroupId, Set<String> policyIds) {
-        if(policyIds != null){
-            StringBuilder sb = new StringBuilder();
-            sb.append("policyDistributionStats for " + policyGroupId +", total: " + policyIds.size() + ", [");
-            for(String policyId : policyIds){
-                sb.append(policyId + ",");
-            }
-            if(policyIds.size() > 0){
-                sb.deleteCharAt(sb.length()-1);
-            }
-            sb.append("]");
-            LOG.info(sb.toString());
-        }else{
-            LOG.warn("No policies are assigned to " + policyGroupId);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluationContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluationContext.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluationContext.java
deleted file mode 100644
index 7dad895..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluationContext.java
+++ /dev/null
@@ -1,34 +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.policy;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.policy.executor.IPolicyExecutor;
-
-public class PolicyEvaluationContext<T extends AbstractPolicyDefinitionEntity, K> {
-	
-	public IPolicyExecutor<T, K> alertExecutor;
-	
-	public String policyId;
-	
-	public PolicyEvaluator<T> evaluator;
-	
-	public Collector outputCollector;
-	
-	public ResultRender<T, K> resultRender;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluator.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluator.java
deleted file mode 100644
index 46a63ee..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluator.java
+++ /dev/null
@@ -1,61 +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.policy;
-
-import java.util.Map;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.dataproc.core.ValuesArray;
-
-/***
- * 
- * @param <T> - The policy definition entity
- */
-public interface PolicyEvaluator<T extends AbstractPolicyDefinitionEntity> {
-	/**
-	 * take input and evaluate expression
-	 * input has 3 fields, first is siddhiAlertContext, second one is streamName, the third is map of attribute name/value
-	 * @param input
-	 * @throws Exception
-	 */
-	public void evaluate(ValuesArray input) throws Exception;
-	
-	/**
-	 * notify policy evaluator that policy is updated
-	 */
-	public void onPolicyUpdate(T newAlertDef);
-	
-	/**
-	 * notify policy evaluator that policy is deleted, here is cleanup work for this policy evaluator
-	 */
-	public void onPolicyDelete();
-	
-	/**
-	 * get additional context
-	 */	
-	public Map<String, String> getAdditionalContext();
-
-	/**
-	 * Get markdown status for the policy.
-	 */
-	public boolean isMarkdownEnabled();
-
-	/**
-	 * Get markdown reason for the given policy.
-	 */
-	public String getMarkdownReason();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluatorServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluatorServiceProvider.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluatorServiceProvider.java
deleted file mode 100644
index f862883..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyEvaluatorServiceProvider.java
+++ /dev/null
@@ -1,49 +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.policy;
-
-import java.util.List;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-
-import com.fasterxml.jackson.databind.Module;
-
-/**
- * to provide extensibility, we need a clear differentiation between framework job and provider logic
- * policy evaluator framework:
- * - connect to eagle data source
- * - read all policy definitions
- * - compare with cached policy definitions
- * - figure out if policy is created, deleted or updated
- *   - if policy is created, then invoke onPolicyCreated
- *   - if policy is deleted, then invoke onPolicyDeleted
- *   - if policy is updated, then invoke onPolicyUpdated
- * - for policy report, replace old evaluator engine with new evaluator engine which is created by policy evaluator provider
- * - specify # of executors for this alert executor id
- * - dynamically balance # of policies evaluated by each alert executor
- *   - use zookeeper to balance. eaglePolicies/${alertExecutorId}/${alertExecutorInstanceId} => list of policies
- * 
- * policy evaluator business features:
- * - register mapping between policy type and PolicyEvaluator
- * - create evaluator engine runtime when configuration is changed
- *
- */
-public interface PolicyEvaluatorServiceProvider<T extends AbstractPolicyDefinitionEntity> {
-	String getPolicyType();
-	Class<? extends PolicyEvaluator<T>> getPolicyEvaluator();
-	List<Module> getBindingModules();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyLifecycleMethods.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyLifecycleMethods.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyLifecycleMethods.java
deleted file mode 100644
index ad5d5c9..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyLifecycleMethods.java
+++ /dev/null
@@ -1,27 +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.policy;
-
-import java.util.Map;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-
-public interface PolicyLifecycleMethods<T extends AbstractPolicyDefinitionEntity> {
-	void onPolicyCreated(Map<String, T> added);
-	void onPolicyChanged(Map<String, T> changed);
-	void onPolicyDeleted(Map<String, T> deleted);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyManager.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyManager.java
deleted file mode 100644
index 3f3581d..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyManager.java
+++ /dev/null
@@ -1,61 +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.policy;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.ServiceLoader;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.databind.Module;
-
-public class PolicyManager {
-	private final static Logger LOG = LoggerFactory.getLogger(PolicyManager.class);
-	private static PolicyManager instance = new PolicyManager();
-
-	private ServiceLoader<PolicyEvaluatorServiceProvider> loader;
-	
-	private Map<String, Class<? extends PolicyEvaluator>> policyEvaluators = new HashMap<String, Class<? extends PolicyEvaluator>>();
-	private Map<String, List<Module>> policyModules = new HashMap<String, List<Module>>();
-	
-	private PolicyManager(){
-		loader = ServiceLoader.load(PolicyEvaluatorServiceProvider.class);
-		Iterator<PolicyEvaluatorServiceProvider> iter = loader.iterator();
-		while(iter.hasNext()){
-			PolicyEvaluatorServiceProvider factory = iter.next();
-			LOG.info("Supported policy type : " + factory.getPolicyType());
-			policyEvaluators.put(factory.getPolicyType(), factory.getPolicyEvaluator());
-			policyModules.put(factory.getPolicyType(), factory.getBindingModules());
-		}
-	}
-	
-	public static PolicyManager getInstance(){
-		return instance;
-	}
-	
-	public Class<? extends PolicyEvaluator> getPolicyEvaluator(String policyType){
-		return policyEvaluators.get(policyType);
-	}
-	
-	public List<Module> getPolicyModules(String policyType){
-		return policyModules.get(policyType);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyPartitioner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyPartitioner.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyPartitioner.java
deleted file mode 100644
index fa9620c..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyPartitioner.java
+++ /dev/null
@@ -1,26 +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.policy;
-
-import java.io.Serializable;
-
-/**
- * partition policies so that policies can be distributed into different alert evaluators
- */
-public interface PolicyPartitioner extends Serializable {
-	int partition(int numTotalPartitions, String policyType, String policyId);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/ResultRender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/ResultRender.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/ResultRender.java
deleted file mode 100644
index cc59880..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/ResultRender.java
+++ /dev/null
@@ -1,32 +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.policy;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-
-import java.util.List;
-
-/**
- * @since Dec 17, 2015
- *
- */
-public interface ResultRender<T extends AbstractPolicyDefinitionEntity, K> {
-
-	K render(Config config, List<Object> rets, PolicyEvaluationContext<T, K> siddhiAlertContext, long timestamp);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
deleted file mode 100644
index ca65669..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
+++ /dev/null
@@ -1,75 +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.policy.common;
-
-public class Constants {
-	public final static String ALERT_SERVICE_ENDPOINT_NAME = "AlertService";
-	public final static String ALERT_DEFINITION_SERVICE_ENDPOINT_NAME = "AlertDefinitionService";
-	public final static String ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME = "AlertStreamSchemaService";
-	public final static String ALERT_DATA_SOURCE_SERVICE_ENDPOINT_NAME = "AlertDataSourceService";
-	public final static String ALERT_EXECUTOR_SERVICE_ENDPOINT_NAME = "AlertExecutorService";
-	public final static String ALERT_STREAM_SERVICE_ENDPOINT_NAME = "AlertStreamService";
-	public final static String ALERT_NOTIFICATION_SERVICE_ENDPOINT_NAME = "AlertNotificationService";
-	public static final String ALERT_EMAIL_ORIGIN_PROPERTY = "alertEmailOrigin";
-	public static final String ALERT_TIMESTAMP_PROPERTY = "alertTimestamp";
-
-	public static final String SITE_APPLICATION_SERVICE_ENDPOINT_NAME = "SiteApplicationService";
-	public static final String SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME = "SiteDescService";
-	public static final String APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME = "ApplicationDescService";
-	public static final String FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME = "FeatureDescService";
-
-	public static final String GENERIC_RESOURCE_SERVICE_ENDPOINT_NAME = "GenericResourceService";
-	
-	public final static String AGGREGATE_DEFINITION_SERVICE_ENDPOINT_NAME = "AggregateDefinitionService";
-
-	public static final String ALERT_EMAIL_TIME_PROPERTY = "timestamp";
-	public static final String ALERT_EMAIL_COUNT_PROPERTY = "count";
-	public static final String ALERT_EMAIL_ALERTLIST_PROPERTY = "alertList";
-
-	public static final String URL = "url";
-	public static final String ALERT_SOURCE = "alertSource";
-	public static final String ALERT_MESSAGE = "alertMessage";
-	public static final String SUBJECT = "subject";
-	public static final String ALERT_EXECUTOR_ID = "alertExecutorId";
-	public static final String POLICY_NAME = "policyName";
-	public static final String POLICY_ID = "policyId";
-    public static final String SOURCE_STREAMS = "sourceStreams";
-    public static final String ALERT_EVENT = "alertEvent";
-	public static final String POLICY_DETAIL_URL = "policyDetailUrl";
-	public static final String ALERT_DETAIL_URL = "alertDetailUrl";
-
-	public static final String POLICY_DEFINITION = "policyDefinition";
-	public static final String POLICY_TYPE = "policyType";
-	public static final String STREAM_NAME = "streamName";
-	public static final String ATTR_NAME = "attrName";
-
-	public static final String ALERT_EXECUTOR_CONFIGS = "alertExecutorConfigs";
-	public static final String PARALLELISM = "parallelism";
-	public static final String PARTITIONER = "partitioner";
-	public static final String SOURCE = "source";
-	public static final String PARTITIONSEQ = "partitionSeq";
-	public static final String EXECUTOR_ID = "executorId";
-
-	public enum policyType {
-		siddhiCEPEngine,
-		MachineLearning;
-
-		policyType() {
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
deleted file mode 100644
index b10c6c8..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/UrlBuilder.java
+++ /dev/null
@@ -1,63 +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.policy.common;
-
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.RowkeyBuilder;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.mortbay.util.UrlEncoded;
-import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class UrlBuilder {
-
-    private static final Logger logger = LoggerFactory.getLogger(UrlBuilder.class);
-
-    public static String getEncodedRowkey(AlertAPIEntity entity) throws Exception {
-        InternalLog log = HBaseInternalLogHelper.convertToInternalLog(entity, EntityDefinitionManager.getEntityDefinitionByEntityClass(entity.getClass()));
-        return EagleBase64Wrapper.encodeByteArray2URLSafeString(RowkeyBuilder.buildRowkey(log));
-    }
-
-    public static String buildAlertDetailUrl(String host, int port, AlertAPIEntity entity) {
-        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/alertDetail/";
-        try {
-            return baseUrl + UrlEncoded.encodeString(getEncodedRowkey(entity));
-        }
-        catch (Exception ex) {
-            logger.error("Fail to populate encodedRowkey for alert Entity" + entity.toString());
-            return "N/A";
-        }
-    }
-
-    public static String buiildPolicyDetailUrl(String host, int port, Map<String, String> tags) {
-        String baseUrl = "http://" + host + ":" + String.valueOf(port) + "/eagle-service/#/dam/policyDetail?";
-        String format = "policy=%s&site=%s&executor=%s";
-        String policy = tags.get(Constants.POLICY_ID);
-        String site = tags.get(EagleConfigConstants.SITE);
-        String alertExecutorID = tags.get(Constants.ALERT_EXECUTOR_ID);
-        if (policy != null && site != null && alertExecutorID != null) {
-            return baseUrl + String.format(format, policy, site, alertExecutorID);
-        }
-        return "N/A";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/config/AbstractPolicyDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/config/AbstractPolicyDefinition.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/config/AbstractPolicyDefinition.java
deleted file mode 100644
index a0999e6..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/config/AbstractPolicyDefinition.java
+++ /dev/null
@@ -1,42 +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.policy.config;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-
-/**
- * base fields for all policy definition
- */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible=true)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class AbstractPolicyDefinition {
-	private String type;
-    /**
-     * @return type in string
-     */
-	public String getType() {
-		return type;
-	}
-
-    /**
-     * @param type set type value
-     */
-	public void setType(String type) {
-		this.type = type;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAO.java
deleted file mode 100644
index 03ede74..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAO.java
+++ /dev/null
@@ -1,26 +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.policy.dao;
-
-import org.apache.eagle.alert.entity.AlertExecutorEntity;
-
-import java.util.List;
-
-public interface AlertExecutorDAO {
-    List<AlertExecutorEntity> findAlertExecutorByDataSource(String application) throws Exception;
-    List<AlertExecutorEntity> findAlertExecutor(String application, String alertExecutorId) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAOImpl.java
deleted file mode 100644
index 0584fe2..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertExecutorDAOImpl.java
+++ /dev/null
@@ -1,88 +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.policy.dao;
-
-import java.util.List;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertExecutorEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AlertExecutorDAOImpl implements AlertExecutorDAO{
-	
-    private static final Logger LOG = LoggerFactory.getLogger(AlertExecutorDAOImpl.class);
-    
-    private final EagleServiceConnector connector;
-
-    public AlertExecutorDAOImpl(EagleServiceConnector connector){
-        this.connector = connector;
-    }
-
-    @Override
-    public List<AlertExecutorEntity> findAlertExecutorByDataSource(String application) throws Exception{
-        try {
-            IEagleServiceClient client = new EagleServiceClientImpl(connector);
-            String query = Constants.ALERT_EXECUTOR_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
-            GenericServiceAPIResponseEntity<AlertExecutorEntity> response =  client.search()
-                    .startTime(0)
-                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
-                    .pageSize(Integer.MAX_VALUE)
-                    .query(query)
-                    .send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Got an exception when query eagle service: " + response.getException());
-            }
-            return response.getObj();
-        }
-        catch (Exception ex) {
-            LOG.error("Got an exception when query stream metadata service ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-
-    @Override
-    public List<AlertExecutorEntity> findAlertExecutor(String application, String alertExecutorId) throws Exception{
-        try {
-            IEagleServiceClient client = new EagleServiceClientImpl(connector);
-            String query = Constants.ALERT_EXECUTOR_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\""
-                    + " AND @alertExecutorId=\"" + alertExecutorId + "\""
-                    + "]{*}";
-            GenericServiceAPIResponseEntity<AlertExecutorEntity> response =  client.search()
-                    .startTime(0)
-                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
-                    .pageSize(Integer.MAX_VALUE)
-                    .query(query)
-                    .send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Got an exception when query eagle service: " + response.getException());
-            }
-            return response.getObj();
-        }
-        catch (Exception ex) {
-            LOG.error("Got an exception when query stream metadata service ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAO.java
deleted file mode 100644
index fd3dbb9..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAO.java
+++ /dev/null
@@ -1,25 +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.policy.dao;
-
-import org.apache.eagle.alert.entity.AlertStreamEntity;
-
-import java.util.List;
-
-public interface AlertStreamDAO {
-    List<AlertStreamEntity> findAlertStreamByDataSource(String dataSource) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAOImpl.java
deleted file mode 100644
index c13d8b5..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamDAOImpl.java
+++ /dev/null
@@ -1,60 +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.policy.dao;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertStreamEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.apache.commons.lang.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class AlertStreamDAOImpl implements AlertStreamDAO{
-    private final Logger LOG = LoggerFactory.getLogger(AlertStreamDAOImpl.class);
-    private final EagleServiceConnector connector;
-
-    public AlertStreamDAOImpl(EagleServiceConnector connector){
-        this.connector = connector;
-    }
-
-    public List<AlertStreamEntity> findAlertStreamByDataSource(String application) throws Exception{
-        try {
-            IEagleServiceClient client = new EagleServiceClientImpl(connector);
-            String query = Constants.ALERT_STREAM_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
-            GenericServiceAPIResponseEntity<AlertStreamEntity> response =  client.search()
-                    .startTime(0)
-                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
-                    .pageSize(Integer.MAX_VALUE)
-                    .query(query)
-                    .send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Got an exception when query eagle service: " + response.getException());
-            }
-            return response.getObj();
-        }
-        catch (Exception ex) {
-            LOG.error("Got an exception when query stream metadata service ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAO.java
deleted file mode 100644
index f5740f0..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAO.java
+++ /dev/null
@@ -1,25 +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.policy.dao;
-
-import java.util.List;
-
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-
-public interface AlertStreamSchemaDAO {
-	List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(String application) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
deleted file mode 100644
index 69c74db..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertStreamSchemaDAOImpl.java
+++ /dev/null
@@ -1,84 +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.policy.dao;
-
-import java.util.List;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.typesafe.config.Config;
-
-public class AlertStreamSchemaDAOImpl implements AlertStreamSchemaDAO {
-	private final Logger LOG = LoggerFactory.getLogger(AlertStreamSchemaDAOImpl.class);
-	
-	private final String eagleServiceHost;
-	private final Integer eagleServicePort;
-	private String username;
-	private String password;
-
-	public AlertStreamSchemaDAOImpl(String eagleServiceHost, Integer eagleServicePort) {
-		this(eagleServiceHost, eagleServicePort, null, null);
-	}
-
-	public AlertStreamSchemaDAOImpl(String eagleServiceHost, Integer eagleServicePort, String username, String password) {
-		this.eagleServiceHost = eagleServiceHost;
-		this.eagleServicePort = eagleServicePort;
-		this.username = username;
-		this.password = password;
-	}
-
-	public AlertStreamSchemaDAOImpl(Config config) {
-		this.eagleServiceHost = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-		this.eagleServicePort = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-		if (config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) &&
-			config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD)) {
-			this.username = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME);
-			this.password = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD);
-		}
-	}
-	
-	@Override
-	public List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(String application) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(eagleServiceHost, eagleServicePort, username, password);
-			String query = Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
-			GenericServiceAPIResponseEntity<AlertStreamSchemaEntity> response =  client.search()
-																		                .startTime(0)
-																		                .endTime(10 * DateUtils.MILLIS_PER_DAY)
-																		                .pageSize(Integer.MAX_VALUE)
-																		                .query(query)
-																	                    .send();
-			client.close();
-			if (response.getException() != null) {
-				throw new Exception("Got an exception when query eagle service: " + response.getException()); 
-			}			
-			return response.getObj();
-		}
-		catch (Exception ex) {
-			LOG.error("Got an exception when query stream metadata service ", ex);
-			throw new IllegalStateException(ex);
-		}					   
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
deleted file mode 100644
index faa81d9..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionDAO.java
+++ /dev/null
@@ -1,47 +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.policy.dao;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-
-/**
- * @param <T> - Policy definition type
- */
-public interface PolicyDefinitionDAO<T extends AbstractPolicyDefinitionEntity> extends Serializable{
-	/**
-	 * find list of active alert definitions for one specific site and dataSource
-	 * @return
-	 */
-	List<T> findActivePolicies(String site, String application) throws Exception;
-	
-	/**
-	 * find map from alertExecutorId to map from policy Id to alert definition for one specific site and dataSource
-	 * Map from alertExecutorId to map from policyId to policy definition
-       (site,dataSource) => Map[alertExecutorId,Map[policyId,alertDefinition]]
-	 * @return
-	 */
-	Map<String, Map<String, T>> findActivePoliciesGroupbyExecutorId(String site, String dataSource) throws Exception;
-
-    /**
-     * Persists alert definition entity updated with markdown columns into HBase.
-     */
-    void updatePolicyDetails(T entity);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
deleted file mode 100644
index 2c8616c..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/PolicyDefinitionEntityDAOImpl.java
+++ /dev/null
@@ -1,118 +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.policy.dao;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since Dec 17, 2015
- *
- */
-public class PolicyDefinitionEntityDAOImpl<T extends AbstractPolicyDefinitionEntity> implements PolicyDefinitionDAO<T> {
-
-	private static final long serialVersionUID = 1L;
-
-	private static final Logger LOG = LoggerFactory.getLogger(PolicyDefinitionEntityDAOImpl.class);
-	private final EagleServiceConnector connector;
-	private final String servicePointName;
-
-	public PolicyDefinitionEntityDAOImpl(EagleServiceConnector connector, String serviceName){
-		this.connector = connector;
-		this.servicePointName = serviceName;
-	}
-
-    @Override
-	public List<T> findActivePolicies(String site, String application) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = servicePointName + "[@site=\"" + site + "\" AND @application=\"" + application + "\" AND @enabled=\"true\"]{*}";
-			GenericServiceAPIResponseEntity<T> response = client.search()
-												                .pageSize(Integer.MAX_VALUE)
-												                .query(query)
-											                    .send();
-			client.close();
-			if (response.getException() != null) {
-				throw new Exception("Got an exception when query eagle service: " + response.getException()); 
-			}
-			List<T> list = response.getObj();
-			List<T> enabledList = new ArrayList<T>();
-			for (T entity : list) {
-				if (entity.isEnabled()) enabledList.add(entity);
-			}
-			return enabledList;
-		}
-		catch (Exception ex) {
-			LOG.error("Got an exception when query alert Def service", ex);
-			throw new IllegalStateException(ex);
-		}					   
-	}
-    
-    
-
-    @Override
-	public Map<String, Map<String, T>> findActivePoliciesGroupbyExecutorId(String site, String application)
-			throws Exception {
-		List<T> list = findActivePolicies(site, application);
-		Map<String, Map<String, T>> map = new HashMap<String, Map<String, T>>();
-		for (T entity : list) {
-			// support both executorId and legacy alertExecutorId
-			String executorID = entity.getTags().containsKey(Constants.EXECUTOR_ID) ? entity.getTags().get(Constants.EXECUTOR_ID)
-					: entity.getTags().get(Constants.ALERT_EXECUTOR_ID);
-
-			if (map.get(executorID) == null) {
-				map.put(executorID, new HashMap<String, T>());
-			}
-			map.get(executorID).put(entity.getTags().get("policyId"), entity);
-		}
-		return map;
-	}
-
-    @Override
-    public void updatePolicyDetails(T entity) {
-        IEagleServiceClient client = new EagleServiceClientImpl(connector);
-
-        List<T> entityList = new ArrayList<>();
-        entityList.add(entity);
-
-        try {
-            client.create(entityList, servicePointName);
-        } catch (IOException | EagleServiceClientException exception) {
-            LOG.error("Exception in updating markdown for policy in HBase ", exception);
-        } finally {
-            try {
-                if (null != client)
-                    client.close();
-            } catch (IOException exception) {
-                LOG.error("Unable to close Eagle service client ", exception);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/IPolicyExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/IPolicyExecutor.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/IPolicyExecutor.java
deleted file mode 100644
index c9d28a2..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/IPolicyExecutor.java
+++ /dev/null
@@ -1,29 +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.policy.executor;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.policy.siddhi.SiddhiEvaluationHandler;
-
-/**
- * Created on 1/10/16.
- */
-public interface IPolicyExecutor<T extends AbstractPolicyDefinitionEntity, K> extends SiddhiEvaluationHandler<T, K> {
-    String getExecutorId();
-
-    int getPartitionSeq();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
deleted file mode 100644
index 30d2179..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/executor/PolicyProcessExecutor.java
+++ /dev/null
@@ -1,442 +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.policy.executor;
-
-import com.codahale.metrics.MetricRegistry;
-import com.sun.jersey.client.impl.CopyOnWriteHashMap;
-import com.typesafe.config.Config;
-import org.apache.commons.lang3.time.DateUtils;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.datastream.JavaStormStreamExecutor2;
-import org.apache.eagle.metric.reportor.EagleCounterMetric;
-import org.apache.eagle.metric.reportor.EagleMetricListener;
-import org.apache.eagle.metric.reportor.EagleServiceReporterMetricListener;
-import org.apache.eagle.metric.reportor.MetricKeyCodeDecoder;
-import org.apache.eagle.policy.*;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAO;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAOImpl;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import scala.Tuple2;
-
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * The stream process executor based on two types
- * @since Dec 17, 2015
- *
- * @param <T> - The policy definition entity type
- * @param <K> - The stream entity type
- */
-public abstract class PolicyProcessExecutor<T extends AbstractPolicyDefinitionEntity, K>
-		extends JavaStormStreamExecutor2<String, K> 
-		implements PolicyLifecycleMethods<T>, PolicyDistributionReportMethods, IPolicyExecutor<T, K>
-{
-	
-	private static final long serialVersionUID = 1L;
-	private static final Logger LOG = LoggerFactory.getLogger(PolicyProcessExecutor.class);
-	
-	public static final String EAGLE_EVENT_COUNT = "eagle.event.count";
-	public static final String EAGLE_POLICY_EVAL_COUNT = "eagle.policy.eval.count";
-	public static final String EAGLE_POLICY_EVAL_FAIL_COUNT = "eagle.policy.eval.fail.count";
-	public static final String EAGLE_ALERT_COUNT = "eagle.alert.count";
-	public static final String EAGLE_ALERT_FAIL_COUNT = "eagle.alert.fail.count";
-
-	private	 static long MERITE_GRANULARITY = DateUtils.MILLIS_PER_MINUTE;
-
-	private final Class<T> policyDefinitionClz;
-	private String executorId;
-	private volatile CopyOnWriteHashMap<String, PolicyEvaluator<T>> policyEvaluators;
-	private PolicyPartitioner partitioner;
-	private int numPartitions;
-	private int partitionSeq;
-	private Config config;
-	private Map<String, Map<String, T>> initialAlertDefs;
-	private String[] sourceStreams;
-
-	/**
-	 * metricMap's key = metricName[#policyId]
-	 */
-	private Map<String, Map<String, String>> dimensionsMap; // cache it for performance
-	private Map<String, String> baseDimensions;
-
-	private MetricRegistry registry;
-	private EagleMetricListener listener;
-
-	private PolicyDefinitionDAO<T> policyDefinitionDao;
-
-	public PolicyProcessExecutor(String alertExecutorId, PolicyPartitioner partitioner, int numPartitions, int partitionSeq,
-                         PolicyDefinitionDAO<T> alertDefinitionDao, String[] sourceStreams, Class<T> clz){
-		this.executorId = alertExecutorId;
-		this.partitioner = partitioner;
-		this.numPartitions = numPartitions;
-		this.partitionSeq = partitionSeq;
-		this.policyDefinitionDao = alertDefinitionDao;
-		this.sourceStreams = sourceStreams;
-		this.policyDefinitionClz = clz;
-	}
-	
-	public String getExecutorId(){
-		return this.executorId;
-	}
-	
-	public int getNumPartitions() {
-		return this.numPartitions;
-	}
-	
-	public int getPartitionSeq(){
-		return this.partitionSeq;
-	}
-	
-	public PolicyPartitioner getPolicyPartitioner() {
-		return this.partitioner;
-	}
-	
-	public Map<String, Map<String, T>> getInitialAlertDefs() {
-		return this.initialAlertDefs;
-	}
-		
-	public PolicyDefinitionDAO<T> getPolicyDefinitionDao() {
-		return policyDefinitionDao;
-	}
-
-    public Map<String, PolicyEvaluator<T>> getPolicyEvaluators(){
-        return policyEvaluators;
-    }
-	
-	@Override
-	public void prepareConfig(Config config) {
-		this.config = config;
-	}
-	
-	private void initMetricReportor() {
-		String host = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-		int port = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-
-		String username = config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) ?
-				          config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) : null;
-		String password = config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD) ?
-				          config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD) : null;
-		
-		registry = new MetricRegistry();
-		listener = new EagleServiceReporterMetricListener(host, port, username, password);
-		
-		baseDimensions = new HashMap<>();
-		baseDimensions = new HashMap<String, String>();
-		baseDimensions.put(Constants.ALERT_EXECUTOR_ID, executorId);
-		baseDimensions.put(Constants.PARTITIONSEQ, String.valueOf(partitionSeq));
-		baseDimensions.put(Constants.SOURCE, ManagementFactory.getRuntimeMXBean().getName());
-		baseDimensions.put(EagleConfigConstants.APPLICATION, config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION));
-		baseDimensions.put(EagleConfigConstants.SITE, config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE));
-
-		dimensionsMap = new HashMap<String, Map<String, String>>();
-	}
-
-    public AlertStreamSchemaDAO getAlertStreamSchemaDAO(Config config){
-        return new AlertStreamSchemaDAOImpl(config);
-    }
-
-	@Override
-	public void init() {
-		// initialize StreamMetadataManager before it is used
-		StreamMetadataManager.getInstance().init(config, getAlertStreamSchemaDAO(config));
-		// for each AlertDefinition, to create a PolicyEvaluator
-		Map<String, PolicyEvaluator<T>> tmpPolicyEvaluators = new HashMap<String, PolicyEvaluator<T>>();
-		
-        String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
-		String application = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-		try {
-			initialAlertDefs = policyDefinitionDao.findActivePoliciesGroupbyExecutorId(site, application);
-		}
-		catch (Exception ex) {
-			LOG.error("fail to initialize initialAlertDefs: ", ex);
-            throw new IllegalStateException("fail to initialize initialAlertDefs: ", ex);
-		}
-        if(initialAlertDefs == null || initialAlertDefs.isEmpty()){
-            LOG.warn("No alert definitions was found for site: " + site + ", application: " + application);
-        }
-        else if (initialAlertDefs.get(executorId) != null) { 
-			for(T alertDef : initialAlertDefs.get(executorId).values()){
-				int part = partitioner.partition(numPartitions, alertDef.getTags().get(Constants.POLICY_TYPE), alertDef.getTags().get(Constants.POLICY_ID));
-				if (part == partitionSeq) {
-					tmpPolicyEvaluators.put(alertDef.getTags().get(Constants.POLICY_ID), createPolicyEvaluator(alertDef));
-				}
-			}
-		}
-		
-		policyEvaluators = new CopyOnWriteHashMap<>();
-		// for efficiency, we don't put single policy evaluator
-		policyEvaluators.putAll(tmpPolicyEvaluators);
-		DynamicPolicyLoader<T> policyLoader = DynamicPolicyLoader.getInstanceOf(policyDefinitionClz);
-		policyLoader.init(initialAlertDefs, policyDefinitionDao, config);
-        String fullQualifiedAlertExecutorId = executorId + "_" + partitionSeq;
-		policyLoader.addPolicyChangeListener(fullQualifiedAlertExecutorId, this);
-        policyLoader.addPolicyDistributionReporter(fullQualifiedAlertExecutorId, this);
-		LOG.info("Alert Executor created, partitionSeq: " + partitionSeq + " , numPartitions: " + numPartitions);
-        LOG.info("All policy evaluators: " + policyEvaluators);
-		
-		initMetricReportor();
-	}
-
-    /**
-     * Create PolicyEvaluator instance according to policyType-mapped policy evaluator class
-     *
-     * @param alertDef alert definition
-     * @return PolicyEvaluator instance
-     */
-	@SuppressWarnings({ "unchecked", "rawtypes" })
-	protected PolicyEvaluator<T> createPolicyEvaluator(T alertDef){
-		String policyType = alertDef.getTags().get(Constants.POLICY_TYPE);
-		Class<? extends PolicyEvaluator> evalCls = PolicyManager.getInstance().getPolicyEvaluator(policyType);
-		if(evalCls == null){
-			String msg = "No policy evaluator defined for policy type : " + policyType;
-			LOG.error(msg);
-			throw new IllegalStateException(msg);
-		}
-		
-		// check out whether strong incoming data validation is necessary
-        String needValidationConfigKey= Constants.ALERT_EXECUTOR_CONFIGS + "." + executorId + ".needValidation";
-
-        // Default: true
-        boolean needValidation = !config.hasPath(needValidationConfigKey) || config.getBoolean(needValidationConfigKey);
-
-		AbstractPolicyDefinition policyDef = null;
-		PolicyEvaluator<T> pe;
-		try {
-			policyDef = JsonSerDeserUtils.deserialize(alertDef.getPolicyDef(), AbstractPolicyDefinition.class,
-					PolicyManager.getInstance().getPolicyModules(policyType));
-
-			PolicyEvaluationContext<T, K> context = new PolicyEvaluationContext<>();
-			context.policyId = alertDef.getTags().get("policyId");
-			context.alertExecutor = this;
-			context.resultRender = this.getResultRender();
-			// create evaluator instance
-			pe = (PolicyEvaluator<T>) evalCls
-					.getConstructor(Config.class, PolicyEvaluationContext.class, AbstractPolicyDefinition.class, String[].class, boolean.class)
-					.newInstance(config, context, policyDef, sourceStreams, needValidation);
-            if (pe.isMarkdownEnabled()) // updating markdown details only if the policy is found invalid
-                updateMarkdownDetails(alertDef, pe.isMarkdownEnabled(), pe.getMarkdownReason());
-        } catch(Exception ex) {
-			LOG.error("Fail creating new policyEvaluator", ex);
-			LOG.warn("Broken policy definition and stop running : " + alertDef.getPolicyDef());
-			throw new IllegalStateException(ex);
-		}
-		return pe;
-	}
-
-    /**
-     * verify both alertExecutor logic name and partition id
-     * @param alertDef alert definition
-     *
-     * @return whether accept the alert definition
-     */
-	private boolean accept(T alertDef){
-		String executorID = alertDef.getTags().containsKey("executorId") ? alertDef.getTags().get("executorId")
-				: alertDef.getTags().get("alertExecutorId");
-
-		if(!executorID.equals(executorId)) {
-            if(LOG.isDebugEnabled()){
-                LOG.debug("alertDef does not belong to this alertExecutorId : " + executorId + ", alertDef : " + alertDef);
-            }
-            return false;
-        }
-		int targetPartitionSeq = partitioner.partition(numPartitions, alertDef.getTags().get(Constants.POLICY_TYPE), alertDef.getTags().get(Constants.POLICY_ID));
-		if(targetPartitionSeq == partitionSeq)
-			return true;
-		return false;
-	}
-
-	private void updateCounter(String name, Map<String, String> dimensions, double value) {
-		long current = System.currentTimeMillis();
-		String metricName = MetricKeyCodeDecoder.codeMetricKey(name, dimensions);
-		if (registry.getMetrics().get(metricName) == null) {
-			EagleCounterMetric metric = new EagleCounterMetric(current, metricName, value, MERITE_GRANULARITY);
-			metric.registerListener(listener);
-			registry.register(metricName, metric);
-		} else {
-			EagleCounterMetric metric = (EagleCounterMetric) registry.getMetrics().get(metricName);
-			metric.update(value, current);
-			// TODO: need remove unused metric from registry
-		}
-	}
-	
-	private void updateCounter(String name, Map<String, String> dimensions) {
-		updateCounter(name, dimensions, 1.0);
-	}
-	
-	protected Map<String, String> getDimensions(String policyId) {
-		if (dimensionsMap.get(policyId) == null) {
-			Map<String, String> newDimensions = new HashMap<String, String>(baseDimensions);
-			newDimensions.put(Constants.POLICY_ID, policyId);
-			dimensionsMap.put(policyId, newDimensions);
-		}
-		return dimensionsMap.get(policyId);
-	}
-	
-    /**
-     * within this single executor, execute all PolicyEvaluator sequentially
-     * the contract for input:
-     * 1. total # of fields for input is 3, which is fixed
-     * 2. the first field is key
-     * 3. the second field is stream name
-     * 4. the third field is value which is java SortedMap
-     */
-    @Override
-    public void flatMap(java.util.List<Object> input, Collector<Tuple2<String, K>> outputCollector){
-        if(input.size() != 3)
-            throw new IllegalStateException("AlertExecutor always consumes exactly 3 fields: key, stream name and value(SortedMap)");
-        if(LOG.isDebugEnabled()) LOG.debug("Msg is coming " + input.get(2));
-        if(LOG.isDebugEnabled()) LOG.debug("Current policyEvaluators: " + policyEvaluators.keySet().toString());
-
-        updateCounter(EAGLE_EVENT_COUNT, baseDimensions);
-        try{
-            synchronized(this.policyEvaluators) {
-                for(Entry<String, PolicyEvaluator<T>> entry : policyEvaluators.entrySet()){
-                    String policyId = entry.getKey();
-                    PolicyEvaluator<T> evaluator = entry.getValue();
-                    if (!evaluator.isMarkdownEnabled()) { // not evaluated for a marked down policy
-                        updateCounter(EAGLE_POLICY_EVAL_COUNT, getDimensions(policyId));
-                        try {
-                            evaluator.evaluate(new ValuesArray(outputCollector, input.get(1), input.get(2)));
-                        } catch (Exception ex) {
-                            LOG.error("Got an exception, but continue to run " + input.get(2).toString(), ex);
-                            updateCounter(EAGLE_POLICY_EVAL_COUNT, getDimensions(policyId));
-                        }
-                    }
-                }
-            }
-        } catch(Exception ex){
-            LOG.error(executorId + ", partition " + partitionSeq + ", error fetching alerts, but continue to run", ex);
-            updateCounter(EAGLE_ALERT_FAIL_COUNT, baseDimensions);
-        }
-    }
-
-	@Override
-	public void onPolicyCreated(Map<String, T> added) {
-		if(LOG.isDebugEnabled()) LOG.debug(executorId + ", partition " + partitionSeq + " policy added : " + added + " policyEvaluators " + policyEvaluators);
-		for(T alertDef : added.values()){
-			if(!accept(alertDef))
-				continue;
-			LOG.info(executorId + ", partition " + partitionSeq + " policy really added " + alertDef);
-			PolicyEvaluator<T> newEvaluator = createPolicyEvaluator(alertDef);
-			if(newEvaluator != null){
-				synchronized(this.policyEvaluators) {
-					policyEvaluators.put(alertDef.getTags().get(Constants.POLICY_ID), newEvaluator);
-				}
-			}
-		}
-	}
-
-    @Override
-    public void onPolicyChanged(Map<String, T> changed) {
-        if(LOG.isDebugEnabled()) LOG.debug(executorId + ", partition " + partitionSeq + " policy changed : " + changed);
-        for(T alertDef : changed.values()){
-            if(!accept(alertDef))
-                continue;
-            LOG.info(executorId + ", partition " + partitionSeq + " policy really changed " + alertDef);
-            synchronized(this.policyEvaluators) {
-                PolicyEvaluator<T> pe = policyEvaluators.get(alertDef.getTags().get(Constants.POLICY_ID));
-                boolean previousMarkdown = pe.isMarkdownEnabled();
-                String previousMarkdownReason = pe.getMarkdownReason();
-                pe.onPolicyUpdate(alertDef);
-                if (isMarkdownUpdateRequired(previousMarkdown, pe.isMarkdownEnabled(), previousMarkdownReason, pe.getMarkdownReason()))
-                    updateMarkdownDetails(alertDef, pe.isMarkdownEnabled(), pe.getMarkdownReason());
-            }
-        }
-    }
-
-	@Override
-	public void onPolicyDeleted(Map<String, T> deleted) {
-		if(LOG.isDebugEnabled()) LOG.debug(executorId + ", partition " + partitionSeq + " policy deleted : " + deleted);
-		for(T alertDef : deleted.values()){
-			if(!accept(alertDef))
-				continue;
-			LOG.info(executorId + ", partition " + partitionSeq + " policy really deleted " + alertDef);
-			String policyId = alertDef.getTags().get(Constants.POLICY_ID);
-			synchronized(this.policyEvaluators) {			
-				if (policyEvaluators.containsKey(policyId)) {
-					PolicyEvaluator<T> pe = policyEvaluators.remove(alertDef.getTags().get(Constants.POLICY_ID));
-					pe.onPolicyDelete();
-				}
-			}
-		}
-	}
-
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	@Override
-	public void onEvalEvents(PolicyEvaluationContext<T, K> context, List<K> alerts) {
-		if(alerts != null && !alerts.isEmpty()){
-			String policyId = context.policyId;
-            LOG.info(String.format("Detected %d alerts for policy %s", alerts.size(), policyId));
-			Collector outputCollector = context.outputCollector;
-			PolicyEvaluator<T> evaluator = context.evaluator;
-			updateCounter(EAGLE_ALERT_COUNT, getDimensions(policyId), alerts.size());
-			for (K entity : alerts) {
-				synchronized(this) {
-					outputCollector.collect(new Tuple2(policyId, entity));
-				}
-				if(LOG.isDebugEnabled()) LOG.debug("A new alert is triggered: " + executorId + ", partition " + partitionSeq + ", Got an alert with output context: " + entity + ", for policy " + evaluator);
-			}
-		}
-	}
-
-	public abstract ResultRender<T, K> getResultRender();
-
-    @Override
-    public void report() {
-        PolicyDistroStatsLogReporter appender = new PolicyDistroStatsLogReporter();
-        appender.reportPolicyMembership(executorId + "_" + partitionSeq, policyEvaluators.keySet());
-    }
-
-    /**
-     * Method to check if updating markdown details in DB is required.
-     * @return boolean: If markdown details needs to be updated for the policy
-     */
-    private boolean isMarkdownUpdateRequired (boolean previousMarkdown, boolean presentMarkdown, String previousReason, String presentReason) {
-        boolean isUpdateRequired = true;
-        if (!previousMarkdown && !presentMarkdown) { // not updating when previous/present policies are both valid
-            isUpdateRequired = false;
-        } else if (previousMarkdown && presentMarkdown) {
-            if (previousReason.equals(presentReason))
-                isUpdateRequired = false; // not updating when there is no change with the markdown reason
-        }
-        return isUpdateRequired;
-    }
-
-    /**
-     * Method to invoke Eagle Service call to update the markdown details for the policy.
-     */
-    private void updateMarkdownDetails(T entity, boolean markdownEnabled, String markdownReason) {
-        AlertDefinitionAPIEntity alertEntity = (AlertDefinitionAPIEntity) entity;
-        alertEntity.setMarkdownEnabled(markdownEnabled);
-        alertEntity.setMarkdownReason(null != markdownReason ? markdownReason : "");
-        policyDefinitionDao.updatePolicyDetails(entity);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/AttributeType.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/AttributeType.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/AttributeType.java
deleted file mode 100644
index a5d506f..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/AttributeType.java
+++ /dev/null
@@ -1,30 +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.policy.siddhi;
-
-/**
- * @see org.wso2.siddhi.query.api.definition.Attribute.Type
- */
-public enum AttributeType {
-	STRING,
-	LONG,
-	INTEGER,
-	BOOL,
-    FLOAT,
-    DOUBLE
-//    , OBJECT
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiEvaluationHandler.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiEvaluationHandler.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiEvaluationHandler.java
deleted file mode 100644
index 2e8fc55..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiEvaluationHandler.java
+++ /dev/null
@@ -1,27 +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.policy.siddhi;
-
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-
-import java.util.List;
-
-public interface SiddhiEvaluationHandler<T extends AbstractPolicyDefinitionEntity, K> {
-
-	void onEvalEvents(PolicyEvaluationContext<T, K> context, List<K> alerts);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiOutputStreamCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiOutputStreamCallback.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiOutputStreamCallback.java
deleted file mode 100644
index 22506aa..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiOutputStreamCallback.java
+++ /dev/null
@@ -1,68 +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.policy.siddhi;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.stream.output.StreamCallback;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Siddhi stream call back
- *
- * Created on 1/20/16.
- */
-public class SiddhiOutputStreamCallback<T extends AbstractPolicyDefinitionEntity, K> extends StreamCallback {
-
-    public static final Logger LOG = LoggerFactory.getLogger(SiddhiOutputStreamCallback.class);
-
-    private SiddhiPolicyEvaluator<T, K> evaluator;
-    public Config config;
-
-    public SiddhiOutputStreamCallback(Config config, SiddhiPolicyEvaluator<T, K> evaluator) {
-        this.config = config;
-        this.evaluator = evaluator;
-    }
-
-    @Override
-    public void receive(Event[] events) {
-        long timeStamp = System.currentTimeMillis();
-        List<K> alerts = new LinkedList<>();
-        PolicyEvaluationContext<T, K> siddhiContext =  null;
-
-        for (Event event : events) {
-            Object[] data = event.getData();
-            List<Object> returns = SiddhiQueryCallbackImpl.getOutputObject(event.getData());
-            K alert = siddhiContext.resultRender.render(config, returns, siddhiContext, timeStamp);
-            alerts.add(alert);
-
-            if (siddhiContext == null) {
-                siddhiContext = (PolicyEvaluationContext<T, K>) data[0];
-            }
-        }
-
-        if (siddhiContext != null) {
-            siddhiContext.alertExecutor.onEvalEvents(siddhiContext, alerts);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyDefinition.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyDefinition.java
deleted file mode 100644
index 639c15b..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyDefinition.java
+++ /dev/null
@@ -1,56 +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.policy.siddhi;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-
-/**
- * siddhi policy definition has the following format
- * {
-        "type":"SiddhiCEPEngine",
-		"expression" : "from every b1=HeapUsage[metric == 'eagle.metric.gc'] -> a1=FullGCEvent[eventName == 'full gc'] -> b2=HeapUsage[metric == b1.metric and host == b1.host and value >= b1.value * 0.8] within 100 sec select a1.eventName, b1.metric, b2.timestamp, 60 as timerange insert into GCMonitor; "
-	}
- */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible=true)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class SiddhiPolicyDefinition extends AbstractPolicyDefinition {
-	private String expression;
-
-	private boolean containsDefinition;
-
-	public boolean isContainsDefinition() {
-		return containsDefinition;
-	}
-
-	public void setContainsDefinition(boolean containsDefinition) {
-		this.containsDefinition = containsDefinition;
-	}
-
-	public String getExpression() {
-		return expression;
-	}
-	public void setExpression(String expression) {
-		this.expression = expression;
-	}
-	
-	@Override
-	public String toString(){
-		return expression;
-	}
-}



[20/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexLogReader.java
deleted file mode 100755
index 8ff3448..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexLogReader.java
+++ /dev/null
@@ -1,124 +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.log.entity.index;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.NavigableMap;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.filter.Filter;
-
-public class UniqueIndexLogReader extends IndexLogReader {
-
-	private final IndexDefinition indexDef;
-	private final List<byte[]> indexRowkeys; 
-	private final byte[][] qualifiers;
-	private final Filter filter;
-	private HTableInterface tbl;
-	private boolean isOpen = false;
-	private Result[] entityResults;
-	private int index = -1;
-
-	public UniqueIndexLogReader(IndexDefinition indexDef, List<byte[]> indexRowkeys, byte[][] qualifiers, Filter filter) {
-		this.indexDef = indexDef;
-		this.indexRowkeys = indexRowkeys;
-		this.qualifiers = qualifiers;
-		this.filter = filter;
-	}
-
-	@Override
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(indexDef.getEntityDefinition().getTable());
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-		final byte[] family = indexDef.getEntityDefinition().getColumnFamily().getBytes();
-        final List<Get> indexGets = new ArrayList<>();
-        for (byte[] rowkey : indexRowkeys) {
-            Get get = new Get(rowkey);
-            // Return all index qualifiers
-            get.addFamily(family);
-            indexGets.add(get);
-        }
-        final Result[] indexResults = tbl.get(indexGets);
-        indexGets.clear();
-        for (Result indexResult : indexResults) {
-        	final NavigableMap<byte[], byte[]> map = indexResult.getFamilyMap(family);
-        	if (map == null) {
-        		continue;
-        	}
-        	for (byte[] entityRowkey : map.keySet()) {
-                Get get = new Get(entityRowkey);
-                if (filter != null) {
-                	get.setFilter(filter);
-                }
-				if(qualifiers == null) {
-					// filter all qualifiers if output qualifiers are null
-					get.addFamily(family);
-				}else {
-					for (int i = 0; i < qualifiers.length; ++i) {
-						// Return the specified qualifiers
-						get.addColumn(family, qualifiers[i]);
-					}
-				}
-				workaroundHBASE2198(get, filter,qualifiers);
-        		indexGets.add(get);
-        	}
-        }
-        entityResults = tbl.get(indexGets);
-		isOpen = true;
-	}
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-
-	@Override
-	public InternalLog read() throws IOException {
-		if (entityResults == null) {
-			throw new IllegalArgumentException("entityResults haven't been initialized before reading");
-		}
-		InternalLog t = null;
-		while (entityResults.length > ++index) {
-			Result r = entityResults[index];
-			if (r != null) {
-				if (r.getRow() == null) {
-					continue;
-				}
-				t = HBaseInternalLogHelper.parse(indexDef.getEntityDefinition(), r, qualifiers);
-				break;
-			}
-		}
-		return t;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexStreamReader.java
deleted file mode 100755
index 0391d57..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/UniqueIndexStreamReader.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.index;
-
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.LogReader;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.log.entity.meta.IndexDefinition.IndexType;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class UniqueIndexStreamReader extends IndexStreamReader {
-	public UniqueIndexStreamReader(IndexDefinition indexDef, SearchCondition condition) {
-		super(indexDef, condition, new ArrayList<byte[]>());
-		final IndexType type = indexDef.canGoThroughIndex(condition.getQueryExpression(), indexRowkeys);
-		if (!IndexType.UNIQUE_INDEX.equals(type)) {
-			throw new IllegalArgumentException("This query can't go through index: " + condition.getQueryExpression());
-		}
-	}
-
-	public UniqueIndexStreamReader(IndexDefinition indexDef, SearchCondition condition, List<byte[]> indexRowkeys) {
-		super(indexDef, condition, indexRowkeys);
-	}
-
-	@Override
-	protected LogReader createIndexReader() {
-		final EntityDefinition entityDef = indexDef.getEntityDefinition();
-//		final
-		byte[][] outputQualifiers = null;
-		if(!condition.isOutputAll()) {
-			outputQualifiers = HBaseInternalLogHelper.getOutputQualifiers(entityDef, condition.getOutputFields());
-		}
-		return new UniqueIndexLogReader(indexDef, indexRowkeys, outputQualifiers, condition.getFilter());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/BooleanSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/BooleanSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/BooleanSerDeser.java
deleted file mode 100755
index cf40e31..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/BooleanSerDeser.java
+++ /dev/null
@@ -1,54 +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.log.entity.meta;
-
-/**
- * @since : 7/3/14,2014
- */
-public class BooleanSerDeser implements EntitySerDeser<Boolean> {
-
-	public BooleanSerDeser(){}
-
-	@Override
-	public Boolean deserialize(byte[] bytes){
-		if(bytes != null && bytes.length > 0){
-			if(bytes[0] == 0){
-				return false;
-			}else if(bytes[0] == 1){
-				return true;
-			}
-		}
-		return null;
-	}
-
-	@Override
-	public byte[] serialize(Boolean obj){
-		if(obj != null){
-			if(obj){
-				return new byte[]{1};
-			}else{
-				return new byte[]{0};
-			}
-		}
-		return null;
-	}
-
-	@Override
-	public Class<Boolean> type() {
-		return Boolean.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Column.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Column.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Column.java
deleted file mode 100644
index b64e528..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Column.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Column {
-	String value() default "";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ColumnFamily.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ColumnFamily.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ColumnFamily.java
deleted file mode 100644
index 6e3e9c6..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ColumnFamily.java
+++ /dev/null
@@ -1,28 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ColumnFamily {
-	String value() default "f";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Double2DArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Double2DArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Double2DArraySerDeser.java
deleted file mode 100644
index 27b011c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Double2DArraySerDeser.java
+++ /dev/null
@@ -1,97 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-/**
- * @since 7/22/15
- */
-public class Double2DArraySerDeser implements EntitySerDeser<double[][]> {
-    private final int SIZE = 8;
-    @Override
-    public double[][] deserialize(byte[] bytes){
-//        if((bytes.length-4) % SIZE != 0)
-//            return null;
-        int offset = 0;
-        // get size of int array
-        int rowSize = ByteUtil.bytesToInt(bytes, offset);
-        offset += 4;
-
-        double[][] data = new double[rowSize][];
-        for(int i=0; i<rowSize; i++) {
-            int colSize = ByteUtil.bytesToInt(bytes, offset);
-            offset += 4;
-            double[] values = null;
-            if (colSize >= 0){
-                values = new double[colSize];
-                for (int j = 0; j < colSize; j++) {
-                    values[j] = ByteUtil.bytesToDouble(bytes, offset);
-                    offset += SIZE;
-                }
-            }
-            data[i] = values;
-        }
-
-        return data;
-    }
-
-    /**
-     *
-     * @param obj
-     * @return
-     */
-    @Override
-    public byte[] serialize(double[][] obj){
-        if(obj == null) return null;
-        ByteArrayOutputStream data = new ByteArrayOutputStream();
-        int size = obj.length;
-        byte[] sizeBytes = ByteUtil.intToBytes(size);
-        data.write(sizeBytes,0,sizeBytes.length);
-
-        try{
-            for(double[] o:obj){
-                if(o!=null){
-                    data.write(ByteUtil.intToBytes(o.length));
-                    for(double d:o){
-                        data.write(ByteUtil.doubleToBytes(d),0,SIZE);
-                    }
-                }else{
-                    data.write(ByteUtil.intToBytes(-1),0,4);
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        byte[] bytes = data.toByteArray();
-        try {
-            data.close();
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
-        }
-        return bytes;
-    }
-
-    @Override
-    public Class<double[][]> type() {
-        return double[][].class;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleArraySerDeser.java
deleted file mode 100755
index d87e31c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleArraySerDeser.java
+++ /dev/null
@@ -1,68 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-public class DoubleArraySerDeser implements EntitySerDeser<double[]>{
-
-	public DoubleArraySerDeser(){}
-
-	private final int SIZE = 8;
-		@Override
-		public double[] deserialize(byte[] bytes){
-			if((bytes.length-4) % SIZE != 0)
-				return null;
-			int offset = 0;
-			// get size of int array
-			int size = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			double[] values = new double[size];
-			for(int i=0; i<size; i++){
-				values[i] = ByteUtil.bytesToDouble(bytes, offset);
-				offset += SIZE;
-			}
-			return values;
-		}
-		
-		/**
-		 * 
-		 * @param obj
-		 * @return
-		 */
-		@Override
-		public byte[] serialize(double[] obj){
-			if(obj == null)
-				return null;
-			int size = obj.length;
-			byte[] array = new byte[4 + SIZE*size];
-			byte[] first = ByteUtil.intToBytes(size);
-			int offset = 0;
-			System.arraycopy(first, 0, array, offset, first.length);
-			offset += first.length;
-			for(int i=0; i<size; i++){
-				System.arraycopy(ByteUtil.doubleToBytes(obj[i]), 0, array, offset, SIZE);
-				offset += SIZE;
-			}
-			return array;
-		}
-
-	@Override
-	public Class<double[]> type() {
-		return double[].class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleSerDeser.java
deleted file mode 100755
index 330a99d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/DoubleSerDeser.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-public class DoubleSerDeser implements EntitySerDeser<Double>{
-
-	@Override
-	public Double deserialize(byte[] bytes){
-		if(bytes.length < 8)
-			return null;
-		return ByteUtil.bytesToDouble(bytes);
-	}
-	
-	@Override
-	public byte[] serialize(Double obj){
-		if(obj == null)
-			return null;
-		return ByteUtil.doubleToBytes(obj);
-	}
-
-	@Override
-	public Class<Double> type(){
-		return Double.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityConstants.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityConstants.java
deleted file mode 100644
index 930743e..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityConstants.java
+++ /dev/null
@@ -1,30 +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.log.entity.meta;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-public class EntityConstants {
-	
-	public static final String FIXED_WRITE_HUMANTIME = "1970-01-02 00:00:00";
-	public static final String FIXED_READ_START_HUMANTIME = "1970-01-01 00:00:00";
-	public static final String FIXED_READ_END_HUMANTIME = "1970-01-03 00:00:00";
-	
-	public static final long FIXED_WRITE_TIMESTAMP = 
-			DateTimeUtil.humanDateToSecondsWithoutException(FIXED_WRITE_HUMANTIME) * 1000;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinition.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinition.java
deleted file mode 100755
index bed61af..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinition.java
+++ /dev/null
@@ -1,318 +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.log.entity.meta;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.GenericMetricShadowEntity;
-import org.apache.hadoop.io.Writable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * This object should be regarded as read-only metadata for an entity as it will be shared across all entity object
- * with the same entity name, so don't try to set different values for any of the fields, 
- * otherwise it's not thread safe
- */
-public class EntityDefinition implements Writable{
-	private final static Logger LOG = LoggerFactory.getLogger(EntityDefinition.class);
-
-	private Class<? extends TaggedLogAPIEntity> entityClass;
-	private String table;
-	private String columnFamily;
-	// TODO prefix be within search/get condition instead of entity definition. Topology entity should have pre-defined prefix. 
-	private String prefix;
-	private String service;
-	private String serviceCreationPath;
-	private String serviceDeletionPath;
-	private String[] partitions;
-	private Map<String, Qualifier> displayNameMap = new HashMap<String, Qualifier>();
-	private Map<String, Qualifier> qualifierNameMap = new HashMap<String, Qualifier>();
-	private Map<String, Method> qualifierGetterMap = new HashMap<String, Method>();
-	private boolean isTimeSeries;
-	private MetricDefinition metricDefinition;
-	private IndexDefinition[] indexes;
-	
-
-	public EntityDefinition(){}
-	
-	public MetricDefinition getMetricDefinition() {
-		return metricDefinition;
-	}
-	public void setMetricDefinition(MetricDefinition metricDefinition) {
-		this.metricDefinition = metricDefinition;
-	}
-	public boolean isTimeSeries() {
-		return isTimeSeries;
-	}
-	public void setTimeSeries(boolean isTimeSeries) {
-		this.isTimeSeries = isTimeSeries;
-	}
-	public String getColumnFamily() {
-		return columnFamily;
-	}
-	public void setColumnFamily(String columnFamily) {
-		this.columnFamily = columnFamily;
-	}
-	public Class<? extends TaggedLogAPIEntity> getEntityClass() {
-		return entityClass;
-	}
-	public void setEntityClass(Class<? extends TaggedLogAPIEntity> entityClass) {
-		this.entityClass = entityClass;
-	}
-	public String getTable() {
-		return table;
-	}
-	public void setTable(String table) {
-		this.table = table;
-	}
-	public Map<String, Qualifier> getDisplayNameMap() {
-		return displayNameMap;
-	}
-	public void setDisplayNameMap(Map<String, Qualifier> displayNameMap) {
-		this.displayNameMap = displayNameMap;
-	}
-	public Map<String, Qualifier> getQualifierNameMap() {
-		return qualifierNameMap;
-	}
-	public void setQualifierNameMap(Map<String, Qualifier> qualifierNameMap) {
-		this.qualifierNameMap = qualifierNameMap;
-	}
-	public String getPrefix() {
-		return prefix;
-	}
-	public void setPrefix(String prefix) {
-		this.prefix = prefix;
-	}
-	public String getService() {
-		return service;
-	}
-	public void setService(String service) {
-		this.service = service;
-	}
-	public String getServiceCreationPath() {
-		return serviceCreationPath;
-	}
-	public void setServiceCreationPath(String serviceCreationPath) {
-		this.serviceCreationPath = serviceCreationPath;
-	}
-	public String getServiceDeletionPath() {
-		return serviceDeletionPath;
-	}
-	public void setServiceDeletionPath(String serviceDeletionPath) {
-		this.serviceDeletionPath = serviceDeletionPath;
-	}
-	public String[] getPartitions() {
-		return partitions;
-	}
-	public void setPartitions(String[] partitions) {
-		this.partitions = partitions;
-	}
-	public IndexDefinition[] getIndexes() {
-		return indexes;
-	}
-	public void setIndexes(IndexDefinition[] indexes) {
-		this.indexes = indexes;
-	}
-	public Map<String, Method> getQualifierGetterMap() {
-		return qualifierGetterMap;
-	}
-	public void setQualifierGetterMap(Map<String, Method> qualifierGetterMap) {
-		this.qualifierGetterMap = qualifierGetterMap;
-	}
-//	public Map<String,String> getQualifierDisplayNameMap(){
-//		Map<String,String> qualifierDisplayNameMap = new HashMap<String, String>();
-//		for(Map.Entry<String,Qualifier> entry: qualifierNameMap.entrySet()){
-//			qualifierDisplayNameMap.put(entry.getKey(),entry.getValue().getDisplayName());
-//		}
-//		return qualifierDisplayNameMap;
-//	}
-	
-	/**
-	 * a filed is a tag when this field is neither in qualifierNameMap nor in displayNameMap
-	 * @param field
-	 * @return
-	 */
-	public boolean isTag(String field){
-		return (qualifierNameMap.get(field) == null && displayNameMap.get(field) == null);
-//		return (qualifierNameMap.get(field) == null);
-	}
-
-	/**
-	 * Check if the specified field is a partition tag field
-	 */
-	public boolean isPartitionTag(String field) {
-		if (partitions == null || (!isTag(field))) {
-			return false;
-		}
-		for (String partition : partitions) {
-			if (partition.equals(field)) {
-				return true;
-			}
-		}
-		return false;
-
-	}
-	
-	public Object getValue(TaggedLogAPIEntity entity, String field) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
-		if (!entityClass.equals(entity.getClass())) {
-			if ((entityClass.equals(GenericMetricEntity.class) && entity.getClass().equals(GenericMetricShadowEntity.class))) {
-				GenericMetricShadowEntity e = (GenericMetricShadowEntity)entity;
-				return e.getValue();
-			} else {
-				throw new IllegalArgumentException("Invalid entity type: " + entity.getClass().getSimpleName());
-			}
-		}
-		final Method m = qualifierGetterMap.get(field);
-		if (m == null) {
-			// The field is a tag
-			if (entity.getTags() != null) {
-				return entity.getTags().get(field);
-			}
-		}
-		if (m != null) {
-			return m.invoke(entity);
-		}
-		return null;
-	}
-
-
-	@Override
-	public void write(DataOutput out) throws IOException {
-		out.writeUTF(entityClass.getName());
-		out.writeUTF(table);
-		out.writeUTF(columnFamily);
-		out.writeUTF(prefix);
-		out.writeUTF(service);
-
-		int partitionsLen = 0;
-		if(partitions != null) partitionsLen =partitions.length;
-		out.writeInt(partitionsLen);
-		for (int i = 0; i < partitionsLen; i++) {
-			out.writeUTF(partitions[i]);
-		}
-
-		int displayNameMapSize = displayNameMap.size();
-		out.writeInt(displayNameMapSize);
-		for(Map.Entry<String,Qualifier> entry: displayNameMap.entrySet()){
-			out.writeUTF(entry.getKey());
-			entry.getValue().write(out);
-		}
-
-		int qualifierNameMapSize = qualifierNameMap.size();
-		out.writeInt(qualifierNameMapSize);
-		for(Map.Entry<String,Qualifier> entry: qualifierNameMap.entrySet()){
-			out.writeUTF(entry.getKey());
-			entry.getValue().write(out);
-		}
-
-		// TODO: write qualifierGetterMap
-		out.writeBoolean(isTimeSeries);
-
-		boolean hasMetricDefinition = metricDefinition != null;
-		out.writeBoolean(hasMetricDefinition);
-		if(hasMetricDefinition) {
-			// write MetricDefinition
-			metricDefinition.write(out);
-		}
-
-		// TODO: write indexes
-	}
-
-
-	public void setEntityDefinition(EntityDefinition ed){
-		this.entityClass = ed.getEntityClass();
-		this.table = ed.getTable();
-		this.columnFamily = ed.getColumnFamily();
-		this.prefix = ed.getPrefix();
-		this.service = ed.getService();
-		this.partitions = ed.getPartitions();
-		this.displayNameMap = ed.getDisplayNameMap();
-		this.qualifierGetterMap = ed.getQualifierGetterMap();
-        this.qualifierNameMap = ed.getQualifierNameMap();
-		this.isTimeSeries = ed.isTimeSeries();
-		this.metricDefinition = ed.metricDefinition;
-		this.indexes = ed.getIndexes();
-	}
-
-	//////////////////////////////////////////////
-	// 	TODO: Cache object for reading in region side
-	//////////////////////////////////////////////
-	//	private final static Map<String,EntityDefinition> _classEntityDefinitionCache = new HashMap<String, EntityDefinition>();
-
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		String entityClassName = in.readUTF();
-//		EntityDefinition _cached = _classEntityDefinitionCache.get(entityClassName);
-//		if(_cached !=null){
-//			setEntityDefinition(_cached);
-//			LOG.info("Got cached definition for entity: "+entityClassName);
-//			return;
-//		}
-		if(LOG.isDebugEnabled()) LOG.debug("Reading EntityDefinition entity: "+entityClassName);
-		try {
-			entityClass = (Class<? extends TaggedLogAPIEntity>) Class.forName(entityClassName);
-		} catch (Exception e) {
-			// ignore
-		}
-		table = in.readUTF();
-		columnFamily = in.readUTF();
-		prefix = in.readUTF();
-		service = in.readUTF();
-
-		int partitionsLen = in.readInt();
-		partitions = new String[partitionsLen];
-		for (int i = 0; i < partitionsLen; i++) {
-			partitions[i] = in.readUTF();
-		}
-		int displayNameMapSize = in.readInt();
-		for(int i=0;i<displayNameMapSize;i++){
-			String key = in.readUTF();
-			Qualifier value = new Qualifier();
-			value.readFields(in);
-			displayNameMap.put(key,value);
-		}
-		int qualifierNameMapSize = in.readInt();
-		for(int i=0;i<qualifierNameMapSize;i++){
-			String key = in.readUTF();
-			Qualifier value = new Qualifier();
-			value.readFields(in);
-			qualifierNameMap.put(key,value);
-		}
-		// TODO: readFields qualifierGetterMap
-		isTimeSeries = in.readBoolean();
-
-		// readFields MetricDefinition
-		boolean hasMetricDefinition = in.readBoolean();
-		if(hasMetricDefinition) {
-			if(LOG.isDebugEnabled()) LOG.debug("reading metricDefinition");
-			metricDefinition = new MetricDefinition();
-			metricDefinition.readFields(in);
-		}
-		// TODO: readFields indexes
-//		_classEntityDefinitionCache.put(entityClassName,this);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinitionManager.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinitionManager.java
deleted file mode 100755
index e144e05..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntityDefinitionManager.java
+++ /dev/null
@@ -1,463 +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.log.entity.meta;
-
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.repo.EntityRepositoryScanner;
-import org.mockito.cglib.beans.BeanGenerator;
-import org.mockito.cglib.core.NamingPolicy;
-import org.mockito.cglib.core.Predicate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * static initialization of all registered entities. As of now, dynamic registration is not supported
- */
-public class EntityDefinitionManager {
-	private static final Logger LOG = LoggerFactory.getLogger(EntityDefinitionManager.class);
-	private static volatile boolean initialized = false;
-	/**
-	 * using concurrent hashmap is due to the fact that entity can be registered any time from any thread
-	 */
-	private static Map<String, EntityDefinition> entityServiceMap = new ConcurrentHashMap<String, EntityDefinition>();
-	private static Map<Class<? extends TaggedLogAPIEntity>, EntityDefinition> classMap = new ConcurrentHashMap<Class<? extends TaggedLogAPIEntity>, EntityDefinition>();
-	private static Map<Class<?>, EntitySerDeser<?>> _serDeserMap = new ConcurrentHashMap<Class<?>, EntitySerDeser<?>>(); 
-	private static Map<Class<?>, Integer> _serDeserClassIDMap = new ConcurrentHashMap<Class<?>, Integer>(); 
-	private static Map<Integer, Class<?>> _serIDDeserClassMap = new ConcurrentHashMap<Integer, Class<?>>(); 
-	private static Map<String, Map<Integer, EntityDefinition>> entityPrefixMap = new ConcurrentHashMap<String, Map<Integer, EntityDefinition>>();
-	private static Map<String, Map<Integer, IndexDefinition>> indexPrefixMap = new ConcurrentHashMap<String, Map<Integer, IndexDefinition>>();
-
-	static{
-		int id = 0;
-		_serDeserMap.put(NullObject.class, new NullSerDeser());
-		_serIDDeserClassMap.put(id, NullObject.class);
-		_serDeserClassIDMap.put(NullObject.class, id++);
-		
-		_serDeserMap.put(String.class, new StringSerDeser());
-		_serIDDeserClassMap.put(id, String.class);
-		_serDeserClassIDMap.put(String.class, id++);
-		
-		_serDeserMap.put(long.class, new LongSerDeser());
-		_serIDDeserClassMap.put(id, long.class);
-		_serDeserClassIDMap.put(long.class, id++);
-		
-		_serDeserMap.put(Long.class, new LongSerDeser());
-		_serIDDeserClassMap.put(id, Long.class);
-		_serDeserClassIDMap.put(Long.class, id++);
-		
-		_serDeserMap.put(int.class, new IntSerDeser());
-		_serIDDeserClassMap.put(id, int.class);
-		_serDeserClassIDMap.put(int.class, id++);
-		
-		_serDeserMap.put(Integer.class, new IntSerDeser());
-		_serIDDeserClassMap.put(id, Integer.class);
-		_serDeserClassIDMap.put(Integer.class, id++);
-		
-		_serDeserMap.put(Double.class, new DoubleSerDeser());
-		_serIDDeserClassMap.put(id, Double.class);
-		_serDeserClassIDMap.put(Double.class, id++);
-		
-		_serDeserMap.put(double.class, new DoubleSerDeser());
-		_serIDDeserClassMap.put(id, double.class);
-		_serDeserClassIDMap.put(double.class, id++);
-		
-		_serDeserMap.put(int[].class, new IntArraySerDeser());
-		_serIDDeserClassMap.put(id, int[].class);
-		_serDeserClassIDMap.put(int[].class, id++);
-		
-		_serDeserMap.put(double[].class, new DoubleArraySerDeser());
-		_serIDDeserClassMap.put(id, double[].class);
-		_serDeserClassIDMap.put(double[].class, id++);
-
-		_serDeserMap.put(double[][].class, new Double2DArraySerDeser());
-		_serIDDeserClassMap.put(id, double[][].class);
-		_serDeserClassIDMap.put(double[][].class, id++);
-		
-		_serDeserMap.put(Boolean.class, new BooleanSerDeser());
-		_serIDDeserClassMap.put(id, Boolean.class);
-		_serDeserClassIDMap.put(Boolean.class, id++);
-		
-		_serDeserMap.put(boolean.class, new BooleanSerDeser());
-		_serIDDeserClassMap.put(id, boolean.class);
-		_serDeserClassIDMap.put(boolean.class, id++);
-		
-		_serDeserMap.put(String[].class, new StringArraySerDeser());
-		_serIDDeserClassMap.put(id, String[].class);
-		_serDeserClassIDMap.put(String[].class, id++);
-		
-		_serDeserMap.put(Map.class, new MapSerDeser());
-		_serIDDeserClassMap.put(id, Map.class);
-		_serDeserClassIDMap.put(Map.class, id++);
-		
-		_serDeserMap.put(List.class, new ListSerDeser());
-		_serIDDeserClassMap.put(id, List.class);
-		_serDeserClassIDMap.put(List.class, id++);
-	}
-	
-	
-
-	@SuppressWarnings("rawtypes")
-	public static EntitySerDeser getSerDeser(Class<?> clazz){
-		return _serDeserMap.get(clazz);
-	}
-
-	/**
-	 * Get internal ID by the predefined registered class
-	 * @param clazz original for serialization/deserialization 
-	 * @return the internal id if the input class has been registered, otherwise return -1
-	 */
-	public static int getIDBySerDerClass(Class<?> clazz) {
-		final Integer id = _serDeserClassIDMap.get(clazz);
-		if (id == null) {
-			return -1;
-		}
-		return id;
-	}
-	
-
-	/**
-	 * Get the predefined registered class by internal ID
-	 * @param id the internal class ID
-	 * @return the predefined registered class, if the class hasn't been registered, return null
-	 */
-	public static Class<?> getClassByID(int id) {
-		return _serIDDeserClassMap.get(id);
-	}
-	
-	/**
-	 * it is allowed that user can register their own entity
-	 * @param clazz entity class
-	 * @throws IllegalArgumentException
-	 */
-	public static void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException{
-		registerEntity(createEntityDefinition(clazz));
-	}
-	
-	/**
-	 * it is allowed that user can register their own entity
-	 * @deprecated This API is deprecated since we need to use Service annotation to define service name for entities
-	 * @param serviceName entity service name
-	 * @param clazz entity class
-	 * @throws IllegalArgumentException
-	 * 
-	 */
-    @Deprecated
-	public static void registerEntity(String serviceName, Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException{
-		registerEntity(serviceName, createEntityDefinition(clazz));
-	}
-	
-	/**
-	 * it is allowed that user can register their own entity definition
-	 * @param entityDef entity definition
-	 * @throws IllegalArgumentException
-	 */
-	public static void registerEntity(EntityDefinition entityDef) {
-		registerEntity(entityDef.getService(), entityDef);
-	}
-	
-	/**
-	 * it is allowed that user can register their own entity definition
-	 * @deprecated This API is deprecated since we need to use Service annotation to define service name for entities. 
-	 * 
-	 * @param entityDef entity definition
-	 * @throws IllegalArgumentException
-	 */
-	public static void registerEntity(String serviceName, EntityDefinition entityDef) {
-		final String table = entityDef.getTable();
-		if (entityServiceMap.containsKey(serviceName)) {
-			final EntityDefinition existing = entityServiceMap.get(serviceName);
-			if (entityDef.getClass().equals(existing.getClass())) {
-				return;
-			}
-			throw new IllegalArgumentException("Service " + serviceName + " has already been registered by " + existing.getClass().getName() + ", so class " + entityDef.getClass() + " can NOT be registered");
-		}
-		synchronized (EntityDefinitionManager.class) {
-			checkPrefix(entityDef);
-			entityServiceMap.put(serviceName, entityDef);
-			Map<Integer, EntityDefinition> entityHashMap = entityPrefixMap.get(table);
-			if (entityHashMap == null) {
-				entityHashMap = new ConcurrentHashMap<Integer, EntityDefinition>();
-				entityPrefixMap.put(table, entityHashMap);
-			}
-			entityHashMap.put(entityDef.getPrefix().hashCode(), entityDef);
-			final IndexDefinition[] indexes = entityDef.getIndexes();
-			if (indexes != null) {
-				for (IndexDefinition index : indexes) {
-					Map<Integer, IndexDefinition> indexHashMap = indexPrefixMap.get(table);
-					if (indexHashMap == null) {
-						indexHashMap = new ConcurrentHashMap<Integer, IndexDefinition>();
-						indexPrefixMap.put(table, indexHashMap);
-					}
-					indexHashMap.put(index.getIndexPrefix().hashCode(), index);
-				}
-			}
-			classMap.put(entityDef.getEntityClass(), entityDef);
-		}
-        if(LOG.isDebugEnabled()) {
-            LOG.debug(entityDef.getEntityClass().getSimpleName() + " entity registered successfully, table name: " + entityDef.getTable() +
-					", prefix: " + entityDef.getPrefix() + ", service: " + serviceName + ", CF: " + entityDef.getColumnFamily());
-        }else{
-            LOG.info(String.format("Registered %s (%s)", entityDef.getEntityClass().getSimpleName(), serviceName));
-        }
-	}
-
-	private static void checkPrefix(EntityDefinition entityDef) {
-		final Integer entityPrefixHashcode = entityDef.getPrefix().hashCode();
-		if (entityPrefixMap.containsKey(entityDef.getTable())) {
-			final Map<Integer, EntityDefinition> entityHashMap = entityPrefixMap.get(entityDef.getTable());
-			if (entityHashMap.containsKey(entityPrefixHashcode) && (!entityDef.equals(entityHashMap.get(entityPrefixHashcode)))) {
-				throw new IllegalArgumentException("Failed to register entity " + entityDef.getClass().getName() + ", because of the prefix hash code conflict! The entity prefix " + entityDef.getPrefix() + " has already been registered by entity service " + entityHashMap.get(entityPrefixHashcode).getService());
-			}
-			final IndexDefinition[] indexes = entityDef.getIndexes();
-			if (indexes != null) {
-				for (IndexDefinition index : indexes) {
-					final Integer indexPrefixHashcode = index.getIndexPrefix().hashCode();
-					if (entityHashMap.containsKey(indexPrefixHashcode)) {
-						throw new IllegalArgumentException("Failed to register entity " + entityDef.getClass().getName() + ", because of the prefix hash code conflict! The index prefix " + index.getIndexPrefix() + " has already been registered by entity " + entityHashMap.get(indexPrefixHashcode).getService());
-					}
-					final Map<Integer, IndexDefinition> indexHashMap = indexPrefixMap.get(entityDef.getTable());
-					if (indexHashMap != null && indexHashMap.containsKey(indexPrefixHashcode) && (!index.equals(indexHashMap.get(indexPrefixHashcode)))) {
-						throw new IllegalArgumentException("Failed to register entity " + entityDef.getClass().getName() + ", because of the prefix hash code conflict! The index prefix " + index.getIndexPrefix() + " has already been registered by entity " + indexHashMap.get(indexPrefixHashcode).getEntityDefinition().getService());
-					}
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Get entity definition by name
-	 * @param serviceName
-	 * @return
-	 * @throws IllegalAccessException 
-	 * @throws InstantiationException 
-	 */
-	public static EntityDefinition getEntityByServiceName(String serviceName) throws InstantiationException, IllegalAccessException{
-		checkInit();
-		return entityServiceMap.get(serviceName);
-	}
-	
-	public static EntityDefinition getEntityDefinitionByEntityClass(Class<? extends TaggedLogAPIEntity> clazz) throws InstantiationException, IllegalAccessException {
-		checkInit();
-		return classMap.get(clazz);
-	}
-
-	private static void checkInit() throws InstantiationException, IllegalAccessException {
-		if (!initialized) {
-			synchronized (EntityDefinitionManager.class) {
-				if (!initialized) {
-					EntityRepositoryScanner.scan();
-					initialized = true;
-				}
-			}
-		}
-	}
-
-	/**
-	 * User can register their own field SerDeser
-	 * @param clazz class of the the SerDeser 
-	 * @param entitySerDeser entity or field SerDeser
-	 * @throws IllegalArgumentException
-	 */
-	public static void registerSerDeser(Class<?> clazz, EntitySerDeser<?> entitySerDeser) {
-		_serDeserMap.put(clazz, entitySerDeser);
-	}
-
-	/**
-	 * Check whether the entity class is time series, false by default
-	 * @param clazz
-	 * @return
-	 */
-	public static boolean isTimeSeries(Class<? extends TaggedLogAPIEntity> clazz){
-		TimeSeries ts = clazz.getAnnotation(TimeSeries.class);
-		return ts != null && ts.value();
-	}
-
-	@SuppressWarnings("unchecked")
-	public static EntityDefinition createEntityDefinition(Class<? extends TaggedLogAPIEntity> cls) {
-		
-		final EntityDefinition ed = new EntityDefinition();
-
-		ed.setEntityClass(cls);
-		// parse cls' annotations
-		Table table = cls.getAnnotation(Table.class);
-		if(table == null || table.value().isEmpty()){
-			throw new IllegalArgumentException("Entity class must have a non-empty table name annotated with @Table");
-		}
-		String tableName = table.value();
-		if(EagleConfigFactory.load().isTableNamePrefixedWithEnvironment()){
-			tableName = EagleConfigFactory.load().getEnv() + "_" + tableName;
-		}
-		ed.setTable(tableName);
-		
-		ColumnFamily family = cls.getAnnotation(ColumnFamily.class);
-		if(family == null || family.value().isEmpty()){
-			throw new IllegalArgumentException("Entity class must have a non-empty column family name annotated with @ColumnFamily");
-		}
-		ed.setColumnFamily(family.value());
-		
-		Prefix prefix = cls.getAnnotation(Prefix.class);
-		if(prefix == null || prefix.value().isEmpty()){
-			throw new IllegalArgumentException("Entity class must have a non-empty prefix name annotated with @Prefix");
-		}
-		ed.setPrefix(prefix.value());
-		
-		TimeSeries ts = cls.getAnnotation(TimeSeries.class);
-		if(ts == null){
-			throw new IllegalArgumentException("Entity class must have a non-empty timeseries name annotated with @TimeSeries");
-		}
-		ed.setTimeSeries(ts.value());
-		
-		Service service = cls.getAnnotation(Service.class);
-		if(service == null || service.value().isEmpty()){
-			ed.setService(cls.getSimpleName());
-		} else {
-			ed.setService(service.value());
-		}
-
-		Metric m = cls.getAnnotation(Metric.class);
-		Map<String, Class<?>> dynamicFieldTypes = new HashMap<String, Class<?>>();
-		if(m != null){
-			// metric has to be timeseries
-			if(!ts.value()){
-				throw new IllegalArgumentException("Metric entity must be time series as well");
-			}
-			MetricDefinition md = new MetricDefinition();
-			md.setInterval(m.interval());
-			ed.setMetricDefinition(md);
-		}
-
-		java.lang.reflect.Field[] fields = cls.getDeclaredFields();
-		for(java.lang.reflect.Field f : fields){
-			Column column = f.getAnnotation(Column.class); 
-			if(column == null || column.value().isEmpty()){
-				continue;
-			}
-			Class<?> fldCls = f.getType();
-			// intrusive check field type for metric entity
-			checkFieldTypeForMetric(ed.getMetricDefinition(), f.getName(), fldCls, dynamicFieldTypes);
-			Qualifier q = new Qualifier();
-			q.setDisplayName(f.getName());
-			q.setQualifierName(column.value());
-			EntitySerDeser<?> serDeser = _serDeserMap.get(fldCls); 
-			if(serDeser == null){
-				throw new IllegalArgumentException(fldCls.getName() + " in field " + f.getName() + 
-						" of entity " + cls.getSimpleName() + " has no serializer associated ");
-			} else {
-				q.setSerDeser((EntitySerDeser<Object>)serDeser);
-			}
-			ed.getQualifierNameMap().put(q.getQualifierName(), q);
-			ed.getDisplayNameMap().put(q.getDisplayName(), q);
-			// TODO: should refine rules, consider fields like "hCol", getter method should be gethCol() according to org.apache.commons.beanutils.PropertyUtils
-			final String propertyName = f.getName().substring(0,1).toUpperCase() + f.getName().substring(1);
-			String getterName = "get" + propertyName;
-			try {
-				Method method = cls.getMethod(getterName);
-				ed.getQualifierGetterMap().put(f.getName(), method);
-			} catch (Exception e) {
-				// Check if the type is boolean
-				getterName = "is" + propertyName;
-				try {
-					Method method = cls.getMethod(getterName);
-					ed.getQualifierGetterMap().put(f.getName(), method);
-				} catch (Exception e1) {
-					throw new IllegalArgumentException("Field " + f.getName() + " hasn't defined valid getter method: " + getterName, e);
-				}
-			}
-			if(LOG.isDebugEnabled()) LOG.debug("Field registered " + q);
-		}
-
-		// TODO: Lazy create because not used at all
-		// dynamically create bean class
-		if(ed.getMetricDefinition() != null){
-			Class<?> metricCls = createDynamicClassForMetric(cls.getName()+"_SingleTimestamp", dynamicFieldTypes);
-			ed.getMetricDefinition().setSingleTimestampEntityClass(metricCls);
-		}
-		
-		final Partition partition = cls.getAnnotation(Partition.class);
-		if (partition != null) {
-			final String[] partitions = partition.value();
-			ed.setPartitions(partitions);
-			// Check if partition fields are all tag fields. Partition field can't be column field, must be tag field.
-			for (String part : partitions) {
-				if (!ed.isTag(part)) {
-					throw new IllegalArgumentException("Partition field can't be column field, must be tag field. "
-							+ "Partition name: " + part);
-				}
-			}
-		}
-		
-		final Indexes indexes = cls.getAnnotation(Indexes.class);
-		if (indexes != null) {
-			final Index[] inds = indexes.value();
-			final IndexDefinition[] indexDefinitions = new IndexDefinition[inds.length];
-			for (int i = 0; i < inds.length; ++i) {
-				final Index ind = inds[i];
-				indexDefinitions[i] = new IndexDefinition(ed, ind);
-			}
-			ed.setIndexes(indexDefinitions);
-		}
-		
-		final ServicePath path = cls.getAnnotation(ServicePath.class);
-		if (path != null) {
-			if (path.path() != null && (!path.path().isEmpty())) {
-				ed.setServiceCreationPath(path.path());
-			}
-		}
-		
-		return ed;
-	}
-	
-	private static void checkFieldTypeForMetric(MetricDefinition md, String fieldName, Object fldCls, Map<String, Class<?>> dynamicFieldTypes){
-		if(md != null){
-			if(fldCls.equals(int[].class)){
-				dynamicFieldTypes.put(fieldName, int.class);
-				return;
-			}else if(fldCls.equals(long[].class)){
-				dynamicFieldTypes.put(fieldName, long.class);
-				return;
-			}else if(fldCls.equals(double[].class)){
-				dynamicFieldTypes.put(fieldName, double.class);
-				return;
-			}
-			throw new IllegalArgumentException("Fields for metric entity must be one of int[], long[] or double[]");
-		}
-	}
-	
-	private static Class<?> createDynamicClassForMetric(final String className, Map<String, Class<?>> dynamicFieldTypes){
-		BeanGenerator beanGenerator = new BeanGenerator();
-		beanGenerator.setNamingPolicy(new NamingPolicy(){
-	        @Override 
-	        public String getClassName(String prefix,String source, Object key, Predicate names){
-	            return className;
-	        }});
-	    BeanGenerator.addProperties(beanGenerator, dynamicFieldTypes);
-	    beanGenerator.setSuperclass(TaggedLogAPIEntity.class);
-	    return (Class<?>) beanGenerator.createClass();
-	}
-	
-	public static Map<String, EntityDefinition> entities() throws Exception{
-		checkInit();
-		return entityServiceMap;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeser.java
deleted file mode 100755
index 25d55e0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeser.java
+++ /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.
- */
-package org.apache.eagle.log.entity.meta;
-
-public interface EntitySerDeser<T> {
-	public T deserialize(byte[] bytes);
-	public byte[] serialize(T t);
-	public Class<T> type();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeserializer.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeserializer.java
deleted file mode 100755
index a7ec4e4..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/EntitySerDeserializer.java
+++ /dev/null
@@ -1,79 +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.log.entity.meta;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.commons.beanutils.PropertyUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.beans.PropertyDescriptor;
-import java.util.HashMap;
-import java.util.Map;
-
-public class EntitySerDeserializer {
-	private static final Logger LOG = LoggerFactory.getLogger(EntitySerDeserializer.class);
-	
-	// TODO throws seperate exceptions
-	@SuppressWarnings("unchecked")
-	public <T> T readValue(Map<String, byte[]> qualifierValues, EntityDefinition ed) throws Exception{
-		Class<? extends TaggedLogAPIEntity> clazz = ed.getEntityClass();
-		if(clazz == null){
-			throw new NullPointerException("Entity class of service "+ed.getService()+" is null");
-		}
-		TaggedLogAPIEntity obj = clazz.newInstance();
-		Map<String, Qualifier> map = ed.getQualifierNameMap();
-		for(Map.Entry<String, byte[]> entry : qualifierValues.entrySet()){
-			Qualifier q = map.get(entry.getKey());
-			if(q == null){
-				// if it's not pre-defined qualifier, it must be tag unless it's a bug
-				if(obj.getTags() == null){
-					obj.setTags(new HashMap<String, String>());
-				}
-				obj.getTags().put(entry.getKey(), new StringSerDeser().deserialize(entry.getValue()));
-				continue;
-			}
-			
-			// TODO performance loss compared with new operator
-			// parse different types of qualifiers
-			String fieldName = q.getDisplayName();
-			PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(obj, fieldName);
-			if(entry.getValue() != null){
-				Object args = q.getSerDeser().deserialize(entry.getValue());
-				pd.getWriteMethod().invoke(obj, args);
-//				if (logger.isDebugEnabled()) {
-//					logger.debug(entry.getKey() + ":" + args + " is deserialized");
-//				}
-			}
-		}
-		return (T)obj;
-	}
-	
-	public Map<String, byte[]> writeValue(TaggedLogAPIEntity entity, EntityDefinition ed) throws Exception{
-		Map<String, byte[]> qualifierValues = new HashMap<String, byte[]>();
-		// iterate all modified qualifiers
-		for(String fieldName : entity.modifiedQualifiers()){
-			PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(entity, fieldName);
-			Object obj = pd.getReadMethod().invoke(entity);
-			Qualifier q = ed.getDisplayNameMap().get(fieldName);
-			EntitySerDeser<Object> ser = q.getSerDeser();
-			byte[] value = ser.serialize(obj);
-			qualifierValues.put(q.getQualifierName(), value);
-		}
-		return qualifierValues;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Index.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Index.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Index.java
deleted file mode 100755
index c7dc113..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Index.java
+++ /dev/null
@@ -1,32 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Index {
-
-    public String name();
-    public String[] columns();
-    public boolean unique();
-//	boolean unique() default true;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IndexDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IndexDefinition.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IndexDefinition.java
deleted file mode 100755
index 2e62420..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IndexDefinition.java
+++ /dev/null
@@ -1,335 +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.log.entity.meta;
-
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.nio.charset.Charset;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.RowkeyBuilder;
-import org.apache.commons.beanutils.PropertyUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.query.parser.ANDExpression;
-import org.apache.eagle.query.parser.AtomicExpression;
-import org.apache.eagle.query.parser.ComparisonOperator;
-import org.apache.eagle.query.parser.ORExpression;
-import org.apache.eagle.common.ByteUtil;
-
-/**
- * Eagle index schema definition.
- * 
- * 1. Index schema can be defined in entity class by annotation.
- * 2. One index schema can contain multiple fields/tags, defined in order
- * 3. We only support immutable indexing for now
- * 4. When entity is created or deleted, the corresponding index entity should be created or deleted at the same time
- * 5. Index transparency to queries. Queries go through index when and only when index can serve all search conditions after query rewrite
- * 
- *
- */
-public class IndexDefinition {
-	
-	public enum IndexType {
-		UNIQUE_INDEX,
-		NON_CLUSTER_INDEX,
-		NON_INDEX
-	}
-
-	private final EntityDefinition entityDef;
-	private final Index index;
-	private final IndexColumn[] columns;
-	private final String indexPrefix;
-	
-	private static final byte[] EMPTY_VALUE = new byte[0];
-	private static final Charset UTF_8_CHARSET = Charset.forName("UTF-8");
-	public static final int EMPTY_PARTITION_DEFAULT_HASH_CODE = 0;
-	public static final int MAX_INDEX_VALUE_BYTE_LENGTH = 65535;
-	
-	private static final String FIELD_NAME_PATTERN_STRING = "^@(.*)$";
-	private static final Pattern FIELD_NAME_PATTERN = Pattern.compile(FIELD_NAME_PATTERN_STRING);
-	private final static Logger LOG = LoggerFactory.getLogger(IndexDefinition.class);
-
-	public IndexDefinition(EntityDefinition entityDef, Index index) {
-		this.entityDef = entityDef;
-		this.index = index;
-		this.indexPrefix = entityDef.getPrefix() + "_" + index.name();
-		final String[] indexColumns = index.columns();
-		this.columns = new IndexColumn[indexColumns.length];
-		for (int i = 0; i < indexColumns.length; ++i) {
-			final String name = indexColumns[i];
-			final boolean isTag = entityDef.isTag(name);
-			final Qualifier qualifier = isTag ? null : entityDef.getDisplayNameMap().get(name);
-			columns[i] = new IndexColumn(name, isTag, qualifier);
-		}
-		LOG.info("Created index " + index.name() + " for " + entityDef.getEntityClass().getSimpleName());
-	}
-
-	public EntityDefinition getEntityDefinition() {
-		return entityDef;
-	}
-	
-	public Index getIndex() {
-		return index;
-	}
-	
-	public String getIndexName() {
-		return index.name();
-	}
-	
-	public IndexColumn[] getIndexColumns() {
-		return columns;
-	}
-	
-	public String getIndexPrefix() {
-		return indexPrefix;
-	}
-	
-	public boolean isUnique() {
-		return index.unique();
-	}
-	
-	/**
-	 * Check if the query is suitable to go through index. If true, then return the value of index fields in order. Otherwise return null.
-	 * TODO: currently index fields should be string type.
-	 * 
-	 * @param query query expression after re-write
-	 * @param rowkeys if the query can go through the index, all rowkeys will be added into rowkeys.
-	 * @return true if the query can go through the index, otherwise return false
-	 */
-	public IndexType canGoThroughIndex(ORExpression query, List<byte[]> rowkeys) {
-		if (query == null || query.getANDExprList() == null || query.getANDExprList().isEmpty()) 
-			return IndexType.NON_CLUSTER_INDEX;
-		if (rowkeys != null) {
-			rowkeys.clear();
-		}
-		final Map<String, String> indexfieldMap = new HashMap<String, String>();
-		for(ANDExpression andExpr : query.getANDExprList()) {
-			indexfieldMap.clear();
-			for(AtomicExpression ae : andExpr.getAtomicExprList()) {
-				// TODO temporarily ignore those fields which are not for attributes
-				final String fieldName = parseEntityAttribute(ae.getKey());
-				if(fieldName != null && ComparisonOperator.EQUAL.equals(ae.getOp())){
-					indexfieldMap.put(fieldName, ae.getValue());
-				}
-			}
-			final String[] partitions = entityDef.getPartitions();
-			int[] partitionValueHashs = null;
-			if (partitions != null) {
-				partitionValueHashs = new int[partitions.length];
-				for (int i = 0; i < partitions.length; ++i) {
-					final String value = indexfieldMap.get(partitions[i]);
-					if (value == null) {
-						throw new IllegalArgumentException("Partition " + partitions[i] + " is not defined in the query: " + query.toString());
-					}
-					partitionValueHashs[i] = value.hashCode();
-				}
-			}
-			final byte[][] indexFieldValues = new byte[columns.length][];
-			for (int i = 0; i < columns.length; ++i) {
-				final IndexColumn col = columns[i];
-				if (!indexfieldMap.containsKey(col.getColumnName())) {
-					// If we have to use scan anyway, there's no need to go through index
-					return IndexType.NON_INDEX;
-				}
-				final String value = indexfieldMap.get(col.getColumnName());
-				indexFieldValues[i] = value.getBytes();
-			}
-			final byte[] rowkey = generateUniqueIndexRowkey(indexFieldValues, partitionValueHashs, null);
-			if (rowkeys != null) {
-				rowkeys.add(rowkey);
-			}
-		}
-		if (index.unique()) {
-			return IndexType.UNIQUE_INDEX;
-		}
-		return IndexType.NON_CLUSTER_INDEX;
-	}
-
-	private String parseEntityAttribute(String fieldName) {
-		Matcher m = FIELD_NAME_PATTERN.matcher(fieldName);
-		if(m.find()){
-			return m.group(1);
-		}
-		return null;
-	}
-	
-	// TODO: We should move index rowkey generation later since this class is for general purpose, not only for hbase.
-	public byte[] generateIndexRowkey(TaggedLogAPIEntity entity) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
-		if (entity.getClass() != entityDef.getEntityClass()) {
-			throw new IllegalArgumentException("Expected entity class: " + entityDef.getEntityClass().getName() + ", but got class " + entity.getClass().getName());
-		}
-		final byte[][] indexValues = generateIndexValues(entity);
-		final int[] partitionHashCodes = generatePartitionHashCodes(entity);
-		SortedMap<Integer, Integer> tagMap = null;
-		if (!index.unique()) {
-			// non cluster index
-			tagMap = RowkeyBuilder.generateSortedTagMap(entityDef.getPartitions(), entity.getTags());
-		}
-		
-		return generateUniqueIndexRowkey(indexValues, partitionHashCodes, tagMap);
-	}
-	
-	private byte[] generateUniqueIndexRowkey(byte[][] indexValues, int[] partitionHashCodes, SortedMap<Integer, Integer> tagMap) {
-		final int prefixHashCode = indexPrefix.hashCode();
-		int totalLength = 4;
-		totalLength += (partitionHashCodes != null) ? (4 * partitionHashCodes.length) : 0;
-		
-		totalLength += (2 * indexValues.length);
-		for (int i = 0; i < indexValues.length; ++i) {
-			final byte[] value = indexValues[i];
-			totalLength += value.length;
-		}
-		if (tagMap != null && (!tagMap.isEmpty())) {
-			totalLength += tagMap.size() * 8;
-		}
-		
-		int offset = 0;
-		final byte[] rowkey = new byte[totalLength];
-		
-		// 1. set prefix
-		ByteUtil.intToBytes(prefixHashCode, rowkey, offset);
-		offset += 4;
-		
-		// 2. set partition
-		if (partitionHashCodes != null) {
-			for (Integer partitionHashCode : partitionHashCodes) {
-				ByteUtil.intToBytes(partitionHashCode, rowkey, offset);
-				offset += 4;
-			}
-		}
-		
-		// 3. set index values
-		for (int i = 0; i < columns.length; ++i) {
-			ByteUtil.shortToBytes((short)indexValues[i].length, rowkey, offset);
-			offset += 2;
-			for (int j = 0; j < indexValues[i].length; ++j) {
-				rowkey[offset++] = indexValues[i][j];
-			}
-		}
-		
-		// Check if it's non clustered index, then set the tag/value hash code
-		if (tagMap != null && (!tagMap.isEmpty())) {
-			// 4. set tag key/value hashes
-			for (Map.Entry<Integer, Integer> entry : tagMap.entrySet()) {
-				ByteUtil.intToBytes(entry.getKey(), rowkey, offset);
-				offset += 4;
-				ByteUtil.intToBytes(entry.getValue(), rowkey, offset);
-				offset += 4;
-			}
-		}
-		
-		return rowkey;
-	}
-
-	private int[] generatePartitionHashCodes(TaggedLogAPIEntity entity) {
-		final String[] partitions = entityDef.getPartitions();
-		int[] result = null;
-		if (partitions != null) {
-			result = new int[partitions.length];
-			final Map<String, String> tags = entity.getTags();
-			for (int i = 0 ; i < partitions.length; ++i) {
-				final String partition = partitions[i];
-				final String tagValue = tags.get(partition);
-				if (tagValue != null) {
-					result[i] = tagValue.hashCode();
-				} else {
-					result[i] = EMPTY_PARTITION_DEFAULT_HASH_CODE;
-				}
-			}
-		}
-		return result;
-	}
-
-	private byte[][] generateIndexValues(TaggedLogAPIEntity entity) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
-
-		final byte[][] result = new byte[columns.length][];
-		for (int i = 0; i < columns.length; ++i) {
-			final IndexColumn column = columns[i];
-			final String columnName = column.getColumnName();
-			if (column.isTag) {
-				final Map<String, String> tags = entity.getTags();
-				if (tags == null || tags.get(columnName) == null) {
-					result[i] = EMPTY_VALUE;
-				} else {
-					result[i] = tags.get(columnName).getBytes(UTF_8_CHARSET);
-				}
-			} else {
-				PropertyDescriptor pd = column.getPropertyDescriptor();
-				if (pd == null) {
-					pd = PropertyUtils.getPropertyDescriptor(entity, columnName);
-					column.setPropertyDescriptor(pd);
-				}
-				final Object value = pd.getReadMethod().invoke(entity);
-				if (value == null) {
-					result[i] = EMPTY_VALUE;
-				} else {
-					final Qualifier q = column.getQualifier();
-					result[i] = q.getSerDeser().serialize(value);
-				}
-			}
-			if (result[i].length > MAX_INDEX_VALUE_BYTE_LENGTH) {
-				throw new IllegalArgumentException("Index field value exceeded the max length: " + MAX_INDEX_VALUE_BYTE_LENGTH + ", actual length: " + result[i].length);
-			}
-		}
-		return result;
-	}
-	
-	/**
-	 * Index column definition class
-	 *
-	 */
-	public static class IndexColumn {
-		private final String columnName;
-		private final boolean isTag;
-		private final Qualifier qualifier;
-		private PropertyDescriptor propertyDescriptor;
-		
-		public IndexColumn(String columnName, boolean isTag, Qualifier qualifier) {
-			this.columnName = columnName;
-			this.isTag = isTag;
-			this.qualifier = qualifier;
-		}
-		
-		public String getColumnName() {
-			return columnName;
-		}
-		public boolean isTag() {
-			return isTag;
-		}
-		
-		public Qualifier getQualifier() {
-			return qualifier;
-		}
-
-		public PropertyDescriptor getPropertyDescriptor() {
-			return propertyDescriptor;
-		}
-
-		public void setPropertyDescriptor(PropertyDescriptor propertyDescriptor) {
-			this.propertyDescriptor = propertyDescriptor;
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Indexes.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Indexes.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Indexes.java
deleted file mode 100644
index 3c82a0a..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/Indexes.java
+++ /dev/null
@@ -1,29 +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.log.entity.meta;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Indexes {
-
-	public Index[] value();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntArraySerDeser.java
deleted file mode 100755
index 8831223..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntArraySerDeser.java
+++ /dev/null
@@ -1,71 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-/**
- * serialize int array which is stored like the following
- * <int><int>*size, where the first <int> is the size of int
- */
-public class IntArraySerDeser implements EntitySerDeser<int[]>{
-
-	public IntArraySerDeser(){}
-
-	@Override
-	public int[] deserialize(byte[] bytes){
-		if(bytes.length < 4)
-			return null;
-		int offset = 0;
-		// get size of int array
-		int size = ByteUtil.bytesToInt(bytes, offset);
-		offset += 4;
-		int[] values = new int[size];
-		for(int i=0; i<size; i++){
-			values[i] = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-		}
-		return values;
-	}
-	
-	/**
-	 * 
-	 * @param obj
-	 * @return
-	 */
-	@Override
-	public byte[] serialize(int[] obj){
-		if(obj == null)
-			return null;
-		int size = obj.length;
-		byte[] array = new byte[4 + 4*size];
-		byte[] first = ByteUtil.intToBytes(size);
-		int offset = 0;
-		System.arraycopy(first, 0, array, offset, first.length);
-		offset += first.length;
-		for(int i=0; i<size; i++){
-			System.arraycopy(ByteUtil.intToBytes(obj[i]), 0, array, offset, 4);
-			offset += 4;
-		}
-		return array;
-	}
-
-	@Override
-	public Class<int[]> type() {
-		return int[].class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntSerDeser.java
deleted file mode 100755
index 695badd..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/IntSerDeser.java
+++ /dev/null
@@ -1,42 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-public class IntSerDeser implements EntitySerDeser<Integer>{
-	public IntSerDeser(){}
-
-	@Override
-	public Integer deserialize(byte[] bytes){
-		if(bytes.length < 4)
-			return null;
-		return Integer.valueOf(ByteUtil.bytesToInt(bytes));
-	}
-	
-	@Override
-	public byte[] serialize(Integer obj){
-		if(obj == null)
-			return null;
-		return ByteUtil.intToBytes(obj);
-	}
-
-	@Override
-	public Class<Integer> type() {
-		return Integer.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ListSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ListSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ListSerDeser.java
deleted file mode 100644
index eaf5e92..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/ListSerDeser.java
+++ /dev/null
@@ -1,128 +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.log.entity.meta;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.common.ByteUtil;
-
-/**
- * Serialization/deserialization for map type
- *
- */
-@SuppressWarnings("rawtypes")
-public class ListSerDeser implements EntitySerDeser<List> {
-
-	@SuppressWarnings({ "unchecked" })
-	@Override
-	public List deserialize(byte[] bytes) {
-		if (bytes == null || bytes.length == 0) {
-			return null;
-		}
-		final List list = new ArrayList();
-		int offset = 0;
-		// get size of int array
-		final int size = ByteUtil.bytesToInt(bytes, offset);
-		offset += 4;
-		
-		for (int i = 0; i < size; ++i) {
-			final int valueID = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final Class<?> valueClass = EntityDefinitionManager.getClassByID(valueID);
-			if (valueClass == null) {
-				throw new IllegalArgumentException("Unsupported value type ID: " + valueID);
-			}
-			final EntitySerDeser valueSerDer = EntityDefinitionManager.getSerDeser(valueClass);
-			final int valueLength = ByteUtil.bytesToInt(bytes, offset);
-			offset += 4;
-			final byte[] valueContent = new byte[valueLength];
-			System.arraycopy(bytes, offset, valueContent, 0, valueLength);
-			offset += valueLength;
-			final Object value = valueSerDer.deserialize(valueContent);
-			
-			list.add(value);
-		}
-		return list;
-	}
-
-	/**
-	 *  size + value1 type id + value length + value1 binary content + ...
-	 *   4B         4B              4B              value1 bytes
-	 */
-	@SuppressWarnings({ "unchecked" })
-	@Override
-	public byte[] serialize(List list) {
-		if(list == null)
-			return null;
-		final int size = list.size();
-		final int[] valueIDs = new int[size];
-		final byte[][] valueBytes = new byte[size][];
-		
-		int totalSize = 4 + size * 8;
-		int i = 0;
-		Iterator iter = list.iterator();
-		while (iter.hasNext()) {
-			final Object value = iter.next();
-			Class<?> valueClass = value.getClass();
-			int valueTypeID = EntityDefinitionManager.getIDBySerDerClass(valueClass);
-
-			if (valueTypeID == -1) {
-				if (value instanceof List) {
-					valueClass = List.class;
-					valueTypeID = EntityDefinitionManager.getIDBySerDerClass(valueClass);
-				}
-				else if (value instanceof Map) {
-					valueClass = Map.class;
-					valueTypeID = EntityDefinitionManager.getIDBySerDerClass(valueClass);
-				}
-				else {
-					throw new IllegalArgumentException("Unsupported class: " + valueClass.getName());
-				}
-			}
-			valueIDs[i] = valueTypeID;
-			final EntitySerDeser valueSerDer = EntityDefinitionManager.getSerDeser(valueClass);
-			if (valueSerDer == null) {
-				throw new IllegalArgumentException("Unsupported class: " + valueClass.getName());
-			}
-			valueBytes[i] = valueSerDer.serialize(value);
-			totalSize += valueBytes[i].length;
-			++i;
-		}
-		final byte[] result = new byte[totalSize];
-		int offset = 0;
-		ByteUtil.intToBytes(size, result, offset);
-		offset += 4;
-		for (i = 0; i < size; ++i) {			
-			ByteUtil.intToBytes(valueIDs[i], result, offset);
-			offset += 4;
-			ByteUtil.intToBytes(valueBytes[i].length, result, offset);
-			offset += 4;
-			System.arraycopy(valueBytes[i], 0, result, offset, valueBytes[i].length);
-			offset += valueBytes[i].length;
-		}
-		return result;
-	}
-
-	@Override
-	public Class<List> type() {
-		return List.class;
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/LongSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/LongSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/LongSerDeser.java
deleted file mode 100755
index 914cd95..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/meta/LongSerDeser.java
+++ /dev/null
@@ -1,43 +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.log.entity.meta;
-
-import org.apache.eagle.common.ByteUtil;
-
-public class LongSerDeser implements EntitySerDeser<Long>{
-	public LongSerDeser(){}
-
-	@Override
-	public Long deserialize(byte[] bytes){
-		if(bytes.length < 8)
-			return null;
-//		return new Long(ByteUtil.bytesToLong(bytes));
-		return Long.valueOf(ByteUtil.bytesToLong(bytes));
-	}
-	
-	@Override
-	public byte[] serialize(Long obj){
-		if(obj == null)
-			return null;
-		return ByteUtil.longToBytes(obj);
-	}
-
-	@Override
-	public Class<Long> type() {
-		return Long.class;
-	}
-}



[11/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryResource.java b/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryResource.java
deleted file mode 100755
index a53f980..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryResource.java
+++ /dev/null
@@ -1,601 +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.service.generic;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
-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.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.apache.eagle.service.hbase.TestHBaseBase;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TestListQueryResource extends TestHBaseBase {
-
-	HTableInterface table;
-	long startTime;
-	long endTime;
-	List<String> rowkeys;
-	AggregateClient client;
-	Scan scan;
-	String TEST_TIME_SERIES_API_SERVICE = "TestTimeSeriesAPIEntity";
-	EntityDefinition entityDefinition = null;
-
-	@Before
-	public void setUp() throws IllegalAccessException, InstantiationException, IOException {
-		entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(GenericMetricEntity.class);
-		hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		table = EagleConfigFactory.load().getHTable("unittest");
-		startTime = System.currentTimeMillis();
-		try {
-//			rowkeys = prepareTestEntity(200);
-		} catch (Exception e) {
-			e.printStackTrace();
-			junit.framework.Assert.fail(e.getMessage());
-		}
-		endTime = System.currentTimeMillis();
-
-		client = new AggregateClientImpl();
-		scan = new Scan();
-		ListQueryCompiler compiler = null;
-		try {
-			compiler = new ListQueryCompiler(TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" and @datacenter = \"dc1\"]{@field1,@field2}");
-		} catch (Exception e) {
-			junit.framework.Assert.fail(e.getMessage());
-		}
-		scan.setFilter(compiler.filter());
-//		scan.setStartRow(EagleBase64Wrapper.decode(rowkeys.get(0)));
-//		scan.setStopRow(EagleBase64Wrapper.decode(rowkeys.get(rowkeys.size()-1)));
-	}
-
-	@After
-	public void cleanUp() throws IllegalAccessException, InstantiationException, IOException {
-		entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(GenericMetricEntity.class);
-		hbase.deleteTable(entityDefinition.getTable());
-
-		entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		hbase.deleteTable(entityDefinition.getTable());
-	}
-
-	@SuppressWarnings("unused")
-	private List<String> prepareTestEntity(int count) throws Exception {
-		List<TestTimeSeriesAPIEntity> list = new ArrayList<TestTimeSeriesAPIEntity>();
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestTimeSeriesAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-		}
-
-		for(int i=0;i<count;i++){
-			TestTimeSeriesAPIEntity e = new TestTimeSeriesAPIEntity();
-			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");
-			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());
-			list.add(e);
-		}
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		return result;
-	}
-
-	private List<String> prepareMetricEntity(long startTime,int count) throws Exception {
-		List<GenericMetricEntity> list = new ArrayList<GenericMetricEntity>();
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(GenericMetricEntity.class);
-
-		double[] value = new double[60];
-		for(int i=0;i<60;i++){
-			value[i] = 1;
-		}
-		for(int i=0;i<count;i++){
-			GenericMetricEntity e = new GenericMetricEntity();
-			e.setTimestamp(startTime+i*3600*1000);
-			e.setValue(value);
-			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.setPrefix("eagle.metric.test");
-			list.add(e);
-		}
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		return result;
-	}
-
-	@Test
-	public void testMetricQuery() throws Exception {
-		long _startTime = System.currentTimeMillis();
-		List<String> rowKeys = prepareMetricEntity(startTime,200);
-		long _endTime = startTime+ 200 * 3600*1000;
-		String startTime = DateTimeUtil.secondsToHumanDate(_startTime / 1000);
-		String endTime = DateTimeUtil.secondsToHumanDate((_endTime + 1000) / 1000);
-
-		ListQueryResource resource = new ListQueryResource();
-		String query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-
-		ListQueryAPIResponseEntity response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]{EXP{@value/3}}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]{*}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-
-		//////////////////////////////////////////
-		/// Time series aggregation
-		//////////////////////////////////////////
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-	}
-
-	@Test
-	public void testMetricQueryWithSort() throws Exception {
-		long _startTime = System.currentTimeMillis();
-		List<String> rowKeys = prepareMetricEntity(startTime,200);
-		long _endTime = startTime+ 200 * 3600*1000;
-		String startTime = DateTimeUtil.secondsToHumanDate(_startTime / 1000);
-		String endTime = DateTimeUtil.secondsToHumanDate((_endTime + 1000) / 1000);
-
-		ListQueryResource resource = new ListQueryResource();
-		String query;
-
-		ListQueryAPIResponseEntity response;
-
-
-		//////////////////////////////////////////
-		/// Time series aggregation
-		//////////////////////////////////////////
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(value)}.{avg(value) desc}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(value)}.{sum(value) desc}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(value)}.{max(value) asc}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 6000000, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "GenericMetricService[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(value)}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, false, 1, 0, false, 0, "eagle.metric.test");
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-	}
-
-	@Test
-	public void testPartitionBasedQuery() throws InstantiationException, IllegalAccessException {
-		String[] partitions =  new String[2];
-		partitions[0] = "cluster";
-		partitions[1] = "datacenter";
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		EntityDefinition entityDef = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-		entityDef.setPartitions(partitions);
-		entityDef.setTimeSeries(true);
-		
-		ListQueryResource resource = new ListQueryResource();
-		String query = "TestLogAPIEntity[]{@cluster}";
-		String startTime = DateTimeUtil.secondsToHumanDate(System.currentTimeMillis() / 1000);
-		String endTime = DateTimeUtil.secondsToHumanDate((System.currentTimeMillis() + 1000) / 1000);
-		
-		ListQueryAPIResponseEntity response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertFalse(response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" ]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertFalse(response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\"]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-		
-		query = "TestLogAPIEntity[(@cluster=\"cluster1\") OR (@cluster=\"cluster1\" AND @datacenter=\"dc1\")]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertFalse(response.isSuccess());
-
-		query = "TestLogAPIEntity[(@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @tag1=\"value1\") OR (@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @tag2=\"value2\")]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@tag1=\"value1\" OR @tag2=\"value2\")]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		// Tag with =, !=, =~, !=~, contains, not contains, in, not in
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@tag1!=\"value1\" or @tag2=~\"value2\" or ((@tag3 contains \"value3\") or (@tag3 not contains \"value3\")) or @tag4 !=~ \"value4\" or @tag5 in (\"value5-1\",\"value5-2\",\"value5-3\") or @tag6 not in (\"value5-1\",\"value5-2\",\"value5-3\"))]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		// Tag with complex IN & List
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@tag5 in (\"value5-1\",\"value5,2\"))]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue(response.isSuccess());
-
-		// Tag with unsupported operation
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@tag1 < \"value1\")]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertFalse("Tag with unsupported operation, should get exception",response.isSuccess());
-
-		// Field with numeric
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND " +
-				"(@field1 < 1 or @field2 = 2 or @field3 = 13456789 or @field4 = 987654321 or @field5 = 5.6 or @field7 < \"value7\")]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Field with numeric, should success",response.isSuccess());
-
-		// Field with not supported negative numeric value which is to be supported with coprocessor later
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@field1 < -1)]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Field supporte negative numeric value, should get exception", response.isSuccess());
-
-		// Query with escaped value
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND (@tag1 in (\"\\\"value1-part1\\\",\\\"value1-part2\\\"\",\"value2\"))]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support escaped quotes, should success: "+query,response.isSuccess());
-
-		// Query with null
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @tag1 is null ]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @tag1 is not null]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is not null, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @tag1 is not null]{*}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is not null, should success: "+query,response.isSuccess());
-
-//		startTime = "2014-02-13 15:00:00";
-//		endTime = "2014-02-13 15:05:00";
-//		query = "TaskAttemptExecutionService[@cluster=\"cluster1\" AND @datacenter=\"dc1\"]{@cluster,@startTime}";
-//		response = resource.listQuery(query, startTime, endTime, 10, null, false, true, 1);
-//		Assert.assertNotNull(response);
-//		Assert.assertTrue(response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND EXP{@field1 + @field2} > 0]{@cluster}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support expression in filter, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND EXP{@field1 + @field2} > 0]{EXP{@field1 + @field2} }";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support expression in output, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND EXP{@field1 + @field2} > 0]{EXP{@field1 + @field2} as A}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support expression output with alias, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND EXP{@field1 + @field2} > 0]{@cluster,EXP{@field1 + @field2} as A}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null,true);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support parameter \"verbose\" is true, should success: "+query,response.isSuccess());
-
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND EXP{@field1 + @field2} > 0]{@cluster,EXP{@field1 + @field2} as A}";
-		response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null,false);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support parameter \"verbose\" is false, should success: "+query,response.isSuccess());
-	}
-
-	@Test
-	public void testObjectTypeFieldQuery() throws IllegalAccessException, InstantiationException {
-
-		String startTime = DateTimeUtil.secondsToHumanDate(System.currentTimeMillis() / 1000);
-		String endTime = DateTimeUtil.secondsToHumanDate((System.currentTimeMillis() + 1000) / 1000);
-
-		String[] partitions =  new String[2];
-		partitions[0] = "cluster";
-		partitions[1] = "datacenter";
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		EntityDefinition entityDef = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-		entityDef.setPartitions(partitions);
-		entityDef.setTimeSeries(true);
-
-		ListQueryResource resource = new ListQueryResource();
-		String query = "TestLogAPIEntity[]{@cluster}";
-
-		// Field with numeric
-		query = "TestLogAPIEntity[@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND " +
-				"(@field1 < 1 or @field2 = 2 or @field3 = 13456789 or @field4 = 987654321 or @field5 = 5.6 or @field7 < \"value7\")]{@cluster}";
-		ListQueryAPIResponseEntity response = resource.listQuery(query, startTime, endTime, 100, null, false, true, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Field with numeric, should success",response.isSuccess());
-	}
-
-	@Test
-	public void testFlatAggregateQuery(){
-		ListQueryResource resource = new ListQueryResource();
-		ListQueryAPIResponseEntity response = null;
-		String query = null;
-//		String start = DateTimeUtil.secondsToHumanDate(startTime / 1000);
-		String start = DateTimeUtil.secondsToHumanDate(0);
-
-		String end = DateTimeUtil.secondsToHumanDate((endTime + 24 * 3600) / 1000);
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		
-		Assert.assertNotNull(response);
-//		Assert.assertTrue(response.getLastTimestamp() > 0);
-//		Assert.assertTrue(response.getFirstTimestamp() >= 0);
-//		Assert.assertTrue(response.getLastTimestamp() >= response.getFirstTimestamp());
-		
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(field1)}.{max(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(field1)}.{min(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(field1)}.{sum(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(field1)}.{avg(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}.{count desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}.{sum(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}.{count desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, false, 1, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-
-//		ArrayList<Map.Entry<List<String>,List<Double>>> obj = (ArrayList<Map.Entry<List<String>,List<Double>>>) response.getObj();
-//		Assert.assertEquals(1,obj.size());
-//		Assert.assertEquals(2,obj.get(0).getKey().size());
-//		Assert.assertEquals("test4UT",obj.get(0).getKey().get(0));
-//		Assert.assertEquals("dc1",obj.get(0).getKey().get(1));
-//		Assert.assertEquals(new Double(1.0),obj.get(0).getValue().get(0));
-//		Assert.assertEquals(new Double(1.0),obj.get(0).getValue().get(1));
-//		Assert.assertEquals(new Double(1.0), obj.get(0).getValue().get(2));
-//		Assert.assertTrue(obj.get(0).getValue().get(3) > 1.0);
-	}
-
-	/**
-	 * TODO: Add time series aggregation query unit test
-	 */
-	@Test
-	public void testTimeSeriesAggregateQuery(){
-		ListQueryResource resource = new ListQueryResource();
-		ListQueryAPIResponseEntity response = null;
-		String query = null;
-		String start = DateTimeUtil.secondsToHumanDate(startTime / 1000);
-		String end = DateTimeUtil.secondsToHumanDate((endTime + 1000) / 1000);
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(field1)}.{max(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{min(field1)}.{min(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{sum(field1)}.{sum(field1) desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{avg(field1)}.{avg(field1) asc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}.{max(field1) asc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}.{count desc}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 16, 1000, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-	}
-	/**
-	 * TODO: Add time series aggregation query unit test
-	 */
-	@Test
-	public void testTimeSeriesAggregateQueryWithoutCoprocessor(){
-		ListQueryResource resource = new ListQueryResource();
-		ListQueryAPIResponseEntity response = null;
-		String query = null;
-		String start = DateTimeUtil.secondsToHumanDate(startTime / 1000);
-		String end = DateTimeUtil.secondsToHumanDate((endTime + 1000) / 1000);
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{count}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 10, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@cluster>{max(field1)}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 10, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: "+query,response.isSuccess());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}";
-		response = resource.listQuery(query, start, end, 100000, null, false, true, 10, 0, false, 0, null);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-
-		query = TEST_TIME_SERIES_API_SERVICE +"[@cluster=\"test4UT\" AND @datacenter=\"dc1\"]<@c...@datacenter>{max(field1),min(field1),avg(field1),sum(field1),count}.{max(field1) desc}";
-		response = resource.listQueryWithoutCoprocessor(query, start, end, 100000, null, false, true, 10, 1000, false, 0, null,false);
-		Assert.assertNotNull(response);
-		Assert.assertTrue("Support is null, should success: " + query, response.isSuccess());
-//		Assert.assertEquals(1, response.getTotalResults());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/pom.xml b/eagle-core/eagle-query/eagle-storage-base/pom.xml
deleted file mode 100644
index 12b9316..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-query-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>eagle-storage-base</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-query-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorage.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorage.java
deleted file mode 100644
index 4347401..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorage.java
+++ /dev/null
@@ -1,111 +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;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.apache.eagle.storage.operation.RawQuery;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * Eagle DataStorage Interface
- *
- * Interface description:
- * 1) TaggedLogAPIEntity (Why not InternalLog: it's deeply hbase specific and all values are converted to byte[] which is unnecessary for other database like mysql)
- * 2) EntityDefinition
- * 3) Assume all ID are in type of String like encoded rowkey to hbase and UUID for RDBMS
- *
- * @since 3/18/15
- */
-public interface DataStorage<I> {
-
-    /**
-     * Initialize when data storage is created
-     *
-     * @throws IOException
-     */
-    void init() throws IOException;
-
-    /**
-     * Execute update operation
-     *
-     * @throws IOException
-     */
-    <E extends TaggedLogAPIEntity> ModifyResult<I> update(List<E> entities, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute create operation
-     *
-     * @throws IOException
-     */
-    <E extends TaggedLogAPIEntity> ModifyResult<I> create(List<E> entities, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute delete operation by entities
-     *
-     * @param entities
-     * @return
-     * @throws IOException
-     */
-    <E extends TaggedLogAPIEntity> ModifyResult<I> delete(List<E> entities, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute delete operation by entity ids
-     *
-     * @throws IOException
-     */
-    ModifyResult<I> deleteByID(List<I> ids, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute delete operation
-     *
-     * @throws IOException
-     */
-    ModifyResult<I> delete(CompiledQuery query, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute query to return a list of results, may not always tagged entities
-     *
-     * @throws IOException
-     */
-    <E extends Object> QueryResult<E> query(CompiledQuery query, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * Execute query to return a list of results
-     * @param ids id set
-     * @param entityDefinition entity definition
-     * @param <E> result item type
-     * @return QueryResult object
-     * @throws IOException
-     */
-    <E extends Object> QueryResult<E> queryById(List<I> ids, EntityDefinition entityDefinition) throws IOException;
-
-    /**
-     * close data storage
-     *
-     * @throws IOException
-     */
-    void close() throws IOException;
-
-    CompiledQuery compile(RawQuery query) throws QueryCompileException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageBase.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageBase.java
deleted file mode 100644
index 29608b3..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageBase.java
+++ /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.
- */
-package org.apache.eagle.storage;
-
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.operation.RawQuery;
-
-/**
- * @since 3/23/15
- */
-public abstract class DataStorageBase implements DataStorage<String> {
-    @Override
-    public CompiledQuery compile(RawQuery query) throws QueryCompileException {
-        return new CompiledQuery(query);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 23fafeb..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/DataStorageManager.java
+++ /dev/null
@@ -1,124 +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;
-
-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.DataStorageServiceProvider;
-import org.apache.commons.configuration.Configuration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Properties;
-
-/**
- * @since 3/20/15
- */
-public class DataStorageManager {
-    public final static String EAGLE_STORAGE_TYPE = "eagle.service.storage-type";
-    public final static String DEFAULT_DATA_STORAGE_TYPE = "hbase";
-
-    private final static Logger LOG = LoggerFactory.getLogger(DataStorageManager.class);
-
-    /**
-     * Get data storage without cache
-     *
-     * @param type
-     * @throws IllegalDataStorageTypeException
-     */
-    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");
-        }
-        DataStorage dataStorage =  serviceProvider.getStorage();
-        try {
-            LOG.info("Initializing data storage engine: "+dataStorage);
-            dataStorage.init();
-        } catch (IOException 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 static DataStorage getDataStorageByEagleConfig(boolean cache) throws IllegalDataStorageTypeException{
-        String storageType = EagleConfigFactory.load().getStorageType();
-
-        if(!cache)
-            return newDataStorage(storageType);
-
-        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;
-            }
-            singletonStorageInstance = newDataStorage(storageType);
-        }
-        return singletonStorageInstance;
-    }
-
-    /**
-     * @return DataStorage instance by singleton pattern
-     *
-     * @throws IllegalDataStorageTypeException
-     */
-    public static DataStorage getDataStorageByEagleConfig() throws IllegalDataStorageTypeException{
-        return getDataStorageByEagleConfig(true);
-    }
-
-    /**
-     * Get data storage by configuration
-     *
-     * @param configuration
-     * @return
-     * @throws IllegalDataStorageTypeException
-     */
-    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");
-        }
-        return newDataStorage(storageType);
-    }
-
-    /**
-     * Get data storage by properties
-     *
-     * @param properties
-     * @return
-     * @throws IllegalDataStorageTypeException
-     */
-    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");
-        }
-        return newDataStorage(storageType);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageException.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageException.java
deleted file mode 100644
index ddd520d..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageException.java
+++ /dev/null
@@ -1,38 +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.exception;
-
-/**
- * @since 3/20/15
- */
-public class IllegalDataStorageException extends Exception{
-    public IllegalDataStorageException() {
-        super();
-    }
-
-    public IllegalDataStorageException(String s) {
-        super(s);
-    }
-
-    public IllegalDataStorageException(String s, Throwable throwable) {
-        super(s, throwable);
-    }
-
-    public IllegalDataStorageException(Throwable throwable) {
-        super(throwable);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageTypeException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageTypeException.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageTypeException.java
deleted file mode 100644
index e0b99d9..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/IllegalDataStorageTypeException.java
+++ /dev/null
@@ -1,38 +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.exception;
-
-/**
- * @since 3/20/15
- */
-public class IllegalDataStorageTypeException extends Exception{
-    public IllegalDataStorageTypeException() {
-        super();
-    }
-
-    public IllegalDataStorageTypeException(String s, Throwable throwable) {
-        super(s, throwable);
-    }
-
-    public IllegalDataStorageTypeException(Throwable throwable) {
-        super(throwable);
-    }
-
-    public IllegalDataStorageTypeException(String s) {
-        super(s);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/QueryCompileException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/QueryCompileException.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/QueryCompileException.java
deleted file mode 100644
index 664e079..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/exception/QueryCompileException.java
+++ /dev/null
@@ -1,38 +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.exception;
-
-/**
- * @since 3/23/15
- */
-public class QueryCompileException extends Exception {
-    public QueryCompileException() {
-        super();
-    }
-
-    public QueryCompileException(String s) {
-        super(s);
-    }
-
-    public QueryCompileException(String s, Throwable throwable) {
-        super(s, throwable);
-    }
-
-    public QueryCompileException(Throwable throwable) {
-        super(throwable);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
deleted file mode 100644
index 8f822c8..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CompiledQuery.java
+++ /dev/null
@@ -1,253 +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.operation;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-/**
- * TODO: refactor to remove hbase related fields
- *
- * @since 3/23/15
- */
-public class CompiledQuery {
-    private final static Logger LOG = LoggerFactory.getLogger(CompiledQuery.class);
-
-    public boolean isHasAgg() {
-        return hasAgg;
-    }
-
-    public void setHasAgg(boolean hasAgg) {
-        this.hasAgg = hasAgg;
-    }
-
-    public List<AggregateFunctionType> getAggregateFunctionTypes() {
-        return aggregateFunctionTypes;
-    }
-
-    public void setAggregateFunctionTypes(List<AggregateFunctionType> aggregateFunctionTypes) {
-        this.aggregateFunctionTypes = aggregateFunctionTypes;
-    }
-
-    public List<SortOption> getSortOptions() {
-        return sortOptions;
-    }
-
-    public void setSortOptions(List<SortOption> sortOptions) {
-        this.sortOptions = sortOptions;
-    }
-
-    public List<AggregateFunctionType> getSortFunctions() {
-        return sortFunctions;
-    }
-
-    public void setSortFunctions(List<AggregateFunctionType> sortFunctions) {
-        this.sortFunctions = sortFunctions;
-    }
-
-    public List<String> getSortFields() {
-        return sortFields;
-    }
-
-    public void setSortFields(List<String> sortFields) {
-        this.sortFields = sortFields;
-    }
-
-    public static Logger getLog() {
-
-        return LOG;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public SearchCondition getSearchCondition() {
-        return searchCondition;
-    }
-
-    public void setSearchCondition(SearchCondition searchCondition) {
-        this.searchCondition = searchCondition;
-    }
-
-    public RawQuery getRawQuery() {
-        return rawQuery;
-    }
-
-    private String serviceName;
-    private SearchCondition searchCondition;
-    private final RawQuery rawQuery;
-    private boolean hasAgg;
-    private List<AggregateFunctionType> aggregateFunctionTypes;
-    private List<SortOption> sortOptions;
-    private List<AggregateFunctionType> sortFunctions;
-    private List<String> sortFields;
-    private List<String> groupByFields;
-
-    private long startTime;
-
-    public long getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(long endTime) {
-        this.endTime = endTime;
-    }
-
-    public long getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(long startTime) {
-        this.startTime = startTime;
-    }
-
-    private long endTime;
-
-    public List<String> getAggregateFields() {
-        return aggregateFields;
-    }
-
-    public void setAggregateFields(List<String> aggregateFields) {
-        this.aggregateFields = aggregateFields;
-    }
-
-    private List<String> aggregateFields;
-
-    public CompiledQuery(RawQuery rawQueryCondition) throws QueryCompileException {
-        this.rawQuery = rawQueryCondition;
-        try {
-            this.compile();
-        } catch (Exception e) {
-            throw new QueryCompileException(e);
-        }
-    }
-
-    public List<String> getGroupByFields() {
-        return groupByFields;
-    }
-
-    public void setGroupByFields(List<String> groupByFields) {
-        this.groupByFields = groupByFields;
-    }
-
-    private void validateQueryParameters(String startRowkey, int pageSize){
-        if(pageSize < 0){
-            throw new IllegalArgumentException("Positive pageSize value should be always provided. The list query format is:\n" + "eagle-service/rest/list?query=<querystring>&pageSize=10&startRowkey=xyz&startTime=xxx&endTime=xxx");
-        }
-
-        if(startRowkey != null && startRowkey.equals("null")){
-            LOG.warn("startRowkey being null string is not same to startRowkey == null");
-        }
-        return;
-    }
-
-    private void checkNotNull(Object obj,String name){
-        if(obj == null) throw new IllegalArgumentException(name+" should not be null");
-    }
-
-    protected void compile() throws Exception {
-        validateQueryParameters(this.getRawQuery().getStartRowkey(),this.getRawQuery().getPageSize());
-        checkNotNull(this.rawQuery,"rawQuery instance");
-        checkNotNull(this.rawQuery.getQuery(),"query");
-
-        ListQueryCompiler compiler = new ListQueryCompiler(this.rawQuery.getQuery(),this.rawQuery.isFilterIfMissing());
-        this.serviceName = compiler.serviceName();
-        this.searchCondition = new SearchCondition();
-        this.searchCondition.setOutputVerbose(this.rawQuery.isVerbose() );
-        this.searchCondition.setOutputAlias(compiler.getOutputAlias());
-        this.searchCondition.setFilter(compiler.filter());
-        this.searchCondition.setQueryExpression(compiler.getQueryExpression());
-        if(compiler.sortOptions() == null && this.rawQuery.getTop() > 0) {
-            LOG.warn("Parameter \"top\" is only used for sort query! Ignore top parameter this time since it's not a sort query");
-        }
-
-        this.hasAgg = compiler.hasAgg();
-        this.aggregateFunctionTypes = compiler.aggregateFunctionTypes();
-        this.sortOptions = compiler.sortOptions();
-        this.sortFields = compiler.sortFields();
-        this.sortFunctions = compiler.sortFunctions();
-        this.groupByFields = compiler.groupbyFields();
-        this.aggregateFields = compiler.aggregateFields();
-
-        final List<String[]> partitionValues = compiler.getQueryPartitionValues();
-        if (partitionValues != null) {
-            this.searchCondition.setPartitionValues(Arrays.asList(partitionValues.get(0)));
-        }
-
-        // 3. Set time range if it's timeseries service
-        EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-        if(ed.isTimeSeries()){
-            // TODO check Time exists for timeseries or topology data
-            this.searchCondition.setStartTime(this.rawQuery.getStartTime());
-            this.searchCondition.setEndTime(this.rawQuery.getEndTime());
-            this.setStartTime(DateTimeUtil.humanDateToSeconds(this.getRawQuery().getStartTime()) * 1000);
-            this.setEndTime(DateTimeUtil.humanDateToSeconds(this.getRawQuery().getEndTime()) * 1000);
-        }
-
-        // 4. Set HBase start scanning rowkey if given
-        searchCondition.setStartRowkey(this.rawQuery.getStartRowkey());
-
-        // 5. Set page size
-        searchCondition.setPageSize(this.rawQuery.getPageSize());
-
-        // 6. Generate output,group-by,aggregated fields
-        List<String> outputFields = compiler.outputFields();
-        List<String> groupbyFields = compiler.groupbyFields();
-        List<String> aggregateFields = compiler.aggregateFields();
-        Set<String> filterFields = compiler.getFilterFields();
-
-        // Start to generate output fields list {
-        searchCondition.setOutputAll(compiler.isOutputAll());
-        if(outputFields == null) outputFields = new ArrayList<String>();
-        if(compiler.hasAgg()){
-            if(groupbyFields != null) outputFields.addAll(groupbyFields);
-            if(aggregateFields != null) outputFields.addAll(aggregateFields);
-            if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-                outputFields.add(GenericMetricEntity.VALUE_FIELD);
-            }
-        }
-        if(filterFields!=null) outputFields.addAll(filterFields);
-        searchCondition.setOutputFields(outputFields);
-        if(LOG.isDebugEnabled()) {
-            if (compiler.isOutputAll()) {
-                LOG.debug("Output fields: all");
-            } else {
-                LOG.debug("Output fields: " + StringUtils.join(outputFields, ","));
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CreateStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CreateStatement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CreateStatement.java
deleted file mode 100644
index 80256e1..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/CreateStatement.java
+++ /dev/null
@@ -1,68 +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.operation;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.result.ModifyResult;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @since 3/18/15
- */
-public class CreateStatement implements Statement<ModifyResult<String>> {
-    private final List<? extends TaggedLogAPIEntity> entities;
-    private final EntityDefinition entityDefinition;
-
-    public CreateStatement(List<? extends TaggedLogAPIEntity> entities,String serviceName){
-        this.entities = entities;
-
-        try {
-            this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-        } catch (InstantiationException e) {
-            throw new IllegalArgumentException(e);
-        } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    public CreateStatement(List<? extends TaggedLogAPIEntity> entities,EntityDefinition entityDefinition){
-        this.entities = entities;
-        this.entityDefinition = entityDefinition;
-    }
-
-    private void checkNotNull(Object obj,String fieldName){
-        if(obj == null){
-            throw new IllegalArgumentException(fieldName+" is null");
-        }
-    }
-
-    @Override
-    public ModifyResult<String> execute(DataStorage dataStorage) throws IOException {
-        try {
-            checkNotNull(this.entities,"entities");
-            checkNotNull(this.entityDefinition,"entity definition");
-            return dataStorage.create(entities, this.entityDefinition);
-        } catch (IOException e) {
-            throw e;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/DeleteStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/DeleteStatement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/DeleteStatement.java
deleted file mode 100644
index 37f5397..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/DeleteStatement.java
+++ /dev/null
@@ -1,98 +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.operation;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.result.ModifyResult;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @since 3/18/15
- */
-public class DeleteStatement implements Statement<ModifyResult<String>> {
-    private List<? extends TaggedLogAPIEntity> entities;
-    private List ids = null;
-    private RawQuery query;
-
-    private EntityDefinition entityDefinition;
-
-    public DeleteStatement(String serviceName){
-        try {
-            this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-        } catch (InstantiationException e) {
-            throw new IllegalArgumentException(e);
-        } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    public DeleteStatement(Class<? extends TaggedLogAPIEntity> entityClass){
-        try {
-            this.entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(entityClass);
-        } catch (InstantiationException e) {
-            throw new IllegalArgumentException(e);
-        } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    public DeleteStatement(RawQuery query){
-        this.query = query;
-    }
-
-    public void setIds(List ids){
-        this.ids = ids;
-    }
-
-    public void setEntities(List<? extends TaggedLogAPIEntity> entities){
-        this.entities = entities;
-    }
-
-//    public void setQuery(RawQuery query){
-//        this.query = query;
-//    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public ModifyResult<String> execute(DataStorage storage) throws IOException{
-        ModifyResult result;
-        try {
-            if(this.ids !=null){
-                result = storage.deleteByID(this.ids,this.entityDefinition);
-            }else if(this.entities != null){
-                result =storage.delete(this.entities, this.entityDefinition);
-            }else if(this.query != null){
-                CompiledQuery compiledQuery = storage.compile(this.query);
-                this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(compiledQuery.getServiceName());
-                result = storage.delete(compiledQuery,this.entityDefinition);
-            }else{
-                throw new IllegalStateException("bad delete statement, not given enough parameters");
-            }
-        } catch (QueryCompileException e) {
-            throw new IOException(e);
-        }catch (Exception ex){
-            throw new IOException(ex);
-        }
-        return result;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/QueryStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/QueryStatement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/QueryStatement.java
deleted file mode 100644
index ca40961..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/QueryStatement.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.operation;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.result.QueryResult;
-
-import java.io.IOException;
-
-/**
- * @since 3/18/15
- */
-public class QueryStatement implements Statement<QueryResult<?>>{
-    private final RawQuery query;
-
-    public QueryStatement(RawQuery queryCondition){
-        this.query = queryCondition;
-    }
-
-    @Override
-    public QueryResult<?> execute(DataStorage dataStorage) throws IOException {
-        CompiledQuery compiledQuery;
-        try {
-            compiledQuery = dataStorage.compile(this.query);
-        } catch (QueryCompileException e) {
-            throw new IOException(e);
-        }
-        try {
-            EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(compiledQuery.getServiceName());
-            return dataStorage.query(compiledQuery, entityDefinition);
-        } catch (InstantiationException | IllegalAccessException e) {
-            throw new IOException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RawQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RawQuery.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RawQuery.java
deleted file mode 100755
index 21d7c2f..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RawQuery.java
+++ /dev/null
@@ -1,232 +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.operation;
-
-import org.codehaus.jackson.map.ObjectMapper;
-
-import java.io.IOException;
-
-/**
- */
-public class RawQuery {
-    private String query;
-    private String startTime;
-    private String endTime;
-    private int pageSize;
-    private String startRowkey;
-    private boolean treeAgg;
-    private boolean timeSeries;
-    private long intervalmin;
-    private int top;
-    private boolean filterIfMissing;
-    private String metricName;
-    private boolean verbose;
-
-    public int getParallel() {
-        return parallel;
-    }
-
-    public void setParallel(int parallel) {
-        this.parallel = parallel;
-    }
-
-    private int parallel;
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-
-    public String getQuery() {
-        return query;
-    }
-
-    public void setQuery(String query) {
-        this.query = query;
-    }
-
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    public int getPageSize() {
-        return pageSize;
-    }
-
-    public void setPageSize(int pageSize) {
-        this.pageSize = pageSize;
-    }
-
-    public String getStartRowkey() {
-        return startRowkey;
-    }
-
-    public void setStartRowkey(String startRowkey) {
-        this.startRowkey = startRowkey;
-    }
-
-    public boolean isTreeAgg() {
-        return treeAgg;
-    }
-
-    public void setTreeAgg(boolean treeAgg) {
-        this.treeAgg = treeAgg;
-    }
-
-    public boolean isTimeSeries() {
-        return timeSeries;
-    }
-
-    public void setTimeSeries(boolean timeSeries) {
-        this.timeSeries = timeSeries;
-    }
-
-    public long getIntervalmin() {
-        return intervalmin;
-    }
-
-    public void setIntervalmin(long intervalmin) {
-        this.intervalmin = intervalmin;
-    }
-
-    public int getTop() {
-        return top;
-    }
-
-    public void setTop(int top) {
-        this.top = top;
-    }
-
-    public boolean isFilterIfMissing() {
-        return filterIfMissing;
-    }
-
-    public void setFilterIfMissing(boolean filterIfMissing) {
-        this.filterIfMissing = filterIfMissing;
-    }
-
-    public String getMetricName() {
-        return metricName;
-    }
-
-    public void setMetricName(String metricName) {
-        this.metricName = metricName;
-    }
-
-    public static Builder build(){
-        return new Builder();
-    }
-    public static class Builder{
-        private final RawQuery rawQuery;
-        public Builder(){
-            this.rawQuery= new RawQuery();
-        }
-        public RawQuery done(){
-            return this.rawQuery;
-        }
-        public Builder query(String query) {
-            this.rawQuery.setQuery(query);
-            return this;
-        }
-
-        public Builder startTime(String startTime) {
-            this.rawQuery.setStartTime(startTime);
-            return this;
-        }
-
-        public Builder endTime(String endTime) {
-            this.rawQuery.setEndTime(endTime);
-            return this;
-        }
-
-        public Builder pageSize(int pageSize) {
-            this.rawQuery.setPageSize(pageSize);
-            return this;
-        }
-
-        public Builder startRowkey(String startRowkey) {
-            this.rawQuery.setStartRowkey(startRowkey);
-            return this;
-        }
-
-        public Builder treeAgg(boolean treeAgg) {
-            this.rawQuery.setTreeAgg(treeAgg);
-            return this;
-        }
-
-        public Builder timeSeries(boolean timeSeries) {
-            this.rawQuery.setTimeSeries(timeSeries);
-            return this;
-        }
-
-        public Builder intervalMin(long intervalmin) {
-            this.rawQuery.setIntervalmin(intervalmin);
-            return this;
-        }
-
-        public Builder top(int top) {
-            this.rawQuery.setTop(top);
-            return this;
-        }
-
-        public Builder filerIfMissing(boolean filterIfMissing) {
-            this.rawQuery.setFilterIfMissing(filterIfMissing);
-            return this;
-        }
-
-        public Builder parallel(int parallel) {
-            this.rawQuery.setParallel(parallel);
-            return this;
-        }
-
-        public Builder metricName(String metricName) {
-            this.rawQuery.setMetricName(metricName);
-            return this;
-        }
-
-        public Builder verbose(Boolean verbose) {
-            if(verbose == null) verbose = true;
-            this.rawQuery.setVerbose(verbose);
-            return this;
-        }
-    }
-
-    @Override
-    public String toString() {
-        ObjectMapper objectMapper = new ObjectMapper();
-        try {
-            return objectMapper.writeValueAsString(this);
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RowkeyQueryStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RowkeyQueryStatement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RowkeyQueryStatement.java
deleted file mode 100644
index 017224c..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/RowkeyQueryStatement.java
+++ /dev/null
@@ -1,61 +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.operation;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.result.QueryResult;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @since 6/29/15
- */
-public class RowkeyQueryStatement implements Statement<QueryResult<?>>{
-    private final List<String> rowkeys;
-    private final EntityDefinition entityDefinition;
-
-    public RowkeyQueryStatement(String rowkey,EntityDefinition entityDefinition) {
-        this.rowkeys = new ArrayList<>(1);
-        this.rowkeys.add(rowkey);
-        this.entityDefinition = entityDefinition;
-    }
-
-    public RowkeyQueryStatement(String rowkey,String serviceName) throws IllegalAccessException, InstantiationException {
-        this.rowkeys = new ArrayList<>(1);
-        this.rowkeys.add(rowkey);
-        this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-    }
-
-    public RowkeyQueryStatement(List<String> rowkeys,EntityDefinition entityDefinition) {
-        this.rowkeys = rowkeys;
-        this.entityDefinition = entityDefinition;
-    }
-
-    public RowkeyQueryStatement(List<String> rowkeys,String serviceName) throws IllegalAccessException, InstantiationException {
-        this.rowkeys = rowkeys;
-        this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-    }
-
-    @Override
-    public <I> QueryResult<?> execute(DataStorage<I> dataStorage) throws IOException {
-        return dataStorage.queryById((List<I>) this.rowkeys,this.entityDefinition);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/Statement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/Statement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/Statement.java
deleted file mode 100644
index 29bda96..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/Statement.java
+++ /dev/null
@@ -1,34 +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.operation;
-
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.result.Result;
-
-import java.io.IOException;
-
-/**
- * Fluent API Wrapper statements
- *
- * @since 3/18/15
- */
-public interface Statement<R extends Result> {
-    /**
-     * Submit and execute statment
-     */
-    <I> R execute(DataStorage<I> dataStorage) throws IOException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/UpdateStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/UpdateStatement.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/UpdateStatement.java
deleted file mode 100644
index 1c59e0b..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/operation/UpdateStatement.java
+++ /dev/null
@@ -1,56 +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.operation;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.result.ModifyResult;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @since 3/18/15
- */
-public class UpdateStatement implements Statement<ModifyResult<String>> {
-    private final List<? extends TaggedLogAPIEntity> entities;
-
-    private final EntityDefinition entityDefinition;
-
-    public UpdateStatement(List<? extends TaggedLogAPIEntity> entities,String serviceName){
-        this.entities = entities;
-        try {
-            this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-        } catch (InstantiationException e) {
-            throw new IllegalArgumentException(e);
-        } catch (IllegalAccessException e) {
-            throw new IllegalArgumentException(e);
-        }
-    }
-
-    public UpdateStatement(List<? extends TaggedLogAPIEntity> entities,EntityDefinition entityDefinition){
-        this.entities = entities;
-        this.entityDefinition = entityDefinition;
-    }
-
-    @Override
-    public ModifyResult<String> execute(DataStorage storage) throws IOException {
-        return storage.update(entities,this.entityDefinition);
-    }
-}
\ No newline at end of file



[04/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain2.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain2.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain2.java
deleted file mode 100644
index d9a7bbb..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain2.java
+++ /dev/null
@@ -1,60 +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.example.persist;
-
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.core.StorageType;
-import org.apache.eagle.datastream.core.StreamProducer;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.Arrays;
-
-/**
- * Created on 1/10/16.
- */
-public class PersistTopoTestMain2 {
-
-    public static void main(String[] args) {
-        System.setProperty("config.resource", "application.conf");// customize the application.conf
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        StormSpoutProvider provider = PersistTopoTestMain.createProvider(env.getConfig());
-        exec(env, provider);
-    }
-
-    private static void exec(StormExecutionEnvironment env, StormSpoutProvider provider) {
-        StreamProducer source = env.fromSpout(provider).withOutputFields(4).nameAs("kafkaMsgConsumer");
-        StreamProducer filter = source;
-
-        // "timestamp", "host", "cpu", "mem"
-        String cql = " define stream eagleQuery(eagleAlertContext object, timestamp long, host string, cpu int, mem long);"
-                + " @info(name='query')"
-                + " from eagleQuery#window.externalTime(timestamp, 10 min) "
-                + " select eagleAlertContext, min(timestamp) as starttime, avg(cpu) as avgCpu, avg(mem) as avgMem insert into tmp;";
-        StreamProducer aggregate = filter.aggregate(Arrays.asList("ealgeQuery"), cql, new PartitionStrategy() {
-            @Override
-            public int balance(String key, int buckNum) {
-                return 0;
-            }
-        });
-
-        StreamProducer persist = aggregate.persist("persistExecutor1", StorageType.KAFKA());
-
-        env.execute();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/add-notification-for-plugin-test.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/add-notification-for-plugin-test.sh b/eagle-examples/eagle-topology-example/src/main/resources/add-notification-for-plugin-test.sh
deleted file mode 100644
index e9288fa..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/add-notification-for-plugin-test.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-CUR_DIR=$(dirname $0)
-source $CUR_DIR/../../../../../eagle-assembly/src/main/bin/eagle-env.sh
-
-##### delete email notification ##########
-echo ""
-echo "Importing policy ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
- -d '
- [
-     {
-       "prefix": "alertdef",
-       "tags": {
-         "site": "sandbox",
-         "dataSource": "testSpout",
-         "policyId": "pluginTestPolicy",
-         "alertExecutorId": "testExecutor",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "pluginTest",
-       "policyDef": "{\"expression\":\"from testStream[(testAttribute == \\\"testValue\\\")] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
-       "notificationDef": "[{\"notificationType\":\"eagleStore\"},{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]",
-       "remediationDef":"",
-       "enabled":true
-     }
- ]
- '
-
-## Finished
-echo ""
-echo "Finished initialization for NotificationPluginTest"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf b/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
deleted file mode 100644
index b35abc8..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/application-plugintest.conf
+++ /dev/null
@@ -1,59 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "local",
-    "topologyName" : "pluginTest",
-    "stormConfigFile" : "persist-test-storm.yaml",
-    "parallelismConfig" : {
-      "testSpout" : 1,
-      "testExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-  },
-  "alertExecutorConfigs" : {
-     "testExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "testSpout",
-  	"dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "balancePartitionEnabled" : true,
-    #"partitionRefreshIntervalInMin" : 60,
-    #"kafkaStatisticRangeInMin" : 60,
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    },
-    "readHdfsUserCommandPatternFrom" : "file"
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/application.conf b/eagle-examples/eagle-topology-example/src/main/resources/application.conf
deleted file mode 100644
index 9629917..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/application.conf
+++ /dev/null
@@ -1,86 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "local",
-    "topologyName" : "persistTestTopology",
-    "stormConfigFile" : "persist-test-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsAuditLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "persist_test_log",
-    "zkConnection" : "localhost:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.example.persist.MetricSerializer",
-    "transactionZKServers" : "localhost",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-       "needValidation" : "true"
-     }
-  },
-  "persistExecutorConfigs" {
-    "persistExecutor1" : {
-      "kafka": {
-        "bootstrap_servers" : "www.xyz.com",
-        "topics" : {
-          "defaultOutput" : "downSampleOutput"
-        }
-      }
-    }
-  },
-  "aggregateExecutorConfigs" : {
-    "aggregateExecutor1" : {
-      "parallelism" : 1,
-      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-      "needValidation" : "true"
-    }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "persistTest",
-  	"dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "balancePartitionEnabled" : true,
-    #"partitionRefreshIntervalInMin" : 60,
-    #"kafkaStatisticRangeInMin" : 60,
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    },
-    "readHdfsUserCommandPatternFrom" : "file"
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh b/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
deleted file mode 100644
index 3fd2752..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/create-policy-for-plugin-test.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-CUR_DIR=$(dirname $0)
-source $CUR_DIR/../../../../../eagle-assembly/src/main/bin/eagle-env.sh
-
-#####################################################################
-#            Import stream metadata
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for persist... "
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" \
-  -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"testSpout"}, "enabled": "true", "config" : " just some description", "desc":"pluginTest"}]'
-
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" \
- -d '[{"prefix":"alertStream","tags":{"dataSource":"testSpout","streamName":"testStream"},"desc":"pluginTest"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" \
- -d '[{"prefix":"alertExecutor","tags":{"dataSource":"testSpout","alertExecutorId":"testExecutor","streamName":"testStream"},"desc":"testStream->testExecutor"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
-"http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" \
- -d '
- [
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "testSpout",
-          "streamName": "testStream",
-          "attrName": "testAttribute"
-       },
-       "attrDescription": "testAttribute",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    }
- ]
- '
-
-##### add policies ##########
-echo ""
-echo "Importing policy ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
- -d '
- [
-     {
-       "prefix": "alertdef",
-       "tags": {
-         "site": "sandbox",
-         "dataSource": "testSpout",
-         "policyId": "pluginTestPolicy",
-         "alertExecutorId": "testExecutor",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "pluginTest",
-       "policyDef": "{\"expression\":\"from testStream[(testAttribute == \\\"testValue\\\")] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
-       "dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}",
-       "notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]",
-       "remediationDef":"",
-       "enabled":true
-     }
- ]
- '
-
-## Finished
-echo ""
-echo "Finished initialization for NotificationPluginTest"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh b/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
deleted file mode 100644
index 30d277f..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/delete-email-for-plugin-test.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-CUR_DIR=$(dirname $0)
-source $CUR_DIR/../../../../../eagle-assembly/src/main/bin/eagle-env.sh
-
-##### delete email notification ##########
-echo ""
-echo "Importing policy ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
- -d '
- [
-     {
-       "prefix": "alertdef",
-       "tags": {
-         "site": "sandbox",
-         "dataSource": "testSpout",
-         "policyId": "pluginTestPolicy",
-         "alertExecutorId": "testExecutor",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "pluginTest",
-       "policyDef": "{\"expression\":\"from testStream[(testAttribute == \\\"testValue\\\")] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
-       "notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]",
-       "remediationDef":"",
-       "enabled":true
-     }
- ]
- '
-
-## Finished
-echo ""
-echo "Finished initialization for NotificationPluginTest"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties b/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties
deleted file mode 100644
index 07f8402..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-log4j.rootLogger=INFO, stdout, DRFA
-
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-
-#log4j.logger.org.apache.eagle.security.auditlog.IPZoneDataJoinExecutor=DEBUG
-#log4j.logger.org.apache.eagle.security.auditlog.FileSensitivityDataJoinExecutor=DEBUG
-log4j.logger.org.apache.eagle.security.auditlog.HdfsUserCommandReassembler=DEBUG
-#log4j.logger.org.apache.eagle.executor.AlertExecutor=DEBUG
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh b/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
deleted file mode 100644
index 5805cf3..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/persist-test-topo-init.sh
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-eagle_bin=$EAGLE_HOME/bin
-
-#####################################################################
-#            Import stream metadata for HDFS
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for persist... "
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" \
-  -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"persistTest"}, "enabled": "true", "config" : " just some description", "desc":"persistTest"}]'
-
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" \
- -d '[{"prefix":"alertStream","tags":{"dataSource":"persistTest","streamName":"persistTestEventStream"},"desc":"persistTest metrics"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" \
- -d '[{"prefix":"alertExecutor","tags":{"dataSource":"persistTest","alertExecutorId":"aggregateExecutor1","streamName":"persistTestEventStream"},"desc":"aggregate executor for persist test log event stream"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
-"http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" \
- -d '
- [
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "src"
-       },
-       "attrDescription": "source directory or file, such as /tmp",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "dst"
-       },
-       "attrDescription": "destination directory, such as /tmp",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "host"
-       },
-       "attrDescription": "hostname, such as localhost",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "timestamp"
-       },
-       "attrDescription": "milliseconds of the datetime",
-       "attrType": "long",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "allowed"
-       },
-       "attrDescription": "true, false or none",
-       "attrType": "bool",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "user"
-       },
-       "attrDescription": "process user",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "cmd"
-       },
-       "attrDescription": "file/directory operation, such as getfileinfo, open, listStatus and so on",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSCommandResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "sensitivityType"
-       },
-       "attrDescription": "mark such as AUDITLOG, SECURITYLOG",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"
-    },
-    {
-       "prefix": "alertStreamSchema",
-       "tags": {
-          "dataSource": "persistTest",
-          "streamName": "persistTestEventStream",
-          "attrName": "securityZone"
-       },
-       "attrDescription": "",
-       "attrType": "string",
-       "category": "",
-       "attrValueResolver": ""
-    }
- ]
- '
-
-##### add policies ##########
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AggregateDefinitionService" \
- -d '
- [
-     {
-       "prefix": "aggregatedef",
-       "tags": {
-         "site": "sandbox",
-         "dataSource": "persistTest",
-         "policyId": "persitTestPolicy1",
-         "executorId": "aggregateExecutor1",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "persistetest",
-       "policyDef": "{\"expression\":\"from persistTestEventStream[(logLevel == 'ERROR')] select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}",
-       "enabled": true
-     }
- ]
- '
-
-
-
- ## Finished
-echo ""
-echo "Finished initialization for eagle topology"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml b/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml
deleted file mode 100644
index a68a323..0000000
--- a/eagle-examples/eagle-topology-example/src/main/resources/persit-test-storm.yaml
+++ /dev/null
@@ -1,18 +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.
-
-topology.workers: 1
-topology.acker.executors: 1
-topology.tasks: 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/pom.xml b/eagle-examples/pom.xml
deleted file mode 100644
index 486ab2d..0000000
--- a/eagle-examples/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-examples</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>eagle-topology-example</module>
-    </modules>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/.gitignore
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/.gitignore b/eagle-external/eagle-ambari/.gitignore
deleted file mode 100644
index a4c0e46..0000000
--- a/eagle-external/eagle-ambari/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-**/*.zip
-**/.hash
-**/*.pyc

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/README.md
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/README.md b/eagle-external/eagle-ambari/README.md
deleted file mode 100644
index c7b0a58..0000000
--- a/eagle-external/eagle-ambari/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
-{% comment %}
-# 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.
-{% endcomment %}
--->
-
-eagle-ambari-plugin
-===================
-
-Requirements
-------------
-1. Ambari `2.2.4` (has problems for higher version)
-
-Installation
-------------
-1. Download certain version of eagle release package and install under to `/usr/hdp/current/eagle`
-2. Execute ambari install
-
-        ./bin/eagle-ambari.sh install
-
-Uninstallation
-------------
-1. Uninstall services from amabri cluster
-
-        ./bin/eagle-ambari.sh uninstall
-
-Usage
------
-[https://wiki.vip.xyz.com/display/GDI/Eagle+in+Ambari](https://wiki.vip.xyz.com/display/GDI/Eagle+in+Ambari)
-
-Reference
----------
-* [Ambari: Create and Add the Service](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=38571133#Overview\(Ambari1.5.0orlater\)-CreateandAddtheService)
-* [Quick links for custom services](https://issues.apache.org/jira/browse/AMBARI-11268)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/bin/eagle-ambari.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/bin/eagle-ambari.sh b/eagle-external/eagle-ambari/bin/eagle-ambari.sh
deleted file mode 100755
index d392e61..0000000
--- a/eagle-external/eagle-ambari/bin/eagle-ambari.sh
+++ /dev/null
@@ -1,215 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# Eagle Ambari Plugin
-#
-# Author: hchen9@xyz.com
-# Version: 0.0.1
-#
-# Plan:
-# 1. Implement create service through REST API: https://cwiki.apache.org/confluence/display/AMBARI/Adding+a+New+Service+to+an+Existing+Cluster
-# 2. Integrate with ambari configuration
-
-AMBARI_HOST=localhost
-AMBARI_PORT=8080
-AMBARI_CLUSTER_NAME=Sandbox
-AMBARI_USER=admin
-AMBARI_PASSWORD=admin
-
-EAGLE_VERSION=0.0.1
-HDP_VERSION=2.0.6
-
-AMBARI_SERVER_HOME=/var/lib/ambari-server/
-AMBARI_EAGLE_STACK_DIR=/var/lib/ambari-server/resources/stacks/HDP/${HDP_VERSION}/services/EAGLE/
-AMBARI_EAGLE_COMMON_DIR=/var/lib/ambari-server/resources/common-services/EAGLE/${EAGLE_VERSION}/
-DEFAULT_EAGLE_HOME=/usr/hdp/current/eagle
-AMBARI_SERVER_APP_JS=/usr/lib/ambari-server/web/javascripts/app.js.gz
-
-cd `dirname $0`/../
-
-function usage() {
-	echo "Usage: $0 [options] {start|stop|install|uninstall}"
-
-	echo ""
-	echo "Eagle Version: ${EAGLE_VERSION} HDP Version: ${HDP_VERSION}"
-	echo ""
-	echo "Commands:"
-	echo "  start           Start EAGLE components in Ambari"
-	echo "  stop            Stop EAGLE components in Ambari"
-	echo "  install         Install EAGLE components into Ambari"
-	echo "  uninstall       Uninstall EAGLE components from from Ambari"
-	echo "Options:"
-	echo "  --host          Ambari server host, default: localhost"
-	echo "  --port          Ambari server port, default: 8080"
-	echo "  --cluster       Ambari cluster name, default: Sandbox"
-	echo "  --user          Ambari account username, default: admin"
-	echo "  --password      Ambari account password, default: admin"
-	echo ""
-	exit 1
-}
-
-function install(){
-	if [ -z "$EAGLE_HOME" ];then
-		EAGLE_HOME=$DEFAULT_EAGLE_HOME
-	else
-		echo "EAGLE_HOME: $EAGLE_HOME"
-	fi
-
-	if [ ! -e $EAGLE_HOME ]; then
-	    echo "Failure: ${EAGLE_HOME} not exists, please download latest eagle package and install to ${EAGLE_HOME}"
-	    exit 1
-	fi
-
-	if [ ! -e $AMBARI_SERVER_HOME ];then
-	    echo "Failure: $AMBARI_SERVER_HOME not exists, maybe because Ambari server is not installed"
-	    exit 1
-	fi
-
-	echo "Install EAGLE Ambari Plugin"
-	# 1. Install EAGLE service into /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/EAGLE/
-	echo "> Installing $AMBARI_EAGLE_STACK_DIR"
-	if [ -e $AMBARI_EAGLE_STACK_DIR ];then
-	    echo "${AMBARI_EAGLE_STACK_DIR} already exists, override ..."
-	    rm -rf $AMBARI_EAGLE_STACK_DIR
-	fi
-
-    mkdir -p $AMBARI_EAGLE_STACK_DIR
-    cp lib/metainfo.xml $AMBARI_EAGLE_STACK_DIR
-
-	# 2. Install EAGLE package into /var/lib/ambari-server/resources/common-services/EAGLE/0.0.1/
-	echo "> Installing $AMBARI_EAGLE_COMMON_DIR"
-	if [ -e $AMBARI_EAGLE_COMMON_DIR ];then
-	    echo "${AMBARI_EAGLE_COMMON_DIR} already exists, override ..."
-    fi
-
-    mkdir -p $AMBARI_EAGLE_COMMON_DIR
-    cp -rf lib/EAGLE/* $AMBARI_EAGLE_COMMON_DIR
-
-	# 3. Install eagle quick links
-	echo "> Installing eagle quick links"
-	cp lib/EAGLE/package/patches/app.js.gz $AMBARI_SERVER_APP_JS
-
-	# create
-	echo ""
-
-	which ambari-server >/dev/null 2>&1
-	if [ $? == 0 ];then
-		echo "Restarting ambari server"
-		ambari-server restart
-		echo "Congratulations! you almost finish, please add EAGLE through Ambari UI"
-	else
-		echo "Congratulations! you almost finish, please restart ambari server by 'ambari-sever restart' and add EAGLE through Ambari UI"
-	fi
-
-	exit 0
-}
-
-function uninstall(){
-	echo "Stopping EAGLE"
-	echo ""
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -X PUT -d '{"RequestInfo": {"context" :"Stop EAGLE via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services/EAGLE
-
-	echo "Uninstalling EAGLE"
-	curl -H "X-Requested-By: $AMBARI_USER" -u $AMBARI_USER:$AMBARI_PASSWORD -X DELETE  http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services/EAGLE
-
-	echo "Finished to uninstall EAGLE from Ambari"
-}
-
-function create(){
-	# TODO: Fix bug in service creation
-
-	echo "WARNING: Creating EAGLE service in Ambari, which still has problem"
-	echo ""
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -i -X POST -d '{"ServiceInfo":{"service_name":"EAGLE"}}' http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -i -X POST -d '{"components":[{"ServiceComponentInfo":{"component_name":"EAGLE_SERVICE"}},{"ServiceComponentInfo":{"component_name":"EAGLE_TOPOLOGY"}}]}' http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services?ServiceInfo/service_name=EAGLE
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -X PUT -d '{"RequestInfo": {"context" :"Installing EAGLE via REST", "operation_level":{"level":"CLUSTER","cluster_name":"$AMABRI_CLUSTER_NAME"}}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' "http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services?ServiceInfo/service_name.in(EAGLE)"
-}
-
-function start(){
-	echo "Starting EAGLE"
-	echo ""
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -X PUT -d '{"RequestInfo": {"context" :"Start EAGLE via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services/EAGLE
-}
-
-function stop(){
-	echo "Stopping EAGLE"
-	echo ""
-	curl -u $AMBARI_USER:$AMBARI_PASSWORD -i -H 'X-Requested-By: ${AMBARI_USER}' -X PUT -d '{"RequestInfo": {"context" :"Stop EAGLE via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://${AMBARI_HOST}:${AMBARI_PORT}/api/v1/clusters/${AMBARI_CLUSTER_NAME}/services/EAGLE
-}
-
-case $1 in
-"--host")
-	if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 AMBARI_HOST=$2
-     shift 2
-     ;;
-"--port")
-	if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 AMBARI_PORT=$2
-     shift 2
-     ;;
-"--cluster")
-	if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 AMBARI_CLUSTER=$2
-     shift 2
-     ;;
-"--user")
-	if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 AMBARI_USER=$2
-     shift 2
-     ;;
-"--password")
-	if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 AMBARI_PASSWORD=$2
-     shift 2
-     ;;
-"install")
-	install
-	exit
-	;;
-"uninstall")
-	uninstall
-	exit
-	;;
-"start")
-	start
-	exit
-	;;
-"stop")
-	stop
-	exit
-	;;
-*)
-	usage
-	exit 1
-	;;
-esac

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/configuration/application.conf
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/configuration/application.conf b/eagle-external/eagle-ambari/lib/EAGLE/configuration/application.conf
deleted file mode 100644
index 9caef36..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/configuration/application.conf
+++ /dev/null
@@ -1,77 +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.
-
-{
-  "deployInstanceIdentifier" : {
-    "programId": "hdfsAuditLogMonitoring"
-  },
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "auditLogProcessTology",
-    "stormConfigFile" : "storm.yaml.1",
-    "parallelismConfig" : {
-      "msgConsumer" : 2,
-      "downsampling" : 3
-    }
-  },
-  "dataSourceConfig": {
-    "flavor" : "stormkafka",
-    "topic" : "hdfs_audit_log",
-    "zkConnection" : "localhost:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "eagle.security.auditlog.AuditLogKafkaDeserializer",
-    "transactionZKServers" : "localhost",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/brokers/topics",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 2,
-       "partitioner" : "eagle.alert.policy.DefaultPolicyPartitioner",
-       "sourceStreams" : ["hdfsAuditLogEventStream"]
-     }
-  },
-  "eagleProps" : {
-  	"ipLocationLoadFrom" : "jmx",
-  	"namenodeUrl" : "https://dc1-nn.vip.xyz.com:50070",
-  	"ipLocationLoadIntervalSeconds" : "300",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "metadataJoinConfigs" : {
-  	"ipZoneJoin" : {
-  	   "ipLocationLoadFrom" : "jmx",
-  	   "namenodeUrl" : "https://dc1-nn.vip.xyz.com:50070",
-  	   "ipLocationLoadIntervalSeconds" : "300"
-  	},
-  	"fileMetadataJoin" : {
-  	
-  	}
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000,
-  	"ignoreDeleteFromSource" : true
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-env.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-env.sh b/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-env.sh
deleted file mode 100644
index 1913bdd..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-env.sh
+++ /dev/null
@@ -1,15 +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.
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-service.conf
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-service.conf b/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-service.conf
deleted file mode 100644
index cb374bd..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/configuration/eagle-service.conf
+++ /dev/null
@@ -1,25 +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.
-
-env=test
-
-eagle.storage.type=hbase
-
-table.name.prefixed.with.environment=false
-
-### begin hbase configuration
-hbase.zookeeper.quorum=127.0.0.1
-hbase.zookeeper.property.clientPort=2181
-### end hbase configuration

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/configuration/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/configuration/log4j.properties b/eagle-external/eagle-ambari/lib/EAGLE/configuration/log4j.properties
deleted file mode 100644
index 25331ab..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/configuration/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=../logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/metainfo.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/metainfo.xml b/eagle-external/eagle-ambari/lib/EAGLE/metainfo.xml
deleted file mode 100644
index 3f03377..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/metainfo.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.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.
--->
-
-<metainfo>
-    <schemaVersion>2.0</schemaVersion>
-    <services>
-        <service>
-            <name>EAGLE</name>
-            <displayName>Eagle</displayName>
-            <comment>Eagle monitoring framework to secure hadoop platform in realtime</comment>
-            <version>0.0.1</version>
-            <components>
-                <component>
-                    <!-- TODO: fix the tricky walk-around in order to make sure components keep in order, as ambari execute components by alphabetical order -->
-                    <name>0_EAGLE_SERVICE</name>
-                    <displayName>Eagle Server</displayName>
-                    <category>MASTER</category>
-                    <cardinality>1</cardinality>
-                    <versionAdvertised>true</versionAdvertised>
-                    <commandScript>
-                        <script>scripts/eagle_service.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                    <configFiles>
-                        <configFile>
-                            <type>conf</type>
-                            <fileName>eagle-service.conf</fileName>
-                            <dictionaryName>eagle-service</dictionaryName>
-                        </configFile>
-                    </configFiles>
-                </component>
-                           
-                <component>
-                    <name>EAGLE_DAM_HDFS_TOPOLOGY</name>
-                    <displayName>Eagle DAM HDFS</displayName>
-                    <category>MASTER</category>
-                    <cardinality>1+</cardinality>
-                    <versionAdvertised>true</versionAdvertised>
-                    <commandScript>
-                        <script>scripts/eagle_hdfs_topology.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                    <configFiles>
-                        <configFile>
-                            <type>conf</type>
-                            <fileName>sandbox-hdfsAuditLog-application.conf</fileName>
-                            <dictionaryName>hdfsAuditLog</dictionaryName>
-                        </configFile>
-                    </configFiles>
-                </component>                
-
-                <component>
-                    <name>EAGLE_DAM_HIVE_TOPOLOGY</name>
-                    <displayName>Eagle DAM Hive</displayName>
-                    <category>MASTER</category>
-                    <cardinality>1+</cardinality>
-                    <versionAdvertised>true</versionAdvertised>
-                    <commandScript>
-                        <script>scripts/eagle_hive_topology.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                    <configFiles>
-                        <configFile>
-                            <type>conf</type>
-                            <fileName>sandbox-hiveQueryLog-application.conf</fileName>
-                            <dictionaryName>hiveQueryLog</dictionaryName>
-                        </configFile>
-                    </configFiles>
-                </component>
-
-                <component>
-                    <name>EAGLE_USERPROFILE_TOPOLOGY</name>
-                    <displayName>Eagle UserProfile</displayName>
-                    <category>MASTER</category>
-                    <cardinality>1+</cardinality>
-                    <versionAdvertised>true</versionAdvertised>
-                    <commandScript>
-                        <script>scripts/eagle_userprofile_topology.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                    <configFiles>
-                        <configFile>
-                            <type>conf</type>
-                            <fileName>sandbox-userprofile-application.conf</fileName>
-                            <dictionaryName>hiveQueryLog</dictionaryName>
-                        </configFile>
-                    </configFiles>
-                </component>
-
-                <component>
-                    <name>EAGLE_USERPROFILE_DAEMON</name>
-                    <displayName>Eagle UserProfile DAEMON</displayName>
-                    <category>MASTER</category>
-                    <cardinality>1+</cardinality>
-                    <versionAdvertised>true</versionAdvertised>
-                    <commandScript>
-                        <script>scripts/eagle_userprofile_scheduler.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                    <configFiles>
-                        <configFile>
-                            <type>conf</type>
-                            <fileName>sandbox-userprofile-scheduler.conf</fileName>
-                            <dictionaryName>userprofile</dictionaryName>
-                        </configFile>
-                    </configFiles>
-                </component>
-
-                <!--<component>-->
-                    <!--<name>EAGLE_AUDIT2KAFKA_CLIENT</name>-->
-                    <!--<displayName>Eagle Audit2Kafka Client</displayName>-->
-                    <!--<category>CLIENT</category>-->
-                    <!--<cardinality>1+</cardinality>-->
-                    <!--<commandScript>-->
-                        <!--<script>scripts/eagle_audit_kafka.py</script>-->
-                        <!--<scriptType>PYTHON</scriptType>-->
-                        <!--<timeout>600</timeout>-->
-                    <!--</commandScript>-->
-                <!--</component>-->
-
-                <!--
-                <component>
-                    <name>EAGLE_CLIENT</name>
-                    <displayName>Eagle Client</displayName>
-                    <category>CLIENT</category>
-                    <cardinality>1+</cardinality>
-                    <commandScript>
-                        <script>scripts/eagle_client.py</script>
-                        <scriptType>PYTHON</scriptType>
-                        <timeout>600</timeout>
-                    </commandScript>
-                </component>
-        		-->
-            </components>
-
-            <osSpecifics>
-                <osSpecific>
-                    <osFamily>any</osFamily>
-                      <!-- note: use osType rather than osFamily for Ambari 1.5.0 and 1.5.1 -->
-                    <packages>
-                        <package>
-                            <name>eagle</name>
-                        </package>
-                    </packages>
-                </osSpecific>
-                            
-            </osSpecifics>
-            <requiredServices>
-                <service>HBASE</service>
-                <service>STORM</service>
-                <service>KAFKA</service>
-            </requiredServices>
-            <configuration-dependencies>
-                <config-type>eagle-service</config-type>
-                <config-type>data-process-runtime</config-type>
-            </configuration-dependencies>
-                    
-        </service>
-    </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/patches/add-eagle-quicklink.patch
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/patches/add-eagle-quicklink.patch b/eagle-external/eagle-ambari/lib/EAGLE/package/patches/add-eagle-quicklink.patch
deleted file mode 100644
index 9c47955..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/patches/add-eagle-quicklink.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git app.js app.js
-index 673e43b..172d8fa 100644
---- app.js
-+++ app.js
-@@ -57088,7 +57088,8 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
-       STORM: [31],
-       FALCON: [32],
-       RANGER: [33],
--      SPARK: [34]
-+      SPARK: [34],
-+      EAGLE: [35]
-     };
-     if (quickLinks[item.ServiceInfo.service_name])
-       finalJson.quick_links = quickLinks[item.ServiceInfo.service_name];
-@@ -66814,6 +66815,13 @@ App.QuickLinks.FIXTURES = [
-     site: 'spark-defaults',
-     regex: '^(\\d+)$',
-     default_http_port: 18080
-+  },
-+  {
-+    id: 35,
-+    label:'Eagle Web',
-+    url:'%@://%@:9099/eagle-service',
-+    service_id: 'EAGLE',
-+    template:'%@://%@:9099/eagle-service'
-   }
- ];

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/patches/app.js.gz
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/patches/app.js.gz b/eagle-external/eagle-ambari/lib/EAGLE/package/patches/app.js.gz
deleted file mode 100644
index 8cab877..0000000
Binary files a/eagle-external/eagle-ambari/lib/EAGLE/package/patches/app.js.gz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/__init__.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/__init__.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/__init__.py
deleted file mode 100755
index 136e1c6..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/__init__.py
+++ /dev/null
@@ -1,15 +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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/actions.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/actions.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/actions.py
deleted file mode 100755
index ffd3c63..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/actions.py
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-"""
-Eagle Ambari Command
-"""
-from resource_management import *
-
-def eagle_service_exec(action="start"):
-  import params
-
-  eagle_service_init_shell = format("{eagle_bin}/eagle-service-init.sh")
-  eagle_service_shell = format("{eagle_bin}/eagle-service.sh")
-
-  if action == "start":
-    start_cmd=format("{eagle_service_shell} start")
-    Execute(start_cmd, user=params.eagle_user)
-  elif action == "stop":
-    stop_cmd=format("{eagle_service_shell} stop")
-    Execute(stop_cmd,user=params.eagle_user)
-  elif action == "status":
-    status_cmd=format("{eagle_service_shell} status")
-    Execute(status_cmd,user=params.eagle_user)
-  elif action == "init":
-    Execute(eagle_service_init_shell,user=params.eagle_user)
-  else:
-    raise Exception('Unknown eagle service action: '+action)
-
-def eagle_topology_exec(action="start"):
-  import params
-
-  eagle_topology_shell = format("{eagle_bin}/eagle-topology.sh")
-  eagle_topology_init = format("{eagle_bin}/eagle-topology-init.sh")
-
-  if action == "start":
-    start_cmd = format("{eagle_topology_shell} start")
-    Execute(start_cmd, user=params.eagle_user)
-  elif action == "stop":
-    stop_cmd = format("{eagle_topology_shell} stop")
-    Execute(stop_cmd, user=params.eagle_user)
-  elif action == "status":
-    status_cmd = format("{eagle_topology_shell} --storm-ui status")
-    Execute(status_cmd, user=params.eagle_user)
-  elif action == "init":
-    Execute(eagle_topology_init, user=params.eagle_user)
-  else:
-    raise Exception('Unknown eagle topology action: '+action)
-
-def eagle_hive_topology_exec(action="start"):
-    import params
-
-    main_class="eagle.security.hive.jobrunning.HiveJobRunningMonitoringMain"
-    topology_name=format("{eagle_site}-hiveQueryRunningTopology")
-    config_file=format("{eagle_conf}/{eagle_site}-hiveQueryLog-application.conf")
-    eagle_topology_shell=format("{eagle_bin}/eagle-topology.sh")
-    eagle_topology_init=format("{eagle_bin}/eagle-topology-init.sh")
-
-    cmd=None
-
-    if action == "start":
-        cmd = format("{eagle_topology_shell} --main {main_class} --topology {topology_name} --config {config_file} start")
-    elif action == "stop":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} stop")
-    elif action == "status":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} --storm-ui status")
-    elif action == "init":
-        cmd = eagle_topology_init
-
-    if cmd != None:
-        Execute(cmd, user=params.eagle_user)
-    else:
-        raise Exception('Unknown eagle hive topology action: '+action)
-
-def eagle_hdfs_topology_exec(action="start"):
-    import params
-
-    main_class="eagle.security.auditlog.HdfsAuditLogProcessorMain"
-    topology_name=format("{eagle_site}-hdfsAuditLog-topology")
-    config_file=format("{eagle_conf}/{eagle_site}-hdfsAuditLog-application.conf")
-
-    eagle_topology_shell=format("{eagle_bin}/eagle-topology.sh")
-    eagle_topology_init=format("{eagle_bin}/eagle-topology-init.sh")
-
-    cmd=None
-    if action == "start":
-        cmd = format("{eagle_topology_shell} --main {main_class} --topology {topology_name} --config {config_file} start")
-    elif action == "stop":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} stop")
-    elif action == "status":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} --storm-ui status")
-    elif action == "init":
-        cmd = eagle_topology_init
-
-    if cmd != None:
-        Execute(cmd, user=params.eagle_user)
-    else:
-        raise Exception('Unknow eagle hdfs topology action: '+action)
-
-def eagle_userprofile_topology_exec(action="start"):
-    import params
-
-    main_class="eagle.security.userprofile.UserProfileDetectionMain"
-    topology_name=format("{eagle_site}-userprofile-topology")
-    config_file=format("{eagle_conf}/{eagle_site}-userprofile-topology.conf")
-
-    eagle_topology_shell=format("{eagle_bin}/eagle-topology.sh")
-    eagle_topology_init=format("{eagle_bin}/eagle-topology-init.sh")
-
-    cmd=None
-    if action == "start":
-        cmd = format("{eagle_topology_shell} --main {main_class} --topology {topology_name} --config {config_file} start")
-    elif action == "stop":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} stop")
-    elif action == "status":
-        cmd = format("{eagle_topology_shell} --topology {topology_name} --storm-ui status")
-    elif action == "init":
-        cmd = eagle_topology_init
-
-    if cmd != None:
-        Execute(cmd, user=params.eagle_user)
-    else:
-        raise Exception('Unknow eagle userprofile topology action: '+action)
-
-def eagle_userprofile_scheduler_exec(action = "start"):
-    import params
-    userprofile_scheduler_shell=format("{eagle_bin}/eagle-userprofile-scheduler.sh --site {params.eagle_site}")
-    if action == "start":
-        Execute(format("{userprofile_scheduler_shell} --daemon {action}"), user=params.eagle_user)
-    elif action == "stop" or action == "status":
-        Execute(format("{userprofile_scheduler_shell} {action}"), user=params.eagle_user)
-    else:
-        raise Exception("known eagle user profile scheduler action: "+action)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_audit_kafka.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_audit_kafka.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_audit_kafka.py
deleted file mode 100644
index ac489ef..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_audit_kafka.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-from resource_management import *
-class EagleAuditKafka(Script):
-    def install(self, env):
-        Logger.info('Installing Eagle AuditK2afka Client')
-        # self.install_packages(env)
-        import params
-        env.set_params(params)
-        self.configure(env)
-        # eagle_topology_exec(action = 'init')
-
-    def configure(self,env):
-        Logger.info("Configure Eagle Audit2Kafka Client")
-        import params
-        env.set_params(params)
-
-    def pre_rolling_restart(self,env):
-        Logger.info("Executing rolling pre-restart  Eagle Audit2Kafka Client")
-        import params
-        env.set_params(params)
-
-        # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-        #  Execute(format("hdp-select set eagle-topology {version}"))
-
-    def stop(self, env):
-        Logger.info('Stopping Eagle Audit2Kafka Client')
-        import params
-        env.set_params(params)
-        self.configure(env)
-
-    def start(self, env):
-        Logger.info('Starting Eagle Audit2Kafka Client')
-        import params
-        env.set_params(params)
-        self.configure(env)
-
-    def status(self, env):
-        Logger.info('Checking  Eagle Audit2Kafka Client')
-        import params
-        env.set_params(params)
-        self.configure(env)
-if __name__ == "__main__":
-    EagleAuditKafka().execute()

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_client.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_client.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_client.py
deleted file mode 100644
index dff69b5..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_client.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-from resource_management import *
-class EagleClient(Script):
-  def install(self, env):
-    print 'Install the eagle client';
-  def configure(self, env):
-    print 'Configure the eagle client';
-if __name__ == "__main__":
-  EagleClient().execute()

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hdfs_topology.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hdfs_topology.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hdfs_topology.py
deleted file mode 100755
index 12949b4..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hdfs_topology.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleHdfsTopology(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-TOPOLOGY"}
-
-  def install(self, env):
-    Logger.info('Install Eagle DAM HDFS Topology')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # eagle_hdfs_topology_exec(action = 'init')
-
-
-  def configure(self,env):
-    Logger.info("Configure Eagle DAM HDFS Topology")
-    import params
-    env.set_params(params)
-    # eagle_hdfs_topology_exec(action = 'init')
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing rolling pre-restart Eagle DAM HDFS Topology")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle-topology {version}"))
-
-  def stop(self, env):
-    Logger.info('Stopping Eagle DAM HDFS Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_hdfs_topology_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Starting Eagle DAM HDFS Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-
-    eagle_hdfs_topology_exec(action = 'init')
-    eagle_hdfs_topology_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Checking Eagle DAM HDFS Topology status')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_hdfs_topology_exec(action = 'status')
-
-if __name__ == "__main__":
-    EagleHdfsTopology().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hive_topology.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hive_topology.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hive_topology.py
deleted file mode 100755
index 12af6d0..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_hive_topology.py
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleHiveTopology(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-TOPOLOGY"}
-
-  def install(self, env):
-    Logger.info('Install Eagle DAM HIVE Topology')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # eagle_hive_topology_exec(action = 'init')
-
-  def configure(self,env):
-    Logger.info("Configure Eagle DAM HIVE Topology")
-    import params
-    env.set_params(params)
-    # eagle_hive_topology_exec(action = 'init')
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing rolling pre-restart Eagle DAM HIVE Topology")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle-topology {version}"))
-
-  def stop(self, env):
-    Logger.info('Stopping Eagle DAM HIVE Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_hive_topology_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Starting Eagle DAM HIVE Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-
-    eagle_hive_topology_exec(action = 'init')
-    eagle_hive_topology_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Checking Eagle DAM HIVE Topology status')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_hive_topology_exec(action = 'status')
-
-if __name__ == "__main__":
-    EagleHiveTopology().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service.py
deleted file mode 100755
index db66f79..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleService(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-SERVICE"}
-
-  def install(self, env):
-    Logger.info('Install the eagle service')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_service_exec(action = 'init')
-
-  def configure(self,env):
-    Logger.info("Configure eagle service")
-    import params
-    env.set_params(params)
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing Rolling Upgrade pre-restart")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle service {version}"))
-
-  def stop(self, env):
-    Logger.info('Stop the eagle service')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_service_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Start the eagle service')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_service_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Status of the eagle service')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # check_process_status(params.eagle_service_pid_file)
-    eagle_service_exec(action = 'status')
-
-if __name__ == "__main__":
-  EagleService().execute()

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service_check.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service_check.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service_check.py
deleted file mode 100644
index a11b9f3..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_service_check.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-from resource_management import *
-
-class EagleServiceCheck(Script):
-  def service_check(self,env):
-    import params
-    env.set_params(params)
-    import actions
-    eagle_service_exec(action="status")
-
-if __name__ == "__main__":
-  EagleServiceCheck().execute()    


[08/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/generated/AggregateProtos.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/generated/AggregateProtos.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/generated/AggregateProtos.java
deleted file mode 100644
index 2aee11b..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/generated/AggregateProtos.java
+++ /dev/null
@@ -1,4214 +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.
- */
-// Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: AggregateProtocol.proto
-
-package org.apache.eagle.storage.hbase.query.coprocessor.generated;
-
-import com.google.protobuf.AbstractMessage;
-
-public final class AggregateProtos {
-  private AggregateProtos() {}
-  public static void registerAllExtensions(
-      com.google.protobuf.ExtensionRegistry registry) {
-  }
-  public interface EntityDefinitionOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:EntityDefinition)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    boolean hasByteArray();
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    com.google.protobuf.ByteString getByteArray();
-  }
-  /**
-   * Protobuf type {@code EntityDefinition}
-   */
-  public static final class EntityDefinition extends
-      com.google.protobuf.GeneratedMessage implements
-      // @@protoc_insertion_point(message_implements:EntityDefinition)
-      EntityDefinitionOrBuilder {
-    // Use EntityDefinition.newBuilder() to construct.
-    private EntityDefinition(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-    private EntityDefinition(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-    private static final EntityDefinition defaultInstance;
-    public static EntityDefinition getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public EntityDefinition getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-        getUnknownFields() {
-      return this.unknownFields;
-    }
-    private EntityDefinition(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              byteArray_ = input.readBytes();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return AggregateProtos.internal_static_EntityDefinition_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return AggregateProtos.internal_static_EntityDefinition_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              AggregateProtos.EntityDefinition.class, AggregateProtos.EntityDefinition.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<EntityDefinition> PARSER =
-        new com.google.protobuf.AbstractParser<EntityDefinition>() {
-      public EntityDefinition parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new EntityDefinition(input, extensionRegistry);
-      }
-    };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<EntityDefinition> getParserForType() {
-      return PARSER;
-    }
-
-    private int bitField0_;
-    public static final int BYTE_ARRAY_FIELD_NUMBER = 1;
-    private com.google.protobuf.ByteString byteArray_;
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    public boolean hasByteArray() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    public com.google.protobuf.ByteString getByteArray() {
-      return byteArray_;
-    }
-
-    private void initFields() {
-      byteArray_ = com.google.protobuf.ByteString.EMPTY;
-    }
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasByteArray()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      getSerializedSize();
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        output.writeBytes(1, byteArray_);
-      }
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(1, byteArray_);
-      }
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof AggregateProtos.EntityDefinition)) {
-        return super.equals(obj);
-      }
-      AggregateProtos.EntityDefinition other = (AggregateProtos.EntityDefinition) obj;
-
-      boolean result = true;
-      result = result && (hasByteArray() == other.hasByteArray());
-      if (hasByteArray()) {
-        result = result && getByteArray()
-            .equals(other.getByteArray());
-      }
-      result = result &&
-          getUnknownFields().equals(other.getUnknownFields());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptorForType().hashCode();
-      if (hasByteArray()) {
-        hash = (37 * hash) + BYTE_ARRAY_FIELD_NUMBER;
-        hash = (53 * hash) + getByteArray().hashCode();
-      }
-      hash = (29 * hash) + getUnknownFields().hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static AggregateProtos.EntityDefinition parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.EntityDefinition parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-    public static AggregateProtos.EntityDefinition parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.EntityDefinition parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() { return Builder.create(); }
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder(AggregateProtos.EntityDefinition prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() { return newBuilder(this); }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code EntityDefinition}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:EntityDefinition)
-        AggregateProtos.EntityDefinitionOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return AggregateProtos.internal_static_EntityDefinition_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return AggregateProtos.internal_static_EntityDefinition_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                AggregateProtos.EntityDefinition.class, AggregateProtos.EntityDefinition.Builder.class);
-      }
-
-      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.EntityDefinition.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        byteArray_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return AggregateProtos.internal_static_EntityDefinition_descriptor;
-      }
-
-      public AggregateProtos.EntityDefinition getDefaultInstanceForType() {
-        return AggregateProtos.EntityDefinition.getDefaultInstance();
-      }
-
-      public AggregateProtos.EntityDefinition build() {
-        AggregateProtos.EntityDefinition result = buildPartial();
-        if (!result.isInitialized()) {
-          throw AbstractMessage.Builder.newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public AggregateProtos.EntityDefinition buildPartial() {
-        AggregateProtos.EntityDefinition result = new AggregateProtos.EntityDefinition(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.byteArray_ = byteArray_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof AggregateProtos.EntityDefinition) {
-          return mergeFrom((AggregateProtos.EntityDefinition)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(AggregateProtos.EntityDefinition other) {
-        if (other == AggregateProtos.EntityDefinition.getDefaultInstance()) return this;
-        if (other.hasByteArray()) {
-          setByteArray(other.getByteArray());
-        }
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        if (!hasByteArray()) {
-          
-          return false;
-        }
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        AggregateProtos.EntityDefinition parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (AggregateProtos.EntityDefinition) e.getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private com.google.protobuf.ByteString byteArray_ = com.google.protobuf.ByteString.EMPTY;
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public boolean hasByteArray() {
-        return ((bitField0_ & 0x00000001) == 0x00000001);
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public com.google.protobuf.ByteString getByteArray() {
-        return byteArray_;
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public Builder setByteArray(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        byteArray_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public Builder clearByteArray() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        byteArray_ = getDefaultInstance().getByteArray();
-        onChanged();
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:EntityDefinition)
-    }
-
-    static {
-      defaultInstance = new EntityDefinition(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:EntityDefinition)
-  }
-
-  public interface AggregateResultOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:AggregateResult)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    boolean hasByteArray();
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    com.google.protobuf.ByteString getByteArray();
-  }
-  /**
-   * Protobuf type {@code AggregateResult}
-   */
-  public static final class AggregateResult extends
-      com.google.protobuf.GeneratedMessage implements
-      // @@protoc_insertion_point(message_implements:AggregateResult)
-      AggregateResultOrBuilder {
-    // Use AggregateResult.newBuilder() to construct.
-    private AggregateResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-    private AggregateResult(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-    private static final AggregateResult defaultInstance;
-    public static AggregateResult getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public AggregateResult getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-        getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AggregateResult(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              byteArray_ = input.readBytes();
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return AggregateProtos.internal_static_AggregateResult_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return AggregateProtos.internal_static_AggregateResult_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              AggregateProtos.AggregateResult.class, AggregateProtos.AggregateResult.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<AggregateResult> PARSER =
-        new com.google.protobuf.AbstractParser<AggregateResult>() {
-      public AggregateResult parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AggregateResult(input, extensionRegistry);
-      }
-    };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<AggregateResult> getParserForType() {
-      return PARSER;
-    }
-
-    private int bitField0_;
-    public static final int BYTE_ARRAY_FIELD_NUMBER = 1;
-    private com.google.protobuf.ByteString byteArray_;
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    public boolean hasByteArray() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-    /**
-     * <code>required bytes byte_array = 1;</code>
-     */
-    public com.google.protobuf.ByteString getByteArray() {
-      return byteArray_;
-    }
-
-    private void initFields() {
-      byteArray_ = com.google.protobuf.ByteString.EMPTY;
-    }
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasByteArray()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      getSerializedSize();
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        output.writeBytes(1, byteArray_);
-      }
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(1, byteArray_);
-      }
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof AggregateProtos.AggregateResult)) {
-        return super.equals(obj);
-      }
-      AggregateProtos.AggregateResult other = (AggregateProtos.AggregateResult) obj;
-
-      boolean result = true;
-      result = result && (hasByteArray() == other.hasByteArray());
-      if (hasByteArray()) {
-        result = result && getByteArray()
-            .equals(other.getByteArray());
-      }
-      result = result &&
-          getUnknownFields().equals(other.getUnknownFields());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptorForType().hashCode();
-      if (hasByteArray()) {
-        hash = (37 * hash) + BYTE_ARRAY_FIELD_NUMBER;
-        hash = (53 * hash) + getByteArray().hashCode();
-      }
-      hash = (29 * hash) + getUnknownFields().hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static AggregateProtos.AggregateResult parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateResult parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-    public static AggregateProtos.AggregateResult parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.AggregateResult parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() { return Builder.create(); }
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder(AggregateProtos.AggregateResult prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() { return newBuilder(this); }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code AggregateResult}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:AggregateResult)
-        AggregateProtos.AggregateResultOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return AggregateProtos.internal_static_AggregateResult_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return AggregateProtos.internal_static_AggregateResult_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                AggregateProtos.AggregateResult.class, AggregateProtos.AggregateResult.Builder.class);
-      }
-
-      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.AggregateResult.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-        }
-      }
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        byteArray_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return AggregateProtos.internal_static_AggregateResult_descriptor;
-      }
-
-      public AggregateProtos.AggregateResult getDefaultInstanceForType() {
-        return AggregateProtos.AggregateResult.getDefaultInstance();
-      }
-
-      public AggregateProtos.AggregateResult build() {
-        AggregateProtos.AggregateResult result = buildPartial();
-        if (!result.isInitialized()) {
-          throw AbstractMessage.Builder.newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public AggregateProtos.AggregateResult buildPartial() {
-        AggregateProtos.AggregateResult result = new AggregateProtos.AggregateResult(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        result.byteArray_ = byteArray_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof AggregateProtos.AggregateResult) {
-          return mergeFrom((AggregateProtos.AggregateResult)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(AggregateProtos.AggregateResult other) {
-        if (other == AggregateProtos.AggregateResult.getDefaultInstance()) return this;
-        if (other.hasByteArray()) {
-          setByteArray(other.getByteArray());
-        }
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        if (!hasByteArray()) {
-          
-          return false;
-        }
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        AggregateProtos.AggregateResult parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (AggregateProtos.AggregateResult) e.getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private com.google.protobuf.ByteString byteArray_ = com.google.protobuf.ByteString.EMPTY;
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public boolean hasByteArray() {
-        return ((bitField0_ & 0x00000001) == 0x00000001);
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public com.google.protobuf.ByteString getByteArray() {
-        return byteArray_;
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public Builder setByteArray(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00000001;
-        byteArray_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>required bytes byte_array = 1;</code>
-       */
-      public Builder clearByteArray() {
-        bitField0_ = (bitField0_ & ~0x00000001);
-        byteArray_ = getDefaultInstance().getByteArray();
-        onChanged();
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:AggregateResult)
-    }
-
-    static {
-      defaultInstance = new AggregateResult(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:AggregateResult)
-  }
-
-  public interface AggregateRequestOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:AggregateRequest)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    boolean hasEntityDefinition();
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    AggregateProtos.EntityDefinition getEntityDefinition();
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder();
-
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    boolean hasScan();
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan();
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder();
-
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    com.google.protobuf.ProtocolStringList
-        getGroupbyFieldsList();
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    int getGroupbyFieldsCount();
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    java.lang.String getGroupbyFields(int index);
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    com.google.protobuf.ByteString
-        getGroupbyFieldsBytes(int index);
-
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    java.util.List<com.google.protobuf.ByteString> getAggregateFuncTypesList();
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    int getAggregateFuncTypesCount();
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    com.google.protobuf.ByteString getAggregateFuncTypes(int index);
-
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    com.google.protobuf.ProtocolStringList
-        getAggregatedFieldsList();
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    int getAggregatedFieldsCount();
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    java.lang.String getAggregatedFields(int index);
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    com.google.protobuf.ByteString
-        getAggregatedFieldsBytes(int index);
-  }
-  /**
-   * Protobuf type {@code AggregateRequest}
-   */
-  public static final class AggregateRequest extends
-      com.google.protobuf.GeneratedMessage implements
-      // @@protoc_insertion_point(message_implements:AggregateRequest)
-      AggregateRequestOrBuilder {
-    // Use AggregateRequest.newBuilder() to construct.
-    private AggregateRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-    private AggregateRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-    private static final AggregateRequest defaultInstance;
-    public static AggregateRequest getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public AggregateRequest getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-        getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AggregateRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              AggregateProtos.EntityDefinition.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000001) == 0x00000001)) {
-                subBuilder = entityDefinition_.toBuilder();
-              }
-              entityDefinition_ = input.readMessage(AggregateProtos.EntityDefinition.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(entityDefinition_);
-                entityDefinition_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000001;
-              break;
-            }
-            case 18: {
-              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000002) == 0x00000002)) {
-                subBuilder = scan_.toBuilder();
-              }
-              scan_ = input.readMessage(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(scan_);
-                scan_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000002;
-              break;
-            }
-            case 26: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                groupbyFields_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000004;
-              }
-              groupbyFields_.add(bs);
-              break;
-            }
-            case 34: {
-              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
-                mutable_bitField0_ |= 0x00000008;
-              }
-              aggregateFuncTypes_.add(input.readBytes());
-              break;
-            }
-            case 42: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-                aggregatedFields_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000010;
-              }
-              aggregatedFields_.add(bs);
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e.getMessage()).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-          groupbyFields_ = groupbyFields_.getUnmodifiableView();
-        }
-        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
-        }
-        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
-          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return AggregateProtos.internal_static_AggregateRequest_descriptor;
-    }
-
-    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return AggregateProtos.internal_static_AggregateRequest_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              AggregateProtos.AggregateRequest.class, AggregateProtos.AggregateRequest.Builder.class);
-    }
-
-    public static com.google.protobuf.Parser<AggregateRequest> PARSER =
-        new com.google.protobuf.AbstractParser<AggregateRequest>() {
-      public AggregateRequest parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AggregateRequest(input, extensionRegistry);
-      }
-    };
-
-    @java.lang.Override
-    public com.google.protobuf.Parser<AggregateRequest> getParserForType() {
-      return PARSER;
-    }
-
-    private int bitField0_;
-    public static final int ENTITY_DEFINITION_FIELD_NUMBER = 1;
-    private AggregateProtos.EntityDefinition entityDefinition_;
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    public boolean hasEntityDefinition() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    public AggregateProtos.EntityDefinition getEntityDefinition() {
-      return entityDefinition_;
-    }
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
-      return entityDefinition_;
-    }
-
-    public static final int SCAN_FIELD_NUMBER = 2;
-    private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_;
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    public boolean hasScan() {
-      return ((bitField0_ & 0x00000002) == 0x00000002);
-    }
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
-      return scan_;
-    }
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
-      return scan_;
-    }
-
-    public static final int GROUPBY_FIELDS_FIELD_NUMBER = 3;
-    private com.google.protobuf.LazyStringList groupbyFields_;
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    public com.google.protobuf.ProtocolStringList
-        getGroupbyFieldsList() {
-      return groupbyFields_;
-    }
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    public int getGroupbyFieldsCount() {
-      return groupbyFields_.size();
-    }
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    public java.lang.String getGroupbyFields(int index) {
-      return groupbyFields_.get(index);
-    }
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    public com.google.protobuf.ByteString
-        getGroupbyFieldsBytes(int index) {
-      return groupbyFields_.getByteString(index);
-    }
-
-    public static final int AGGREGATE_FUNC_TYPES_FIELD_NUMBER = 4;
-    private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_;
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    public java.util.List<com.google.protobuf.ByteString>
-        getAggregateFuncTypesList() {
-      return aggregateFuncTypes_;
-    }
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    public int getAggregateFuncTypesCount() {
-      return aggregateFuncTypes_.size();
-    }
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
-      return aggregateFuncTypes_.get(index);
-    }
-
-    public static final int AGGREGATED_FIELDS_FIELD_NUMBER = 5;
-    private com.google.protobuf.LazyStringList aggregatedFields_;
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    public com.google.protobuf.ProtocolStringList
-        getAggregatedFieldsList() {
-      return aggregatedFields_;
-    }
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    public int getAggregatedFieldsCount() {
-      return aggregatedFields_.size();
-    }
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    public java.lang.String getAggregatedFields(int index) {
-      return aggregatedFields_.get(index);
-    }
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    public com.google.protobuf.ByteString
-        getAggregatedFieldsBytes(int index) {
-      return aggregatedFields_.getByteString(index);
-    }
-
-    private void initFields() {
-      entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
-      scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
-      groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-      aggregateFuncTypes_ = java.util.Collections.emptyList();
-      aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-    }
-    private byte memoizedIsInitialized = -1;
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      if (!hasEntityDefinition()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!hasScan()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!getEntityDefinition().isInitialized()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      if (!getScan().isInitialized()) {
-        memoizedIsInitialized = 0;
-        return false;
-      }
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      getSerializedSize();
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        output.writeMessage(1, entityDefinition_);
-      }
-      if (((bitField0_ & 0x00000002) == 0x00000002)) {
-        output.writeMessage(2, scan_);
-      }
-      for (int i = 0; i < groupbyFields_.size(); i++) {
-        output.writeBytes(3, groupbyFields_.getByteString(i));
-      }
-      for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
-        output.writeBytes(4, aggregateFuncTypes_.get(i));
-      }
-      for (int i = 0; i < aggregatedFields_.size(); i++) {
-        output.writeBytes(5, aggregatedFields_.getByteString(i));
-      }
-      getUnknownFields().writeTo(output);
-    }
-
-    private int memoizedSerializedSize = -1;
-    public int getSerializedSize() {
-      int size = memoizedSerializedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (((bitField0_ & 0x00000001) == 0x00000001)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(1, entityDefinition_);
-      }
-      if (((bitField0_ & 0x00000002) == 0x00000002)) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(2, scan_);
-      }
-      {
-        int dataSize = 0;
-        for (int i = 0; i < groupbyFields_.size(); i++) {
-          dataSize += com.google.protobuf.CodedOutputStream
-            .computeBytesSizeNoTag(groupbyFields_.getByteString(i));
-        }
-        size += dataSize;
-        size += 1 * getGroupbyFieldsList().size();
-      }
-      {
-        int dataSize = 0;
-        for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
-          dataSize += com.google.protobuf.CodedOutputStream
-            .computeBytesSizeNoTag(aggregateFuncTypes_.get(i));
-        }
-        size += dataSize;
-        size += 1 * getAggregateFuncTypesList().size();
-      }
-      {
-        int dataSize = 0;
-        for (int i = 0; i < aggregatedFields_.size(); i++) {
-          dataSize += com.google.protobuf.CodedOutputStream
-            .computeBytesSizeNoTag(aggregatedFields_.getByteString(i));
-        }
-        size += dataSize;
-        size += 1 * getAggregatedFieldsList().size();
-      }
-      size += getUnknownFields().getSerializedSize();
-      memoizedSerializedSize = size;
-      return size;
-    }
-
-    private static final long serialVersionUID = 0L;
-    @java.lang.Override
-    protected java.lang.Object writeReplace()
-        throws java.io.ObjectStreamException {
-      return super.writeReplace();
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof AggregateProtos.AggregateRequest)) {
-        return super.equals(obj);
-      }
-      AggregateProtos.AggregateRequest other = (AggregateProtos.AggregateRequest) obj;
-
-      boolean result = true;
-      result = result && (hasEntityDefinition() == other.hasEntityDefinition());
-      if (hasEntityDefinition()) {
-        result = result && getEntityDefinition()
-            .equals(other.getEntityDefinition());
-      }
-      result = result && (hasScan() == other.hasScan());
-      if (hasScan()) {
-        result = result && getScan()
-            .equals(other.getScan());
-      }
-      result = result && getGroupbyFieldsList()
-          .equals(other.getGroupbyFieldsList());
-      result = result && getAggregateFuncTypesList()
-          .equals(other.getAggregateFuncTypesList());
-      result = result && getAggregatedFieldsList()
-          .equals(other.getAggregatedFieldsList());
-      result = result &&
-          getUnknownFields().equals(other.getUnknownFields());
-      return result;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptorForType().hashCode();
-      if (hasEntityDefinition()) {
-        hash = (37 * hash) + ENTITY_DEFINITION_FIELD_NUMBER;
-        hash = (53 * hash) + getEntityDefinition().hashCode();
-      }
-      if (hasScan()) {
-        hash = (37 * hash) + SCAN_FIELD_NUMBER;
-        hash = (53 * hash) + getScan().hashCode();
-      }
-      if (getGroupbyFieldsCount() > 0) {
-        hash = (37 * hash) + GROUPBY_FIELDS_FIELD_NUMBER;
-        hash = (53 * hash) + getGroupbyFieldsList().hashCode();
-      }
-      if (getAggregateFuncTypesCount() > 0) {
-        hash = (37 * hash) + AGGREGATE_FUNC_TYPES_FIELD_NUMBER;
-        hash = (53 * hash) + getAggregateFuncTypesList().hashCode();
-      }
-      if (getAggregatedFieldsCount() > 0) {
-        hash = (37 * hash) + AGGREGATED_FIELDS_FIELD_NUMBER;
-        hash = (53 * hash) + getAggregatedFieldsList().hashCode();
-      }
-      hash = (29 * hash) + getUnknownFields().hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static AggregateProtos.AggregateRequest parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateRequest parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input);
-    }
-    public static AggregateProtos.AggregateRequest parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseDelimitedFrom(input, extensionRegistry);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input);
-    }
-    public static AggregateProtos.AggregateRequest parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return PARSER.parseFrom(input, extensionRegistry);
-    }
-
-    public static Builder newBuilder() { return Builder.create(); }
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder(AggregateProtos.AggregateRequest prototype) {
-      return newBuilder().mergeFrom(prototype);
-    }
-    public Builder toBuilder() { return newBuilder(this); }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code AggregateRequest}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
-        // @@protoc_insertion_point(builder_implements:AggregateRequest)
-        AggregateProtos.AggregateRequestOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return AggregateProtos.internal_static_AggregateRequest_descriptor;
-      }
-
-      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return AggregateProtos.internal_static_AggregateRequest_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                AggregateProtos.AggregateRequest.class, AggregateProtos.AggregateRequest.Builder.class);
-      }
-
-      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.AggregateRequest.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
-          getEntityDefinitionFieldBuilder();
-          getScanFieldBuilder();
-        }
-      }
-      private static Builder create() {
-        return new Builder();
-      }
-
-      public Builder clear() {
-        super.clear();
-        if (entityDefinitionBuilder_ == null) {
-          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
-        } else {
-          entityDefinitionBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000001);
-        if (scanBuilder_ == null) {
-          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
-        } else {
-          scanBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000002);
-        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000004);
-        aggregateFuncTypes_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000008);
-        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000010);
-        return this;
-      }
-
-      public Builder clone() {
-        return create().mergeFrom(buildPartial());
-      }
-
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return AggregateProtos.internal_static_AggregateRequest_descriptor;
-      }
-
-      public AggregateProtos.AggregateRequest getDefaultInstanceForType() {
-        return AggregateProtos.AggregateRequest.getDefaultInstance();
-      }
-
-      public AggregateProtos.AggregateRequest build() {
-        AggregateProtos.AggregateRequest result = buildPartial();
-        if (!result.isInitialized()) {
-          throw AbstractMessage.Builder.newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      public AggregateProtos.AggregateRequest buildPartial() {
-        AggregateProtos.AggregateRequest result = new AggregateProtos.AggregateRequest(this);
-        int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
-          to_bitField0_ |= 0x00000001;
-        }
-        if (entityDefinitionBuilder_ == null) {
-          result.entityDefinition_ = entityDefinition_;
-        } else {
-          result.entityDefinition_ = entityDefinitionBuilder_.build();
-        }
-        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
-          to_bitField0_ |= 0x00000002;
-        }
-        if (scanBuilder_ == null) {
-          result.scan_ = scan_;
-        } else {
-          result.scan_ = scanBuilder_.build();
-        }
-        if (((bitField0_ & 0x00000004) == 0x00000004)) {
-          groupbyFields_ = groupbyFields_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000004);
-        }
-        result.groupbyFields_ = groupbyFields_;
-        if (((bitField0_ & 0x00000008) == 0x00000008)) {
-          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
-          bitField0_ = (bitField0_ & ~0x00000008);
-        }
-        result.aggregateFuncTypes_ = aggregateFuncTypes_;
-        if (((bitField0_ & 0x00000010) == 0x00000010)) {
-          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000010);
-        }
-        result.aggregatedFields_ = aggregatedFields_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
-      }
-
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof AggregateProtos.AggregateRequest) {
-          return mergeFrom((AggregateProtos.AggregateRequest)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(AggregateProtos.AggregateRequest other) {
-        if (other == AggregateProtos.AggregateRequest.getDefaultInstance()) return this;
-        if (other.hasEntityDefinition()) {
-          mergeEntityDefinition(other.getEntityDefinition());
-        }
-        if (other.hasScan()) {
-          mergeScan(other.getScan());
-        }
-        if (!other.groupbyFields_.isEmpty()) {
-          if (groupbyFields_.isEmpty()) {
-            groupbyFields_ = other.groupbyFields_;
-            bitField0_ = (bitField0_ & ~0x00000004);
-          } else {
-            ensureGroupbyFieldsIsMutable();
-            groupbyFields_.addAll(other.groupbyFields_);
-          }
-          onChanged();
-        }
-        if (!other.aggregateFuncTypes_.isEmpty()) {
-          if (aggregateFuncTypes_.isEmpty()) {
-            aggregateFuncTypes_ = other.aggregateFuncTypes_;
-            bitField0_ = (bitField0_ & ~0x00000008);
-          } else {
-            ensureAggregateFuncTypesIsMutable();
-            aggregateFuncTypes_.addAll(other.aggregateFuncTypes_);
-          }
-          onChanged();
-        }
-        if (!other.aggregatedFields_.isEmpty()) {
-          if (aggregatedFields_.isEmpty()) {
-            aggregatedFields_ = other.aggregatedFields_;
-            bitField0_ = (bitField0_ & ~0x00000010);
-          } else {
-            ensureAggregatedFieldsIsMutable();
-            aggregatedFields_.addAll(other.aggregatedFields_);
-          }
-          onChanged();
-        }
-        this.mergeUnknownFields(other.getUnknownFields());
-        return this;
-      }
-
-      public final boolean isInitialized() {
-        if (!hasEntityDefinition()) {
-          
-          return false;
-        }
-        if (!hasScan()) {
-          
-          return false;
-        }
-        if (!getEntityDefinition().isInitialized()) {
-          
-          return false;
-        }
-        if (!getScan().isInitialized()) {
-          
-          return false;
-        }
-        return true;
-      }
-
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        AggregateProtos.AggregateRequest parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (AggregateProtos.AggregateRequest) e.getUnfinishedMessage();
-          throw e;
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-      private int bitField0_;
-
-      private AggregateProtos.EntityDefinition entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
-      private com.google.protobuf.SingleFieldBuilder<
-          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder> entityDefinitionBuilder_;
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public boolean hasEntityDefinition() {
-        return ((bitField0_ & 0x00000001) == 0x00000001);
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public AggregateProtos.EntityDefinition getEntityDefinition() {
-        if (entityDefinitionBuilder_ == null) {
-          return entityDefinition_;
-        } else {
-          return entityDefinitionBuilder_.getMessage();
-        }
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public Builder setEntityDefinition(AggregateProtos.EntityDefinition value) {
-        if (entityDefinitionBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          entityDefinition_ = value;
-          onChanged();
-        } else {
-          entityDefinitionBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000001;
-        return this;
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public Builder setEntityDefinition(
-          AggregateProtos.EntityDefinition.Builder builderForValue) {
-        if (entityDefinitionBuilder_ == null) {
-          entityDefinition_ = builderForValue.build();
-          onChanged();
-        } else {
-          entityDefinitionBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000001;
-        return this;
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public Builder mergeEntityDefinition(AggregateProtos.EntityDefinition value) {
-        if (entityDefinitionBuilder_ == null) {
-          if (((bitField0_ & 0x00000001) == 0x00000001) &&
-              entityDefinition_ != AggregateProtos.EntityDefinition.getDefaultInstance()) {
-            entityDefinition_ =
-              AggregateProtos.EntityDefinition.newBuilder(entityDefinition_).mergeFrom(value).buildPartial();
-          } else {
-            entityDefinition_ = value;
-          }
-          onChanged();
-        } else {
-          entityDefinitionBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000001;
-        return this;
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public Builder clearEntityDefinition() {
-        if (entityDefinitionBuilder_ == null) {
-          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
-          onChanged();
-        } else {
-          entityDefinitionBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000001);
-        return this;
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public AggregateProtos.EntityDefinition.Builder getEntityDefinitionBuilder() {
-        bitField0_ |= 0x00000001;
-        onChanged();
-        return getEntityDefinitionFieldBuilder().getBuilder();
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
-        if (entityDefinitionBuilder_ != null) {
-          return entityDefinitionBuilder_.getMessageOrBuilder();
-        } else {
-          return entityDefinition_;
-        }
-      }
-      /**
-       * <code>required .EntityDefinition entity_definition = 1;</code>
-       */
-      private com.google.protobuf.SingleFieldBuilder<
-          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>
-          getEntityDefinitionFieldBuilder() {
-        if (entityDefinitionBuilder_ == null) {
-          entityDefinitionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>(
-                  getEntityDefinition(),
-                  getParentForChildren(),
-                  isClean());
-          entityDefinition_ = null;
-        }
-        return entityDefinitionBuilder_;
-      }
-
-      private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
-      private com.google.protobuf.SingleFieldBuilder<
-          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> scanBuilder_;
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public boolean hasScan() {
-        return ((bitField0_ & 0x00000002) == 0x00000002);
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
-        if (scanBuilder_ == null) {
-          return scan_;
-        } else {
-          return scanBuilder_.getMessage();
-        }
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public Builder setScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
-        if (scanBuilder_ == null) {
-          if (value == null) {
-            throw new NullPointerException();
-          }
-          scan_ = value;
-          onChanged();
-        } else {
-          scanBuilder_.setMessage(value);
-        }
-        bitField0_ |= 0x00000002;
-        return this;
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public Builder setScan(
-          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder builderForValue) {
-        if (scanBuilder_ == null) {
-          scan_ = builderForValue.build();
-          onChanged();
-        } else {
-          scanBuilder_.setMessage(builderForValue.build());
-        }
-        bitField0_ |= 0x00000002;
-        return this;
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public Builder mergeScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
-        if (scanBuilder_ == null) {
-          if (((bitField0_ & 0x00000002) == 0x00000002) &&
-              scan_ != org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance()) {
-            scan_ =
-              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.newBuilder(scan_).mergeFrom(value).buildPartial();
-          } else {
-            scan_ = value;
-          }
-          onChanged();
-        } else {
-          scanBuilder_.mergeFrom(value);
-        }
-        bitField0_ |= 0x00000002;
-        return this;
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public Builder clearScan() {
-        if (scanBuilder_ == null) {
-          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
-          onChanged();
-        } else {
-          scanBuilder_.clear();
-        }
-        bitField0_ = (bitField0_ & ~0x00000002);
-        return this;
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder getScanBuilder() {
-        bitField0_ |= 0x00000002;
-        onChanged();
-        return getScanFieldBuilder().getBuilder();
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
-        if (scanBuilder_ != null) {
-          return scanBuilder_.getMessageOrBuilder();
-        } else {
-          return scan_;
-        }
-      }
-      /**
-       * <code>required .Scan scan = 2;</code>
-       */
-      private com.google.protobuf.SingleFieldBuilder<
-          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> 
-          getScanFieldBuilder() {
-        if (scanBuilder_ == null) {
-          scanBuilder_ = new com.google.protobuf.SingleFieldBuilder<
-              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder>(
-                  getScan(),
-                  getParentForChildren(),
-                  isClean());
-          scan_ = null;
-        }
-        return scanBuilder_;
-      }
-
-      private com.google.protobuf.LazyStringList groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-      private void ensureGroupbyFieldsIsMutable() {
-        if (!((bitField0_ & 0x00000004) == 0x00000004)) {
-          groupbyFields_ = new com.google.protobuf.LazyStringArrayList(groupbyFields_);
-          bitField0_ |= 0x00000004;
-         }
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public com.google.protobuf.ProtocolStringList
-          getGroupbyFieldsList() {
-        return groupbyFields_.getUnmodifiableView();
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public int getGroupbyFieldsCount() {
-        return groupbyFields_.size();
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public java.lang.String getGroupbyFields(int index) {
-        return groupbyFields_.get(index);
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public com.google.protobuf.ByteString
-          getGroupbyFieldsBytes(int index) {
-        return groupbyFields_.getByteString(index);
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public Builder setGroupbyFields(
-          int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureGroupbyFieldsIsMutable();
-        groupbyFields_.set(index, value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public Builder addGroupbyFields(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureGroupbyFieldsIsMutable();
-        groupbyFields_.add(value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public Builder addAllGroupbyFields(
-          java.lang.Iterable<java.lang.String> values) {
-        ensureGroupbyFieldsIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, groupbyFields_);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public Builder clearGroupbyFields() {
-        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000004);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string groupby_fields = 3;</code>
-       */
-      public Builder addGroupbyFieldsBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureGroupbyFieldsIsMutable();
-        groupbyFields_.add(value);
-        onChanged();
-        return this;
-      }
-
-      private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_ = java.util.Collections.emptyList();
-      private void ensureAggregateFuncTypesIsMutable() {
-        if (!((bitField0_ & 0x00000008) == 0x00000008)) {
-          aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>(aggregateFuncTypes_);
-          bitField0_ |= 0x00000008;
-         }
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public java.util.List<com.google.protobuf.ByteString>
-          getAggregateFuncTypesList() {
-        return java.util.Collections.unmodifiableList(aggregateFuncTypes_);
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public int getAggregateFuncTypesCount() {
-        return aggregateFuncTypes_.size();
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
-        return aggregateFuncTypes_.get(index);
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public Builder setAggregateFuncTypes(
-          int index, com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureAggregateFuncTypesIsMutable();
-        aggregateFuncTypes_.set(index, value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public Builder addAggregateFuncTypes(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureAggregateFuncTypesIsMutable();
-        aggregateFuncTypes_.add(value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public Builder addAllAggregateFuncTypes(
-          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
-        ensureAggregateFuncTypesIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, aggregateFuncTypes_);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated bytes aggregate_func_types = 4;</code>
-       */
-      public Builder clearAggregateFuncTypes() {
-        aggregateFuncTypes_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000008);
-        onChanged();
-        return this;
-      }
-
-      private com.google.protobuf.LazyStringList aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-      private void ensureAggregatedFieldsIsMutable() {
-        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          aggregatedFields_ = new com.google.protobuf.LazyStringArrayList(aggregatedFields_);
-          bitField0_ |= 0x00000010;
-         }
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public com.google.protobuf.ProtocolStringList
-          getAggregatedFieldsList() {
-        return aggregatedFields_.getUnmodifiableView();
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public int getAggregatedFieldsCount() {
-        return aggregatedFields_.size();
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public java.lang.String getAggregatedFields(int index) {
-        return aggregatedFields_.get(index);
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public com.google.protobuf.ByteString
-          getAggregatedFieldsBytes(int index) {
-        return aggregatedFields_.getByteString(index);
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public Builder setAggregatedFields(
-          int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureAggregatedFieldsIsMutable();
-        aggregatedFields_.set(index, value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public Builder addAggregatedFields(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureAggregatedFieldsIsMutable();
-        aggregatedFields_.add(value);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public Builder addAllAggregatedFields(
-          java.lang.Iterable<java.lang.String> values) {
-        ensureAggregatedFieldsIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, aggregatedFields_);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public Builder clearAggregatedFields() {
-        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000010);
-        onChanged();
-        return this;
-      }
-      /**
-       * <code>repeated string aggregated_fields = 5;</code>
-       */
-      public Builder addAggregatedFieldsBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureAggregatedFieldsIsMutable();
-        aggregatedFields_.add(value);
-        onChanged();
-        return this;
-      }
-
-      // @@protoc_insertion_point(builder_scope:AggregateRequest)
-    }
-
-    static {
-      defaultInstance = new AggregateRequest(true);
-      defaultInstance.initFields();
-    }
-
-    // @@protoc_insertion_point(class_scope:AggregateRequest)
-  }
-
-  public interface TimeSeriesAggregateRequestOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:TimeSeriesAggregateRequest)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    boolean hasEntityDefinition();
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    AggregateProtos.EntityDefinition getEntityDefinition();
-    /**
-     * <code>required .EntityDefinition entity_definition = 1;</code>
-     */
-    AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder();
-
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    boolean hasScan();
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan();
-    /**
-     * <code>required .Scan scan = 2;</code>
-     */
-    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder();
-
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    com.google.protobuf.ProtocolStringList
-        getGroupbyFieldsList();
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    int getGroupbyFieldsCount();
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    java.lang.String getGroupbyFields(int index);
-    /**
-     * <code>repeated string groupby_fields = 3;</code>
-     */
-    com.google.protobuf.ByteString
-        getGroupbyFieldsBytes(int index);
-
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    java.util.List<com.google.protobuf.ByteString> getAggregateFuncTypesList();
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    int getAggregateFuncTypesCount();
-    /**
-     * <code>repeated bytes aggregate_func_types = 4;</code>
-     */
-    com.google.protobuf.ByteString getAggregateFuncTypes(int index);
-
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    com.google.protobuf.ProtocolStringList
-        getAggregatedFieldsList();
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    int getAggregatedFieldsCount();
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    java.lang.String getAggregatedFields(int index);
-    /**
-     * <code>repeated string aggregated_fields = 5;</code>
-     */
-    com.google.protobuf.ByteString
-        getAggregatedFieldsBytes(int index);
-
-    /**
-     * <code>required int64 start_time = 6;</code>
-     */
-    boolean hasStartTime();
-    /**
-     * <code>required int64 start_time = 6;</code>
-     */
-    long getStartTime();
-
-    /**
-     * <code>required int64 end_time = 7;</code>
-     */
-    boolean hasEndTime();
-    /**
-     * <code>required int64 end_time = 7;</code>
-     */
-    long getEndTime();
-
-    /**
-     * <code>required int64 interval_min = 8;</code>
-     */
-    boolean hasIntervalMin();
-    /**
-     * <code>required int64 interval_min = 8;</code>
-     */
-    long getIntervalMin();
-  }
-  /**
-   * Protobuf type {@code TimeSeriesAggregateRequest}
-   */
-  public static final class TimeSeriesAggregateRequest extends
-      com.google.protobuf.GeneratedMessage implements
-      // @@protoc_insertion_point(message_implements:TimeSeriesAggregateRequest)
-      TimeSeriesAggregateRequestOrBuilder {
-    // Use TimeSeriesAggregateRequest.newBuilder() to construct.
-    private TimeSeriesAggregateRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
-      super(builder);
-      this.unknownFields = builder.getUnknownFields();
-    }
-    private TimeSeriesAggregateRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
-    private static final TimeSeriesAggregateRequest defaultInstance;
-    public static TimeSeriesAggregateRequest getDefaultInstance() {
-      return defaultInstance;
-    }
-
-    public TimeSeriesAggregateRequest getDefaultInstanceForType() {
-      return defaultInstance;
-    }
-
-    private final com.google.protobuf.UnknownFieldSet unknownFields;
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-        getUnknownFields() {
-      return this.unknownFields;
-    }
-    private TimeSeriesAggregateRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      initFields();
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            default: {
-              if (!parseUnknownField(input, unknownFields,
-                                     extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-            case 10: {
-              AggregateProtos.EntityDefinition.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000001) == 0x00000001)) {
-                subBuilder = entityDefinition_.toBuilder();
-              }
-              entityDefinition_ = input.readMessage(AggregateProtos.EntityDefinition.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(entityDefinition_);
-                entityDefinition_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000001;
-              break;
-            }
-            case 18: {
-              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null;
-              if (((bitField0_ & 0x00000002) == 0x00000002)) {
-                subBuilder = scan_.toBuilder();
-              }
-              scan_ = input.readMessage(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.PARSER, extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(scan_);
-                scan_ = subBuilder.buildPartial();
-              }
-              bitField0_ |= 0x00000002;
-              break;
-            }
-            case 26: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
-                groupbyFields_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000004;
-              }
-              groupbyFields_.add(bs);
-              break;
-            }
-            case 34: {
-              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
-                aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
-                mutable_bitField0_ |= 0x00000008;
-              }
-              aggregateFuncTypes_.add(input.readBytes());
-              break;
-            }
-            case 42: {
-              com.google.protobuf.ByteString bs = input.readBytes();
-              if (!((

<TRUNCATED>


[41/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiddhiAlertPolicyValidateProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiddhiAlertPolicyValidateProvider.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiddhiAlertPolicyValidateProvider.java
deleted file mode 100644
index 43bcfe2..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/SiddhiAlertPolicyValidateProvider.java
+++ /dev/null
@@ -1,133 +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.service.alert;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.policy.siddhi.AttributeType;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.common.DateTimeUtil;
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.jsontype.NamedType;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-
-public class SiddhiAlertPolicyValidateProvider extends AlertPolicyValidateProvider{
-
-	public String type;
-	public List<String> streamNames;
-	public String policyDefinition;	
-	public static Logger LOG = LoggerFactory.getLogger(PolicyValidateResource.class);
-	public static final String EXECUTION_PLAN_NAME = "query";
-	
-	@SuppressWarnings({"unchecked"})
-	public String getStreamDef(String streamName) {
-		GenericEntityServiceResource resource = new GenericEntityServiceResource();
-		String startTime = "1969-01-01 00:00:00";
-		String endTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(Long.MAX_VALUE);
-		int pageSize = 1000;
-		String query = Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME + "[@streamName=\"" + streamName + "\"]{*}";
-		GenericServiceAPIResponseEntity<AlertStreamSchemaEntity> streamResponse = resource.search(query, startTime, endTime, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-		List<AlertStreamSchemaEntity> list = streamResponse.getObj();
-		
-		Map<String, String> map = new HashMap<String, String>();
-		for(AlertStreamSchemaEntity entity : list){
-			map.put(entity.getTags().get("attrName"), entity.getAttrType());
-		}
-		StringBuilder sb = new StringBuilder();
-		sb.append("dataobj object,");
-		for(Map.Entry<String, String> entry : map.entrySet()){
-			String attrName = entry.getKey();
-			sb.append(attrName);
-			sb.append(" ");
-			String attrType = entry.getValue();
-			if(attrType.equalsIgnoreCase(AttributeType.STRING.name())){
-				sb.append("string");
-			}else if(attrType.equalsIgnoreCase(AttributeType.INTEGER.name())){
-				sb.append("int");
-			}else if(attrType.equalsIgnoreCase(AttributeType.LONG.name())){
-				sb.append("long");
-			}else if(attrType.equalsIgnoreCase(AttributeType.BOOL.name())){
-				sb.append("bool");
-			}else{
-				LOG.error("AttrType is not recognized, ignore : " + attrType);
-			}
-			sb.append(",");
-		}
-		if(sb.length() > 0){
-			sb.deleteCharAt(sb.length()-1);
-		}
-		
-		String siddhiStreamDefFormat = "define stream " + streamName + " (" + "%s" + ");";
-		String streamDef = String.format(siddhiStreamDefFormat, sb.toString());
-		return streamDef;
-	}
-	
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	@Override
-	public GenericServiceAPIResponseEntity validate() {
-		GenericServiceAPIResponseEntity result = new GenericServiceAPIResponseEntity();
-		SiddhiManager siddhiManager = new SiddhiManager();
-		ExecutionPlanRuntime executionPlanRuntime = null;
-		try {				
-			String streamDefs = new String();
-			for(String streamName : streamNames){
-				//String streamDef = SiddhiStreamMetadataUtils.convertToStreamDef(streamName);
-				//We don't use SiddhiStreamMetadataUtils, for it only consume one dataSource
-				String streamDef = getStreamDef(streamName);
-				LOG.info("Siddhi stream definition : " + streamDef);
-				streamDefs += streamDef;
-			}		
-			
-			String executionPlan = streamDefs + " @info(name = '" + EXECUTION_PLAN_NAME + "') " +  policyDefinition;
-			executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);
-		}
-		catch (Exception ex) {
-			result.setSuccess(false);
-			result.setException(ex);
-			return result;
-		}
-		finally {
-			if (executionPlanRuntime != null) {
-				executionPlanRuntime.shutdown();
-			}
-		}
-		result.setSuccess(true);
-		return result;
-	}
-	
-	@Override
-	public String PolicyType() {
-		return "siddhiCEPEngine";
-	}
-	
-	@Override
-	public List<Module> BindingModules() {
-		Module module = new SimpleModule("policyValidate").registerSubtypes(new NamedType(SiddhiAlertPolicyValidateProvider.class, PolicyType()));
-		return Arrays.asList(module);	
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolvable.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolvable.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolvable.java
deleted file mode 100644
index ecfd47f..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolvable.java
+++ /dev/null
@@ -1,44 +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.service.alert.resolver;
-
-import java.util.List;
-
-/**
- * @param <R>
- * @param <V>
- * @since 6/16/15
- */
-public interface AttributeResolvable<R extends GenericAttributeResolveRequest, V> {
-    /**
-     * @param request request type
-     * @return List&lt;V&gt;
-     * @throws AttributeResolveException
-     */
-    List<V> resolve(R request) throws AttributeResolveException;
-
-    /**
-     * validate request
-     * @throws BadAttributeResolveRequestException
-     */
-    void validateRequest(R request) throws BadAttributeResolveRequestException;
-
-    /**
-     * @return Class&lt;R&gt;
-     */
-    Class<R> getRequestClass();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveException.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveException.java
deleted file mode 100644
index 56cd942..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveException.java
+++ /dev/null
@@ -1,26 +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.service.alert.resolver;
-
-/**
- * @since 6/16/15
- */
-public class AttributeResolveException extends Exception {
-    public AttributeResolveException(String s, Exception e) { super(s,e); }
-    public AttributeResolveException(Exception e) { super(e); }
-    public AttributeResolveException(String s) { super(s); }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResource.java
deleted file mode 100644
index 68995d1..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResource.java
+++ /dev/null
@@ -1,81 +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.service.alert.resolver;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.common.EagleExceptionWrapper;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import javax.ws.rs.*;
-import java.io.InputStream;
-import java.util.List;
-
-/**
- * @since 6/17/15
- */
-@Path("/stream")
-public class AttributeResolveResource {
-    @POST
-    @Path("attributeresolve")
-    @Consumes({"application/json"})
-    @Produces({"application/json"})
-    public GenericServiceAPIResponseEntity attributeResolve(InputStream request,
-                                                            @QueryParam("resolver") String resolver){
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        try {
-            if(resolver == null) throw new AttributeResolveException("resolver is null");
-            AttributeResolvable resolvable = AttributeResolverFactory.getAttributeResolver(resolver);
-            ObjectMapper objectMapper = new ObjectMapper();
-            Class<?> resolveRequestClass = resolvable.getRequestClass();
-            if(resolveRequestClass == null) throw new AttributeResolveException("Request class is null for resolver "+resolver);
-            GenericAttributeResolveRequest resolveRequest = (GenericAttributeResolveRequest) objectMapper.readValue(request, resolvable.getRequestClass());
-            resolvable.validateRequest(resolveRequest);
-            List result = resolvable.resolve(resolveRequest);
-            response.setSuccess(true);
-            response.setObj(result);
-        } catch (Exception e) {
-            response.setSuccess(false);
-            response.setException(EagleExceptionWrapper.wrap(e));
-            return response;
-        }
-        return response;
-    }
-
-    @GET
-    @Path("attributeresolve")
-    @Produces({"application/json"})
-    public GenericServiceAPIResponseEntity attributeResolver(
-            @QueryParam("resolver") String resolver, @QueryParam("site") String site, @QueryParam("query") String query){
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        try {
-            if(resolver == null) throw new AttributeResolveException("resolver is null");
-            AttributeResolvable resolvable = AttributeResolverFactory.getAttributeResolver(resolver);
-            Class<?> resolveRequestClass = resolvable.getRequestClass();
-            if(resolveRequestClass == null) throw new AttributeResolveException("Request class is null for resolver "+resolver);
-            GenericAttributeResolveRequest resolveRequest = new GenericAttributeResolveRequest(query,site);
-            resolvable.validateRequest(resolveRequest);
-            List result = resolvable.resolve(resolveRequest);
-            response.setSuccess(true);
-            response.setObj(result);
-        } catch (Exception e) {
-            response.setSuccess(false);
-            response.setException(EagleExceptionWrapper.wrap(e));
-            return response;
-        }
-        return response;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResponse.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResponse.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResponse.java
deleted file mode 100644
index 0ec9cf4..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolveResponse.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.service.alert.resolver;
-
-import java.util.List;
-
-public class AttributeResolveResponse<V> {
-    private String exception;
-    private List<V> values;
-
-    public List<V> getValues() {
-        return values;
-    }
-
-    public void setValues(List<V> values) {
-        this.values = values;
-    }
-
-    public String getException() {
-        return exception;
-    }
-
-    public void setException(String exception) {
-        this.exception = exception;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolverFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolverFactory.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolverFactory.java
deleted file mode 100644
index 4015fb7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/AttributeResolverFactory.java
+++ /dev/null
@@ -1,50 +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.service.alert.resolver;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
-* @since 6/16/15
-*/
-public final class AttributeResolverFactory {
-    private final static Map<String,AttributeResolvable> fieldResolvableCache = Collections.synchronizedMap(new HashMap<String,AttributeResolvable>());
-    public static AttributeResolvable getAttributeResolver(String fieldResolverName) throws AttributeResolveException {
-        AttributeResolvable instance;
-        if(fieldResolvableCache.containsKey(fieldResolverName)){
-            instance = fieldResolvableCache.get(fieldResolverName);
-        } else {
-            try {
-                instance = (AttributeResolvable) Class.forName(fieldResolverName).newInstance();
-                fieldResolvableCache.put(fieldResolverName, instance);
-            } catch (ClassNotFoundException e) {
-                throw new AttributeResolveException("Attribute Resolver in type of "+fieldResolverName+" is not found",e);
-            } catch (InstantiationException | IllegalAccessException e) {
-                throw new AttributeResolveException(e);
-            }
-        }
-        return instance;
-    }
-
-    public static List resolve(String resolver, GenericAttributeResolveRequest request) throws AttributeResolveException {
-        AttributeResolvable fieldResolver = getAttributeResolver(resolver);
-        return fieldResolver.resolve(request);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/BadAttributeResolveRequestException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/BadAttributeResolveRequestException.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/BadAttributeResolveRequestException.java
deleted file mode 100644
index 5a2d7e6..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/BadAttributeResolveRequestException.java
+++ /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.
- */
-package org.apache.eagle.service.alert.resolver;
-
-public class BadAttributeResolveRequestException extends Exception {
-    public BadAttributeResolveRequestException(Exception ex){
-        super(ex);
-    }
-
-    public BadAttributeResolveRequestException(String msg){
-        super(msg);
-    }
-
-    public BadAttributeResolveRequestException(String msg, Exception ex){
-        super(msg, ex);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/GenericAttributeResolveRequest.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/GenericAttributeResolveRequest.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/GenericAttributeResolveRequest.java
deleted file mode 100644
index 97899b7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/GenericAttributeResolveRequest.java
+++ /dev/null
@@ -1,54 +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.service.alert.resolver;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * @since 6/16/15
- */
-public class GenericAttributeResolveRequest {
-    /**
-     * @param query whatever is in input box of attribute
-     * @param site which site this policy belongs to
-     */
-    @JsonCreator
-    public GenericAttributeResolveRequest(@JsonProperty("query") String query, @JsonProperty("site") String site){
-        this.query  = query;
-        this.site = site;
-    }
-
-    public String getQuery() {
-        return query;
-    }
-
-    public void setQuery(String query) {
-        this.query = query;
-    }
-
-    public String getSite() {
-        return site;
-    }
-
-    public void setSite(String site) {
-        this.site = site;
-    }
-
-    private String site;
-    private String query;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
deleted file mode 100644
index 42f95f7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
+++ /dev/null
@@ -1,62 +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.service.alert.resolver;
-
-
-import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-import java.util.List;
-import java.util.Map;
-
-public class SiteApplicationObject extends TaggedLogAPIEntity {
-
-    public Boolean getEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(Boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-
-    public List<SiteApplicationServiceEntity> getApplications() {
-        return applications;
-    }
-
-    public void setApplications(List<SiteApplicationServiceEntity> applications) {
-        this.applications = applications;
-        valueChanged("applicationList");
-    }
-
-    @Override
-    public Map<String, String> getTags() {
-        return tags;
-    }
-
-    @Override
-    public void setTags(Map<String, String> tags) {
-        this.tags = tags;
-        valueChanged("tags");
-    }
-
-    Map<String, String> tags;
-    Boolean enabled;
-    List<SiteApplicationServiceEntity> applications;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
deleted file mode 100644
index 903a220..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
+++ /dev/null
@@ -1,189 +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.service.alert.resolver;
-
-import org.apache.eagle.alert.entity.ApplicationDescServiceEntity;
-import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
-import org.apache.eagle.alert.entity.SiteDescServiceEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.MediaType;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-
-@Path(SiteApplicationResource.ROOT_PATH)
-public class SiteApplicationResource {
-    private final static Logger LOG = LoggerFactory.getLogger(SiteApplicationResource.class);
-    private final static GenericEntityServiceResource resource = new GenericEntityServiceResource();
-    public final static String ROOT_PATH = "/module";
-
-    @Path("site")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteSite(@QueryParam("site") String site) {
-        String siteQuery = Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@site=\"" + site + "\"]{*}";
-        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@site=\"" + site + "\"]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(siteQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } else {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("application")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteApplication(@QueryParam("application") String application) {
-        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@application=\"" + application + "\"]{*}";
-        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } else {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("feature")
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteFeature(@QueryParam("feature") String feature) {
-        String featureQuery = Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@feature=\"" + feature + "\"]{*}";
-        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME + "[]{*}";
-        int pageSize = Integer.MAX_VALUE;
-
-        GenericServiceAPIResponseEntity response = resource.deleteByQuery(featureQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-        if(response.isSuccess()) {
-            response = resource.search(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-            if(response.isSuccess()) {
-                List<ApplicationDescServiceEntity> entityList = response.getObj();
-                Boolean isModified = false;
-                for(ApplicationDescServiceEntity entity : entityList) {
-                    if(entity.getFeatures().contains(feature)) {
-                        List<String> features = entity.getFeatures();
-                        features.remove(feature);
-                        entity.setFeatures(features);
-                        isModified = true;
-                    }
-                }
-                if(isModified) {
-                    response = resource.updateEntities(entityList, Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME);
-                }
-            }
-        }
-        if(!response.isSuccess()) {
-            LOG.error(response.getException());
-        }
-        return response;
-    }
-
-    @Path("siteApplication")
-    @POST
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity createSiteApplications(InputStream inputStream) {
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity<>();
-        int pageSize = Integer.MAX_VALUE;
-        try {
-            List<SiteApplicationObject> entities = (List<SiteApplicationObject>) unmarshalSiteApplicationEntities(inputStream);
-            if(entities == null) {
-                throw new IllegalArgumentException("cannot convert to SiteApplicationObject");
-            }
-            List<SiteDescServiceEntity> siteEntities = new LinkedList<>();
-            List<SiteApplicationServiceEntity> applicationEntities = new LinkedList<>();
-            Set<String> sites = new HashSet<>();
-            for(SiteApplicationObject e : entities) {
-                sites.add(e.getTags().get("site"));
-                SiteDescServiceEntity entity = new SiteDescServiceEntity();
-                entity.setEnabled(e.getEnabled());
-                entity.setTags(e.getTags());
-                siteEntities.add(entity);
-                applicationEntities.addAll(e.getApplications());
-            }
-            response = resource.updateEntities(siteEntities, Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME);
-            if(response.isSuccess()) {
-                String query = buildQueryWithAttributeList(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME, "site", sites);
-                LOG.info("query=" + query);
-                response = resource.search(query, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
-                if(response.isSuccess()) {
-                    List<SiteApplicationServiceEntity> applications = response.getObj();
-                    for(SiteApplicationServiceEntity app : applications) {
-                        app.setEnabled(false);
-                    }
-                    response = resource.updateEntities(applications, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
-                    if(response.isSuccess()) {
-                        response = resource.updateEntities(applicationEntities, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
-                    }
-                }
-            }
-            if(!response.isSuccess()) {
-                LOG.error(response.getException());
-            }
-        } catch (Exception ex) {
-            LOG.error(ex.getMessage(), ex);
-            response.setException(ex);
-        }
-        return response;
-    }
-
-    private String buildQueryWithAttributeList(String serviceName, String attr, Set<String> sets) {
-        StringBuilder builder = new StringBuilder(serviceName + "[");
-        String attribute = "@" + attr + "=";
-        String condition = " OR ";
-        for(String s : sets) {
-            String value = String.format("\"%s\"", s);
-            builder.append(attribute + value);
-            builder.append(condition);
-        }
-        String result = builder.substring(0, builder.length()-condition.length());
-        result = result + "]{*}";
-        return result;
-    }
-
-    private List<? extends TaggedLogAPIEntity> unmarshalSiteApplicationEntities(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
-        ObjectMapper objectMapper = new ObjectMapper();
-        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, SiteApplicationObject.class));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/BooleanAttributeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/BooleanAttributeResolver.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/BooleanAttributeResolver.java
deleted file mode 100644
index 3dc70e1..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/BooleanAttributeResolver.java
+++ /dev/null
@@ -1,43 +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.service.alert.resolver.impl;
-
-import org.apache.eagle.service.alert.resolver.AttributeResolveException;
-import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
-import org.apache.eagle.service.alert.resolver.AttributeResolvable;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @since 6/16/15
- */
-public class BooleanAttributeResolver implements AttributeResolvable<GenericAttributeResolveRequest,String> {
-    @Override
-    public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {
-        return Arrays.asList("true", "false");
-    }
-
-    @Override
-    public void validateRequest(GenericAttributeResolveRequest request){
-    }
-
-    @Override
-    public Class<GenericAttributeResolveRequest> getRequestClass() {
-        return GenericAttributeResolveRequest.class;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
deleted file mode 100644
index 9758863..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/impl/EntityAttributeResolver.java
+++ /dev/null
@@ -1,142 +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.service.alert.resolver.impl;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.service.alert.resolver.AttributeResolvable;
-import org.apache.eagle.service.alert.resolver.AttributeResolveException;
-import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
-import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
-import org.apache.eagle.service.generic.GenericEntityServiceResource;
-import org.apache.eagle.common.DateTimeUtil;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since 6/16/15
- */
-public class EntityAttributeResolver implements AttributeResolvable<EntityAttributeResolver.EntityAttributeResolveRequest,String> {
-
-    private final static GenericEntityServiceResource entityServiceResource = new GenericEntityServiceResource();
-
-    @Override
-    public List<String> resolve(EntityAttributeResolveRequest request) throws AttributeResolveException {
-        if(request.getFieldName()==null){
-            throw new AttributeResolveException("fieldName is required");
-        }
-        String attributeName = request.getFieldName();
-        EntityDefinition entityDefinition;
-        try {
-            if(request.getServiceName()!=null){
-                entityDefinition = EntityDefinitionManager.getEntityByServiceName(request.getServiceName());
-            }else if (request.getEntityClassName()!=null){
-                Class<? extends TaggedLogAPIEntity> entityClass = (Class<? extends TaggedLogAPIEntity>) Class.forName(request.getEntityClassName());
-                entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(entityClass);
-            }else {
-                throw new AttributeResolveException("At least serviceName or entityClassName is required, but neither found");
-            }
-        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
-            throw new AttributeResolveException(e);
-        }
-        List<String> filterCondition = new ArrayList<>();
-        if(request.getTags()!=null){
-            for(Map.Entry<String,String> tag:request.getTags().entrySet()) {
-                filterCondition.add("@" + tag.getKey() + " = \"" + tag.getValue() + "\"");
-            }
-        }
-        if(request.getQuery() != null) {
-            filterCondition.add("@" + attributeName + "~= \".*" + request.getQuery()+".*\"");
-        }
-        String query = entityDefinition.getService() + "[" + StringUtils.join(filterCondition, " AND ") + "]<@" + attributeName + ">{count}";
-        return aggregateQuery(query, DateTimeUtil.millisecondsToHumanDateWithSeconds(0), DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()),request.getMetricName());
-    }
-
-    @Override
-    public Class<EntityAttributeResolveRequest> getRequestClass() {
-        return EntityAttributeResolveRequest.class;
-    }
-
-    @Override
-    public void validateRequest(EntityAttributeResolver.EntityAttributeResolveRequest request) throws BadAttributeResolveRequestException {
-
-    }
-
-    private List<String> aggregateQuery(String query,String startTime,String endTime,String metricName) throws AttributeResolveException {
-        List<String> result = new ArrayList<>();
-        GenericServiceAPIResponseEntity response = entityServiceResource.search(query, startTime, endTime, Integer.MAX_VALUE, null, false, false, 0, Integer.MAX_VALUE, true, 0, metricName, false);
-        if(response.isSuccess()){
-            List objs = response.getObj();
-            for(Object item:objs){
-                // TODO: get keys as result
-                throw new IllegalArgumentException("not implemented yet");
-            }
-        }else{
-            throw new AttributeResolveException(response.getException());
-        }
-        return result;
-    }
-
-    public static class EntityAttributeResolveRequest extends GenericAttributeResolveRequest {
-        public Map<String, String> getTags() {
-            return tags;
-        }
-        private final Map<String, String> tags;
-        public String getMetricName() {
-            return metricName;
-        }
-        private final String metricName;
-        @JsonCreator
-        public EntityAttributeResolveRequest(
-                @JsonProperty("query") String query,
-                @JsonProperty("site") String site,
-                @JsonProperty("serviceName") String serviceName,
-                @JsonProperty("entityClassName") String entityClassName,
-                @JsonProperty("metricName") String metricName,
-                @JsonProperty("fieldName") String fieldName,
-                @JsonProperty("tags") Map<String, String> tags
-        ){
-            super(query, site);
-            this.serviceName = serviceName;
-            this.entityClassName = entityClassName;
-            this.fieldName = fieldName;
-            this.metricName = metricName;
-            this.tags =  tags;
-        }
-
-        private final String serviceName;
-        public String getEntityClassName() {
-            return entityClassName;
-        }
-        public String getServiceName() {
-            return serviceName;
-        }
-        public String getFieldName() {
-            return fieldName;
-        }
-        private final String entityClassName;
-        private final String fieldName;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider b/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
deleted file mode 100644
index 3833f47..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.service.alert.SiddhiAlertPolicyValidateProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml b/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
deleted file mode 100644
index 06d24df..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/main/resources/core-site.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-  Licensed 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. See accompanying LICENSE file.
--->
-
-<!-- Put site-specific property overrides in this file. -->
-
-<configuration>
-	<property>
-        <name>fs.defaultFS</name>
-        <value>hdfs://NN URL:8020</value>
-	</property>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider b/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
deleted file mode 100644
index 3833f47..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/META-INF/services/org.apache.eagle.service.alert.AlertPolicyValidateProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.service.alert.SiddhiAlertPolicyValidateProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties b/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
deleted file mode 100644
index 3499c46..0000000
--- a/eagle-core/eagle-alert/eagle-alert-service/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=./logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/pom.xml b/eagle-core/eagle-alert/pom.xml
deleted file mode 100644
index 43f6675..0000000
--- a/eagle-core/eagle-alert/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-core</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-alert-parent</artifactId>
-	<packaging>pom</packaging>
-
-	<name>eagle-alert-parent</name>
-	<modules>
-		<module>eagle-alert-base</module>
-		<module>eagle-alert-process</module>
-		<module>eagle-alert-service</module>
-		<module>eagle-alert-notification-plugin</module>
-	</modules>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-job-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/pom.xml b/eagle-core/eagle-data-process/eagle-job-common/pom.xml
deleted file mode 100644
index 7ec2a21..0000000
--- a/eagle-core/eagle-data-process/eagle-job-common/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>eagle</groupId>
-    <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <artifactId>eagle-job-common</artifactId>
-  <name>eagle-job-common</name>
-  <url>http://maven.apache.org</url>
-  <dependencies>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/DefaultJobPartitionerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/DefaultJobPartitionerImpl.java b/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/DefaultJobPartitionerImpl.java
deleted file mode 100644
index 7c4953f..0000000
--- a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/DefaultJobPartitionerImpl.java
+++ /dev/null
@@ -1,26 +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.job;
-
-public class DefaultJobPartitionerImpl implements JobPartitioner {
-	@Override
-	public int partition(int numTotalParts, String key) {
-		int hash = key.hashCode();
-		hash = Math.abs(hash);
-		return hash % numTotalParts;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilter.java b/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilter.java
deleted file mode 100644
index 4a072f0..0000000
--- a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilter.java
+++ /dev/null
@@ -1,21 +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.job;
-
-public interface JobFilter {
-	public boolean accept(String key);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilterByPartition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilterByPartition.java b/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilterByPartition.java
deleted file mode 100644
index 8373766..0000000
--- a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobFilterByPartition.java
+++ /dev/null
@@ -1,37 +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.job;
-
-public class JobFilterByPartition implements JobFilter {
-	private JobPartitioner partitioner;
-	private int numTotalPartitions;
-	private int partitionId;
-	
-	public JobFilterByPartition(JobPartitioner partitioner, int numTotalPartitions, int partitionId){
-		this.partitioner = partitioner;
-		this.numTotalPartitions = numTotalPartitions;
-		this.partitionId = partitionId;
-	}
-
-	@Override
-	public boolean accept(String key) {
-		int part = partitioner.partition(numTotalPartitions, key);
-		if(part == partitionId)
-			return true;
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobPartitioner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobPartitioner.java b/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobPartitioner.java
deleted file mode 100644
index 4f4d74a..0000000
--- a/eagle-core/eagle-data-process/eagle-job-common/src/main/java/org/apache/eagle/job/JobPartitioner.java
+++ /dev/null
@@ -1,21 +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.job;
-
-public interface JobPartitioner {
-	int partition(int numTotalParts, String key);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
deleted file mode 100644
index 7b01ef5..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>eagle</groupId>
-    <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <artifactId>eagle-storm-jobrunning-spout</artifactId>
-  <name>eagle-storm-jobrunning-spout</name>
-  <url>http://maven.apache.org</url>
-  <dependencies>
-  	<dependency>
-  		<groupId>org.slf4j</groupId>
-  		<artifactId>slf4j-api</artifactId>
-  	</dependency>
-  	<dependency>
-  		<groupId>eagle</groupId>
-  		<artifactId>eagle-stream-process-api</artifactId>
-        <version>${project.version}</version>
-  	</dependency>
-      <dependency>
-          <groupId>eagle</groupId>
-          <artifactId>eagle-stream-process-base</artifactId>
-          <version>${project.version}</version>
-      </dependency>
-  	<dependency>
-  		<groupId>eagle</groupId>
-  		<artifactId>eagle-job-common</artifactId>
-  		<version>${project.version}</version>
-  	</dependency>  	  	
-  	<dependency>
-		<groupId>org.jsoup</groupId>
-		<artifactId>jsoup</artifactId>
-	</dependency>
-  	<dependency>
-  		<groupId>org.apache.storm</groupId>
-  		<artifactId>storm-core</artifactId>
-  		<exclusions>
-      		<exclusion>
-      			<groupId>ch.qos.logback</groupId>
-        		<artifactId>logback-classic</artifactId>
-      		</exclusion>
-      	</exclusions> 
-  	</dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/DefaultRunningJobInputStreamCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/DefaultRunningJobInputStreamCallback.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/DefaultRunningJobInputStreamCallback.java
deleted file mode 100644
index fb77bc7..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/DefaultRunningJobInputStreamCallback.java
+++ /dev/null
@@ -1,58 +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.jobrunning.callback;
-
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.dataproc.core.EagleOutputCollector;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.jobrunning.common.JobConstants.ResourceType;
-import org.apache.eagle.jobrunning.crawler.JobContext;
-
-public class DefaultRunningJobInputStreamCallback implements RunningJobCallback{
-	
-	private static final long serialVersionUID = 1L;
-	private static final Logger LOG = LoggerFactory.getLogger(DefaultRunningJobInputStreamCallback.class);
-	
-	private EagleOutputCollector eagleCollector;
-	
-	public DefaultRunningJobInputStreamCallback(EagleOutputCollector eagleCollector){
-		this.eagleCollector = eagleCollector;
-	}
-
-	@Override
-	public void onJobRunningInformation(JobContext context, ResourceType type, List<Object> objects) {
-		String jobId = context.jobId;
-		LOG.info(jobId + " information fetched , type: " + type);
-		if (type.equals(ResourceType.JOB_CONFIGURATION)) {
-			@SuppressWarnings("unchecked")
-			Map<String, String> config = (Map<String, String>) objects.get(0);
-			// the fist field is fixed as messageId
-			RunningJobMessageId messageId = new RunningJobMessageId(jobId, type, context.fetchedTime);
-			eagleCollector.collect(new ValuesArray(messageId, context.user, jobId, type, config));
-		}
-		else if (type.equals(ResourceType.JOB_RUNNING_INFO) || type.equals(ResourceType.JOB_COMPLETE_INFO)) {
-			// Here timestamp is meaningless, set to null
-			RunningJobMessageId messageId = new RunningJobMessageId(jobId, type, null);
-			eagleCollector.collect(new ValuesArray(messageId, context.user, jobId, type, objects));
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobCallback.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobCallback.java
deleted file mode 100644
index f36e8a5..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobCallback.java
+++ /dev/null
@@ -1,37 +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.jobrunning.callback;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.eagle.jobrunning.crawler.JobContext;
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-/**
- * callback when running job info is ready
- */
-public interface RunningJobCallback extends Serializable{
-		
-	/**
-	 * this is called when running job resource is ready
-	 * @param jobContext
-	 * @param type
-	 * @param objects
-	 */
-	void onJobRunningInformation(JobContext jobContext, JobConstants.ResourceType type, List<Object> objects);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobMessageId.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobMessageId.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobMessageId.java
deleted file mode 100644
index 08b58f2..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/callback/RunningJobMessageId.java
+++ /dev/null
@@ -1,56 +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.jobrunning.callback;
-
-import com.google.common.base.Objects;
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class RunningJobMessageId {
-	public String jobID;
-	public JobConstants.ResourceType type;
-	// If type = JOB_RUNNING_INFO, timestamp = fetchedTime, otherwise timestamp is meaningless, set to null
-	public Long timestamp;
-	
-	public RunningJobMessageId(String jobID, JobConstants.ResourceType type, Long timestamp) {
-		this.jobID = jobID;
-		this.type = type;
-		this.timestamp = timestamp;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        final RunningJobMessageId other = (RunningJobMessageId) obj;
-        return Objects.equal(this.jobID, other.jobID) 
-        	  && Objects.equal(this.type, other.type)
-        	  && Objects.equal(this.timestamp, other.timestamp);
-	}
-	
-	@Override
-	public int hashCode() {
-		return Objects.hashCode(jobID.hashCode(), type.hashCode(), timestamp.hashCode());
-	}
-	
-	@Override
-	public String toString() {
-		return "jobID=" + jobID 
-			 + ", type=" + type.name() 
-			 + ", timestamp= " + timestamp;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/common/JobConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/common/JobConstants.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/common/JobConstants.java
deleted file mode 100644
index 6a1d7c8..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/common/JobConstants.java
+++ /dev/null
@@ -1,53 +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.jobrunning.common;
-
-public class JobConstants {
-	public static final String APPLICATION_PREFIX = "application";
-	public static final String JOB_PREFIX = "job";
-	public static final String V2_APPS_RUNNING_URL = "ws/v1/cluster/apps?state=RUNNING";
-	public static final String V2_APPS_COMPLETED_URL = "ws/v1/cluster/apps?state=FINISHED";	
-	public static final String V2_APPS_URL = "ws/v1/cluster/apps";
-	public static final String ANONYMOUS_PARAMETER = "anonymous=true";
-	
-	public static final String V2_PROXY_PREFIX_URL = "proxy/";
-	public static final String V2_APP_DETAIL_URL = "/ws/v1/mapreduce/jobs";
-	public static final String V2_MR_APPMASTER_PREFIX = "/ws/v1/mapreduce/jobs/";
-	public static final String V2_CONF_URL = "/conf";
-	public static final String V2_COMPLETE_APPS_URL = "ws/v1/cluster/apps/";
-	public static final String V2_MR_COUNTERS_URL = "/counters";
-	
-
-	public static final String HIVE_QUERY_STRING = "hive.query.string";
-	public static final String JOB_STATE_RUNNING = "RUNNING";
-	
-	public enum YarnApplicationType {
-		MAPREDUCE, UNKNOWN
-	}
-	
-	public enum CompressionType {
-		GZIP, NONE
-	}
-	
-	public enum ResourceType {
-		JOB_RUNNING_INFO, JOB_COMPLETE_INFO, JOB_CONFIGURATION, JOB_LIST
-	}
-	
-	public enum JobState {
-		RUNNING, COMPLETED, ALL
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/config/RunningJobCrawlConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/config/RunningJobCrawlConfig.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/config/RunningJobCrawlConfig.java
deleted file mode 100644
index 79a8928..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/config/RunningJobCrawlConfig.java
+++ /dev/null
@@ -1,53 +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.jobrunning.config;
-
-import org.apache.eagle.dataproc.impl.storm.zookeeper.ZKStateConfig;
-import org.apache.eagle.job.JobPartitioner;
-
-import java.io.Serializable;
-
-public class RunningJobCrawlConfig implements Serializable{
-	private static final long serialVersionUID = 1L;
-	public RunningJobEndpointConfig endPointConfig;
-	public ControlConfig controlConfig;
-	public ZKStateConfig zkStateConfig;
-
-	public RunningJobCrawlConfig(RunningJobEndpointConfig endPointConfig, ControlConfig controlConfig, ZKStateConfig zkStateConfig){
-		this.endPointConfig = endPointConfig;
-		this.controlConfig = controlConfig;
-		this.zkStateConfig = zkStateConfig;
-	}	
-    
-    public static class RunningJobEndpointConfig implements Serializable{
-		private static final long serialVersionUID = 1L;
-		public String[] RMBasePaths;
-		public String HSBasePath;
-    }
-    
-    public static class ControlConfig implements Serializable{
-		private static final long serialVersionUID = 1L;
-    	public boolean jobConfigEnabled; 
-    	public boolean jobInfoEnabled;
-    	public int zkCleanupTimeInday;
-    	public int completedJobOutofDateTimeInMin;
-    	public int sizeOfJobConfigQueue;
-    	public int sizeOfJobCompletedInfoQueue;
-        public Class<? extends JobPartitioner> partitionerCls;
-        public int numTotalPartitions = 1;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterGroupKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterGroupKey.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterGroupKey.java
deleted file mode 100644
index 146fbe8..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterGroupKey.java
+++ /dev/null
@@ -1,30 +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.jobrunning.counter;
-
-import java.util.List;
-
-public interface CounterGroupKey {
-
-	String getName();
-	String getDescription();
-	int getIndex();
-	int getCounterNumber();
-	List<CounterKey> listCounterKeys();
-	CounterKey getCounterKeyByName(String name);
-	CounterKey getCounterKeyByID(int index);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterKey.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterKey.java
deleted file mode 100644
index a39d7b4..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/CounterKey.java
+++ /dev/null
@@ -1,28 +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.jobrunning.counter;
-
-import java.util.List;
-
-public interface CounterKey {
-
-	List<String> getNames();
-	String getDescription();
-	int getIndex();
-	CounterGroupKey getGroupKey();
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/JobCounters.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/JobCounters.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/JobCounters.java
deleted file mode 100644
index ba44ac6..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/JobCounters.java
+++ /dev/null
@@ -1,38 +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.jobrunning.counter;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-
-public final class JobCounters {
-	
-	private Map<String, Map<String, Long>> counters = new TreeMap<String, Map<String, Long>>();
-
-	public Map<String, Map<String, Long>> getCounters() {
-		return counters;
-	}
-
-	public void setCounters(Map<String, Map<String, Long>> counters) {
-		this.counters = counters;
-	}
-	
-	public String toString(){
-		return counters.toString();
-	}
-}



[46/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/web.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/web.xml b/eagle-assembly/src/main/lib/tomcat/conf/web.xml
deleted file mode 100644
index ecaa1a6..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/web.xml
+++ /dev/null
@@ -1,4614 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
-  version="3.0">
-
-  <!-- ======================== Introduction ============================== -->
-  <!-- This document defines default values for *all* web applications      -->
-  <!-- loaded into this instance of Tomcat.  As each application is         -->
-  <!-- deployed, this file is processed, followed by the                    -->
-  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->
-  <!-- applications.                                                        -->
-  <!--                                                                      -->
-  <!-- WARNING:  Do not configure application-specific resources here!      -->
-  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->
-
-
-  <!-- ================== Built In Servlet Definitions ==================== -->
-
-
-  <!-- The default servlet for all web applications, that serves static     -->
-  <!-- resources.  It processes all requests that are not mapped to other   -->
-  <!-- servlets with servlet mappings (defined either here or in your own   -->
-  <!-- web.xml file).  This servlet supports the following initialization   -->
-  <!-- parameters (default values are in square brackets):                  -->
-  <!--                                                                      -->
-  <!--   debug               Debugging detail level for messages logged     -->
-  <!--                       by this servlet.  [0]                          -->
-  <!--                                                                      -->
-  <!--   fileEncoding        Encoding to be used to read static resources   -->
-  <!--                       [platform default]                             -->
-  <!--                                                                      -->
-  <!--   input               Input buffer size (in bytes) when reading      -->
-  <!--                       resources to be served.  [2048]                -->
-  <!--                                                                      -->
-  <!--   listings            Should directory listings be produced if there -->
-  <!--                       is no welcome file in this directory?  [false] -->
-  <!--                       WARNING: Listings for directories with many    -->
-  <!--                       entries can be slow and may consume            -->
-  <!--                       significant proportions of server resources.   -->
-  <!--                                                                      -->
-  <!--   output              Output buffer size (in bytes) when writing     -->
-  <!--                       resources to be served.  [2048]                -->
-  <!--                                                                      -->
-  <!--   readonly            Is this context "read only", so HTTP           -->
-  <!--                       commands like PUT and DELETE are               -->
-  <!--                       rejected?  [true]                              -->
-  <!--                                                                      -->
-  <!--   readmeFile          File to display together with the directory    -->
-  <!--                       contents. [null]                               -->
-  <!--                                                                      -->
-  <!--   sendfileSize        If the connector used supports sendfile, this  -->
-  <!--                       represents the minimal file size in KB for     -->
-  <!--                       which sendfile will be used. Use a negative    -->
-  <!--                       value to always disable sendfile.  [48]        -->
-  <!--                                                                      -->
-  <!--   useAcceptRanges     Should the Accept-Ranges header be included    -->
-  <!--                       in responses where appropriate? [true]         -->
-  <!--                                                                      -->
-  <!--  For directory listing customization. Checks localXsltFile, then     -->
-  <!--  globalXsltFile, then defaults to original behavior.                 -->
-  <!--                                                                      -->
-  <!--   localXsltFile       Make directory listings an XML doc and         -->
-  <!--                       pass the result to this style sheet residing   -->
-  <!--                       in that directory. This overrides              -->
-  <!--                       contextXsltFile and globalXsltFile[null]       -->
-  <!--                                                                      -->
-  <!--   contextXsltFile     Make directory listings an XML doc and         -->
-  <!--                       pass the result to this style sheet which is   -->
-  <!--                       relative to the context root. This overrides   -->
-  <!--                       globalXsltFile[null]                           -->
-  <!--                                                                      -->
-  <!--   globalXsltFile      Site wide configuration version of             -->
-  <!--                       localXsltFile. This argument must either be an -->
-  <!--                       absolute or relative (to either                -->
-  <!--                       $CATALINA_BASE/conf or $CATALINA_HOME/conf)    -->
-  <!--                       path that points to a location below either    -->
-  <!--                       $CATALINA_BASE/conf (checked first) or         -->
-  <!--                       $CATALINA_HOME/conf (checked second).[null]    -->
-  <!--                                                                      -->
-  <!--   showServerInfo      Should server information be presented in the  -->
-  <!--                       response sent to clients when directory        -->
-  <!--                       listings is enabled? [true]                    -->
-
-    <servlet>
-        <servlet-name>default</servlet-name>
-        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
-        <init-param>
-            <param-name>debug</param-name>
-            <param-value>0</param-value>
-        </init-param>
-        <init-param>
-            <param-name>listings</param-name>
-            <param-value>false</param-value>
-        </init-param>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-
-
-  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
-  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->
-  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->
-  <!-- following initialization parameters (default values are in square    -->
-  <!-- brackets):                                                           -->
-  <!--                                                                      -->
-  <!--   checkInterval       If development is false and checkInterval is   -->
-  <!--                       greater than zero, background compilations are -->
-  <!--                       enabled. checkInterval is the time in seconds  -->
-  <!--                       between checks to see if a JSP page (and its   -->
-  <!--                       dependent files) needs to  be recompiled. [0]  -->
-  <!--                                                                      -->
-  <!--   classdebuginfo      Should the class file be compiled with         -->
-  <!--                       debugging information?  [true]                 -->
-  <!--                                                                      -->
-  <!--   classpath           What class path should I use while compiling   -->
-  <!--                       generated servlets?  [Created dynamically      -->
-  <!--                       based on the current web application]          -->
-  <!--                                                                      -->
-  <!--   compiler            Which compiler Ant should use to compile JSP   -->
-  <!--                       pages.  See the jasper documentation for more  -->
-  <!--                       information.                                   -->
-  <!--                                                                      -->
-  <!--   compilerSourceVM    Compiler source VM. [1.6]                      -->
-  <!--                                                                      -->
-  <!--   compilerTargetVM    Compiler target VM. [1.6]                      -->
-  <!--                                                                      -->
-  <!--   development         Is Jasper used in development mode? If true,   -->
-  <!--                       the frequency at which JSPs are checked for    -->
-  <!--                       modification may be specified via the          -->
-  <!--                       modificationTestInterval parameter. [true]     -->
-  <!--                                                                      -->
-  <!--   displaySourceFragment                                              -->
-  <!--                       Should a source fragment be included in        -->
-  <!--                       exception messages? [true]                     -->
-  <!--                                                                      -->
-  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
-  <!--                       dumped to a file? [false]                      -->
-  <!--                       False if suppressSmap is true                  -->
-  <!--                                                                      -->
-  <!--   enablePooling       Determines whether tag handler pooling is      -->
-  <!--                       enabled. This is a compilation option. It will -->
-  <!--                       not alter the behaviour of JSPs that have      -->
-  <!--                       already been compiled. [true]                  -->
-  <!--                                                                      -->
-  <!--   engineOptionsClass  Allows specifying the Options class used to    -->
-  <!--                       configure Jasper. If not present, the default  -->
-  <!--                       EmbeddedServletOptions will be used.           -->
-  <!--                                                                      -->
-  <!--   errorOnUseBeanInvalidClassAttribute                                -->
-  <!--                       Should Jasper issue an error when the value of -->
-  <!--                       the class attribute in an useBean action is    -->
-  <!--                       not a valid bean class?  [true]                -->
-  <!--                                                                      -->
-  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
-  <!--                       a separate JVM is used for JSP page compiles   -->
-  <!--                       from the one Tomcat is running in. [true]      -->
-  <!--                                                                      -->
-  <!--   genStringAsCharArray                                               -->
-  <!--                       Should text strings be generated as char       -->
-  <!--                       arrays, to improve performance in some cases?  -->
-  <!--                       [false]                                        -->
-  <!--                                                                      -->
-  <!--   ieClassId           The class-id value to be sent to Internet      -->
-  <!--                       Explorer when using <jsp:plugin> tags.         -->
-  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
-  <!--                                                                      -->
-  <!--   javaEncoding        Java file encoding to use for generating java  -->
-  <!--                       source files. [UTF8]                           -->
-  <!--                                                                      -->
-  <!--   keepgenerated       Should we keep the generated Java source code  -->
-  <!--                       for each page instead of deleting it? [true]   -->
-  <!--                                                                      -->
-  <!--   mappedfile          Should we generate static content with one     -->
-  <!--                       print statement per input line, to ease        -->
-  <!--                       debugging?  [true]                             -->
-  <!--                                                                      -->
-  <!--   maxLoadedJsps       The maximum number of JSPs that will be loaded -->
-  <!--                       for a web application. If more than this       -->
-  <!--                       number of JSPs are loaded, the least recently  -->
-  <!--                       used JSPs will be unloaded so that the number  -->
-  <!--                       of JSPs loaded at any one time does not exceed -->
-  <!--                       this limit. A value of zero or less indicates  -->
-  <!--                       no limit. [-1]                                 -->
-  <!--                                                                      -->
-  <!--   jspIdleTimeout      The amount of time in seconds a JSP can be     -->
-  <!--                       idle before it is unloaded. A value of zero    -->
-  <!--                       or less indicates never unload. [-1]           -->
-  <!--                                                                      -->
-  <!--   modificationTestInterval                                           -->
-  <!--                       Causes a JSP (and its dependent files) to not  -->
-  <!--                       be checked for modification during the         -->
-  <!--                       specified time interval (in seconds) from the  -->
-  <!--                       last time the JSP was checked for              -->
-  <!--                       modification. A value of 0 will cause the JSP  -->
-  <!--                       to be checked on every access.                 -->
-  <!--                       Used in development mode only. [4]             -->
-  <!--                                                                      -->
-  <!--   recompileOnFail     If a JSP compilation fails should the          -->
-  <!--                       modificationTestInterval be ignored and the    -->
-  <!--                       next access trigger a re-compilation attempt?  -->
-  <!--                       Used in development mode only and is disabled  -->
-  <!--                       by default as compilation may be expensive and -->
-  <!--                       could lead to excessive resource usage.        -->
-  <!--                       [false]                                        -->
-  <!--                                                                      -->
-  <!--   scratchdir          What scratch directory should we use when      -->
-  <!--                       compiling JSP pages?  [default work directory  -->
-  <!--                       for the current web application]               -->
-  <!--                                                                      -->
-  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
-  <!--                       debugging be suppressed?  [false]              -->
-  <!--                                                                      -->
-  <!--   trimSpaces          Should white spaces in template text between   -->
-  <!--                       actions or directives be trimmed?  [false]     -->
-  <!--                                                                      -->
-  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
-  <!--                       header is added by generated servlet.  [false] -->
-
-    <servlet>
-        <servlet-name>jsp</servlet-name>
-        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
-        <init-param>
-            <param-name>fork</param-name>
-            <param-value>false</param-value>
-        </init-param>
-        <init-param>
-            <param-name>xpoweredBy</param-name>
-            <param-value>false</param-value>
-        </init-param>
-        <load-on-startup>3</load-on-startup>
-    </servlet>
-
-
-  <!-- NOTE: An SSI Filter is also available as an alternative SSI          -->
-  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
-  <!--                                                                      -->
-  <!-- Server Side Includes processing servlet, which processes SSI         -->
-  <!-- directives in HTML pages consistent with similar support in web      -->
-  <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->
-  <!-- URL pattern "*.shtml".  This servlet supports the following          -->
-  <!-- initialization parameters (default values are in square brackets):   -->
-  <!--                                                                      -->
-  <!--   buffered            Should output from this servlet be buffered?   -->
-  <!--                       (0=false, 1=true)  [0]                         -->
-  <!--                                                                      -->
-  <!--   debug               Debugging detail level for messages logged     -->
-  <!--                       by this servlet.  [0]                          -->
-  <!--                                                                      -->
-  <!--   expires             The number of seconds before a page with SSI   -->
-  <!--                       directives will expire.  [No default]          -->
-  <!--                                                                      -->
-  <!--   isVirtualWebappRelative                                            -->
-  <!--                       Should "virtual" paths be interpreted as       -->
-  <!--                       relative to the context root, instead of       -->
-  <!--                       the server root? [false]                       -->
-  <!--                                                                      -->
-  <!--   inputEncoding       The encoding to assume for SSI resources if    -->
-  <!--                       one is not available from the resource.        -->
-  <!--                       [Platform default]                             -->
-  <!--                                                                      -->
-  <!--   outputEncoding      The encoding to use for the page that results  -->
-  <!--                       from the SSI processing. [UTF-8]               -->
-  <!--                                                                      -->
-  <!--   allowExec           Is use of the exec command enabled? [false]    -->
-
-<!--
-    <servlet>
-        <servlet-name>ssi</servlet-name>
-        <servlet-class>
-          org.apache.catalina.ssi.SSIServlet
-        </servlet-class>
-        <init-param>
-          <param-name>buffered</param-name>
-          <param-value>1</param-value>
-        </init-param>
-        <init-param>
-          <param-name>debug</param-name>
-          <param-value>0</param-value>
-        </init-param>
-        <init-param>
-          <param-name>expires</param-name>
-          <param-value>666</param-value>
-        </init-param>
-        <init-param>
-          <param-name>isVirtualWebappRelative</param-name>
-          <param-value>false</param-value>
-        </init-param>
-        <load-on-startup>4</load-on-startup>
-    </servlet>
--->
-
-
-  <!-- Common Gateway Includes (CGI) processing servlet, which supports     -->
-  <!-- execution of external applications that conform to the CGI spec      -->
-  <!-- requirements.  Typically, this servlet is mapped to the URL pattern  -->
-  <!-- "/cgi-bin/*", which means that any CGI applications that are         -->
-  <!-- executed must be present within the web application.  This servlet   -->
-  <!-- supports the following initialization parameters (default values     -->
-  <!-- are in square brackets):                                             -->
-  <!--                                                                      -->
-  <!--   cgiPathPrefix        The CGI search path will start at             -->
-  <!--                        webAppRootDir + File.separator + this prefix. -->
-  <!--                        If not set, then webAppRootDir is used.       -->
-  <!--                        Recommended value: WEB-INF/cgi                -->
-  <!--                                                                      -->
-  <!--   debug                Debugging detail level for messages logged    -->
-  <!--                        by this servlet.  [0]                         -->
-  <!--                                                                      -->
-  <!--   executable           Name of the executable used to run the        -->
-  <!--                        script. [perl]                                -->
-  <!--                                                                      -->
-  <!--   parameterEncoding    Name of parameter encoding to be used with    -->
-  <!--                        CGI servlet.                                  -->
-  <!--                        [System.getProperty("file.encoding","UTF-8")] -->
-  <!--                                                                      -->
-  <!--   passShellEnvironment Should the shell environment variables (if    -->
-  <!--                        any) be passed to the CGI script? [false]     -->
-  <!--                                                                      -->
-  <!--   stderrTimeout        The time (in milliseconds) to wait for the    -->
-  <!--                        reading of stderr to complete before          -->
-  <!--                        terminating the CGI process. [2000]           -->
-
-<!--
-    <servlet>
-        <servlet-name>cgi</servlet-name>
-        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
-        <init-param>
-          <param-name>debug</param-name>
-          <param-value>0</param-value>
-        </init-param>
-        <init-param>
-          <param-name>cgiPathPrefix</param-name>
-          <param-value>WEB-INF/cgi</param-value>
-        </init-param>
-         <load-on-startup>5</load-on-startup>
-    </servlet>
--->
-
-
-  <!-- ================ Built In Servlet Mappings ========================= -->
-
-
-  <!-- The servlet mappings for the built in servlets defined above.  Note  -->
-  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You    -->
-  <!-- must uncomment these mappings (or add them to your application's own -->
-  <!-- web.xml deployment descriptor) to enable these services              -->
-
-    <!-- The mapping for the default servlet -->
-    <servlet-mapping>
-        <servlet-name>default</servlet-name>
-        <url-pattern>/</url-pattern>
-    </servlet-mapping>
-
-    <!-- The mappings for the JSP servlet -->
-    <servlet-mapping>
-        <servlet-name>jsp</servlet-name>
-        <url-pattern>*.jsp</url-pattern>
-        <url-pattern>*.jspx</url-pattern>
-    </servlet-mapping>
-
-    <!-- The mapping for the SSI servlet -->
-<!--
-    <servlet-mapping>
-        <servlet-name>ssi</servlet-name>
-        <url-pattern>*.shtml</url-pattern>
-    </servlet-mapping>
--->
-
-    <!-- The mapping for the CGI Gateway servlet -->
-
-<!--
-    <servlet-mapping>
-        <servlet-name>cgi</servlet-name>
-        <url-pattern>/cgi-bin/*</url-pattern>
-    </servlet-mapping>
--->
-
-
-  <!-- ================== Built In Filter Definitions ===================== -->
-
-  <!-- A filter that sets character encoding that is used to decode -->
-  <!-- parameters in a POST request -->
-<!--
-    <filter>
-        <filter-name>setCharacterEncodingFilter</filter-name>
-        <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
-        <init-param>
-            <param-name>encoding</param-name>
-            <param-value>UTF-8</param-value>
-        </init-param>
-        <async-supported>true</async-supported>
-    </filter>
--->
-
-  <!-- A filter that triggers request parameters parsing and rejects the    -->
-  <!-- request if some parameters were skipped because of parsing errors or -->
-  <!-- request size limitations.                                            -->
-<!--
-    <filter>
-        <filter-name>failedRequestFilter</filter-name>
-        <filter-class>
-          org.apache.catalina.filters.FailedRequestFilter
-        </filter-class>
-        <async-supported>true</async-supported>
-    </filter>
--->
-
-
-  <!-- NOTE: An SSI Servlet is also available as an alternative SSI         -->
-  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
-  <!--                                                                      -->
-  <!-- Server Side Includes processing filter, which processes SSI          -->
-  <!-- directives in HTML pages consistent with similar support in web      -->
-  <!-- servers like Apache.  Traditionally, this filter is mapped to the    -->
-  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will     -->
-  <!-- selectively enable/disable SSI processing based on mime types. For   -->
-  <!-- this to work you will need to uncomment the .shtml mime type         -->
-  <!-- definition towards the bottom of this file.                          -->
-  <!-- The contentType init param allows you to apply SSI processing to JSP -->
-  <!-- pages, javascript, or any other content you wish.  This filter       -->
-  <!-- supports the following initialization parameters (default values are -->
-  <!-- in square brackets):                                                 -->
-  <!--                                                                      -->
-  <!--   contentType         A regex pattern that must be matched before    -->
-  <!--                       SSI processing is applied.                     -->
-  <!--                       [text/x-server-parsed-html(;.*)?]              -->
-  <!--                                                                      -->
-  <!--   debug               Debugging detail level for messages logged     -->
-  <!--                       by this servlet.  [0]                          -->
-  <!--                                                                      -->
-  <!--   expires             The number of seconds before a page with SSI   -->
-  <!--                       directives will expire.  [No default]          -->
-  <!--                                                                      -->
-  <!--   isVirtualWebappRelative                                            -->
-  <!--                       Should "virtual" paths be interpreted as       -->
-  <!--                       relative to the context root, instead of       -->
-  <!--                       the server root? [false]                       -->
-  <!--                                                                      -->
-  <!--   allowExec           Is use of the exec command enabled? [false]    -->
-
-<!--
-    <filter>
-        <filter-name>ssi</filter-name>
-        <filter-class>
-          org.apache.catalina.ssi.SSIFilter
-        </filter-class>
-        <init-param>
-          <param-name>contentType</param-name>
-          <param-value>text/x-server-parsed-html(;.*)?</param-value>
-        </init-param>
-        <init-param>
-          <param-name>debug</param-name>
-          <param-value>0</param-value>
-        </init-param>
-        <init-param>
-          <param-name>expires</param-name>
-          <param-value>666</param-value>
-        </init-param>
-        <init-param>
-          <param-name>isVirtualWebappRelative</param-name>
-          <param-value>false</param-value>
-        </init-param>
-    </filter>
--->
-
-
-  <!-- ==================== Built In Filter Mappings ====================== -->
-
-  <!-- The mapping for the Set Character Encoding Filter -->
-<!--
-    <filter-mapping>
-        <filter-name>setCharacterEncodingFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
--->
-
-  <!-- The mapping for the Failed Request Filter -->
-<!--
-    <filter-mapping>
-        <filter-name>failedRequestFilter</filter-name>
-        <url-pattern>/*</url-pattern>
-    </filter-mapping>
--->
-
-  <!-- The mapping for the SSI Filter -->
-<!--
-    <filter-mapping>
-        <filter-name>ssi</filter-name>
-        <url-pattern>*.shtml</url-pattern>
-    </filter-mapping>
--->
-
-
-  <!-- ==================== Default Session Configuration ================= -->
-  <!-- You can set the default session timeout (in minutes) for all newly   -->
-  <!-- created sessions by modifying the value below.                       -->
-
-    <session-config>
-        <session-timeout>30</session-timeout>
-    </session-config>
-
-
-  <!-- ===================== Default MIME Type Mappings =================== -->
-  <!-- When serving static resources, Tomcat will automatically generate    -->
-  <!-- a "Content-Type" header based on the resource's filename extension,  -->
-  <!-- based on these mappings.  Additional mappings can be added here (to  -->
-  <!-- apply to all web applications), or in your own application's web.xml -->
-  <!-- deployment descriptor.                                               -->
-
-    <mime-mapping>
-        <extension>123</extension>
-        <mime-type>application/vnd.lotus-1-2-3</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>3dml</extension>
-        <mime-type>text/vnd.in3d.3dml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>3ds</extension>
-        <mime-type>image/x-3ds</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>3g2</extension>
-        <mime-type>video/3gpp2</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>3gp</extension>
-        <mime-type>video/3gpp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>7z</extension>
-        <mime-type>application/x-7z-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aab</extension>
-        <mime-type>application/x-authorware-bin</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aac</extension>
-        <mime-type>audio/x-aac</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aam</extension>
-        <mime-type>application/x-authorware-map</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aas</extension>
-        <mime-type>application/x-authorware-seg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>abs</extension>
-        <mime-type>audio/x-mpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>abw</extension>
-        <mime-type>application/x-abiword</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ac</extension>
-        <mime-type>application/pkix-attr-cert</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>acc</extension>
-        <mime-type>application/vnd.americandynamics.acc</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ace</extension>
-        <mime-type>application/x-ace-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>acu</extension>
-        <mime-type>application/vnd.acucobol</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>acutc</extension>
-        <mime-type>application/vnd.acucorp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>adp</extension>
-        <mime-type>audio/adpcm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aep</extension>
-        <mime-type>application/vnd.audiograph</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>afm</extension>
-        <mime-type>application/x-font-type1</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>afp</extension>
-        <mime-type>application/vnd.ibm.modcap</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ahead</extension>
-        <mime-type>application/vnd.ahead.space</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ai</extension>
-        <mime-type>application/postscript</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aif</extension>
-        <mime-type>audio/x-aiff</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aifc</extension>
-        <mime-type>audio/x-aiff</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aiff</extension>
-        <mime-type>audio/x-aiff</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aim</extension>
-        <mime-type>application/x-aim</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>air</extension>
-        <mime-type>application/vnd.adobe.air-application-installer-package+zip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ait</extension>
-        <mime-type>application/vnd.dvb.ait</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ami</extension>
-        <mime-type>application/vnd.amiga.ami</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>anx</extension>
-        <mime-type>application/annodex</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>apk</extension>
-        <mime-type>application/vnd.android.package-archive</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>appcache</extension>
-        <mime-type>text/cache-manifest</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>application</extension>
-        <mime-type>application/x-ms-application</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>apr</extension>
-        <mime-type>application/vnd.lotus-approach</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>arc</extension>
-        <mime-type>application/x-freearc</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>art</extension>
-        <mime-type>image/x-jg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>asc</extension>
-        <mime-type>application/pgp-signature</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>asf</extension>
-        <mime-type>video/x-ms-asf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>asm</extension>
-        <mime-type>text/x-asm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aso</extension>
-        <mime-type>application/vnd.accpac.simply.aso</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>asx</extension>
-        <mime-type>video/x-ms-asf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>atc</extension>
-        <mime-type>application/vnd.acucorp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>atom</extension>
-        <mime-type>application/atom+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>atomcat</extension>
-        <mime-type>application/atomcat+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>atomsvc</extension>
-        <mime-type>application/atomsvc+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>atx</extension>
-        <mime-type>application/vnd.antix.game-component</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>au</extension>
-        <mime-type>audio/basic</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>avi</extension>
-        <mime-type>video/x-msvideo</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>avx</extension>
-        <mime-type>video/x-rad-screenplay</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>aw</extension>
-        <mime-type>application/applixware</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>axa</extension>
-        <mime-type>audio/annodex</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>axv</extension>
-        <mime-type>video/annodex</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>azf</extension>
-        <mime-type>application/vnd.airzip.filesecure.azf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>azs</extension>
-        <mime-type>application/vnd.airzip.filesecure.azs</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>azw</extension>
-        <mime-type>application/vnd.amazon.ebook</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bat</extension>
-        <mime-type>application/x-msdownload</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bcpio</extension>
-        <mime-type>application/x-bcpio</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bdf</extension>
-        <mime-type>application/x-font-bdf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bdm</extension>
-        <mime-type>application/vnd.syncml.dm+wbxml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bed</extension>
-        <mime-type>application/vnd.realvnc.bed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bh2</extension>
-        <mime-type>application/vnd.fujitsu.oasysprs</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bin</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>blb</extension>
-        <mime-type>application/x-blorb</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>blorb</extension>
-        <mime-type>application/x-blorb</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bmi</extension>
-        <mime-type>application/vnd.bmi</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bmp</extension>
-        <mime-type>image/bmp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>body</extension>
-        <mime-type>text/html</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>book</extension>
-        <mime-type>application/vnd.framemaker</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>box</extension>
-        <mime-type>application/vnd.previewsystems.box</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>boz</extension>
-        <mime-type>application/x-bzip2</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bpk</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>btif</extension>
-        <mime-type>image/prs.btif</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bz</extension>
-        <mime-type>application/x-bzip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>bz2</extension>
-        <mime-type>application/x-bzip2</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c11amc</extension>
-        <mime-type>application/vnd.cluetrust.cartomobile-config</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c11amz</extension>
-        <mime-type>application/vnd.cluetrust.cartomobile-config-pkg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c4d</extension>
-        <mime-type>application/vnd.clonk.c4group</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c4f</extension>
-        <mime-type>application/vnd.clonk.c4group</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c4g</extension>
-        <mime-type>application/vnd.clonk.c4group</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c4p</extension>
-        <mime-type>application/vnd.clonk.c4group</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>c4u</extension>
-        <mime-type>application/vnd.clonk.c4group</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cab</extension>
-        <mime-type>application/vnd.ms-cab-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>caf</extension>
-        <mime-type>audio/x-caf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cap</extension>
-        <mime-type>application/vnd.tcpdump.pcap</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>car</extension>
-        <mime-type>application/vnd.curl.car</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cat</extension>
-        <mime-type>application/vnd.ms-pki.seccat</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cb7</extension>
-        <mime-type>application/x-cbr</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cba</extension>
-        <mime-type>application/x-cbr</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cbr</extension>
-        <mime-type>application/x-cbr</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cbt</extension>
-        <mime-type>application/x-cbr</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cbz</extension>
-        <mime-type>application/x-cbr</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cc</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cct</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ccxml</extension>
-        <mime-type>application/ccxml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdbcmsg</extension>
-        <mime-type>application/vnd.contact.cmsg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdf</extension>
-        <mime-type>application/x-cdf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdkey</extension>
-        <mime-type>application/vnd.mediastation.cdkey</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdmia</extension>
-        <mime-type>application/cdmi-capability</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdmic</extension>
-        <mime-type>application/cdmi-container</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdmid</extension>
-        <mime-type>application/cdmi-domain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdmio</extension>
-        <mime-type>application/cdmi-object</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdmiq</extension>
-        <mime-type>application/cdmi-queue</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdx</extension>
-        <mime-type>chemical/x-cdx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdxml</extension>
-        <mime-type>application/vnd.chemdraw+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cdy</extension>
-        <mime-type>application/vnd.cinderella</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cer</extension>
-        <mime-type>application/pkix-cert</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cfs</extension>
-        <mime-type>application/x-cfs-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cgm</extension>
-        <mime-type>image/cgm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>chat</extension>
-        <mime-type>application/x-chat</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>chm</extension>
-        <mime-type>application/vnd.ms-htmlhelp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>chrt</extension>
-        <mime-type>application/vnd.kde.kchart</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cif</extension>
-        <mime-type>chemical/x-cif</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cii</extension>
-        <mime-type>application/vnd.anser-web-certificate-issue-initiation</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cil</extension>
-        <mime-type>application/vnd.ms-artgalry</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cla</extension>
-        <mime-type>application/vnd.claymore</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>class</extension>
-        <mime-type>application/java</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clkk</extension>
-        <mime-type>application/vnd.crick.clicker.keyboard</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clkp</extension>
-        <mime-type>application/vnd.crick.clicker.palette</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clkt</extension>
-        <mime-type>application/vnd.crick.clicker.template</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clkw</extension>
-        <mime-type>application/vnd.crick.clicker.wordbank</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clkx</extension>
-        <mime-type>application/vnd.crick.clicker</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>clp</extension>
-        <mime-type>application/x-msclip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cmc</extension>
-        <mime-type>application/vnd.cosmocaller</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cmdf</extension>
-        <mime-type>chemical/x-cmdf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cml</extension>
-        <mime-type>chemical/x-cml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cmp</extension>
-        <mime-type>application/vnd.yellowriver-custom-menu</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cmx</extension>
-        <mime-type>image/x-cmx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cod</extension>
-        <mime-type>application/vnd.rim.cod</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>com</extension>
-        <mime-type>application/x-msdownload</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>conf</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cpio</extension>
-        <mime-type>application/x-cpio</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cpp</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cpt</extension>
-        <mime-type>application/mac-compactpro</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>crd</extension>
-        <mime-type>application/x-mscardfile</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>crl</extension>
-        <mime-type>application/pkix-crl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>crt</extension>
-        <mime-type>application/x-x509-ca-cert</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cryptonote</extension>
-        <mime-type>application/vnd.rig.cryptonote</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>csh</extension>
-        <mime-type>application/x-csh</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>csml</extension>
-        <mime-type>chemical/x-csml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>csp</extension>
-        <mime-type>application/vnd.commonspace</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>css</extension>
-        <mime-type>text/css</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cst</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>csv</extension>
-        <mime-type>text/csv</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cu</extension>
-        <mime-type>application/cu-seeme</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>curl</extension>
-        <mime-type>text/vnd.curl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cww</extension>
-        <mime-type>application/prs.cww</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cxt</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>cxx</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dae</extension>
-        <mime-type>model/vnd.collada+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>daf</extension>
-        <mime-type>application/vnd.mobius.daf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dart</extension>
-        <mime-type>application/vnd.dart</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dataless</extension>
-        <mime-type>application/vnd.fdsn.seed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>davmount</extension>
-        <mime-type>application/davmount+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dbk</extension>
-        <mime-type>application/docbook+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dcr</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dcurl</extension>
-        <mime-type>text/vnd.curl.dcurl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dd2</extension>
-        <mime-type>application/vnd.oma.dd2+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ddd</extension>
-        <mime-type>application/vnd.fujixerox.ddd</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>deb</extension>
-        <mime-type>application/x-debian-package</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>def</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>deploy</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>der</extension>
-        <mime-type>application/x-x509-ca-cert</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dfac</extension>
-        <mime-type>application/vnd.dreamfactory</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dgc</extension>
-        <mime-type>application/x-dgc-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dib</extension>
-        <mime-type>image/bmp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dic</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dir</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dis</extension>
-        <mime-type>application/vnd.mobius.dis</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dist</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>distz</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>djv</extension>
-        <mime-type>image/vnd.djvu</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>djvu</extension>
-        <mime-type>image/vnd.djvu</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dll</extension>
-        <mime-type>application/x-msdownload</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dmg</extension>
-        <mime-type>application/x-apple-diskimage</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dmp</extension>
-        <mime-type>application/vnd.tcpdump.pcap</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dms</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dna</extension>
-        <mime-type>application/vnd.dna</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>doc</extension>
-        <mime-type>application/msword</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>docm</extension>
-        <mime-type>application/vnd.ms-word.document.macroenabled.12</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>docx</extension>
-        <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dot</extension>
-        <mime-type>application/msword</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dotm</extension>
-        <mime-type>application/vnd.ms-word.template.macroenabled.12</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dotx</extension>
-        <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.template</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dp</extension>
-        <mime-type>application/vnd.osgi.dp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dpg</extension>
-        <mime-type>application/vnd.dpgraph</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dra</extension>
-        <mime-type>audio/vnd.dra</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dsc</extension>
-        <mime-type>text/prs.lines.tag</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dssc</extension>
-        <mime-type>application/dssc+der</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dtb</extension>
-        <mime-type>application/x-dtbook+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dtd</extension>
-        <mime-type>application/xml-dtd</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dts</extension>
-        <mime-type>audio/vnd.dts</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dtshd</extension>
-        <mime-type>audio/vnd.dts.hd</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dump</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dv</extension>
-        <mime-type>video/x-dv</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dvb</extension>
-        <mime-type>video/vnd.dvb.file</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dvi</extension>
-        <mime-type>application/x-dvi</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dwf</extension>
-        <mime-type>model/vnd.dwf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dwg</extension>
-        <mime-type>image/vnd.dwg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dxf</extension>
-        <mime-type>image/vnd.dxf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dxp</extension>
-        <mime-type>application/vnd.spotfire.dxp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>dxr</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ecelp4800</extension>
-        <mime-type>audio/vnd.nuera.ecelp4800</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ecelp7470</extension>
-        <mime-type>audio/vnd.nuera.ecelp7470</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ecelp9600</extension>
-        <mime-type>audio/vnd.nuera.ecelp9600</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ecma</extension>
-        <mime-type>application/ecmascript</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>edm</extension>
-        <mime-type>application/vnd.novadigm.edm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>edx</extension>
-        <mime-type>application/vnd.novadigm.edx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>efif</extension>
-        <mime-type>application/vnd.picsel</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ei6</extension>
-        <mime-type>application/vnd.pg.osasli</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>elc</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>emf</extension>
-        <mime-type>application/x-msmetafile</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>eml</extension>
-        <mime-type>message/rfc822</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>emma</extension>
-        <mime-type>application/emma+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>emz</extension>
-        <mime-type>application/x-msmetafile</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>eol</extension>
-        <mime-type>audio/vnd.digital-winds</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>eot</extension>
-        <mime-type>application/vnd.ms-fontobject</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>eps</extension>
-        <mime-type>application/postscript</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>epub</extension>
-        <mime-type>application/epub+zip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>es3</extension>
-        <mime-type>application/vnd.eszigno3+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>esa</extension>
-        <mime-type>application/vnd.osgi.subsystem</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>esf</extension>
-        <mime-type>application/vnd.epson.esf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>et3</extension>
-        <mime-type>application/vnd.eszigno3+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>etx</extension>
-        <mime-type>text/x-setext</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>eva</extension>
-        <mime-type>application/x-eva</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>evy</extension>
-        <mime-type>application/x-envoy</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>exe</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>exi</extension>
-        <mime-type>application/exi</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ext</extension>
-        <mime-type>application/vnd.novadigm.ext</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ez</extension>
-        <mime-type>application/andrew-inset</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ez2</extension>
-        <mime-type>application/vnd.ezpix-album</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ez3</extension>
-        <mime-type>application/vnd.ezpix-package</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>f</extension>
-        <mime-type>text/x-fortran</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>f4v</extension>
-        <mime-type>video/x-f4v</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>f77</extension>
-        <mime-type>text/x-fortran</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>f90</extension>
-        <mime-type>text/x-fortran</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fbs</extension>
-        <mime-type>image/vnd.fastbidsheet</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fcdt</extension>
-        <mime-type>application/vnd.adobe.formscentral.fcdt</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fcs</extension>
-        <mime-type>application/vnd.isac.fcs</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fdf</extension>
-        <mime-type>application/vnd.fdf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fe_launch</extension>
-        <mime-type>application/vnd.denovo.fcselayout-link</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fg5</extension>
-        <mime-type>application/vnd.fujitsu.oasysgp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fgd</extension>
-        <mime-type>application/x-director</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fh</extension>
-        <mime-type>image/x-freehand</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fh4</extension>
-        <mime-type>image/x-freehand</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fh5</extension>
-        <mime-type>image/x-freehand</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fh7</extension>
-        <mime-type>image/x-freehand</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fhc</extension>
-        <mime-type>image/x-freehand</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fig</extension>
-        <mime-type>application/x-xfig</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>flac</extension>
-        <mime-type>audio/flac</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fli</extension>
-        <mime-type>video/x-fli</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>flo</extension>
-        <mime-type>application/vnd.micrografx.flo</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>flv</extension>
-        <mime-type>video/x-flv</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>flw</extension>
-        <mime-type>application/vnd.kde.kivio</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>flx</extension>
-        <mime-type>text/vnd.fmi.flexstor</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fly</extension>
-        <mime-type>text/vnd.fly</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fm</extension>
-        <mime-type>application/vnd.framemaker</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fnc</extension>
-        <mime-type>application/vnd.frogans.fnc</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>for</extension>
-        <mime-type>text/x-fortran</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fpx</extension>
-        <mime-type>image/vnd.fpx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>frame</extension>
-        <mime-type>application/vnd.framemaker</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fsc</extension>
-        <mime-type>application/vnd.fsc.weblaunch</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fst</extension>
-        <mime-type>image/vnd.fst</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ftc</extension>
-        <mime-type>application/vnd.fluxtime.clip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fti</extension>
-        <mime-type>application/vnd.anser-web-funds-transfer-initiation</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fvt</extension>
-        <mime-type>video/vnd.fvt</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fxp</extension>
-        <mime-type>application/vnd.adobe.fxp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fxpl</extension>
-        <mime-type>application/vnd.adobe.fxp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>fzs</extension>
-        <mime-type>application/vnd.fuzzysheet</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>g2w</extension>
-        <mime-type>application/vnd.geoplan</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>g3</extension>
-        <mime-type>image/g3fax</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>g3w</extension>
-        <mime-type>application/vnd.geospace</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gac</extension>
-        <mime-type>application/vnd.groove-account</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gam</extension>
-        <mime-type>application/x-tads</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gbr</extension>
-        <mime-type>application/rpki-ghostbusters</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gca</extension>
-        <mime-type>application/x-gca-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gdl</extension>
-        <mime-type>model/vnd.gdl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>geo</extension>
-        <mime-type>application/vnd.dynageo</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gex</extension>
-        <mime-type>application/vnd.geometry-explorer</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ggb</extension>
-        <mime-type>application/vnd.geogebra.file</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ggt</extension>
-        <mime-type>application/vnd.geogebra.tool</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ghf</extension>
-        <mime-type>application/vnd.groove-help</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gif</extension>
-        <mime-type>image/gif</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gim</extension>
-        <mime-type>application/vnd.groove-identity-message</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gml</extension>
-        <mime-type>application/gml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gmx</extension>
-        <mime-type>application/vnd.gmx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gnumeric</extension>
-        <mime-type>application/x-gnumeric</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gph</extension>
-        <mime-type>application/vnd.flographit</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gpx</extension>
-        <mime-type>application/gpx+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gqf</extension>
-        <mime-type>application/vnd.grafeq</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gqs</extension>
-        <mime-type>application/vnd.grafeq</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gram</extension>
-        <mime-type>application/srgs</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gramps</extension>
-        <mime-type>application/x-gramps-xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gre</extension>
-        <mime-type>application/vnd.geometry-explorer</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>grv</extension>
-        <mime-type>application/vnd.groove-injector</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>grxml</extension>
-        <mime-type>application/srgs+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gsf</extension>
-        <mime-type>application/x-font-ghostscript</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gtar</extension>
-        <mime-type>application/x-gtar</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gtm</extension>
-        <mime-type>application/vnd.groove-tool-message</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gtw</extension>
-        <mime-type>model/vnd.gtw</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gv</extension>
-        <mime-type>text/vnd.graphviz</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gxf</extension>
-        <mime-type>application/gxf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gxt</extension>
-        <mime-type>application/vnd.geonext</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>gz</extension>
-        <mime-type>application/x-gzip</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>h</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>h261</extension>
-        <mime-type>video/h261</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>h263</extension>
-        <mime-type>video/h263</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>h264</extension>
-        <mime-type>video/h264</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hal</extension>
-        <mime-type>application/vnd.hal+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hbci</extension>
-        <mime-type>application/vnd.hbci</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hdf</extension>
-        <mime-type>application/x-hdf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hh</extension>
-        <mime-type>text/x-c</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hlp</extension>
-        <mime-type>application/winhlp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hpgl</extension>
-        <mime-type>application/vnd.hp-hpgl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hpid</extension>
-        <mime-type>application/vnd.hp-hpid</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hps</extension>
-        <mime-type>application/vnd.hp-hps</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hqx</extension>
-        <mime-type>application/mac-binhex40</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>htc</extension>
-        <mime-type>text/x-component</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>htke</extension>
-        <mime-type>application/vnd.kenameaapp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>htm</extension>
-        <mime-type>text/html</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>html</extension>
-        <mime-type>text/html</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hvd</extension>
-        <mime-type>application/vnd.yamaha.hv-dic</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hvp</extension>
-        <mime-type>application/vnd.yamaha.hv-voice</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>hvs</extension>
-        <mime-type>application/vnd.yamaha.hv-script</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>i2g</extension>
-        <mime-type>application/vnd.intergeo</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>icc</extension>
-        <mime-type>application/vnd.iccprofile</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ice</extension>
-        <mime-type>x-conference/x-cooltalk</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>icm</extension>
-        <mime-type>application/vnd.iccprofile</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ico</extension>
-        <mime-type>image/x-icon</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ics</extension>
-        <mime-type>text/calendar</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ief</extension>
-        <mime-type>image/ief</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ifb</extension>
-        <mime-type>text/calendar</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ifm</extension>
-        <mime-type>application/vnd.shana.informed.formdata</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>iges</extension>
-        <mime-type>model/iges</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>igl</extension>
-        <mime-type>application/vnd.igloader</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>igm</extension>
-        <mime-type>application/vnd.insors.igm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>igs</extension>
-        <mime-type>model/iges</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>igx</extension>
-        <mime-type>application/vnd.micrografx.igx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>iif</extension>
-        <mime-type>application/vnd.shana.informed.interchange</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>imp</extension>
-        <mime-type>application/vnd.accpac.simply.imp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ims</extension>
-        <mime-type>application/vnd.ms-ims</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>in</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ink</extension>
-        <mime-type>application/inkml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>inkml</extension>
-        <mime-type>application/inkml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>install</extension>
-        <mime-type>application/x-install-instructions</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>iota</extension>
-        <mime-type>application/vnd.astraea-software.iota</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ipfix</extension>
-        <mime-type>application/ipfix</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ipk</extension>
-        <mime-type>application/vnd.shana.informed.package</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>irm</extension>
-        <mime-type>application/vnd.ibm.rights-management</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>irp</extension>
-        <mime-type>application/vnd.irepository.package+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>iso</extension>
-        <mime-type>application/x-iso9660-image</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>itp</extension>
-        <mime-type>application/vnd.shana.informed.formtemplate</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ivp</extension>
-        <mime-type>application/vnd.immervision-ivp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ivu</extension>
-        <mime-type>application/vnd.immervision-ivu</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jad</extension>
-        <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jam</extension>
-        <mime-type>application/vnd.jam</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jar</extension>
-        <mime-type>application/java-archive</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>java</extension>
-        <mime-type>text/x-java-source</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jisp</extension>
-        <mime-type>application/vnd.jisp</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jlt</extension>
-        <mime-type>application/vnd.hp-jlyt</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jnlp</extension>
-        <mime-type>application/x-java-jnlp-file</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>joda</extension>
-        <mime-type>application/vnd.joost.joda-archive</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpe</extension>
-        <mime-type>image/jpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpeg</extension>
-        <mime-type>image/jpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpg</extension>
-        <mime-type>image/jpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpgm</extension>
-        <mime-type>video/jpm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpgv</extension>
-        <mime-type>video/jpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jpm</extension>
-        <mime-type>video/jpm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>js</extension>
-        <mime-type>application/javascript</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jsf</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>json</extension>
-        <mime-type>application/json</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jsonml</extension>
-        <mime-type>application/jsonml+json</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>jspf</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kar</extension>
-        <mime-type>audio/midi</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>karbon</extension>
-        <mime-type>application/vnd.kde.karbon</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kfo</extension>
-        <mime-type>application/vnd.kde.kformula</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kia</extension>
-        <mime-type>application/vnd.kidspiration</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kml</extension>
-        <mime-type>application/vnd.google-earth.kml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kmz</extension>
-        <mime-type>application/vnd.google-earth.kmz</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kne</extension>
-        <mime-type>application/vnd.kinar</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>knp</extension>
-        <mime-type>application/vnd.kinar</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kon</extension>
-        <mime-type>application/vnd.kde.kontour</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kpr</extension>
-        <mime-type>application/vnd.kde.kpresenter</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kpt</extension>
-        <mime-type>application/vnd.kde.kpresenter</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kpxx</extension>
-        <mime-type>application/vnd.ds-keypoint</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ksp</extension>
-        <mime-type>application/vnd.kde.kspread</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ktr</extension>
-        <mime-type>application/vnd.kahootz</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ktx</extension>
-        <mime-type>image/ktx</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ktz</extension>
-        <mime-type>application/vnd.kahootz</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kwd</extension>
-        <mime-type>application/vnd.kde.kword</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>kwt</extension>
-        <mime-type>application/vnd.kde.kword</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lasxml</extension>
-        <mime-type>application/vnd.las.las+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>latex</extension>
-        <mime-type>application/x-latex</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lbd</extension>
-        <mime-type>application/vnd.llamagraphics.life-balance.desktop</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lbe</extension>
-        <mime-type>application/vnd.llamagraphics.life-balance.exchange+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>les</extension>
-        <mime-type>application/vnd.hhe.lesson-player</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lha</extension>
-        <mime-type>application/x-lzh-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>link66</extension>
-        <mime-type>application/vnd.route66.link66+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>list</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>list3820</extension>
-        <mime-type>application/vnd.ibm.modcap</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>listafp</extension>
-        <mime-type>application/vnd.ibm.modcap</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lnk</extension>
-        <mime-type>application/x-ms-shortcut</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>log</extension>
-        <mime-type>text/plain</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lostxml</extension>
-        <mime-type>application/lost+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lrf</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lrm</extension>
-        <mime-type>application/vnd.ms-lrm</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ltf</extension>
-        <mime-type>application/vnd.frogans.ltf</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lvp</extension>
-        <mime-type>audio/vnd.lucent.voice</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lwp</extension>
-        <mime-type>application/vnd.lotus-wordpro</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>lzh</extension>
-        <mime-type>application/x-lzh-compressed</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m13</extension>
-        <mime-type>application/x-msmediaview</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m14</extension>
-        <mime-type>application/x-msmediaview</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m1v</extension>
-        <mime-type>video/mpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m21</extension>
-        <mime-type>application/mp21</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m2a</extension>
-        <mime-type>audio/mpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m2v</extension>
-        <mime-type>video/mpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m3a</extension>
-        <mime-type>audio/mpeg</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m3u</extension>
-        <mime-type>audio/x-mpegurl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m3u8</extension>
-        <mime-type>application/vnd.apple.mpegurl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m4a</extension>
-        <mime-type>audio/mp4</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m4b</extension>
-        <mime-type>audio/mp4</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m4r</extension>
-        <mime-type>audio/mp4</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m4u</extension>
-        <mime-type>video/vnd.mpegurl</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>m4v</extension>
-        <mime-type>video/mp4</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>ma</extension>
-        <mime-type>application/mathematica</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mac</extension>
-        <mime-type>image/x-macpaint</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mads</extension>
-        <mime-type>application/mads+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mag</extension>
-        <mime-type>application/vnd.ecowin.chart</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>maker</extension>
-        <mime-type>application/vnd.framemaker</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>man</extension>
-        <mime-type>text/troff</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mar</extension>
-        <mime-type>application/octet-stream</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mathml</extension>
-        <mime-type>application/mathml+xml</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mb</extension>
-        <mime-type>application/mathematica</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mbk</extension>
-        <mime-type>application/vnd.mobius.mbk</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mbox</extension>
-        <mime-type>application/mbox</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mc1</extension>
-        <mime-type>application/vnd.medcalcdata</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mcd</extension>
-        <mime-type>application/vnd.mcd</mime-type>
-    </mime-mapping>
-    <mime-mapping>
-        <extension>mcurl</extension>
-        <mime-typ

<TRUNCATED>


[12/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/ListQueryResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/ListQueryResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/ListQueryResource.java
deleted file mode 100755
index b14dc22..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/ListQueryResource.java
+++ /dev/null
@@ -1,504 +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.service.generic;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.*;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.query.GenericQuery;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.apache.eagle.service.common.EagleExceptionWrapper;
-import org.apache.eagle.storage.hbase.query.GenericQueryBuilder;
-import org.apache.eagle.common.DateTimeUtil;
-import com.sun.jersey.api.json.JSONWithPadding;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.eagle.query.aggregate.timeseries.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.GenericEntity;
-import javax.ws.rs.core.MediaType;
-import java.util.*;
-
-@Path("list")
-public class ListQueryResource {
-	private static final Logger LOG = LoggerFactory.getLogger(ListQueryResource.class);
-
-	/**
-	 * Support old interface without verbose parameter
-	 */
-	public ListQueryAPIResponseEntity listQuery(@QueryParam("query") String query,
-												@QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-												@QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey,
-												@QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries,
-												@QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-												@QueryParam("filterIfMissing") boolean filterIfMissing,
-												@QueryParam("parallel") int parallel,
-												@QueryParam("metricName") String metricName){
-		return listQuery(query, startTime, endTime, pageSize, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing, parallel, metricName,true);
-	}
-
-	/**
-	 * TODO refactor the code structure,  now it's messy
-	 * @param query
-	 * @param startTime
-	 * @param endTime
-	 * @param pageSize
-	 * @param startRowkey
-	 * @param treeAgg
-	 * @param timeSeries
-	 * @param intervalmin
-	 * @return
-	 */
-	@GET
-	@Produces({MediaType.APPLICATION_JSON})
-	public ListQueryAPIResponseEntity listQuery(@QueryParam("query") String query, 
-			@QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-			@QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey, 
-			@QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries, 
-			@QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-			@QueryParam("filterIfMissing") boolean filterIfMissing,
-			@QueryParam("parallel") int parallel,
-			@QueryParam("metricName") String metricName,
-			@QueryParam("verbose") Boolean verbose) {
-		if(!EagleConfigFactory.load().isCoprocessorEnabled())
-			return listQueryWithoutCoprocessor(query,startTime,endTime,pageSize,startRowkey,treeAgg,timeSeries,intervalmin,top,filterIfMissing,parallel,metricName,verbose);
-
-		StopWatch watch = new StopWatch();
-		watch.start();
-		ListQueryAPIResponseEntity result = new ListQueryAPIResponseEntity();
-		try{
-			validateQueryParameters(startRowkey, pageSize);
-
-			// 1. Compile query to parse parameters and HBase Filter
-			ListQueryCompiler comp = new ListQueryCompiler(query, filterIfMissing);
-			String serviceName = comp.serviceName();
-			
-			SearchCondition condition = new SearchCondition();
-			condition.setOutputVerbose(verbose == null || verbose);
-			condition.setOutputAlias(comp.getOutputAlias());
-			condition.setFilter(comp.filter());
-			condition.setQueryExpression(comp.getQueryExpression());
-			if(comp.sortOptions() == null && top > 0) {
-				LOG.warn("Parameter \"top\" is only used for sort query! Ignore top parameter this time since it's not a sort query");
-			}
-
-			// 2. Initialize partition values if set
-			// TODO: For now we don't support one query to query multiple partitions. In future 
-			// if partition is defined for the entity, internally We need to spawn multiple
-			// queries and send one query for each search condition for each partition
-			final List<String[]> partitionValues = comp.getQueryPartitionValues();
-			if (partitionValues != null) {
-				condition.setPartitionValues(Arrays.asList(partitionValues.get(0)));
-			}
-
-			// 3. Set time range if it's timeseries service
-			EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-			if(ed.isTimeSeries()){
-				// TODO check timestamp exists for timeseries or topology data
-				condition.setStartTime(startTime);
-				condition.setEndTime(endTime);
-			}
-
-			// 4. Set HBase start scanning rowkey if given
-			condition.setStartRowkey(startRowkey);
-
-			// 5. Set page size
-			condition.setPageSize(pageSize);
-
-			// 6. Generate output,group-by,aggregated fields
-			List<String> outputFields = comp.outputFields();
-			List<String> groupbyFields = comp.groupbyFields();
-			List<String> aggregateFields = comp.aggregateFields();
-			Set<String> filterFields = comp.getFilterFields();
-
-			// Start to generate output fields list {
-			condition.setOutputAll(comp.isOutputAll());
-			if(outputFields == null) outputFields = new ArrayList<String>();
-			if(comp.hasAgg()){
-				if(groupbyFields != null) outputFields.addAll(groupbyFields);
-				if(aggregateFields != null) outputFields.addAll(aggregateFields);
-				if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-					outputFields.add(GenericMetricEntity.VALUE_FIELD);
-				}
-			}
-			if(filterFields!=null) outputFields.addAll(filterFields);
-			condition.setOutputFields(outputFields);
-			if(comp.isOutputAll()){
-				LOG.info("Output fields: ALL");
-			}else{
-				LOG.info("Output fields: " + StringUtils.join(outputFields, ","));
-			}
-			// } END
-
-			// 7. Build GenericQuery
-			GenericQuery reader = GenericQueryBuilder
-									.select(outputFields)
-									.from(serviceName, metricName).where(condition)
-									.groupBy(
-											comp.hasAgg(),
-											groupbyFields,
-											comp.aggregateFunctionTypes(),
-											aggregateFields)
-									.timeSeries(timeSeries, intervalmin)
-									.treeAgg(treeAgg)
-									.orderBy(comp.sortOptions(),comp.sortFunctions(),comp.sortFields()).top(top)
-									.parallel(parallel)								
-									.build();
-			
-			// 8. Fill response object
-			List entities = reader.result();
-			result.setObj(entities);
-			result.setTotalResults(entities.size());
-			result.setSuccess(true);
-			result.setLastTimestamp(reader.getLastTimestamp());
-			result.setFirstTimestamp(reader.getFirstTimeStamp());
-		}catch(Exception ex){
-			LOG.error("Fail executing list query", ex);
-			result.setException(EagleExceptionWrapper.wrap(ex));
-			result.setSuccess(false);
-			return result;
-		}finally{
-			watch.stop();
-			result.setElapsedms(watch.getTime());
-		}
-		LOG.info("Query done " + watch.getTime() + " ms");
-		return result;
-	}
-	
-	/**
-	 * <b>TODO</b> remove the legacy deprecated implementation of listQueryWithoutCoprocessor
-	 *
-	 * @see #listQuery(String, String, String, int, String, boolean, boolean, long, int, boolean, int, String,Boolean)
-	 *
-	 * @param query
-	 * @param startTime
-	 * @param endTime
-	 * @param pageSize
-	 * @param startRowkey
-	 * @param treeAgg
-	 * @param timeSeries
-	 * @param intervalmin
-	 * @return
-	 */
-	@GET
-	@Path("/legacy")
-	@Produces({MediaType.APPLICATION_JSON})
-	@Deprecated
-	public ListQueryAPIResponseEntity listQueryWithoutCoprocessor(@QueryParam("query") String query,
-	                                                              @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-	                                                              @QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey,
-	                                                              @QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries,
-	                                                              @QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-	                                                              @QueryParam("filterIfMissing") boolean filterIfMissing,
-	                                                              @QueryParam("parallel") int parallel,
-	                                                              @QueryParam("metricName") String metricName,
-																  @QueryParam("verbose") Boolean verbose) {
-		StopWatch watch = new StopWatch();
-		watch.start();
-		ListQueryAPIResponseEntity result = new ListQueryAPIResponseEntity();
-		try{
-			validateQueryParameters(startRowkey, pageSize);
-			ListQueryCompiler comp = new ListQueryCompiler(query, filterIfMissing);
-			String serviceName = comp.serviceName();
-
-			SearchCondition condition = new SearchCondition();
-			condition.setFilter(comp.filter());
-			condition.setQueryExpression(comp.getQueryExpression());
-			if(comp.sortOptions() == null && top > 0) {
-				LOG.warn("Parameter \"top\" is only used for sort query! Ignore top parameter this time since it's not a sort query");
-			}
-
-			// TODO: For now we don't support one query to query multiple partitions. In future
-			// if partition is defined for the entity, internally We need to spawn multiple
-			// queries and send one query for each search condition for each partition
-			final List<String[]> partitionValues = comp.getQueryPartitionValues();
-			if (partitionValues != null) {
-				condition.setPartitionValues(Arrays.asList(partitionValues.get(0)));
-			}
-			EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-			if(ed.isTimeSeries()){
-				// TODO check timestamp exists for timeseries or topology data
-				condition.setStartTime(startTime);
-				condition.setEndTime(endTime);
-			}
-			condition.setOutputVerbose(verbose==null || verbose );
-			condition.setOutputAlias(comp.getOutputAlias());
-			condition.setOutputAll(comp.isOutputAll());
-			condition.setStartRowkey(startRowkey);
-			condition.setPageSize(pageSize);
-
-			List<String> outputFields = comp.outputFields();
-			if(outputFields == null) outputFields = new ArrayList<String>();
-
-			/**
-			 * TODO ugly logic, waiting for refactoring
-			 */
-			if(!comp.hasAgg() && !serviceName.equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){ // pure list query
-//				List<String> outputFields = comp.outputFields();
-				Set<String> filterFields = comp.getFilterFields();
-				if(filterFields != null) outputFields.addAll(filterFields);
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				GenericEntityBatchReader reader = new GenericEntityBatchReader(serviceName, condition);
-				List<? extends TaggedLogAPIEntity> entityList = reader.read();
-				result.setObj(entityList);
-				result.setTotalResults(entityList.size());
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}else if(!comp.hasAgg() && serviceName.equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-				// validate metric name
-				if(metricName == null || metricName.isEmpty()){
-					throw new IllegalArgumentException("metricName should not be empty for metric list query");
-				}
-//				List<String> outputFields = comp.outputFields();
-				Set<String> filterFields = comp.getFilterFields();
-				if(filterFields != null) outputFields.addAll(filterFields);
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				GenericMetricEntityBatchReader reader = new GenericMetricEntityBatchReader(metricName, condition);
-				List<? extends TaggedLogAPIEntity> entityList = reader.read();
-				result.setObj(entityList);
-				result.setTotalResults(entityList.size());
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}
-			else if(!treeAgg && !timeSeries && parallel <= 0 ){ // non time-series based aggregate query, not hierarchical
-				List<String> groupbyFields = comp.groupbyFields();
-				List<String> aggregateFields = comp.aggregateFields();
-				Set<String> filterFields = comp.getFilterFields();
-//				List<String> outputFields = new ArrayList<String>();
-				if(groupbyFields != null) outputFields.addAll(groupbyFields);
-				if(filterFields != null) outputFields.addAll(filterFields);
-				outputFields.addAll(aggregateFields);
-
-				if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-					outputFields.add(GenericMetricEntity.VALUE_FIELD);
-				}
-
-				FlatAggregator agg = new FlatAggregator(groupbyFields, comp.aggregateFunctionTypes(), comp.aggregateFields());
-				StreamReader reader = null;
-				if(ed.getMetricDefinition() == null){
-					reader = new GenericEntityStreamReader(serviceName, condition);
-				}else{ // metric aggregation need metric reader
-					reader = new GenericMetricEntityDecompactionStreamReader(metricName, condition);
-				}
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				reader.register(agg);
-				reader.readAsStream();
-				ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>();
-				obj.addAll(agg.result().entrySet());
-				if(comp.sortOptions() == null){
-					result.setObj(obj);
-				}else{ // has sort options
-					result.setObj(PostFlatAggregateSort.sort(agg.result(), comp.sortOptions(), top));
-				}
-				result.setTotalResults(0);
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}else if(!treeAgg && !timeSeries && parallel > 0){ // TODO ugly branch, let us refactor
-				List<String> groupbyFields = comp.groupbyFields();
-				List<String> aggregateFields = comp.aggregateFields();
-				Set<String> filterFields = comp.getFilterFields();
-//				List<String> outputFields = new ArrayList<String>();
-				if(groupbyFields != null) outputFields.addAll(groupbyFields);
-				if(filterFields != null) outputFields.addAll(filterFields);
-				outputFields.addAll(aggregateFields);
-				if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-					outputFields.add(GenericMetricEntity.VALUE_FIELD);
-				}
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				FlatAggregator agg = new FlatAggregator(groupbyFields, comp.aggregateFunctionTypes(), comp.aggregateFields());
-				EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(agg);
-				StreamReader reader = new GenericEntityStreamReaderMT(serviceName, condition, parallel);
-				reader.register(listener);
-				reader.readAsStream();
-				ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>();
-				obj.addAll(agg.result().entrySet());
-				if(comp.sortOptions() == null){
-					result.setObj(obj);
-				}else{ // has sort options
-					result.setObj(PostFlatAggregateSort.sort(agg.result(), comp.sortOptions(), top));
-				}
-				result.setTotalResults(0);
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}else if(!treeAgg && timeSeries){ // time-series based aggregate query, not hierarchical
-				List<String> groupbyFields = comp.groupbyFields();
-				List<String> sortFields = comp.sortFields();
-				List<String> aggregateFields = comp.aggregateFields();
-				Set<String> filterFields = comp.getFilterFields();
-//				List<String> outputFields = new ArrayList<String>();
-				if(groupbyFields != null) outputFields.addAll(groupbyFields);
-				if(filterFields != null) outputFields.addAll(filterFields);
-				if (sortFields != null) outputFields.addAll(sortFields);
-				outputFields.addAll(aggregateFields);
-				if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-					outputFields.add(GenericMetricEntity.VALUE_FIELD);
-				}
-				StreamReader reader = null;
-				if(ed.getMetricDefinition() == null){
-					if(parallel <= 0){ // TODO ugly quick win
-						reader = new GenericEntityStreamReader(serviceName, condition);
-					}else{
-						reader = new GenericEntityStreamReaderMT(serviceName, condition, parallel);
-					}
-				}else{ // metric aggregation need metric reader
-					reader = new GenericMetricEntityDecompactionStreamReader(metricName, condition);
-					if(!outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-						outputFields.add(GenericMetricEntity.VALUE_FIELD);
-					}
-				}
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				TimeSeriesAggregator tsAgg = new TimeSeriesAggregator(groupbyFields, comp.aggregateFunctionTypes(), aggregateFields,
-						DateTimeUtil.humanDateToDate(condition.getStartTime()).getTime(), DateTimeUtil.humanDateToDate(condition.getEndTime()).getTime(), intervalmin*60*1000);
-				if(parallel <= 0){
-					reader.register(tsAgg);
-				}else{
-					EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(tsAgg);
-					reader.register(listener);
-				}
-				// for sorting
-				FlatAggregator sortAgg = null;
-				if (comp.sortOptions() != null) {
-					sortAgg = new FlatAggregator(groupbyFields, comp.sortFunctions(), comp.sortFields());
-					if(parallel <= 0){
-						reader.register(sortAgg);
-					}else{
-						EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(sortAgg);
-						reader.register(listener);
-					}
-				}
-				reader.readAsStream();
-				ArrayList<Map.Entry<List<String>, List<double[]>>> obj = new ArrayList<Map.Entry<List<String>, List<double[]>>>();
-				obj.addAll(tsAgg.getMetric().entrySet());
-				if(comp.sortOptions() == null){
-					result.setObj(obj);
-				}else{ // has sort options
-					result.setObj(TimeSeriesPostFlatAggregateSort.sort(sortAgg.result(), tsAgg.getMetric(), comp.sortOptions(), top));
-				}
-				result.setTotalResults(0);
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}
-			else{ // use hierarchical aggregate mode
-				List<String> groupbyFields = comp.groupbyFields();
-				List<String> aggregateFields = comp.aggregateFields();
-				Set<String> filterFields = comp.getFilterFields();
-//				List<String> outputFields = new ArrayList<String>();
-				if(groupbyFields != null) outputFields.addAll(groupbyFields);
-				if(filterFields != null) outputFields.addAll(filterFields);
-				outputFields.addAll(aggregateFields);
-				if(GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(serviceName) && !outputFields.contains(GenericMetricEntity.VALUE_FIELD)){
-					outputFields.add(GenericMetricEntity.VALUE_FIELD);
-				}
-				condition.setOutputFields(outputFields);
-				if(condition.isOutputAll()){
-					LOG.info("Output: ALL");
-				}else{
-					LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", "));
-				}
-				GenericEntityStreamReader reader = new GenericEntityStreamReader(serviceName, condition);
-				HierarchicalAggregator agg = new HierarchicalAggregator(groupbyFields, comp.aggregateFunctionTypes(), comp.aggregateFields());
-				reader.register(agg);
-				reader.readAsStream();
-				if(comp.sortOptions() == null){
-					result.setObj(agg.result());
-				}else{ // has sort options
-					result.setObj(PostHierarchicalAggregateSort.sort(agg.result(), comp.sortOptions()));
-				}
-				result.setTotalResults(0);
-				result.setSuccess(true);
-				result.setLastTimestamp(reader.getLastTimestamp());
-				result.setFirstTimestamp(reader.getFirstTimestamp());
-			}
-		}catch(Exception ex){
-			LOG.error("Fail executing list query: " + query, ex);
-			result.setException(EagleExceptionWrapper.wrap(ex));
-			result.setSuccess(false);
-			return result;
-		}finally{
-			watch.stop();
-			result.setElapsedms(watch.getTime());
-		}
-		LOG.info("Query done " + watch.getTime() + " ms");
-		return result;
-	}
-
-
-	@GET
-	@Path("/jsonp")
-	@Produces({"application/x-javascript", "application/json", "application/xml"})
-	public JSONWithPadding listQueryWithJsonp(@QueryParam("query") String query, 
-			@QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-			@QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey, 
-			@QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries, 
-			@QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-			@QueryParam("filterIfMissing") boolean filterIfMissing,
-			@QueryParam("parallel") int parallel,
-			@QueryParam("update") String callback,
-			@QueryParam("verbose") boolean verbose) {
-		ListQueryAPIResponseEntity result = listQuery(query, startTime, endTime, pageSize, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing, parallel, null,verbose);
-		return new JSONWithPadding(new GenericEntity<ListQueryAPIResponseEntity>(result){}, callback);		
-	}
-	
-	private void validateQueryParameters(String startRowkey, int pageSize){
-		if(pageSize <= 0){
-			throw new IllegalArgumentException("Positive pageSize value should be always provided. The list query format is:\n" + "eagle-service/rest/list?query=<querystring>&pageSize=10&startRowkey=xyz&startTime=xxx&endTime=xxx");
-		}
-		
-		if(startRowkey != null && startRowkey.equals("null")){
-			LOG.warn("startRowkey being null string is not same to startRowkey == null");
-		}
-		return;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/MetadataResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/MetadataResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/MetadataResource.java
deleted file mode 100755
index d5ab87f..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/MetadataResource.java
+++ /dev/null
@@ -1,198 +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.service.generic;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.log.entity.meta.MetricDefinition;
-import com.sun.jersey.api.model.AbstractResource;
-import com.sun.jersey.api.model.AbstractResourceMethod;
-import com.sun.jersey.api.model.AbstractSubResourceMethod;
-import com.sun.jersey.server.impl.modelapi.annotation.IntrospectionModeller;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.node.ArrayNode;
-import org.codehaus.jackson.node.JsonNodeFactory;
-import org.codehaus.jackson.node.ObjectNode;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Application;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import java.util.Map;
-
-/**
- * @since : 7/3/14,2014
- */
-@Path(MetadataResource.PATH_META)
-public class MetadataResource {
-	final static String PATH_META = "meta";
-	final static String PATH_RESOURCE = "resource";
-	final static String PATH_SERVICE = "service";
-
-	@GET
-	@Produces(MediaType.APPLICATION_JSON)
-	public Response index(@Context Application application,
-                        @Context HttpServletRequest request){
-		String basePath = request.getRequestURL().toString();
-		ObjectNode root = JsonNodeFactory.instance.objectNode();
-
-		root.put(PATH_RESOURCE,joinUri(basePath,PATH_RESOURCE));
-		root.put(PATH_SERVICE,joinUri(basePath,PATH_SERVICE));
-		return Response.ok().entity(root).build();
-	}
-
-	@GET
-	@Path(PATH_RESOURCE)
-	@Produces(MediaType.APPLICATION_JSON)
-	public Response listAllResourcesRoutes(@Context Application application,
-	                                       @Context HttpServletRequest request){
-		String basePath = request.getRequestURL().toString();
-		basePath = basePath.substring(0,basePath.length() - PATH_META.length() - PATH_RESOURCE.length() -1);
-		ObjectNode root = JsonNodeFactory.instance.objectNode();
-		root.put("base",basePath);
-		ArrayNode resources = JsonNodeFactory.instance.arrayNode();
-		root.put( "resources", resources );
-
-		for ( Class<?> aClass : application.getClasses()){
-			if ( isAnnotatedResourceClass(aClass)){
-				AbstractResource resource = IntrospectionModeller.createResource(aClass);
-				ObjectNode resourceNode = JsonNodeFactory.instance.objectNode();
-				String uriPrefix = resource.getPath().getValue();
-
-				for ( AbstractSubResourceMethod srm : resource.getSubResourceMethods() ) {
-					String uri = uriPrefix + "/" + srm.getPath().getValue();
-					addTo( resourceNode, uri, srm, joinUri(basePath, uri) );
-				}
-
-				for ( AbstractResourceMethod srm : resource.getResourceMethods() ) {
-					addTo( resourceNode, uriPrefix, srm, joinUri( basePath, uriPrefix ) );
-				}
-				resources.add( resourceNode );
-			}
-		}
-
-		return Response.ok().entity( root ).build();
-	}
-
-	private String joinUri(String basePath, String uriPrefix) {
-		if(basePath.endsWith("/") && uriPrefix.startsWith("/")){
-			return basePath.substring(0,basePath.length()-2)+uriPrefix;
-		}else if(basePath.endsWith("/") || uriPrefix.startsWith("/")){
-			return basePath+ uriPrefix;
-		}
-		return basePath+"/"+uriPrefix;
-	}
-
-	private void addTo( ObjectNode resourceNode, String uriPrefix, AbstractResourceMethod srm, String path ){
-		if(resourceNode.get( uriPrefix ) == null){
-			ObjectNode inner = JsonNodeFactory.instance.objectNode();
-			inner.put("path", path);
-			inner.put("methods", JsonNodeFactory.instance.arrayNode());
-			resourceNode.put( uriPrefix, inner );
-		}
-
-		((ArrayNode) resourceNode.get( uriPrefix ).get("methods")).add( srm.getHttpMethod() );
-	}
-
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	private boolean isAnnotatedResourceClass( Class rc ){
-		if ( rc.isAnnotationPresent( Path.class ) ) {
-			return true;
-		}
-
-		for ( Class i : rc.getInterfaces() ) {
-			if ( i.isAnnotationPresent( Path.class ) ) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	@GET
-	@Path(PATH_SERVICE)
-	@Produces(MediaType.APPLICATION_JSON)
-	public Response listAllEntities(@Context Application application,
-                                     @Context HttpServletRequest request) throws Exception {
-		Map<String,EntityDefinition> entities = EntityDefinitionManager.entities();
-		ObjectNode root = JsonNodeFactory.instance.objectNode();
-
-		ArrayNode services = JsonNodeFactory.instance.arrayNode();
-
-		for(Map.Entry<String,EntityDefinition> entry : entities.entrySet()){
-//			ObjectNode serviceNode = JsonNodeFactory.instance.objectNode();
-//			serviceNode.put(entry.getKey(),entityDefationitionAsJson(entry.getValue()));
-			services.add(entityDefationitionAsJson(entry.getValue()));
-		}
-		root.put("count",entities.keySet().size());
-		root.put("services",services);
-		return Response.ok().entity(root).build();
-	}
-
-	private JsonNode entityDefationitionAsJson(EntityDefinition def) {
-		ObjectNode node = JsonNodeFactory.instance.objectNode();
-		node.put("service",def.getService());
-		node.put("entityClass",def.getEntityClass().getName());
-		node.put("table",def.getTable());
-		node.put("columnFamily",def.getColumnFamily());
-		node.put("prefix",def.getPrefix());
-		if(def.getPartitions()!=null){
-			node.put("partitions",arrayNode(def.getPartitions()));
-		}
-		node.put("isTimeSeries",def.isTimeSeries());
-
-		MetricDefinition mdf = def.getMetricDefinition();
-		if(mdf!=null){
-			node.put("interval", mdf.getInterval());
-		}
-
-		IndexDefinition[] indexDef = def.getIndexes();
-		if(indexDef!=null){
-			ArrayNode indexDefArray = JsonNodeFactory.instance.arrayNode();
-			for(IndexDefinition idef : indexDef){
-				ObjectNode idn = JsonNodeFactory.instance.objectNode();
-				idn.put("indexPrefix",idef.getIndexPrefix());
-
-				if(idef.getIndex()!=null){
-					ObjectNode index = JsonNodeFactory.instance.objectNode();
-					index.put("name",idef.getIndex().name());
-					index.put("columns",arrayNode(idef.getIndex().columns()));
-					idn.put("index",index);
-				}
-
-				indexDefArray.add(idn);
-			}
-			node.put("indexs",indexDefArray);
-		}
-		return node;
-	}
-
-	private ArrayNode arrayNode(String[] values){
-		ArrayNode an = JsonNodeFactory.instance.arrayNode();
-		for(String v:values){
-			an.add(v);
-		}
-		return an;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/metric/EagleMetricResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/metric/EagleMetricResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/metric/EagleMetricResource.java
deleted file mode 100644
index f3ff420..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/metric/EagleMetricResource.java
+++ /dev/null
@@ -1,58 +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.service.metric;
-
-import java.util.List;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.GenericCreateAPIResponseEntity;
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-
-@Path(EagleMetricResource.METRIC_URL_PATH)
-public class EagleMetricResource {
-	private static final Logger LOG = LoggerFactory.getLogger(EagleMetricResource.class);
-	public static final String METRIC_URL_PATH = "/metric";
-	
-	@POST
-	@Consumes(MediaType.APPLICATION_JSON)
-	@Produces(MediaType.APPLICATION_JSON)
-	public GenericCreateAPIResponseEntity createGenericMetricEntity(List<GenericMetricEntity> entities) {
-		GenericCreateAPIResponseEntity result = new GenericCreateAPIResponseEntity();
-		try{
-			GenericEntityWriter writer = new GenericEntityWriter(GenericMetricEntity.GENERIC_METRIC_SERVICE);
-			List<String> rowkeys = null;
-			rowkeys = writer.write(entities);
-			result.setEncodedRowkeys(rowkeys);
-			result.setSuccess(true);
-			return result;
-		}catch(Exception ex){
-			LOG.error("Fail writing Generic Metric entity", ex);
-			result.setSuccess(false);
-			result.setException(ex.getMessage());
-			return result;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowKeyQueryResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowKeyQueryResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowKeyQueryResource.java
deleted file mode 100644
index 9480695..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowKeyQueryResource.java
+++ /dev/null
@@ -1,88 +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.service.rowkey;
-
-import java.io.IOException;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.eagle.service.common.EagleExceptionWrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.NoSuchRowException;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.RowkeyQueryAPIResponseEntity;
-import org.apache.eagle.log.entity.index.RowKeyLogReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-/**
- * @since Jan 26, 2015
- */
-@Path("/rowkeyquery")
-public class RowKeyQueryResource {
-	private static final Logger LOG = LoggerFactory.getLogger(RowKeyQueryResource.class);
-
-	@GET
-	@Produces({MediaType.APPLICATION_JSON})
-	public RowkeyQueryAPIResponseEntity getEntityByRowkey(@QueryParam("query") String query, @QueryParam("rowkey") String rowkey){
-		RowkeyQueryAPIResponseEntity result = new RowkeyQueryAPIResponseEntity();
-		RowKeyLogReader reader = null;
-
-		try {
-			EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(query);
-			reader = new RowKeyLogReader(ed, EagleBase64Wrapper.decode(rowkey));
-			reader.open();
-			InternalLog log = reader.read();
-			TaggedLogAPIEntity entity;
-			entity = HBaseInternalLogHelper.buildEntity(log, ed);
-			result.setObj(entity);			
-			result.setSuccess(true);
-			return result;
-		}
-		catch(NoSuchRowException ex){
-			LOG.error("rowkey " + ex.getMessage() + " does not exist!", ex);
-			result.setSuccess(false);
-			result.setException(EagleExceptionWrapper.wrap(ex));
-			return result;
-		}
-		catch(Exception ex){
-			LOG.error("Cannot read alert by rowkey", ex);
-			result.setSuccess(false);
-			result.setException(EagleExceptionWrapper.wrap(ex));
-			return result;
-		}
-		finally{
-			try {
-				if(reader != null)
-					reader.close();
-			} catch (IOException e) {
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowkeyResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowkeyResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowkeyResource.java
deleted file mode 100644
index d4a6a42..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/rowkey/RowkeyResource.java
+++ /dev/null
@@ -1,133 +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.service.rowkey;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.eagle.service.common.EagleExceptionWrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.RowkeyAPIEntity;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.old.GenericDeleter;
-import org.apache.eagle.log.entity.old.HBaseLogByRowkeyReader;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.eagle.common.service.POSTResultEntityBase;
-
-@Deprecated
-@Path("rowkey")
-public class RowkeyResource {
-	private static final Logger LOG = LoggerFactory.getLogger(RowkeyResource.class);
-	
-	@GET
-	@Produces(MediaType.APPLICATION_JSON)
-	public RowkeyAPIEntity inspectRowkey(@QueryParam("table") String table, @QueryParam("cf") String columnFamily, 
-			@QueryParam("key") String key, @QueryParam("all") String all, @QueryParam("field") List<String> fields){
-		RowkeyAPIEntity entity = new RowkeyAPIEntity();
-		byte[] row = null;
-		boolean includingAllQualifiers = false;
-		if(all != null && all.equals("true"))
-			includingAllQualifiers = true;
-		HBaseLogByRowkeyReader getter = new HBaseLogByRowkeyReader(table, columnFamily, includingAllQualifiers, fields);
-		InternalLog log = null;
-		try{
-			getter.open();
-			row = EagleBase64Wrapper.decode(key);
-			log = getter.get(row);
-		}catch(Exception ex){
-			LOG.error("Cannot get rowkey", ex);
-			entity.setSuccess(false);
-			entity.setException(EagleExceptionWrapper.wrap(ex));
-			return entity;
-		}finally{
-			try{
-				getter.close();
-			}catch(Exception ex){}
-		}
-		
-		Map<String, String> fieldNameValueMap = new TreeMap<String, String>();
-		entity.setFieldNameValueMap(fieldNameValueMap);
-		// populate qualifiers
-		Map<String, byte[]> qualifierValues = log.getQualifierValues();
-		for(Map.Entry<String, byte[]> qualifier : qualifierValues.entrySet()){
-			if(qualifier.getValue() != null){
-				fieldNameValueMap.put(qualifier.getKey(), new String(qualifier.getValue()));
-			}
-		}
-		
-		// decode rowkey
-		// the first integer is prefix hashcode
-		entity.setPrefixHashCode(ByteUtil.bytesToInt(row, 0));
-		long ts = Long.MAX_VALUE-ByteUtil.bytesToLong(row, 4);
-		entity.setTimestamp(ts);
-		entity.setHumanTime(DateTimeUtil.millisecondsToHumanDateWithMilliseconds(ts));
-		int offset = 4+8;
-		int len = row.length;
-		Map<Integer, Integer> tagNameHashValueHashMap = new HashMap<Integer, Integer>();
-		// TODO boundary check please
-		while(offset < len){
-			int tagNameHash = ByteUtil.bytesToInt(row, offset);
-			offset += 4;
-			int tagValueHash = ByteUtil.bytesToInt(row, offset);
-			offset += 4;
-			tagNameHashValueHashMap.put(tagNameHash, tagValueHash);
-		}
-		
-		entity.setSuccess(true);
-		return entity;
-	}
-	
-	/**
-	 * for entities, the only required field is encodedRowkey
-	 * @param table
-	 * @param columnFamily
-	 * @param entities
-	 */
-	@DELETE
-	@Consumes(MediaType.APPLICATION_JSON)
-	@Produces(MediaType.APPLICATION_JSON)
-	public POSTResultEntityBase deleteEntityByEncodedRowkey(@QueryParam("table") String table, @QueryParam("cf") String columnFamily,
-			List<TaggedLogAPIEntity> entities){
-		GenericDeleter deleter = new GenericDeleter(table, columnFamily);
-		POSTResultEntityBase result = new POSTResultEntityBase();
-		try{
-			deleter.delete(entities);
-		}catch(Exception ex){
-			LOG.error("Fail deleting entity " + table + ":" + columnFamily, ex);
-			result.setSuccess(false);
-			result.setException(ex.getMessage());
-			return result;
-		}
-		result.setSuccess(true);
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckAPIEntity.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckAPIEntity.java
deleted file mode 100644
index 0e52a2e..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckAPIEntity.java
+++ /dev/null
@@ -1,47 +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.service.selfcheck;
-
-/**
- * expose internal configuration or metrics
- */
-//@XmlRootElement
-//@XmlAccessorType(XmlAccessType.FIELD)
-//@XmlType(propOrder = {"env", "hbaseZookeeperQuorum", "hbaseZookeeperClientPort"})
-public class EagleServiceSelfCheckAPIEntity {
-	private String env;
-	private String hbaseZookeeperQuorum;
-	private String hbaseZookeeperClientPort;
-	public String getEnv() {
-		return env;
-	}
-	public void setEnv(String env) {
-		this.env = env;
-	}
-	public String getHbaseZookeeperQuorum() {
-		return hbaseZookeeperQuorum;
-	}
-	public void setHbaseZookeeperQuorum(String hbaseZookeeperQuorum) {
-		this.hbaseZookeeperQuorum = hbaseZookeeperQuorum;
-	}
-	public String getHbaseZookeeperClientPort() {
-		return hbaseZookeeperClientPort;
-	}
-	public void setHbaseZookeeperClientPort(String hbaseZookeeperClientPort) {
-		this.hbaseZookeeperClientPort = hbaseZookeeperClientPort;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckResource.java
deleted file mode 100644
index 88ab613..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/EagleServiceSelfCheckResource.java
+++ /dev/null
@@ -1,38 +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.service.selfcheck;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-
-@Path("ValidateInternals")
-public class EagleServiceSelfCheckResource {
-	
-	@GET
-	@Produces(MediaType.APPLICATION_JSON)
-	public EagleServiceSelfCheckAPIEntity selfCheck(){
-		EagleServiceSelfCheckAPIEntity entity = new EagleServiceSelfCheckAPIEntity();
-		entity.setHbaseZookeeperQuorum(EagleConfigFactory.load().getZKQuorum());
-		entity.setHbaseZookeeperClientPort(EagleConfigFactory.load().getZKPort());
-		entity.setEnv(EagleConfigFactory.load().getEnv());
-		return entity;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/ServiceResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/ServiceResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/ServiceResource.java
deleted file mode 100644
index f108bd5..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/selfcheck/ServiceResource.java
+++ /dev/null
@@ -1,64 +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.service.selfcheck;
-
-import java.util.Map;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.GenericEntity;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import com.sun.jersey.api.json.JSONWithPadding;
-
-@Path("services")
-public class ServiceResource {
-	private static final Logger LOG = LoggerFactory.getLogger(ServiceResource.class);
-	
-	@GET
-	@Produces({"application/json", "application/xml"})
-	public Map<String, EntityDefinition> getServiceDefinitions(){
-		Map<String, EntityDefinition> result = null;
-		try{
-			 result = EntityDefinitionManager.entities();
-		}catch(Exception ex){
-			LOG.error("Error in getting entity definitions", ex);
-		}
-		
-		return result;
-	}
-	
-	@GET
-	@Path("/jsonp")
-	@Produces({"application/x-javascript", "application/json", "application/xml"})
-	public JSONWithPadding getServiceDefinitionsWithJsonp(@QueryParam("callback") String callback){
-		Map<String, EntityDefinition> result = null;
-		try{
-			 result = EntityDefinitionManager.entities();
-		}catch(Exception ex){
-			LOG.error("Error in getting entity definitions", ex);
-		}
-		
-		return new JSONWithPadding(new GenericEntity<Map<String, EntityDefinition>>(result){}, callback);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/webapp/WEB-INF/web.xml b/eagle-core/eagle-query/eagle-service-base/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index c6c7a8e..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-~ 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.
-~
-~ This web.xml file is not required when using Servlet 3.0 container,
-~ see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html
--->
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
-    <servlet>
-        <servlet-name>Jersey Web Application</servlet-name>
-        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
-        <init-param>
-            <param-name>com.sun.jersey.config.property.packages</param-name>
-            <param-value>org.apache.eagle.service;org.codehaus.jackson.jaxrs</param-value>
-        </init-param>
-        <!--init-param>
-            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
-            <param-value>true</param-value>
-        </init-param-->
-		<!-- probably the following parameter should not be in production -->
-        <!-- init-param>
-			<param-name>com.sun.jersey.config.feature.Trace</param-name>
-			<param-value>true</param-value>
-		</init-param -->
-        <init-param>
-            <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
-            <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value>
-        </init-param>
-        <init-param>
-            <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
-            <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value>
-        </init-param>		
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>Jersey Web Application</servlet-name>
-        <url-pattern>/rest/*</url-pattern>
-    </servlet-mapping>
-</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestHBaseLogReader2.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestHBaseLogReader2.java b/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestHBaseLogReader2.java
deleted file mode 100755
index 432cbdb..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestHBaseLogReader2.java
+++ /dev/null
@@ -1,162 +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.service.generic;
-
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.log.entity.GenericEntityBatchReader;
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.SearchCondition;
-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.query.ListQueryCompiler;
-import org.apache.eagle.service.hbase.EmbeddedHbase;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.Assert;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-public class TestHBaseLogReader2 {
-	private final static Logger LOG = LoggerFactory.getLogger(TestHBaseLogReader2.class);
-    private static EmbeddedHbase hbase = EmbeddedHbase.getInstance();
-	
-	@SuppressWarnings("serial")
-	@Test
-	public void testStartTimeInclusiveEndTimeExclusive() throws IOException, IllegalAccessException, InstantiationException {
-		EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-		hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinitionManager.registerEntity(TestTimeSeriesAPIEntity.class);
-		try{
-			final String cluster = "cluster1";
-			final String datacenter = "dc1";
-			String serviceName = "TestTimeSeriesAPIEntity";
-			GenericEntityWriter writer = new GenericEntityWriter(serviceName);
-			List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-			TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-			long timestamp1 = DateTimeUtil.humanDateToSeconds("2014-04-08 03:00:00")*1000;
-			LOG.info("First entity timestamp:" + timestamp1);
-			entity.setTimestamp(timestamp1);
-			entity.setTags(new HashMap<String, String>(){{
-				put("cluster", cluster);
-				put("datacenter", datacenter);
-			}});
-			entity.setField7("field7");
-			entities.add(entity);
-			
-			entity = new TestTimeSeriesAPIEntity();
-			long timestamp2 = DateTimeUtil.humanDateToSeconds("2014-05-08 04:00:00")*1000;
-			LOG.info("Second entity timestamp:" + timestamp2);
-			entity.setTimestamp(timestamp2);
-			entity.setTags(new HashMap<String, String>(){{
-				put("cluster", cluster);
-				put("datacenter", datacenter);
-			}});
-			entity.setField7("field7_2");
-			entities.add(entity);
-			writer.write(entities);
-
-			// for timezone difference between UTC & localtime, enlarge the search range
-			long queryStartTimestamp = timestamp1-24*60*60*1000;
-			long queryEndTimestamp = timestamp1+24*60*60*1000;
-			LOG.info("Query start timestamp:" + queryStartTimestamp);
-			LOG.info("Query end  timestamp:" + queryEndTimestamp);
-			
-			String format = "%s[@cluster=\"%s\" AND @datacenter=\"%s\"]{%s}";
-			String query = String.format(format, serviceName, cluster, datacenter, "@field7");
-			ListQueryCompiler comp = new ListQueryCompiler(query);
-			SearchCondition condition = new SearchCondition();
-			condition.setFilter(comp.filter());
-			condition.setQueryExpression(comp.getQueryExpression());
-			condition.setOutputFields(comp.outputFields());
-			
-			final List<String[]> partitionValues = comp.getQueryPartitionValues();
-			if (partitionValues != null) {
-				condition.setPartitionValues(Arrays.asList(partitionValues.get(0)));
-			}
-
-			condition.setStartRowkey(null);
-			condition.setPageSize(Integer.MAX_VALUE);
-			condition.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(0));
-			condition.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(queryEndTimestamp));
-			
-			GenericEntityBatchReader reader = new GenericEntityBatchReader(serviceName, condition); 
-			List<TestTimeSeriesAPIEntity> list = reader.read();
-
-			Assert.assertEquals(1, list.size());
-			Assert.assertEquals(timestamp1, list.get(0).getTimestamp());
-			Assert.assertEquals("field7", list.get(0).getField7());
-
-			// for timezone difference between UTC & localtime, enlarge the search range
-			queryStartTimestamp = timestamp1-24*60*60*1000;
-			queryEndTimestamp = timestamp2+24*60*60*1000;  // eagle timestamp is rounded to seconds
-			condition.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(queryStartTimestamp));
-			condition.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(queryEndTimestamp));
-			reader = new GenericEntityBatchReader(serviceName, condition); 
-			list = reader.read();
-			Assert.assertEquals(2, list.size());
-			
-			queryStartTimestamp = timestamp1;
-			queryEndTimestamp = timestamp1;  // eagle timestamp is rounded to seconds
-			condition.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(queryStartTimestamp));
-			condition.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(queryEndTimestamp));
-			reader = new GenericEntityBatchReader(serviceName, condition); 
-			list = reader.read();
-			Assert.assertEquals(0, list.size());
-			hbase.deleteTable(entityDefinition.getTable());
-		}catch(Exception ex){
-			LOG.error("error", ex);
-			Assert.fail();
-		}
-	}
-	
-	@Test
-	public void testByteComparison(){
-		byte[] byte1 = new byte[]{-23, 12, 63};
-		byte[] byte2 = ByteUtil.concat(byte1, new byte[]{0});
-		Assert.assertTrue(Bytes.compareTo(byte1, byte2) < 0);
-		byte[] byte3 = ByteUtil.concat(byte1, new byte[]{127});
-		Assert.assertTrue(Bytes.compareTo(byte2, byte3) < 0);
-		byte[] byte4 = ByteUtil.concat(byte1, new byte[]{-128});
-		Assert.assertTrue(Bytes.compareTo(byte4, byte3) > 0);
-	}
-	
-	@Test
-	public void testMaxByteInBytesComparision(){
-		int max = -1000000;
-//		int maxb = -1000000;
-		System.out.println("Byte MaxValue: " + Byte.MAX_VALUE);
-		System.out.println("Byte MaxValue: " + Byte.MIN_VALUE);
-		for(int i=-128; i<128; i++){
-			byte b = (byte)i;
-			int tmp = b & 0xff;
-			max = Math.max(max, tmp);
-		}
-		System.out.println(max);
-		
-		byte b = -1;
-		System.out.println(b & 0xff);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryCompiler.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryCompiler.java b/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryCompiler.java
deleted file mode 100755
index 9610e54..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/test/java/org/apache/eagle/service/generic/TestListQueryCompiler.java
+++ /dev/null
@@ -1,243 +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.service.generic;
-
-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.parser.ORExpression;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-/**
- * @since Nov 10, 2014
- */
-public class TestListQueryCompiler {
-
-	private static final Logger LOG = LoggerFactory.getLogger(TestListQueryCompiler.class);
-	
-	@Before 
-	public void prepare() throws Exception{
-		String[] partitions =  new String[2];
-		partitions[0] = "cluster";
-		partitions[1] = "datacenter";
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		EntityDefinition entityDef = EntityDefinitionManager.getEntityByServiceName("TestLogAPIEntity");
-		entityDef.setPartitions(partitions);
-		entityDef.setTimeSeries(true);
-	}
-	
-	 /**************************************************************************************************/
-	 /*********************************** Test Expression In List Query*********************************/
-	 /**************************************************************************************************/
-	
-	@Test
-	public void testListQueryWithoutExpression() throws Exception{	
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND @field5 > 0.05]{@cluster, @field1}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND @field5>0.05)");
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertTrue(aggFields == null);
-		List<String> outputFields = compiler.outputFields();
-		Assert.assertEquals(outputFields.size(), 2);
-		Assert.assertTrue(outputFields.contains("cluster"));
-		Assert.assertTrue(outputFields.contains("field1"));
-	}
-	
-	@Test
-	public void testListQueryWithExpressionEndWithNumberInFilter() throws Exception{	
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@field5 + @field6} > 0.05]{@cluster, @field1}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND field5 + field6>0.05)");
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertTrue(aggFields == null);
-		List<String> outputFields = compiler.outputFields();
-		Assert.assertEquals(outputFields.size(), 2);
-		Assert.assertTrue(outputFields.contains("cluster"));
-		Assert.assertTrue(outputFields.contains("field1"));
-	}
-	
-	@Test
-	public void testListQueryWithExpressionEndWithRPARENInFilter() throws Exception{	
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND (EXP{@field5 + @field6} > 0.05)]{@cluster, @field1}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		LOG.info(filter.toString());
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND field5 + field6>0.05)");
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertTrue(aggFields == null);
-		List<String> outputFields = compiler.outputFields();
-		Assert.assertEquals(outputFields.size(), 2);
-		Assert.assertTrue(outputFields.contains("cluster"));
-		Assert.assertTrue(outputFields.contains("field1"));
-		
-		query = "TestLogAPIEntity[(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND (EXP{@field5 + @field6} > 0.05))]{@cluster, @field1}";
-		compiler = new ListQueryCompiler(query, false);
-		filter = compiler.getQueryExpression();
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND field5 + field6>0.05)");
-		aggFields = compiler.aggregateFields();
-		Assert.assertTrue(aggFields == null);
-		outputFields = compiler.outputFields();
-		Assert.assertEquals(outputFields.size(), 2);
-		Assert.assertTrue(outputFields.contains("cluster"));
-		Assert.assertTrue(outputFields.contains("field1"));
-	}
-	
-	@Test
-	public void testListQueryWithExpressionEndWithRBRACEInFilter() throws Exception{			
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@a + @b} > EXP{0.05 + @c + @d}]{@cluster, EXP{@a + @b}}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND a + b>0.05 + c + d)");
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertTrue(aggFields == null);
-		List<String> outputFields = compiler.outputFields();
-//		Assert.assertEquals(outputFields.size(), 2);
-		Assert.assertTrue(outputFields.contains("cluster"));
-		Assert.assertTrue(outputFields.contains("EXP{a + b}"));
-	}
-	
-	/**************************************************************************************************/
-	/*********************************** Test Expression In Group By Query*********************************/	
-	/**************************************************************************************************/
-	
-	@Test
-	public void testGroupByQueryAggWithoutExpressionInAggFunc() throws Exception{
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@a + @b} > EXP{@c + @d} AND EXP{@a + @c} < EXP{@b + @d + 0.05}]<@cluster, @datacenter>{sum(@a), avg(@b)}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		LOG.info(filter.toString());
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND a + b>c + d AND a + c<b + d + 0.05)");
-		
-		List<String> groupByFields = compiler.groupbyFields();
-		Assert.assertEquals(groupByFields.size(), 2);		
-		Assert.assertTrue(groupByFields.contains("cluster"));
-		Assert.assertTrue(groupByFields.contains("datacenter"));
-		
-		List<AggregateFunctionType> functions = compiler.aggregateFunctionTypes();
-		Assert.assertEquals(functions.size(), 2);		
-		Assert.assertTrue(functions.contains(AggregateFunctionType.sum));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.avg));
-	
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertEquals(aggFields.size(), 2);
-		Assert.assertTrue(aggFields.contains("a"));
-		Assert.assertTrue(aggFields.contains("b"));
-	}
-	
-	@Test
-	public void testGroupByQueryAggWithExpressionInAggFunc() throws Exception{
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@a + @b} > EXP{@c + @d} AND EXP{@a + @c} < EXP{@b + @d + 0.07}]<@cluster, @datacenter>{sum(EXP{@a+@b+20.0}), avg(EXP{(@a+@c + 2.5)/@d}), count}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		LOG.info(filter.toString());
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND a + b>c + d AND a + c<b + d + 0.07)");
-		
-		List<String> groupByFields = compiler.groupbyFields();
-		Assert.assertEquals(groupByFields.size(), 2);		
-		Assert.assertTrue(groupByFields.contains("cluster"));
-		Assert.assertTrue(groupByFields.contains("datacenter"));
-		
-		List<AggregateFunctionType> functions = compiler.aggregateFunctionTypes();
-		Assert.assertEquals(functions.size(), 3);		
-		Assert.assertTrue(functions.contains(AggregateFunctionType.sum));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.avg));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.count));
-				
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertEquals(aggFields.size(), 3);
-		Assert.assertTrue(aggFields.contains("EXP{a+b+20.0}"));
-		Assert.assertTrue(aggFields.contains("EXP{(a+c + 2.5)/d}"));
-		Assert.assertTrue(aggFields.contains("count"));
-	}
-	
-	/**************************************************************************************************/
-	/*********************************** Test Expression In Sort Query*********************************/	
-	/**************************************************************************************************/
-	
-	@Test
-	public void testSortQueryWithoutExpressionInSort() throws Exception{
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@a + @b} > EXP{@c + @d} AND EXP{@a + @c} < EXP{@b + @d}]<@cluster, @datacenter>"
-				+ "{sum(@a), count}.{sum(@a) asc}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		LOG.info(filter.toString());
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND a + b>c + d AND a + c<b + d)");
-		
-		List<String> groupByFields = compiler.groupbyFields();
-		Assert.assertEquals(groupByFields.size(), 2);		
-		Assert.assertTrue(groupByFields.contains("cluster"));
-		Assert.assertTrue(groupByFields.contains("datacenter"));
-		
-		List<AggregateFunctionType> functions = compiler.aggregateFunctionTypes();
-		Assert.assertEquals(functions.size(), 2);		
-		Assert.assertTrue(functions.contains(AggregateFunctionType.sum));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.count));
-		
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertEquals(aggFields.size(), 2);
-		Assert.assertTrue(aggFields.contains("a"));
-		Assert.assertTrue(aggFields.contains("count"));
-		
-		List<String> sortFields = compiler.sortFields();
-		Assert.assertEquals(sortFields.size(), 1);
-		Assert.assertTrue(sortFields.contains("a"));
-	}
-	
-	@Test
-	public void testSortQuerySortWithExpressionInSort() throws Exception{
-		String query = "TestLogAPIEntity[@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND EXP{@a + @b} > EXP{@c + @d} AND EXP{@a + @c} < EXP{@b + @d + 0.05}]<@cluster, @datacenter>"
-				+ "{sum(EXP{@a+@b+0.07}), max(EXP{(@a+@c)/@d}), min(EXP{@a+@b})}.{sum(EXP{@a+@b+0.07}) asc}";
-		ListQueryCompiler compiler = new ListQueryCompiler(query, false);
-		ORExpression filter = compiler.getQueryExpression();
-		LOG.info(filter.toString());
-		Assert.assertEquals(filter.toString(), "(@cluster=\"cluster\" AND @datacenter=\"datacenter\" AND a + b>c + d AND a + c<b + d + 0.05)");
-		
-		List<String> groupByFields = compiler.groupbyFields();
-		Assert.assertEquals(groupByFields.size(), 2);		
-		Assert.assertTrue(groupByFields.contains("cluster"));
-		Assert.assertTrue(groupByFields.contains("datacenter"));
-		
-		List<String> aggFields = compiler.aggregateFields();
-		Assert.assertEquals(aggFields.size(), 3);
-		Assert.assertTrue(aggFields.contains("EXP{a+b+0.07}"));
-		Assert.assertTrue(aggFields.contains("EXP{(a+c)/d}"));
-		Assert.assertTrue(aggFields.contains("EXP{a+b}"));
-		
-		List<AggregateFunctionType> functions = compiler.aggregateFunctionTypes();
-		Assert.assertEquals(functions.size(), 3);		
-		Assert.assertTrue(functions.contains(AggregateFunctionType.sum));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.max));
-		Assert.assertTrue(functions.contains(AggregateFunctionType.min));
-		
-		List<String> sortFields = compiler.sortFields();
-		Assert.assertEquals(sortFields.size(), 1);
-		Assert.assertTrue(sortFields.contains("EXP{a+b+0.07}"));
-	}
-}


[14/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawAggregator.java
deleted file mode 100644
index 41bc18a..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawAggregator.java
+++ /dev/null
@@ -1,517 +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.query.aggregate.raw;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.log.entity.meta.IntSerDeser;
-import org.apache.eagle.log.entity.meta.LongSerDeser;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.common.ByteUtil;
-
-public class TestRawAggregator {
-	private static final Logger LOG = LoggerFactory.getLogger(TestRawAggregator.class);
-	
-	private EntityDefinition ed;
-	@SuppressWarnings("unchecked")
-	@Before
-	public void setup(){
-		ed = new EntityDefinition();
-		Qualifier q = new Qualifier();
-		q.setDisplayName("numHosts");
-		q.setQualifierName("a");
-		EntitySerDeser<?> serDeser = new IntSerDeser();
-		q.setSerDeser((EntitySerDeser<Object>)(serDeser));
-		ed.getDisplayNameMap().put("numHosts", q);
-		q = new Qualifier();
-		q.setDisplayName("numClusters");
-		q.setQualifierName("b");
-		serDeser = new LongSerDeser();
-		q.setSerDeser((EntitySerDeser<Object>)(serDeser));
-		ed.getDisplayNameMap().put("numClusters", q);
-	}
-	
-	private Map<String, byte[]> createQualifiers(final String cluster, final String datacenter, final String rack, int numHosts, long numClusters){
-		Map<String, byte[]> qualifiers = new HashMap<String, byte[]>();
-		qualifiers.put("cluster", cluster == null ? null : cluster.getBytes());
-		qualifiers.put("datacenter", datacenter == null ? null : datacenter.getBytes());
-		qualifiers.put("rack", rack == null ? null : rack.getBytes());
-		qualifiers.put("numHosts", ByteUtil.intToBytes(numHosts));
-		qualifiers.put("numClusters", ByteUtil.longToBytes(numClusters));
-		return qualifiers;
-	}
-
-	@Test
-	public void testZeroGroupbyFieldSingleFunctionForSummary(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc1", "rack126", 15, 2));
-		
-		RawAggregator agg = new RawAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			
-			double total = 0.0;
-			for(Map<String, byte[]> e : entities){
-				int a = ByteUtil.bytesToInt(e.get("numHosts"));
-				total += a;
-			}
-			
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0).doubleValue(), total, 0.00000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			double total = 0.0;
-			for(Map<String, byte[]> e : entities){
-				long a = ByteUtil.bytesToLong(e.get("numClusters"));
-				total += a;
-			}
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0).doubleValue(), total, 0.00000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0).doubleValue(), 5, 0.0000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testSingleGroupbyFieldSingleFunctionForSummary(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc2", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc1", "rack126", 15, 2));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total1 = 0.0;
-			total1 += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			
-			double total2 = 0.0;
-			total2 += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total2 += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0).doubleValue(), total1, 0.0000000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), total2, 0.00000000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total1 = 0.0;
-			total1 += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			
-			double total2 = 0.0;
-			total2 += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), total1, 0.000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), total2, 0.000000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total1 = 0.0;
-			total1 += ByteUtil.bytesToLong(entities.get(0).get("numClusters"));
-			total1 += ByteUtil.bytesToLong(entities.get(1).get("numClusters"));
-			total1 += ByteUtil.bytesToLong(entities.get(2).get("numClusters"));
-			
-			double total2 = 0.0;
-			total2 += ByteUtil.bytesToLong(entities.get(3).get("numClusters"));
-			total2 += ByteUtil.bytesToLong(entities.get(4).get("numClusters"));
-			
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), total1, 0.0000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), total2, 0.0000000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total1 = 0.0;
-			total1 += ByteUtil.bytesToLong(entities.get(0).get("numClusters"));
-			total1 += ByteUtil.bytesToLong(entities.get(1).get("numClusters"));
-			total1 += ByteUtil.bytesToLong(entities.get(3).get("numClusters"));
-			total1 += ByteUtil.bytesToLong(entities.get(4).get("numClusters"));
-			
-			double total2 = 0.0;
-			total2 += ByteUtil.bytesToLong(entities.get(2).get("numClusters"));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), total1, 0.00000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), total2, 0.00000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	
-	@Test
-	public void testSingleGroupbyFieldSingleFunctionForCount(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc2", "rack126", 15, 2));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total1 = 0.0;
-			total1 += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total1 += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			
-			double total2 = 0.0;
-			total2 += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total2 += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), total1, 0.0000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), total2, 0.0000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(4), 0.00000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), (double)(1), 0.00000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("can not aggregate", ex);
-			Assert.fail("can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleFieldsSingleFunctionForSummary(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc1", "rack126", 15, 2));
-		entities.add(createQualifiers("cluster2", null, "rack126", 1, 3));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(3, result.size());
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1")).get(0), total, 0.00000000000000000000000001);
-			
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1")).get(0), total, 0.0000000000000000000000001);
-			
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1")).get(0), total, 0.0000000000000000000000001);
-			
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(5).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned")).get(0), total, 0.0000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("cluster", "datacenter", "rack"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(5, result.size());
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack123")).get(0), total, 0.0000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack128")).get(0), total, 0.0000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack125")).get(0), total, 0.0000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack126")).get(0), total, 0.0000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(5).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned", "rack126")).get(0), total, 0.0000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleFieldsSingleFunctionForCount(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc1", "rack126", 15, 2));
-		entities.add(createQualifiers("cluster2", null, "rack126", 1, 3));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(3, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1")).get(0), (double)(3), 0.00000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1")).get(0), (double)(2), 0.0000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned")).get(0), (double)(1), 0.000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("cluster", "datacenter", "rack"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(5, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack123")).get(0), (double)(2), 0.0000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack128")).get(0), (double)(1), 0.0000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack125")).get(0), (double)(1), 0.0000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack126")).get(0), (double)(1), 0.0000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned", "rack126")).get(0), (double)(1), 0.0000000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testSingleGroupbyFieldMultipleFunctions(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc2", "rack126", 15, 2));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum, AggregateFunctionType.count), 
-				Arrays.asList("numHosts", "*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), total, 0.0000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(1), (double)(3), 0.00000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), total, 0.0000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(1), (double)(2), 0.0000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count, AggregateFunctionType.sum), Arrays.asList("*", "numHosts"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(4), 0.00000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(1), total, 0.00000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new RawAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count, AggregateFunctionType.sum, AggregateFunctionType.sum), 
-				Arrays.asList("*", "numHosts", "numClusters"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(4), 0.000000000000000000000000001);
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(1), total, 0.0000000000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToLong(entities.get(0).get("numClusters"));
-			total += ByteUtil.bytesToLong(entities.get(1).get("numClusters"));
-			total += ByteUtil.bytesToLong(entities.get(2).get("numClusters"));
-			total += ByteUtil.bytesToLong(entities.get(3).get("numClusters"));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(2), total, 0.00000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(4), 0.000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(1), total, 0.00000000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToLong(entities.get(4).get("numClusters"));
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(2), total, 0.000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleGroupbyFieldsMultipleFunctions(){
-		List<Map<String, byte[]>> entities = new ArrayList<Map<String, byte[]>>();
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 12, 2));
-		entities.add(createQualifiers("cluster1", "dc1", "rack123", 20, 1));
-		entities.add(createQualifiers("cluster1", "dc1", "rack128", 10, 0));
-		entities.add(createQualifiers("cluster2", "dc1", "rack125", 9, 2));
-		entities.add(createQualifiers("cluster2", "dc1", "rack126", 15, 2));
-		
-		RawAggregator agg = new RawAggregator(Arrays.asList("cluster", "rack"), Arrays.asList(AggregateFunctionType.sum, AggregateFunctionType.count), 
-				Arrays.asList("numHosts", "*"), ed);
-		try{
-			for(Map<String, byte[]> e : entities){
-				agg.qualifierCreated(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 4);
-			double total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(0).get("numHosts"));
-			total += ByteUtil.bytesToInt(entities.get(1).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack123")).get(0), total, 0.000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack123")).get(1), (double)(2), 0.00000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(2).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack128")).get(0), total, 0.00000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack128")).get(1), (double)(1), 0.00000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(3).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack125")).get(0), total, 0.000000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack125")).get(1), (double)(1), 0.0000000000000000000000001);
-			total = 0.0;
-			total += ByteUtil.bytesToInt(entities.get(4).get("numHosts"));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack126")).get(0), total, 0.00000000000000000000000001);
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack126")).get(1), (double)(1), 0.000000000000000000000000001);
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawHBaseLogReaderAndAgg.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawHBaseLogReaderAndAgg.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawHBaseLogReaderAndAgg.java
deleted file mode 100644
index a304ea9..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/raw/TestRawHBaseLogReaderAndAgg.java
+++ /dev/null
@@ -1,26 +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.query.aggregate.raw;
-
-import org.junit.Test;
-
-public class TestRawHBaseLogReaderAndAgg {
-	@Test
-	public void testRawReaderAndAgg(){
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAggregator.java
deleted file mode 100644
index 135e6d0..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAggregator.java
+++ /dev/null
@@ -1,251 +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.query.aggregate.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.apache.eagle.query.aggregate.*;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.Aggregator;
-
-public class TestAggregator {
-	private final static Logger LOG = LoggerFactory.getLogger(TestAggregator.class);
-	
-	public static class AggregatedSampleAPIEntityFactory implements AggregateAPIEntityFactory {
-		@Override
-		public AggregateAPIEntity create(){
-			return new AggregatedSampleAPIEntity();
-		}
-	}
-	
-	
-	public static class TestAPIEntity extends TaggedLogAPIEntity{
-		private String numTotalAlerts;
-		private String usedCapacity;
-		private String status;
-
-		public String getStatus() {
-			return status;
-		}
-
-		public void setStatus(String status) {
-			this.status = status;
-		}
-
-		public String getNumTotalAlerts() {
-			return numTotalAlerts;
-		}
-
-		public void setNumTotalAlerts(String numTotalAlerts) {
-			this.numTotalAlerts = numTotalAlerts;
-		}
-
-		public String getUsedCapacity() {
-			return usedCapacity;
-		}
-
-		public void setUsedCapacity(String usedCapacity) {
-			this.usedCapacity = usedCapacity;
-		}
-	}
-	
-
-
-	public static class AggregatedSampleAPIEntity extends AggregateAPIEntity{
-		private long numTotalAlerts;
-	
-		@JsonProperty("nTA")
-		public long getNumTotalAlerts() {
-			return numTotalAlerts;
-		}
-	
-		public void setNumTotalAlerts(long numTotalAlerts) {
-			this.numTotalAlerts = numTotalAlerts;
-		}
-	}
-	
-	@Test
-	public void testAggregate(){ 
-		try{
-			final AggregatedSampleAPIEntity root = new AggregatedSampleAPIEntity();
-			List<String> sumFunctionFields = Arrays.asList("numTotalAlerts");
-			boolean counting = true;
-			List<String> groupbys = Arrays.asList(Aggregator.GROUPBY_ROOT_FIELD_NAME, "cluster");
-			List<AggregateParams.SortFieldOrder> sortFieldOrders = new ArrayList<AggregateParams.SortFieldOrder>();
-			sortFieldOrders.add(new AggregateParams.SortFieldOrder("numTotalAlerts", false));
-			Aggregator agg = new Aggregator(new AggregatedSampleAPIEntityFactory(), root, groupbys, counting, sumFunctionFields);
-			List<TestAPIEntity> list = new ArrayList<TestAPIEntity>();
-			TestAPIEntity entity = new TestAPIEntity();
-			entity.setTags(new HashMap<String, String>());
-			entity.getTags().put("category", "checkHadoopFS");
-			entity.getTags().put("rack", "rack123");
-			entity.getTags().put("cluster", "cluster1");
-			entity.setNumTotalAlerts("123");
-			entity.setUsedCapacity("12.5");
-			entity.setStatus("live");
-			list.add(entity);
-	
-			TestAPIEntity entity2 = new TestAPIEntity();
-			entity2.setTags(new HashMap<String, String>());
-			entity2.getTags().put("category", "checkHadoopFS");
-			entity2.getTags().put("rack", "rack124");
-			entity2.getTags().put("cluster", "cluster2");
-			entity2.setNumTotalAlerts("35");
-			entity2.setUsedCapacity("32.1");
-			entity2.setStatus("dead");
-			list.add(entity2);
-			
-			TestAPIEntity entity3 = new TestAPIEntity();
-			entity3.setTags(new HashMap<String, String>());
-			entity3.getTags().put("category", "checkHadoopFS");
-	//		entity3.getTags().put("rack", "rack124");
-			entity3.getTags().put("cluster", "cluster2");
-			entity3.setNumTotalAlerts("11");
-			entity3.setUsedCapacity("82.11");
-			entity3.setStatus("live");
-			list.add(entity3);
-						
-			TestAPIEntity entity4 = new TestAPIEntity();
-			entity4.setTags(new HashMap<String, String>());
-			entity4.getTags().put("category", "diskfailure");
-			entity4.getTags().put("rack", "rack124");
-			entity4.getTags().put("cluster", "cluster2");
-			entity4.setNumTotalAlerts("61");
-			entity4.setUsedCapacity("253.2");
-			entity4.setStatus("dead");
-			list.add(entity4);
-			
-			long numTotalAlerts = 0;
-			for(TestAPIEntity e : list){
-				agg.accumulate(e);
-				numTotalAlerts += Long.valueOf(e.getNumTotalAlerts());
-			}
-
-			JsonFactory factory = new JsonFactory(); 
-			ObjectMapper mapper = new ObjectMapper(factory);
-			String result = null;
-			AggregatedSampleAPIEntity toBeVerified = (AggregatedSampleAPIEntity)root.getEntityList().get(Aggregator.GROUPBY_ROOT_FIELD_VALUE);
-			result = mapper.writeValueAsString(toBeVerified);
-			
-			Assert.assertEquals(2, toBeVerified.getNumDirectDescendants());
-			Assert.assertEquals(4, toBeVerified.getNumTotalDescendants());
-			Assert.assertEquals(numTotalAlerts, toBeVerified.getNumTotalAlerts());
-			
-	    	LOG.info(result);
-	    	
-	    	PostAggregateSorting.sort(root, sortFieldOrders);
-	    	toBeVerified = (AggregatedSampleAPIEntity)root.getSortedList().get(0);
-			result = mapper.writeValueAsString(toBeVerified);
-	    	LOG.info(result);
-	    }catch(Exception ex){
-	    	LOG.error("Test aggregator fails", ex);
-	    	Assert.fail("Test aggregator fails");
-	    }
-	}
-	
-	@Test
-	public void testUnassigned(){ 
-		// rack is unassigned
-		try{
-			final AggregatedSampleAPIEntity root = new AggregatedSampleAPIEntity();
-			boolean counting = true;
-			List<String> groupbys = Arrays.asList(Aggregator.GROUPBY_ROOT_FIELD_NAME, "rack");
-			List<AggregateParams.SortFieldOrder> sortFieldOrders = new ArrayList<AggregateParams.SortFieldOrder>();
-			sortFieldOrders.add(new AggregateParams.SortFieldOrder("count", false));
-			sortFieldOrders.add(new AggregateParams.SortFieldOrder("key", false));
-			Aggregator agg = new Aggregator(new AggregatedSampleAPIEntityFactory(), root, groupbys, counting, new ArrayList<String>());
-			List<TestAPIEntity> list = new ArrayList<TestAPIEntity>();
-			TestAPIEntity entity = new TestAPIEntity();
-			entity.setTags(new HashMap<String, String>());
-			entity.getTags().put("category", "checkHadoopFS");
-			entity.getTags().put("rack", "rack123");
-			entity.getTags().put("cluster", "cluster1");
-			entity.setNumTotalAlerts("123");
-			entity.setUsedCapacity("12.5");
-			entity.setStatus("live");
-			list.add(entity);
-	
-			TestAPIEntity entity2 = new TestAPIEntity();
-			entity2.setTags(new HashMap<String, String>());
-			entity2.getTags().put("category", "checkHadoopFS");
-			entity2.getTags().put("rack", "rack124");
-			entity2.getTags().put("cluster", "cluster2");
-			entity2.setNumTotalAlerts("35");
-			entity2.setUsedCapacity("32.1");
-			entity2.setStatus("dead");
-			list.add(entity2);
-			
-			TestAPIEntity entity3 = new TestAPIEntity();
-			entity3.setTags(new HashMap<String, String>());
-			entity3.getTags().put("category", "checkHadoopFS");
-	//		entity3.getTags().put("rack", "rack124");
-			entity3.getTags().put("cluster", "cluster2");
-			entity3.setNumTotalAlerts("11");
-			entity3.setUsedCapacity("82.11");
-			entity3.setStatus("live");
-			list.add(entity3);
-						
-			TestAPIEntity entity4 = new TestAPIEntity();
-			entity4.setTags(new HashMap<String, String>());
-			entity4.getTags().put("category", "diskfailure");
-			entity4.getTags().put("rack", "rack124");
-			entity4.getTags().put("cluster", "cluster2");
-			entity4.setNumTotalAlerts("61");
-			entity4.setUsedCapacity("253.2");
-			entity4.setStatus("dead");
-			list.add(entity4);
-			
-//			long numTotalAlerts = 0;
-			for(TestAPIEntity e : list){
-				agg.accumulate(e);
-//				numTotalAlerts += Long.valueOf(e.getNumTotalAlerts());
-			}
-
-			JsonFactory factory = new JsonFactory(); 
-			ObjectMapper mapper = new ObjectMapper(factory);
-			String result = null;
-			AggregatedSampleAPIEntity toBeVerified = (AggregatedSampleAPIEntity)root.getEntityList().get(Aggregator.GROUPBY_ROOT_FIELD_VALUE);
-			result = mapper.writeValueAsString(toBeVerified);
-			
-			Assert.assertEquals(3, toBeVerified.getNumDirectDescendants());
-			Assert.assertEquals(4, toBeVerified.getNumTotalDescendants());
-//			Assert.assertEquals(numTotalAlerts, toBeVerified.getNumTotalAlerts());
-			
-	    	LOG.info(result);
-	    	
-	    	PostAggregateSorting.sort(root, sortFieldOrders);			
-	    	toBeVerified = (AggregatedSampleAPIEntity)root.getSortedList().get(0);
-			result = mapper.writeValueAsString(toBeVerified);
-	    	LOG.info(result);
-	    }catch(Exception ex){
-	    	LOG.error("Test aggregator fails", ex);
-	    	Assert.fail("Test aggregator fails");
-	    }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAlertAggService.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAlertAggService.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAlertAggService.java
deleted file mode 100644
index c2d0a26..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestAlertAggService.java
+++ /dev/null
@@ -1,56 +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.query.aggregate.test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-import org.junit.Test;
-
-public class TestAlertAggService {
-	@Test
-	public void testCompileAndSplitCondition(){
-		List<String> alertTagNameValues = new ArrayList<String>();
-		String tagNameValue1 = "cluster=cluster1";
-		String tagNameValue2 = "category=checkHadoopFS";
-		String tagNameValue3 = "category=highloadDisk";
-		String tagNameValue4 = "cluster=dc124";
-		String tagNameValue5 = "category=lowloadDisk";
-		alertTagNameValues.add(tagNameValue1);
-		alertTagNameValues.add(tagNameValue2);
-		alertTagNameValues.add(tagNameValue3);
-		alertTagNameValues.add(tagNameValue4);
-		alertTagNameValues.add(tagNameValue5);
-//		AlertAggResource r = new AlertAggResource();
-//		List<List<String>> result = r.compileAndSplitConditions(alertTagNameValues);
-//		Assert.assertEquals(result.size(), 3);
-//		Assert.assertEquals(result.get(0).size(), 3);
-//		Assert.assertTrue(result.get(0).contains(tagNameValue2));
-//		Assert.assertTrue(result.get(0).contains(tagNameValue1));
-//		Assert.assertTrue(result.get(0).contains(tagNameValue4));
-//		Assert.assertEquals(result.get(1).size(), 3);
-//		Assert.assertTrue(result.get(1).contains(tagNameValue3));
-//		Assert.assertTrue(result.get(1).contains(tagNameValue1));
-//		Assert.assertTrue(result.get(1).contains(tagNameValue4));
-//		Assert.assertEquals(result.get(2).size(), 3);
-//		Assert.assertTrue(result.get(2).contains(tagNameValue5));
-//		Assert.assertTrue(result.get(2).contains(tagNameValue1));
-//		Assert.assertTrue(result.get(2).contains(tagNameValue4));
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery.java
deleted file mode 100755
index e879bdf..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery.java
+++ /dev/null
@@ -1,156 +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.query.aggregate.test;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.BucketQuery;
-import junit.framework.Assert;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class TestBucketQuery {
-	private static class SampleTaggedLogAPIEntity extends TaggedLogAPIEntity{
-		private String description;
-
-		@SuppressWarnings("unused")
-		public String getDescription() {
-			return description;
-		}
-
-		public void setDescription(String description) {
-			this.description = description;
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-	@Test
-	public void testBucketQuery(){
-		SampleTaggedLogAPIEntity e1 = new SampleTaggedLogAPIEntity();
-		e1.setTags(new HashMap<String, String>());
-		e1.getTags().put("cluster", "cluster1");
-		e1.getTags().put("rack", "rack123");
-		e1.setDescription("this is description 1");
-		
-		SampleTaggedLogAPIEntity e2 = new SampleTaggedLogAPIEntity();
-		e2.setTags(new HashMap<String, String>());
-		e2.getTags().put("cluster", "cluster1");
-		e2.getTags().put("rack", "rack123");
-		e2.setDescription("this is description 2");
-		
-		List<String> bucketFields = new ArrayList<String>();
-		bucketFields.add("cluster");
-		int limit = 1;
-		
-		BucketQuery query1 = new BucketQuery(bucketFields, limit);
-		query1.put(e1);
-		query1.put(e2);
-		
-		Map<String, Object> map = query1.get();
-		
-		List<TaggedLogAPIEntity> o = (List<TaggedLogAPIEntity>)map.get("cluster1");
-		Assert.assertEquals(limit, o.size());
-		
-		JsonFactory factory = new JsonFactory();
-		ObjectMapper mapper = new ObjectMapper(factory);
-		mapper.setFilters(TaggedLogAPIEntity.getFilterProvider());
-		try{
-			String result = mapper.writeValueAsString(map);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		
-		limit = 2;
-		BucketQuery query2 = new BucketQuery(bucketFields, limit);
-		query2.put(e1);
-		query2.put(e2);
-		Map<String, Object> map2 = query2.get();
-		o = (List<TaggedLogAPIEntity>)map2.get("cluster1");
-		try{
-			String result = mapper.writeValueAsString(map2);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		Assert.assertEquals(limit, o.size());
-		
-		
-		SampleTaggedLogAPIEntity e3 = new SampleTaggedLogAPIEntity();
-		e3.setTags(new HashMap<String, String>());
-		e3.getTags().put("cluster", "cluster1");
-		e3.getTags().put("rack", "rack124");
-		e3.setDescription("this is description 3");
-		bucketFields.add("rack");
-		limit = 2;
-		BucketQuery query3 = new BucketQuery(bucketFields, limit);
-		query3.put(e1);
-		query3.put(e2);
-		query3.put(e3);
-		Map<String, Object> map3 = query3.get();
-		Map<String, Object> o3 = (Map<String, Object>)map3.get("cluster1");
-		List<TaggedLogAPIEntity> o4 = (List<TaggedLogAPIEntity>)o3.get("rack124");
-		Assert.assertEquals(1, o4.size());
-		List<TaggedLogAPIEntity> o5 = (List<TaggedLogAPIEntity>)o3.get("rack123");
-		Assert.assertEquals(o5.size(), 2);
-		
-		try{
-			String result = mapper.writeValueAsString(map3);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		
-		
-		SampleTaggedLogAPIEntity e4 = new SampleTaggedLogAPIEntity();
-		e4.setTags(new HashMap<String, String>());
-		e4.getTags().put("cluster", "cluster1");
-		// rack is set to null
-//		e4.getTags().put("rack", "rack124");
-		e4.setDescription("this is description 3");
-		limit = 2;
-		BucketQuery query4 = new BucketQuery(bucketFields, limit);
-		query4.put(e1);
-		query4.put(e2);
-		query4.put(e3);
-		query4.put(e4);
-		Map<String, Object> map4 = query4.get();
-		Map<String, Object> o6 = (Map<String, Object>)map4.get("cluster1");
-		List<TaggedLogAPIEntity> o7 = (List<TaggedLogAPIEntity>)o6.get("rack124");
-		Assert.assertEquals(1, o7.size());
-		List<TaggedLogAPIEntity> o8 = (List<TaggedLogAPIEntity>)o6.get("rack123");
-		Assert.assertEquals(o8.size(), 2);
-		List<TaggedLogAPIEntity> o9 = (List<TaggedLogAPIEntity>)o6.get("unassigned");
-		Assert.assertEquals(o9.size(), 1);
-		
-		try{
-			String result = mapper.writeValueAsString(map4);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery2.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery2.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery2.java
deleted file mode 100644
index b416319..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestBucketQuery2.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate.test;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.query.aggregate.BucketQuery;
-import junit.framework.Assert;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class TestBucketQuery2 {
-	private static class SampleTaggedLogAPIEntity extends TaggedLogAPIEntity{
-		private String description;
-
-		@SuppressWarnings("unused")
-		public String getDescription() {
-			return description;
-		}
-
-		public void setDescription(String description) {
-			this.description = description;
-		}
-	}
-
-	@SuppressWarnings("unchecked")
-//	@Test
-	public void testBucketQuery(){
-		SampleTaggedLogAPIEntity e1 = new SampleTaggedLogAPIEntity();
-		e1.setTags(new HashMap<String, String>());
-		e1.getTags().put("cluster", "cluster1");
-		e1.getTags().put("rack", "rack123");
-		e1.setDescription("this is description 1");
-		
-		SampleTaggedLogAPIEntity e2 = new SampleTaggedLogAPIEntity();
-		e2.setTags(new HashMap<String, String>());
-		e2.getTags().put("cluster", "cluster1");
-		e2.getTags().put("rack", "rack123");
-		e2.setDescription("this is description 2");
-		
-		List<String> bucketFields = new ArrayList<String>();
-		bucketFields.add("cluster");
-		int limit = 1;
-		
-		BucketQuery query1 = new BucketQuery(bucketFields, limit);
-		query1.put(e1);
-		query1.put(e2);
-		
-		Map<String, Object> map = query1.get();
-		
-		List<TaggedLogAPIEntity> o = (List<TaggedLogAPIEntity>)map.get("cluster1");
-		Assert.assertEquals(limit, o.size());
-		
-		JsonFactory factory = new JsonFactory();
-		ObjectMapper mapper = new ObjectMapper(factory);
-		try{
-			String result = mapper.writeValueAsString(map);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		
-		limit = 2;
-		BucketQuery query2 = new BucketQuery(bucketFields, limit);
-		query2.put(e1);
-		query2.put(e2);
-		Map<String, Object> map2 = query2.get();
-		o = (List<TaggedLogAPIEntity>)map2.get("cluster1");
-		try{
-			String result = mapper.writeValueAsString(map2);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		Assert.assertEquals(limit, o.size());
-		
-		
-		SampleTaggedLogAPIEntity e3 = new SampleTaggedLogAPIEntity();
-		e3.setTags(new HashMap<String, String>());
-		e3.getTags().put("cluster", "cluster1");
-		e3.getTags().put("rack", "rack124");
-		e3.setDescription("this is description 3");
-		bucketFields.add("rack");
-		limit = 2;
-		BucketQuery query3 = new BucketQuery(bucketFields, limit);
-		query3.put(e1);
-		query3.put(e2);
-		query3.put(e3);
-		Map<String, Object> map3 = query3.get();
-		Map<String, Object> o3 = (Map<String, Object>)map3.get("cluster1");
-		List<TaggedLogAPIEntity> o4 = (List<TaggedLogAPIEntity>)o3.get("rack124");
-		Assert.assertEquals(1, o4.size());
-		List<TaggedLogAPIEntity> o5 = (List<TaggedLogAPIEntity>)o3.get("rack123");
-		Assert.assertEquals(o5.size(), 2);
-		
-		try{
-			String result = mapper.writeValueAsString(map3);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-		
-		
-		SampleTaggedLogAPIEntity e4 = new SampleTaggedLogAPIEntity();
-		e4.setTags(new HashMap<String, String>());
-		e4.getTags().put("cluster", "cluster1");
-		// rack is set to null
-//		e4.getTags().put("rack", "rack124");
-		e4.setDescription("this is description 3");
-		limit = 2;
-		BucketQuery query4 = new BucketQuery(bucketFields, limit);
-		query4.put(e1);
-		query4.put(e2);
-		query4.put(e3);
-		query4.put(e4);
-		Map<String, Object> map4 = query4.get();
-		Map<String, Object> o6 = (Map<String, Object>)map4.get("cluster1");
-		List<TaggedLogAPIEntity> o7 = (List<TaggedLogAPIEntity>)o6.get("rack124");
-		Assert.assertEquals(1, o7.size());
-		List<TaggedLogAPIEntity> o8 = (List<TaggedLogAPIEntity>)o6.get("rack123");
-		Assert.assertEquals(o8.size(), 2);
-		List<TaggedLogAPIEntity> o9 = (List<TaggedLogAPIEntity>)o6.get("unassigned");
-		Assert.assertEquals(o9.size(), 1);
-		
-		try{
-			String result = mapper.writeValueAsString(map4);
-			System.out.println(result);
-		}catch(Exception ex){
-			ex.printStackTrace();
-			Assert.fail("can not serialize bucket query result");
-		}
-	}
-
-	@Test
-	public void test() {
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestFlatAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestFlatAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestFlatAggregator.java
deleted file mode 100755
index 3fdf322..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestFlatAggregator.java
+++ /dev/null
@@ -1,400 +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.query.aggregate.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.query.aggregate.timeseries.FlatAggregator;
-import junit.framework.Assert;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.test.TestEntity;
-
-public class TestFlatAggregator {
-	private static final Logger LOG = LoggerFactory.getLogger(TestFlatAggregator.class);
-	@Test
-	public void testCounting(){
-		
-	}
-	
-	@Test
-	public void testSummary(){
-		
-	}
-	
-	@Test
-	public void testAverage(){
-		
-	}
-	
-	@Test
-	public void testIterativeAggregation(){
-		
-	}
-	
-	@SuppressWarnings("serial")
-	private TestEntity createEntity(final String cluster, final String datacenter, final String rack, int numHosts, long numClusters){
-		TestEntity entity = new TestEntity();
-		Map<String, String> tags = new HashMap<String, String>(){{
-			put("cluster", cluster);
-			put("datacenter", datacenter);
-			put("rack", rack);
-		}}; 
-		entity.setTags(tags);
-		entity.setNumHosts(numHosts);
-		entity.setNumClusters(numClusters);
-		return entity;
-	}
-
-	@Test
-	public void testZeroGroupbyFieldSingleFunctionForSummary(){
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		
-		FlatAggregator agg = new FlatAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+
-					entities[2].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+
-					entities[2].getNumClusters()+entities[3].getNumClusters()+entities[4].getNumClusters()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(new ArrayList<String>()).get(0), (double)(5));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testSingleGroupbyFieldSingleFunctionForSummary(){
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc2", "rack126", 15, 2);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts())+entities[3].getNumHosts());
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), (double)(entities[4].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+entities[2].getNumClusters()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), (double)(entities[3].getNumClusters()+entities[4].getNumClusters()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numClusters"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+entities[2].getNumClusters())+entities[3].getNumClusters());
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), (double)(entities[4].getNumClusters()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	
-	@Test
-	public void testSingleGroupbyFieldSingleFunctionForCount(){
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc2", "rack126", 15, 2);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), (double)(3));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), (double)(2));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(4));
-			Assert.assertEquals(result.get(Arrays.asList("dc2")).get(0), (double)(1));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleFieldsSingleFunctionForSummary(){
-		TestEntity[] entities = new TestEntity[6];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		entities[5] = createEntity("cluster2", null, "rack126", 1, 3);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(3, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1")).get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned")).get(0), (double)(entities[5].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("cluster", "datacenter", "rack"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(5, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack123")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack128")).get(0), (double)(entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack125")).get(0), (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack126")).get(0), (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned", "rack126")).get(0), (double)(entities[5].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleFieldsSingleFunctionForCount(){
-		TestEntity[] entities = new TestEntity[6];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		entities[5] = createEntity("cluster2", null, "rack126", 1, 3);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(3, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1")).get(0), (double)(3));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1")).get(0), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned")).get(0), (double)(1));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("cluster", "datacenter", "rack"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(5, result.size());
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack123")).get(0), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "dc1", "rack128")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack125")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "dc1", "rack126")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "unassigned", "rack126")).get(0), (double)(1));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testSingleGroupbyFieldMultipleFunctions(){
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum, AggregateFunctionType.count), 
-				Arrays.asList("numHosts", "*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 2);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1")).get(1), (double)(3));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2")).get(1), (double)(2));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count, AggregateFunctionType.sum), Arrays.asList("*", "numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(5));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(1), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()+entities[3].getNumHosts())+entities[4].getNumHosts());
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new FlatAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.count, AggregateFunctionType.sum, AggregateFunctionType.sum), 
-				Arrays.asList("*", "numHosts", "numClusters"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 1);
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(0), (double)(5));
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(1), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()+entities[3].getNumHosts())+entities[4].getNumHosts());
-			Assert.assertEquals(result.get(Arrays.asList("dc1")).get(2), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+entities[2].getNumClusters()+entities[3].getNumClusters())+entities[4].getNumClusters());
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testMultipleGroupbyFieldsMultipleFunctions(){
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		
-		FlatAggregator agg = new FlatAggregator(Arrays.asList("cluster", "rack"), Arrays.asList(AggregateFunctionType.sum, AggregateFunctionType.count), 
-				Arrays.asList("numHosts", "*"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = agg.result();
-			Assert.assertEquals(result.size(), 4);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack123")).get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack123")).get(1), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack128")).get(0), (double)(entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "rack128")).get(1), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack125")).get(0), (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack125")).get(1), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack126")).get(0), (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "rack126")).get(1), (double)(1));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestGroupbyFieldComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestGroupbyFieldComparator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestGroupbyFieldComparator.java
deleted file mode 100644
index 5fec950..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestGroupbyFieldComparator.java
+++ /dev/null
@@ -1,35 +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.query.aggregate.test;
-
-import java.util.Arrays;
-
-import org.apache.eagle.query.aggregate.timeseries.GroupbyFieldsComparator;
-import org.junit.Assert;
-import org.junit.Test;
-
-
-public class TestGroupbyFieldComparator {
-	@Test
-	public void testStringListCompare(){
-		GroupbyFieldsComparator c = new GroupbyFieldsComparator();
-		Assert.assertTrue(c.compare(Arrays.asList("ab"), Arrays.asList("ac"))<0);
-		Assert.assertTrue(c.compare(Arrays.asList("xy"), Arrays.asList("cd"))>0);
-		Assert.assertTrue(c.compare(Arrays.asList("xy"), Arrays.asList("xy"))==0);
-		Assert.assertTrue(c.compare(Arrays.asList("xy", "ab"), Arrays.asList("xy", "ac"))<0);
-	}
-}


[28/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.tokens
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.tokens b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.tokens
deleted file mode 100755
index 5ebca36..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.tokens
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-WHITESPACE=1
-OP=2
-AND=3
-OR=4
-ID=5
-VALUE=6
-SINGLE_VALUE=7
-EXPR=8
-NUMBER=9
-NULL=10
-SET=11
-DOUBLEQUOTED_STRING=12
-LPAREN=13
-RPAREN=14
-LBRACE=15
-RBRACE=16
-'('=13
-')'=14
-'{'=15
-'}'=16

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterListener.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterListener.java
deleted file mode 100755
index 1d7cb57..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterListener.java
+++ /dev/null
@@ -1,57 +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.
- */
-// Generated from EagleFilter.g4 by ANTLR 4.5
-package org.apache.eagle.query.antlr.generated;
-
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-
-/**
- * This interface defines a complete listener for a parse tree produced by
- * {@link EagleFilterParser}.
- */
-public interface EagleFilterListener extends ParseTreeListener {
-	/**
-	 * Enter a parse tree produced by {@link EagleFilterParser#filter}.
-	 * @param ctx the parse tree
-	 */
-	void enterFilter(EagleFilterParser.FilterContext ctx);
-	/**
-	 * Exit a parse tree produced by {@link EagleFilterParser#filter}.
-	 * @param ctx the parse tree
-	 */
-	void exitFilter(EagleFilterParser.FilterContext ctx);
-	/**
-	 * Enter a parse tree produced by {@link EagleFilterParser#combine}.
-	 * @param ctx the parse tree
-	 */
-	void enterCombine(EagleFilterParser.CombineContext ctx);
-	/**
-	 * Exit a parse tree produced by {@link EagleFilterParser#combine}.
-	 * @param ctx the parse tree
-	 */
-	void exitCombine(EagleFilterParser.CombineContext ctx);
-	/**
-	 * Enter a parse tree produced by {@link EagleFilterParser#equation}.
-	 * @param ctx the parse tree
-	 */
-	void enterEquation(EagleFilterParser.EquationContext ctx);
-	/**
-	 * Exit a parse tree produced by {@link EagleFilterParser#equation}.
-	 * @param ctx the parse tree
-	 */
-	void exitEquation(EagleFilterParser.EquationContext ctx);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterParser.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterParser.java
deleted file mode 100755
index 3016bd7..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterParser.java
+++ /dev/null
@@ -1,364 +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.
- */
-// Generated from EagleFilter.g4 by ANTLR 4.5
-package org.apache.eagle.query.antlr.generated;
-
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class EagleFilterParser extends Parser {
-	static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); }
-
-	protected static final DFA[] _decisionToDFA;
-	protected static final PredictionContextCache _sharedContextCache =
-		new PredictionContextCache();
-	public static final int
-		WHITESPACE=1, OP=2, AND=3, OR=4, ID=5, VALUE=6, SINGLE_VALUE=7, EXPR=8, 
-		NUMBER=9, NULL=10, SET=11, DOUBLEQUOTED_STRING=12, LPAREN=13, RPAREN=14, 
-		LBRACE=15, RBRACE=16;
-	public static final int
-		RULE_filter = 0, RULE_combine = 1, RULE_equation = 2;
-	public static final String[] ruleNames = {
-		"filter", "combine", "equation"
-	};
-
-	private static final String[] _LITERAL_NAMES = {
-		null, null, null, null, null, null, null, null, null, null, null, null, 
-		null, "'('", "')'", "'{'", "'}'"
-	};
-	private static final String[] _SYMBOLIC_NAMES = {
-		null, "WHITESPACE", "OP", "AND", "OR", "ID", "VALUE", "SINGLE_VALUE", 
-		"EXPR", "NUMBER", "NULL", "SET", "DOUBLEQUOTED_STRING", "LPAREN", "RPAREN", 
-		"LBRACE", "RBRACE"
-	};
-	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
-	/**
-	 * @deprecated Use {@link #VOCABULARY} instead.
-	 */
-	@Deprecated
-	public static final String[] tokenNames;
-	static {
-		tokenNames = new String[_SYMBOLIC_NAMES.length];
-		for (int i = 0; i < tokenNames.length; i++) {
-			tokenNames[i] = VOCABULARY.getLiteralName(i);
-			if (tokenNames[i] == null) {
-				tokenNames[i] = VOCABULARY.getSymbolicName(i);
-			}
-
-			if (tokenNames[i] == null) {
-				tokenNames[i] = "<INVALID>";
-			}
-		}
-	}
-
-	@Override
-	@Deprecated
-	public String[] getTokenNames() {
-		return tokenNames;
-	}
-
-	@Override
-
-	public Vocabulary getVocabulary() {
-		return VOCABULARY;
-	}
-
-	@Override
-	public String getGrammarFileName() { return "EagleFilter.g4"; }
-
-	@Override
-	public String[] getRuleNames() { return ruleNames; }
-
-	@Override
-	public String getSerializedATN() { return _serializedATN; }
-
-	@Override
-	public ATN getATN() { return _ATN; }
-
-	public EagleFilterParser(TokenStream input) {
-		super(input);
-		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
-	}
-	public static class FilterContext extends ParserRuleContext {
-		public CombineContext combine() {
-			return getRuleContext(CombineContext.class,0);
-		}
-		public TerminalNode EOF() { return getToken(EagleFilterParser.EOF, 0); }
-		public FilterContext(ParserRuleContext parent, int invokingState) {
-			super(parent, invokingState);
-		}
-		@Override public int getRuleIndex() { return RULE_filter; }
-		@Override
-		public void enterRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).enterFilter(this);
-		}
-		@Override
-		public void exitRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).exitFilter(this);
-		}
-	}
-
-	public final FilterContext filter() throws RecognitionException {
-		FilterContext _localctx = new FilterContext(_ctx, getState());
-		enterRule(_localctx, 0, RULE_filter);
-		try {
-			enterOuterAlt(_localctx, 1);
-			{
-			setState(6);
-			combine(0);
-			setState(7);
-			match(EOF);
-			}
-		}
-		catch (RecognitionException re) {
-			_localctx.exception = re;
-			_errHandler.reportError(this, re);
-			_errHandler.recover(this, re);
-		}
-		finally {
-			exitRule();
-		}
-		return _localctx;
-	}
-
-	public static class CombineContext extends ParserRuleContext {
-		public TerminalNode LPAREN() { return getToken(EagleFilterParser.LPAREN, 0); }
-		public List<CombineContext> combine() {
-			return getRuleContexts(CombineContext.class);
-		}
-		public CombineContext combine(int i) {
-			return getRuleContext(CombineContext.class,i);
-		}
-		public TerminalNode RPAREN() { return getToken(EagleFilterParser.RPAREN, 0); }
-		public EquationContext equation() {
-			return getRuleContext(EquationContext.class,0);
-		}
-		public TerminalNode AND() { return getToken(EagleFilterParser.AND, 0); }
-		public TerminalNode OR() { return getToken(EagleFilterParser.OR, 0); }
-		public CombineContext(ParserRuleContext parent, int invokingState) {
-			super(parent, invokingState);
-		}
-		@Override public int getRuleIndex() { return RULE_combine; }
-		@Override
-		public void enterRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).enterCombine(this);
-		}
-		@Override
-		public void exitRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).exitCombine(this);
-		}
-	}
-
-	public final CombineContext combine() throws RecognitionException {
-		return combine(0);
-	}
-
-	private CombineContext combine(int _p) throws RecognitionException {
-		ParserRuleContext _parentctx = _ctx;
-		int _parentState = getState();
-		CombineContext _localctx = new CombineContext(_ctx, _parentState);
-		CombineContext _prevctx = _localctx;
-		int _startState = 2;
-		enterRecursionRule(_localctx, 2, RULE_combine, _p);
-		try {
-			int _alt;
-			enterOuterAlt(_localctx, 1);
-			{
-			setState(15);
-			switch (_input.LA(1)) {
-			case LPAREN:
-				{
-				setState(10);
-				match(LPAREN);
-				setState(11);
-				combine(0);
-				setState(12);
-				match(RPAREN);
-				}
-				break;
-			case ID:
-			case VALUE:
-				{
-				setState(14);
-				equation();
-				}
-				break;
-			default:
-				throw new NoViableAltException(this);
-			}
-			_ctx.stop = _input.LT(-1);
-			setState(25);
-			_errHandler.sync(this);
-			_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
-			while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
-				if ( _alt==1 ) {
-					if ( _parseListeners!=null ) triggerExitRuleEvent();
-					_prevctx = _localctx;
-					{
-					setState(23);
-					switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
-					case 1:
-						{
-						_localctx = new CombineContext(_parentctx, _parentState);
-						pushNewRecursionContext(_localctx, _startState, RULE_combine);
-						setState(17);
-						if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
-						setState(18);
-						match(AND);
-						setState(19);
-						combine(3);
-						}
-						break;
-					case 2:
-						{
-						_localctx = new CombineContext(_parentctx, _parentState);
-						pushNewRecursionContext(_localctx, _startState, RULE_combine);
-						setState(20);
-						if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
-						setState(21);
-						match(OR);
-						setState(22);
-						combine(2);
-						}
-						break;
-					}
-					} 
-				}
-				setState(27);
-				_errHandler.sync(this);
-				_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
-			}
-			}
-		}
-		catch (RecognitionException re) {
-			_localctx.exception = re;
-			_errHandler.reportError(this, re);
-			_errHandler.recover(this, re);
-		}
-		finally {
-			unrollRecursionContexts(_parentctx);
-		}
-		return _localctx;
-	}
-
-	public static class EquationContext extends ParserRuleContext {
-		public List<TerminalNode> VALUE() { return getTokens(EagleFilterParser.VALUE); }
-		public TerminalNode VALUE(int i) {
-			return getToken(EagleFilterParser.VALUE, i);
-		}
-		public TerminalNode OP() { return getToken(EagleFilterParser.OP, 0); }
-		public TerminalNode ID() { return getToken(EagleFilterParser.ID, 0); }
-		public EquationContext(ParserRuleContext parent, int invokingState) {
-			super(parent, invokingState);
-		}
-		@Override public int getRuleIndex() { return RULE_equation; }
-		@Override
-		public void enterRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).enterEquation(this);
-		}
-		@Override
-		public void exitRule(ParseTreeListener listener) {
-			if ( listener instanceof EagleFilterListener ) ((EagleFilterListener)listener).exitEquation(this);
-		}
-	}
-
-	public final EquationContext equation() throws RecognitionException {
-		EquationContext _localctx = new EquationContext(_ctx, getState());
-		enterRule(_localctx, 4, RULE_equation);
-		try {
-			setState(34);
-			switch (_input.LA(1)) {
-			case VALUE:
-				enterOuterAlt(_localctx, 1);
-				{
-				setState(28);
-				match(VALUE);
-				setState(29);
-				match(OP);
-				setState(30);
-				match(VALUE);
-				}
-				break;
-			case ID:
-				enterOuterAlt(_localctx, 2);
-				{
-				setState(31);
-				match(ID);
-				setState(32);
-				match(OP);
-				setState(33);
-				match(VALUE);
-				}
-				break;
-			default:
-				throw new NoViableAltException(this);
-			}
-		}
-		catch (RecognitionException re) {
-			_localctx.exception = re;
-			_errHandler.reportError(this, re);
-			_errHandler.recover(this, re);
-		}
-		finally {
-			exitRule();
-		}
-		return _localctx;
-	}
-
-	public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
-		switch (ruleIndex) {
-		case 1:
-			return combine_sempred((CombineContext)_localctx, predIndex);
-		}
-		return true;
-	}
-	private boolean combine_sempred(CombineContext _localctx, int predIndex) {
-		switch (predIndex) {
-		case 0:
-			return precpred(_ctx, 2);
-		case 1:
-			return precpred(_ctx, 1);
-		}
-		return true;
-	}
-
-	public static final String _serializedATN =
-		"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\22\'\4\2\t\2\4\3"+
-		"\t\3\4\4\t\4\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\5\3\22\n\3\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\7\3\32\n\3\f\3\16\3\35\13\3\3\4\3\4\3\4\3\4\3\4\3\4\5\4"+
-		"%\n\4\3\4\2\3\4\5\2\4\6\2\2\'\2\b\3\2\2\2\4\21\3\2\2\2\6$\3\2\2\2\b\t"+
-		"\5\4\3\2\t\n\7\2\2\3\n\3\3\2\2\2\13\f\b\3\1\2\f\r\7\17\2\2\r\16\5\4\3"+
-		"\2\16\17\7\20\2\2\17\22\3\2\2\2\20\22\5\6\4\2\21\13\3\2\2\2\21\20\3\2"+
-		"\2\2\22\33\3\2\2\2\23\24\f\4\2\2\24\25\7\5\2\2\25\32\5\4\3\5\26\27\f\3"+
-		"\2\2\27\30\7\6\2\2\30\32\5\4\3\4\31\23\3\2\2\2\31\26\3\2\2\2\32\35\3\2"+
-		"\2\2\33\31\3\2\2\2\33\34\3\2\2\2\34\5\3\2\2\2\35\33\3\2\2\2\36\37\7\b"+
-		"\2\2\37 \7\4\2\2 %\7\b\2\2!\"\7\7\2\2\"#\7\4\2\2#%\7\b\2\2$\36\3\2\2\2"+
-		"$!\3\2\2\2%\7\3\2\2\2\6\21\31\33$";
-	public static final ATN _ATN =
-		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
-	static {
-		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
-		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
-			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ANDExpression.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ANDExpression.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ANDExpression.java
deleted file mode 100644
index f575e0f..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ANDExpression.java
+++ /dev/null
@@ -1,33 +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.query.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ANDExpression {
-	// TODO use Set data structure to dedupe for optimization?
-	private List<AtomicExpression> atomicExpressionList = new ArrayList<AtomicExpression>();
-
-	public List<AtomicExpression> getAtomicExprList() {
-		return atomicExpressionList;
-	}
-
-	public void setAtomicExprList(List<AtomicExpression> list) {
-		this.atomicExpressionList = list;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/AtomicExpression.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/AtomicExpression.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/AtomicExpression.java
deleted file mode 100755
index f831ede..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/AtomicExpression.java
+++ /dev/null
@@ -1,67 +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.query.parser;
-
-public class AtomicExpression {
-	private String key;
-	private ComparisonOperator op;
-	private String value;
-	private TokenType keyType;
-	private TokenType valueType;
-
-	public String getKey() {
-		return key;
-	}
-	public void setKey(String key) {
-		this.key = key;
-	}
-	public ComparisonOperator getOp() {
-		return op;
-	}
-	public void setOp(ComparisonOperator op) {
-		this.op = op;
-	}
-	public String getValue() {
-		return value;
-	}
-	public void setValue(String value) {
-		this.value = value;
-	}
-	public String toString(){
-		if(this.valueType == TokenType.STRING){
-			return key + op + "\"" + value + "\"";
-		}else{
-			return key + op + value;
-		}
-	}
-
-	public TokenType getKeyType() {
-		return keyType;
-	}
-
-	public void setKeyType(TokenType keyType) {
-		this.keyType = keyType;
-	}
-	
-	public TokenType getValueType() {
-		return valueType;
-	}
-
-	public void setValueType(TokenType type) {
-		this.valueType = type;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ComparisonOperator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ComparisonOperator.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ComparisonOperator.java
deleted file mode 100755
index 3a1be37..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ComparisonOperator.java
+++ /dev/null
@@ -1,55 +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.query.parser;
-
-public enum ComparisonOperator {
-	EQUAL("="),
-	LIKE("=~"),
-	IN("IN"),
-	NOT_IN("NOT IN"),
-	LESS("<"),
-	LESS_OR_EQUAL("<="),
-	GREATER(">"),
-	GREATER_OR_EQUAL(">="),
-	NOT_EQUAL("!="),
-	NOT_LIKE("!=~"),
-	CONTAINS("CONTAINS"),
-	NOT_CONTAINS("NOT CONTAINS"),
-	IS("IS"),
-	IS_NOT("IS NOT");
-
-	private final String _op;
-	private ComparisonOperator(String op){
-		_op = op;
-	}
-	
-	public String toString(){
-		return _op;
-	}
-	
-	public static ComparisonOperator locateOperator(String op){
-		op = op.replaceAll("\\s+"," ");
-		for(ComparisonOperator o : ComparisonOperator.values()){
-			if(op.toUpperCase().equals(o._op)){
-				return o;
-			}
-		}
-		throw new UnsupportedExpressionOperatorException(op);
-	}
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleANTLRErrorStrategy.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleANTLRErrorStrategy.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleANTLRErrorStrategy.java
deleted file mode 100644
index e016ea9..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleANTLRErrorStrategy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.parser;
-
-import org.antlr.v4.runtime.*;
-
-public class EagleANTLRErrorStrategy extends DefaultErrorStrategy {
-	/** Instead of recovering from exception {@code e}, re-throw it wrapped
-	 *  in a {@link org.antlr.v4.runtime.misc.ParseCancellationException} so it is not caught by the
-	 *  rule function catches.  Use {@link Exception#getCause()} to get the
-	 *  original {@link org.antlr.v4.runtime.RecognitionException}.
-	 */
-	@Override
-	public void recover(Parser recognizer, RecognitionException e) {
-		for (ParserRuleContext context = recognizer.getContext(); context != null; context = context.getParent()) {
-			context.exception = e;
-		}
-		super.recover(recognizer,e);
-	}
-
-	/** Make sure we don't attempt to recover inline; if the parser
-	 *  successfully recovers, it won't throw an exception.
-	 */
-	@Override
-	public Token recoverInline(Parser recognizer)
-			throws RecognitionException
-	{
-		InputMismatchException e = new InputMismatchException(recognizer);
-		for (ParserRuleContext context = recognizer.getContext(); context != null; context = context.getParent()) {
-			context.exception = e;
-		}
-		return super.recoverInline(recognizer);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryFilterListenerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryFilterListenerImpl.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryFilterListenerImpl.java
deleted file mode 100755
index a631e53..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryFilterListenerImpl.java
+++ /dev/null
@@ -1,176 +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.query.parser;
-
-import org.apache.eagle.query.antlr.generated.EagleFilterListener;
-import org.apache.eagle.query.antlr.generated.EagleFilterParser;
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Stack;
-import java.util.regex.Matcher;
-
-public class EagleQueryFilterListenerImpl implements EagleFilterListener{
-	private final static Logger LOG = LoggerFactory.getLogger(EagleQueryFilterListenerImpl.class);
-	private Stack<ORExpression> _stack = new Stack<ORExpression>();
-	
-	public ORExpression result(){
-		return _stack.pop();
-	}
-	
-	public void enterEquation(EagleFilterParser.EquationContext ctx){
-	}
-	
-	public void exitEquation(EagleFilterParser.EquationContext ctx){
-		TerminalNode id = ctx.ID();
-		TerminalNode op = ctx.OP();
-		List<TerminalNode> values = ctx.VALUE();
-		TerminalNode value = values.get(0);
-
-		if(values.size() == 2){
-			// value op value
-			id = values.get(0);
-			value = values.get(1);
-		}
-
-		if(LOG.isDebugEnabled()) LOG.debug("ID:" + id.getText() + ", OP:" + op.getText() + ", VALUE:" + value);
-
-		AtomicExpression kv = new AtomicExpression();
-		kv.setKey(id.getText());
-		kv.setOp(ComparisonOperator.locateOperator(op.getText()));
-
-		try{
-			kv.setValueType(TokenType.locate(value.getText()));
-		}catch (Exception ex){
-			LOG.error("Failed to locate value type for: " + value.getText() + " due to exception: " + ex.getMessage(), ex);
-		}
-
-		try{
-			kv.setKeyType(TokenType.locate(id.getText()));
-		}catch (Exception ex){
-			LOG.error("Failed to locate id type for: " + id.getText() + " due to exception: " + ex.getMessage(), ex);
-		}
-
-//		if(id != null){
-			kv.setKey(postProcessNode(id.getText(),kv.getKeyType()));
-//		}
-
-//		if(value != null){
-			kv.setValue(postProcessNode(value.getText(),kv.getValueType()));
-			// As to List value, it will escape in List parser but not here
-			if(kv.getValueType() != TokenType.LIST) kv.setValue(StringEscapeUtils.unescapeJava(kv.getValue()));
-//		}
-
-		// push to stack
-		ORExpression orExpr = new ORExpression();
-		ANDExpression andExpr = new ANDExpression();
-		andExpr.getAtomicExprList().add(kv);
-		orExpr.getANDExprList().add(andExpr);
-		_stack.push(orExpr);
-	}
-
-	private String postProcessNode(String text,TokenType type){
-		int len = text.length();
-		int start=0,end = len;
-		if(text.startsWith("\"")) start=1;
-		if(text.endsWith("\"")) end = len -1;
-		text = text.substring(start, end);
-		if(type == TokenType.EXP){
-			Matcher matcher = TokenConstant.EXP_PATTERN.matcher(text);
-			if(matcher.find()){
-				text = matcher.group(1);
-			}
-			text = text.replace(TokenConstant.ID_PREFIX,TokenConstant.WHITE_SPACE);
-		}
-		return text;
-	}
-
-	public void enterCombine(EagleFilterParser.CombineContext ctx){
-		
-	}
-	
-	public void exitCombine(EagleFilterParser.CombineContext ctx){
-		int numChild = ctx.getChildCount();
-		if(numChild == 1){
-			if(LOG.isDebugEnabled()) LOG.debug("Only one child, skip ...");
-			return; // does nothing for a combine which has only one equation
-		}
-		
-		if((ctx.LPAREN() != null) && (ctx.RPAREN() != null)){
-			if(LOG.isDebugEnabled()) LOG.debug("LPAREN + RPAREN rule matched, skip ...");
-			return; // does nothing for a combine which is within parenthesis
-		}
-		ORExpression orExprRight = _stack.pop();
-		ORExpression orExprLeft = _stack.pop();
-		TerminalNode node = ctx.AND();
-		if(node != null){
-			ORExpression newORExpr = new ORExpression();
-			for(ANDExpression left : orExprLeft.getANDExprList()){
-				for(ANDExpression right : orExprRight.getANDExprList()){
-					ANDExpression tmp = new ANDExpression();
-					tmp.getAtomicExprList().addAll(left.getAtomicExprList());
-					tmp.getAtomicExprList().addAll(right.getAtomicExprList());
-					newORExpr.getANDExprList().add(tmp);
-				}
-			}
-			_stack.push(newORExpr);
-			return;
-		}
-		
-		node = ctx.OR();
-		if(node != null){
-			ORExpression newORExpr = new ORExpression();
-			for(ANDExpression andExpr : orExprLeft.getANDExprList()){
-				newORExpr.getANDExprList().add(andExpr);
-			}
-			for(ANDExpression andExpr : orExprRight.getANDExprList()){
-				newORExpr.getANDExprList().add(andExpr);
-			}
-			_stack.push(newORExpr);
-			return;
-		}
-		LOG.warn("Should never come here!");
-	}
-
-	public void enterFilter(EagleFilterParser.FilterContext ctx){
-		
-	}
-	
-	public void exitFilter(EagleFilterParser.FilterContext ctx){
-		// print all relations (KeyValueFilter AND KeyValueFilter) OR (KeyValueFilter AND KeyValueFilter) OR (KeyValueFilter AND KeyValueFilter)"
-		ORExpression orExpr = _stack.peek();
-		if(LOG.isDebugEnabled()) LOG.debug(orExpr.toString());
-	}
-	
-	public void visitTerminal(TerminalNode node){
-		
-	}
-	public void visitErrorNode(ErrorNode node){
-
-	}
-    public void enterEveryRule(ParserRuleContext ctx){
-    }
-    
-    public void exitEveryRule(ParserRuleContext ctx){
-    	
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParseException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParseException.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParseException.java
deleted file mode 100755
index 48fc694..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParseException.java
+++ /dev/null
@@ -1,29 +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.query.parser;
-
-public class EagleQueryParseException extends Exception{
-	private static final long serialVersionUID = -8440811651318471641L;
-
-	public EagleQueryParseException(String message){
-		super(message);
-	}
-
-	public EagleQueryParseException(String message, Throwable cause) {
-		super(message, cause);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParser.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParser.java
deleted file mode 100755
index f2315b2..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/EagleQueryParser.java
+++ /dev/null
@@ -1,54 +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.query.parser;
-
-import org.apache.eagle.query.antlr.generated.EagleFilterLexer;
-import org.apache.eagle.query.antlr.generated.EagleFilterParser;
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class EagleQueryParser {
-	private static final Logger LOG = LoggerFactory.getLogger(EagleQueryParser.class);
-	private String _query;
-	public EagleQueryParser(String query){
-		_query = query;
-	}
-
-	public ORExpression parse() throws EagleQueryParseException{
-		try{
-			EagleFilterLexer lexer = new EagleFilterLexer(new ANTLRInputStream(_query));
-			CommonTokenStream tokens = new CommonTokenStream(lexer);
-			tokens.fill();
-			EagleFilterParser p = new EagleFilterParser(tokens);
-			p.setErrorHandler(new EagleANTLRErrorStrategy());
-			p.setBuildParseTree(true);
-			EagleQueryFilterListenerImpl listener = new EagleQueryFilterListenerImpl(); 
-			p.addParseListener(listener);
-			EagleFilterParser.FilterContext fc = p.filter();
-			if(fc.exception != null){
-				LOG.error("Can not successfully parse the query:" + _query, fc.exception);
-				throw fc.exception;
-			}
-			return listener.result();
-		}catch(Exception ex){
-			LOG.error("Can not successfully parse the query:", ex);
-			throw new EagleQueryParseException("can not successfully parse the query:" + _query);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/LogicalOperator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/LogicalOperator.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/LogicalOperator.java
deleted file mode 100644
index 374186e..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/LogicalOperator.java
+++ /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.
- */
-package org.apache.eagle.query.parser;
-
-public enum LogicalOperator {
-	AND,
-	OR,
-	NOT
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ORExpression.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ORExpression.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ORExpression.java
deleted file mode 100644
index 3a43a6d..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/ORExpression.java
+++ /dev/null
@@ -1,60 +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.query.parser;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ORExpression {
-	private List<ANDExpression> andExprList = new ArrayList<ANDExpression>();
-
-	public List<ANDExpression> getANDExprList() {
-		return andExprList;
-	}
-
-	public void setANDExprList(List<ANDExpression> list) {
-		this.andExprList = list;
-	}
-	
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		boolean first = true;
-		for(ANDExpression andRel : andExprList){
-			if(first)
-				first = false;
-			else{
-				sb.append(" ");
-				sb.append(LogicalOperator.OR);
-				sb.append(" ");
-			}
-			sb.append("(");
-			boolean firstAND = true;
-			for(AtomicExpression kv : andRel.getAtomicExprList()){
-				if(firstAND)
-					firstAND = false;
-				else{
-					sb.append(" ");
-					sb.append(LogicalOperator.AND);
-					sb.append(" ");
-				}
-				sb.append(kv);
-			}
-			sb.append(")");
-		}
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenConstant.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenConstant.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenConstant.java
deleted file mode 100755
index f93a63e..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenConstant.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.parser;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public final class TokenConstant {
-    public final static Pattern EXP_PATTERN= Pattern.compile("^EXP\\{(.+)\\}(\\s+AS\\s+)?\\s*(.+)?\\s*$",Pattern.CASE_INSENSITIVE);
-    public final static Pattern STRING_PATTERN= Pattern.compile("^(\"(.*?\n)*.*\")$");
-    public final static Pattern ARRAY_PATTERN= Pattern.compile("^(\\(.*\\))$");
-    public final static Pattern NUMBER_PATTERN= Pattern.compile("^((-|\\+)?\\s*[0-9]+(\\.[0-9]+)?)$");
-    public final static Pattern NULL_PATTERN= Pattern.compile("^(NULL|null)$");
-    public final static Pattern ID_PATTERN= Pattern.compile("^@(.+)$");
-
-    public final static String ID_PREFIX = "@";
-    public final static String WHITE_SPACE = "";
-
-    public static boolean isExpression(String query){
-        if(query == null) return false;
-        Matcher matcher = EXP_PATTERN.matcher(query);
-        return matcher.matches();
-    }
-
-    /**
-     * EXP{ expression } AS alias  => expression
-     *
-     * @param expression
-     * @return
-     */
-    public static String parseExpressionContent(String expression){
-        Matcher matcher = EXP_PATTERN.matcher(expression);
-        if(matcher.find()){
-            expression = matcher.group(1);
-        }
-        return expression;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenType.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenType.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenType.java
deleted file mode 100755
index 2707c60..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/TokenType.java
+++ /dev/null
@@ -1,44 +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.query.parser;
-
-public enum TokenType {
-	EXP, NUMBER, STRING, LIST, NULL,ID;
-
-	public static TokenType locate(String tokenText){
-		String _value = tokenText.trim();
-		if (TokenConstant.EXP_PATTERN.matcher(_value).matches()) {
-			// e.q. "value" with EXP{...}
-			return EXP;
-		}else if(TokenConstant.STRING_PATTERN.matcher(_value).matches()){
-			// e.q. "value" with quotes
-			return STRING;
-		}else if(TokenConstant.ARRAY_PATTERN.matcher(_value).matches()){
-			// e.q. (item1,item2,..)
-			return LIST;
-		}else if(TokenConstant.NUMBER_PATTERN.matcher(_value).matches()){
-			// e.q. 1.32 without quotes
-			return NUMBER;
-		}else if(TokenConstant.NULL_PATTERN.matcher(_value).matches()){
-			// e.q. null or NULL without quotes
-			return NULL;
-		} else if(TokenConstant.ID_PATTERN.matcher(_value).matches()){
-			return ID;
-		}
-		throw new IllegalArgumentException("Can't locate type of value text: "+tokenText);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/UnsupportedExpressionOperatorException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/UnsupportedExpressionOperatorException.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/UnsupportedExpressionOperatorException.java
deleted file mode 100644
index 40997c9..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/parser/UnsupportedExpressionOperatorException.java
+++ /dev/null
@@ -1,25 +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.query.parser;
-
-public class UnsupportedExpressionOperatorException extends RuntimeException{
-	private static final long serialVersionUID = 565210592983703093L;
-
-	public UnsupportedExpressionOperatorException(String message){
-		super(message);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/readme.txt
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/readme.txt b/eagle-core/eagle-query/eagle-antlr/src/main/java/readme.txt
deleted file mode 100755
index 40bef8d..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/readme.txt
+++ /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.
- */
-1. Add dependency for antlr 4.0 runtime library
-	<dependency>
-      <groupId>org.antlr</groupId>
-      <artifactId>antlr4-runtime</artifactId>
-      <version>4.0</version>
-    </dependency>
-
-2. Compile the grammar file
-java -jar antlr\antlr-4.0-complete.jar -package eagle.query.antlr.generated -o eagle\query\antlr\generated EagleFilter.g4
-
-3. Test boolean expression parsing
-3.1 Download antlr 4.0 complete library
-http://www.antlr.org/download/antlr-4.0-complete.jar
-3.2 Test
-java -cp  antlr\antlr-4.0-complete.jar;./  org.antlr.v4.runtime.misc.TestRig eagle.query.antlr.generated.EagleFilter filter -gui <path>
\ No newline at end of file


[47/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/catalina.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/catalina.sh b/eagle-assembly/src/main/lib/tomcat/bin/catalina.sh
deleted file mode 100644
index 2d0a6c3..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/catalina.sh
+++ /dev/null
@@ -1,551 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Control Script for the CATALINA Server
-#
-# Environment Variable Prerequisites
-#
-#   Do not set the variables in this script. Instead put them into a script
-#   setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
-#
-#   CATALINA_HOME   May point at your Catalina "build" directory.
-#
-#   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
-#                   of a Catalina installation.  If not present, resolves to
-#                   the same directory that CATALINA_HOME points to.
-#
-#   CATALINA_OUT    (Optional) Full path to a file where stdout and stderr
-#                   will be redirected.
-#                   Default is $CATALINA_BASE/logs/catalina.out
-#
-#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
-#                   "run" or "debug" command is executed.
-#                   Include here and not in JAVA_OPTS all options, that should
-#                   only be used by Tomcat itself, not by the stop process,
-#                   the version command etc.
-#                   Examples are heap size, GC logging, JMX ports etc.
-#
-#   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
-#                   the JVM should use (java.io.tmpdir).  Defaults to
-#                   $CATALINA_BASE/temp.
-#
-#   JAVA_HOME       Must point at your Java Development Kit installation.
-#                   Required to run the with the "debug" argument.
-#
-#   JRE_HOME        Must point at your Java Runtime installation.
-#                   Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
-#                   are both set, JRE_HOME is used.
-#
-#   JAVA_OPTS       (Optional) Java runtime options used when any command
-#                   is executed.
-#                   Include here and not in CATALINA_OPTS all options, that
-#                   should be used by Tomcat and also by the stop process,
-#                   the version command etc.
-#                   Most options should go into CATALINA_OPTS.
-#
-#   JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
-#                   containing some jars in order to allow replacement of APIs
-#                   created outside of the JCP (i.e. DOM and SAX from W3C).
-#                   It can also be used to update the XML parser implementation.
-#                   Defaults to $CATALINA_HOME/endorsed.
-#
-#   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
-#                   command is executed. The default is "dt_socket".
-#
-#   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
-#                   command is executed. The default is 8000.
-#
-#   JPDA_SUSPEND    (Optional) Java runtime options used when the "jpda start"
-#                   command is executed. Specifies whether JVM should suspend
-#                   execution immediately after startup. Default is "n".
-#
-#   JPDA_OPTS       (Optional) Java runtime options used when the "jpda start"
-#                   command is executed. If used, JPDA_TRANSPORT, JPDA_ADDRESS,
-#                   and JPDA_SUSPEND are ignored. Thus, all required jpda
-#                   options MUST be specified. The default is:
-#
-#                   -agentlib:jdwp=transport=$JPDA_TRANSPORT,
-#                       address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND
-#
-#   CATALINA_PID    (Optional) Path of the file which should contains the pid
-#                   of the catalina startup java process, when start (fork) is
-#                   used
-#
-#   LOGGING_CONFIG  (Optional) Override Tomcat's logging config file
-#                   Example (all one line)
-#                   LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
-#
-#   LOGGING_MANAGER (Optional) Override Tomcat's logging manager
-#                   Example (all one line)
-#                   LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
-# -----------------------------------------------------------------------------
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-darwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-Darwin*) darwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-# Get standard environment variables
-PRGDIR=`dirname "$PRG"`
-
-# Only set CATALINA_HOME if not already set
-[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
-
-# Copy CATALINA_BASE from CATALINA_HOME if not already set
-[ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME"
-
-# Ensure that any user defined CLASSPATH variables are not used on startup,
-# but allow them to be specified in setenv.sh, in rare case when it is needed.
-CLASSPATH=
-
-if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
-  . "$CATALINA_BASE/bin/setenv.sh"
-elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
-  . "$CATALINA_HOME/bin/setenv.sh"
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin; then
-  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
-  [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
-  [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
-  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For OS400
-if $os400; then
-  # Set job priority to standard for interactive (interactive - 6) by using
-  # the interactive priority - 6, the helper threads that respond to requests
-  # will be running at the same priority as interactive jobs.
-  COMMAND='chgjob job('$JOBNAME') runpty(6)'
-  system $COMMAND
-
-  # Enable multi threading
-  export QIBM_MULTI_THREADED=Y
-fi
-
-# Get standard Java environment variables
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  . "$CATALINA_HOME"/bin/setclasspath.sh
-else
-  if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
-    . "$CATALINA_HOME"/bin/setclasspath.sh
-  else
-    echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-# Add on extra jar files to CLASSPATH
-if [ ! -z "$CLASSPATH" ] ; then
-  CLASSPATH="$CLASSPATH":
-fi
-CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar
-
-if [ -z "$CATALINA_OUT" ] ; then
-  CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
-fi
-
-if [ -z "$CATALINA_TMPDIR" ] ; then
-  # Define the java.io.tmpdir to use for Catalina
-  CATALINA_TMPDIR="$CATALINA_BASE"/temp
-fi
-
-# Add tomcat-juli.jar to classpath
-# tomcat-juli.jar can be over-ridden per instance
-if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
-  CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar
-else
-  CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar
-fi
-
-# Bugzilla 37848: When no TTY is available, don't output to console
-have_tty=0
-if [ "`tty`" != "not a tty" ]; then
-    have_tty=1
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
-  JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
-  CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
-  CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
-  CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
-fi
-
-# Set juli LogManager config file if it is present and an override has not been issued
-if [ -z "$LOGGING_CONFIG" ]; then
-  if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
-    LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
-  else
-    # Bugzilla 45585
-    LOGGING_CONFIG="-Dnop"
-  fi
-fi
-
-if [ -z "$LOGGING_MANAGER" ]; then
-  LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
-fi
-
-# Uncomment the following line to make the umask available when using the
-# org.apache.catalina.security.SecurityListener
-#JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
-
-# ----- Execute The Requested Command -----------------------------------------
-
-# Bugzilla 37848: only output this if we have a TTY
-#if [ $have_tty -eq 1 ]; then
-  #echo "Using CATALINA_BASE:   $CATALINA_BASE"
-  #echo "Using CATALINA_HOME:   $CATALINA_HOME"
-  #echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
-  #if [ "$1" = "debug" ] ; then
-  #  echo "Using JAVA_HOME:       $JAVA_HOME"
-  #else
-  #  echo "Using JRE_HOME:        $JRE_HOME"
-  #fi
-  #echo "Using CLASSPATH:       $CLASSPATH"
-  #if [ ! -z "$CATALINA_PID" ]; then
-    #echo "Using CATALINA_PID:    $CATALINA_PID"
-  #fi
-#fi
-
-if [ "$1" = "jpda" ] ; then
-  if [ -z "$JPDA_TRANSPORT" ]; then
-    JPDA_TRANSPORT="dt_socket"
-  fi
-  if [ -z "$JPDA_ADDRESS" ]; then
-    JPDA_ADDRESS="8000"
-  fi
-  if [ -z "$JPDA_SUSPEND" ]; then
-    JPDA_SUSPEND="n"
-  fi
-  if [ -z "$JPDA_OPTS" ]; then
-    JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
-  fi
-  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
-  shift
-fi
-
-if [ "$1" = "debug" ] ; then
-  if $os400; then
-    echo "Debug command not available on OS400"
-    exit 1
-  else
-    shift
-    if [ "$1" = "-security" ] ; then
-      if [ $have_tty -eq 1 ]; then
-        echo "Using Security Manager"
-      fi
-      shift
-      exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-        -sourcepath "$CATALINA_HOME"/../../java \
-        -Djava.security.manager \
-        -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
-        -Dcatalina.base="$CATALINA_BASE" \
-        -Dcatalina.home="$CATALINA_HOME" \
-        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
-        org.apache.catalina.startup.Bootstrap "$@" start
-    else
-      exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-        -sourcepath "$CATALINA_HOME"/../../java \
-        -Dcatalina.base="$CATALINA_BASE" \
-        -Dcatalina.home="$CATALINA_HOME" \
-        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
-        org.apache.catalina.startup.Bootstrap "$@" start
-    fi
-  fi
-
-elif [ "$1" = "run" ]; then
-
-  shift
-  if [ "$1" = "-security" ] ; then
-    if [ $have_tty -eq 1 ]; then
-      echo "Using Security Manager"
-    fi
-    shift
-    eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-      -Djava.security.manager \
-      -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-      -Dcatalina.base="\"$CATALINA_BASE\"" \
-      -Dcatalina.home="\"$CATALINA_HOME\"" \
-      -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-      org.apache.catalina.startup.Bootstrap "$@" start
-  else
-    eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-      -Dcatalina.base="\"$CATALINA_BASE\"" \
-      -Dcatalina.home="\"$CATALINA_HOME\"" \
-      -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-      org.apache.catalina.startup.Bootstrap "$@" start
-  fi
-
-elif [ "$1" = "start" ] ; then
-
-  if [ ! -z "$CATALINA_PID" ]; then
-    if [ -f "$CATALINA_PID" ]; then
-      if [ -s "$CATALINA_PID" ]; then
-        echo "Existing PID file found during start."
-        if [ -r "$CATALINA_PID" ]; then
-          PID=`cat "$CATALINA_PID"`
-          ps -p $PID >/dev/null 2>&1
-          if [ $? -eq 0 ] ; then
-            echo "Eagle service appears to still be running with PID $PID. Start aborted."
-            echo "If the following process is not an eagle service process, remove the PID file and try again:"
-            ps -f -p $PID
-            exit 1
-          else
-            echo "Removing/clearing stale PID file."
-            rm -f "$CATALINA_PID" >/dev/null 2>&1
-            if [ $? != 0 ]; then
-              if [ -w "$CATALINA_PID" ]; then
-                cat /dev/null > "$CATALINA_PID"
-              else
-                echo "Unable to remove or clear stale PID file. Start aborted."
-                exit 1
-              fi
-            fi
-          fi
-        else
-          echo "Unable to read PID file. Start aborted."
-          exit 1
-        fi
-      else
-        rm -f "$CATALINA_PID" >/dev/null 2>&1
-        if [ $? != 0 ]; then
-          if [ ! -w "$CATALINA_PID" ]; then
-            echo "Unable to remove or write to empty PID file. Start aborted."
-            exit 1
-          fi
-        fi
-      fi
-    fi
-  fi
-
-  shift
-  touch "$CATALINA_OUT"
-  if [ "$1" = "-security" ] ; then
-    if [ $have_tty -eq 1 ]; then
-      echo "Using Security Manager"
-    fi
-    shift
-    eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-      -Djava.security.manager \
-      -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
-      -Dcatalina.base="\"$CATALINA_BASE\"" \
-      -Dcatalina.home="\"$CATALINA_HOME\"" \
-      -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-      org.apache.catalina.startup.Bootstrap "$@" start \
-      >> "$CATALINA_OUT" 2>&1 "&"
-
-  else
-    eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-      -Dcatalina.base="\"$CATALINA_BASE\"" \
-      -Dcatalina.home="\"$CATALINA_HOME\"" \
-      -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-      org.apache.catalina.startup.Bootstrap "$@" start \
-      >> "$CATALINA_OUT" 2>&1 "&"
-
-  fi
-
-  if [ ! -z "$CATALINA_PID" ]; then
-    echo $! > "$CATALINA_PID"
-  fi
-
-  echo "Eagle service started."
-
-elif [ "$1" = "stop" ] ; then
-
-  shift
-
-  SLEEP=5
-  if [ ! -z "$1" ]; then
-    echo $1 | grep "[^0-9]" >/dev/null 2>&1
-    if [ $? -gt 0 ]; then
-      SLEEP=$1
-      shift
-    fi
-  fi
-
-  FORCE=0
-  if [ "$1" = "-force" ]; then
-    shift
-    FORCE=1
-  fi
-
-  if [ ! -z "$CATALINA_PID" ]; then
-    if [ -f "$CATALINA_PID" ]; then
-      if [ -s "$CATALINA_PID" ]; then
-        kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
-        if [ $? -gt 0 ]; then
-          echo "PID file found but no matching process was found. Stop aborted."
-          exit 1
-        fi
-      else
-        echo "PID file is empty and has been ignored."
-      fi
-    else
-      echo "\$CATALINA_PID was set but the specified file does not exist. Is eagle service running? Stop aborted."
-      exit 1
-    fi
-  fi
-
-  eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-    -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-    -Dcatalina.base="\"$CATALINA_BASE\"" \
-    -Dcatalina.home="\"$CATALINA_HOME\"" \
-    -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-    org.apache.catalina.startup.Bootstrap "$@" stop
-
-  # stop failed. Shutdown port disabled? Try a normal kill.
-  if [ $? != 0 ]; then
-    if [ ! -z "$CATALINA_PID" ]; then
-      echo "The stop command failed. Attempting to signal the process to stop through OS signal."
-      kill -15 `cat "$CATALINA_PID"` >/dev/null 2>&1
-    fi
-  fi
-
-  if [ ! -z "$CATALINA_PID" ]; then
-    if [ -f "$CATALINA_PID" ]; then
-      while [ $SLEEP -ge 0 ]; do
-        kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
-        if [ $? -gt 0 ]; then
-          rm -f "$CATALINA_PID" >/dev/null 2>&1
-          if [ $? != 0 ]; then
-            if [ -w "$CATALINA_PID" ]; then
-              cat /dev/null > "$CATALINA_PID"
-              # If Tomcat has stopped don't try and force a stop with an empty PID file
-              FORCE=0
-            else
-              echo "The PID file could not be removed or cleared."
-            fi
-          fi
-          echo "Eagle service stopped."
-          break
-        fi
-        if [ $SLEEP -gt 0 ]; then
-          sleep 1
-        fi
-        if [ $SLEEP -eq 0 ]; then
-          if [ $FORCE -eq 0 ]; then
-            echo "Eagle service did not stop in time. PID file was not removed. To aid diagnostics a thread dump has been written to standard out."
-            kill -3 `cat "$CATALINA_PID"`
-          fi
-        fi
-        SLEEP=`expr $SLEEP - 1 `
-      done
-    fi
-  fi
-
-  KILL_SLEEP_INTERVAL=5
-  if [ $FORCE -eq 1 ]; then
-    if [ -z "$CATALINA_PID" ]; then
-      echo "Kill failed: \$CATALINA_PID not set"
-    else
-      if [ -f "$CATALINA_PID" ]; then
-        PID=`cat "$CATALINA_PID"`
-        echo "Killing eagle service with the PID: $PID"
-        kill -9 $PID
-        while [ $KILL_SLEEP_INTERVAL -ge 0 ]; do
-            kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
-            if [ $? -gt 0 ]; then
-                rm -f "$CATALINA_PID" >/dev/null 2>&1
-                if [ $? != 0 ]; then
-                    if [ -w "$CATALINA_PID" ]; then
-                        cat /dev/null > "$CATALINA_PID"
-                    else
-                        echo "The PID file could not be removed."
-                    fi
-                fi
-                # Set this to zero else a warning will be issued about the process still running
-                KILL_SLEEP_INTERVAL=0
-                echo "The eagle process has been killed."
-                break
-            fi
-            if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then
-                sleep 1
-            fi
-            KILL_SLEEP_INTERVAL=`expr $KILL_SLEEP_INTERVAL - 1 `
-        done
-        if [ $KILL_SLEEP_INTERVAL -gt 0 ]; then
-            echo "eagle has not been killed completely yet. The process might be waiting on some system call or might be UNINTERRUPTIBLE."
-        fi
-      fi
-    fi
-  fi
-
-elif [ "$1" = "configtest" ] ; then
-
-    eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
-      -Dcatalina.base="\"$CATALINA_BASE\"" \
-      -Dcatalina.home="\"$CATALINA_HOME\"" \
-      -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
-      org.apache.catalina.startup.Bootstrap configtest
-    result=$?
-    if [ $result -ne 0 ]; then
-        echo "Configuration error detected!"
-    fi
-    exit $result
-
-elif [ "$1" = "version" ] ; then
-
-    "$_RUNJAVA"   \
-      -classpath "$CATALINA_HOME/lib/catalina.jar" \
-      org.apache.catalina.util.ServerInfo
-
-else
-
-    echo "Usage: eagle-service.sh <command>"
-  echo "  commands:"
-  echo "  start             Start eagle service in a separate window"
-  echo "  stop              Stop eagle service, waiting up to 5 seconds for the process to end"
-  exit 1
-
-fi

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar b/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar
deleted file mode 100644
index 2b6b9c6..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/commons-daemon.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/configtest.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/configtest.sh b/eagle-assembly/src/main/lib/tomcat/bin/configtest.sh
deleted file mode 100644
index 9a8ebff..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/configtest.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Configuration Test Script for the CATALINA Server
-# -----------------------------------------------------------------------------
-
-# Better OS/400 detection: see Bugzilla 31132
-os400=false
-case "`uname`" in
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-PRGDIR=`dirname "$PRG"`
-EXECUTABLE=catalina.sh
-
-# Check that target executable exists
-if $os400; then
-  # -x will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  eval
-else
-  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
-    echo "Cannot find $PRGDIR/$EXECUTABLE"
-    echo "The file is absent or does not have execute permission"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-exec "$PRGDIR"/"$EXECUTABLE" configtest "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/daemon.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/daemon.sh b/eagle-assembly/src/main/lib/tomcat/bin/daemon.sh
deleted file mode 100644
index dee6c77..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/daemon.sh
+++ /dev/null
@@ -1,252 +0,0 @@
-#!/bin/sh
-
-# 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.
-#
-# -----------------------------------------------------------------------------
-# Commons Daemon wrapper script.
-# -----------------------------------------------------------------------------
-#
-# resolve links - $0 may be a softlink
-ARG0="$0"
-while [ -h "$ARG0" ]; do
-  ls=`ls -ld "$ARG0"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    ARG0="$link"
-  else
-    ARG0="`dirname $ARG0`/$link"
-  fi
-done
-DIRNAME="`dirname $ARG0`"
-PROGRAM="`basename $ARG0`"
-while [ ".$1" != . ]
-do
-  case "$1" in
-    --java-home )
-        JAVA_HOME="$2"
-        shift; shift;
-        continue
-    ;;
-    --catalina-home )
-        CATALINA_HOME="$2"
-        shift; shift;
-        continue
-    ;;
-    --catalina-base )
-        CATALINA_BASE="$2"
-        shift; shift;
-        continue
-    ;;
-    --catalina-pid )
-        CATALINA_PID="$2"
-        shift; shift;
-        continue
-    ;;
-    --tomcat-user )
-        TOMCAT_USER="$2"
-        shift; shift;
-        continue
-    ;;
-    --service-start-wait-time )
-        SERVICE_START_WAIT_TIME="$2"
-        shift; shift;
-        continue
-    ;;
-    * )
-        break
-    ;;
-  esac
-done
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-darwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-    Darwin*)
-        darwin=true
-        ;;
-esac
-
-# Use the maximum available, or set MAX_FD != -1 to use that
-test ".$MAX_FD" = . && MAX_FD="maximum"
-# Setup parameters for running the jsvc
-#
-test ".$TOMCAT_USER" = . && TOMCAT_USER=tomcat
-# Set JAVA_HOME to working JDK or JRE
-# JAVA_HOME=/opt/jdk-1.6.0.22
-# If not set we'll try to guess the JAVA_HOME
-# from java binary if on the PATH
-#
-if [ -z "$JAVA_HOME" ]; then
-    JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
-    test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
-    test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
-else
-    JAVA_BIN="$JAVA_HOME/bin/java"
-fi
-
-# Only set CATALINA_HOME if not already set
-test ".$CATALINA_HOME" = . && CATALINA_HOME=`cd "$DIRNAME/.." >/dev/null; pwd`
-test ".$CATALINA_BASE" = . && CATALINA_BASE="$CATALINA_HOME"
-test ".$CATALINA_MAIN" = . && CATALINA_MAIN=org.apache.catalina.startup.Bootstrap
-# If not explicitly set, look for jsvc in CATALINA_BASE first then CATALINA_HOME
-if [ -z "$JSVC" ]; then
-    JSVC="$CATALINA_BASE/bin/jsvc"
-    if [ ! -x "$JSVC" ]; then
-        JSVC="$CATALINA_HOME/bin/jsvc"
-    fi
-fi
-# Set the default service-start wait time if necessary
-test ".$SERVICE_START_WAIT_TIME" = . && SERVICE_START_WAIT_TIME=10
-
-# Ensure that any user defined CLASSPATH variables are not used on startup,
-# but allow them to be specified in setenv.sh, in rare case when it is needed.
-CLASSPATH=
-JAVA_OPTS=
-if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
-  . "$CATALINA_BASE/bin/setenv.sh"
-elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
-  . "$CATALINA_HOME/bin/setenv.sh"
-fi
-
-# Add on extra jar files to CLASSPATH
-test ".$CLASSPATH" != . && CLASSPATH="${CLASSPATH}:"
-CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"
-
-test ".$CATALINA_OUT" = . && CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
-test ".$CATALINA_TMP" = . && CATALINA_TMP="$CATALINA_BASE/temp"
-
-# Add tomcat-juli.jar to classpath
-# tomcat-juli.jar can be over-ridden per instance
-if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
-  CLASSPATH="$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar"
-else
-  CLASSPATH="$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar"
-fi
-# Set juli LogManager config file if it is present and an override has not been issued
-if [ -z "$LOGGING_CONFIG" ]; then
-  if [ -r "$CATALINA_BASE/conf/logging.properties" ]; then
-    LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
-  else
-    # Bugzilla 45585
-    LOGGING_CONFIG="-Dnop"
-  fi
-fi
-
-test ".$LOGGING_MANAGER" = . && LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
-JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
-
-# Set -pidfile
-test ".$CATALINA_PID" = . && CATALINA_PID="$CATALINA_BASE/logs/catalina-daemon.pid"
-
-# Increase the maximum file descriptors if we can
-if [ "$cygwin" = "false" ]; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ "$?" -eq 0 ]; then
-        # Darwin does not allow RLIMIT_INFINITY on file soft limit
-        if [ "$darwin" = "true" -a "$MAX_FD_LIMIT" = "unlimited" ]; then
-            MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
-        fi
-        test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"
-        ulimit -n $MAX_FD
-        if [ "$?" -ne 0 ]; then
-            echo "$PROGRAM: Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        echo "$PROGRAM: Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# ----- Execute The Requested Command -----------------------------------------
-case "$1" in
-    run     )
-      shift
-      "$JSVC" $* \
-      $JSVC_OPTS \
-      -java-home "$JAVA_HOME" \
-      -pidfile "$CATALINA_PID" \
-      -wait "$SERVICE_START_WAIT_TIME" \
-      -nodetach \
-      -outfile "&1" \
-      -errfile "&2" \
-      -classpath "$CLASSPATH" \
-      "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-      -Dcatalina.base="$CATALINA_BASE" \
-      -Dcatalina.home="$CATALINA_HOME" \
-      -Djava.io.tmpdir="$CATALINA_TMP" \
-      $CATALINA_MAIN
-      exit $?
-    ;;
-    start   )
-      "$JSVC" $JSVC_OPTS \
-      -java-home "$JAVA_HOME" \
-      -user $TOMCAT_USER \
-      -pidfile "$CATALINA_PID" \
-      -wait "$SERVICE_START_WAIT_TIME" \
-      -outfile "$CATALINA_OUT" \
-      -errfile "&1" \
-      -classpath "$CLASSPATH" \
-      "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-      -Dcatalina.base="$CATALINA_BASE" \
-      -Dcatalina.home="$CATALINA_HOME" \
-      -Djava.io.tmpdir="$CATALINA_TMP" \
-      $CATALINA_MAIN
-      exit $?
-    ;;
-    stop    )
-      "$JSVC" $JSVC_OPTS \
-      -stop \
-      -pidfile "$CATALINA_PID" \
-      -classpath "$CLASSPATH" \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-      -Dcatalina.base="$CATALINA_BASE" \
-      -Dcatalina.home="$CATALINA_HOME" \
-      -Djava.io.tmpdir="$CATALINA_TMP" \
-      $CATALINA_MAIN
-      exit $?
-    ;;
-    version  )
-      "$JSVC" \
-      -java-home "$JAVA_HOME" \
-      -pidfile "$CATALINA_PID" \
-      -classpath "$CLASSPATH" \
-      -errfile "&2" \
-      -version \
-      -check \
-      $CATALINA_MAIN
-      if [ "$?" = 0 ]; then
-        "$JAVA_BIN" \
-        -classpath "$CATALINA_HOME/lib/catalina.jar" \
-        org.apache.catalina.util.ServerInfo
-      fi
-      exit $?
-    ;;
-    *       )
-      echo "Unknown command: \`$1'"
-      echo "Usage: $PROGRAM ( commands ... )"
-      echo "commands:"
-      echo "  run               Start Tomcat without detaching from console"
-      echo "  start             Start Tomcat"
-      echo "  stop              Stop Tomcat"
-      echo "  version           What version of commons daemon and Tomcat"
-      echo "                    are you running?"
-      exit 1
-    ;;
-esac

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/digest.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/digest.sh b/eagle-assembly/src/main/lib/tomcat/bin/digest.sh
deleted file mode 100644
index 62ed5d0..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/digest.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Script to digest password using the algorithm specified
-# -----------------------------------------------------------------------------
-
-# Better OS/400 detection: see Bugzilla 31132
-os400=false
-case "`uname`" in
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-PRGDIR=`dirname "$PRG"`
-EXECUTABLE=tool-wrapper.sh
-
-# Check that target executable exists
-if $os400; then
-  # -x will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  eval
-else
-  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
-    echo "Cannot find $PRGDIR/$EXECUTABLE"
-    echo "The file is absent or does not have execute permission"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/setclasspath.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/setclasspath.sh b/eagle-assembly/src/main/lib/tomcat/bin/setclasspath.sh
deleted file mode 100644
index 873fad3..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/setclasspath.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-#  Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
-#  are valid and consistent with the selected start-up options and set up the
-#  endorsed directory.
-# -----------------------------------------------------------------------------
-
-# Make sure prerequisite environment variables are set
-if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
-  if $darwin; then
-    # Bugzilla 54390
-    if [ -x '/usr/libexec/java_home' ] ; then
-      export JAVA_HOME=`/usr/libexec/java_home`
-    # Bugzilla 37284 (reviewed).
-    elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home" ]; then
-      export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
-    fi
-  else
-    JAVA_PATH=`which java 2>/dev/null`
-    if [ "x$JAVA_PATH" != "x" ]; then
-      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
-      JRE_HOME=`dirname $JAVA_PATH 2>/dev/null`
-    fi
-    if [ "x$JRE_HOME" = "x" ]; then
-      # XXX: Should we try other locations?
-      if [ -x /usr/bin/java ]; then
-        JRE_HOME=/usr
-      fi
-    fi
-  fi
-  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
-    echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
-    echo "At least one of these environment variable is needed to run this program"
-    exit 1
-  fi
-fi
-if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
-  echo "JAVA_HOME should point to a JDK in order to run in debug mode."
-  exit 1
-fi
-if [ -z "$JRE_HOME" ]; then
-  JRE_HOME="$JAVA_HOME"
-fi
-
-# If we're running under jdb, we need a full jdk.
-if [ "$1" = "debug" ] ; then
-  if [ "$os400" = "true" ]; then
-    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
-      echo "The JAVA_HOME environment variable is not defined correctly"
-      echo "This environment variable is needed to run this program"
-      echo "NB: JAVA_HOME should point to a JDK not a JRE"
-      exit 1
-    fi
-  else
-    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
-      echo "The JAVA_HOME environment variable is not defined correctly"
-      echo "This environment variable is needed to run this program"
-      echo "NB: JAVA_HOME should point to a JDK not a JRE"
-      exit 1
-    fi
-  fi
-fi
-
-# Don't override the endorsed dir if the user has set it previously
-if [ -z "$JAVA_ENDORSED_DIRS" ]; then
-  # Set the default -Djava.endorsed.dirs argument
-  JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
-fi
-
-# Set standard commands for invoking Java, if not already set.
-if [ -z "$_RUNJAVA" ]; then
-  _RUNJAVA="$JRE_HOME"/bin/java
-fi
-if [ "$os400" != "true" ]; then
-  if [ -z "$_RUNJDB" ]; then
-    _RUNJDB="$JAVA_HOME"/bin/jdb
-  fi
-fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/shutdown.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/shutdown.sh b/eagle-assembly/src/main/lib/tomcat/bin/shutdown.sh
deleted file mode 100644
index cd0c97d..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/shutdown.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Stop script for the CATALINA Server
-# -----------------------------------------------------------------------------
-
-# Better OS/400 detection: see Bugzilla 31132
-os400=false
-case "`uname`" in
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-PRGDIR=`dirname "$PRG"`
-EXECUTABLE=catalina.sh
-
-# Check that target executable exists
-if $os400; then
-  # -x will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  eval
-else
-  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
-    echo "Cannot find $PRGDIR/$EXECUTABLE"
-    echo "The file is absent or does not have execute permission"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-exec "$PRGDIR"/"$EXECUTABLE" stop "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/startup.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/startup.sh b/eagle-assembly/src/main/lib/tomcat/bin/startup.sh
deleted file mode 100644
index 7b10287..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/startup.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Start Script for the CATALINA Server
-# -----------------------------------------------------------------------------
-
-# Better OS/400 detection: see Bugzilla 31132
-os400=false
-case "`uname`" in
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-PRGDIR=`dirname "$PRG"`
-EXECUTABLE=catalina.sh
-
-# Check that target executable exists
-if $os400; then
-  # -x will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  eval
-else
-  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
-    echo "Cannot find $PRGDIR/$EXECUTABLE"
-    echo "The file is absent or does not have execute permission"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-exec "$PRGDIR"/"$EXECUTABLE" start "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar b/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar
deleted file mode 100644
index e1b80ad..0000000
Binary files a/eagle-assembly/src/main/lib/tomcat/bin/tomcat-juli.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/tool-wrapper.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/tool-wrapper.sh b/eagle-assembly/src/main/lib/tomcat/bin/tool-wrapper.sh
deleted file mode 100644
index 31cebf6..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/tool-wrapper.sh
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Wrapper script for command line tools
-#
-# Environment Variable Prerequisites
-#
-#   CATALINA_HOME   May point at your Catalina "build" directory.
-#
-#   TOOL_OPTS       (Optional) Java runtime options.
-#
-#   JAVA_HOME       Must point at your Java Development Kit installation.
-#                   Using JRE_HOME instead works as well.
-#
-#   JRE_HOME        Must point at your Java Runtime installation.
-#                   Defaults to JAVA_HOME if empty. If JRE_HOME and JAVA_HOME
-#                   are both set, JRE_HOME is used.
-#
-#   JAVA_OPTS       (Optional) Java runtime options.
-#
-#   JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
-#                   containing some jars in order to allow replacement of APIs
-#                   created outside of the JCP (i.e. DOM and SAX from W3C).
-#                   It can also be used to update the XML parser implementation.
-#                   Defaults to $CATALINA_HOME/endorsed.
-# -----------------------------------------------------------------------------
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-darwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-Darwin*) darwin=true;;
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-# Get standard environment variables
-PRGDIR=`dirname "$PRG"`
-
-# Only set CATALINA_HOME if not already set
-[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
-
-# Ensure that any user defined CLASSPATH variables are not used on startup,
-# but allow them to be specified in setenv.sh, in rare case when it is needed.
-CLASSPATH=
-
-if [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
-  . "$CATALINA_HOME/bin/setenv.sh"
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin; then
-  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
-  [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
-  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For OS400
-if $os400; then
-  # Set job priority to standard for interactive (interactive - 6) by using
-  # the interactive priority - 6, the helper threads that respond to requests
-  # will be running at the same priority as interactive jobs.
-  COMMAND='chgjob job('$JOBNAME') runpty(6)'
-  system $COMMAND
-
-  # Enable multi threading
-  export QIBM_MULTI_THREADED=Y
-fi
-
-# Get standard Java environment variables
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  . "$CATALINA_HOME"/bin/setclasspath.sh
-else
-  if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
-    . "$CATALINA_HOME"/bin/setclasspath.sh
-  else
-    echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-# Add on extra jar files to CLASSPATH
-if [ ! -z "$CLASSPATH" ] ; then
-  CLASSPATH="$CLASSPATH":
-fi
-CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
-  JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
-  CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
-fi
-
-JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
-
-# ----- Execute The Requested Command -----------------------------------------
-
-exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
-  -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-  -Dcatalina.home="$CATALINA_HOME" \
-  org.apache.catalina.startup.Tool "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/bin/version.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/bin/version.sh b/eagle-assembly/src/main/lib/tomcat/bin/version.sh
deleted file mode 100644
index 1cb19bd..0000000
--- a/eagle-assembly/src/main/lib/tomcat/bin/version.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# -----------------------------------------------------------------------------
-# Version Script for the CATALINA Server
-# -----------------------------------------------------------------------------
-
-# Better OS/400 detection: see Bugzilla 31132
-os400=false
-case "`uname`" in
-OS400*) os400=true;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ] ; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-PRGDIR=`dirname "$PRG"`
-EXECUTABLE=catalina.sh
-
-# Check that target executable exists
-if $os400; then
-  # -x will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  eval
-else
-  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
-    echo "Cannot find $PRGDIR/$EXECUTABLE"
-    echo "The file is absent or does not have execute permission"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-exec "$PRGDIR"/"$EXECUTABLE" version "$@"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/catalina.policy
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/catalina.policy b/eagle-assembly/src/main/lib/tomcat/conf/catalina.policy
deleted file mode 100644
index 354d7d6..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/catalina.policy
+++ /dev/null
@@ -1,248 +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.
-
-// ============================================================================
-// catalina.policy - Security Policy Permissions for Tomcat 7
-//
-// This file contains a default set of security policies to be enforced (by the
-// JVM) when Catalina is executed with the "-security" option.  In addition
-// to the permissions granted here, the following additional permissions are
-// granted to each web application:
-//
-// * Read access to the web application's document root directory
-// * Read, write and delete access to the web application's working directory
-// ============================================================================
-
-
-// ========== SYSTEM CODE PERMISSIONS =========================================
-
-
-// These permissions apply to javac
-grant codeBase "file:${java.home}/lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions
-grant codeBase "file:${java.home}/jre/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/../lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions when
-// ${java.home} points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-
-// ========== CATALINA CODE PERMISSIONS =======================================
-
-
-// These permissions apply to the daemon code
-grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the logging API
-// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
-// update this section accordingly.
-//  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
-        permission java.io.FilePermission
-         "${java.home}${file.separator}lib${file.separator}logging.properties", "read";
-
-        permission java.io.FilePermission
-         "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
-        permission java.io.FilePermission
-         "${catalina.base}${file.separator}logs", "read, write";
-        permission java.io.FilePermission
-         "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
-
-        permission java.lang.RuntimePermission "shutdownHooks";
-        permission java.lang.RuntimePermission "getClassLoader";
-        permission java.lang.RuntimePermission "setContextClassLoader";
-
-        permission java.util.logging.LoggingPermission "control";
-
-        permission java.util.PropertyPermission "java.util.logging.config.class", "read";
-        permission java.util.PropertyPermission "java.util.logging.config.file", "read";
-        permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read";
-        permission java.util.PropertyPermission "catalina.base", "read";
-
-        // Note: To enable per context logging configuration, permit read access to
-        // the appropriate file. Be sure that the logging configuration is
-        // secure before enabling such access.
-        // E.g. for the examples web application (uncomment and unwrap
-        // the following to be on a single line):
-        // permission java.io.FilePermission "${catalina.base}${file.separator}
-        //  webapps${file.separator}examples${file.separator}WEB-INF
-        //  ${file.separator}classes${file.separator}logging.properties", "read";
-};
-
-// These permissions apply to the server startup code
-grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the servlet API classes
-// and those that are shared across all class loaders
-// located in the "lib" directory
-grant codeBase "file:${catalina.home}/lib/-" {
-        permission java.security.AllPermission;
-};
-
-
-// If using a per instance lib directory, i.e. ${catalina.base}/lib,
-// then the following permission will need to be uncommented
-// grant codeBase "file:${catalina.base}/lib/-" {
-//         permission java.security.AllPermission;
-// };
-
-
-// ========== WEB APPLICATION PERMISSIONS =====================================
-
-
-// These permissions are granted by default to all web applications
-// In addition, a web application will be given a read FilePermission
-// and JndiPermission for all files and directories in its document root.
-grant {
-    // Required for JNDI lookup of named JDBC DataSource's and
-    // javamail named MimePart DataSource used to send mail
-    permission java.util.PropertyPermission "java.home", "read";
-    permission java.util.PropertyPermission "java.naming.*", "read";
-    permission java.util.PropertyPermission "javax.sql.*", "read";
-
-    // OS Specific properties to allow read access
-    permission java.util.PropertyPermission "os.name", "read";
-    permission java.util.PropertyPermission "os.version", "read";
-    permission java.util.PropertyPermission "os.arch", "read";
-    permission java.util.PropertyPermission "file.separator", "read";
-    permission java.util.PropertyPermission "path.separator", "read";
-    permission java.util.PropertyPermission "line.separator", "read";
-
-    // JVM properties to allow read access
-    permission java.util.PropertyPermission "java.version", "read";
-    permission java.util.PropertyPermission "java.vendor", "read";
-    permission java.util.PropertyPermission "java.vendor.url", "read";
-    permission java.util.PropertyPermission "java.class.version", "read";
-    permission java.util.PropertyPermission "java.specification.version", "read";
-    permission java.util.PropertyPermission "java.specification.vendor", "read";
-    permission java.util.PropertyPermission "java.specification.name", "read";
-
-    permission java.util.PropertyPermission "java.vm.specification.version", "read";
-    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
-    permission java.util.PropertyPermission "java.vm.specification.name", "read";
-    permission java.util.PropertyPermission "java.vm.version", "read";
-    permission java.util.PropertyPermission "java.vm.vendor", "read";
-    permission java.util.PropertyPermission "java.vm.name", "read";
-
-    // Required for OpenJMX
-    permission java.lang.RuntimePermission "getAttribute";
-
-    // Allow read of JAXP compliant XML parser debug
-    permission java.util.PropertyPermission "jaxp.debug", "read";
-
-    // All JSPs need to be able to read this package
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat";
-
-    // Precompiled JSPs need access to these packages.
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
-    permission java.lang.RuntimePermission
-     "accessClassInPackage.org.apache.jasper.runtime.*";
-
-    // Precompiled JSPs need access to these system properties.
-    permission java.util.PropertyPermission
-     "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read";
-    permission java.util.PropertyPermission
-     "org.apache.el.parser.COERCE_TO_ZERO", "read";
-
-    // The cookie code needs these.
-    permission java.util.PropertyPermission
-     "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
-    permission java.util.PropertyPermission
-     "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
-    permission java.util.PropertyPermission
-     "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
-
-    // Applications using Comet need to be able to access this package
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet";
-
-    // Applications using the legacy WebSocket implementation need to be able to access this package
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.websocket";
-
-    // Applications using the JSR-356 WebSocket implementation need to be able to access these packages
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
-};
-
-
-// The Manager application needs access to the following packages to support the
-// session display functionality. These settings support the following
-// configurations:
-// - default CATALINA_HOME == CATALINA_BASE
-// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
-// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
-grant codeBase "file:${catalina.base}/webapps/manager/-" {
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
-};
-grant codeBase "file:${catalina.home}/webapps/manager/-" {
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
-};
-
-// You can assign additional permissions to particular web applications by
-// adding additional "grant" entries here, based on the code base for that
-// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
-//
-// Different permissions can be granted to JSP pages, classes loaded from
-// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
-// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
-//
-// For instance, assume that the standard "examples" application
-// included a JDBC driver that needed to establish a network connection to the
-// corresponding database and used the scrape taglib to get the weather from
-// the NOAA web server.  You might create a "grant" entries like this:
-//
-// The permissions granted to the context root directory apply to JSP pages.
-// grant codeBase "file:${catalina.base}/webapps/examples/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-//
-// The permissions granted to the context WEB-INF/classes directory
-// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
-// };
-//
-// The permission granted to your JDBC driver
-// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-// };
-// The permission granted to the scrape taglib
-// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/catalina.properties
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/catalina.properties b/eagle-assembly/src/main/lib/tomcat/conf/catalina.properties
deleted file mode 100644
index ef375e1..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/catalina.properties
+++ /dev/null
@@ -1,133 +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.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,\
-org.apache.naming.resources.,org.apache.tomcat.
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, no packages are restricted for definition, and none of
-# the class loaders supplied with the JDK call checkPackageDefinition.
-#
-package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
-org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
-
-#
-#
-# List of comma-separated paths defining the contents of the "common"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank,the JVM system loader will be used as Catalina's "common"
-# loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository
-common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
-
-#
-# List of comma-separated paths defining the contents of the "server"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
-# If left as blank, the "common" loader will be used as Catalina's "server"
-# loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository
-server.loader=
-
-#
-# List of comma-separated paths defining the contents of the "shared"
-# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
-# the "common" loader will be used as Catalina's "shared" loader.
-# Examples:
-#     "foo": Add this folder as a class repository
-#     "foo/*.jar": Add all the JARs of the specified folder as class
-#                  repositories
-#     "foo/bar.jar": Add bar.jar as a class repository
-# Please note that for single jars, e.g. bar.jar, you need the URL form
-# starting with file:.
-shared.loader=
-
-# List of JAR files that should not be scanned using the JarScanner
-# functionality. This is typically used to scan JARs for configuration
-# information. JARs that do not contain such information may be excluded from
-# the scan to speed up the scanning process. This is the default list. JARs on
-# this list are excluded from all scans. Scan specific lists (to exclude JARs
-# from individual scans) follow this. The list must be a comma separated list of
-# JAR file names.
-# The JARs listed below include:
-# - Tomcat Bootstrap JARs
-# - Tomcat API JARs
-# - Catalina JARs
-# - Jasper JARs
-# - Tomcat JARs
-# - Common non-Tomcat JARs
-# - Test JARs (JUnit, Cobertura and dependencies)
-tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
-bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
-annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
-catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
-jasper.jar,jasper-el.jar,ecj-*.jar,\
-tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
-tomcat-jni.jar,tomcat-spdy.jar,\
-tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
-tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
-tomcat-jdbc.jar,\
-tools.jar,\
-commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
-commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
-commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
-commons-math*.jar,commons-pool*.jar,\
-jstl.jar,\
-geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
-ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
-jmx-tools.jar,jta*.jar,log4j.jar,log4j-1*.jar,mail*.jar,slf4j*.jar,\
-xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
-junit.jar,junit-*.jar,hamcrest*.jar,org.hamcrest*.jar,ant-launcher.jar,\
-cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
-jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
-xom-*.jar
-
-# Additional JARs (over and above the default JARs listed above) to skip when
-# scanning for Servlet 3.0 pluggability features. These features include web
-# fragments, annotations, SCIs and classes that match @HandlesTypes. The list
-# must be a comma separated list of JAR file names.
-org.apache.catalina.startup.ContextConfig.jarsToSkip=
-
-# Additional JARs (over and above the default JARs listed above) to skip when
-# scanning for TLDs. The list must be a comma separated list of JAR file names.
-org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar
-
-#
-# String cache configuration.
-tomcat.util.buf.StringCache.byte.enabled=true
-#tomcat.util.buf.StringCache.char.enabled=true
-#tomcat.util.buf.StringCache.trainThreshold=500000
-#tomcat.util.buf.StringCache.cacheSize=5000

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/context.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/context.xml b/eagle-assembly/src/main/lib/tomcat/conf/context.xml
deleted file mode 100644
index 745bf95..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/context.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
-  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.
--->
-<!-- The contents of this file will be loaded for each web application -->
-<Context>
-
-    <!-- Default set of monitored resources -->
-    <WatchedResource>WEB-INF/web.xml</WatchedResource>
-
-    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
-    <!--
-    <Manager pathname="" />
-    -->
-
-    <!-- Uncomment this to enable Comet connection tacking (provides events
-         on session expiration as well as webapp lifecycle) -->
-    <!--
-    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-    -->
-
-</Context>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/logging.properties
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/logging.properties b/eagle-assembly/src/main/lib/tomcat/conf/logging.properties
deleted file mode 100644
index 912b193..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/logging.properties
+++ /dev/null
@@ -1,64 +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.
-
-handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
-
-.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
-
-############################################################
-# Handler specific properties.
-# Describes specific configuration info for Handlers.
-############################################################
-
-1catalina.org.apache.juli.FileHandler.level = FINE
-1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/../../logs
-1catalina.org.apache.juli.FileHandler.prefix = eagle-service.
-
-2localhost.org.apache.juli.FileHandler.level = FINE
-2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/../../logs
-2localhost.org.apache.juli.FileHandler.prefix = eagle-service.
-
-3manager.org.apache.juli.FileHandler.level = FINE
-3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/../../logs
-3manager.org.apache.juli.FileHandler.prefix = eagle-service-manager.
-
-4host-manager.org.apache.juli.FileHandler.level = FINE
-4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/../../logs
-4host-manager.org.apache.juli.FileHandler.prefix = eagle-service-host-manager.
-
-java.util.logging.ConsoleHandler.level = FINE
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-
-############################################################
-# Facility specific properties.
-# Provides extra control for each logger.
-############################################################
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
-
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
-org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
-
-# For example, set the org.apache.catalina.util.LifecycleBase logger to log
-# each component that extends LifecycleBase changing state:
-#org.apache.catalina.util.LifecycleBase.level = FINE
-
-# To see debug messages in TldLocationsCache, uncomment the following line:
-#org.apache.jasper.compiler.TldLocationsCache.level = FINE

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/server.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/server.xml b/eagle-assembly/src/main/lib/tomcat/conf/server.xml
deleted file mode 100644
index 9ca8e87..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/server.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
-  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.
--->
-<!-- Note:  A "Server" is not itself a "Container", so you may not
-     define subcomponents such as "Valves" at this level.
-     Documentation at /docs/config/server.html
- -->
-<Server port="9005" shutdown="SHUTDOWN">
-  <!--<Listener className="org.apache.catalina.startup.VersionLoggerListener" />-->
-  <!-- Security listener. Documentation at /docs/config/listeners.html
-  <Listener className="org.apache.catalina.security.SecurityListener" />
-  -->
-  <!--APR library loader. Documentation at /docs/apr.html -->
-  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
-  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
-  <Listener className="org.apache.catalina.core.JasperListener" />
-  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
-  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
-  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
-  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
-
-  <!-- Global JNDI resources
-       Documentation at /docs/jndi-resources-howto.html
-  -->
-  <GlobalNamingResources>
-    <!-- Editable user database that can also be used by
-         UserDatabaseRealm to authenticate users
-    -->
-    <Resource name="UserDatabase" auth="Container"
-              type="org.apache.catalina.UserDatabase"
-              description="User database that can be updated and saved"
-              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
-              pathname="conf/tomcat-users.xml" />
-  </GlobalNamingResources>
-
-  <!-- A "Service" is a collection of one or more "Connectors" that share
-       a single "Container" Note:  A "Service" is not itself a "Container",
-       so you may not define subcomponents such as "Valves" at this level.
-       Documentation at /docs/config/service.html
-   -->
-  <Service name="Catalina">
-
-    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
-    <!--
-    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
-        maxThreads="150" minSpareThreads="4"/>
-    -->
-
-
-    <!-- A "Connector" represents an endpoint by which requests are received
-         and responses are returned. Documentation at :
-         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
-         Java AJP  Connector: /docs/config/ajp.html
-         APR (HTTP/AJP) Connector: /docs/apr.html
-         Define a non-SSL HTTP/1.1 Connector on port 8080
-    -->
-    <Connector port="9099" protocol="HTTP/1.1"
-               connectionTimeout="20000"
-               redirectPort="8443" />
-    <!-- A "Connector" using the shared thread pool-->
-    <!--
-    <Connector executor="tomcatThreadPool"
-               port="9090" protocol="HTTP/1.1"
-               connectionTimeout="20000"
-               redirectPort="9443" />
-    -->
-    <!-- Define a SSL HTTP/1.1 Connector on port 8443
-         This connector uses the BIO implementation that requires the JSSE
-         style configuration. When using the APR/native implementation, the
-         OpenSSL style configuration is required as described in the APR/native
-         documentation -->
-    <!--
-    <Connector port="9443" protocol="org.apache.coyote.http11.Http11Protocol"
-               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
-               clientAuth="false" sslProtocol="TLS" />
-    -->
-
-    <!-- Define an AJP 1.3 Connector on port 8009 -->
-    <Connector port="9009" protocol="AJP/1.3" redirectPort="9443" />
-
-
-    <!-- An Engine represents the entry point (within Catalina) that processes
-         every request.  The Engine implementation for Tomcat stand alone
-         analyzes the HTTP headers included with the request, and passes them
-         on to the appropriate Host (virtual host).
-         Documentation at /docs/config/engine.html -->
-
-    <!-- You should set jvmRoute to support load-balancing via AJP ie :
-    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-    -->
-    <Engine name="Catalina" defaultHost="localhost">
-
-      <!--For clustering, please take a look at documentation at:
-          /docs/cluster-howto.html  (simple how to)
-          /docs/config/cluster.html (reference documentation) -->
-      <!--
-      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-      -->
-
-      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
-           via a brute-force attack -->
-      <Realm className="org.apache.catalina.realm.LockOutRealm">
-        <!-- This Realm uses the UserDatabase configured in the global JNDI
-             resources under the key "UserDatabase".  Any edits
-             that are performed against this UserDatabase are immediately
-             available for use by the Realm.  -->
-        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
-               resourceName="UserDatabase"/>
-      </Realm>
-
-      <Host name="localhost"  appBase="webapps"
-            unpackWARs="true" autoDeploy="true">
-
-        <!-- SingleSignOn valve, share authentication between web applications
-             Documentation at: /docs/config/valve.html -->
-        <!--
-        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-        -->
-
-        <!-- Access log processes all example.
-             Documentation at: /docs/config/valve.html
-             Note: The pattern used is equivalent to using pattern="common" -->
-        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="../../logs"
-               prefix="eagle-service-access-log." suffix=".txt"
-               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
-
-      </Host>
-    </Engine>
-  </Service>
-</Server>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/conf/tomcat-users.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/conf/tomcat-users.xml b/eagle-assembly/src/main/lib/tomcat/conf/tomcat-users.xml
deleted file mode 100644
index 7f022ff..0000000
--- a/eagle-assembly/src/main/lib/tomcat/conf/tomcat-users.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
-  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.
--->
-<tomcat-users>
-<!--
-  NOTE:  By default, no user is included in the "manager-gui" role required
-  to operate the "/manager/html" web application.  If you wish to use this app,
-  you must define such a user - the username and password are arbitrary.
--->
-<!--
-  NOTE:  The sample user and role entries below are wrapped in a comment
-  and thus are ignored when reading this file. Do not forget to remove
-  <!.. ..> that surrounds them.
--->
-<!--
-  <role rolename="tomcat"/>
-  <role rolename="role1"/>
-  <user username="tomcat" password="tomcat" roles="tomcat"/>
-  <user username="both" password="tomcat" roles="tomcat,role1"/>
-  <user username="role1" password="tomcat" roles="role1"/>
--->
-</tomcat-users>


[29/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
deleted file mode 100644
index 1929b16..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluator.java
+++ /dev/null
@@ -1,315 +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.policy.siddhi;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.PolicyEvaluator;
-import org.apache.eagle.policy.PolicyManager;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.ExecutionPlanRuntime;
-import org.wso2.siddhi.core.SiddhiManager;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-import org.wso2.siddhi.core.stream.input.InputHandler;
-import org.wso2.siddhi.query.api.execution.query.Query;
-import org.wso2.siddhi.query.api.execution.query.selection.OutputAttribute;
-import org.wso2.siddhi.query.compiler.exception.SiddhiParserException;
-
-import java.lang.reflect.Field;
-import java.util.*;
-
-/**
- * when policy is updated or deleted, SiddhiManager.shutdown should be invoked to release resources.
- * during this time, synchronization is important
- */
-public class SiddhiPolicyEvaluator<T extends AbstractPolicyDefinitionEntity, K> implements PolicyEvaluator<T> {
-
-    private final static String EXECUTION_PLAN_NAME = "query";
-    private final static Logger LOG = LoggerFactory.getLogger(SiddhiPolicyEvaluator.class);
-
-    private volatile SiddhiRuntime siddhiRuntime;
-    private final String[] sourceStreams;
-    private final boolean needValidation;
-    private final Config config;
-    private final PolicyEvaluationContext<T, K> context;
-
-    /**
-     * everything dependent on policyDef should be together and switched in runtime
-     */
-    public static class SiddhiRuntime {
-        QueryCallback queryCallback;
-        Map<String, InputHandler> siddhiInputHandlers;
-        SiddhiManager siddhiManager;
-        SiddhiPolicyDefinition policyDef;
-        List<String> outputFields;
-        String executionPlanName;
-        boolean markdownEnabled;
-        String markdownReason;
-    }
-
-    public SiddhiPolicyEvaluator(Config config, PolicyEvaluationContext<T, K> context, AbstractPolicyDefinition policyDef, String[] sourceStreams) {
-        this(config, context, policyDef, sourceStreams, false);
-    }
-
-    public SiddhiPolicyEvaluator(Config config, PolicyEvaluationContext<T, K> context, AbstractPolicyDefinition policyDef, String[] sourceStreams, boolean needValidation) {
-        this.config = config;
-        this.context = context;
-        this.context.evaluator = this;
-        this.needValidation = needValidation;
-        this.sourceStreams = sourceStreams;
-        init(policyDef);
-    }
-
-    public void init(AbstractPolicyDefinition policyDef) {
-        siddhiRuntime = createSiddhiRuntime((SiddhiPolicyDefinition) policyDef);
-    }
-
-    public static String addContextFieldIfNotExist(String expression) {
-        // select fieldA, fieldB --> select eagleAlertContext, fieldA, fieldB
-        int pos = expression.indexOf("select ") + 7;
-        int index = pos;
-        boolean isSelectStarPattern = true;
-        while (index < expression.length()) {
-            if (expression.charAt(index) == ' ') index++;
-            else if (expression.charAt(index) == '*') break;
-            else {
-                isSelectStarPattern = false;
-                break;
-            }
-        }
-        if (isSelectStarPattern) return expression;
-        StringBuilder sb = new StringBuilder();
-        sb.append(expression.substring(0, pos));
-        sb.append(SiddhiStreamMetadataUtils.EAGLE_ALERT_CONTEXT_FIELD + ",");
-        sb.append(expression.substring(pos, expression.length()));
-        return sb.toString();
-    }
-
-    private SiddhiRuntime createSiddhiRuntime(SiddhiPolicyDefinition policyDef) {
-        SiddhiManager siddhiManager = new SiddhiManager();
-        Map<String, InputHandler> siddhiInputHandlers = new HashMap<String, InputHandler>();
-        SiddhiRuntime runtime = new SiddhiRuntime();
-
-        // compose execution plan sql
-        String executionPlan = policyDef.getExpression();
-        if (!policyDef.isContainsDefinition()) {
-            StringBuilder sb = new StringBuilder();
-            for (String sourceStream : sourceStreams) {
-                String streamDef = SiddhiStreamMetadataUtils.convertToStreamDef(sourceStream);
-                LOG.info("Siddhi stream definition : " + streamDef);
-                sb.append(streamDef);
-            }
-
-            String expression = policyDef.getExpression();
-            executionPlan = sb.toString() + " @info(name = '" + EXECUTION_PLAN_NAME + "') " + expression;
-        }
-
-        ExecutionPlanRuntime executionPlanRuntime = null;
-
-        try {
-            executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);
-
-            for (String sourceStream : sourceStreams) {
-                siddhiInputHandlers.put(sourceStream, executionPlanRuntime.getInputHandler(sourceStream));
-            }
-
-            executionPlanRuntime.start();
-            LOG.info("Siddhi query: " + executionPlan);
-            attachCallback(runtime, executionPlanRuntime, context);
-
-            runtime.markdownEnabled = false;
-            runtime.markdownReason = null;
-        } catch (SiddhiParserException exception) { // process is not interrupted in case of an invalid policy defined by marking down
-            LOG.error("Exception in parsing Siddhi query: " + executionPlan + ", reason being: " + exception.getMessage());
-            runtime.queryCallback = null;
-            runtime.outputFields = null;
-            runtime.markdownEnabled = true;
-            runtime.markdownReason = exception.getMessage();
-        }
-
-        runtime.siddhiInputHandlers = siddhiInputHandlers;
-        runtime.siddhiManager = siddhiManager;
-        runtime.policyDef = policyDef;
-        runtime.executionPlanName = (null != executionPlanRuntime) ? executionPlanRuntime.getName() : null; // executionPlanRuntime will be set to null in case of an invalid policy
-        return runtime;
-    }
-
-    private void attachCallback(SiddhiRuntime runtime, ExecutionPlanRuntime executionPlanRuntime, PolicyEvaluationContext<T, K> context) {
-        List<String> outputFields = new ArrayList<>();
-//        String outputStreamName = config.getString("alertExecutorConfigs." + executorId + "." + "outputStream");
-//        if (StringUtils.isNotEmpty(outputStreamName)) {
-//            StreamCallback streamCallback = new SiddhiOutputStreamCallback<>(config, this);
-//            executionPlanRuntime.addCallback(outputStreamName, streamCallback);
-//            runtime.outputStreamCallback = streamCallback;
-//            // find output attribute from stream call back
-//            try {
-//                Field field = StreamCallback.class.getDeclaredField("streamDefinition");
-//                field.setAccessible(true);
-//                AbstractDefinition outStreamDef = (AbstractDefinition) field.get(streamCallback);
-//                outputFields = Arrays.asList(outStreamDef.getAttributeNameArray());
-//            } catch (Exception ex) {
-//                LOG.error("Got an Exception when initial outputFields ", ex);
-//            }
-//        } else {
-            QueryCallback callback = new SiddhiQueryCallbackImpl<T, K>(config, context);
-            executionPlanRuntime.addCallback(EXECUTION_PLAN_NAME, callback);
-            runtime.queryCallback = callback;
-            // find output attribute from query call back
-            try {
-                Field field = QueryCallback.class.getDeclaredField(EXECUTION_PLAN_NAME);
-                field.setAccessible(true);
-                Query query = (Query) field.get(callback);
-                List<OutputAttribute> list = query.getSelector().getSelectionList();
-                for (OutputAttribute output : list) {
-                    outputFields.add(output.getRename());
-                }
-            } catch (Exception ex) {
-                LOG.error("Got an Exception when initial outputFields ", ex);
-            }
-//        }
-        runtime.outputFields = outputFields;
-    }
-
-    /**
-     * 1. input has 3 fields, first is siddhi context, second is streamName, the last one is map of attribute name/value
-     * 2. runtime check for input data (This is very expensive, so we ignore for now)
-     * the size of input map should be equal to size of attributes which stream metadata defines
-     * the attribute names should be equal to attribute names which stream metadata defines
-     * the input field cannot be null
-     */
-    @SuppressWarnings({"rawtypes"})
-    @Override
-    public void evaluate(ValuesArray data) throws Exception {
-        if (!siddhiRuntime.markdownEnabled) {
-            if (LOG.isDebugEnabled()) LOG.debug("Siddhi policy evaluator consumers data :" + data);
-            Collector outputCollector = (Collector) data.get(0);
-            String streamName = (String) data.get(1);
-            SortedMap map = (SortedMap) data.get(2);
-            validateEventInRuntime(streamName, map);
-            synchronized (siddhiRuntime) {
-                // retain the collector in the context. This assignment is idempotent
-                context.outputCollector = outputCollector;
-
-                List<Object> input = new ArrayList<>();
-                putAttrsIntoInputStream(input, streamName, map);
-                siddhiRuntime.siddhiInputHandlers.get(streamName).send(input.toArray(new Object[0]));
-            }
-        }
-    }
-
-    /**
-     * This is a heavy operation, we should avoid to use.
-     * <p/>
-     * This validation method will skip invalid fields in event which are not declared in stream schema otherwise it will cause exception for siddhi engine.
-     *
-     * @param sourceStream source steam id
-     * @param data         input event
-     * @see <a href="https://issues.apache.org/jira/browse/EAGLE-49">https://issues.apache.org/jira/browse/EAGLE-49</a>
-     */
-    private void validateEventInRuntime(String sourceStream, SortedMap data) {
-        if (!needValidation)
-            return;
-        SortedMap<String, AlertStreamSchemaEntity> map = StreamMetadataManager.getInstance().getMetadataEntityMapForStream(sourceStream);
-        if (!map.keySet().equals(data.keySet())) {
-            Set<Object> badKeys = new TreeSet<>();
-            for (Object key : data.keySet()) if (!map.containsKey(key)) badKeys.add(key);
-            LOG.warn(String.format("Ignore invalid fields %s in event: %s from stream: %s, valid fields are: %s", badKeys.toString(), data.toString(), sourceStream, map.keySet().toString()));
-            for (Object key : badKeys) data.remove(key);
-        }
-    }
-
-    private void putAttrsIntoInputStream(List<Object> input, String streamName, SortedMap map) {
-        if (!needValidation) {
-            input.addAll(map.values());
-            return;
-        }
-        for (Object key : map.keySet()) {
-            Object value = map.get(key);
-            if (value == null) {
-                input.add(SiddhiStreamMetadataUtils.getAttrDefaultValue(streamName, (String) key));
-            } else input.add(value);
-        }
-    }
-
-    @Override
-    public void onPolicyUpdate(T newAlertDef) {
-        AbstractPolicyDefinition policyDef = null;
-        try {
-            policyDef = JsonSerDeserUtils.deserialize(newAlertDef.getPolicyDef(),
-                    AbstractPolicyDefinition.class, PolicyManager.getInstance().getPolicyModules(newAlertDef.getTags().get(Constants.POLICY_TYPE)));
-        } catch (Exception ex) {
-            LOG.error("Initial policy def error, ", ex);
-        }
-        SiddhiRuntime previous = siddhiRuntime;
-        siddhiRuntime = createSiddhiRuntime((SiddhiPolicyDefinition) policyDef);
-        synchronized (previous) {
-            if (!previous.markdownEnabled) // condition to check if previous SiddhiRuntime was started after policy validation
-                previous.siddhiManager.getExecutionPlanRuntime(previous.executionPlanName).shutdown();
-        }
-    }
-
-    @Override
-    public void onPolicyDelete() {
-        synchronized (siddhiRuntime) {
-            LOG.info("Going to shutdown siddhi execution plan, planName: " + siddhiRuntime.executionPlanName);
-            if (!siddhiRuntime.markdownEnabled) // condition to check if previous SiddhiRuntime was started after policy validation
-                siddhiRuntime.siddhiManager.getExecutionPlanRuntime(siddhiRuntime.executionPlanName).shutdown();
-            LOG.info("Siddhi execution plan " + siddhiRuntime.executionPlanName + " is successfully shutdown ");
-        }
-    }
-
-    @Override
-    public String toString() {
-        return siddhiRuntime.policyDef.toString();
-    }
-
-    public String[] getStreamNames() {
-        return sourceStreams;
-    }
-
-    public Map<String, String> getAdditionalContext() {
-        Map<String, String> context = new HashMap<String, String>();
-        StringBuilder sourceStreams = new StringBuilder();
-        for (String streamName : getStreamNames()) {
-            sourceStreams.append(streamName + ",");
-        }
-        if (sourceStreams.length() > 0) {
-            sourceStreams.deleteCharAt(sourceStreams.length() - 1);
-        }
-        context.put(Constants.SOURCE_STREAMS, sourceStreams.toString());
-        context.put(Constants.POLICY_ID, this.context.policyId);
-        return context;
-    }
-
-    public List<String> getOutputStreamAttrNameList() {
-        return siddhiRuntime.outputFields;
-    }
-
-    @Override
-    public boolean isMarkdownEnabled() { return siddhiRuntime.markdownEnabled; }
-
-    @Override
-    public String getMarkdownReason() { return siddhiRuntime.markdownReason; }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluatorServiceProviderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluatorServiceProviderImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluatorServiceProviderImpl.java
deleted file mode 100644
index 1bd5830..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiPolicyEvaluatorServiceProviderImpl.java
+++ /dev/null
@@ -1,46 +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.policy.siddhi;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.policy.PolicyEvaluatorServiceProvider;
-
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.jsontype.NamedType;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-
-public class SiddhiPolicyEvaluatorServiceProviderImpl<T extends AbstractPolicyDefinitionEntity> implements PolicyEvaluatorServiceProvider<T> {
-	@Override
-	public String getPolicyType() {
-		return Constants.policyType.siddhiCEPEngine.name();
-	}
-
-	@Override
-	public Class getPolicyEvaluator() {
-		return SiddhiPolicyEvaluator.class;
-	}
-
-	@Override
-	public List<Module> getBindingModules() {
-		Module module1 = new SimpleModule(Constants.POLICY_DEFINITION).registerSubtypes(new NamedType(SiddhiPolicyDefinition.class, getPolicyType()));
-		return Arrays.asList(module1);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiQueryCallbackImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiQueryCallbackImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiQueryCallbackImpl.java
deleted file mode 100644
index 43422f8..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiQueryCallbackImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.policy.siddhi;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.event.Event;
-import org.wso2.siddhi.core.query.output.callback.QueryCallback;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Siddhi call back implementation
- *
- * @param <T> - The policy definition type
- * @param <K> - K the alert entity type
- */
-public class SiddhiQueryCallbackImpl<T extends AbstractPolicyDefinitionEntity, K> extends QueryCallback{
-
-	private static final Logger LOG = LoggerFactory.getLogger(SiddhiQueryCallbackImpl.class);
-
-	private final Config config;
-	private final PolicyEvaluationContext<T, K> siddhiEvaluateContext;
-
-	public SiddhiQueryCallbackImpl(Config config, PolicyEvaluationContext<T, K> siddhiContext) {
-		this.config = config;
-		this.siddhiEvaluateContext = siddhiContext;
-	}
-	
-	public static List<String> convertToString(List<Object> data) {
-		List<String> rets = new ArrayList<String>();
-		for (Object object : data) {
-			String value = null;
-			if (object instanceof Double) {
-				value = String.valueOf((Double)object);
-			}
-			else if (object instanceof Integer) {
-				value = String.valueOf((Integer)object);
-			}
-			else if (object instanceof Long) {
-				value = String.valueOf((Long)object);
-			}
-			else if (object instanceof String) {
-				value = (String)object;
-			}
-			else if (object instanceof Boolean) {
-				value = String.valueOf((Boolean)object);
-			}
-			rets.add(value);
-		}
-		return rets;
-	}
-
-	public static List<Object> getOutputObject(Object[] data) {
-		List<Object> rets = new ArrayList<>(data.length);
-//		boolean isFirst = true;
-		for (Object object : data) {
-//			// The first field is siddhiAlertContext, skip it
-//			if (isFirst) {
-//				isFirst = false;
-//				continue;
-//			}
-			rets.add(object);
-		}
-		return rets;
-	}
-	
-	@SuppressWarnings("unchecked")
-	@Override
-	public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
-		List<Object> rets = getOutputObject(inEvents[0].getData());
-		K alert = siddhiEvaluateContext.resultRender.render(config, rets, siddhiEvaluateContext, timeStamp);
-		SiddhiEvaluationHandler<T, K> handler = siddhiEvaluateContext.alertExecutor;
-		handler.onEvalEvents(siddhiEvaluateContext, Arrays.asList(alert));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiStreamMetadataUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiStreamMetadataUtils.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiStreamMetadataUtils.java
deleted file mode 100644
index e4c3481..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/SiddhiStreamMetadataUtils.java
+++ /dev/null
@@ -1,119 +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.policy.siddhi;
-
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-import java.util.SortedMap;
-
-/**
- * convert metadata entities for a stream to stream definition for siddhi cep engine
- * define stream HeapUsage (metric string, host string, value double, timestamp long)
- */
-public class SiddhiStreamMetadataUtils {
-	private final static Logger LOG = LoggerFactory.getLogger(SiddhiStreamMetadataUtils.class);
-	
-	public final static String EAGLE_ALERT_CONTEXT_FIELD = "eagleAlertContext";
-
-	public static SortedMap<String, AlertStreamSchemaEntity> getAttrMap(String streamName) {
-		SortedMap<String, AlertStreamSchemaEntity> map = StreamMetadataManager.getInstance().getMetadataEntityMapForStream(streamName);
-		if(map == null || map.size() == 0){
-			throw new IllegalStateException("Alert stream schema ["+streamName+"] should never be empty");
-		}
-		return map;
-	}
-
-	/**
-     * @see org.wso2.siddhi.query.api.definition.Attribute.Type
-     * make sure StreamMetadataManager.init is invoked before this method
-	 * @param streamName
-	 * @return
-	 */
-	public static String convertToStreamDef(String streamName){
-		SortedMap<String, AlertStreamSchemaEntity> map = getAttrMap(streamName);
-		StringBuilder sb = new StringBuilder();
-//		sb.append(EAGLE_ALERT_CONTEXT_FIELD + " object, ");
-		for(Map.Entry<String, AlertStreamSchemaEntity> entry : map.entrySet()){
-            appendAttributeNameType(sb, entry.getKey(), entry.getValue().getAttrType());
-		}
-		if(sb.length() > 0){
-			sb.deleteCharAt(sb.length()-1);
-		}
-		
-		String siddhiStreamDefFormat = "define stream " + streamName + "(" + "%s" + ");";
-		return String.format(siddhiStreamDefFormat, sb.toString());
-	}
-
-    public static String convertToStreamDef(String streamName, Map<String, String> eventSchema){
-        StringBuilder sb = new StringBuilder();
-        sb.append("context" + " object,");
-        for(Map.Entry<String, String> entry : eventSchema.entrySet()){
-            appendAttributeNameType(sb, entry.getKey(), entry.getValue());
-        }
-        if(sb.length() > 0){
-            sb.deleteCharAt(sb.length()-1);
-        }
-
-        String siddhiStreamDefFormat = "define stream " + streamName + "(" + "%s" + ");";
-        return String.format(siddhiStreamDefFormat, sb.toString());
-    }
-
-    private static void appendAttributeNameType(StringBuilder sb, String attrName, String attrType){
-        sb.append(attrName);
-        sb.append(" ");
-        if(attrType.equalsIgnoreCase(AttributeType.STRING.name())){
-            sb.append("string");
-        }else if(attrType.equalsIgnoreCase(AttributeType.INTEGER.name())){
-            sb.append("int");
-        }else if(attrType.equalsIgnoreCase(AttributeType.LONG.name())){
-            sb.append("long");
-        }else if(attrType.equalsIgnoreCase(AttributeType.BOOL.name())){
-            sb.append("bool");
-        }else if(attrType.equalsIgnoreCase(AttributeType.FLOAT.name())){
-            sb.append("float");
-        }else if(attrType.equalsIgnoreCase(AttributeType.DOUBLE.name())){
-            sb.append("double");
-        }else{
-            LOG.warn("AttrType is not recognized, ignore : " + attrType);
-        }
-        sb.append(",");
-    }
-
-	public static Object getAttrDefaultValue(String streamName, String attrName){
-		SortedMap<String, AlertStreamSchemaEntity> map = getAttrMap(streamName);
-		AlertStreamSchemaEntity entity = map.get(attrName);
-		if (entity.getDefaultValue() != null) {
-			return entity.getDefaultValue();
-		}
-		else {
-			String attrType = entity.getAttrType();
-			if (attrType.equalsIgnoreCase(AttributeType.STRING.name())) {
-				return "NA";
-			} else if (attrType.equalsIgnoreCase(AttributeType.INTEGER.name()) || attrType.equalsIgnoreCase(AttributeType.LONG.name())) {
-				return -1;
-			} else if (attrType.equalsIgnoreCase(AttributeType.BOOL.name())) {
-				return true;
-			} else {
-				LOG.warn("AttrType is not recognized: " + attrType + ", treat it as string");
-				return "N/A";
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
deleted file mode 100644
index 83d30e0..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/StreamMetadataManager.java
+++ /dev/null
@@ -1,128 +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.policy.siddhi;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import com.typesafe.config.Config;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAO;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.commons.collections.map.UnmodifiableMap;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * centralized memory where all stream metadata sit on, it is not mutable data
- */
-public class StreamMetadataManager {
-	private static final Logger LOG = LoggerFactory.getLogger(StreamMetadataManager.class);
-	
-	private static StreamMetadataManager instance = new StreamMetadataManager();
-	private Map<String, List<AlertStreamSchemaEntity>> map = new HashMap<String, List<AlertStreamSchemaEntity>>();
-	private Map<String, SortedMap<String, AlertStreamSchemaEntity>> map2 = new HashMap<String, SortedMap<String, AlertStreamSchemaEntity>>();
-	private volatile boolean initialized = false;
-	
-	private StreamMetadataManager(){
-	}
-	
-	public static StreamMetadataManager getInstance(){
-		return instance;
-	}
-	
-	private void internalInit(Config config, AlertStreamSchemaDAO dao){
-		try{
-			String application = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-			List<AlertStreamSchemaEntity> list = dao.findAlertStreamSchemaByApplication(application);
-			if(list == null)
-				return;
-			for (AlertStreamSchemaEntity entity : list) {
-				String streamName = entity.getTags().get(Constants.STREAM_NAME);
-				if (map.get(streamName) == null) {
-					map.put(streamName, new ArrayList<AlertStreamSchemaEntity>());
-					map2.put(streamName, new TreeMap<String, AlertStreamSchemaEntity>());
-				}
-				map.get(streamName).add(entity);
-				map2.get(streamName).put(entity.getTags().get(Constants.ATTR_NAME), entity);
-			}
-		}catch(Exception ex){
-			LOG.error("Fail building metadata manger", ex);
-			throw new IllegalStateException(ex);
-		}
-	}
-	
-	/**
-	 * singleton with init would be good for unit test as well, and it ensures that
-	 * initialization happens only once before you use it.  
-	 * @param config
-	 * @param dao
-	 */
-	public void init(Config config, AlertStreamSchemaDAO dao){
-		if(!initialized){
-			synchronized(this){
-				if(!initialized){
-                    if(LOG.isDebugEnabled()) LOG.debug("Initializing ...");
-					internalInit(config, dao);
-					initialized = true;
-                    LOG.info("Successfully initialized");
-				}
-			}
-		}else{
-            LOG.info("Already initialized, skip");
-        }
-	}
-
-	// Only for unit test purpose
-	public void reset() {
-		synchronized (this) {
-			initialized = false;
-			map.clear();
-			map2.clear();
-		}
-	}
-
-	private void ensureInitialized(){
-		if(!initialized)
-			throw new IllegalStateException("StreamMetadataManager should be initialized before using it");
-	}
-	
-	public List<AlertStreamSchemaEntity> getMetadataEntitiesForStream(String streamName){
-		ensureInitialized();
-		return getMetadataEntitiesForAllStreams().get(streamName);
-	}
-	
-	public Map<String, List<AlertStreamSchemaEntity>> getMetadataEntitiesForAllStreams(){
-		ensureInitialized();
-		return UnmodifiableMap.decorate(map);
-	}
-	
-	public SortedMap<String, AlertStreamSchemaEntity> getMetadataEntityMapForStream(String streamName){
-		ensureInitialized();
-		return getMetadataEntityMapForAllStreams().get(streamName);
-	}
-	
-	public Map<String, SortedMap<String, AlertStreamSchemaEntity>> getMetadataEntityMapForAllStreams(){
-		ensureInitialized();
-		return UnmodifiableMap.decorate(map2);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ContainsIgnoreCaseExtension.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ContainsIgnoreCaseExtension.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ContainsIgnoreCaseExtension.java
deleted file mode 100644
index 6d3a0e4..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ContainsIgnoreCaseExtension.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.policy.siddhi.extension;
-
-import org.wso2.siddhi.core.config.ExecutionPlanContext;
-import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
-import org.wso2.siddhi.core.executor.ExpressionExecutor;
-import org.wso2.siddhi.core.executor.function.FunctionExecutor;
-import org.wso2.siddhi.query.api.definition.Attribute;
-import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
-
-public class ContainsIgnoreCaseExtension extends FunctionExecutor {
-
-    Attribute.Type returnType = Attribute.Type.BOOL;
-
-    @Override
-    protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
-        if (attributeExpressionExecutors.length != 2) {
-            throw new ExecutionPlanValidationException("Invalid no of arguments passed to str:containsIgnoreCase() function, required 2, " +
-                    "but found " + attributeExpressionExecutors.length);
-        }
-        if (attributeExpressionExecutors[0].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the first argument of str:containsIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[0].getReturnType().toString());
-        }
-        if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the second argument of str:containsIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[1].getReturnType().toString());
-        }
-    }
-
-    @Override
-    protected Object execute(Object[] data) {
-        if (data[0] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:containsIgnoreCase() function. First argument cannot be null");
-        }
-        if (data[1] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:containsIgnoreCase() function. Second argument cannot be null");
-        }
-        String str1 = (String)data[0];
-        String str2 = (String)data[1];
-        return str1.toUpperCase().contains(str2.toUpperCase());
-    }
-
-    @Override
-    protected Object execute(Object data) {
-        return null; //Since the containsIgnoreCase function takes in 2 parameters, this method does not get called. Hence, not implemented.
-    }
-
-    @Override
-    public void start() {
-        //Nothing to start
-    }
-
-    @Override
-    public void stop() {
-        //Nothing to stop
-    }
-
-    @Override
-    public Attribute.Type getReturnType() {
-        return returnType;
-    }
-
-    @Override
-    public Object[] currentState() {
-        return new Object[]{};
-    }
-
-    @Override
-    public void restoreState(Object[] state) {
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/EqualsIgnoreCaseExtension.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/EqualsIgnoreCaseExtension.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/EqualsIgnoreCaseExtension.java
deleted file mode 100644
index 3a622e2..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/EqualsIgnoreCaseExtension.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.policy.siddhi.extension;
-
-import org.wso2.siddhi.core.config.ExecutionPlanContext;
-import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
-import org.wso2.siddhi.core.executor.ConstantExpressionExecutor;
-import org.wso2.siddhi.core.executor.ExpressionExecutor;
-import org.wso2.siddhi.core.executor.function.FunctionExecutor;
-import org.wso2.siddhi.query.api.definition.Attribute;
-import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class EqualsIgnoreCaseExtension extends FunctionExecutor {
-
-    Attribute.Type returnType = Attribute.Type.BOOL;
-
-    @Override
-    protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
-        if (attributeExpressionExecutors.length != 2) {
-            throw new ExecutionPlanValidationException("Invalid no of arguments passed to str:equalsIgnoreCase() function, required 2, " +
-                    "but found " + attributeExpressionExecutors.length);
-        }
-        if (attributeExpressionExecutors[0].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the first argument of str:equalsIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[0].getReturnType().toString());
-        }
-        if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the second argument of str:equalsIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[1].getReturnType().toString());
-        }
-    }
-
-    @Override
-    protected Object execute(Object[] data) {
-        if (data[0] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:equalsIgnoreCase() function. First argument cannot be null");
-        }
-        if (data[1] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:equalsIgnoreCase() function. Second argument cannot be null");
-        }
-        String str1 = (String)data[0];
-        String str2 = (String)data[1];
-        return str1.equalsIgnoreCase(str2);
-    }
-
-    @Override
-    protected Object execute(Object data) {
-        return null; //Since the equalsIgnoreCase function takes in 2 parameters, this method does not get called. Hence, not implemented.
-    }
-
-    @Override
-    public void start() {
-        //Nothing to start
-    }
-
-    @Override
-    public void stop() {
-        //Nothing to stop
-    }
-
-    @Override
-    public Attribute.Type getReturnType() {
-        return returnType;
-    }
-
-    @Override
-    public Object[] currentState() {
-        return new Object[]{};
-    }
-
-    @Override
-    public void restoreState(Object[] state) {
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ExternalTimeBatchWindowProcessor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ExternalTimeBatchWindowProcessor.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ExternalTimeBatchWindowProcessor.java
deleted file mode 100644
index c70d1a1..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/ExternalTimeBatchWindowProcessor.java
+++ /dev/null
@@ -1,184 +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.policy.siddhi.extension;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wso2.siddhi.core.config.ExecutionPlanContext;
-import org.wso2.siddhi.core.event.ComplexEvent;
-import org.wso2.siddhi.core.event.ComplexEventChunk;
-import org.wso2.siddhi.core.event.MetaComplexEvent;
-import org.wso2.siddhi.core.event.stream.StreamEvent;
-import org.wso2.siddhi.core.event.stream.StreamEventCloner;
-import org.wso2.siddhi.core.executor.ConstantExpressionExecutor;
-import org.wso2.siddhi.core.executor.ExpressionExecutor;
-import org.wso2.siddhi.core.executor.VariableExpressionExecutor;
-import org.wso2.siddhi.core.query.processor.Processor;
-import org.wso2.siddhi.core.query.processor.stream.window.FindableProcessor;
-import org.wso2.siddhi.core.query.processor.stream.window.WindowProcessor;
-import org.wso2.siddhi.core.table.EventTable;
-import org.wso2.siddhi.core.util.collection.operator.Finder;
-import org.wso2.siddhi.core.util.parser.CollectionOperatorParser;
-import org.wso2.siddhi.query.api.definition.Attribute;
-import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
-import org.wso2.siddhi.query.api.expression.Expression;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since Dec 23, 2015
- *
- */
-
-public class ExternalTimeBatchWindowProcessor extends WindowProcessor implements FindableProcessor {
-    
-    private long timeToKeep;
-
-    private ComplexEventChunk<StreamEvent> currentEventChunk = new ComplexEventChunk<StreamEvent>();
-    private ComplexEventChunk<StreamEvent> expiredEventChunk = new ComplexEventChunk<StreamEvent>();
-    
-    static final Logger log = LoggerFactory.getLogger(ExternalTimeBatchWindowProcessor.class);
-    private VariableExpressionExecutor timeStampVariableExpressionExecutor;
-
-    private long lastSendTime = -1;
-
-    @Override
-    protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
-        this.expiredEventChunk = new ComplexEventChunk<StreamEvent>();
-        if (attributeExpressionExecutors.length == 2) {
-            if (attributeExpressionExecutors[1].getReturnType() == Attribute.Type.INT) {
-                timeToKeep = Integer.parseInt(String.valueOf(((ConstantExpressionExecutor) attributeExpressionExecutors[1]).getValue()));
-            } else {
-                timeToKeep = Long.parseLong(String.valueOf(((ConstantExpressionExecutor) attributeExpressionExecutors[1]).getValue()));
-            }
-            if (!(attributeExpressionExecutors[0] instanceof VariableExpressionExecutor)) {
-                throw new ExecutionPlanValidationException("ExternalTime window's 1st parameter timeStamp should be a type long stream attribute but found " + attributeExpressionExecutors[0].getClass());
-            }
-            timeStampVariableExpressionExecutor = ((VariableExpressionExecutor) attributeExpressionExecutors[0]);
-            if (timeStampVariableExpressionExecutor.getReturnType() != Attribute.Type.LONG) {
-                throw new ExecutionPlanValidationException("ExternalTime window's 1st parameter timeStamp should be type long, but found " + timeStampVariableExpressionExecutor.getReturnType());
-            }
-        } else {
-            throw new ExecutionPlanValidationException("ExternalTime window should only have two parameter (<long> timeStamp, <int|long|time> windowTime), but found " + attributeExpressionExecutors.length + " input attributes");
-        }
-    }
-    
-    /**
-     * Here an assumption is taken: 
-     * Parameter: timestamp: The time which the window determines as current time and will act upon, 
-     *              the value of this parameter should be monotonically increasing. 
-     * from https://docs.wso2.com/display/CEP400/Inbuilt+Windows#InbuiltWindows-externalTime
-     * 
-     */
-    @Override
-    protected synchronized void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner) {
-        // event incoming trigger process. No events means no action
-        if (!streamEventChunk.hasNext()) {
-            return;
-        }
-
-        // for window beginning, if window is empty, set lastSendTime to incomingChunk first.
-        if (currentEventChunk.getFirst() == null && lastSendTime < 0) {
-            lastSendTime = (Long) streamEventChunk.getFirst().getAttribute(timeStampVariableExpressionExecutor.getPosition());
-        }
-
-        while(streamEventChunk.hasNext()) {
-            StreamEvent currStreamEvent = streamEventChunk.next();
-            if (currStreamEvent.getType() != ComplexEvent.Type.CURRENT) {
-                continue;
-            }
-            
-            long currentTime = (Long) currStreamEvent.getAttribute(timeStampVariableExpressionExecutor.getPosition());
-            if (currentTime < lastSendTime + timeToKeep) {
-                cloneAppend(streamEventCloner, currStreamEvent);
-            } else if (currentTime >= lastSendTime + timeToKeep) {
-                flushCurentChunk(nextProcessor, streamEventCloner, currentTime);
-                cloneAppend(streamEventCloner, currStreamEvent);
-            }
-        }
-    }
-
-    private void cloneAppend(StreamEventCloner streamEventCloner, StreamEvent currStreamEvent) {
-        StreamEvent clonedStreamEvent = streamEventCloner.copyStreamEvent(currStreamEvent);
-        currentEventChunk.add(clonedStreamEvent);
-    }
-
-    private void flushCurentChunk(Processor nextProcessor, StreamEventCloner streamEventCloner, long currentTime) {
-        // need flush the currentEventChunk
-        currentEventChunk.reset();
-        ComplexEventChunk<StreamEvent> newEventChunk = new ComplexEventChunk<StreamEvent>();
-
-        // mark the timestamp for the expiredType event
-        while (expiredEventChunk.hasNext()) {
-            StreamEvent expiredEvent = expiredEventChunk.next();
-            expiredEvent.setTimestamp(currentTime);
-        }
-        // add expired event to newEventChunk too.
-        if (expiredEventChunk.getFirst() != null) {
-            newEventChunk.add(expiredEventChunk.getFirst());
-        }
-        
-        // make current event chunk as expired in expiredChunk
-        expiredEventChunk.clear();
-        while (currentEventChunk.hasNext()) {
-            StreamEvent currentEvent = currentEventChunk.next();
-            StreamEvent toExpireEvent = streamEventCloner.copyStreamEvent(currentEvent);
-            toExpireEvent.setType(StreamEvent.Type.EXPIRED);
-            expiredEventChunk.add(toExpireEvent);
-        }
-
-        // add current event chunk to next processor
-        if (currentEventChunk.getFirst() != null) {
-            newEventChunk.add(currentEventChunk.getFirst());
-        }
-        currentEventChunk.clear();
-
-        // update timestamp, call next processor
-        lastSendTime = currentTime;
-        if (newEventChunk.getFirst() != null) {
-            nextProcessor.process(newEventChunk);
-        }
-    }
-
-    public void start() {
-        //Do nothing
-    }
-
-    public void stop() {
-        //Do nothing
-    }
-
-    public Object[] currentState() {
-        return new Object[]{currentEventChunk, expiredEventChunk};
-    }
-
-    @SuppressWarnings("unchecked")
-    public void restoreState(Object[] state) {
-        currentEventChunk = (ComplexEventChunk<StreamEvent>) state[0];
-        expiredEventChunk = (ComplexEventChunk<StreamEvent>) state[1];
-    }
-
-    public synchronized StreamEvent find(ComplexEvent matchingEvent, Finder finder) {
-        return finder.find(matchingEvent, expiredEventChunk, streamEventCloner);
-    }
-
-    public Finder constructFinder(Expression expression, MetaComplexEvent metaComplexEvent, ExecutionPlanContext executionPlanContext, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String, EventTable> eventTableMap, int matchingStreamIndex, long withinTime) {
-        return CollectionOperatorParser.parse(expression, metaComplexEvent, executionPlanContext, variableExpressionExecutors, eventTableMap, matchingStreamIndex, inputDefinition, withinTime);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/RegexpIgnoreCaseFunctionExtension.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/RegexpIgnoreCaseFunctionExtension.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/RegexpIgnoreCaseFunctionExtension.java
deleted file mode 100644
index 14e98cc..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/siddhi/extension/RegexpIgnoreCaseFunctionExtension.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * Licensed 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.policy.siddhi.extension;
-
-import org.wso2.siddhi.core.config.ExecutionPlanContext;
-import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
-import org.wso2.siddhi.core.executor.ConstantExpressionExecutor;
-import org.wso2.siddhi.core.executor.ExpressionExecutor;
-import org.wso2.siddhi.extension.string.RegexpFunctionExtension;
-import org.wso2.siddhi.query.api.definition.Attribute;
-import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * regexpIgnoreCase(string, regex)
- * Tells whether or not this 'string' matches the given regular expression 'regex'.
- * Accept Type(s): (STRING,STRING)
- * Return Type(s): BOOLEAN
- */
-public class RegexpIgnoreCaseFunctionExtension extends RegexpFunctionExtension {
-
-    //state-variables
-    boolean isRegexConstant = false;
-    String regexConstant;
-    Pattern patternConstant;
-
-    @Override
-    protected void init(ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
-        if (attributeExpressionExecutors.length != 2) {
-            throw new ExecutionPlanValidationException("Invalid no of arguments passed to str:regexpIgnoreCase() function, required 2, " +
-                    "but found " + attributeExpressionExecutors.length);
-        }
-        if (attributeExpressionExecutors[0].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the first argument of str:regexpIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[0].getReturnType().toString());
-        }
-        if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
-            throw new ExecutionPlanValidationException("Invalid parameter type found for the second argument of str:regexpIgnoreCase() function, " +
-                    "required "+ Attribute.Type.STRING+", but found "+attributeExpressionExecutors[1].getReturnType().toString());
-        }
-        if(attributeExpressionExecutors[1] instanceof ConstantExpressionExecutor){
-            isRegexConstant = true;
-            regexConstant = (String) ((ConstantExpressionExecutor) attributeExpressionExecutors[1]).getValue();
-            patternConstant = Pattern.compile(regexConstant, Pattern.CASE_INSENSITIVE);
-        }
-    }
-
-    @Override
-    protected Object execute(Object[] data) {
-        String regex;
-        Pattern pattern;
-        Matcher matcher;
-
-        if (data[0] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:regexpIgnoreCase() function. First argument cannot be null");
-        }
-        if (data[1] == null) {
-            throw new ExecutionPlanRuntimeException("Invalid input given to str:regexpIgnoreCase() function. Second argument cannot be null");
-        }
-        String source = (String) data[0];
-
-        if(!isRegexConstant){
-            regex = (String) data[1];
-            pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
-            matcher = pattern.matcher(source);
-            return matcher.matches();
-
-        } else {
-            matcher = patternConstant.matcher(source);
-            return matcher.matches();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider b/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
deleted file mode 100644
index eac2bfd..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.policy.siddhi.SiddhiPolicyEvaluatorServiceProviderImpl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/eagle.siddhiext
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/eagle.siddhiext b/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/eagle.siddhiext
deleted file mode 100644
index 2671c31..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/eagle.siddhiext
+++ /dev/null
@@ -1,18 +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.
-#
-
-externalTimeBatch=org.apache.eagle.policy.siddhi.extension.ExternalTimeBatchWindowProcessor
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext b/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
deleted file mode 100644
index 479cdb0..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-charAt=org.wso2.siddhi.extension.string.CharAtFunctionExtension
-coalesce=org.wso2.siddhi.extension.string.CoalesceFunctionExtension
-concat=org.wso2.siddhi.extension.string.ConcatFunctionExtension
-length=org.wso2.siddhi.extension.string.LengthFunctionExtension
-lower=org.wso2.siddhi.extension.string.LowerFunctionExtension
-regexp=org.wso2.siddhi.extension.string.RegexpFunctionExtension
-repeat=org.wso2.siddhi.extension.string.RepeatFunctionExtension
-replaceAll=org.wso2.siddhi.extension.string.ReplaceAllFunctionExtension
-replaceFirst=org.wso2.siddhi.extension.string.ReplaceFirstFunctionExtension
-reverse=org.wso2.siddhi.extension.string.ReverseFunctionExtension
-strcmp=org.wso2.siddhi.extension.string.StrcmpFunctionExtension
-substr=org.wso2.siddhi.extension.string.SubstrFunctionExtension
-trim=org.wso2.siddhi.extension.string.TrimFunctionExtension
-upper=org.wso2.siddhi.extension.string.UpperFunctionExtension
-hex=org.wso2.siddhi.extension.string.HexFunctionExtension
-unhex=org.wso2.siddhi.extension.string.UnhexFunctionExtension
-contains=org.wso2.siddhi.extension.string.ContainsFunctionExtension
-
-# Eagle Siddhi Extension
-equalsIgnoreCase=org.apache.eagle.policy.siddhi.extension.EqualsIgnoreCaseExtension
-containsIgnoreCase=org.apache.eagle.policy.siddhi.extension.ContainsIgnoreCaseExtension
-regexpIgnoreCase=org.apache.eagle.policy.siddhi.extension.RegexpIgnoreCaseFunctionExtension
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java b/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
deleted file mode 100644
index c88d9bb..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/test/java/org/apache/eagle/policy/dao/TestSchemaDao.java
+++ /dev/null
@@ -1,37 +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.policy.dao;
-
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.List;
-
-/**
- * Created on 12/31/15.
- */
-public class TestSchemaDao {
-
-    @Ignore
-    @Test
-    public void test() throws Exception {
-        AlertStreamSchemaDAO dao = new AlertStreamSchemaDAOImpl("localhost", 9099, "admin", "secret");
-        List<AlertStreamSchemaEntity> entities = dao.findAlertStreamSchemaByApplication("hdfsAuditLog");
-        System.out.print(entities);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/pom.xml b/eagle-core/eagle-policy/pom.xml
deleted file mode 100644
index ab104a6..0000000
--- a/eagle-core/eagle-policy/pom.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>eagle</groupId>
-        <artifactId>eagle-core</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>eagle-policy-parent</artifactId>
-    <packaging>pom</packaging>
-
-    <name>eagle-policy-parent</name>
-    <modules>
-        <module>eagle-policy-base</module>
-    </modules>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/pom.xml b/eagle-core/eagle-query/eagle-antlr/pom.xml
deleted file mode 100644
index c0d519f..0000000
--- a/eagle-core/eagle-query/eagle-antlr/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-      <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>eagle-antlr</artifactId>
-  <packaging>jar</packaging>
-  <name>eagle-antlr</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.antlr</groupId>
-      <artifactId>antlr4-runtime</artifactId>
-    </dependency>
-	  <dependency>
-		  <groupId>commons-lang</groupId>
-		  <artifactId>commons-lang</artifactId>
-	  </dependency>
-  </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/EagleFilter.g4
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/EagleFilter.g4 b/eagle-core/eagle-query/eagle-antlr/src/main/java/EagleFilter.g4
deleted file mode 100755
index a146aac..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/EagleFilter.g4
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-grammar EagleFilter;
-
-@header{
-// package org.apache.eagle.query.antlr.generated;
-}
-
-/*------------------------------------------------------------------
- * PARSER RULES
- *------------------------------------------------------------------*/
-
-filter
-        : combine EOF
-        ;
-combine 
-        : LPAREN combine RPAREN
-		| equation        
-        | combine AND combine
-        | combine OR combine
-        ;
-equation        
-        : VALUE OP VALUE
-        | ID OP VALUE     
-        ;
-
-/*------------------------------------------------------------------
- * LEXER RULES
- *------------------------------------------------------------------*/
-WHITESPACE
-        : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+
-        -> skip
-        ;
-OP
-        : '='   | '!='
-        | '>'   | '<'
-        | '>='  | '<='
-        | '=~'  | '!=~'
-        | 'in'  | 'IN'
-        | 'not' (' ')+ 'in'
-        | 'NOT' (' ')+ 'IN'
-        | 'contains'
-        | 'CONTAINS'
-        | 'not' (' ')+ 'contains'
-        | 'NOT' (' ')+ 'CONTAINS'
-        | 'is'  | 'IS'
-        | 'is' (' ')+ 'not'
-        | 'IS' (' ')+ 'NOT'
-        ;
-        
-AND
-        : 'AND'
-        | 'and'
-        ;             
-OR
-        : 'OR'
-        | 'or'
-        ;    
-        
-ID      : '@' (~[ "=()<>])+
-        ;
-VALUE   : EXPR
-		| SINGLE_VALUE
-        | SET
-        ;
-SINGLE_VALUE
-        : DOUBLEQUOTED_STRING
-        | NUMBER
-        | NULL
-        ;
-EXPR	: ('EXP'|'exp') LBRACE (~('}'))+ RBRACE
-		;        
-NUMBER
-        : '-'? UNSIGN_INT ('.' UNSIGN_INT)?
-        ;      
-NULL
-        : 'NULL'
-        | 'null'
-        ;
-SET
-        : LPAREN SINGLE_VALUE? (',' SINGLE_VALUE)* RPAREN
-        ;
-DOUBLEQUOTED_STRING
-        : '"' STRING '"'
-        | '""'
-        ;
-
-fragment UNSIGN_INT : ('0'..'9')+
-                    ;
-// Fully support string including escaped quotes
-fragment STRING     : (~('"')| '\\"')+
-                    ;
-LPAREN              : '('
-                    ;
-RPAREN              : ')'
-                    ;
-LBRACE              : '{'
-                    ;
-RBRACE              : '}'
-                    ;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilter.tokens
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilter.tokens b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilter.tokens
deleted file mode 100755
index 5ebca36..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilter.tokens
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-WHITESPACE=1
-OP=2
-AND=3
-OR=4
-ID=5
-VALUE=6
-SINGLE_VALUE=7
-EXPR=8
-NUMBER=9
-NULL=10
-SET=11
-DOUBLEQUOTED_STRING=12
-LPAREN=13
-RPAREN=14
-LBRACE=15
-RBRACE=16
-'('=13
-')'=14
-'{'=15
-'}'=16

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterBaseListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterBaseListener.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterBaseListener.java
deleted file mode 100755
index 65fa321..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterBaseListener.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated from EagleFilter.g4 by ANTLR 4.5
-package org.apache.eagle.query.antlr.generated;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-/**
- * This class provides an empty implementation of {@link EagleFilterListener},
- * which can be extended to create a listener which only needs to handle a subset
- * of the available methods.
- */
-public class EagleFilterBaseListener implements EagleFilterListener {
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void enterFilter(EagleFilterParser.FilterContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void exitFilter(EagleFilterParser.FilterContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void enterCombine(EagleFilterParser.CombineContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void exitCombine(EagleFilterParser.CombineContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void enterEquation(EagleFilterParser.EquationContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void exitEquation(EagleFilterParser.EquationContext ctx) { }
-
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void enterEveryRule(ParserRuleContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void exitEveryRule(ParserRuleContext ctx) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void visitTerminal(TerminalNode node) { }
-	/**
-	 * {@inheritDoc}
-	 *
-	 * <p>The default implementation does nothing.</p>
-	 */
-	@Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.java b/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.java
deleted file mode 100755
index 0899732..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/main/java/org/apache/eagle/query/antlr/generated/EagleFilterLexer.java
+++ /dev/null
@@ -1,216 +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.
- */
-// Generated from EagleFilter.g4 by ANTLR 4.5
-package org.apache.eagle.query.antlr.generated;
-
-import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
-public class EagleFilterLexer extends Lexer {
-	static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); }
-
-	protected static final DFA[] _decisionToDFA;
-	protected static final PredictionContextCache _sharedContextCache =
-		new PredictionContextCache();
-	public static final int
-		WHITESPACE=1, OP=2, AND=3, OR=4, ID=5, VALUE=6, SINGLE_VALUE=7, EXPR=8, 
-		NUMBER=9, NULL=10, SET=11, DOUBLEQUOTED_STRING=12, LPAREN=13, RPAREN=14, 
-		LBRACE=15, RBRACE=16;
-	public static String[] modeNames = {
-		"DEFAULT_MODE"
-	};
-
-	public static final String[] ruleNames = {
-		"WHITESPACE", "OP", "AND", "OR", "ID", "VALUE", "SINGLE_VALUE", "EXPR", 
-		"NUMBER", "NULL", "SET", "DOUBLEQUOTED_STRING", "UNSIGN_INT", "STRING", 
-		"LPAREN", "RPAREN", "LBRACE", "RBRACE"
-	};
-
-	private static final String[] _LITERAL_NAMES = {
-		null, null, null, null, null, null, null, null, null, null, null, null, 
-		null, "'('", "')'", "'{'", "'}'"
-	};
-	private static final String[] _SYMBOLIC_NAMES = {
-		null, "WHITESPACE", "OP", "AND", "OR", "ID", "VALUE", "SINGLE_VALUE", 
-		"EXPR", "NUMBER", "NULL", "SET", "DOUBLEQUOTED_STRING", "LPAREN", "RPAREN", 
-		"LBRACE", "RBRACE"
-	};
-	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
-	/**
-	 * @deprecated Use {@link #VOCABULARY} instead.
-	 */
-	@Deprecated
-	public static final String[] tokenNames;
-	static {
-		tokenNames = new String[_SYMBOLIC_NAMES.length];
-		for (int i = 0; i < tokenNames.length; i++) {
-			tokenNames[i] = VOCABULARY.getLiteralName(i);
-			if (tokenNames[i] == null) {
-				tokenNames[i] = VOCABULARY.getSymbolicName(i);
-			}
-
-			if (tokenNames[i] == null) {
-				tokenNames[i] = "<INVALID>";
-			}
-		}
-	}
-
-	@Override
-	@Deprecated
-	public String[] getTokenNames() {
-		return tokenNames;
-	}
-
-	@Override
-
-	public Vocabulary getVocabulary() {
-		return VOCABULARY;
-	}
-
-
-	public EagleFilterLexer(CharStream input) {
-		super(input);
-		_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
-	}
-
-	@Override
-	public String getGrammarFileName() { return "EagleFilter.g4"; }
-
-	@Override
-	public String[] getRuleNames() { return ruleNames; }
-
-	@Override
-	public String getSerializedATN() { return _serializedATN; }
-
-	@Override
-	public String[] getModeNames() { return modeNames; }
-
-	@Override
-	public ATN getATN() { return _ATN; }
-
-	public static final String _serializedATN =
-		"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\22\u010c\b\1\4\2"+
-		"\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+
-		"\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
-		"\t\22\4\23\t\23\3\2\6\2)\n\2\r\2\16\2*\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\6\3E"+
-		"\n\3\r\3\16\3F\3\3\3\3\3\3\3\3\3\3\3\3\3\3\6\3P\n\3\r\3\16\3Q\3\3\3\3"+
-		"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\6\3k\n\3\r\3\16\3l\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\3\6\3|\n\3\r\3\16\3}\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\6\3\u0090\n\3\r\3\16\3\u0091\3\3\3\3\3"+
-		"\3\3\3\3\3\3\3\3\3\6\3\u009b\n\3\r\3\16\3\u009c\3\3\3\3\3\3\5\3\u00a2"+
-		"\n\3\3\4\3\4\3\4\3\4\3\4\3\4\5\4\u00aa\n\4\3\5\3\5\3\5\3\5\5\5\u00b0\n"+
-		"\5\3\6\3\6\6\6\u00b4\n\6\r\6\16\6\u00b5\3\7\3\7\3\7\5\7\u00bb\n\7\3\b"+
-		"\3\b\3\b\5\b\u00c0\n\b\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u00c8\n\t\3\t\3\t\6"+
-		"\t\u00cc\n\t\r\t\16\t\u00cd\3\t\3\t\3\n\5\n\u00d3\n\n\3\n\3\n\3\n\5\n"+
-		"\u00d8\n\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\5\13\u00e2\n\13\3\f"+
-		"\3\f\5\f\u00e6\n\f\3\f\3\f\7\f\u00ea\n\f\f\f\16\f\u00ed\13\f\3\f\3\f\3"+
-		"\r\3\r\3\r\3\r\3\r\3\r\5\r\u00f7\n\r\3\16\6\16\u00fa\n\16\r\16\16\16\u00fb"+
-		"\3\17\3\17\3\17\6\17\u0101\n\17\r\17\16\17\u0102\3\20\3\20\3\21\3\21\3"+
-		"\22\3\22\3\23\3\23\2\2\24\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25"+
-		"\f\27\r\31\16\33\2\35\2\37\17!\20#\21%\22\3\2\7\5\2\13\f\16\17\"\"\4\2"+
-		">>@@\6\2\"\"$$*+>@\3\2\177\177\3\2$$\u0134\2\3\3\2\2\2\2\5\3\2\2\2\2\7"+
-		"\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2"+
-		"\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\37\3\2\2\2\2"+
-		"!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\3(\3\2\2\2\5\u00a1\3\2\2\2\7\u00a9\3\2"+
-		"\2\2\t\u00af\3\2\2\2\13\u00b1\3\2\2\2\r\u00ba\3\2\2\2\17\u00bf\3\2\2\2"+
-		"\21\u00c7\3\2\2\2\23\u00d2\3\2\2\2\25\u00e1\3\2\2\2\27\u00e3\3\2\2\2\31"+
-		"\u00f6\3\2\2\2\33\u00f9\3\2\2\2\35\u0100\3\2\2\2\37\u0104\3\2\2\2!\u0106"+
-		"\3\2\2\2#\u0108\3\2\2\2%\u010a\3\2\2\2\')\t\2\2\2(\'\3\2\2\2)*\3\2\2\2"+
-		"*(\3\2\2\2*+\3\2\2\2+,\3\2\2\2,-\b\2\2\2-\4\3\2\2\2.\u00a2\7?\2\2/\60"+
-		"\7#\2\2\60\u00a2\7?\2\2\61\u00a2\t\3\2\2\62\63\7@\2\2\63\u00a2\7?\2\2"+
-		"\64\65\7>\2\2\65\u00a2\7?\2\2\66\67\7?\2\2\67\u00a2\7\u0080\2\289\7#\2"+
-		"\29:\7?\2\2:\u00a2\7\u0080\2\2;<\7k\2\2<\u00a2\7p\2\2=>\7K\2\2>\u00a2"+
-		"\7P\2\2?@\7p\2\2@A\7q\2\2AB\7v\2\2BD\3\2\2\2CE\7\"\2\2DC\3\2\2\2EF\3\2"+
-		"\2\2FD\3\2\2\2FG\3\2\2\2GH\3\2\2\2HI\7k\2\2I\u00a2\7p\2\2JK\7P\2\2KL\7"+
-		"Q\2\2LM\7V\2\2MO\3\2\2\2NP\7\"\2\2ON\3\2\2\2PQ\3\2\2\2QO\3\2\2\2QR\3\2"+
-		"\2\2RS\3\2\2\2ST\7K\2\2T\u00a2\7P\2\2UV\7e\2\2VW\7q\2\2WX\7p\2\2XY\7v"+
-		"\2\2YZ\7c\2\2Z[\7k\2\2[\\\7p\2\2\\\u00a2\7u\2\2]^\7E\2\2^_\7Q\2\2_`\7"+
-		"P\2\2`a\7V\2\2ab\7C\2\2bc\7K\2\2cd\7P\2\2d\u00a2\7U\2\2ef\7p\2\2fg\7q"+
-		"\2\2gh\7v\2\2hj\3\2\2\2ik\7\"\2\2ji\3\2\2\2kl\3\2\2\2lj\3\2\2\2lm\3\2"+
-		"\2\2mn\3\2\2\2no\7e\2\2op\7q\2\2pq\7p\2\2qr\7v\2\2rs\7c\2\2st\7k\2\2t"+
-		"u\7p\2\2u\u00a2\7u\2\2vw\7P\2\2wx\7Q\2\2xy\7V\2\2y{\3\2\2\2z|\7\"\2\2"+
-		"{z\3\2\2\2|}\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\177\3\2\2\2\177\u0080\7E\2\2"+
-		"\u0080\u0081\7Q\2\2\u0081\u0082\7P\2\2\u0082\u0083\7V\2\2\u0083\u0084"+
-		"\7C\2\2\u0084\u0085\7K\2\2\u0085\u0086\7P\2\2\u0086\u00a2\7U\2\2\u0087"+
-		"\u0088\7k\2\2\u0088\u00a2\7u\2\2\u0089\u008a\7K\2\2\u008a\u00a2\7U\2\2"+
-		"\u008b\u008c\7k\2\2\u008c\u008d\7u\2\2\u008d\u008f\3\2\2\2\u008e\u0090"+
-		"\7\"\2\2\u008f\u008e\3\2\2\2\u0090\u0091\3\2\2\2\u0091\u008f\3\2\2\2\u0091"+
-		"\u0092\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u0094\7p\2\2\u0094\u0095\7q\2"+
-		"\2\u0095\u00a2\7v\2\2\u0096\u0097\7K\2\2\u0097\u0098\7U\2\2\u0098\u009a"+
-		"\3\2\2\2\u0099\u009b\7\"\2\2\u009a\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c"+
-		"\u009a\3\2\2\2\u009c\u009d\3\2\2\2\u009d\u009e\3\2\2\2\u009e\u009f\7P"+
-		"\2\2\u009f\u00a0\7Q\2\2\u00a0\u00a2\7V\2\2\u00a1.\3\2\2\2\u00a1/\3\2\2"+
-		"\2\u00a1\61\3\2\2\2\u00a1\62\3\2\2\2\u00a1\64\3\2\2\2\u00a1\66\3\2\2\2"+
-		"\u00a18\3\2\2\2\u00a1;\3\2\2\2\u00a1=\3\2\2\2\u00a1?\3\2\2\2\u00a1J\3"+
-		"\2\2\2\u00a1U\3\2\2\2\u00a1]\3\2\2\2\u00a1e\3\2\2\2\u00a1v\3\2\2\2\u00a1"+
-		"\u0087\3\2\2\2\u00a1\u0089\3\2\2\2\u00a1\u008b\3\2\2\2\u00a1\u0096\3\2"+
-		"\2\2\u00a2\6\3\2\2\2\u00a3\u00a4\7C\2\2\u00a4\u00a5\7P\2\2\u00a5\u00aa"+
-		"\7F\2\2\u00a6\u00a7\7c\2\2\u00a7\u00a8\7p\2\2\u00a8\u00aa\7f\2\2\u00a9"+
-		"\u00a3\3\2\2\2\u00a9\u00a6\3\2\2\2\u00aa\b\3\2\2\2\u00ab\u00ac\7Q\2\2"+
-		"\u00ac\u00b0\7T\2\2\u00ad\u00ae\7q\2\2\u00ae\u00b0\7t\2\2\u00af\u00ab"+
-		"\3\2\2\2\u00af\u00ad\3\2\2\2\u00b0\n\3\2\2\2\u00b1\u00b3\7B\2\2\u00b2"+
-		"\u00b4\n\4\2\2\u00b3\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b3\3\2"+
-		"\2\2\u00b5\u00b6\3\2\2\2\u00b6\f\3\2\2\2\u00b7\u00bb\5\21\t\2\u00b8\u00bb"+
-		"\5\17\b\2\u00b9\u00bb\5\27\f\2\u00ba\u00b7\3\2\2\2\u00ba\u00b8\3\2\2\2"+
-		"\u00ba\u00b9\3\2\2\2\u00bb\16\3\2\2\2\u00bc\u00c0\5\31\r\2\u00bd\u00c0"+
-		"\5\23\n\2\u00be\u00c0\5\25\13\2\u00bf\u00bc\3\2\2\2\u00bf\u00bd\3\2\2"+
-		"\2\u00bf\u00be\3\2\2\2\u00c0\20\3\2\2\2\u00c1\u00c2\7G\2\2\u00c2\u00c3"+
-		"\7Z\2\2\u00c3\u00c8\7R\2\2\u00c4\u00c5\7g\2\2\u00c5\u00c6\7z\2\2\u00c6"+
-		"\u00c8\7r\2\2\u00c7\u00c1\3\2\2\2\u00c7\u00c4\3\2\2\2\u00c8\u00c9\3\2"+
-		"\2\2\u00c9\u00cb\5#\22\2\u00ca\u00cc\n\5\2\2\u00cb\u00ca\3\2\2\2\u00cc"+
-		"\u00cd\3\2\2\2\u00cd\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00cf\3\2"+
-		"\2\2\u00cf\u00d0\5%\23\2\u00d0\22\3\2\2\2\u00d1\u00d3\7/\2\2\u00d2\u00d1"+
-		"\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d7\5\33\16\2"+
-		"\u00d5\u00d6\7\60\2\2\u00d6\u00d8\5\33\16\2\u00d7\u00d5\3\2\2\2\u00d7"+
-		"\u00d8\3\2\2\2\u00d8\24\3\2\2\2\u00d9\u00da\7P\2\2\u00da\u00db\7W\2\2"+
-		"\u00db\u00dc\7N\2\2\u00dc\u00e2\7N\2\2\u00dd\u00de\7p\2\2\u00de\u00df"+
-		"\7w\2\2\u00df\u00e0\7n\2\2\u00e0\u00e2\7n\2\2\u00e1\u00d9\3\2\2\2\u00e1"+
-		"\u00dd\3\2\2\2\u00e2\26\3\2\2\2\u00e3\u00e5\5\37\20\2\u00e4\u00e6\5\17"+
-		"\b\2\u00e5\u00e4\3\2\2\2\u00e5\u00e6\3\2\2\2\u00e6\u00eb\3\2\2\2\u00e7"+
-		"\u00e8\7.\2\2\u00e8\u00ea\5\17\b\2\u00e9\u00e7\3\2\2\2\u00ea\u00ed\3\2"+
-		"\2\2\u00eb\u00e9\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00ee\3\2\2\2\u00ed"+
-		"\u00eb\3\2\2\2\u00ee\u00ef\5!\21\2\u00ef\30\3\2\2\2\u00f0\u00f1\7$\2\2"+
-		"\u00f1\u00f2\5\35\17\2\u00f2\u00f3\7$\2\2\u00f3\u00f7\3\2\2\2\u00f4\u00f5"+
-		"\7$\2\2\u00f5\u00f7\7$\2\2\u00f6\u00f0\3\2\2\2\u00f6\u00f4\3\2\2\2\u00f7"+
-		"\32\3\2\2\2\u00f8\u00fa\4\62;\2\u00f9\u00f8\3\2\2\2\u00fa\u00fb\3\2\2"+
-		"\2\u00fb\u00f9\3\2\2\2\u00fb\u00fc\3\2\2\2\u00fc\34\3\2\2\2\u00fd\u0101"+
-		"\n\6\2\2\u00fe\u00ff\7^\2\2\u00ff\u0101\7$\2\2\u0100\u00fd\3\2\2\2\u0100"+
-		"\u00fe\3\2\2\2\u0101\u0102\3\2\2\2\u0102\u0100\3\2\2\2\u0102\u0103\3\2"+
-		"\2\2\u0103\36\3\2\2\2\u0104\u0105\7*\2\2\u0105 \3\2\2\2\u0106\u0107\7"+
-		"+\2\2\u0107\"\3\2\2\2\u0108\u0109\7}\2\2\u0109$\3\2\2\2\u010a\u010b\7"+
-		"\177\2\2\u010b&\3\2\2\2\33\2*FQl}\u0091\u009c\u00a1\u00a9\u00af\u00b5"+
-		"\u00ba\u00bf\u00c7\u00cd\u00d2\u00d7\u00e1\u00e5\u00eb\u00f6\u00fb\u0100"+
-		"\u0102\3\b\2\2";
-	public static final ATN _ATN =
-		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
-	static {
-		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
-		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
-			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
-		}
-	}
-}
\ No newline at end of file



[50/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index aa8bcd3..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,22 +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.
-
-language: java
-
-jdk: openjdk7
-
-install : mvn install -DskipTests
-
-script: mvn clean compile test

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/KEYS
----------------------------------------------------------------------
diff --git a/KEYS b/KEYS
deleted file mode 100644
index 116d19d..0000000
--- a/KEYS
+++ /dev/null
@@ -1,71 +0,0 @@
-This file contains the PGP keys of various developers.
-Please don't use them for email unless you have to. Their main
-purpose is code signing.
-
-Examples of importing this file in your keystore:
- gpg --import KEYS
- (need pgp and other examples here)
-
-Examples of adding your key to this file:
- pgp -kxa <your name> and append it to this file.
- (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
- (gpg --list-sigs <your name> && gpg --armor --export <your name>) >> this file.
-
------------------------------------------------------------------------------------
-
-pub   4096R/855D61B1 2015-11-21
-uid                  Hao Chen <ha...@apache.org>
-sig 3        855D61B1 2015-11-21  Hao Chen <ha...@apache.org>
-sub   4096R/E8A36316 2015-11-21
-sig          855D61B1 2015-11-21  Hao Chen <ha...@apache.org>
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQINBFZQNn8BEADSDOUw1kLBxI/P3npkqvkE5TcZjcowDx9xeSQQIZ4UhChRslc3
-rrgTzcbpzEsybRV7VHMBYBSxRS0pWKPN6N6EZdsLxz+WL4GENzMTNHN0RhJuXw2t
-bThsEqKawXeP/qdH/NgXdLiy0C0rtY1W5T8AKDsNEiVC+snbsEm6EKdRA+72grPw
-FW5CqJfJPPOjE85O11T2s++qZdgU0Cn/F566rODBRQKgrtk1FiKUC0Rko+zmGfxl
-HInhxFS+YlIhC5iCsy6kG3EhZHluAs7rlsF2qOqPDXGedw9XdL97DA9j3KL6i+e0
-5ggV58J4C4UImIseLTofTQlKD8y7O7meuhQzZXoT1prIOBr1gvCgLzKJI1XQEFvC
-2PFGNUbiJBff05i3ogYzl1Q4XriTS+CyIeGX50nWVOXLsJpiu94/xz/T0pmz1vPG
-Zs1bITSbbscIufcmv5BoS/volwiuQqMEoB+QsYJRo4psKGZz3NDzKjl+Hyt88k+L
-dPGBuwt/433w2RDWmmEIO6V01ROjW7AH+raXfzujHQgj/q0aN7zNThQ/ATqkBYir
-6Dlnf/8219p+1+rCWk+UxrWh2lQuhuS5SNidrm63QkdcNEvm5TrHUdo8MDS3wtQb
-Nasbiy7eGcD7j7WkJTeRWo6a71YAFOaxnWV3o7ZCKUD4RDOqxY78lshm/wARAQAB
-tBlIYW8gQ2hlbiA8aGFvQGFwYWNoZS5vcmc+iQI4BBMBAgAiBQJWUDZ/AhsDBgsJ
-CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCFTl4ehV1hsb2pEACth7FD/aD4p77m
-K+w186eL5bH0oAyDH05OiVe+Iv+1PrlOHobBM6LOXp8amVTJNXOMAkfWUM+YEVYh
-uNUTYBoYnbiBHT+5fPun/7J65wiHNQpkYvAq7P3PI6kSeEWrT/yB7zxApkkydRQV
-WTMWinYxKwfCFv5uQ8l11lqsDTYU1xoU4rYJ6F0pjasU9GWanoeUsw6Q8Ye+L8Rd
-WMcNt+WcEtEd/1itpUs429gZbGf4U8w47prnr5BO8nJS1vl0ghloasWZK3jEDpAc
-Uxe3+v8HEE3nGrSWenRisv9Jmy4VFq7vRSfizP3UiMmowabsAmc4lS8ed1BygflR
-3mk38dd95zvi5QxfMfK1etDjVTxr0jr0SnLfRL/JOfYg3rnPNM6czHhNXe8k8jd2
-5majf+b3MZUQ62OXcOIgt/Yht9iAJSguGXQ4GYobUQRJ0LbuVyEJnnTT3h1ViiTL
-Lj91cCbd4oPBk0zTFRWb/E6LMu1OzZrfJ2+6Tg8kW+asEw70KWx1kSNBqNUCk6IW
-kbjhv7REyWPJlTj+jgC5tZQstA6OkA/hxJkRVqGEvKzV8gmdYt57VrDsu99nyNYB
-4GEGUQ1+3VobLaDuNd0EcWKhiVSkbCJHuhvKaCak0M/71UrkH34LAUjjqxxORX6q
-MrTE42ZzxwxCfBL5mLgcbFoCayqzpLkCDQRWUDZ/ARAA1Nc8VG9GhecrgcXhgc/2
-OFCcEKLKS97cNt9CJe4qg7ZBg1WGjSb65VmJMxLAP2mZchXqmqLriNS4VTiiDAT+
-6qOKkVsFhtGu9zoxzF6JnBSkmZ616D0oKBv05AIGaaLm5h3U2wMxwluhP1dv80zK
-OYY0hjwdMaN7q16wklTe/DlusRV1CFCGqBQV560j+ml4zRvqe6kV4RA5eCNLMEIO
-D6ghps5xDk7X+1cZC7tlfSwDI19SIOrX/2/EfpVvninHzHPvw9RNjOIgAjXaqGfV
-AI769e67FDXMDdyR04U9OHVpB1Bx46YFXwfMjLu+zxw9ZO2zgDtCk10nwp1kl1lu
-0QVqZYYUoqyEdBYhd+MOEdRGYejkx9xOIaPYaA3Qbrny8ZPfptxj3fnSaNfuo4ox
-F1Q6V27kCXlA2Y8FbVq3gus5M/VQddEmX7UElIw2XouSh2e8eLOu7foGywWlLjgf
-JDqgQxq6YzhqkGsJpc3NbhLi9MKEtZ3O98iJGcceK7S7ytW/mGnxEX/oU/W/iU9L
-sjHmLXG01IMgKFBxENvRRGXmMhjbc244duEXMh2/V98mfqRuAFKt+cYGSkxw9sL7
-OpcQ1J1cBcj+hcozTWzXjIXgM05/xz2m3b1G76C/TCciAy5XXWuBJz6oQ4InWGRE
-fGV39jScRk+EVFoVLrnLFLEAEQEAAYkCHwQYAQIACQUCVlA2fwIbDAAKCRCFTl4e
-hV1hsfOVEACOou7e22jXhP5DjqNeSl8Qr6r9/SPRANhhgSZoF9xSjZjOfcly2dtQ
-sgS/ndYu67/KTtPSMYugi1kaogXqohm3yVOZfwe3Nsye9jSpU1kHSIelRYQs366Q
-9tzAheqG/BlmN8EkleUTFFN9PHh8IqjJMS7SyhnIZ7Tma6uUrUGRGQ5noacLn2cX
-fcVUySl8z3Pv2K7T9HhxrfLX5ZWLUcM45yaiDbFtMNTgEuH+bLs1FwQwWx8Xy8L1
-wcu3GdNsoZ/+PEaWhxIeUrRTkmLQMXMA7d6HJgLj/yunJ8rDI1+InTch37Fbi4Ob
-M5UFIesrZb/puc3t43oPVf0CGvK5P+3mLJ65zm1v0NKH3wbzvGCWBwNvXsUT4HFy
-pqdkb7jarP0iORGdQyaXLQjOxTc8AEg2XuFHBceJzKHMhNXvWAwl0tREs6OjQ1R9
-zok2NC4dwMjXcLiIfCVacjYZGln4+DWbZ1uANJXxgQSEm56S7i4TIWIfQojbk28c
-E9CJ3Ero4bwJYhDyfwIE0gR4qSjAhc1okfxJed0fWsGYx7fw/CreB6WaTC6idRFE
-8PxC9obIyg8BCUaY4w7YX4ECzYsmCZs29QZsFXEIQOOAbw4O0A1wu6mT3dz5sP9s
-J/cbsuof93/Z0ET6S1QbbM5ayFB5vtmUVhA5xfBeHJgnH93l1rpccA==
-=KI+v
------END PGP PUBLIC KEY BLOCK-----

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
old mode 100755
new mode 100644
index c41a3bd..2a11864
--- a/README.md
+++ b/README.md
@@ -1,70 +1,49 @@
-<!--
-{% comment %}
-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
+# Eagle Documentation Site
+Welcome to the Eagle documentation!
 
-http://www.apache.org/licenses/LICENSE-2.0
+## Prerequisites
 
-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.
-{% endcomment %}
--->
+Install [jekyll](https://jekyllrb.com/) gem
 
-# Apache Eagle [![Build Status](https://builds.apache.org/buildStatus/icon?job=incubator-eagle-main)](https://builds.apache.org/job/incubator-eagle-main/)
+    $ gem install jekyll
 
->  Secure Hadoop Data in Real Time
+Generate the site, and start a server locally:
 
-Apache Eagle is an open source monitoring solution to instantly identify access to sensitive data, recognize attacks, malicious activities in Hadoop and take actions in real time.
-
-For more details, please visit [https://eagle.incubator.apache.org](https://eagle.incubator.apache.org)
-
-## Documentation
-You can find the latest Eagle documentation on [https://eagle.incubator.apache.org](https://eagle.incubator.apache.org/docs). This [README](README.md) file only contains basic setup instructions.
-
-## Getting Started
-The fastest way to get started with Eagle is to run with [docker](https://github.com/docker/docker) by one of following options:
-
-* Pull latest eagle docker image from [docker hub](https://hub.docker.com/r/apacheeagle/sandbox/) directly:
-
-        docker pull apacheeagle/sandbox
-
-  Then run eagle docker image:
+    $ jekyll serve -w
   
-      docker run -p 9099:9099 -p 8080:8080 -p 8744:8744 -p 2181:2181 -p 2888:2888 -p 6667:6667 -p 60020:60020 \
-        -p 60030:60030 -p 60010:60010 -d --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh \
-        -e KEYCHAIN= --env EAGLE_SERVER_HOST=sandbox.eagle.incubator.apache.org --name sandbox \
-        -h sandbox.eagle.incubator.apache.org --privileged=true apacheeagle/sandbox:latest \
-        --tag ambari-server=true
-      docker run -it --rm -e EXPECTED_HOST_COUNT=1 -e BLUEPRINT=hdp-singlenode-eagle --link sandbox:ambariserver\
-        --entrypoint /bin/sh apacheeagle/sandbox:latest -c /tmp/install-cluster.sh
+The `-w` option tells jekyll to watch for changes to files and regenerate the site automatically when any content changes.
 
-* Build eagle docker image from source code with [eagle-docker](eagle-external/eagle-docker) tool.
+Point your browser to [http://localhost:4000](http://localhost:4000)
 
-         git clone https://github.com/apache/incubator-eagle.git
-         cd incubator-eagle && ./eagle-docker boot
+By default, jekyll will generate the site in a `_site` directory.
 
-As another alternative option, you could [install eagle package in sandbox](https://eagle.incubator.apache.org/docs/deployment-in-sandbox.html) manualy as well.
+## Editing documentations
+1. Create a markdown file and add following content in header
 
-## Building Eagle
-Eagle is built using [Apache Maven](https://maven.apache.org/). To build Eagle, run:
+        ---
+        layout: doc
+        title:  "Eagle Overview" 
+        permalink: /docs/some-new-doc.html
+        ---
+        
+        More content here ..
+    
+2. Register the link in documentations sidebar navigation
 
-    mvn -DskipTests clean package
+        documentations:
+          - category: "Some category"
+            links:
+              - title: Some new doc
+                url: /docs/some-new-doc.html
 
-After successfully building, you will find eagle binary tarball under _eagle-assembly/target/_
+## Publishing the Apache Website
+In order to publish the website, you must have committer access to Eagle's subversion repository.
 
-## Get Help
-The fastest way to get response from eagle community is to send email to the mail list [dev@eagle.incubator.apache.org](mailto:dev@eagle.incubator.apache.org),
-and remember to subscribe our mail list via [dev-subscribe@eagle.incubator.apache.org](mailto:dev-subscribe@eagle.incubator.apache.org)
+The Eagle website is published using Apache svnpubsub. Any changes committed to subversion will be automatically published to eagle.apache.org.
 
-## FAQ
-[https://cwiki.apache.org/confluence/display/EAG/FAQ](https://cwiki.apache.org/confluence/display/EAG/FAQ)
+To publish changes, tell jekyll to generate the site in the publish directory of subversion, then commit the changes:
 
-## License
-Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). More details, please refer to [LICENSE](LICENSE) file.
+    cd docs
+    jekyll build -d /path/to/svn/repo/publish
+    cd /path/to/svn/repo/publish
+    svn commit

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/pom.xml b/eagle-assembly/pom.xml
deleted file mode 100644
index 8f75fa6..0000000
--- a/eagle-assembly/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>eagle-assembly</artifactId>
-    <dependencies>
-        <!-- tomcat -->
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-			<groupId>org.apache.tomcat</groupId>
-			<artifactId>tomcat-jdbc</artifactId>
-			<version>${tomcat.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.tomcat</groupId>
-			<artifactId>tomcat-coyote</artifactId>
-			<version>${tomcat.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.tomcat</groupId>
-			<artifactId>tomcat-dbcp</artifactId>
-			<version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina-ha</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina-ant</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-jasper</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina-ws</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat</groupId>
-            <artifactId>tomcat-catalina-jmx-remote</artifactId>
-            <version>${tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-topology-assembly</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/eagle-bin.xml</descriptor>
-                    <finalName>eagle-${project.version}</finalName>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/assembly/eagle-bin.xml
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/assembly/eagle-bin.xml b/eagle-assembly/src/assembly/eagle-bin.xml
deleted file mode 100644
index 2a04fdc..0000000
--- a/eagle-assembly/src/assembly/eagle-bin.xml
+++ /dev/null
@@ -1,238 +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.
-  -->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-    <id>bin</id>
-    <formats>
-        <format>dir</format>
-        <format>tar.gz</format>
-    </formats>
-    <includeBaseDirectory>true</includeBaseDirectory>
-    <fileSets>
-        <fileSet>
-            <directory>${project.basedir}/src/main/lib/data</directory>
-            <outputDirectory>lib/data</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/bin</directory>
-            <outputDirectory>bin/</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-            </includes>
-            <fileMode>0755</fileMode>
-            <directoryMode>0755</directoryMode>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/bin</directory>
-            <outputDirectory>bin/</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/conf</directory>
-            <outputDirectory>conf/</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/../eagle-external/hadoop_jmx_collector</directory>
-            <outputDirectory>tools/hadoop_jmx_collector/</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/examples</directory>
-            <outputDirectory>examples/</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <excludes>
-                <exclude>*.sh</exclude>
-            </excludes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/examples</directory>
-            <outputDirectory>examples/</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-            </includes>
-            <fileMode>0755</fileMode>
-            <directoryMode>0755</directoryMode>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main</directory>
-            <outputDirectory>.</outputDirectory>
-            <includes>
-                <include>README.md</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/docs</directory>
-            <outputDirectory>docs/</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/lib/tomcat/bin</directory>
-            <outputDirectory>lib/tomcat/bin</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-            </includes>
-            <fileMode>0755</fileMode>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/lib/tomcat/bin</directory>
-            <outputDirectory>lib/tomcat/bin</outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/lib/tomcat/conf</directory>
-            <outputDirectory>lib/tomcat/conf</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-            <lineEnding>unix</lineEnding>
-        </fileSet>
-
-        <!-- /lib/logj4kafka -->
-        <fileSet>
-            <directory>${project.basedir}/../eagle-external/eagle-log4jkafka/target/eagle-log4jkafka-build</directory>
-            <outputDirectory>lib/log4jkafka</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/../eagle-external/eagle-log4jkafka/target/classes/conf</directory>
-            <outputDirectory>lib/log4jkafka/conf</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-
-        <!-- start of [lib/share] -->
-        <fileSet>
-            <directory>${project.basedir}/../eagle-external/eagle-log4jkafka/target/eagle-log4jkafka-build/lib</directory>
-            <outputDirectory>lib/share</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>${project.build.directory}/lib</directory>
-            <outputDirectory>lib/tomcat/lib</outputDirectory>
-            <includes>
-                <include>tomcat*</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>${project.basedir}/../eagle-webservice/target/eagle-service</directory>
-            <outputDirectory>lib/tomcat/webapps/eagle-service</outputDirectory>
-            <excludes>
-                <exclude>WEB-INF/classes/config.properties</exclude>
-                <exclude>WEB-INF/lib/servlet-api-*.jar</exclude>
-                <exclude>WEB-INF/lib/jsp-api-*.jar</exclude>
-                <exclude>WEB-INF/lib/storm-*.jar</exclude>
-                <exclude>WEB-INF/lib/kafka_*.jar</exclude>
-                <exclude>WEB-INF/lib/kafka-*.jar</exclude>
-                <exclude>WEB-INF/lib/*-tests.jar</exclude>
-                <exclude>WEB-INF/lib/hadoop-mapreduce-*.jar</exclude>
-                <exclude>WEB-INF/lib/hadoop-minicluster-*.jar</exclude>
-                <exclude>WEB-INF/lib/hadoop-yarn-*.jar</exclude>
-            </excludes>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>${project.basedir}/../eagle-topology-assembly/target</directory>
-            <outputDirectory>lib/topology</outputDirectory>
-            <includes>
-                <include>eagle-topology-*-assembly.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/../eagle-security/eagle-security-userprofile/training/target</directory>
-            <outputDirectory>lib/userprofile</outputDirectory>
-            <includes>
-                <include>eagle-security-userprofile-training-*-assembly.jar</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>${project.basedir}/src/main/lib/userprofile/data</directory>
-            <outputDirectory>lib/userprofile/data</outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-
-        <fileSet>
-            <directory>${project.basedir}/../eagle-security/eagle-security-userprofile/training/target/lib</directory>
-            <outputDirectory>lib/share</outputDirectory>
-            <includes>
-                <include>akka-*</include>
-                <include>scala-library-*</include>
-                <include>slf4j-*.jar</include>
-                <include>log4j-*.jar</include>
-                <include>commons-math3-3.5.jar</include>
-                <include>asm-3.1.jar</include>
-            </includes>
-            <excludes>
-                <exclude>slf4j-log4j12-*.jar</exclude>
-            </excludes>
-        </fileSet>
-
-        <fileSet>
-            <directory>${project.basedir}/../eagle-external/eagle-ambari</directory>
-            <outputDirectory>lib/ambari</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-
-        <!-- copy hadoop metric configuration to assembly -->
-        <fileSet>
-            <directory>${project.basedir}/../eagle-hadoop-metric/src/main/resources</directory>
-            <outputDirectory>bin</outputDirectory>
-            <includes>
-                <include>hadoop-metric-init.sh</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/README.md
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/README.md b/eagle-assembly/src/main/README.md
deleted file mode 100644
index d3d79f2..0000000
--- a/eagle-assembly/src/main/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-<!--
-{% comment %}
-# 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.
-{% endcomment %}
--->
-
-Eagle User Guide
-========================
-
-Prerequisites
--------------
-* Hadoop
-* HBase
-* Storm
-* Spark
-* Kafka
-
-Eagle requires you to have access on Hadoop CLI, where you have full permissions to HDFS, Storm, HBase and Kafka. To make things easier, we strongly recommend you to start Eagle on a hadoop sandbox such as http://hortonworks.com/products/hortonworks-sandbox/
-
-
-Build
------
-
-* Download the latest version of Eagle source code.
-
-		git clone git@github.xyz.com:eagle/eagle.git
-
-
-* Build the source code, and a tar.gz package will be generated under eagle-assembly/target.
-
-		mvn clean compile install -DskipTests
-
-Installation
------------
-* Copy this package onto the sandbox.
-
-		scp -P 2222 eagle/eagle-assembly/target/eagle-0.1.0-bin.tar.gz root@127.0.0.1:/usr/hdp/current/.
-
-* Run Eagle patch installation at the first time, and restart HDFS namenode.
-
-		bin/eagle-patch-install.sh
-
-
-* Start Storm, HBase, and Kafka via Ambari Web UI. Make sure the user has the privilege to run Storm, HBase, and Kafka cmd in shell, and with full permissions to access HBase, such as creating tables. Check the installation & running status of the required services.
-
-		bin/eagle-check-env.sh
-
-
-* Create necessary HBase tables for Eagle.
-
-		bin/eagle-service-init.sh
-
-
-* Start Eagle service.
-
-		bin/eagle-service.sh start
-		
-
-* Create Kafka topics and topology metadata for Eagle.
-
-		bin/eagle-topology-init.sh
-
-
-* Start Eagle topology, which will submit the topology to Storm via the Storm CLI tools. You can check it with storm UI.
-
-		bin/eagle-topology.sh [--jar <jarName>] [--main <mainClass>] [--topology <topologyName>] start
-
-
-Now you can let Eagle to monitor by creating your own policy!
-
-
-Sandbox Starter
----------------
-
-* startup Eagle service & topology
-
-		examples/eagle-sandbox-starter.sh
-		
-* check eagle UI <http://127.0.0.1:9099/eagle-service>
-
-* Take the following actions which will violate and obey the sample policy.
-     * Violation Action: hdfs dfs -ls unknown
-     * Violation Action: hdfs dfs -touchz /tmp/private
-     * Obey Action: hdfs dfs -cat /tmp/private

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-ambari.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-ambari.sh b/eagle-assembly/src/main/bin/eagle-ambari.sh
deleted file mode 100755
index 6504cff..0000000
--- a/eagle-assembly/src/main/bin/eagle-ambari.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-$(dirname $0)/../lib/ambari/bin/eagle-ambari.sh $@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-check-env.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-check-env.sh b/eagle-assembly/src/main/bin/eagle-check-env.sh
deleted file mode 100755
index bbcae4b..0000000
--- a/eagle-assembly/src/main/bin/eagle-check-env.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-################################################################
-#                    Check Installation                        #
-################################################################
-
-echo "Checking required service installation ..."
-if [ -z "$(command -v hbase version)" ]
-then
-	echo 'please make sure the user has the privilege to run HBase shell'
-	exit 1
-fi
-
-if [ -z "$(command -v storm version)" ]
-then
-	echo 'please make sure the user has the privilege to run storm'
-	exit 1
-fi
-
-if [ -z "$(command -v hadoop version)" ]
-then
-	echo 'please make sure the user has the privilege to run hadoop shell'
-	exit 1
-fi
-
-echo "Hbase & Storm & Hadoop are installed!"
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-create-table.rb
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-create-table.rb b/eagle-assembly/src/main/bin/eagle-create-table.rb
deleted file mode 100644
index b1b790c..0000000
--- a/eagle-assembly/src/main/bin/eagle-create-table.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# Create HBase tables for Eagle
-
-# 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.
-
-include Java
-import org.apache.hadoop.hbase.HBaseConfiguration
-import org.apache.hadoop.hbase.client.HBaseAdmin
-
-def createEagleTable(admin, tableName)
-  if !admin.tableExists(tableName)
-    # create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'}
-    create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-    puts "Create Table #{tableName} successfully"
-  elsif admin.isTableDisabled(tableName)
-    admin.enableTable(tableName)
-    puts "Table #{tableName} already exists"
-  else
-    puts "Table #{tableName} already exists"
-  end
-end
-
-conf = HBaseConfiguration.new
-admin = HBaseAdmin.new(conf)
-
-if ARGV.empty?
-  puts "Table list is empty, please go back to bin/eagle-env.sh and export EAGLE_TABLE_LIST"
-  exit 1
-end
-
-tableListVal=ARGV.first
-
-tableListVal.split(' ').map { |i| createEagleTable(admin, i) }
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-drop-tables.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-drop-tables.sh b/eagle-assembly/src/main/bin/eagle-drop-tables.sh
deleted file mode 100644
index 37fb540..0000000
--- a/eagle-assembly/src/main/bin/eagle-drop-tables.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-commands=''
-for i in $EAGLE_TABLE_LIST; do
-    commands="disable '$i'\ndrop '$i'\n"$commands
-done
-
-echo -e $commands | hbase shell
-#echo commands | hbase shell -n > /dev/null 2>&1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-env.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-env.sh b/eagle-assembly/src/main/bin/eagle-env.sh
deleted file mode 100755
index cfffa0d..0000000
--- a/eagle-assembly/src/main/bin/eagle-env.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# set EAGLE_HOME
-export EAGLE_HOME=$(dirname $0)/..
-
-# The java implementation to use. please use jdk 1.7 or later
-# export JAVA_HOME=${JAVA_HOME}
-# export JAVA_HOME=/usr/java/jdk1.7.0_80/
-
-# nimbus.host, default is localhost
-export EAGLE_NIMBUS_HOST=localhost
-
-# EAGLE_SERVICE_HOST, default is `hostname -f`
-export EAGLE_SERVICE_HOST=localhost
-
-# EAGLE_SERVICE_PORT, default is 9099
-export EAGLE_SERVICE_PORT=9099
-
-# EAGLE_SERVICE_USER
-export EAGLE_SERVICE_USER=admin
-
-# EAGLE_SERVICE_PASSWORD
-export EAGLE_SERVICE_PASSWD=secret
-
-export EAGLE_CLASSPATH=$EAGLE_HOME/conf
-# Add eagle shared library jars
-for file in $EAGLE_HOME/lib/share/*;do
-	EAGLE_CLASSPATH=$EAGLE_CLASSPATH:$file
-done
-
-# EAGLE_TABLE_LIST
-export EAGLE_TABLE_LIST='alertdef ipzone streamMetadata alertdetail fileSensitivity eaglehdfs_alert streamdef eagle_metric alertExecutor alertStream alertStreamSchema hiveResourceSensitivity hbaseResourceSensitivity mlmodel userprofile hfdsusercommandpattern appCommand appDefinition serviceAudit aggregatedef alertNotifications eagleSiteDesc eagleSiteApplication eagleApplicationDesc eagleFeatureDesc eagle_metadata'
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-policy.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-policy.sh b/eagle-assembly/src/main/bin/eagle-policy.sh
deleted file mode 100755
index 6469129..0000000
--- a/eagle-assembly/src/main/bin/eagle-policy.sh
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-function create_policy() {
-    echo "Creating Policy $service_name..."
-    curl -u ${EAGLE_LOGIN_USER}:${EAGLE_LOGIN_PASSWD} -XPOST -H "Content-Type: application/json" \
-        "http://$service_host:$service_port/eagle-service/rest/entities?serviceName=$service_name" \
-        -d @$data_file
-    exit 0
-}
-
-
-function delete_policy() {
-    echo "Deleting policy ..."
-    curl -u ${EAGLE_LOGIN_USER}:${EAGLE_LOGIN_PASSWD}  -XDELETE -H "Content-Type: application/json" \
-         "http://$service_host:$service_port/eagle-service/rest/entities?query=$service_name[@site=\"$site\" AND @dataSource=\"$source\"]{*}&pageSize=10000"
-    if [ $? -eq 0 ]; then
-        echo
-        echo "Deleting Policy $program_id:$policy_id is completed."
-    else
-        echo "Error: deleting failed!"
-        exit 1
-    fi
-}
-
-# by default list all policies, or filter with @policyId and so on
-function list_policy() {
-    if [ -z $site -a -z $dataSource ]; then
-        query="http://$service_host:$service_port/eagle-service/rest/list?query=$service_name[]{*}&pageSize=100000"
-        echo $query
-        curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -XGET --globoff -H "Content-Type: application/json" $query
-    else
-        query="http://$service_host:$service_port/eagle-service/rest/list?query=$service_name[@site=\"$site\" AND @dataSource=\"$source\"]{*}&pageSize=100000"
-        echo $query
-        curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -XGET --globoff -H "Content-Type: application/json" $query
-    fi
-    if [ $? -eq 0 ]; then
-        echo
-        echo "Listing Policy $service_name is completed."
-    else
-        echo "Error: listing policy failed!"
-        exit 1
-    fi
-}
-
-function print_help() {
-    echo "  Usage: $0 options {create | list}"
-    echo "  Options:                     Description:"
-    echo "  --host <serviceHost>         eagle service hostname, default is localhost"
-    echo "  --port <servicePort>         eagle service port, default is 9099"
-    echo "  --serviceName <name>         eagle service name, default is AlertDefinitionService"
-    echo "  --site <site>                Default is sandbox"
-    echo "  --source <dataSource>        Default is hdfsAuditLog"
-    echo "  --file <JsonFile>            policy content"
-    echo "  Examples:"
-    echo "  createCmd: $0 [--host <serviceHost>] [--port <servicePort>] [--name <service>] --file <datafile> create"
-    echo "  listCmd: $0 [--host <serviceHost>] [--port <servicePort>] [--name <service>] [--site <site>] [--source <dataSource>] list"
-}
-
-if [ $# -eq 0 ] 
-then
-	print_help
-	exit 1
-fi
-
-if [ `expr $# % 2` != 1 ]
-then
-    print_help
-    exit 1
-fi
-
-cmd=""
-while [  $# -gt 0  ]; do
-case $1 in
-    "create")
-        cmd=$1
-        shift
-        ;;
-    "delete")
-        cmd=$1
-        shift
-        ;;
-    "list")
-        cmd=$1
-        shift
-        ;;
-     --host)
-        service_host=$2
-        shift 2
-        ;;
-    --port)
-        service_port=$2
-        shift 2
-        ;;
-    --name)
-       service_name=$2
-       shift 2
-       ;;
-    --file)
-        data_file=$2
-        shift 2
-        ;;
-    --site)
-        site=$2
-        shift 2
-        ;;
-    --source)
-        source=$2
-        shift 2
-        ;;
-    *)
-        echo "Internal Error: option processing error: $1" 1>&2
-        exit 1
-        ;;
-    esac
-done
-
-
-if [ -z "$service_host" ]; then
-    service_host=${EAGLE_SERVICE_HOST}
-fi
-
-if [ -z "$service_port" ]; then
-    service_port=${EAGLE_SERVICE_PORT}
-fi
-
-if [ -z "$service_name" ]; then
-    service_name="AlertDefinitionService"
-fi
-
-if [ ! -e $data_file ]; then
-    echo "Error: json file $data_file is not found!"
-    print_help
-    exit 1
-fi
-
-echo "service_host="$service_host "service_port="$service_port "service_name="$service_name
-case $cmd in
-"create")
-	create_policy
-	;;
-"list")
-	list_policy
-	;;
-*)
-	echo "Invalid command"
-	print_help
-    exit 1
-	;;
-esac
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-service-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-service-init.sh b/eagle-assembly/src/main/bin/eagle-service-init.sh
deleted file mode 100755
index a9c1cb2..0000000
--- a/eagle-assembly/src/main/bin/eagle-service-init.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-###################################################
-###        create hbase tables for eagle
-###################################################
-
-echo "Creating hbase tables for eagle ... "
-
-hbase shell ${EAGLE_HOME}/bin/eagle-create-table.rb "$EAGLE_TABLE_LIST"
-
-if [ $? = 0 ];then
-	echo "==> Successfully created hbase tables"
-else
-	echo "==> Failed creating hbase tables"
-	exit 1
-fi
-
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-service.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-service.sh b/eagle-assembly/src/main/bin/eagle-service.sh
deleted file mode 100755
index cdf097e..0000000
--- a/eagle-assembly/src/main/bin/eagle-service.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-function print_help() {
-	echo "Usage: $0 {start | stop | restart | status}"
-	exit 1
-}
-
-if [ $# != 1 ]
-then
-	print_help
-fi
-
-source $(dirname $0)/eagle-env.sh
-
-export CATALINA_HOME=$EAGLE_HOME/lib/tomcat
-export CATALINA_BASE=$CATALINA_HOME
-
-export CATALINA_LOGDIR=$EAGLE_HOME/logs
-export CATALINA_TMPDIR=$EAGLE_HOME/temp
-export CATALINA_OUT=$CATALINA_LOGDIR/eagle-service.out
-export CATALINA_PID=$CATALINA_TMPDIR/service.pid
-
-# CLASSPATH
-export CLASSPATH=$CLASSPATH:$EAGLE_HOME/conf
-
-#for i in `ls $EAGLE_HOME/lib/*.jar`; do CLASSPATH=$CLASSPATH:$i; done
-
-if [ ! -e $CATALINA_LOGDIR ];then
-    mkdir -p $CATALINA_LOGDIR
-fi
-
-if [ ! -e $CATALINA_TMPDIR ]; then
-    mkdir -p $CATALINA_TMPDIR
-fi
-
-
-EAGLE_SERVICE_CONF="eagle-service.conf"
-
-# Always copy conf/eagle-service.properties to lib/tomcat/webapps/eagle-service/WEB-INF/classes/application.conf before starting
-if [ ! -e ${EAGLE_HOME}/conf/${EAGLE_SERVICE_CONF} ]
-then
-	echo "Failure: cannot find ${EAGLE_HOME}/conf/${EAGLE_SERVICE_CONF}"
-	exit 1
-fi
-cp -f $EAGLE_HOME/conf/$EAGLE_SERVICE_CONF ${EAGLE_HOME}/lib/tomcat/webapps/eagle-service/WEB-INF/classes/application.conf
-
-case $1 in
-"start")
-	echo "Starting eagle service ..."
-	$EAGLE_HOME/lib/tomcat/bin/catalina.sh start
-	if [ $? != 0 ];then 
-		echo "Error: failed starting"
-		exit 1
-	fi
-	;;
-"stop")
-	echo "Stopping eagle service ..."
-	$EAGLE_HOME/lib/tomcat/bin/catalina.sh stop
-	if [ $? != 0 ];then
-		echo "Error: failed stopping"
-		exit 1
-	fi
-	echo "Stopping is completed"
-	;;
-"restart")
-	echo "Stopping eagle service ..."
-	$EAGLE_HOME/lib/tomcat/bin/catalina.sh stop
-	echo "Restarting eagle service ..."
-	$EAGLE_HOME/lib/tomcat/bin/catalina.sh start
-	if [ $? != 0 ];then
-		echo "Error: failed starting"
-		exit 1
-	fi
-	echo "Restarting is completed "
-	;;
-"status")
-	#echo "Listing eagle service status ..."
-	if [ -e $CATALINA_TMPDIR/service.pid ]  && ps -p `cat $CATALINA_TMPDIR/service.pid`  > /dev/null
-	then
-		echo "Eagle service is running `cat $CATALINA_TMPDIR/service.pid`"
-		exit 0
-	else
-		echo "Eagle service is stopped"
-		exit 1
-	fi
-	;;
-*)
-	print_help
-	;;
-esac
-
-if [ $? != 0 ]; then
-	echo "Error: start failure"
-	exit 1
-fi
-
-exit 0
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh
deleted file mode 100755
index 5d82efd..0000000
--- a/eagle-assembly/src/main/bin/eagle-topology-init.sh
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-eagle_bin=$EAGLE_HOME/bin
-
-
-#####################################################################
-#            Import stream metadata for HDFS
-#####################################################################
-
-## AlertDataSource: data sources bound to sites
-
-echo "Begin to initialize HBase tables ..."
-
-echo ""
-echo "Importing sample site ..."
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteDescService" -d '[{"prefix":"eagleSiteDesc","tags":{"site" : "sandbox"}, "enabled": true}]'
-
-echo ""
-echo "Importing applications for sample site ..."
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "{\"hdfsEndpoint\":\"hdfs://sandbox.hortonworks.com:8020\"}"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "{\"zkClientPort\":\"2181\", \"zkQuorum\":\"localhost\"}"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"{\"accessType\":\"metastoredb_jdbc\",\"password\":\"hive\",\"user\":\"hive\",\"jdbcDriverClassName\":\"com.mysql.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"}"}]'
-
-echo ""
-echo "Importing application definitions ..."
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hdfsAuditLog"},"desc":"HDFS audit log security check application","alias":"HDFS","group":"DAM","features":["common","classification","userProfile","metadata"],"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hbaseSecurityLog"},"desc":"HBASE audit log security check application","alias":"HBASE","group":"DAM","features":["common","classification","userProfile","metadata"],"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"hbaseResourceSensitivity\",\n\t\t\"service\": \"HbaseResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"hbaseResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"table\",\n\t\t\"api\": {\n\t\t\t\"database\": \"hbaseResource/namespaces\",\n\t\t\t\"table\": \"hbaseResource/tables\",\n\t\t\t\"column\": \"hbaseResource/columns\"\n\t\t},\n\t\t\"mapping\": {\n\t\t\t\"database\": \"namespace\",\n\t\t\t\"table\": \"table\",\n\t\t\t\"column\": \"columnFamily\"\n\t\t}\n\t}\n}"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hiveQueryLog"},"desc":"Hive query log security check application","alias":"HIVE","group":"DAM","features":["common","classification","userProfile","metadata"], "config":"{\n\t\"view\": {\n\t\t\"prefix\": \"hiveResourceSensitivity\",\n\t\t\"service\": \"HiveResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"hiveResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"table\",\n\t\t\"api\": {\n\t\t\t\"database\": \"hiveResource/databases\",\n\t\t\t\"table\": \"hiveResource/tables\",\n\t\t\t\"column\": \"hiveResource/columns\"\n\t\t},\n\t\t\"mapping\": {\n\t\t\t\"database\": \"database\",\n\t\t\t\"table\": \"table\",\n\t\t\t\"column\": \"column\"\n\t\t}\n\t}\n}"}]'
-
-echo ""
-echo "Importing feature definitions ..."
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"common"},"desc":"Provide the Policy & Alert feature.","version":"v0.3.0"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"classification"},"desc":"Sensitivity browser of the data classification.","version":"v0.3.0"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"userProfile"},"desc":"Machine learning of the user profile","version":"v0.3.0"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"metadata"},"desc":"Stream metadata viewer","version":"v0.3.0"}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"metrics"},"desc":"Metrics dashboard","version":"v0.3.0"}]'
-
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream"},"desc":"alert event stream from hdfs audit log"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"application":"hdfsAuditLog","alertExecutorId":"hdfsAuditLogAlertExecutor","streamName":"hdfsAuditLogEventStream"},"desc":"alert executor for hdfs audit log event stream"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HDFS... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"src"},"attrDescription":"source directory or file, such as /tmp","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"dst"},"attrDescription":"destination directory, such as /tmp","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"host"},"attrDescription":"hostname, such as 
 localhost","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"allowed"},"attrDescription":"true, false or none","attrType":"bool","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"user"},"attrDescription":"process user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"cmd"},"attrDescription":"file/directory operation, such as getfileinfo, open, listStatus and so on","attrType":"string","category":"","
 attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSCommandResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"sensitivityType"},"attrDescription":"mark such as AUDITLOG, SECURITYLOG","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"securityZone"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":""}]'
-
-
-#####################################################################
-#            Import stream metadata for HBASE
-#####################################################################
-
-#### AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HBASE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream"},"desc":"alert event stream from hbase security audit log"}]'
-
-
-#### AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HBASE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"application":"hbaseSecurityLog","alertExecutorId":"hbaseSecurityLogAlertExecutor","streamName":"hbaseSecurityLogEventStream"},"desc":"alert executor for hbase security log event stream"}]'
-
-
-#### AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HBASE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"host"},"attrDescription":"remote ip address to access hbase","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"request"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseRequestResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"status"},"attrDescription":"access status: allowed or denied","attrType":"string","category":"","attrValueResolver":""},{"
 prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"user"},"attrDescription":"hbase user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"scope"},"attrDescription":"the resources which users are then granted specific permissions (Read, Write, Execute, Create, Admin) against","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseMetadataResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"action"},"attrDe
 scription":"action types, such as read, write, create, execute, and admin","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseActionResolver"},{"prefix":"alertStreamSchema","tags":{"application":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"sensitivityType"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseSensitivityTypeResolver"}]'
-
-
-#####################################################################
-#            Import stream metadata for HIVE
-#####################################################################
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream"},"desc":"alert event stream from hive query"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"application":"hiveQueryLog","alertExecutorId":"hiveAccessAlertByRunningJob","streamName":"hiveAccessLogStream"},"desc":"alert executor for hive query log event stream"}]'
-
-## AlertStreamSchemaServiceService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"process user","attrValueResolver":"","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"user"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"hive sql command, such as SELECT, INSERT and DELETE","attrValueResolver":"org.apache.eagle.service.security.hive.resolver.HiveCommandResolver","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"command"}},{"prefix":"alertStreamSchema","category":"","attrType":"long","attrDescription":"milliseconds of the datetime","attrValueResolver":"","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"timestamp"}},{"prefix":"al
 ertStreamSchema","category":"","attrType":"string","attrDescription":"/database/table/column or /database/table/*","attrValueResolver":"org.apache.eagle.service.security.hive.resolver.HiveMetadataResolver","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"resource"}},{"prefix":"alertStreamSchema","category":"","attrType":"string","attrDescription":"mark such as PHONE_NUMBER","attrValueResolver":"org.apache.eagle.service.security.hive.resolver.HiveSensitivityTypeResolver","tags":{"application":"hiveQueryLog","streamName":"hiveAccessLogStream","attrName":"sensitivityType"}}]'
-
-#####################################################################
-#            Import stream metadata for UserProfile
-#####################################################################
-
-
-echo ""
-echo "Importing AlertDefinitionService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
-     -d '[ { "prefix": "alertdef", "tags": { "site": "sandbox", "application": "userProfile", "alertExecutorId": "userProfileAnomalyDetectionExecutor", "policyId": "userProfile", "policyType": "MachineLearning" }, "desc": "user profile anomaly detection", "policyDef": "{\"type\":\"MachineLearning\",\"alertContext\":{\"site\":\"sandbox\",\"application\":\"userProfile\",\"component\":\"testComponent\",\"description\":\"ML based user profile anomaly detection\",\"severity\":\"WARNING\",\"notificationByEmail\":\"true\"},\"algorithms\":[{\"name\":\"EigenDecomposition\",\"evaluator\":\"org.apache.eagle.security.userprofile.impl.UserProfileAnomalyEigenEvaluator\",\"description\":\"EigenBasedAnomalyDetection\",\"features\":\"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck\"},{\"name\":\"KDE\",\"evaluator\":\"org.apache.eagle.security.userprofile.impl.UserProfileAnomalyKDEEvaluator\",\"description\":\"Dens
 ityBasedAnomalyDetection\",\"features\":\"getfileinfo, open, listStatus, setTimes, setPermission, rename, mkdirs, create, setReplication, contentSummary, delete, setOwner, fsck\"}]}", "dedupeDef": "{\"alertDedupIntervalMin\":\"0\",\"emailDedupIntervalMin\":\"0\"}", "notificationDef": "", "remediationDef": "", "enabled": true } ]'
-
-echo ""
-echo "Importing AlertExecutorService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertExecutorService" \
-      -d '[ { "prefix": "alertExecutor", "tags":{ "site":"sandbox", "application":"userProfile", "alertExecutorId" : "userProfileAnomalyDetectionExecutor", "streamName":"userActivity" }, "desc": "user activity data source" } ]'
-
-echo ""
-echo "Importing AlertStreamService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H "Content-Type: application/json"  "http://$EAGLE_SERVICE_HOST:$EAGLE_SERVICE_PORT/eagle-service/rest/entities?serviceName=AlertStreamService" \
-     -d '[ { "prefix": "alertStream", "tags": { "streamName": "userActivity", "site":"sandbox", "application":"userProfile" }, "alertExecutorIdList": [ "userProfileAnomalyDetectionExecutor" ] } ]'
-
-## Finished
-echo ""
-echo "Finished initialization for eagle topology"
-
-exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-topology.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology.sh b/eagle-assembly/src/main/bin/eagle-topology.sh
deleted file mode 100755
index e1104ac..0000000
--- a/eagle-assembly/src/main/bin/eagle-topology.sh
+++ /dev/null
@@ -1,189 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-TOPOLOGY_NAME_SET=0
-
-function print_help() {
-	echo "Usage: $0 options {start | stop | status}"
-	echo "Options:                       Description:"
-	echo "  --main     <main class>        Default is org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain"
-	echo "  --topology <topology name>     Default is sandbox-hdfsAuditLog-topology"
-	echo "  --config   <file path>         Default is $EAGLE_HOME/conf/sandbox-hdfsAuditLog-application.conf"
-	echo "  --storm-ui <storm ui url>      Execute through storm UI API, default: http://localhost:8744"
-
-	echo "Command Examples:"
-	echo "  $0 --main <mainClass> [--topology <topologyName>] --config <filePath> start"
-	echo "  $0 --topology <topologyName> stop"
-	echo "  $0 --topology <topologyName> status"
-}
-
-function env_check(){
-    which storm >/dev/null 2>&1
-    if [ $? != 0 ];then
-        echo "Error: storm is not installed"
-        exit 1
-    fi
-}
-
-#### parameters are in pair plus command
-#if [ `expr $# % 2` != 1 ]
-#then
-#    print_help
-#    exit 1
-#fi
-
-cmd=""
-while [  $# -gt 0  ]; do
-case $1 in
-    "start")
-        cmd=$1
-        shift
-        ;;
-    "stop")
-        cmd=$1
-        shift
-        ;;
-    "status")
-        cmd=$1
-        shift
-        ;;
-    --main)
-        if [ $# -lt 3 ]; then
-            print_help
-            exit 1
-        fi
-        mainClass=$2
-        shift 2
-        ;;
-    --topology)
-        if [ $# -lt 3 ]; then
-            print_help
-            exit 1
-        fi
-        TOPOLOGY_NAME_SET=1
-        topologyName=$2
-        shift 2
-        ;;
-    --config)
-        if [ $# -lt 3 ]; then
-            print_help
-            exit 1
-        fi
-        configFile=$2
-        shift 2
-        ;;
-	--storm-ui)
-		# TODO: configure through arguments
-		storm_ui="http://localhost:8744"
-		shift 1
-		;;
-    *)
-        echo "Internal Error: option processing error: $1" 1>&2
-        exit 1
-        ;;
-    esac
-done
-
-
-jarName=$(ls ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar)
-
-if [ -z "$jarName" ]; then
-    echo "Error: jar file is not found"
-    exit 1
-fi
-
-if [ -z "$mainClass" ]; then
-    mainClass="org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain"
-fi
-
-if [ -z "$topologyName" ]; then
-    topologyName=sandbox-hdfsAuditLog-topology
-fi
-
-if [ -z "$configFile" ]; then
-    configFile="$EAGLE_HOME/conf/sandbox-hdfsAuditLog-application.conf"
-fi
-
-case $cmd in
-"start")
-    env_check
-    echo "Starting eagle topology ..."
-    echo "jarName="$jarName "mainClass="$mainClass "configFile="$configFile
-    if [ $TOPOLOGY_NAME_SET = 1 ]; then
-	    storm jar -c nimbus.host=$EAGLE_NIMBUS_HOST ${jarName} $mainClass -D config.file=$configFile -D envContextConfig.topologyName=$topologyName
-	else
-	    storm jar -c nimbus.host=$EAGLE_NIMBUS_HOST ${jarName} $mainClass -D config.file=$configFile
-	fi
-	if [ $? = 0 ]; then
-		echo "Starting is completed"
-		exit 0
-	else
-		echo "Failure"
-		exit 1
-	fi
-	;;
-"stop")
-    env_check
-    echo "Stopping eagle topology ..."
-    storm kill -c nimbus.host=$EAGLE_NIMBUS_HOST $topologyName
-    if [ $? = 0 ]; then
-    	echo "Stopping is completed"
-	    exit 0
-    else
-    	echo "Failure"
-	exit 1
-    fi
-	;;
-"status")
-	if [ -z "$storm_ui" ];then
-	    env_check
-	    echo "Checking topology $topologyName status ..."
-	    output=`storm list  -c nimbus.host=$EAGLE_NIMBUS_HOST | grep $topologyName`
-	    if [ $? != 0 ];then
-	        echo "Topology is not alive: $topologyName is not found"
-	        exit 1
-	    fi
-
-	    echo $output | grep ACTIVE > /dev/null 2>&1
-
-	    if [ $? = 0 ];then
-	        echo "Topology is alive: $output"
-	        exit 0
-	    else
-	        echo "Topology is not alive: $output"
-	        exit 1
-	    fi
-    else
-	    echo "Checking topology $topologyName status through storm UI API on $storm_ui"
-	    curl -XGET $storm_ui/api/v1/topology/summary | grep $topologyName | grep ACTIVE >/dev/null 2>&1
-	    if [ $? == 0 ];then
-	        echo "$topologyName is running"
-	        exit 0
-	    else
-	        echo "$topologyName is dead"
-	        exit 1
-	    fi
-    fi
-    ;;
-*)
-	print_help
-	exit 1
-esac
-
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-userprofile-scheduler.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-userprofile-scheduler.sh b/eagle-assembly/src/main/bin/eagle-userprofile-scheduler.sh
deleted file mode 100755
index fb74513..0000000
--- a/eagle-assembly/src/main/bin/eagle-userprofile-scheduler.sh
+++ /dev/null
@@ -1,226 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-function usage() {
-	echo "Usage: $0 [options] {start|stop|status}"
-	echo ""
-	echo "Commands"
-	echo "  start                       Start scheduler process"
-	echo "  stop                        Stop scheduler process"
-	echo "  status                      Check scheduler process status"
-	echo ""
-	echo "Options:"
-	echo "  --config <configFilePath>     Configuration file path"
-	echo "  --log    <logFilePath>        Log file path"
-	echo "  --daemon                      Run as daemon service"
-	echo "	--site		site information"
-}
-
-source $(dirname $0)/eagle-env.sh
-
-[ ! -e $EAGLE_HOME/logs ] && mkdir -p $EAGLE_HOME/logs
-[ ! -e $EAGLE_HOME/temp ] && mkdir -p $EAGLE_HOME/temp
-
-SCHEDULER_JAR=$(ls $EAGLE_HOME/lib/userprofile/eagle-security-userprofile-training-*-assembly.jar)
-SCHEDULER_CLASS="org.apache.eagle.security.userprofile.daemon.Scheduler"
-SCHEDULER_JVM_OPTS="-server"
-SCHDULER_LOG_DIR=$(dirname $0)/logs/
-
-SCHEDULER_CLASSPATH=$EAGLE_HOME/conf:$SCHEDULER_JAR
-# Add eagle shared library jars
-for file in $EAGLE_HOME/lib/share/*;do
-	SCHEDULER_CLASSPATH=$SCHEDULER_CLASSPATH:$file
-done
-
-# Walk around comman-math3 conflict with spark
-SCHEDULER_OPTS="-D eagle.userprofile.driver-classpath=$(dirname $0)/../lib/share/asm-3.1.jar:$(dirname $0)/../lib/share/commons-math3-3.5.jar"
-
-# Specify user profile spark job assembly jar
-SCHEDULER_OPTS="$SCHEDULER_OPTS -D eagle.userprofile.jar=$SCHEDULER_JAR"
-
-SCHEDULER_CMD="java $SCHEDULER_JVM_OPTS -cp $SCHEDULER_CLASSPATH:$SCHEDULER_JAR $SCHEDULER_CLASS $SCHEDULER_OPTS"
-
-### parameters are in pair
-if [ $# = 0 ] ; then
-	usage
-	exit 1
-fi
-
-while [  $# -gt 0  ]; do
-case $1 in
-  "--site")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 site=$2
-     shift 2
-     ;;
-  "--config")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 config=$2
-     shift 2
-     ;;
-  "--log")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-	 log=$2
-     shift 2
-     ;;
-  "--daemon")
-     daemon="true"
-     shift 1
-     ;;
-  "start")
-    command="start"
-     shift 1
-    ;;
-  "stop")
-    command="stop"
-	shift 1
-    ;;
-  "status")
-    command="status"
-	shift 1
-    ;;
-  *)
-     echo "Internal Error: option processing error: $1" 1>&2
-     usage
-     exit 1
-     ;;
-  esac
-done
-
-# Validate Arguments
-# ==================
-
-# --site
-if [ -z "$site" ];then
-	echo "Error: --site required"
-	usage
-	exit 1
-fi
-
-pid=$(dirname $0)/../temp/$site-userprofile-scheduler.pid
-
-# --config
-if [ -z "$config" ];then
-	config=$(dirname $0)/../conf/$site-userprofile-scheduler.conf
-fi
-
-# --log
-if [ -z "$log" ];then
-	log=$(dirname $0)/../logs/$site-userprofile-scheduler.out
-fi
-
-# Define Functions
-# ================
-function start(){
-	if [ -e $pid ];then
-		pidv=`cat $pid`
-		ps -p $pidv 1>/dev/null 2>&1
-		if [ "$?" != "0" ];then
-			echo "Process [$pidv] is found, but dead, continue to start ..."
-		else
-			echo "Process [$pidv] is still runing, please top it firstly, exiting ..."
-			exit 1
-		fi
-	fi
-
-	if [ ! -e $config ];then
-		echo "Error: --config $config not exist"
-		usage
-		exit 1
-	fi
-
-	cmd="$SCHEDULER_CMD -D eagle.site=$site -D config.file=$config"
-
-	if [ "$daemon" == "true" ];then
-		echo "Executing: $cmd as daemon"
-		echo $cmd >> $log
-		nohup $cmd 1>>$log 2>&1 &
-		pidv=$!
-		echo $pidv > $pid
-		echo "Logging to: $log, pid: $pidv"
-	else
-		echo "Executing: $cmd"
-		$cmd
-	fi
-}
-
-function stop(){
-	if [ -e $pid ];then
-		pidv=`cat $pid`
-		ps -p $pidv 1>/dev/null 2>&1
-		if [ "$?" != "0" ];then
-			rm $pid
-			echo "Process [$pidv] is not running, but PID file exisits: $pid, removed"
-			exit 1
-		else
-			echo "Killing process [$pidv]"
-			kill $pidv
-			if [ $? == 0 ];then
-				rm $pid
-				echo "Killed successfully"
-				exit 0
-			else
-				echo "Failed to kill process [$pid]"
-				exit 1
-			fi
-		fi
-	else
-		echo "Process is not running"
-		exit 1
-	fi
-}
-
-function status(){
-	if [ -e $pid ];then
-		pidv=`cat $pid`
-		ps -p $pidv 1>/dev/null 2>&1
-		if [ "$?" != "0" ];then
-			echo "Process [$pidv] is dead"
-			exit 1
-		else
-			echo "Process [$pidv] is running"
-			exit 0
-		fi
-	else
-		echo "$pid not found, assume process should have been stopped"
-		exit 1
-	fi
-}
-
-case $command in
-	"start")
-		start
-		;;
-	"stop")
-		stop
-		;;
-	"status")
-		status
-		;;
-	*)  usage
-		exit 1
-		;;
-esac
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/eagle-userprofile-training.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-userprofile-training.sh b/eagle-assembly/src/main/bin/eagle-userprofile-training.sh
deleted file mode 100755
index 209570c..0000000
--- a/eagle-assembly/src/main/bin/eagle-userprofile-training.sh
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-function usage() {
-	echo "Usage: $0 --jar <jarName> --main <mainClass> --site <sitename> --input <inputschema> --output <outputschema>"
-	echo "--site <siteName>     Must be given"
-	echo "--jar <jarName>       Default is $EAGLE_HOME/lib/userprofile/eagle-security-userprofile-training-0.1.0-assembly.jar"
-    echo "--main <mainClass>    Default is org.apache.eagle.security.userprofile.UserProfileTrainingCLI"
-    echo "--input               Default is /tmp/userprofile/hdfs-audit.log"
-    echo "--output              Default is eagle://localhost:9099. When modelSink is hdfs, the value is hdfs:///tmp/userprofile/output"
-	echo "Example: $0 --jar <jarName> --main <mainClass> --site <sitename> --input <input> --output <output>"
-}
-
-function env_check(){
-    which spark-submit >/dev/null 2>&1
-    if [ $? != 0 ];then
-        echo "Error: spark is not installed"
-        exit 1
-    fi
-}
-
-source $(dirname $0)/eagle-env.sh
-
-#### parameters are in pair
-if [ $# = 0 ] || [ `expr $# % 2` != 0 ] ; then
-	usage
-	exit 1
-fi
-
-while [  $# -gt 0  ]; do
-case $1 in
-  "--site")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-     site=$2
-     shift 2
-     ;;
-  "--jar")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-     jar=$2
-     shift 2
-     ;;
-  "--main")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-     main=$2
-     shift 2
-     ;;
-  "--input")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-     input=$2
-     shift 2
-     ;;
-  "--output")
-     if [ $# -lt 2 ]; then
-        usage
-        exit 1
-     fi
-     output=$2
-     shift 2
-     ;;
-  *)
-     echo "Internal Error: option processing error: $1" 1>&2
-     exit 1
-     ;;
-  esac
-done
-
-if [ -z "$site" ];then
-	echo "Error: --site is required" 1>&2
-	exit 1
-fi
-
-if [ -z "$main" ] ; then
-  main="org.apache.eagle.security.userprofile.UserProfileTrainingCLI"
-fi
-
-if [ -z "$jar" ] ; then
-  jar="$EAGLE_HOME/lib/userprofile/eagle-security-userprofile-training-0.1.0-assembly.jar"
-fi
-
-if [ -z "input" ] ; then
-  input="hdfs:///tmp/userprofile/hdfs-audit.log"
-fi
-
-if [ -z "output" ] ; then
-  output="eagle://localhost:9099"
-fi
-
-outputScheme=`echo $output | sed -E 's/^(.*):\/\/.*/\1/'`
-
-case $outputScheme in
- "hdfs")
-   env_check
-   echo "Starting eagle user profile training ..."
-   hdfsOutput=`echo $output | sed -E 's/hdfs:\/\/(.*)/\1/'`
-   spark-submit --class $main \
-                 --master "local[10]" \
-                 --driver-class-path $EAGLE_HOME/lib/share/asm-3.1.jar:$EAGLE_HOME/lib/share/commons-math3-3.5.jar \
-                 $jar \
-                 --site $site \
-                 --input $input \
-                 --output $hdfsOutput
-    if [ $? = 0 ]; then
-		echo "Starting is completed"
-		exit 0
-	else
-		echo "Failure"
-		exit 1
-	fi
-	;;
-  "eagle")
-    env_check
-    echo "Starting eagle user profile training ..."
-    eagleServiceHost=`echo $output | sed -E 's/eagle:\/\/(.*):(.*)/\1/'`
-    eagleServicePort=`echo $output | sed -E 's/eagle:\/\/(.*):(.*)/\2/'`
-    spark-submit --class $main \
-                 --master "local[10]" \
-                 --driver-class-path $EAGLE_HOME/lib/share/asm-3.1.jar:$EAGLE_HOME/lib/share/commons-math3-3.5.jar \
-                 $jar \
-                 --site $site \
-                 --input $input \
-                 --service-host $eagleServiceHost \
-                 --service-port $eagleServicePort
-
-    if [ $? = 0 ]; then
-        echo "Starting is completed"
-        exit 0
-    else
-        echo "Failure"
-        exit 1
-    fi
-    ;;
-  *)
-	usage
-	exit 1
-esac
-
-exit 0
\ No newline at end of file


[13/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestHierarchicalAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestHierarchicalAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestHierarchicalAggregator.java
deleted file mode 100755
index cbcab0f..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestHierarchicalAggregator.java
+++ /dev/null
@@ -1,332 +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.query.aggregate.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.query.aggregate.timeseries.PostHierarchicalAggregateSort;
-import org.apache.eagle.query.aggregate.timeseries.HierarchicalAggregateEntity;
-import org.apache.eagle.query.aggregate.timeseries.HierarchicalAggregator;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import junit.framework.Assert;
-
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.test.TestEntity;
-
-
-public class TestHierarchicalAggregator {
-private final static Logger LOG = LoggerFactory.getLogger(TestHierarchicalAggregator.class);
-
-	@SuppressWarnings("serial")
-	private TestEntity createEntity(final String cluster, final String datacenter, final String rack, int numHosts, long numClusters){
-		TestEntity entity = new TestEntity();
-		Map<String, String> tags = new HashMap<String, String>(){{
-			put("cluster", cluster);
-			put("datacenter", datacenter);
-			put("rack", rack);
-		}}; 
-		entity.setTags(tags);
-		entity.setNumHosts(numHosts);
-		entity.setNumClusters(numClusters);
-		return entity;
-	}
-	
-	@SuppressWarnings("serial")
-	private TestEntity createEntityWithoutDatacenter(final String cluster, final String rack, int numHosts, long numClusters){
-		TestEntity entity = new TestEntity();
-		Map<String, String> tags = new HashMap<String, String>(){{
-			put("cluster", cluster);
-			put("rack", rack);
-		}}; 
-		entity.setTags(tags);
-		entity.setNumHosts(numHosts);
-		entity.setNumClusters(numClusters);
-		return entity;
-	}
-
-	private void writeToJson(String message, Object obj){
-		JsonFactory factory = new JsonFactory();
-		ObjectMapper mapper = new ObjectMapper(factory);
-		try{
-			String result = mapper.writeValueAsString(obj);
-			LOG.info(message + ":\n" + result);
-		}catch(Exception ex){
-			LOG.error("Can not write json", ex);
-			Assert.fail("Can not write json");
-		}
-	}
-	
-	@Test
-	public void testZeroGropubyFieldHierarchicalAggregator(){ 
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		HierarchicalAggregator agg = new HierarchicalAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate", result);
-			Assert.assertEquals(result.getChildren().size(), 0);
-			Assert.assertEquals(result.getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));
-
-			// test sort by function1
-			SortOption so = new SortOption();
-			so.setIndex(0);
-			so.setAscendant(true);
-			List<SortOption> sortOptions = Arrays.asList(so);
-			PostHierarchicalAggregateSort.sort(result, sortOptions);
-			writeToJson("After sort" ,result);
-			Assert.assertEquals(null, result.getChildren());
-			Assert.assertEquals(0, result.getSortedList().size());
-			Assert.assertEquals(result.getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testSingleGropubyFieldHierarchicalAggregator(){ 
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc2", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		HierarchicalAggregator agg = new HierarchicalAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate" ,result);
-			Assert.assertEquals(result.getChildren().size(), 2);
-			Assert.assertEquals(result.getChildren().get("cluster1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster2").getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			
-			// test sort by function 1
-			SortOption so = new SortOption();
-			so.setIndex(0);
-			so.setAscendant(true);
-			List<SortOption> sortOptions = Arrays.asList(so);
-			PostHierarchicalAggregateSort.sort(result, sortOptions);
-			writeToJson("After sort" ,result);
-			Assert.assertEquals(null, result.getChildren());
-			Assert.assertEquals(2, result.getSortedList().size(), 2);
-			Iterator<Map.Entry<String, HierarchicalAggregateEntity>> it = result.getSortedList().iterator();
-			Assert.assertEquals(true, it.hasNext());
-			Map.Entry<String, HierarchicalAggregateEntity> entry = it.next();
-			Assert.assertEquals("cluster2", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			
-			Assert.assertEquals(true, it.hasNext());
-			entry = it.next();
-			Assert.assertEquals("cluster1", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new HierarchicalAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate" , result);
-			Assert.assertEquals(result.getChildren().size(), 2);
-			Assert.assertEquals(result.getChildren().get("dc1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("dc2").getValues().get(0), (double)(entities[2].getNumHosts()));
-			
-			// test sort by function 1
-			SortOption so = new SortOption();
-			so.setIndex(0);
-			so.setAscendant(true);
-			List<SortOption> sortOptions = Arrays.asList(so);
-			PostHierarchicalAggregateSort.sort(result, sortOptions);
-			writeToJson("After sort" ,result);
-			Assert.assertEquals(null, result.getChildren());
-			Assert.assertEquals(2, result.getSortedList().size(), 2);
-			Iterator<Map.Entry<String, HierarchicalAggregateEntity>> it = result.getSortedList().iterator();
-			Assert.assertEquals(true, it.hasNext());
-			Map.Entry<String, HierarchicalAggregateEntity> entry = it.next();
-			Assert.assertEquals("dc2", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[2].getNumHosts()));
-			
-			Assert.assertEquals(true, it.hasNext());
-			entry = it.next();
-			Assert.assertEquals("dc1", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));			
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new HierarchicalAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum, AggregateFunctionType.sum), Arrays.asList("numHosts", "numClusters"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate" , result);
-			Assert.assertEquals(result.getChildren().size(), 2);
-			Assert.assertEquals(2, result.getChildren().get("cluster1").getValues().size());
-			Assert.assertEquals(result.getChildren().get("cluster1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster1").getValues().get(1), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+entities[2].getNumClusters()));
-			Assert.assertEquals(2, result.getChildren().get("cluster2").getValues().size());
-			Assert.assertEquals(result.getChildren().get("cluster2").getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster2").getValues().get(1), (double)(entities[3].getNumClusters()+entities[4].getNumClusters()));
-			
-			// test sort by function 2
-			SortOption so = new SortOption();
-			so.setIndex(1);
-			so.setAscendant(true);
-			List<SortOption> sortOptions = Arrays.asList(so);
-			PostHierarchicalAggregateSort.sort(result, sortOptions);
-			writeToJson("After sort" ,result);
-			Assert.assertEquals(null, result.getChildren());
-			Assert.assertEquals(2, result.getSortedList().size(), 2);
-			Iterator<Map.Entry<String, HierarchicalAggregateEntity>> it = result.getSortedList().iterator();
-			Assert.assertEquals(true, it.hasNext());
-			Map.Entry<String, HierarchicalAggregateEntity> entry = it.next();
-			Assert.assertEquals("cluster1", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(1), (double)(entities[0].getNumClusters()+entities[1].getNumClusters()+entities[2].getNumClusters()));
-			
-			Assert.assertEquals(true, it.hasNext());
-			entry = it.next();
-			Assert.assertEquals("cluster2", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(1), (double)(entities[3].getNumClusters()+entities[4].getNumClusters()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	
-	@Test
-	public void testMultipleGropubyFieldsHierarchicalAggregator(){ 
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc2", "rack128", 10, 0);
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		HierarchicalAggregator agg = new HierarchicalAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate", result);
-			Assert.assertEquals(2, result.getChildren().size());
-			Assert.assertEquals(66.0, (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()+entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(2, result.getChildren().get("cluster1").getChildren().size());
-			Assert.assertEquals(result.getChildren().get("cluster1").getChildren().get("dc1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster1").getChildren().get("dc2").getValues().get(0), (double)(entities[2].getNumHosts()));
-			
-			Assert.assertEquals(result.getChildren().get("cluster2").getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(1, result.getChildren().get("cluster2").getChildren().size());
-			Assert.assertEquals(result.getChildren().get("cluster2").getChildren().get("dc1").getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			
-			// test sort by function 2
-			SortOption so = new SortOption();
-			so.setIndex(0);
-			so.setAscendant(true);
-			List<SortOption> sortOptions = Arrays.asList(so);
-			PostHierarchicalAggregateSort.sort(result, sortOptions);
-			writeToJson("After sort" ,result);
-			Assert.assertEquals(null, result.getChildren());
-			Assert.assertEquals(2, result.getSortedList().size());
-			Iterator<Map.Entry<String, HierarchicalAggregateEntity>> it = result.getSortedList().iterator();
-			Assert.assertEquals(true, it.hasNext());
-			Map.Entry<String, HierarchicalAggregateEntity> entry = it.next();
-			Assert.assertEquals("cluster2", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			
-			Assert.assertEquals(true, it.hasNext());
-			entry = it.next();
-			Assert.assertEquals("cluster1", entry.getKey());
-			Assert.assertEquals(entry.getValue().getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));			
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-	
-	@Test
-	public void testUnassigned(){ 
-		TestEntity[] entities = new TestEntity[5];
-		entities[0] = createEntityWithoutDatacenter("cluster1", "rack123", 12, 2);
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1);
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0);
-		entities[3] = createEntityWithoutDatacenter("cluster2", "rack125", 9, 2);
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15, 2);
-		HierarchicalAggregator agg = new HierarchicalAggregator(Arrays.asList("datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate", result);
-			Assert.assertEquals(result.getChildren().size(), 2);
-			Assert.assertEquals(result.getChildren().get("dc1").getValues().get(0), (double)(entities[1].getNumHosts()+entities[2].getNumHosts())+entities[4].getNumHosts());
-			Assert.assertEquals(result.getChildren().get("unassigned").getValues().get(0), (double)(entities[0].getNumHosts()+entities[3].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		agg = new HierarchicalAggregator(Arrays.asList("cluster", "datacenter"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"));
-		try{
-			for(TestEntity e : entities){
-				agg.accumulate(e);
-			}
-			HierarchicalAggregateEntity result = agg.result();
-			writeToJson("After aggregate", result);
-			Assert.assertEquals(result.getChildren().size(), 2);
-			Assert.assertEquals(result.getChildren().get("cluster1").getValues().get(0), (double)(entities[0].getNumHosts()+entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(2, result.getChildren().get("cluster1").getChildren().size());
-			Assert.assertEquals(result.getChildren().get("cluster1").getChildren().get("dc1").getValues().get(0), (double)(entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster1").getChildren().get("unassigned").getValues().get(0), (double)(entities[0].getNumHosts()));
-			
-			Assert.assertEquals(result.getChildren().get("cluster2").getValues().get(0), (double)(entities[3].getNumHosts()+entities[4].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster2").getChildren().get("dc1").getValues().get(0), (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(result.getChildren().get("cluster2").getChildren().get("unassigned").getValues().get(0), (double)(entities[3].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestPostFlatAggregateSort.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestPostFlatAggregateSort.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestPostFlatAggregateSort.java
deleted file mode 100644
index 9751e27..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestPostFlatAggregateSort.java
+++ /dev/null
@@ -1,143 +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.query.aggregate.test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.query.aggregate.timeseries.PostFlatAggregateSort;
-import junit.framework.Assert;
-
-import org.apache.log4j.Logger;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-
-public class TestPostFlatAggregateSort {
-	private static final Logger logger = Logger.getLogger(TestPostFlatAggregateSort.class);
-	@Test
-	public void testSort(){
-		final String aggField1Value1 = "field1value1";
-		final String aggField1Value2 = "field1value2";
-		final String aggField2Value1 = "field2value1";
-		final String aggField2Value2 = "field2value2";
-		final Double d1 = new Double(1);
-		final Double d2 = new Double(2);
-		final Double d3 = new Double(3);
-		final Double d4 = new Double(4);
-		@SuppressWarnings("serial")
-		Map<List<String>, List<Double>> result = new HashMap<List<String>, List<Double>>(){{
-			put(Arrays.asList(aggField1Value1, aggField2Value1), Arrays.asList(d2, d3));
-			put(Arrays.asList(aggField1Value2, aggField2Value2), Arrays.asList(d1, d4));
-		}};
-		
-		// sort by function1
-		SortOption so = new SortOption();
-		so.setIndex(0);
-		so.setAscendant(true);
-		List<SortOption> sortOptions = Arrays.asList(so);
-		List<Map.Entry<List<String>, List<Double>>> set = 
-				PostFlatAggregateSort.sort(result, sortOptions, 0);
-		JsonFactory factory = new JsonFactory();
-		ObjectMapper mapper = new ObjectMapper(factory);
-		Assert.assertEquals(2, set.size());
-		Iterator<Map.Entry<List<String>, List<Double>>> it = set.iterator();
-		Map.Entry<List<String>, List<Double>> e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value2));
-		Assert.assertTrue(e.getValue().get(0).equals(d1));
-		e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value1));
-		Assert.assertTrue(e.getValue().get(0).equals(d2));
-		try{
-			String value = mapper.writeValueAsString(set);
-			logger.info(value);
-		}catch(Exception ex){
-			logger.error("fail with mapping", ex);
-			Assert.fail("fail with mapping");
-		}
-		
-		
-		// sort by function2
-		so = new SortOption();
-		so.setIndex(1);
-		so.setAscendant(true);
-		sortOptions = Arrays.asList(so);
-		set = PostFlatAggregateSort.sort(result, sortOptions, 0);
-		factory = new JsonFactory();
-		mapper = new ObjectMapper(factory);
-		Assert.assertEquals(2, set.size());
-		it = set.iterator();
-		e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value1));
-		Assert.assertTrue(e.getValue().get(0).equals(d2));
-		e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value2));
-		Assert.assertTrue(e.getValue().get(0).equals(d1));
-		try{
-			String value = mapper.writeValueAsString(set);
-			logger.info(value);
-		}catch(Exception ex){
-			logger.error("fail with mapping", ex);
-			Assert.fail("fail with mapping");
-		}
-	}
-	
-	@Test
-	public void testDefaultSort(){
-		final String aggField1Value1 = "xyz";
-		final String aggField1Value2 = "xyz";
-		final String aggField2Value1 = "abd";
-		final String aggField2Value2 = "abc";
-		final Double d1 = new Double(1);
-		final Double d2 = new Double(1);
-		@SuppressWarnings("serial")
-		Map<List<String>, List<Double>> result = new HashMap<List<String>, List<Double>>(){{
-			put(Arrays.asList(aggField1Value1, aggField2Value1), Arrays.asList(d2));
-			put(Arrays.asList(aggField1Value2, aggField2Value2), Arrays.asList(d1));
-		}};
-		
-		// sort by function1
-		SortOption so = new SortOption();
-		so.setIndex(0);
-		so.setAscendant(true);
-		List<SortOption> sortOptions = Arrays.asList(so);
-		List<Map.Entry<List<String>, List<Double>>> set = 
-				PostFlatAggregateSort.sort(result, sortOptions, 0);
-		JsonFactory factory = new JsonFactory();
-		ObjectMapper mapper = new ObjectMapper(factory);
-		Assert.assertEquals(2, set.size());
-		Iterator<Map.Entry<List<String>, List<Double>>> it = set.iterator();
-		Map.Entry<List<String>, List<Double>> e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value2));
-		Assert.assertTrue(e.getValue().get(0).equals(d1));
-		e = it.next();
-		Assert.assertTrue(e.getKey().get(0).equals(aggField1Value1));
-		Assert.assertTrue(e.getValue().get(0).equals(d2));
-		try{
-			String value = mapper.writeValueAsString(set);
-			logger.info(value);
-		}catch(Exception ex){
-			logger.error("fail with mapping", ex);
-			Assert.fail("fail with mapping");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestTimeSeriesAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestTimeSeriesAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestTimeSeriesAggregator.java
deleted file mode 100755
index d953cfa..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/test/java/org/apache/eagle/query/aggregate/test/TestTimeSeriesAggregator.java
+++ /dev/null
@@ -1,176 +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.query.aggregate.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.query.aggregate.timeseries.TimeSeriesAggregator;
-import junit.framework.Assert;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.test.TestEntity;
-
-public class TestTimeSeriesAggregator {
-	private static final Logger LOG = LoggerFactory.getLogger(TestFlatAggregator.class);
-	@SuppressWarnings("serial")
-	private TestEntity createEntity(final String cluster, final String datacenter, final String rack, int numHosts, long numClusters, long timestamp){
-		TestEntity entity = new TestEntity();
-		Map<String, String> tags = new HashMap<String, String>(){{
-			put("cluster", cluster);
-			put("datacenter", datacenter);
-			put("rack", rack);
-		}}; 
-		entity.setTags(tags);
-		entity.setNumHosts(numHosts);
-		entity.setNumClusters(numClusters);
-		entity.setTimestamp(timestamp);
-		return entity;
-	}
-	
-	@Test
-	public void testTimeSeriesAggregator(){
-		TestEntity[] entities = new TestEntity[8];
-		entities[0] = createEntity("cluster1", "dc1", "rack123", 12, 2, 1386120000*1000); // bucket 0
-		entities[1] = createEntity("cluster1", "dc1", "rack123", 20, 1, 1386121060*1000); // bucket 17
-		entities[2] = createEntity("cluster1", "dc1", "rack128", 10, 0, 1386121070*1000); // bucket 17
-		entities[3] = createEntity("cluster2", "dc1", "rack125", 9,   2, 1386122122*1000); // bucket 35
-		entities[4] = createEntity("cluster2", "dc1", "rack126", 15,  5, 1386123210*1000); // bucket 53
-		entities[5] = createEntity("cluster2", "dc1", "rack234", 25,  1, 1386123480*1000); // bucket 58
-		entities[6] = createEntity("cluster2", "dc1", "rack234", 12,  0, 1386123481*1000); // bucket 58
-		entities[7] = createEntity("cluster1", "dc1", "rack123", 3,    2, 1386123482*1000); // bucket 58
-		
-		TimeSeriesAggregator tsAgg = new TimeSeriesAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"),
-				1386120000*1000, 1386123600*1000, 60*1000);
-		try{
-			for(TestEntity e : entities){
-				tsAgg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = tsAgg.result();
-			Assert.assertEquals(result.size(), 6);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "0")).get(0), (double)(entities[0].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "17")).get(0), (double)(entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "35")).get(0), (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "53")).get(0), (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "58")).get(0), (double)(entities[5].getNumHosts()+entities[6].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "58")).get(0), (double)(entities[7].getNumHosts()));
-			
-			Map<List<String>, List<double[]>> tsResult = tsAgg.getMetric();
-			Assert.assertEquals(tsResult.size(), 2);
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0).length, 60);
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[0], (double)(entities[0].getNumHosts()));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[17], (double)(entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[35], (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[53], (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[58], (double)(entities[5].getNumHosts()+entities[6].getNumHosts()));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[58], (double)(entities[7].getNumHosts()));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		tsAgg = new TimeSeriesAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.sum), Arrays.asList("numHosts"), 
-				1386120000*1000, 1386123600*1000, 60*1000);
-		try{
-			for(TestEntity e : entities){
-				tsAgg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = tsAgg.result();
-			Assert.assertEquals(result.size(), 5);
-			Assert.assertEquals(result.get(Arrays.asList("0")).get(0), (double)(entities[0].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("17")).get(0), (double)(entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("35")).get(0), (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("53")).get(0), (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(result.get(Arrays.asList("58")).get(0), (double)(entities[5].getNumHosts()+entities[6].getNumHosts()+entities[7].getNumHosts()));
-			
-			Map<List<String>, List<double[]>> tsResult = tsAgg.getMetric();
-			Assert.assertEquals(tsResult.size(), 1);
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0).length, 60);
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[0], (double)(entities[0].getNumHosts()));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[17], (double)(entities[1].getNumHosts()+entities[2].getNumHosts()));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[35], (double)(entities[3].getNumHosts()));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[53], (double)(entities[4].getNumHosts()));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[58], (double)(entities[5].getNumHosts()+entities[6].getNumHosts()+entities[7].getNumHosts()));		
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		tsAgg = new TimeSeriesAggregator(Arrays.asList("cluster"), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), 
-				1386120000*1000, 1386123600*1000, 60*1000);
-		try{
-			for(TestEntity e : entities){
-				tsAgg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = tsAgg.result();
-			Assert.assertEquals(result.size(), 6);
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "0")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "17")).get(0), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "35")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "53")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("cluster2", "58")).get(0), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("cluster1", "58")).get(0), (double)(1));
-			
-			Map<List<String>, List<double[]>> tsResult = tsAgg.getMetric();
-			Assert.assertEquals(tsResult.size(), 2);
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0).length, 60);
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[0], (double)(1));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[17], (double)(2));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[35], (double)(1));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[53], (double)(1));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster2")).get(0)[58], (double)(2));
-			Assert.assertEquals(tsResult.get(Arrays.asList("cluster1")).get(0)[58], (double)(1));
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-		
-		tsAgg = new TimeSeriesAggregator(new ArrayList<String>(), Arrays.asList(AggregateFunctionType.count), Arrays.asList("*"), 
-				1386120000*1000, 1386123600*1000, 60*1000);
-		try{
-			for(TestEntity e : entities){
-				tsAgg.accumulate(e);
-			}
-			Map<List<String>, List<Double>> result = tsAgg.result();
-			Assert.assertEquals(result.size(), 5);
-			Assert.assertEquals(result.get(Arrays.asList("0")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("17")).get(0), (double)(2));
-			Assert.assertEquals(result.get(Arrays.asList("35")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("53")).get(0), (double)(1));
-			Assert.assertEquals(result.get(Arrays.asList("58")).get(0), (double)(3));
-			
-			Map<List<String>, List<double[]>> tsResult = tsAgg.getMetric();
-			Assert.assertEquals(tsResult.size(), 1);
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0).length, 60);
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[0], (double)(1));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[17], (double)(2));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[35], (double)(1));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[53], (double)(1));
-			Assert.assertEquals(tsResult.get(new ArrayList<String>()).get(0)[58], (double)(3));		
-		}catch(Exception ex){
-			LOG.error("Can not aggregate", ex);
-			Assert.fail("Can not aggregate");
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/pom.xml b/eagle-core/eagle-query/eagle-service-base/pom.xml
deleted file mode 100755
index 32c0846..0000000
--- a/eagle-core/eagle-query/eagle-service-base/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-service-base</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-service-base</name>
-
-	<dependencies>
-        <!-- put eagle-storage-base dependency at the top for using asm 4.0 jar !-->
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-server</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.jersey.contribs</groupId>
-			<artifactId>jersey-multipart</artifactId>
-			<version>${jersey.version}</version>
-		</dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-hbase</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-mapper-asl</artifactId>
-		</dependency>
-	</dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/EagleExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/EagleExceptionWrapper.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/EagleExceptionWrapper.java
deleted file mode 100644
index 33aabab..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/EagleExceptionWrapper.java
+++ /dev/null
@@ -1,42 +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.service.common;
-
-public class EagleExceptionWrapper {
-	private final static int MAX_DEPTH = 10;
-	
-	public static String wrap(Exception ex){
-		return wrap(ex, EagleExceptionWrapper.MAX_DEPTH);
-	}
-	
-	public static String wrap(Exception ex, int maxdepth){
-		int d = maxdepth;
-		if(d <= 0)
-			d = EagleExceptionWrapper.MAX_DEPTH;
-		int index = 0;
-		StringBuffer sb = new StringBuffer();
-		sb.append(ex);
-		sb.append(System.getProperty("line.separator"));
-		for(StackTraceElement element : ex.getStackTrace()){
-			sb.append(element.toString());
-			sb.append(System.getProperty("line.separator"));
-			if(++index >= d)
-				break;
-		}
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/SplitFullScanEntityReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/SplitFullScanEntityReader.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/SplitFullScanEntityReader.java
deleted file mode 100755
index ae9ecef..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/common/SplitFullScanEntityReader.java
+++ /dev/null
@@ -1,289 +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.service.common;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericEntityBatchReader;
-import org.apache.eagle.log.entity.RowkeyBuilder;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-
-/**
- * Support stream based entity read. Internally it splits entity fetching to multiple threads to improve 
- * the performance. However, it doesn't support multi-threading for client to read entities from result set.
- * 
- */
-public class SplitFullScanEntityReader<ENTITY extends TaggedLogAPIEntity> {
-
-	// class members
-	public static final int DEFAULT_BUFFER_SIZE = 10 * 1000;
-	public static final int MAX_WRITE_TIME_OUT_IN_SECONDS = 60;
-	private static final Logger LOG = LoggerFactory.getLogger(SplitFullScanEntityReader.class);
-	private static final TaggedLogAPIEntity COMPLETED_ENTITY = new TaggedLogAPIEntity();
-
-	// instance members
-	private final int splits;
-	private final String query;
-	private final long startTime;
-	private final long endTime;
-	private final String startRowkey;
-	private final int pageSize;
-	private final int bufferSize;
-	
-	public SplitFullScanEntityReader(String query,
-			String startTime, String endTime,
-			int splits, String startRowkey, int pageSize) {
-		this(
-				query, 
-				DateTimeUtil.humanDateToSecondsWithoutException(startTime) * 1000,
-				DateTimeUtil.humanDateToSecondsWithoutException(endTime) * 1000,
-				splits,
-				startRowkey,
-				pageSize
-			);
-	}
-	
-	public SplitFullScanEntityReader(String query, long startTime, long endTime,
-			int splits, String startRowkey, int pageSize) {
-		this(query, startTime, endTime, splits, startRowkey, pageSize, 
-				DEFAULT_BUFFER_SIZE);
-	}
-	
-	public SplitFullScanEntityReader(String query, long startTime, long endTime,
-			int splits, String startRowkey, int pageSize, int bufferSize) {
-		this.query = query;
-		this.startTime = startTime;
-		this.endTime = endTime;
-		this.splits = splits;
-		this.startRowkey = startRowkey;
-		this.pageSize = pageSize;
-		this.bufferSize = bufferSize;
-	}
-	
-	public EntityResultSet<ENTITY> read() throws Exception {
-		final EntityResultSet<ENTITY> resultSet = new EntityResultSet<ENTITY>(new ArrayBlockingQueue<TaggedLogAPIEntity>(bufferSize));
-		final List<GenericEntityBatchReader> readers = createSplitThreads();
-		
-		final int size = readers.size();
-		if (size > 0) {
-			final AtomicInteger threadCount = new AtomicInteger(size);
-			final AtomicInteger entityCount = new AtomicInteger(0);
-			for (GenericEntityBatchReader reader : readers) {
-				final EntityFetchThread<ENTITY> thread = new EntityFetchThread<ENTITY>(reader, threadCount, entityCount, resultSet);
-				thread.start();
-			}
-		} else {
-			resultSet.getQueue().add(COMPLETED_ENTITY);
-		}
-		return resultSet;
-	}
-
-	protected List<GenericEntityBatchReader> createSplitThreads() throws Exception {
-		
-		final List<GenericEntityBatchReader> readers = new ArrayList<GenericEntityBatchReader>();
-		final ListQueryCompiler comp = new ListQueryCompiler(query);
-		final EntityDefinition entityDef = EntityDefinitionManager.getEntityByServiceName(comp.serviceName());
-		if (entityDef == null) {
-			throw new IllegalArgumentException("Invalid entity name: " + comp.serviceName());
-		}
-		
-		// TODO: For now we don't support one query to query multiple partitions. In future 
-		// if partition is defined for the entity, internally We need to spawn multiple
-		// queries and send one query for each search condition for each partition
-		final List<String[]> partitionValues = comp.getQueryPartitionValues();
-		partitionConstraintValidate(partitionValues, query);
-		
-		long lastTimestamp = Long.MAX_VALUE;
-		if (startRowkey != null) {
-			final byte[] lastRowkey = EagleBase64Wrapper.decode(startRowkey);
-			lastTimestamp = RowkeyBuilder.getTimestamp(lastRowkey, entityDef);
-		}
-		
-		final long duration = (endTime - startTime) / splits;
-		for (int i = 0; i < splits; ++i) {
-			
-			final long slotStartTime = startTime + (i * duration);
-			if (slotStartTime > lastTimestamp) {
-				// ignore this slot
-				continue;
-			}
-			final long slotEndTime = startTime + ((i + 1) * duration);
-			final SearchCondition condition = new SearchCondition();
-			final String slotStartTimeString = DateTimeUtil.secondsToHumanDate(slotStartTime / 1000);
-			final String slotEndTimeString = DateTimeUtil.secondsToHumanDate(slotEndTime / 1000);
-			condition.setStartTime(slotStartTimeString);
-			condition.setEndTime(slotEndTimeString);
-			
-			condition.setFilter(comp.filter());
-			condition.setQueryExpression(comp.getQueryExpression());
-			if (partitionValues != null) {
-				condition.setPartitionValues(Arrays.asList(partitionValues.get(0)));
-			}
-			// Should be careful to the startRowkey setting. Only set startRowkey when 
-			// lastTimestamp is within the slot time range.
-			if (startRowkey != null && lastTimestamp >= startTime && lastTimestamp < endTime) {
-				condition.setStartRowkey(startRowkey);
-			}
-			condition.setPageSize(pageSize);
-			
-			if (comp.hasAgg()) {
-				List<String> groupbyFields = comp.groupbyFields();
-				List<String> outputFields = new ArrayList<String>();
-				if(groupbyFields != null){
-					outputFields.addAll(groupbyFields);
-				}
-				outputFields.addAll(comp.aggregateFields());
-				condition.setOutputFields(outputFields);
-			} else {
-				condition.setOutputFields(comp.outputFields());
-			}
-			readers.add(new GenericEntityBatchReader(comp.serviceName(), condition));
-		}
-		return readers;
-	}
-	
-
-	private static void partitionConstraintValidate(List<String[]> partitionValues, String query) {
-		if (partitionValues != null && partitionValues.size() > 1) {
-			final String[] values = partitionValues.get(0);
-			for (int i = 1; i < partitionValues.size(); ++i) {
-				final String[] tmpValues = partitionValues.get(i);
-				for (int j = 0; j < values.length; ++j) {
-					if (values[j] == null || (!values[j].equals(tmpValues[j]))) {
-						final String errMsg = "One query for multiple partitions is NOT allowed for now! Query: " + query;
-						LOG.error(errMsg);
-						throw new IllegalArgumentException(errMsg);
-					}
-				}
-			}
-		}
-	}
-	
-	
-	@SuppressWarnings("unchecked")
-	public static class EntityResultSet<ENTITY extends TaggedLogAPIEntity> {
-		private static final long DEFAULT_TIMEOUT_IN_MS = 1000;
-
-		private boolean fetchCompleted = false;
-		private final BlockingQueue<TaggedLogAPIEntity> queue;
-		private volatile Exception ex = null;
-
-		public EntityResultSet(BlockingQueue<TaggedLogAPIEntity> queue) {
-			this.queue = queue;
-		}
-		
-		public boolean hasMoreData() {
-			return queue.size() > 0 || (!fetchCompleted);
-		}
-		
-		public ENTITY next(long timeout, TimeUnit unit) throws InterruptedException {
-			if (fetchCompleted) {
-				return null;
-			}
-			final TaggedLogAPIEntity entity = queue.poll(timeout, unit);
-			if (COMPLETED_ENTITY.equals(entity)) {
-				fetchCompleted = true;
-				return null;
-			}
-			return (ENTITY)entity;
-		}
-		
-		public ENTITY next() throws Exception {
-			TaggedLogAPIEntity entity = null;
-			while (!fetchCompleted) {
-				try {
-					entity = queue.poll(DEFAULT_TIMEOUT_IN_MS, TimeUnit.MILLISECONDS);
-					if (COMPLETED_ENTITY.equals(entity)) {
-						fetchCompleted = true;
-						if (ex != null) {
-							throw ex;
-						}
-						return null;
-					}
-					if (entity != null) {
-						return (ENTITY)entity;
-					}
-				} catch (InterruptedException ex) {
-					// Just ignore
-				}
-			}
-			return null;
-		}
-		
-		void setException(Exception ex) {
-			this.ex = ex;
-		}
-		
-		BlockingQueue<TaggedLogAPIEntity> getQueue() {
-			return queue;
-		}
-	}
-	
-	private static class EntityFetchThread<ENTITY extends TaggedLogAPIEntity> extends Thread {
-		
-		private final GenericEntityBatchReader reader;
-		private final AtomicInteger threadCount;
-		private final AtomicInteger entityCount;
-		private final EntityResultSet<ENTITY> resultSet;
-		
-		private EntityFetchThread(GenericEntityBatchReader reader, AtomicInteger threadCount, AtomicInteger entityCount, EntityResultSet<ENTITY> resultSet) {
-			this.reader = reader;
-			this.threadCount = threadCount;
-			this.entityCount = entityCount;
-			this.resultSet = resultSet;
-		}
-		
-	    @Override
-	    public void run() {
-	    	try {
-	    		final List<ENTITY> entities = reader.read();
-	    		entityCount.addAndGet(entities.size());
-	    		for (ENTITY entity : entities) {
-	    			if (!resultSet.getQueue().offer(entity, MAX_WRITE_TIME_OUT_IN_SECONDS, TimeUnit.SECONDS)) {
-	    				resultSet.setException(new IOException("Write entity to queue timeout"));
-		    			resultSet.getQueue().add(COMPLETED_ENTITY);
-	    			}
-	    		}
-	    	} catch (Exception ex) {
-				resultSet.setException(ex);
-    			resultSet.getQueue().add(COMPLETED_ENTITY);
-	    	} finally {
-	    		final int count = threadCount.decrementAndGet();
-	    		if (count == 0) {
-	    			resultSet.getQueue().add(COMPLETED_ENTITY);
-	    			LOG.info("Total fetched " + entityCount.get() + " entities");
-	    		}
-	    	}
-	    }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
deleted file mode 100644
index fb52352..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
+++ /dev/null
@@ -1,630 +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.service.generic;
-
-import com.sun.jersey.core.header.FormDataContentDisposition;
-import com.sun.jersey.multipart.FormDataParam;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.DataStorage;
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageException;
-import org.apache.eagle.storage.operation.*;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import com.sun.jersey.api.json.JSONWithPadding;
-import org.apache.commons.lang.time.StopWatch;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.GenericEntity;
-import javax.ws.rs.core.MediaType;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since 3/18/15
- */
-@Path(GenericEntityServiceResource.ROOT_PATH)
-@SuppressWarnings("unchecked")
-public class GenericEntityServiceResource {
-    public final static String ROOT_PATH = "/entities";
-    public final static String JSONP_PATH = "jsonp";
-    public final static String DELETE_ENTITIES_PATH = "delete";
-    public final static String ROWKEY_PATH = "rowkey";
-
-    public final static String FIRST_TIMESTAMP = "firstTimestamp";
-    public final static String LAST_TIMESTAMP = "lastTimestamp";
-    public final static String ELAPSEDMS = "elapsedms";
-    public final static String TOTAL_RESULTS = "totalResults";
-
-    private final static Logger LOG = LoggerFactory.getLogger(GenericEntityServiceResource.class);
-
-    private List<? extends TaggedLogAPIEntity> unmarshalEntitiesByServie(InputStream inputStream,EntityDefinition entityDefinition) throws IllegalAccessException, InstantiationException, IOException {
-        ObjectMapper objectMapper = new ObjectMapper();
-        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, entityDefinition.getEntityClass()));
-    }
-
-    private List<String> unmarshalAsStringlist(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
-        ObjectMapper objectMapper = new ObjectMapper();
-        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, String.class));
-    }
-
-
-    public GenericServiceAPIResponseEntity updateDatabase(Statement<ModifyResult<String>> statement) {
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<>();
-        Map<String,Object> meta = new HashMap<>();
-        StopWatch stopWatch = new StopWatch();
-
-        try {
-            stopWatch.start();
-            DataStorage dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            if(dataStorage == null){
-                LOG.error("Data storage is null");
-                throw new IllegalDataStorageException("Data storage is null");
-            }
-            ModifyResult<String> result = statement.execute(dataStorage);
-            if(result.isSuccess()) {
-                List<String> keys =result.getIdentifiers();
-                if(keys != null) {
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS, keys.size());
-                } else {
-                    meta.put(TOTAL_RESULTS, 0);
-                }
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    public GenericServiceAPIResponseEntity updateEntities(List<? extends TaggedLogAPIEntity> entities, String serviceName) {
-        CreateStatement createStatement = new CreateStatement(entities, serviceName);
-        GenericServiceAPIResponseEntity<String> response = updateDatabase(createStatement);
-        return response;
-    }
-
-    @POST
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity create(InputStream inputStream,
-                                                 @QueryParam("serviceName") String serviceName){
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<String>();
-        Map<String,Object> meta = new HashMap<>();
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-
-            if(entityDefinition == null){
-                throw new IllegalArgumentException("entity definition of service "+serviceName+" not found");
-            }
-
-            List<? extends TaggedLogAPIEntity> entities = unmarshalEntitiesByServie(inputStream, entityDefinition);
-            DataStorage dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            CreateStatement createStatement = new CreateStatement(entities,entityDefinition);
-            ModifyResult<String> result = createStatement.execute(dataStorage);
-            if(result.isSuccess()) {
-                List<String> keys =result.getIdentifiers();
-                if(keys != null) {
-                    response.setObj(keys, String.class);
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS,keys.size());
-                }else{
-                    meta.put(TOTAL_RESULTS,0);
-                }
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    @POST
-    @Consumes({MediaType.MULTIPART_FORM_DATA})
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity create(@FormDataParam("file") InputStream fileInputStream,
-                                                  @FormDataParam("file") FormDataContentDisposition cdh,
-                                                  @QueryParam("serviceName") String serviceName) {
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<String>();
-        Map<String,Object> meta = new HashMap<>();
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-
-            if(entityDefinition == null){
-                throw new IllegalArgumentException("entity definition of service "+serviceName+" not found");
-            }
-
-            List<? extends TaggedLogAPIEntity> entities = unmarshalEntitiesByServie(fileInputStream, entityDefinition);
-            DataStorage dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            CreateStatement createStatement = new CreateStatement(entities,entityDefinition);
-            ModifyResult<String> result = createStatement.execute(dataStorage);
-            if(result.isSuccess()) {
-                List<String> keys =result.getIdentifiers();
-                if(keys != null) {
-                    response.setObj(keys, String.class);
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS,keys.size());
-                }else{
-                    meta.put(TOTAL_RESULTS,0);
-                }
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    @PUT
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity update(InputStream inputStream,
-                                                 @QueryParam("serviceName") String serviceName){
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<String>();
-        DataStorage dataStorage;
-        Map<String,Object> meta = new HashMap<>();
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-
-            if(entityDefinition == null){
-                throw new IllegalArgumentException("entity definition of service "+serviceName+" not found");
-            }
-
-            List<? extends TaggedLogAPIEntity> entities = unmarshalEntitiesByServie(inputStream, entityDefinition);
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-
-            UpdateStatement updateStatement = new UpdateStatement(entities,entityDefinition);
-            ModifyResult<String> result = updateStatement.execute(dataStorage);
-            if(result.isSuccess()) {
-                List<String> keys =result.getIdentifiers();
-                if(keys != null) {
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS,keys.size());
-                }else{
-                    meta.put(TOTAL_RESULTS,0);
-                }
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        } finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    @PUT
-    @Consumes({MediaType.MULTIPART_FORM_DATA})
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity update(@FormDataParam("file") InputStream fileInputStream,
-                                                  @FormDataParam("file") FormDataContentDisposition cdh,
-                                                  @QueryParam("serviceName") String serviceName){
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<String>();
-        DataStorage dataStorage;
-        Map<String,Object> meta = new HashMap<>();
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-
-            if(entityDefinition == null){
-                throw new IllegalArgumentException("entity definition of service "+serviceName+" not found");
-            }
-
-            List<? extends TaggedLogAPIEntity> entities = unmarshalEntitiesByServie(fileInputStream, entityDefinition);
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-
-            UpdateStatement updateStatement = new UpdateStatement(entities,entityDefinition);
-            ModifyResult<String> result = updateStatement.execute(dataStorage);
-            if(result.isSuccess()) {
-                List<String> keys =result.getIdentifiers();
-                if(keys != null) {
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS,keys.size());
-                }else{
-                    meta.put(TOTAL_RESULTS,0);
-                }
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        } finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-
-
-    /**
-     * @param value rowkey value
-     * @param serviceName entity service name
-     * @return GenericServiceAPIResponseEntity
-     */
-    @GET
-    @Path(ROWKEY_PATH)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity search(@QueryParam("value") String value,@QueryParam("serviceName") String serviceName){
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        Map<String,Object> meta = new HashMap<>();
-        DataStorage dataStorage;
-        StopWatch stopWatch = null;
-        try {
-            if(serviceName == null) throw new IllegalArgumentException("serviceName is null");
-            RowkeyQueryStatement queryStatement = new RowkeyQueryStatement(value,serviceName);
-            stopWatch = new StopWatch();
-            stopWatch.start();
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            if(dataStorage==null){
-                LOG.error("Data storage is null");
-                throw new IllegalDataStorageException("data storage is null");
-            }
-            QueryResult<?> result = queryStatement.execute(dataStorage);
-            if(result.isSuccess()){
-                meta.put(FIRST_TIMESTAMP, result.getFirstTimestamp());
-                meta.put(LAST_TIMESTAMP, result.getLastTimestamp());
-                meta.put(TOTAL_RESULTS, result.getSize());
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setObj(result.getData());
-                response.setType(result.getEntityType());
-                response.setSuccess(true);
-                response.setMeta(meta);
-                return response;
-            }
-        } catch (Exception e) {
-            response.setException(e);
-            LOG.error(e.getMessage(),e);
-        }finally {
-            if(stopWatch!=null) stopWatch.stop();
-        }
-        return response;
-    }
-
-    /**
-     * @param serviceName entity service name
-     * @return GenericServiceAPIResponseEntity
-     */
-    @POST
-    @Path(ROWKEY_PATH)
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity search(InputStream inputStream,@QueryParam("serviceName") String serviceName){
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        Map<String,Object> meta = new HashMap<>();
-        DataStorage dataStorage;
-
-        StopWatch stopWatch = null;
-        try {
-            if(serviceName == null) throw new IllegalArgumentException("serviceName is null");
-
-            final List<String> values = unmarshalAsStringlist(inputStream);
-            final RowkeyQueryStatement queryStatement = new RowkeyQueryStatement(values,serviceName);
-
-            stopWatch = new StopWatch();
-            stopWatch.start();
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            if(dataStorage==null){
-                LOG.error("Data storage is null");
-                throw new IllegalDataStorageException("Data storage is null");
-            }
-            QueryResult<?> result = queryStatement.execute(dataStorage);
-            if(result.isSuccess()){
-                meta.put(FIRST_TIMESTAMP, result.getFirstTimestamp());
-                meta.put(LAST_TIMESTAMP, result.getLastTimestamp());
-                meta.put(TOTAL_RESULTS, result.getSize());
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-                response.setObj(result.getData());
-                response.setType(result.getEntityType());
-                response.setSuccess(true);
-                response.setMeta(meta);
-                return response;
-            }
-        } catch (Exception e) {
-            response.setException(e);
-            LOG.error(e.getMessage(),e);
-        }finally {
-            if(stopWatch!=null) stopWatch.stop();
-        }
-        return response;
-    }
-
-
-    /**
-     *
-     * @param query
-     * @param startTime
-     * @param endTime
-     * @param pageSize
-     * @param startRowkey
-     * @param treeAgg
-     * @param timeSeries
-     * @param intervalmin
-     * @param top
-     * @param filterIfMissing
-     * @param parallel
-     * @param metricName
-     * @param verbose
-     * @return
-     */
-    @GET
-    @Produces(MediaType.APPLICATION_JSON)
-    @SuppressWarnings("unchecked")
-    public GenericServiceAPIResponseEntity search(@QueryParam("query") String query,
-                                                 @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-                                                 @QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey,
-                                                 @QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries,
-                                                 @QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-                                                 @QueryParam("filterIfMissing") boolean filterIfMissing,
-                                                 @QueryParam("parallel") int parallel,
-                                                 @QueryParam("metricName") String metricName,
-                                                 @QueryParam("verbose") Boolean verbose){
-        RawQuery rawQuery = RawQuery.build()
-                .query(query)
-                .startTime(startTime)
-                .endTime(endTime)
-                .pageSize(pageSize)
-                .startRowkey(startRowkey)
-                .treeAgg(treeAgg)
-                .timeSeries(timeSeries)
-                .intervalMin(intervalmin)
-                .top(top)
-                .filerIfMissing(filterIfMissing)
-                .parallel(parallel)
-                .metricName(metricName)
-                .verbose(verbose)
-                .done();
-
-        QueryStatement queryStatement = new QueryStatement(rawQuery);
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        Map<String,Object> meta = new HashMap<>();
-
-        DataStorage dataStorage;
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            if(dataStorage==null){
-                LOG.error("Data storage is null");
-                throw new IllegalDataStorageException("data storage is null");
-            }
-            
-            QueryResult<?> result = queryStatement.execute(dataStorage);
-            if(result.isSuccess()){
-                meta.put(FIRST_TIMESTAMP, result.getFirstTimestamp());
-                meta.put(LAST_TIMESTAMP, result.getLastTimestamp());
-                meta.put(TOTAL_RESULTS, result.getSize());
-                meta.put(ELAPSEDMS,stopWatch.getTime());
-
-                response.setObj(result.getData());
-                response.setType(result.getEntityType());
-                response.setSuccess(true);
-                response.setMeta(meta);
-                return response;
-            }
-        } catch (Exception e) {
-            response.setException(e);
-            LOG.error(e.getMessage(),e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    /**
-     *
-     * @param query
-     * @param startTime
-     * @param endTime
-     * @param pageSize
-     * @param startRowkey
-     * @param treeAgg
-     * @param timeSeries
-     * @param intervalmin
-     * @param top
-     * @param filterIfMissing
-     * @param parallel
-     * @param metricName
-     * @param verbose
-     * @return
-     */
-    @GET
-    @Path(JSONP_PATH)
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public JSONWithPadding searchWithJsonp(@QueryParam("query") String query,
-                                           @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-                                           @QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey,
-                                           @QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries,
-                                           @QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-                                           @QueryParam("filterIfMissing") boolean filterIfMissing,
-                                           @QueryParam("parallel") int parallel,
-                                           @QueryParam("metricName") String metricName,
-                                           @QueryParam("verbose") Boolean verbose,
-                                           @QueryParam("callback") String callback){
-        GenericServiceAPIResponseEntity result = search(query, startTime, endTime, pageSize, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing, parallel, metricName, verbose);
-        return new JSONWithPadding(new GenericEntity<GenericServiceAPIResponseEntity>(result){}, callback);
-    }
-
-    /**
-     * TODO
-     *
-     * Delete by query
-     *
-     * @return
-     */
-    @DELETE
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteByQuery(@QueryParam("query") String query,
-                                                 @QueryParam("startTime") String startTime, @QueryParam("endTime") String endTime,
-                                                 @QueryParam("pageSize") int pageSize, @QueryParam("startRowkey") String startRowkey,
-                                                 @QueryParam("treeAgg") boolean treeAgg, @QueryParam("timeSeries") boolean timeSeries,
-                                                 @QueryParam("intervalmin") long intervalmin, @QueryParam("top") int top,
-                                                 @QueryParam("filterIfMissing") boolean filterIfMissing,
-                                                 @QueryParam("parallel") int parallel,
-                                                 @QueryParam("metricName") String metricName,
-                                                 @QueryParam("verbose") Boolean verbose){
-        RawQuery rawQuery = RawQuery.build()
-                .query(query)
-                .startTime(startTime)
-                .endTime(endTime)
-                .pageSize(pageSize)
-                .startRowkey(startRowkey)
-                .treeAgg(treeAgg)
-                .timeSeries(timeSeries)
-                .intervalMin(intervalmin)
-                .top(top)
-                .filerIfMissing(filterIfMissing)
-                .parallel(parallel)
-                .metricName(metricName)
-                .verbose(verbose)
-                .done();
-
-        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity();
-        Map<String,Object> meta = new HashMap<String, Object>();
-        DataStorage dataStorage = null;
-        StopWatch stopWatch = new StopWatch();
-        try {
-            stopWatch.start();
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            if(dataStorage==null){
-                LOG.error("Data storage is null");
-                throw new IllegalDataStorageException("Data storage is null");
-            }
-            
-            DeleteStatement deleteStatement = new DeleteStatement(rawQuery);
-            ModifyResult<String> deleteResult = deleteStatement.execute(dataStorage);
-            if(deleteResult.isSuccess()){
-                meta.put(ELAPSEDMS, stopWatch.getTime());
-                response.setObj(deleteResult.getIdentifiers(),String.class);
-                response.setSuccess(true);
-                response.setMeta(meta);
-            }
-            return response;
-        } catch (Exception e) {
-            response.setException(e);
-            LOG.error(e.getMessage(),e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-
-    /**
-     *
-     * Delete by entity lists
-     *
-     * Use "POST /entities/delete" instead of "DELETE  /entities" to walk around jersey DELETE issue for request with body
-     *
-     * @param inputStream
-     * @param serviceName
-     * @return
-     */
-    @POST
-    @Path(DELETE_ENTITIES_PATH)
-    @Consumes(MediaType.APPLICATION_JSON)
-    @Produces(MediaType.APPLICATION_JSON)
-    public GenericServiceAPIResponseEntity deleteEntities(InputStream inputStream,
-                                                 @QueryParam("serviceName") String serviceName,
-                                                 @QueryParam("byId") Boolean deleteById){
-        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<String>();
-        DataStorage dataStorage = null;
-        Map<String,Object> meta = new HashMap<String, Object>();
-
-        if(deleteById == null) deleteById = false;
-
-        StopWatch stopWatch = new StopWatch();
-
-        try {
-            stopWatch.start();
-            dataStorage = DataStorageManager.getDataStorageByEagleConfig();
-            DeleteStatement statement = new DeleteStatement(serviceName);
-
-            if(deleteById) {
-                LOG.info("Deleting "+serviceName+" by ids");
-                List<String> deleteIds = unmarshalAsStringlist(inputStream);
-                statement.setIds(deleteIds);
-            }else {
-                LOG.info("Deleting "+serviceName+" by entities");
-                EntityDefinition entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName);
-                if (entityDefinition == null) {
-                    throw new IllegalArgumentException("Entity definition of service " + serviceName + " not found");
-                }
-                List<? extends TaggedLogAPIEntity> entities = unmarshalEntitiesByServie(inputStream, entityDefinition);
-                statement.setEntities(entities);
-            }
-
-            ModifyResult<String> result = statement.execute(dataStorage);
-            if (result.isSuccess()) {
-                List<String> keys = result.getIdentifiers();
-                if (keys != null) {
-                    response.setObj(keys, String.class);
-                    meta.put(TOTAL_RESULTS, keys.size());
-                } else {
-                    meta.put(TOTAL_RESULTS, 0);
-                }
-                meta.put(ELAPSEDMS, stopWatch.getTime());
-                response.setMeta(meta);
-                response.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            response.setException(e);
-        }finally {
-            stopWatch.stop();
-        }
-        return response;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericObjectMapperProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericObjectMapperProvider.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericObjectMapperProvider.java
deleted file mode 100755
index c10c28d..0000000
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericObjectMapperProvider.java
+++ /dev/null
@@ -1,44 +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.service.generic;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.ser.FilterProvider;
-
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
-
-@Provider
-@Produces(MediaType.APPLICATION_JSON)
-public class GenericObjectMapperProvider implements ContextResolver<ObjectMapper> {
-    private final static ObjectMapper OBJECT_MAPPER = new ObjectMapper();
-    @Override
-    public ObjectMapper getContext(Class<?> clazz) {
-        return OBJECT_MAPPER;
-    }
-    public static void setFilter(FilterProvider filter){
-        OBJECT_MAPPER.setFilters(filter);
-    }
-
-    static{
-        setFilter(TaggedLogAPIEntity.getFilterProvider());
-        // set more filter here
-    }
-}


[39/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/InputStreamUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/InputStreamUtils.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/InputStreamUtils.java
deleted file mode 100644
index 62a15af..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/InputStreamUtils.java
+++ /dev/null
@@ -1,61 +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.jobrunning.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.zip.GZIPInputStream;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class InputStreamUtils {
-
-	private static final int CONNECTION_TIMEOUT = 10 * 1000;
-	private static final int READ_TIMEOUT = 5 * 60 * 1000;
-	private static final String GZIP_HTTP_HEADER = "Accept-Encoding";
-	private static final String GZIP_COMPRESSION = "gzip";
-	
-	private static InputStream openGZIPInputStream(URL url, int timeout) throws IOException {
-		final URLConnection connection = url.openConnection();
-		connection.setConnectTimeout(CONNECTION_TIMEOUT);
-		connection.setReadTimeout(timeout);
-		connection.addRequestProperty(GZIP_HTTP_HEADER, GZIP_COMPRESSION);
-		return new GZIPInputStream(connection.getInputStream());
-	}
-	
-	private static InputStream openInputStream(URL url, int timeout) throws IOException {
-		URLConnection connection = url.openConnection();
-		connection.setConnectTimeout(timeout);
-		return connection.getInputStream();
-	}
-	
-	public static InputStream getInputStream(String urlString, JobConstants.CompressionType compressionType, int timeout) throws Exception {
-		final URL url = URLConnectionUtils.getUrl(urlString);
-		if (compressionType.equals(JobConstants.CompressionType.GZIP)) {
-			return openGZIPInputStream(url, timeout);
-		}
-		else { // CompressionType.NONE
-			return openInputStream(url, timeout);
-		}
-	}
-	
-	public static InputStream getInputStream(String urlString, JobConstants.CompressionType compressionType) throws Exception {
-		return getInputStream(urlString, compressionType, READ_TIMEOUT);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/JobUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/JobUtils.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/JobUtils.java
deleted file mode 100644
index 9af37ca..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/JobUtils.java
+++ /dev/null
@@ -1,43 +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.jobrunning.util;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobUtils {
-	
-	public static String checkAndAddLastSlash(String urlBase) {
-		if (!urlBase.endsWith("/")) {
-			return urlBase + "/";
-		}
-		return urlBase;
-	}
-	
-	public static String getJobIDByAppID(String appID) {
-		if (appID.startsWith(JobConstants.APPLICATION_PREFIX)) {
-			return appID.replace(JobConstants.APPLICATION_PREFIX, JobConstants.JOB_PREFIX);
-		}
-		return null;
-	}
-
-	public static String getAppIDByJobID(String jobID) {
-		if (jobID.startsWith(JobConstants.JOB_PREFIX)) {
-			return jobID.replace(JobConstants.JOB_PREFIX, JobConstants.APPLICATION_PREFIX);
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/URLConnectionUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/URLConnectionUtils.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/URLConnectionUtils.java
deleted file mode 100644
index 314fb0a..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/util/URLConnectionUtils.java
+++ /dev/null
@@ -1,108 +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.jobrunning.util;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class URLConnectionUtils {
-	//TODO: change some public method to private
-    private static final Logger LOG = LoggerFactory.getLogger(URLConnectionUtils.class);
-	
-	public static URLConnection getConnection(String url) throws Exception {
-		if (url.startsWith("https://")) {
-			return getHTTPSConnection(url);
-		} else if (url.startsWith("http://")) {
-			return getHTTPConnection(url);
-		}
-		throw new Exception("Invalid input argument url: " + url);
-	}
-
-	public static URLConnection getHTTPConnection(String urlString) throws Exception {
-		final URL url = new URL(urlString);
-		return url.openConnection();
-	}
-
-	public static URL getUrl(String urlString) throws Exception  {
-		if(urlString.toLowerCase().contains("https")){
-			return getHTTPSUrl(urlString);
-		}else if (urlString.toLowerCase().contains("http")) {
-			return getURL(urlString);
-		}
-		throw new Exception("Invalid input argument url: " + urlString);
-	}
-	
-	public static URL getURL(String urlString) throws MalformedURLException {
-		return new URL(urlString);
-	}
-	
-	public static URL getHTTPSUrl(String urlString) throws MalformedURLException, NoSuchAlgorithmException, KeyManagementException  {
-    	// Create a trust manager that does not validate certificate chains   
-        final TrustManager[] trustAllCerts = new TrustManager[] {new TrustAllX509TrustManager()};
-        // Install the all-trusting trust manager   
-        final SSLContext sc = SSLContext.getInstance("SSL");   
-        sc.init(null, trustAllCerts, new java.security.SecureRandom());   
-        HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());   
-        // Create all-trusting host name verifier   
-        final HostnameVerifier allHostsValid = new HostnameVerifier() {   
-            public boolean verify(String hostname, SSLSession session) {   
-                return true;   
-            }   
-        };
-        HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
-        return new URL(urlString);
-	}
-
-	public static URLConnection getHTTPSConnection(String urlString) throws IOException, KeyManagementException, NoSuchAlgorithmException  {
-       	final URL url = getHTTPSUrl(urlString);
-       	return url.openConnection();
-	}
-	
-	public static class TrustAllX509TrustManager implements X509TrustManager {
-		@Override
-		public void checkClientTrusted(
-				java.security.cert.X509Certificate[] chain, String authType)
-				throws CertificateException {
-		}
-
-		@Override
-		public void checkServerTrusted(
-				java.security.cert.X509Certificate[] chain, String authType)
-				throws CertificateException {
-		}
-
-		@Override
-		public java.security.cert.X509Certificate[] getAcceptedIssuers() {
-			return null;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/App.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/App.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/App.java
deleted file mode 100644
index 85a717d..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/App.java
+++ /dev/null
@@ -1,145 +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.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class App {
-	private String id;
-	private String user;
-	private String name;
-	private String queue;
-	private String state;
-	private String finalStatus;
-	private double progress;
-	private String trackingUI;
-	private String trackingUrl;
-	private String diagnostics;
-	private String clusterId;
-	private String applicationType;
-	private long startedTime;
-	private long finishedTime;
-	private long elapsedTime;
-	private String amContainerLogs;
-	private String amHostHttpAddress;
-	
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public String getUser() {
-		return user;
-	}
-	public void setUser(String user) {
-		this.user = user;
-	}
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getQueue() {
-		return queue;
-	}
-	public void setQueue(String queue) {
-		this.queue = queue;
-	}
-	public String getState() {
-		return state;
-	}
-	public void setState(String state) {
-		this.state = state;
-	}
-	public String getFinalStatus() {
-		return finalStatus;
-	}
-	public void setFinalStatus(String finalStatus) {
-		this.finalStatus = finalStatus;
-	}
-	public double getProgress() {
-		return progress;
-	}
-	public void setProgress(double progress) {
-		this.progress = progress;
-	}
-	public String getTrackingUI() {
-		return trackingUI;
-	}
-	public void setTrackingUI(String trackingUI) {
-		this.trackingUI = trackingUI;
-	}
-	public String getTrackingUrl() {
-		return trackingUrl;
-	}
-	public void setTrackingUrl(String trackingUrl) {
-		this.trackingUrl = trackingUrl;
-	}
-	public String getDiagnostics() {
-		return diagnostics;
-	}
-	public void setDiagnostics(String diagnostics) {
-		this.diagnostics = diagnostics;
-	}
-	public String getClusterId() {
-		return clusterId;
-	}
-	public void setClusterId(String clusterId) {
-		this.clusterId = clusterId;
-	}
-	public String getApplicationType() {
-		return applicationType;
-	}
-	public void setApplicationType(String applicationType) {
-		this.applicationType = applicationType;
-	}
-	public long getStartedTime() {
-		return startedTime;
-	}
-	public void setStartedTime(long startedTime) {
-		this.startedTime = startedTime;
-	}
-	public long getFinishedTime() {
-		return finishedTime;
-	}
-	public void setFinishedTime(long finishedTime) {
-		this.finishedTime = finishedTime;
-	}
-	public long getElapsedTime() {
-		return elapsedTime;
-	}
-	public void setElapsedTime(long elapsedTime) {
-		this.elapsedTime = elapsedTime;
-	}
-	public String getAmContainerLogs() {
-		return amContainerLogs;
-	}
-	public void setAmContainerLogs(String amContainerLogs) {
-		this.amContainerLogs = amContainerLogs;
-	}
-	public String getAmHostHttpAddress() {
-		return amHostHttpAddress;
-	}
-	public void setAmHostHttpAddress(String amHostHttpAddress) {
-		this.amHostHttpAddress = amHostHttpAddress;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppInfo.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppInfo.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppInfo.java
deleted file mode 100644
index d1a4407..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppInfo.java
+++ /dev/null
@@ -1,146 +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.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class AppInfo {
-	String id;
-	String user;
-	String name;
-	String queue;
-	String state;
-	String finalStatus;
-	double progress;
-	String trackingUI;
-	String trackingUrl;
-	String diagnostics;
-	String clusterId;
-	String applicationType;
-	long startedTime;
-	long finishedTime;
-	long elapsedTime;
-	String amContainerLogs;
-	String amHostHttpAddress;
-	
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public String getUser() {
-		return user;
-	}
-	public void setUser(String user) {
-		this.user = user;
-	}
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getQueue() {
-		return queue;
-	}
-	public void setQueue(String queue) {
-		this.queue = queue;
-	}
-	public String getState() {
-		return state;
-	}
-	public void setState(String state) {
-		this.state = state;
-	}
-	public String getFinalStatus() {
-		return finalStatus;
-	}
-	public void setFinalStatus(String finalStatus) {
-		this.finalStatus = finalStatus;
-	}
-	public double getProgress() {
-		return progress;
-	}
-	public void setProgress(double progress) {
-		this.progress = progress;
-	}
-	public String getTrackingUI() {
-		return trackingUI;
-	}
-	public void setTrackingUI(String trackingUI) {
-		this.trackingUI = trackingUI;
-	}
-	public String getTrackingUrl() {
-		return trackingUrl;
-	}
-	public void setTrackingUrl(String trackingUrl) {
-		this.trackingUrl = trackingUrl;
-	}
-	public String getDiagnostics() {
-		return diagnostics;
-	}
-	public void setDiagnostics(String diagnostics) {
-		this.diagnostics = diagnostics;
-	}
-	public String getClusterId() {
-		return clusterId;
-	}
-	public void setClusterId(String clusterId) {
-		this.clusterId = clusterId;
-	}
-	public String getApplicationType() {
-		return applicationType;
-	}
-	public void setApplicationType(String applicationType) {
-		this.applicationType = applicationType;
-	}
-	public long getStartedTime() {
-		return startedTime;
-	}
-	public void setStartedTime(long startedTime) {
-		this.startedTime = startedTime;
-	}
-	public long getFinishedTime() {
-		return finishedTime;
-	}
-	public void setFinishedTime(long finishedTime) {
-		this.finishedTime = finishedTime;
-	}
-	public long getElapsedTime() {
-		return elapsedTime;
-	}
-	public void setElapsedTime(long elapsedTime) {
-		this.elapsedTime = elapsedTime;
-	}
-	public String getAmContainerLogs() {
-		return amContainerLogs;
-	}
-	public void setAmContainerLogs(String amContainerLogs) {
-		this.amContainerLogs = amContainerLogs;
-	}
-	public String getAmHostHttpAddress() {
-		return amHostHttpAddress;
-	}
-	public void setAmHostHttpAddress(String amHostHttpAddress) {
-		this.amHostHttpAddress = amHostHttpAddress;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppWrapper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppWrapper.java
deleted file mode 100644
index 1f807d1..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppWrapper.java
+++ /dev/null
@@ -1,35 +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.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class AppWrapper {
-
-	private AppInfo app;
-
-	public AppInfo getApp() {
-		return app;
-	}
-
-	public void setApp(AppInfo app) {
-		this.app = app;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Applications.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Applications.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Applications.java
deleted file mode 100644
index b76ee6b..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Applications.java
+++ /dev/null
@@ -1,38 +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.jobrunning.yarn.model;
-
-import java.util.List;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class Applications {
-
-	private List<AppInfo> app;
-
-	public List<AppInfo> getApp() {
-		return app;
-	}
-
-	public void setApp(List<AppInfo> app) {
-		this.app = app;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppsWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppsWrapper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppsWrapper.java
deleted file mode 100644
index 79abd29..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/AppsWrapper.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class AppsWrapper {
-	
-	private Applications apps;
-
-	public Applications getApps() {
-		return apps;
-	}
-
-	public void setApps(Applications apps) {
-		this.apps = apps;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Counter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Counter.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Counter.java
deleted file mode 100644
index afc487e..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Counter.java
+++ /dev/null
@@ -1,51 +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.jobrunning.yarn.model;
-
-public class Counter {
-
-	private String name;
-	private long totalCounterValue;
-	private long mapCounterValue;
-	private long reduceCounterValue;
-	
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public long getTotalCounterValue() {
-		return totalCounterValue;
-	}
-	public void setTotalCounterValue(long totalCounterValue) {
-		this.totalCounterValue = totalCounterValue;
-	}
-	public long getMapCounterValue() {
-		return mapCounterValue;
-	}
-	public void setMapCounterValue(long mapCounterValue) {
-		this.mapCounterValue = mapCounterValue;
-	}
-	public long getReduceCounterValue() {
-		return reduceCounterValue;
-	}
-	public void setReduceCounterValue(long reduceCounterValue) {
-		this.reduceCounterValue = reduceCounterValue;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/CounterGroup.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/CounterGroup.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/CounterGroup.java
deleted file mode 100644
index 22e498c..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/CounterGroup.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.jobrunning.yarn.model;
-
-import java.util.List;
-
-public class CounterGroup {
-
-	private String counterGroupName;
-	private List<Counter> counter;
-	
-	public String getCounterGroupName() {
-		return counterGroupName;
-	}
-	public void setCounterGroupName(String counterGroupName) {
-		this.counterGroupName = counterGroupName;
-	}
-	public List<Counter> getCounter() {
-		return counter;
-	}
-	public void setCounter(List<Counter> counter) {
-		this.counter = counter;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCompleteWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCompleteWrapper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCompleteWrapper.java
deleted file mode 100644
index 124dc65..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCompleteWrapper.java
+++ /dev/null
@@ -1,34 +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.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class JobCompleteWrapper {
-	private App app;
-
-	public App getApp() {
-		return app;
-	}
-
-	public void setApp(App app) {
-		this.app = app;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCounters.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCounters.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCounters.java
deleted file mode 100644
index 76b722c..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCounters.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.jobrunning.yarn.model;
-
-import java.util.List;
-
-public class JobCounters {
-
-	private String id;
-	private List<CounterGroup> counterGroup;
-	
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public List<CounterGroup> getCounterGroup() {
-		return counterGroup;
-	}
-	public void setCounterGroup(List<CounterGroup> counterGroup) {
-		this.counterGroup = counterGroup;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCountersWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCountersWrapper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCountersWrapper.java
deleted file mode 100644
index f3bb136..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobCountersWrapper.java
+++ /dev/null
@@ -1,32 +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.jobrunning.yarn.model;
-
-
-public class JobCountersWrapper {
-
-	private JobCounters jobCounters;
-
-	public JobCounters getJobCounters() {
-		return jobCounters;
-	}
-
-	public void setJobCounters(JobCounters jobCounters) {
-		this.jobCounters = jobCounters;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobDetailInfo.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobDetailInfo.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobDetailInfo.java
deleted file mode 100644
index cf2fa1f..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobDetailInfo.java
+++ /dev/null
@@ -1,243 +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.jobrunning.yarn.model;
-
-import org.apache.eagle.jobrunning.counter.JobCounters;
-
-public class JobDetailInfo {
-
-	private long startTime;
-	private long finishTime;
-	private long elapsedTime;
-	private String id;
-	private String name;
-	private String user;
-	private String state;
-	private int mapsTotal;
-	private int mapsCompleted;
-	private int reducesTotal;
-	private int reducesCompleted;
-	private double mapProgress;
-	private double reduceProgress;
-	private int mapsPending;
-	private int mapsRunning;
-	private int reducesPending;
-	private int reducesRunning;
-	private boolean uberized;
-	private String diagnostics;
-	private int newReduceAttempts;
-	private int runningReduceAttempts;
-	private int failedReduceAttempts;
-	private int killedReduceAttempts;
-	private int successfulReduceAttempts;
-	private int newMapAttempts;
-	private int runningMapAttempts;
-	private int failedMapAttempts;
-	private int killedMapAttempts;
-	private int successfulMapAttempts;
-	private String queue;
-	private org.apache.eagle.jobrunning.counter.JobCounters jobcounter;
-	
-	public long getStartTime() {
-		return startTime;
-	}
-	public void setStartTime(long startTime) {
-		this.startTime = startTime;
-	}
-	public long getFinishTime() {
-		return finishTime;
-	}
-	public void setFinishTime(long finishTime) {
-		this.finishTime = finishTime;
-	}
-	public long getElapsedTime() {
-		return elapsedTime;
-	}
-	public void setElapsedTime(long elapsedTime) {
-		this.elapsedTime = elapsedTime;
-	}
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getUser() {
-		return user;
-	}
-	public void setUser(String user) {
-		this.user = user;
-	}
-	public String getState() {
-		return state;
-	}
-	public void setState(String state) {
-		this.state = state;
-	}
-	public int getMapsTotal() {
-		return mapsTotal;
-	}
-	public void setMapsTotal(int mapsTotal) {
-		this.mapsTotal = mapsTotal;
-	}
-	public int getMapsCompleted() {
-		return mapsCompleted;
-	}
-	public void setMapsCompleted(int mapsCompleted) {
-		this.mapsCompleted = mapsCompleted;
-	}
-	public int getReducesTotal() {
-		return reducesTotal;
-	}
-	public void setReducesTotal(int reducesTotal) {
-		this.reducesTotal = reducesTotal;
-	}
-	public int getReducesCompleted() {
-		return reducesCompleted;
-	}
-	public void setReducesCompleted(int reducesCompleted) {
-		this.reducesCompleted = reducesCompleted;
-	}
-	public double getMapProgress() {
-		return mapProgress;
-	}
-	public void setMapProgress(double mapProgress) {
-		this.mapProgress = mapProgress;
-	}
-	public double getReduceProgress() {
-		return reduceProgress;
-	}
-	public void setReduceProgress(double reduceProgress) {
-		this.reduceProgress = reduceProgress;
-	}
-	public int getMapsPending() {
-		return mapsPending;
-	}
-	public void setMapsPending(int mapsPending) {
-		this.mapsPending = mapsPending;
-	}
-	public int getMapsRunning() {
-		return mapsRunning;
-	}
-	public void setMapsRunning(int mapsRunning) {
-		this.mapsRunning = mapsRunning;
-	}
-	public int getReducesPending() {
-		return reducesPending;
-	}
-	public void setReducesPending(int reducesPending) {
-		this.reducesPending = reducesPending;
-	}
-	public int getReducesRunning() {
-		return reducesRunning;
-	}
-	public void setReducesRunning(int reducesRunning) {
-		this.reducesRunning = reducesRunning;
-	}
-	public boolean isUberized() {
-		return uberized;
-	}
-	public void setUberized(boolean uberized) {
-		this.uberized = uberized;
-	}
-	public String getDiagnostics() {
-		return diagnostics;
-	}
-	public void setDiagnostics(String diagnostics) {
-		this.diagnostics = diagnostics;
-	}
-	public int getNewReduceAttempts() {
-		return newReduceAttempts;
-	}
-	public void setNewReduceAttempts(int newReduceAttempts) {
-		this.newReduceAttempts = newReduceAttempts;
-	}
-	public int getRunningReduceAttempts() {
-		return runningReduceAttempts;
-	}
-	public void setRunningReduceAttempts(int runningReduceAttempts) {
-		this.runningReduceAttempts = runningReduceAttempts;
-	}
-	public int getFailedReduceAttempts() {
-		return failedReduceAttempts;
-	}
-	public void setFailedReduceAttempts(int failedReduceAttempts) {
-		this.failedReduceAttempts = failedReduceAttempts;
-	}
-	public int getKilledReduceAttempts() {
-		return killedReduceAttempts;
-	}
-	public void setKilledReduceAttempts(int killedReduceAttempts) {
-		this.killedReduceAttempts = killedReduceAttempts;
-	}
-	public int getSuccessfulReduceAttempts() {
-		return successfulReduceAttempts;
-	}
-	public void setSuccessfulReduceAttempts(int successfulReduceAttempts) {
-		this.successfulReduceAttempts = successfulReduceAttempts;
-	}
-	public int getNewMapAttempts() {
-		return newMapAttempts;
-	}
-	public void setNewMapAttempts(int newMapAttempts) {
-		this.newMapAttempts = newMapAttempts;
-	}
-	public int getRunningMapAttempts() {
-		return runningMapAttempts;
-	}
-	public void setRunningMapAttempts(int runningMapAttempts) {
-		this.runningMapAttempts = runningMapAttempts;
-	}
-	public int getFailedMapAttempts() {
-		return failedMapAttempts;
-	}
-	public void setFailedMapAttempts(int failedMapAttempts) {
-		this.failedMapAttempts = failedMapAttempts;
-	}
-	public int getKilledMapAttempts() {
-		return killedMapAttempts;
-	}
-	public void setKilledMapAttempts(int killedMapAttempts) {
-		this.killedMapAttempts = killedMapAttempts;
-	}
-	public int getSuccessfulMapAttempts() {
-		return successfulMapAttempts;
-	}
-	public void setSuccessfulMapAttempts(int successfulMapAttempts) {
-		this.successfulMapAttempts = successfulMapAttempts;
-	}
-	public String getQueue() {
-		return queue;
-	}
-	public void setQueue(String queue) {
-		this.queue = queue;
-	}
-	public JobCounters getJobcounter() {
-		return jobcounter;
-	}
-	public void setJobcounter(JobCounters jobcounter) {
-		this.jobcounter = jobcounter;
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Jobs.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Jobs.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Jobs.java
deleted file mode 100644
index a9637f7..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/Jobs.java
+++ /dev/null
@@ -1,38 +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.jobrunning.yarn.model;
-
-import java.util.List;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class Jobs {
-
-	private List<JobDetailInfo> job;
-
-	public List<JobDetailInfo> getJob() {
-		return job;
-	}
-
-	public void setJob(List<JobDetailInfo> job) {
-		this.job = job;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobsWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobsWrapper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobsWrapper.java
deleted file mode 100644
index c139ccf..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/yarn/model/JobsWrapper.java
+++ /dev/null
@@ -1,37 +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.jobrunning.yarn.model;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class JobsWrapper {
-
-	private Jobs jobs;
-
-	public Jobs getJobs() {
-		return jobs;
-	}
-
-	public void setJobs(Jobs jobs) {
-		this.jobs = jobs;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateLCM.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateLCM.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateLCM.java
deleted file mode 100644
index 6af2a19..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateLCM.java
+++ /dev/null
@@ -1,35 +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.jobrunning.zkres;
-
-import java.util.List;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public interface JobRunningZKStateLCM {
-	
-	List<String> readProcessedJobs(JobConstants.ResourceType type);
-	
-	void addProcessedJob(JobConstants.ResourceType type, String jobID);
-
-	// date format e.g. "20150901"
-	void truncateJobBefore(JobConstants.ResourceType type, String date);
-		
-	void truncateProcessedJob(JobConstants.ResourceType type, String jobID);
-	
-	void truncateEverything();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateManager.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateManager.java
deleted file mode 100644
index 41da60a..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/zkres/JobRunningZKStateManager.java
+++ /dev/null
@@ -1,210 +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.jobrunning.zkres;
-
-import java.nio.charset.StandardCharsets;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.framework.recipes.locks.InterProcessMutex;
-import org.apache.curator.retry.RetryNTimes;
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig;
-import org.apache.zookeeper.CreateMode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-public class JobRunningZKStateManager implements JobRunningZKStateLCM{
-	public static final Logger LOG = LoggerFactory.getLogger(JobRunningZKStateManager.class);
-	private String zkRoot;
-	private CuratorFramework _curator;
-	
-	public static final String DATE_FORMAT_PATTERN = "yyyyMMdd";
-	
-	private CuratorFramework newCurator(RunningJobCrawlConfig config) throws Exception {
-        return CuratorFrameworkFactory.newClient(
-        	config.zkStateConfig.zkQuorum,
-            config.zkStateConfig.zkSessionTimeoutMs,
-            15000,
-            new RetryNTimes(config.zkStateConfig.zkRetryTimes, config.zkStateConfig.zkRetryInterval)
-        );
-    }
-	  
-	public JobRunningZKStateManager(RunningJobCrawlConfig config) {
-		this.zkRoot = config.zkStateConfig.zkRoot;
-        try {
-            _curator = newCurator(config);
-            _curator.start();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-	
-	public void close() {
-        _curator.close();
-        _curator = null;
-    }
-	
-	public long getTimestampFromDate(String dateStr) throws ParseException {
-		SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_PATTERN);
-        sdf.setTimeZone(EagleConfigFactory.load().getTimeZone());
-		Date d = sdf.parse(dateStr);
-		return d.getTime();
-	}
-	
-	@Override
-	public List<String> readProcessedJobs(JobConstants.ResourceType type) {
-		String path = zkRoot + "/" + type.name() + "/jobs";
-		InterProcessMutex lock = new InterProcessMutex(_curator, path);
-		try {
-			lock.acquire();
-            if (_curator.checkExists().forPath(path) != null) {
-            	LOG.info("Got processed job list from zk, type: " + type.name());
-            	return _curator.getChildren().forPath(path);
-            } else {
-            	LOG.info("Currently processed job list is empty, type: " + type.name());
-                return new ArrayList<String>();
-            }
-        } catch (Exception e) {
-        	LOG.error("fail read processed jobs", e);
-            throw new RuntimeException(e);
-        }
-		finally {
-        	try{
-        		lock.release();
-        	}catch(Exception e){
-        		LOG.error("fail releasing lock", e);
-        		throw new RuntimeException(e);
-        	}
-		}
-	}
-
-	@Override
-	public void addProcessedJob(JobConstants.ResourceType type, String jobID) {
-		String path = zkRoot + "/" + type.name() + "/jobs/" + jobID;
-		try {
-			//we record date for cleanup, e.g. cleanup job's znodes whose created date < 20150801
-			String date = DateTimeUtil.format(System.currentTimeMillis(), DATE_FORMAT_PATTERN);
-			LOG.info("add processed job, jobID: " + jobID + ", type: " + type + ", date: " + date);
-            if (_curator.checkExists().forPath(path) == null) {
-                _curator.create()
-                        .creatingParentsIfNeeded()
-                        .withMode(CreateMode.PERSISTENT)
-                        .forPath(path, date.getBytes(StandardCharsets.UTF_8));
-            }
-            else {
-                LOG.warn("Job already exist in zk, skip the job: " + jobID + " , type: " + type);
-            }
-        } catch (Exception e) {
-        	LOG.error("fail adding processed jobs", e);
-            throw new RuntimeException(e);
-        }
-	}
-
-	@Override
-	public void truncateJobBefore(JobConstants.ResourceType type, String date) {
-		String path = zkRoot + "/" + type.name() + "/jobs";
-		InterProcessMutex lock = new InterProcessMutex(_curator, path);
-		try {
-			lock.acquire();
-    		long thresholdTime = getTimestampFromDate(date);
-            if (_curator.checkExists().forPath(path) != null) {
-    			LOG.info("Going to delete processed job before " + date + ", type: " + type);
-            	List<String> jobIDList = _curator.getChildren().forPath(path);
-            	for(String jobID : jobIDList) {
-            		if (!jobID.startsWith("job_")) continue; // skip lock node
-            		String jobPath = path + "/" + jobID;
-            		long createTime = getTimestampFromDate(new String(_curator.getData().forPath(jobPath), StandardCharsets.UTF_8));
-            		if (createTime < thresholdTime) {
-            			LOG.info("Going to truncate job: " + jobPath);
-        				_curator.delete().deletingChildrenIfNeeded().forPath(jobPath);
-            		}
-            	}
-            }
-            else {
-            	LOG.info("Currently processed job list is empty, type: " + type.name());                
-            }
-        } catch (Exception e) {
-        	LOG.error("fail deleting processed jobs", e);
-            throw new RuntimeException(e);
-        }
-		finally {
-        	try{
-        		lock.release();
-        	}catch(Exception e){
-        		LOG.error("fail releasing lock", e);
-        		throw new RuntimeException(e);
-        	}
-		}
-	}
-	
-	@Override
-	public void truncateProcessedJob(JobConstants.ResourceType type, String jobID) {
-		LOG.info("trying to truncate all data for job " + jobID);
-		String path = zkRoot + "/" + type.name() + "/jobs/" + jobID;
-		InterProcessMutex lock = new InterProcessMutex(_curator, path);
-		try {
-			lock.acquire();
-            if (_curator.checkExists().forPath(path) != null) {
-                _curator.delete().deletingChildrenIfNeeded().forPath(path);
-                LOG.info("really truncated all data for jobID: " + jobID);
-            }
-        } catch (Exception e) {
-        	LOG.error("fail truncating processed jobs", e);
-    		throw new RuntimeException(e);
-        }
-		finally {
-        	try{
-        		lock.release();
-        	}catch(Exception e){
-        		LOG.error("fail releasing lock", e);
-        		throw new RuntimeException(e);
-        	}
-		}
-	}
-
-	@Override
-	public void truncateEverything() {
-		String path = zkRoot;
-		InterProcessMutex lock = new InterProcessMutex(_curator, path);
-		try{
-			lock.acquire();
-			if(_curator.checkExists().forPath(path) != null){
-				_curator.delete().deletingChildrenIfNeeded().forPath(path);
-			}
-		}catch(Exception ex){
-			LOG.error("fail truncating verything", ex);
-			throw new RuntimeException(ex);
-		}
-		finally {
-        	try{
-        		lock.release();
-        	}catch(Exception e){
-        		LOG.error("fail releasing lock", e);
-        		throw new RuntimeException(e);
-        	}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/resources/log4j.properties b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/resources/log4j.properties
deleted file mode 100644
index 71a5dac..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, DRFA, stdout
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-# 30-day backup
-#log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/hive-jobrunning.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/hive-jobrunning.conf b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/hive-jobrunning.conf
deleted file mode 100644
index 63ce446..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/hive-jobrunning.conf
+++ /dev/null
@@ -1,54 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "hiveQueryRunningTopology",
-    "stormConfigFile" : "hive.storm.yaml",
-    "parallelismConfig" : {
-      "msgConsumer" : 2
-    }
-  },
-  "dataSourceConfig": {
-    "flavor" : "stormrunning",
-    "zkQuorum" : "localhost:12181",
-    "zkRoot" : "/jobrunning",
-    "zkSessionTimeoutMs" : 15000,
-    "zkRetryTimes" : 3,
-    "zkRetryInterval" : 2000,    
-    "RMEndPoints" : "http://localhost:8088/",
-    "partitionerCls" : "org.apache.eagle.job.DefaultJobPartitionerImpl"
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": "9099",
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000,
-    "ignoreDeleteFromSource" : true
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/log4j.properties b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/log4j.properties
deleted file mode 100644
index 71a5dac..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, DRFA, stdout
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-# 30-day backup
-#log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/README.md
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/README.md b/eagle-core/eagle-data-process/eagle-stream-pipeline/README.md
deleted file mode 100644
index d44d156..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-Eagle Declarative Streaming DSL
-===============================
-
-DSL Format
-----------
-
-	{
-		config {
-		  config.key = configValue
-		}
-
-		schema {
-		  metricStreamSchema {
-		    metric: string
-		    value: double
-		    timestamp: long
-		  }
-		}
-
-		dataflow {
-		  kafkaSource.source1 {
-		    schema = "metricStreamSchema"
-		  }
-		  kafkaSource.source2 {
-		    schema = {
-		      metric: string
-		      value: double
-		      timestamp: long
-		    }
-		  }
-		}
-	}
-
-Usage
------
-
-	val pipeline = Pipeline.parseResource("pipeline.conf")
-	val stream = Pipeline.compile(pipeline)
-	stream.submit[storm]
-
-Features
---------
-* [x] Compile DSL Configure to Pipeline model
-* [x] Compile Pipeline model to Stream Execution Graph
-* [x] Submit Stream Execution Graph to actual running environment say storm
-* [x] Support Alert and Persistence for metric monitoring
-* [ ] Extensible stream module management and automatically scan and register module
-* [x] Pipeline runner CLI tool and shell script
-* [ ] Decouple pipeline compiler and scheduler into individual modules
-* [ ] Stream Pipeline Scheduler
-* [ ] Graph editor to define streaming graph in UI
-* [?] JSON/Config & Scala Case Class Mapping (https://github.com/scala/pickling)
-* [?] Raw message structure oriented programing is a little ugly, we should define a generic message/event consist of [payload:stream/timestamp/serializer/deserializer,data:message]
-* [ ] Provide stream schema inline and send to metadata when submitting
-* [ ] UI should support specify executorId when defining new stream
-* [ ] Lack of a entity named StreamEntity for the workflow of defining topology&policy end-to-end
-* [!] Fix configuration conflict, should pass through Config instead of ConfigFactory.load() manually
-* [ ] Override application configuration with pipeline configuration
-* [ ] Refactor schema registration structure and automatically submit stream schema when submitting pipeline
-* [ ] Submit alertStream, alertExecutorId mapping to AlertExecutorService when submitting pipeline
-* [x] Supports `inputs` field to define connector
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml b/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
deleted file mode 100644
index 0dc9acc..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/pom.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-data-process-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>eagle-stream-pipeline</artifactId>
-    <dependencies>
-        <!--<dependency>-->
-            <!--<groupId>org.reflections</groupId>-->
-            <!--<artifactId>reflections</artifactId>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-service-base</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.ow2.asm</groupId>
-                    <artifactId>asm-all</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm-all</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm-commons</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm-tree</artifactId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>servlet-api</artifactId>
-                    <groupId>javax.servlet</groupId>
-                </exclusion>
-                <exclusion>
-                    <artifactId>slf4j-log4j12</artifactId>
-                    <groupId>org.slf4j</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-	<dependency>
-       		<groupId>log4j</groupId>
-		<artifactId>log4j</artifactId>
-      	</dependency>
-<!--        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
--->
-        <!--<dependency>-->
-            <!--<groupId>org.scala-lang</groupId>-->
-            <!--<artifactId>scala-reflect</artifactId>-->
-        <!--</dependency>-->
-        <!--<dependency>-->
-            <!--<groupId>org.scala-lang</groupId>-->
-            <!--<artifactId>scala-compiler</artifactId>-->
-            <!--<version>${scala.version}.0</version>-->
-        <!--</dependency>-->
-        <dependency>
-            <groupId>org.scalatest</groupId>
-            <artifactId>scalatest_${scala.version}</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>com.typesafe.akka</groupId>-->
-            <!--<artifactId>akka-testkit_${scala.version}</artifactId>-->
-            <!--<version>${akka.actor.version}</version>-->
-            <!--<scope>test</scope>-->
-        <!--</dependency>-->
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>scala-test-compile</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.scalatest</groupId>
-                <artifactId>scalatest-maven-plugin</artifactId>
-                <configuration>
-                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
-                    <junitxml>.</junitxml>
-                    <filereports>TestSuite.txt</filereports>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>test</id>
-                        <goals>
-                            <goal>test</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/Pipeline.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/Pipeline.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/Pipeline.scala
deleted file mode 100644
index 65ab390..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/Pipeline.scala
+++ /dev/null
@@ -1,27 +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.stream.pipeline
-
-
-import org.apache.eagle.stream.pipeline.compiler.PipelineCompiler
-import org.apache.eagle.stream.pipeline.parser.PipelineParser
-import org.apache.eagle.stream.pipeline.runner.PipelineRunner
-
-object Pipeline
-  extends PipelineRunner
-  with PipelineParser
-  with PipelineCompiler
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/annotation/Extension.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/annotation/Extension.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/annotation/Extension.scala
deleted file mode 100644
index 2ff81d4..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/annotation/Extension.scala
+++ /dev/null
@@ -1,21 +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.stream.pipeline.annotation
-
-import scala.annotation.StaticAnnotation
-
-case class Extension(extType:String) extends StaticAnnotation
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/compiler/PipelineCompiler.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/compiler/PipelineCompiler.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/compiler/PipelineCompiler.scala
deleted file mode 100644
index df8bbe5..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/compiler/PipelineCompiler.scala
+++ /dev/null
@@ -1,61 +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.stream.pipeline.compiler
-
-
-import org.apache.eagle.datastream.core._
-import org.apache.eagle.stream.pipeline.extension.ModuleManager._
-import org.apache.eagle.stream.pipeline.parser._
-import org.apache.eagle.stream.pipeline.utils.CompileException
-
-trait PipelineCompiler {
-  def compile(pipeline:Pipeline):StreamContext = {
-    val context = new StreamContext(pipeline.config)
-    val dataflow = pipeline.dataflow
-    val dag = new StreamDAG(context.dag)
-    dataflow.getProcessors.map(buildStreamProducer(dag,_)).foreach(producer =>{
-      producer.initWith(dag.graph,pipeline.config)
-      dag.addVertex(producer)
-    })
-    dataflow.getConnectors.foreach(connector =>{
-      val from = dag.getNodeByName(connector.from).get
-      val to = dag.getNodeByName(connector.to).get
-      dag.addEdge(from,to,buildStreamConnector(from,to,dataflow,connector))
-    })
-    context
-  }
-  private def  buildStreamProducer(dag:StreamDAG,processor:Processor):StreamProducer[Any] = {
-    if(findModuleType(processor.getType)){
-      getModuleMapperByType(processor.getType).map(processor).nameAs(processor.getId).stream(processor.streamId)
-    } else {
-      throw new CompileException(s"Unknown processor type [${processor.getType}]")
-    }
-  }
-  private def buildStreamConnector(from:StreamProducer[Any],to:StreamProducer[Any],dataflow:DataFlow,connector:Connector):StreamConnector[Any,Any]={
-    var groupByIndexes:Seq[Int] = connector.groupByIndexes.orNull
-    if(groupByIndexes!=null ){
-      if(connector.groupByFields.isDefined) throw new CompileException(s"Both ${Connector.GROUP_BY_FIELD_FIELD} and ${Connector.GROUP_BY_INDEX_FIELD} is defined at same time")
-    } else if(connector.groupByFields.isDefined){
-      groupByIndexes = connector.groupByFields.get.map(dataflow.getProcessor(from.name).get.getSchema.get.indexOfAttribute)
-    }
-    if(groupByIndexes == null){
-      ShuffleConnector(from,to)
-    } else {
-      GroupbyFieldsConnector(from,to,groupByIndexes)
-    }
-  }
-}
\ No newline at end of file


[16/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/QueryConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/QueryConstants.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/QueryConstants.java
deleted file mode 100644
index 231cc99..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/QueryConstants.java
+++ /dev/null
@@ -1,24 +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.query;
-
-/**
- * @since 3/25/15
- */
-public class QueryConstants {
-    public final static String CHARSET ="UTF-8";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntity.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntity.java
deleted file mode 100644
index 1f3214f..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntity.java
+++ /dev/null
@@ -1,69 +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.query.aggregate;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class AggregateAPIEntity {
-	private long numDirectDescendants;
-	private long numTotalDescendants;
-	private String key;
-	private SortedMap<String, AggregateAPIEntity> entityList = new TreeMap<String, AggregateAPIEntity>();
-	private List<AggregateAPIEntity> sortedList = new ArrayList<AggregateAPIEntity>();
-
-	public String getKey() {
-		return key;
-	}
-	public void setKey(String key) {
-		this.key = key;
-	}
-	@JsonProperty("sL")
-	public List<AggregateAPIEntity> getSortedList() {
-		return sortedList;
-	}
-	public void setSortedList(List<AggregateAPIEntity> sortedList) {
-		this.sortedList = sortedList;
-	}
-	@JsonProperty("eL")
-	public SortedMap<String, AggregateAPIEntity> getEntityList() {
-		return entityList;
-	}
-	public void setEntityList(SortedMap<String, AggregateAPIEntity> entityList) {
-		this.entityList = entityList;
-	}
-	@JsonProperty("nDD")
-	public long getNumDirectDescendants() {
-		return numDirectDescendants;
-	}
-	public void setNumDirectDescendants(long numDirectDescendants) {
-		this.numDirectDescendants = numDirectDescendants;
-	}
-	@JsonProperty("nTD")
-	public long getNumTotalDescendants() {
-		return numTotalDescendants;
-	}
-	public void setNumTotalDescendants(long numTotalDescendants) {
-		this.numTotalDescendants = numTotalDescendants;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntityFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntityFactory.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntityFactory.java
deleted file mode 100644
index 8e18b39..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateAPIEntityFactory.java
+++ /dev/null
@@ -1,21 +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.query.aggregate;
-
-public interface AggregateAPIEntityFactory {
-	public AggregateAPIEntity create();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateCondition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateCondition.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateCondition.java
deleted file mode 100755
index 5555cfd..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateCondition.java
+++ /dev/null
@@ -1,73 +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.query.aggregate;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- *
- * @since : 11/7/14,2014
- */
-public class AggregateCondition implements Serializable{
-	private static final long serialVersionUID = 1L;
-	private List<String> groupbyFields;
-	private List<AggregateFunctionType> aggregateFunctionTypes;
-	private List<String> aggregateFields;
-	private boolean timeSeries;
-	private long intervalMS;
-
-	public List<String> getGroupbyFields() {
-		return groupbyFields;
-	}
-
-	public void setGroupbyFields(List<String> groupbyFields) {
-		this.groupbyFields = groupbyFields;
-	}
-
-	public List<AggregateFunctionType> getAggregateFunctionTypes() {
-		return aggregateFunctionTypes;
-	}
-
-	public void setAggregateFunctionTypes(List<AggregateFunctionType> aggregateFunctionTypes) {
-		this.aggregateFunctionTypes = aggregateFunctionTypes;
-	}
-
-	public List<String> getAggregateFields() {
-		return aggregateFields;
-	}
-
-	public void setAggregateFields(List<String> aggregateFields) {
-		this.aggregateFields = aggregateFields;
-	}
-
-	public boolean isTimeSeries() {
-		return timeSeries;
-	}
-
-	public void setTimeSeries(boolean timeSeries) {
-		this.timeSeries = timeSeries;
-	}
-
-	public long getIntervalMS() {
-		return intervalMS;
-	}
-
-	public void setIntervalMS(long intervalMS) {
-		this.intervalMS = intervalMS;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionNotSupportedException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionNotSupportedException.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionNotSupportedException.java
deleted file mode 100644
index df35c8b..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionNotSupportedException.java
+++ /dev/null
@@ -1,28 +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.query.aggregate;
-
-public class AggregateFunctionNotSupportedException extends RuntimeException{
-	static final long serialVersionUID = -4548788354899625887L;
-	public AggregateFunctionNotSupportedException(){
-		super();
-	}
-	
-	public AggregateFunctionNotSupportedException(String message){
-		super(message);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionType.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionType.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionType.java
deleted file mode 100755
index 8ac3b8c..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionType.java
+++ /dev/null
@@ -1,85 +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.query.aggregate;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public enum AggregateFunctionType{
-	count("^(count)$"),
-	sum("^sum\\((.*)\\)$"),
-	avg("^avg\\((.*)\\)$"),
-	max("^max\\((.*)\\)$"),
-	min("^min\\((.*)\\)$");
-	
-	private Pattern pattern;
-	private AggregateFunctionType(String patternString){
-		this.pattern = Pattern.compile(patternString);
-	}
-
-	/**
-	 * This method is thread safe
-	 * match and retrieve back the aggregated fields, for count, aggregateFields can be null
-	 * @param function
-	 * @return
-	 */
-	public AggregateFunctionTypeMatcher matcher(String function){
-		Matcher m = pattern.matcher(function);
-
-		if(m.find()){
-			return new AggregateFunctionTypeMatcher(this, true, m.group(1));
-		}else{
-			return new AggregateFunctionTypeMatcher(this, false, null);
-		}
-	}
-
-	public static AggregateFunctionTypeMatcher matchAll(String function){
-		for(AggregateFunctionType type : values()){
-			Matcher m = type.pattern.matcher(function);
-			if(m.find()){
-				return new AggregateFunctionTypeMatcher(type, true, m.group(1));
-			}
-		}
-		return new AggregateFunctionTypeMatcher(null, false, null);
-	}
-
-	public static byte[] serialize(AggregateFunctionType type){
-		return type.name().getBytes();
-	}
-
-	public static AggregateFunctionType deserialize(byte[] type){
-		return valueOf(new String(type));
-	}
-
-	public static List<byte[]> toBytesList(List<AggregateFunctionType> types){
-		List<byte[]> result = new ArrayList<byte[]>();
-		for(AggregateFunctionType type:types){
-			result.add(serialize(type));
-		}
-		return result;
-	}
-
-	public static List<AggregateFunctionType> fromBytesList(List<byte[]> types){
-		List<AggregateFunctionType> result = new ArrayList<AggregateFunctionType>();
-		for(byte[] bs:types){
-			result.add(deserialize(bs));
-		}
-		return result;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionTypeMatcher.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionTypeMatcher.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionTypeMatcher.java
deleted file mode 100644
index 6b2bc13..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateFunctionTypeMatcher.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate;
-
-public class AggregateFunctionTypeMatcher {
-	private final AggregateFunctionType type;
-	private final boolean matched;
-	private final String field;
-
-	public AggregateFunctionTypeMatcher(AggregateFunctionType type, boolean matched, String field){
-		this.type = type;
-		this.matched = matched;
-		this.field = field;
-	}
-	
-	public boolean find(){
-		return this.matched;
-	}
-	
-	public String field(){
-		return this.field;
-	}
-	
-	public AggregateFunctionType type(){
-		return this.type;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParams.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParams.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParams.java
deleted file mode 100644
index 616184d..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParams.java
+++ /dev/null
@@ -1,77 +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.query.aggregate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class AggregateParams{
-	List<String> groupbyFields;
-	boolean counting;
-	List<String> sumFunctionFields = new ArrayList<String>();
-	List<SortFieldOrder> sortFieldOrders = new ArrayList<SortFieldOrder>();
-	
-	public List<SortFieldOrder> getSortFieldOrders() {
-		return sortFieldOrders;
-	}
-	public void setSortFieldOrders(List<SortFieldOrder> sortFieldOrders) {
-		this.sortFieldOrders = sortFieldOrders;
-	}
-	public List<String> getGroupbyFields() {
-		return groupbyFields;
-	}
-	public void setGroupbyFields(List<String> groupbyFields) {
-		this.groupbyFields = groupbyFields;
-	}
-	public boolean isCounting() {
-		return counting;
-	}
-	public void setCounting(boolean counting) {
-		this.counting = counting;
-	}
-	public List<String> getSumFunctionFields() {
-		return sumFunctionFields;
-	}
-	public void setSumFunctionFields(List<String> sumFunctionFields) {
-		this.sumFunctionFields = sumFunctionFields;
-	}
-
-	public static class SortFieldOrder{
-		public static final String SORT_BY_AGGREGATE_KEY = "key";
-		public static final String SORT_BY_COUNT = "count";
-		private String field;
-		private boolean ascendant;
-		
-		public SortFieldOrder(String field, boolean ascendant) {
-			super();
-			this.field = field;
-			this.ascendant = ascendant;
-		}
-		public String getField() {
-			return field;
-		}
-		public void setField(String field) {
-			this.field = field;
-		}
-		public boolean isAscendant() {
-			return ascendant;
-		}
-		public void setAscendant(boolean ascendant) {
-			this.ascendant = ascendant;
-		} 
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParamsValidator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParamsValidator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParamsValidator.java
deleted file mode 100644
index 9500574..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateParamsValidator.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class AggregateParamsValidator {
-	/**
-	 * This method handle the following sytle syntax
-	 * sum(numConfiguredMapSlots), count group by cluster, rack 
-	 * 1. ensure that all gb fields must occur in outputField or outputTag
-	 * 2. ensure that all summarized fields must occur in outputField, 
-	 *    for example, for function=sum(numConfiguredMapSlots), numConfiguredMapSlots must occur in outputField  
-	 * 3. groupby should be pre-appended with a root groupby field  
-	 * @param outputTags
-	 * @param outputFields
-	 * @param groupbys
-	 * @param functions
-	 * @throws IllegalArgumentException
-	 */
-	public static AggregateParams compileAggregateParams(List<String> outputTags, List<String> outputFields, List<String> groupbys, List<String> functions, List<String> sortFieldOrders)
-			throws IllegalArgumentException, AggregateFunctionNotSupportedException{
-		AggregateParams aggParams = new AggregateParams();
-		// ensure that all gb fields must occur in outputField or outputTag
-		for(String groupby : groupbys){
-			if(!outputTags.contains(groupby) && !outputFields.contains(groupby)){
-				throw new IllegalArgumentException(groupby + ", All gb fields should appear in outputField list or outputTag list");
-			}
-		}
-		
-		// parse functions and ensure that all summarized fields must occur in outputField
-		for(String function : functions){
-			AggregateFunctionTypeMatcher m = AggregateFunctionType.count.matcher(function);
-			if(m.find()){
-				aggParams.setCounting(true);
-				continue;
-			}
-
-			m = AggregateFunctionType.sum.matcher(function);
-			if(m.find()){
-				if(!outputFields.contains(m.field())){
-					throw new IllegalArgumentException(m.field() + ", All summary function fields should appear in outputField list");
-				}
-				aggParams.getSumFunctionFields().add(m.field());
-				continue;
-			}
-			
-			throw new AggregateFunctionNotSupportedException("function " + function + " is not supported, only count, sum aggregate functions are now supported");
-		}
-		
-		//  groupby should be pre-appended with a root groupby field
-		List<String> groupbyFields = new ArrayList<String>();
-		groupbyFields.add(Aggregator.GROUPBY_ROOT_FIELD_NAME);
-		groupbyFields.addAll(groupbys);
-		aggParams.setGroupbyFields(groupbyFields);
-
-		// check sort field orders
-		boolean byKeySorting = false;
-		for(String sortFieldOrder : sortFieldOrders){
-			AggregateParams.SortFieldOrder sfo = SortFieldOrderType.matchAll(sortFieldOrder);
-			if(sfo == null){
-				throw new IllegalArgumentException(sortFieldOrder + ", All sort field order should be <field>=(asc|desc)");
-			}
-			if(sfo.getField().equals(AggregateParams.SortFieldOrder.SORT_BY_AGGREGATE_KEY)){
-				byKeySorting =  true;
-			}else if(!sfo.getField().equals(AggregateParams.SortFieldOrder.SORT_BY_COUNT)){
-				if(!groupbys.contains(sfo.getField()) && !aggParams.getSumFunctionFields().contains(sfo.getField())){
-					throw new IllegalArgumentException(sortFieldOrder + ", All sort field order should appear in gb or function fields");
-				}
-			}
-			aggParams.getSortFieldOrders().add(sfo);
-		}
-		// always add key ascendant to the last aggregation key if not specified
-		if(!byKeySorting){
-			aggParams.getSortFieldOrders().add(new AggregateParams.SortFieldOrder(AggregateParams.SortFieldOrder.SORT_BY_AGGREGATE_KEY, true));
-		}
-		return aggParams;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateResultAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateResultAPIEntity.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateResultAPIEntity.java
deleted file mode 100644
index c1c87d3..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/AggregateResultAPIEntity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class AggregateResultAPIEntity {
-	private boolean success;
-	private String exception;
-	private long elapsedms;
-	private AggregateAPIEntity entity;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	public AggregateAPIEntity getEntity() {
-		return entity;
-	}
-	public void setEntity(AggregateAPIEntity entity) {
-		this.entity = entity;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/Aggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/Aggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/Aggregator.java
deleted file mode 100644
index de911e5..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/Aggregator.java
+++ /dev/null
@@ -1,168 +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.query.aggregate;
-
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class Aggregator {
-	private static final Logger LOG = LoggerFactory.getLogger(Aggregator.class);
-	public static final String GROUPBY_ROOT_FIELD_NAME = "site";
-	public static final String GROUPBY_ROOT_FIELD_VALUE = "xyz";
-	public static final String UNASSIGNED_GROUPBY_ROOT_FIELD_NAME = "unassigned";
-	
-	private final AggregateAPIEntityFactory factory;
-	private final AggregateAPIEntity root;
-	private final List<String> groupbys;
-	private final List<String> sumFunctionFields;
-	private final boolean counting;
-	
-	public Aggregator(AggregateAPIEntityFactory factory, AggregateAPIEntity root, List<String> groupbys, boolean counting, List<String> sumFunctionFields){
-		this.factory = factory;
-		this.root = root;
-		this.groupbys = groupbys;
-		this.sumFunctionFields = sumFunctionFields;
-		this.counting = counting;
-	}
-
-	/**
-	 * this locate result can be cached? we don't need check if it's TaggedLogAPIEntity each time when iterating entities
-	 * @param groupby
-	 * @param obj
-	 * @return
-	 * @throws Exception
-	 */
-	private String locateGroupbyField(String groupby, TaggedLogAPIEntity obj){
-		if(groupby.equals(GROUPBY_ROOT_FIELD_NAME)){
-			return GROUPBY_ROOT_FIELD_VALUE;
-		}
-		// check tag first
-		String tagv = obj.getTags().get(groupby);
-		if(tagv != null)
-			return tagv;
-		// check against pojo, or qualifierValues
-		String fn = groupby.substring(0,1).toUpperCase()+groupby.substring(1, groupby.length());
-		try{
-			Method getM = obj.getClass().getMethod("get"+fn);
-			Object value = getM.invoke(obj);
-			return (String)value;
-		}catch(Exception ex){
-			LOG.warn(groupby + " field is in neither tags nor fields, " + ex.getMessage());
-			return null;
-		}
-	}
-	
-	/**
-	 * accumulate a list of entities
-	 * @param entities
-	 * @throws Exception
-	 */
-	public void accumulateAll(List<TaggedLogAPIEntity> entities) throws Exception{
-		for(TaggedLogAPIEntity entity : entities){
-			accumulate(entity);
-		}
-	}
-	
-	/**
-	 * currently only group by tags
-	 * groupbys' first item always is site, which is a reserved field 
-	 */
-	public void accumulate(TaggedLogAPIEntity entity) throws Exception{
-		AggregateAPIEntity current = root;
-		for(String groupby : groupbys){
-			// TODO tagv is empty, so what to do? use a reserved field_name "unassigned" ?
-			// TODO we should support all Pojo with java bean style object
-			String tagv = locateGroupbyField(groupby, entity);
-			if(tagv == null || tagv.isEmpty()){
-				tagv = UNASSIGNED_GROUPBY_ROOT_FIELD_NAME;
-			}
-			Map<String, AggregateAPIEntity> children = current.getEntityList();
-			if(children.get(tagv) == null){
-				children.put(tagv, factory.create());
-				current.setNumDirectDescendants(current.getNumDirectDescendants()+1);
-			}
-			AggregateAPIEntity child = children.get(tagv);
-			// go through all aggregate functions including count, summary etc.			
-			if(counting)
-				count(child);
-			for(String sumFunctionField : sumFunctionFields){
-				sum(child, entity, sumFunctionField);
-			}
-			
-			current = child;
-		}
-		
-	}
-
-	
-	/**
-	 * use java bean specifications?
-	 * reflection is not efficient, let us find out solutions
-	 */
-	private void sum(Object targetObj, TaggedLogAPIEntity srcObj, String fieldName) throws Exception{
-		try{
-			String fn = fieldName.substring(0,1).toUpperCase()+fieldName.substring(1, fieldName.length());
-			Method srcGetMethod = srcObj.getClass().getMethod("get"+fn);
-			Object srcValue = srcGetMethod.invoke(srcObj);
-			if(srcValue == null){
-				return;  // silently don't count this source object
-			}
-			Method targetGetMethod = targetObj.getClass().getMethod("get"+fn);
-			Object targetValue = targetGetMethod.invoke(targetObj);
-			if(targetValue instanceof Long){
-				Method setM = targetObj.getClass().getMethod("set"+fn, long.class);
-				Long tmp1 = (Long)targetValue;
-				// TODO, now source object always have type "java.lang.String", later on we should support various type including integer type
-				Long tmp2 = null;
-				if(srcValue instanceof String){
-					tmp2 = Long.valueOf((String)srcValue);
-				}else if(srcValue instanceof Long){
-					tmp2 = (Long)srcValue;
-				}else{
-					throw new IllegalAggregateFieldTypeException(srcValue.getClass().toString() + " type is not support. The source type must be Long or String");
-				}
-				setM.invoke(targetObj, tmp1.longValue()+tmp2.longValue());
-			}else if(targetValue instanceof Double){
-				Method setM = targetObj.getClass().getMethod("set"+fn, double.class);
-				Double tmp1 = (Double)targetValue;
-				String src = (String) srcValue;
-				Double tmp2 = Double.valueOf(src);
-				setM.invoke(targetObj, tmp1.doubleValue()+tmp2.doubleValue());
-			}else{
-				throw new IllegalAggregateFieldTypeException(targetValue.getClass().toString() + " type is not support. The target type must be long or double");
-			}
-		}catch(Exception ex){
-			LOG.error("Cannot do sum aggregation for field " + fieldName, ex);
-			throw ex;
-		}
-	}
-	
-	/**
-	 * count possible not only count for number of descendants but also count for not-null fields 
-	 * @param targetObj
-	 * @throws Exception
-	 */
-	private void count(AggregateAPIEntity targetObj) throws Exception{
-		targetObj.setNumTotalDescendants(targetObj.getNumTotalDescendants()+1);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/BucketQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/BucketQuery.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/BucketQuery.java
deleted file mode 100644
index a00c5ad..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/BucketQuery.java
+++ /dev/null
@@ -1,84 +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.query.aggregate;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class BucketQuery {
-	public final static String UNASSIGNED_BUCKET = "unassigned"; 
-	private List<String> bucketFields;
-	private int limit;
-	private Map<String, Object> root = new HashMap<String, Object>();
-	
-	public BucketQuery(List<String> bucketFields, int limit){
-		this.bucketFields = bucketFields;
-		this.limit = limit;
-	}
-	
-	@SuppressWarnings("unchecked")
-	public void put(TaggedLogAPIEntity entity){
-		Map<String, Object> current = root;
-		int bucketCount = bucketFields.size();
-		if(bucketCount <= 0)
-			return; // silently return
-		int i = 0;
-		String bucketFieldValue = null;
-		for(; i<bucketCount; i++){
-			String bucketField = bucketFields.get(i);
-			bucketFieldValue = entity.getTags().get(bucketField);
-			if(bucketFieldValue == null || bucketFieldValue.isEmpty()){
-				bucketFieldValue = UNASSIGNED_BUCKET;
-			}
-			// for last bucket, bypass the following logic
-			if(i == bucketCount-1){
-				break;
-			}
-				
-			if(current.get(bucketFieldValue) == null){
-				current.put(bucketFieldValue, new HashMap<String, Object>());
-			}
-			// for the last level of bucket, it is not Map, instead it is List<TaggedLogAPIEntity> 
-			current = (Map<String, Object>)current.get(bucketFieldValue);
-		}
-		List<TaggedLogAPIEntity> bucketContent = (List<TaggedLogAPIEntity>)current.get(bucketFieldValue);
-		if(bucketContent == null){
-			bucketContent = new ArrayList<TaggedLogAPIEntity>();
-			current.put(bucketFieldValue, bucketContent);
-		}
-		
-		if(bucketContent.size() >= limit){
-			return;
-		}else{
-			bucketContent.add(entity);
-		}
-	}
-	
-	public void batchPut(List<TaggedLogAPIEntity> entities){
-		for(TaggedLogAPIEntity entity : entities){
-			put(entity);
-		}
-	}
-	
-	public Map<String, Object> get(){
-		return root;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/IllegalAggregateFieldTypeException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/IllegalAggregateFieldTypeException.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/IllegalAggregateFieldTypeException.java
deleted file mode 100644
index 3e3e739..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/IllegalAggregateFieldTypeException.java
+++ /dev/null
@@ -1,28 +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.query.aggregate;
-
-public class IllegalAggregateFieldTypeException extends RuntimeException{
-	static final long serialVersionUID = -4548788354899625887L;
-	public IllegalAggregateFieldTypeException(){
-		super();
-	}
-	
-	public IllegalAggregateFieldTypeException(String message){
-		super(message + ", only count and sum are support");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/PostAggregateSorting.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/PostAggregateSorting.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/PostAggregateSorting.java
deleted file mode 100644
index b801255..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/PostAggregateSorting.java
+++ /dev/null
@@ -1,101 +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.query.aggregate;
-
-import java.lang.reflect.Method;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PostAggregateSorting {
-	private static final Logger LOG = LoggerFactory.getLogger(PostAggregateSorting.class);
-	
-	private static SortedSet<Map.Entry<String, AggregateAPIEntity>> sortByValue(Map<String, AggregateAPIEntity> map, List<AggregateParams.SortFieldOrder> sortedFields) {
-	    SortedSet<Map.Entry<String, AggregateAPIEntity>> sortedEntries = new TreeSet<Map.Entry<String, AggregateAPIEntity>>(new MapKeyValueComparator(sortedFields));
-	    sortedEntries.addAll(map.entrySet());
-	    return sortedEntries;
-	}
-
-	/**
-	 * recursively populate sorted list from entity list
-	 * @param entity
-	 */
-	public static void sort(AggregateAPIEntity entity, List<AggregateParams.SortFieldOrder> sortFieldOrders){
-		// sort should internally add key field to AggregateAPIEntity before the sorting starts as "key" could be sorted against
-		Map<String, AggregateAPIEntity> children = entity.getEntityList();
-		for(Map.Entry<String, AggregateAPIEntity> e : children.entrySet()){
-			e.getValue().setKey(e.getKey());
-		}
-		SortedSet<Map.Entry<String, AggregateAPIEntity>> set = sortByValue(children, sortFieldOrders);
-		for(Map.Entry<String, AggregateAPIEntity> entry : set){
-			entity.getSortedList().add(entry.getValue());
-		}
-		for(Map.Entry<String, AggregateAPIEntity> entry : entity.getEntityList().entrySet()){
-			sort(entry.getValue(), sortFieldOrders);
-		}
-		entity.setEntityList(null);
-	}
-
-	private static class MapKeyValueComparator implements Comparator<Map.Entry<String, AggregateAPIEntity>>{
-		private List<AggregateParams.SortFieldOrder> sortedFieldOrders;
-		public MapKeyValueComparator(List<AggregateParams.SortFieldOrder> sortedFields){
-			this.sortedFieldOrders = sortedFields;
-		}
-		@Override
-        public int compare(Map.Entry<String, AggregateAPIEntity> e1, Map.Entry<String, AggregateAPIEntity> e2){
-			int r = 0;
-			AggregateAPIEntity entity1 = e1.getValue();
-			AggregateAPIEntity entity2 = e2.getValue();
-            for(AggregateParams.SortFieldOrder sortFieldOrder : sortedFieldOrders){
-            	// TODO count should not be literal, compare numTotalDescendants
-            	if(sortFieldOrder.getField().equals(AggregateParams.SortFieldOrder.SORT_BY_COUNT)){
-            		long tmp = entity1.getNumTotalDescendants() - entity2.getNumTotalDescendants();
-            		r = (tmp == 0) ? 0 : ((tmp > 0) ? 1 : -1);
-            	}else if(sortFieldOrder.getField().equals(AggregateParams.SortFieldOrder.SORT_BY_AGGREGATE_KEY)){
-            		r = entity1.getKey().compareTo(entity2.getKey());
-            	}else{
-            		try{
-	            		String sortedField = sortFieldOrder.getField();
-	            		String tmp1 = sortedField.substring(0, 1).toUpperCase()+sortedField.substring(1);
-	            		Method getMethod1 = entity1.getClass().getMethod("get"+tmp1);
-	            		Object r1 = getMethod1.invoke(entity1);
-	            		Long comp1 = (Long)r1;
-	            		String tmp2 = sortedField.substring(0, 1).toUpperCase()+sortedField.substring(1);
-	            		Method getMethod2 = entity2.getClass().getMethod("get"+tmp2);
-	            		Object r2 = getMethod2.invoke(entity2);
-	            		Long comp2 = (Long)r2;
-	            		r = comp1.compareTo(comp2);
-            		}catch(Exception ex){
-            			LOG.error("Can not get corresponding field for sorting", ex);
-            			r = 0;
-            		}
-            	}
-            	if(r == 0) continue;
-        		if(!sortFieldOrder.isAscendant()){
-        			r = -r;
-        		}
-    			return r;
-            }	
-			return r;
-        }
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderType.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderType.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderType.java
deleted file mode 100644
index 6d47c7f..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderType.java
+++ /dev/null
@@ -1,59 +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.query.aggregate;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public enum SortFieldOrderType {
-	key("^(key)=(asc|desc)$"),
-	count("^(count)=(asc|desc)$"),
-	sum("^sum\\((.*)\\)=(asc|desc)$"),
-	avg("^avg\\((.*)\\)(asc|desc)$"),
-	max("^max\\((.*)\\)(asc|desc)$"),
-	min("^min\\((.*)\\)(asc|desc)$");
-	
-	private Pattern pattern;
-	private SortFieldOrderType(String patternString){
-		this.pattern = Pattern.compile(patternString);
-	}
-
-	/**
-	 * This method is thread safe
-	 * match and retrieve back the aggregated fields, for count, aggregateFields can be null
-	 * @param sortFieldOrder
-	 * @return
-	 */
-	public SortFieldOrderTypeMatcher matcher(String sortFieldOrder){
-		Matcher m = pattern.matcher(sortFieldOrder);
-		
-		if(m.find()){
-			return new SortFieldOrderTypeMatcher(true, m.group(1), m.group(2));
-		}else{
-			return new SortFieldOrderTypeMatcher(false, null, null);
-		}
-	}
-	
-	public static AggregateParams.SortFieldOrder matchAll(String sortFieldOrder){
-		for(SortFieldOrderType type : SortFieldOrderType.values()){
-			SortFieldOrderTypeMatcher m = type.matcher(sortFieldOrder);
-			if(m.find())
-				return m.sortFieldOrder();
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderTypeMatcher.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderTypeMatcher.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderTypeMatcher.java
deleted file mode 100644
index 0b4d408..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/SortFieldOrderTypeMatcher.java
+++ /dev/null
@@ -1,38 +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.query.aggregate;
-
-
-public class SortFieldOrderTypeMatcher {
-	private boolean matched;
-	private AggregateParams.SortFieldOrder sortFieldOrder;
-
-	public SortFieldOrderTypeMatcher(boolean matched, String field, String order){
-		this.matched = matched;
-		if(matched){
-			this.sortFieldOrder = new AggregateParams.SortFieldOrder(field, order.equals("asc"));
-		}
-	}
-	
-	public boolean find(){
-		return this.matched;
-	}
-	
-	public AggregateParams.SortFieldOrder sortFieldOrder(){
-		return this.sortFieldOrder;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/Function.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/Function.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/Function.java
deleted file mode 100755
index 83c683c..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/Function.java
+++ /dev/null
@@ -1,106 +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.query.aggregate.raw;
-
-public abstract class Function{
-	private int count = 0;
-	protected void incrCount(int num){ count += num; }
-	public int count(){ return count; }
-	public abstract void run(double v,int count);
-	public void run(double v){ run(v,1); }
-	public abstract double result();
-
-	public static class Avg extends Function {
-		private double total;
-		public Avg(){
-			this.total = 0.0;
-		}
-		@Override
-		public void run(double v,int count){
-			this.incrCount(count);
-			total += v;
-		}
-		@Override
-		public double result(){
-			return this.total/this.count();
-		}
-	}
-
-	public static class Max extends Function {
-		private double maximum;
-		public Max(){
-			// TODO is this a bug, or only positive numeric calculation is supported
-			this.maximum = 0.0;
-		}
-
-		@Override
-		public void run(double v,int count){
-			this.incrCount(count);
-			if(v > maximum){
-				maximum = v;
-			}
-		}
-
-		@Override
-		public double result(){
-			return maximum;
-		}
-	}
-
-	public static class Min extends Function {
-		private double minimum;
-		public Min(){
-			// TODO is this a bug, or only positive numeric calculation is supported
-			this.minimum = Double.MAX_VALUE;
-		}
-		@Override
-		public void run(double v,int count){
-			this.incrCount(count);
-			if(v < minimum){
-				minimum = v;
-			}
-		}
-
-		@Override
-		public double result(){
-			return minimum;
-		}
-	}
-
-	public static class Sum extends Function {
-		private double summary;
-		public Sum(){
-			this.summary = 0.0;
-		}
-		@Override
-		public void run(double v,int count){
-			this.incrCount(count);
-			this.summary += v;
-		}
-
-		@Override
-		public double result(){
-			return this.summary;
-		}
-	}
-
-	public static class Count extends Sum{
-		public Count(){
-			super();
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/FunctionFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/FunctionFactory.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/FunctionFactory.java
deleted file mode 100755
index c6d1861..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/FunctionFactory.java
+++ /dev/null
@@ -1,75 +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.query.aggregate.raw;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public abstract class FunctionFactory{
-	public abstract Function createFunction();
-
-	public static class AvgFactory extends FunctionFactory {
-		@Override
-		public Function createFunction(){
-			return new Function.Avg();
-		}
-	}
-
-	public static class MaxFactory extends FunctionFactory {
-		@Override
-		public Function createFunction(){
-			return new Function.Max();
-		}
-	}
-
-	public static class MinFactory extends FunctionFactory {
-		@Override
-		public Function createFunction(){
-			return new Function.Min();
-		}
-	}
-
-	public static class CountFactory extends FunctionFactory {
-		@Override
-		public Function createFunction(){
-			return new Function.Count();
-		}
-	}
-
-	public static class SumFactory extends FunctionFactory {
-		@Override
-		public Function createFunction(){
-			return new Function.Sum();
-		}
-	}
-
-	public static FunctionFactory locateFunctionFactory(AggregateFunctionType funcType){
-		return _functionFactories.get(funcType.name());
-	}
-
-	private static Map<String, FunctionFactory> _functionFactories = new HashMap<String, FunctionFactory>();
-	static{
-		_functionFactories.put(AggregateFunctionType.count.name(), new CountFactory());
-		_functionFactories.put(AggregateFunctionType.sum.name(), new SumFactory());
-		_functionFactories.put(AggregateFunctionType.min.name(), new MinFactory());
-		_functionFactories.put(AggregateFunctionType.max.name(), new MaxFactory());
-		_functionFactories.put(AggregateFunctionType.avg.name(), new AvgFactory());
-	}
-}
-	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKey.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKey.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKey.java
deleted file mode 100755
index 3a54d70..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKey.java
+++ /dev/null
@@ -1,138 +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.query.aggregate.raw;
-
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.Writable;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.ListIterator;
-
-/**
- * <h3>Structure</h3>
- * <pre>
- * {
- *   List[byte[],...]
- * }
- * </pre>
- */
-public class GroupbyKey implements Writable {
-	private final WritableList<BytesWritable> value;
-
-	public void addValue(byte[] value){
-		this.value.add(new BytesWritable(value));
-	}
-	public void addAll(List<BytesWritable> list){
-		this.value.addAll(list);
-	}
-
-	public List<BytesWritable> getValue(){
-		return value;
-	}
-
-	/**
-	 * empty constructor
-	 */
-	public GroupbyKey(){
-		this.value = new WritableList<BytesWritable>(BytesWritable.class);
-	}
-
-	/**
-	 * clear for reuse
-	 */
-	public void clear(){
-		value.clear();
-	}
-
-	/**
-	 * copy constructor
-	 * @param key
-	 */
-	public GroupbyKey(GroupbyKey key){
-		this();
-		ListIterator<BytesWritable> it = key.value.listIterator();
-//		ListIterator<byte[]> it = key.value.listIterator();
-		while(it.hasNext()){
-			this.value.add(it.next());
-		}
-	}
-
-	public GroupbyKey(List<byte[]> bytes){
-		this();
-		for(byte[] bt:bytes){
-			this.addValue(bt);
-		}
-	}
-
-	@Override
-	public boolean equals(Object obj){
-		if(obj == this)
-			return true;
-		if(!(obj instanceof GroupbyKey)){
-			return false;
-		}
-		GroupbyKey that = (GroupbyKey)obj;
-//		ListIterator<byte[]> e1 = this.value.listIterator();
-//		ListIterator<byte[]> e2 = that.value.listIterator();
-		ListIterator<BytesWritable> e1 = this.value.listIterator();
-		ListIterator<BytesWritable> e2 = that.value.listIterator();
-		while(e1.hasNext() && e2.hasNext()){
-			if(!Arrays.equals(e1.next().getBytes(), e2.next().getBytes()))
-				return false;
-		}
-		return !(e1.hasNext() || e2.hasNext());
-	}
-
-	@Override
-	public int hashCode(){
-		ListIterator<BytesWritable> e1 = this.value.listIterator();
-		int hash = 0xFFFFFFFF;
-		while(e1.hasNext()){
-			hash ^= Arrays.hashCode(e1.next().getBytes());
-		}
-		return hash;
-	}
-
-	/**
-	 * Serialize the fields of this object to <code>out</code>.
-	 *
-	 * @param out <code>DataOuput</code> to serialize this object into.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void write(DataOutput out) throws IOException {
-		this.value.write(out);
-	}
-
-	/**
-	 * Deserialize the fields of this object from <code>in</code>.
-	 * <p/>
-	 * <p>For efficiency, implementations should attempt to re-use storage in the
-	 * existing object where possible.</p>
-	 *
-	 * @param in <code>DataInput</code> to deseriablize this object from.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.value.readFields(in);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyAggregatable.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyAggregatable.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyAggregatable.java
deleted file mode 100755
index 7e20029..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyAggregatable.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate.raw;
-
-import java.util.List;
-
-/**
- * The generic interface to unify the GroupbyKeyValue-based results of different 
- * business logic aggregates like RawAggregator or TimeSeriesAggregator
- *
- * @see org.apache.eagle.query.aggregate.timeseries.TimeSeriesAggregator
- * @see RawAggregator
- *
- * @since : 11/3/14,2014
- *
- */
-public interface GroupbyKeyAggregatable {
-	/**
-	 * @see RawAggregator#getGroupbyKeyValues()
-	 * @see org.apache.eagle.query.aggregate.timeseries.TimeSeriesAggregator#getGroupbyKeyValues()
-	 * 
-	 * @return
-	 */
-	public List<GroupbyKeyValue> getGroupbyKeyValues();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyComparator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyComparator.java
deleted file mode 100755
index f976c8c..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyComparator.java
+++ /dev/null
@@ -1,43 +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.query.aggregate.raw;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.io.BytesWritable;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.ListIterator;
-
-public class GroupbyKeyComparator implements Comparator<GroupbyKey>{
-	@Override 
-    public int compare(GroupbyKey key1, GroupbyKey key2){
-		List<BytesWritable> list1 = key1.getValue();
-		List<BytesWritable> list2 = key2.getValue();
-		
-		if(list1 == null || list2 == null || list1.size() != list2.size())
-			throw new IllegalArgumentException("2 list of groupby fields must be non-null and have the same size");
-		ListIterator<BytesWritable> e1 = list1.listIterator();
-		ListIterator<BytesWritable> e2 = list2.listIterator();
-		while(e1.hasNext() && e2.hasNext()){
-			int r = Bytes.compareTo(e1.next().copyBytes(), e2.next().copyBytes());
-			if(r != 0)
-				return r;
-		}
-		return 0;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValue.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValue.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValue.java
deleted file mode 100755
index 2256761..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValue.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.query.aggregate.raw;
-
-import org.apache.hadoop.io.Writable;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * <h3>Groupby KeyValue Structure</h3>
- * <pre>
- * {
- *  key: GroupbyKey
- *  value: GroupbyValue
- * }
- * </pre>
- * @see GroupbyKey
- * @see GroupbyValue
- *
- * @since : 11/4/14,2014
- */
-public class GroupbyKeyValue implements Writable {
-	private GroupbyKey key;
-	private GroupbyValue value;
-	public GroupbyKeyValue(){
-		this.key = new GroupbyKey();
-		this.value = new GroupbyValue();
-	}
-	public GroupbyKeyValue(GroupbyKey key,GroupbyValue value){
-		this.key = key;
-		this.value = value;
-	}
-	public GroupbyKey getKey() {
-		return key;
-	}
-
-	public void setKey(GroupbyKey key) {
-		this.key = key;
-	}
-
-	public GroupbyValue getValue() {
-		return value;
-	}
-
-	public void setValue(GroupbyValue value) {
-		this.value = value;
-	}
-
-	/**
-	 * Serialize the fields of this object to <code>out</code>.
-	 *
-	 * @param out <code>DataOuput</code> to serialize this object into.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void write(DataOutput out) throws IOException {
-		this.key.write(out);
-		this.value.write(out);
-	}
-
-	/**
-	 * Deserialize the fields of this object from <code>in</code>.
-	 * <p/>
-	 * <p>For efficiency, implementations should attempt to re-use storage in the
-	 * existing object where possible.</p>
-	 *
-	 * @param in <code>DataInput</code> to deseriablize this object from.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.key.readFields(in);
-		this.value.readFields(in);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValueCreationListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValueCreationListener.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValueCreationListener.java
deleted file mode 100755
index 6ca4bec..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyKeyValueCreationListener.java
+++ /dev/null
@@ -1,24 +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.query.aggregate.raw;
-
-/**
- * @since : 11/11/14,2014
- */
-public interface GroupbyKeyValueCreationListener {
-	void keyValueCreated(GroupbyKeyValue kv);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyValue.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyValue.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyValue.java
deleted file mode 100755
index b7f2c43..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/GroupbyValue.java
+++ /dev/null
@@ -1,139 +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.query.aggregate.raw;
-
-import org.apache.eagle.common.ByteUtil;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.apache.hadoop.io.Writable;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * <h3>Strucutre</h3>
- * <pre>
- * {
- *   value: List[byte[],...],
- *   meta : List[byte[],...] // byte[] may be serialized value
- *                           // of any type of value like:
- *                           // Integer,Double or Object
- *                           // and so on
- * }
- * </pre>
- *
- * TODO: Add self-described serializer or deserializer for meta bytes array, so that any side of the RPC will know how to read/write meta information
- *
- * @since : 11/4/14,2014
- */
-public class GroupbyValue implements Writable{
-	private final WritableList<DoubleWritable> value;
-	private WritableList<BytesWritable> meta;
-	private int initialCapacity=1;
-	public GroupbyValue(){
-		this(1);
-	}
-	/**
-	 * Constructs an empty list with the specified initial capacity.
-	 *
-	 * @param   initialCapacity   the initial capacity of the list
-	 * @exception IllegalArgumentException if the specified initial capacity
-	 *            is negative
-	 */
-	public GroupbyValue(int initialCapacity ){
-		this.initialCapacity = initialCapacity;
-		this.value = new WritableList<DoubleWritable>(DoubleWritable.class,this.initialCapacity);
-		this.meta = new WritableList<BytesWritable>(BytesWritable.class,this.initialCapacity);
-	}
-
-	public WritableList<DoubleWritable> getValue(){
-		return this.value;
-	}
-
-	public WritableList<BytesWritable> getMeta(){
-		return this.meta;
-	}
-
-	public DoubleWritable get(int index){
-		return this.value.get(index);
-	}
-
-	public BytesWritable getMeta(int index){
-		if(this.meta==null) return null;
-		return this.meta.get(index);
-	}
-
-	// Values
-	public void add(DoubleWritable value){
-		this.value.add(value);
-	}
-	public void add(Double value){
-		this.value.add(new DoubleWritable(value));
-	}
-
-	public void set(int index,DoubleWritable value){
-		this.value.set(index, value);
-	}
-
-	//////////////
-	// Meta
-	/////////////
-	public void addMeta(BytesWritable meta){
-		this.meta.add(meta);
-	}
-
-	public void addMeta(int meta){
-		this.meta.add(new BytesWritable(ByteUtil.intToBytes(meta)));
-	}
-
-	public void setMeta(int index,BytesWritable meta){
-		this.meta.set(index,meta);
-	}
-	public void setMeta(int index,int meta){
-		this.meta.set(index, new BytesWritable(ByteUtil.intToBytes(meta)));
-	}
-
-	/**
-	 * Serialize the fields of this object to <code>out</code>.
-	 *
-	 * @param out <code>DataOuput</code> to serialize this object into.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void write(DataOutput out) throws IOException {
-		out.writeInt(this.initialCapacity);
-		this.value.write(out);
-		this.meta.write(out);
-	}
-
-	/**
-	 * Deserialize the fields of this object from <code>in</code>.
-	 * <p/>
-	 * <p>For efficiency, implementations should attempt to re-use storage in the
-	 * existing object where possible.</p>
-	 *
-	 * @param in <code>DataInput</code> to deseriablize this object from.
-	 * @throws java.io.IOException
-	 */
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.initialCapacity = in.readInt();
-		this.value.readFields(in);
-		this.meta.readFields(in);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawAggregator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawAggregator.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawAggregator.java
deleted file mode 100755
index 0468074..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawAggregator.java
+++ /dev/null
@@ -1,71 +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.query.aggregate.raw;
-
-import org.apache.eagle.log.entity.QualifierCreationListener;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-public class RawAggregator implements QualifierCreationListener,GroupbyKeyAggregatable {
-	private List<String> groupbyFields;
-	private GroupbyKey key;
-	private static final byte[] UNASSIGNED = "unassigned".getBytes();
-	private RawGroupbyBucket bucket;
-
-	public RawAggregator(List<String> groupbyFields, List<AggregateFunctionType> aggregateFunctionTypes, List<String> aggregatedFields, EntityDefinition ed){
-		this.groupbyFields = groupbyFields;
-		key = new GroupbyKey();
-		bucket = new RawGroupbyBucket(aggregateFunctionTypes, aggregatedFields, ed);
-	}
-
-	@Override
-	public void qualifierCreated(Map<String, byte[]> qualifiers){
-		key.clear();
-		ListIterator<String> it = groupbyFields.listIterator();
-		while(it.hasNext()){
-			byte[] groupbyFieldValue = qualifiers.get(it.next());
-			if(groupbyFieldValue == null){
-				key.addValue(UNASSIGNED);
-			}else{
-				key.addValue(groupbyFieldValue);
-			}
-		}
-		GroupbyKey newKey = null;
-		if(bucket.exists(key)){
-			newKey = key;
-		}else{
-			newKey = new GroupbyKey(key);
-		}
-		
-		bucket.addDatapoint(newKey, qualifiers);
-	}
-
-	/**
-	 * @return
-	 */
-	public Map<List<String>, List<Double>> result(){
-		return bucket.result();
-	}
-
-	public List<GroupbyKeyValue> getGroupbyKeyValues(){
-		return bucket.groupbyKeyValues();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawGroupbyBucket.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawGroupbyBucket.java b/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawGroupbyBucket.java
deleted file mode 100755
index 47b84a0..0000000
--- a/eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/raw/RawGroupbyBucket.java
+++ /dev/null
@@ -1,196 +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.query.aggregate.raw;
-
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-public class RawGroupbyBucket {
-	private final static Logger LOG = LoggerFactory.getLogger(RawGroupbyBucket.class);
-
-	private List<String> aggregatedFields;
-	private EntityDefinition entityDefinition;
-
-	
-	private List<AggregateFunctionType> types;
-	private SortedMap<GroupbyKey, List<Function>> group2FunctionMap =
-			new TreeMap<GroupbyKey, List<Function>>(new GroupbyKeyComparator());
-
-	public RawGroupbyBucket(List<AggregateFunctionType> types, List<String> aggregatedFields, EntityDefinition ed){
-		this.types = types;
-		this.aggregatedFields = aggregatedFields;
-		this.entityDefinition = ed;
-	}
-
-	public boolean exists(GroupbyKey key){
-		return group2FunctionMap.containsKey(key);
-	}
-
-	public void addDatapoint(GroupbyKey groupbyKey, Map<String, byte[]> values){
-		// locate groupby bucket
-		List<Function> functions = group2FunctionMap.get(groupbyKey);
-		if(functions == null){
-			functions = new ArrayList<Function>();
-			for(AggregateFunctionType type : types){
-				FunctionFactory ff = FunctionFactory.locateFunctionFactory(type);
-				if(ff == null){
-					LOG.error("FunctionFactory of AggregationFunctionType:"+type+" is null");
-				}else{
-					functions.add(ff.createFunction());
-				}
-			}
-			group2FunctionMap.put(groupbyKey, functions);
-		}
-		ListIterator<Function> e1 = functions.listIterator();
-		ListIterator<String> e2 = aggregatedFields.listIterator();
-		while(e1.hasNext() && e2.hasNext()){
-			Function f = e1.next();
-			String aggregatedField = e2.next();
-			byte[] v = values.get(aggregatedField);
-			if(f instanceof Function.Count){ // handle count
-				if(entityDefinition.getMetricDefinition()==null) {
-					f.run(1.0);
-					continue;
-				}else if(v == null){
-					aggregatedField = GenericMetricEntity.VALUE_FIELD;
-					v = values.get(aggregatedField);
-				}
-			}
-			if(v != null){
-				Qualifier q = entityDefinition.getDisplayNameMap().get(aggregatedField);
-				EntitySerDeser<?> serDeser = q.getSerDeser();
-				// double d = 0.0;
-				if(serDeser instanceof IntSerDeser){
-					double d= (Integer)serDeser.deserialize(v);
-					f.run(d);
-				}else if(serDeser instanceof LongSerDeser){
-					double d = (Long)serDeser.deserialize(v);
-					f.run(d);
-				}else if(serDeser instanceof DoubleSerDeser){
-					double d = (Double)serDeser.deserialize(v);
-					f.run(d);
-				// TODO: support numeric array type that is not metric
-				}else if(serDeser instanceof DoubleArraySerDeser){
-					double[] d = ((DoubleArraySerDeser) serDeser).deserialize(v);
-					if(f instanceof Function.Count){
-						f.run(d.length);
-					} else {
-						for(double i:d) f.run(i);
-					}
-				}else if(serDeser instanceof IntArraySerDeser){
-					int[] d = ((IntArraySerDeser) serDeser).deserialize(v);
-					if(f instanceof Function.Count){
-						f.run(d.length);
-					}else{
-						for(int i:d) f.run(i);
-					}
-				}else{
-					if(LOG.isDebugEnabled()) LOG.debug("EntitySerDeser of field "+aggregatedField+" is not IntSerDeser or LongSerDeser or DoubleSerDeser or IntArraySerDeser or DoubleArraySerDeser, default as 0.0");
-				}
-			}else if(TokenConstant.isExpression(aggregatedField)){
-				String expression = TokenConstant.parseExpressionContent(aggregatedField);
-				try {
-					Map<String,Double> doubleMap = EntityQualifierUtils.bytesMapToDoubleMap(values, entityDefinition);
-					if(entityDefinition.getMetricDefinition() == null) {
-						double value = ExpressionParser.eval(expression,doubleMap);
-						// LOG.info("DEBUG: Eval "+expression +" = "+value);
-						f.run(value);
-					}else{
-						Qualifier qualifier = entityDefinition.getDisplayNameMap().get(GenericMetricEntity.VALUE_FIELD);
-						EntitySerDeser _serDeser = qualifier.getSerDeser();
-						byte[] valueBytes = values.get(GenericMetricEntity.VALUE_FIELD);
-						if( _serDeser instanceof DoubleArraySerDeser){
-							double[] d = (double[]) _serDeser.deserialize(valueBytes);
-							if(f instanceof Function.Count) {
-								f.run(d.length);
-							}else{
-								for(double i:d){
-									doubleMap.put(GenericMetricEntity.VALUE_FIELD,i);
-									f.run(ExpressionParser.eval(expression, doubleMap));
-								}
-							}
-						}else if(_serDeser instanceof IntArraySerDeser){
-							int[] d = (int[]) _serDeser.deserialize(valueBytes);
-							if(f instanceof Function.Count) {
-								f.run(d.length);
-							}else {
-								for (double i : d) {
-									doubleMap.put(GenericMetricEntity.VALUE_FIELD, i);
-									f.run(ExpressionParser.eval(expression, doubleMap));
-								}
-							}
-						}else{
-							double value = ExpressionParser.eval(expression,doubleMap);
-							f.run(value);
-						}
-					}
-				} catch (Exception e) {
-					LOG.error("Got exception to evaluate expression: "+expression+", exception: "+e.getMessage(),e);
-				}
-			}
-		}
-	}
-
-	/**
-	 * expensive operation - create objects and format the result
-	 * @return
-	 */
-	public List<GroupbyKeyValue> groupbyKeyValues(){
-		List<GroupbyKeyValue> results = new ArrayList<GroupbyKeyValue>();
-		for(Map.Entry<GroupbyKey, List<Function>> entry : this.group2FunctionMap.entrySet()){
-			GroupbyValue value = new GroupbyValue();
-			for(Function f : entry.getValue()){
-				value.add(new DoubleWritable(f.result()));
-				value.addMeta(f.count());
-			}
-			results.add(new GroupbyKeyValue(entry.getKey(),value));
-		}
-		return results;
-	}
-
-	/**
-	 * expensive operation - create objects and format the result
-	 * @return
-	 */
-	public Map<List<String>, List<Double>> result(){
-		Map<List<String>, List<Double>> result = new HashMap<List<String>, List<Double>>();
-		for(Map.Entry<GroupbyKey, List<Function>> entry : this.group2FunctionMap.entrySet()){
-			List<Double> values = new ArrayList<Double>();
-			for(Function f : entry.getValue()){
-				values.add(f.result());
-			}
-			GroupbyKey key = entry.getKey();
-			List<BytesWritable> list1 = key.getValue();
-			List<String> list2 = new ArrayList<String>();
-			for(BytesWritable e : list1){
-				list2.add(new String(e.copyBytes()));
-			}
-			result.put(list2, values);
-		}
-		return result;
-	}
-}


[09/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateClient.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateClient.java
deleted file mode 100755
index cd6a5b9..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateClient.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.query.coprocessor;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * Coprocessor-based Aggregation Universal Client Interface
- *
- * <h2>Flat or RAW Aggregation:</h2>
- * <pre>
- * AggregateResult aggregate( HTableInterface table, String serviceName, Scan scan, List<String> groupbyFields, List<AggregateFunctionType> aggregateFuncTypes, List<String> aggregatedFields) throws IOException
- * </pre>
- *
- * <h2>Time Series Aggregation:</h2>
- * <pre>
- * AggregateResult aggregate(HTableInterface table, String serviceName, Scan scan, List<String> groupbyFields, List<AggregateFunctionType> aggregateFuncTypes, List<String> aggregatedFields, boolean timeSeries, long startTime, long endTime, long intervalMin) throws IOException
- * </pre>
- * @since : 11/3/14,2014
- */
-public interface AggregateClient
-{
-
-	/**
-	 * Flat Aggregation
-	 *
-	 *
-	 * @param table                   HTable connections
-	 * @param scan                    HBase Scan
-	 * @param groupbyFields           Grouped by fields name
-	 * @param aggregateFuncTypes      Aggregate function types
-	 * @param aggregatedFields        Aggregate field names
-	 * @return                        Return AggregateResult
-	 * @throws Exception
-	 */
-	AggregateResult aggregate(final HTableInterface table,                            // HTable connections
-                              final EntityDefinition entityDefinition,                               // Eagle service name
-                              final Scan scan,                                        // HBase Scan
-                              final List<String> groupbyFields,                       // Grouped by fields name
-                              final List<AggregateFunctionType> aggregateFuncTypes,   // Aggregate function types
-                              final List<String> aggregatedFields                     // Aggregate field names
-    ) throws IOException;
-
-	/**
-	 * Time Series Aggregation
-	 *
-	 * @param table                   HTable connections
-	 * @param entityDefinition        Eagle EntityDefinition
-	 * @param scan                    HBase Scan
-	 * @param groupbyFields           Grouped by fields name
-	 * @param aggregateFuncTypes      Aggregate function types
-	 * @param aggregatedFields        Aggregate field names
-	 * @param timeSeries              Is time series aggregations?
-	 * @param intervalMin             The interval in minutes if it's time series aggregation
-	 * @return                        Return AggregateResult
-	 * @throws Exception
-	 */
-	AggregateResult aggregate(final HTableInterface table,                                // HTable connections
-                              final EntityDefinition entityDefinition,                               // Eagle service name
-                              final Scan scan,                                        // HBase Scan
-                              final List<String> groupbyFields,                       // Grouped by fields name
-                              final List<AggregateFunctionType> aggregateFuncTypes,   // Aggregate function types
-                              final List<String> aggregatedFields,                    // Aggregate field names
-                              final boolean timeSeries,                               // Is time series aggregations?
-                              final long startTime,                                   // startTime
-                              final long endTime,                                     // endTime
-                              final long intervalMin                                   // The interval in minutes if it's time series aggregation
-    ) throws IOException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocol.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocol.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocol.java
deleted file mode 100755
index fe2c414..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocol.java
+++ /dev/null
@@ -1,68 +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.query.coprocessor;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.hadoop.hbase.client.Scan;
-//import org.apache.hadoop.hbase.ipc.CoprocessorProtocol;
-
-import java.io.IOException;
-import java.util.List;
-
-
-/**
- * TODO: replace with google-protobuf RPC when HBase is upgraded to version 0.96+
- */
-public interface AggregateProtocol {
-
-	/**
-	 *
-	 *
-	 * @param entityDefinition
-	 * @param scan
-	 * @param groupbyFields
-	 * @param aggregateFuncTypes
-	 * @param aggregatedFields
-	 * @return AggregateResult
-	 * @throws java.io.IOException
-	 */
-	AggregateResult aggregate(EntityDefinition entityDefinition,
-                              Scan scan,
-                              List<String> groupbyFields,
-                              List<byte[]> aggregateFuncTypes,
-                              List<String> aggregatedFields) throws IOException;
-
-	/**
-	 *
-	 * @param entityDefinition
-	 * @param scan
-	 * @param groupbyFields
-	 * @param aggregateFuncTypes
-	 * @param aggregatedFields
-	 * @param intervalMin
-	 * @return AggregateResult
-	 * @throws java.io.IOException
-	 */
-	AggregateResult aggregate(EntityDefinition entityDefinition,
-                              Scan scan,
-                              List<String> groupbyFields,
-                              List<byte[]> aggregateFuncTypes,
-                              List<String> aggregatedFields,
-                              long startTime,
-                              long endTime,
-                              long intervalMin) throws IOException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocolEndPoint.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocolEndPoint.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocolEndPoint.java
deleted file mode 100755
index 53d27de..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateProtocolEndPoint.java
+++ /dev/null
@@ -1,447 +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.query.coprocessor;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.*;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
-import org.apache.eagle.query.aggregate.raw.RawAggregator;
-import org.apache.eagle.query.aggregate.timeseries.TimeSeriesAggregator;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.eagle.common.DateTimeUtil;
-import com.google.protobuf.RpcCallback;
-import com.google.protobuf.RpcController;
-import com.google.protobuf.Service;
-import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.Coprocessor;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
-import org.apache.hadoop.hbase.protobuf.ResponseConverter;
-import org.apache.hadoop.hbase.regionserver.HRegion;
-import org.apache.hadoop.hbase.regionserver.InternalScanner;
-import org.apache.hadoop.hbase.util.Bytes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-//public abstract class AbstractAggregateEndPoint extends BaseEndpointCoprocessor{
-public class AggregateProtocolEndPoint extends AggregateProtos.AggregateProtocol implements AggregateProtocol, Coprocessor, CoprocessorService {
-
-    private RegionCoprocessorEnvironment env;
-
-    @Override
-    public Service getService() {
-        return this;
-    }
-
-    public AggregateProtocolEndPoint() {}
-
-    protected void checkNotNull(Object obj,String name) {
-		if(obj==null) throw new NullPointerException(name+" is null");
-	}
-
-    @Override
-    public void start(CoprocessorEnvironment env) throws IOException {
-        if (env instanceof RegionCoprocessorEnvironment) {
-            this.env = (RegionCoprocessorEnvironment)env;
-        } else {
-            throw new CoprocessorException("Must be loaded on a table region!");
-        }
-    }
-
-    @Override
-    public void stop(CoprocessorEnvironment env) throws IOException {
-        // do nothing
-    }
-
-//    @Override
-//	public ProtocolSignature getProtocolSignature(String protocol, long version, int clientMethodsHashCode) throws IOException {
-//		if (AggregateProtocol.class.getName().equals(protocol)) {
-////			return new ProtocolSignature(AggregateProtocol.VERSION, null);
-//			return new ProtocolSignature(98l, null);
-//		}
-//		throw new IOException("Unknown protocol: " + protocol);
-//	}
-
-	protected HRegion getCurrentRegion(){
-		return this.env.getRegion();
-	}
-
-	/**
-	 * <pre>
-	 * Region-unittest,\x82\xB4\x85\xC2\x7F\xFF\xFE\xB6\xC9jNG\xEE!\x5C3\xBB\xAE\xA1:\x05\xA5\xA9x\xB0\xA1"8\x05\xFB(\xD2VY\xDB\x9A\x06\x09\xA9\x98\xC2\xE3\x8D=,1413960230654.aaf2a6c9f2c87c196f43497243bb2424.
-	 * RegionID-unittest,1413960230654
-	 * </pre>
-	 */
-	protected String getLogHeader(){
-		HRegion region = this.getCurrentRegion();
-		return LOG.isDebugEnabled() ? String.format("Region-%s",region.getRegionNameAsString()):
-				String.format("Region-%s,%d",region.getTableDesc().getNameAsString(),region.getRegionId());
-	}
-
-	protected class InternalReadReport {
-		public InternalReadReport(long counter,long startTimestamp,long stopTimestamp){
-			this.counter = counter;
-			this.startTimestamp = startTimestamp;
-			this.stopTimestamp = stopTimestamp;
-		}
-		public long getCounter() {
-			return counter;
-		}
-		public void setCounter(long counter) {
-			this.counter = counter;
-		}
-
-		public long getStartTimestamp() {
-			return startTimestamp;
-		}
-
-		public void setStartTimestamp(long startTimestamp) {
-			this.startTimestamp = startTimestamp;
-		}
-
-		public long getStopTimestamp() {
-			return stopTimestamp;
-		}
-
-		public void setStopTimestamp(long stopTimestamp) {
-			this.stopTimestamp = stopTimestamp;
-		}
-
-		private long counter;
-		private long startTimestamp;
-		private long stopTimestamp;
-	}
-
-	/**
-	 * Asynchronous HBase scan read as entity
-	 *
-	 * @param scan
-	 * @throws java.io.IOException
-	 */
-	protected InternalReadReport asyncStreamRead(EntityDefinition ed, Scan scan, EntityCreationListener listener) throws IOException {
-//		_init();
-		long counter = 0;
-		long startTimestamp = 0;
-		long stopTimestamp = 0;
-
-		InternalScanner scanner = this.getCurrentRegion().getScanner(scan);
-		List<Cell> results = new ArrayList<Cell>();
-		try{
-			boolean hasMoreRows;
-			GenericMetricShadowEntity singleMetricEntity = null;
-			do{
-				hasMoreRows = scanner.next(results);
-				Map<String, byte[]> kvMap = new HashMap<String, byte[]>();
-				if(!results.isEmpty()){
-					counter ++;
-					byte[] row = results.get(0).getRow();
-					long timestamp = RowkeyBuilder.getTimestamp(row, ed);
-					
-					// Min
-					if(startTimestamp == 0 || startTimestamp > timestamp ){
-						startTimestamp = timestamp;
-					}
-					
-					// Max
-					if(stopTimestamp == 0 || stopTimestamp < timestamp ){
-						stopTimestamp = timestamp;
-					}
-					
-					for(Cell kv:results){
-						String qualifierName = Bytes.toString(kv.getQualifier());
-//						Qualifier qualifier = null;
-//						if(!ed.isTag(qualifierName)){
-//							qualifier = ed.getQualifierNameMap().get(qualifierName);
-//							if(qualifier == null){
-//								LOG.error("qualifier for   " + qualifierName + " not exist");
-//								throw new NullPointerException("qualifier for field "+qualifierName+" not exist");
-//							}
-//						}
-						if(kv.getValue()!=null) kvMap.put(qualifierName ,kv.getValue());
-					}
-					
-					// LOG.info("DEBUG: timestamp="+timestamp+", keys=["+StringUtils.join(kvMap.keySet(),",")+"]");
-					
-					InternalLog internalLog = HBaseInternalLogHelper.buildObject(ed, row, timestamp, kvMap);
-					if(internalLog!=null){
-						TaggedLogAPIEntity logAPIEntity = null;
-						try {
-							logAPIEntity = HBaseInternalLogHelper.buildEntity(internalLog, ed);
-							if(logAPIEntity instanceof GenericMetricEntity){
-								if(singleMetricEntity == null) singleMetricEntity = new GenericMetricShadowEntity();
-								GenericMetricEntity e = (GenericMetricEntity)logAPIEntity;
-								if(e.getValue()!=null) {
-									int count = e.getValue().length;
-									@SuppressWarnings("unused")
-									Class<?> cls = ed.getMetricDefinition().getSingleTimestampEntityClass();
-									for (int i = 0; i < count; i++) {
-										long ts = logAPIEntity.getTimestamp() + i * ed.getMetricDefinition().getInterval();
-										// exclude those entity which is not within the time range in search condition. [start, end)
-										singleMetricEntity.setTimestamp(ts);
-										singleMetricEntity.setTags(e.getTags());
-										singleMetricEntity.setValue(e.getValue()[i]);
-										// Min
-										if (startTimestamp == 0 || startTimestamp > ts) startTimestamp = ts;
-										// Max
-										if (stopTimestamp == 0 || stopTimestamp < ts) stopTimestamp = ts;
-										listener.entityCreated(singleMetricEntity);
-									}
-								}
-							}else {
-								// LOG.info("DEBUG: rowKey="+logAPIEntity.getEncodedRowkey());
-								listener.entityCreated(logAPIEntity);
-							}
-						} catch (Exception e) {
-							if(internalLog!=null) {
-								LOG.error("Got exception to handle " + internalLog.toString() + ": " + e.getMessage(), e);
-							}
-							throw new IOException(e);
-						}
-					}else{
-						LOG.error("Got null to parse internal log for row: " + row.length + " with fields: " + kvMap);
-					}
-					results.clear();
-				}else{
-					if(LOG.isDebugEnabled()) LOG.warn("Empty batch of KeyValue");
-				}
-			} while(hasMoreRows);
-		}catch(IOException ex){
-			LOG.error(ex.getMessage(),ex);
-			throw ex;
-		} finally {
-            if(scanner != null) {
-                scanner.close();
-            }
-		}
-		return new InternalReadReport(counter,startTimestamp,stopTimestamp);
-	}
-
-	/**
-	 * Asynchronous HBase scan read as RAW qualifier
-	 *
-	 * @param scan
-	 * @param listener
-	 * @throws Exception
-	 */
-	protected InternalReadReport asyncStreamRead(EntityDefinition ed, Scan scan, QualifierCreationListener listener) throws IOException {
-//		_init();
-		long counter = 0;
-		long startTimestamp = 0;
-		long stopTimestamp = 0;
-		InternalScanner scanner = this.getCurrentRegion().getScanner(scan);
-		List<Cell> results = new ArrayList<Cell>();
-		try{
-			boolean hasMoreRows;//false by default
-			do{
-				hasMoreRows = scanner.next(results);
-				Map<String, byte[]> kvMap = new HashMap<String, byte[]>();
-				if(!results.isEmpty()){
-					counter ++;
-					byte[] row = results.get(0).getRow();
-//					if(ed.isTimeSeries()){
-					long timestamp = RowkeyBuilder.getTimestamp(row,ed);
-					// Min
-					if(startTimestamp == 0 || startTimestamp > timestamp ){
-						startTimestamp = timestamp;
-					}
-					// Max
-					if(stopTimestamp == 0 || stopTimestamp < timestamp ){
-						stopTimestamp = timestamp;
-					}
-//					}
-					
-					for(Cell kv:results){
-						String qualifierName = Bytes.toString(kv.getQualifier());
-						Qualifier qualifier = null;
-						if(!ed.isTag(qualifierName)){
-							qualifier = ed.getQualifierNameMap().get(qualifierName);
-							if(qualifier == null){
-								LOG.error("qualifier for field " + qualifierName + " not exist");
-								throw new IOException(new NullPointerException("qualifier for field "+qualifierName+" is null"));
-							}
-							qualifierName = qualifier.getDisplayName();
-						}
-						if(kv.getValue()!=null) kvMap.put(qualifierName,kv.getValue());
-					}
-					
-//					LOG.info("DEBUG: timestamp="+timestamp+", keys=["+StringUtils.join(kvMap.keySet(),",")+"]");
-
-					if(!kvMap.isEmpty()) listener.qualifierCreated(kvMap);
-					results.clear();
-				}else{
-					if(LOG.isDebugEnabled()) LOG.warn("Empty batch of KeyValue");
-				}
-			} while(hasMoreRows);
-		} catch(IOException ex){
-			LOG.error(ex.getMessage(),ex);
-			throw ex;
-		} finally {
-            if(scanner != null) {
-                scanner.close();
-            }
-		}
-
-		return new InternalReadReport(counter,startTimestamp,stopTimestamp);
-	}
-
-    @Override
-    public void aggregate(RpcController controller, AggregateProtos.AggregateRequest request, RpcCallback<AggregateProtos.AggregateResult> done) {
-        AggregateResult result = null;
-        try {
-            result = this.aggregate(ProtoBufConverter.fromPBEntityDefinition(request.getEntityDefinition()),
-                    ProtoBufConverter.fromPBScan(request.getScan()),
-                    ProtoBufConverter.fromPBStringList(request.getGroupbyFieldsList()),
-                    ProtoBufConverter.fromPBByteArrayList(request.getAggregateFuncTypesList()),
-                    ProtoBufConverter.fromPBStringList(request.getAggregatedFieldsList())
-            );
-        } catch (IOException e) {
-            ResponseConverter.setControllerException(controller, e);
-        }
-        try {
-            done.run(ProtoBufConverter.toPBAggregateResult(result));
-        } catch (IOException e) {
-            throw new RuntimeException("Failed to convert result to PB-based message",e);
-        }
-    }
-
-    @Override
-    public void timeseriesAggregate(RpcController controller, AggregateProtos.TimeSeriesAggregateRequest request, RpcCallback<AggregateProtos.AggregateResult> done) {
-        AggregateResult result = null;
-        try {
-            result = this.aggregate(ProtoBufConverter.fromPBEntityDefinition(request.getEntityDefinition()),
-                    ProtoBufConverter.fromPBScan(request.getScan()),
-                    ProtoBufConverter.fromPBStringList(request.getGroupbyFieldsList()),
-                    ProtoBufConverter.fromPBByteArrayList(request.getAggregateFuncTypesList()),
-                    ProtoBufConverter.fromPBStringList(request.getAggregatedFieldsList()),
-                    request.getStartTime(),
-                    request.getEndTime(),
-                    request.getIntervalMin()
-            );
-        } catch (IOException e) {
-            LOG.error("Failed to convert result to PB-based message",e);
-            ResponseConverter.setControllerException(controller, e);
-        }
-        try {
-            done.run(ProtoBufConverter.toPBAggregateResult(result));
-        } catch (IOException e) {
-            LOG.error("Failed to convert result to PB-based message",e);
-            ResponseConverter.setControllerException(controller, e);
-        }
-    }
-
-    private final static Logger LOG = LoggerFactory.getLogger(AggregateProtocolEndPoint.class);
-    /**
-     *
-     * @param entityDefinition
-     * @param scan
-     * @param groupbyFields
-     * @param aggregateFuncTypes
-     * @param aggregatedFields
-     * @return
-     * @throws Exception
-     */
-    @Override
-    public AggregateResult aggregate(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypes, List<String> aggregatedFields) throws IOException {
-//		LOG.info("Using coprocessor instance: "+this);
-        checkNotNull(entityDefinition, "entityDefinition");
-        String serviceName = entityDefinition.getService();
-        LOG.info(this.getLogHeader() +" raw group aggregate on service: " + serviceName + " by: " + groupbyFields + " func: " + AggregateFunctionType.fromBytesList(aggregateFuncTypes) + " fields: " + aggregatedFields);
-        if(LOG.isDebugEnabled()) LOG.debug("SCAN: "+scan.toJSON());
-        long _start = System.currentTimeMillis();
-        final RawAggregator aggregator = new RawAggregator(groupbyFields,AggregateFunctionType.fromBytesList(aggregateFuncTypes),aggregatedFields,entityDefinition);
-        InternalReadReport report = this.asyncStreamRead(entityDefinition, scan, aggregator);
-
-        List<GroupbyKeyValue> keyValues = aggregator.getGroupbyKeyValues();
-        AggregateResult result = new AggregateResult();
-        result.setKeyValues(keyValues);
-        result.setStartTimestamp(report.getStartTimestamp());
-        result.setStopTimestamp(report.getStopTimestamp());
-
-        long _stop = System.currentTimeMillis();
-        LOG.info(String.format("%s: scan = %d rows, group = %d keys, startTime = %d, endTime = %d, spend = %d ms", this.getLogHeader(),report.getCounter(),keyValues.size(),report.getStartTimestamp(),report.getStopTimestamp(),(_stop - _start)));
-
-        return result;
-    }
-
-    /**
-     * TODO: refactor time series aggregator to remove dependency of business logic entity class
-     *
-     * @param entityDefinition
-     * @param scan
-     * @param groupbyFields
-     * @param aggregateFuncTypes
-     * @param aggregatedFields
-     * @param intervalMin
-     * @return
-     * @throws Exception
-     */
-    @Override
-    public AggregateResult aggregate(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypes, List<String> aggregatedFields, long startTime,long endTime,long intervalMin) throws IOException {
-//		LOG.info("Using coprocessor instance: "+this);
-        checkNotNull(entityDefinition, "entityDefinition");
-        String serviceName = entityDefinition.getService();
-        LOG.info(this.getLogHeader() + " time series group aggregate on service: " + serviceName + " by: " + groupbyFields + " func: " + AggregateFunctionType.fromBytesList(aggregateFuncTypes) + " fields: " + aggregatedFields + " intervalMin: " + intervalMin +
-                " from: " + DateTimeUtil.millisecondsToHumanDateWithMilliseconds(startTime) + " to: " + DateTimeUtil.millisecondsToHumanDateWithMilliseconds(endTime));
-        if(LOG.isDebugEnabled()) LOG.debug("SCAN: "+scan.toJSON());
-        long _start = System.currentTimeMillis();
-        final TimeSeriesAggregator aggregator = new TimeSeriesAggregator(groupbyFields,AggregateFunctionType.fromBytesList(aggregateFuncTypes),aggregatedFields,startTime,endTime,intervalMin);
-        InternalReadReport report = this.asyncStreamRead(entityDefinition, scan,aggregator);
-        List<GroupbyKeyValue> keyValues = aggregator.getGroupbyKeyValues();
-
-        AggregateResult result = new AggregateResult();
-        result.setKeyValues(keyValues);
-        result.setStartTimestamp(report.getStartTimestamp());
-        result.setStopTimestamp(report.getStopTimestamp());
-
-        long _stop = System.currentTimeMillis();
-        LOG.info(String.format("%s: scan = %d rows, group = %d keys, startTime = %d, endTime = %d, spend = %d ms", this.getLogHeader(),report.getCounter(),keyValues.size(),report.getStartTimestamp(),report.getStopTimestamp(),(_stop - _start)));
-
-        return result;
-    }
-
-//	/**
-//	 * Initialization per aggregate RPC call
-//	 */
-//	private void _init(){
-//		this.startTimestamp = 0;
-//		this.stopTimestamp = 0;
-//	}
-//
-//	// Min
-//	private long startTimestamp;
-//	// Max
-//	private long stopTimestamp;
-//
-//	public long getStartTimestamp() {
-//		return startTimestamp;
-//	}
-//	public long getStopTimestamp() {
-//		return stopTimestamp;
-//	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResult.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResult.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResult.java
deleted file mode 100755
index 84380eb..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResult.java
+++ /dev/null
@@ -1,129 +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.query.coprocessor;
-
-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.query.aggregate.raw.WritableList;
-import org.apache.hadoop.io.Writable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * Aggregated writable result consist of group-by key-values list and additional meta information
- * 
- * <h2>Schema</h2>
- * <pre>
- * {
- *  keyValues: WritableList&lt;GroupbyKeyValue&gt;,
- *  startTimestamp: long,
- *  stopTimestamp: long
- * }
- * </pre>
- */
-public class AggregateResult implements Writable,Serializable{
-
-	private final static Logger LOG = LoggerFactory.getLogger(AggregateResult.class);
-
-	/**
-	 * Automatically generated default serialVersionUID
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	private final WritableList<GroupbyKeyValue> keyValues;
-	
-	private long startTimestamp = 0;
-	
-	public long getStartTimestamp() {
-		return startTimestamp;
-	}
-
-	public void setStartTimestamp(long startTimestamp) {
-		this.startTimestamp = startTimestamp;
-	}
-
-	public long getStopTimestamp() {
-		return stopTimestamp;
-	}
-
-	public void setStopTimestamp(long stopTimestamp) {
-		this.stopTimestamp = stopTimestamp;
-	}
-
-	public WritableList<GroupbyKeyValue> getKeyValues() {
-		return keyValues;
-	}
-	
-	public void setKeyValues(List<GroupbyKeyValue> keyValues){
-		this.keyValues.addAll(keyValues);
-	}
-	
-	private long stopTimestamp;
-	
-	public AggregateResult(){
-		this.keyValues = new WritableList<GroupbyKeyValue>(GroupbyKeyValue.class);
-	}
-	
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.startTimestamp = in.readLong();
-		this.stopTimestamp = in.readLong();
-		keyValues.readFields(in);
-	}
-	
-	@Override
-	public void write(DataOutput out) throws IOException {
-		out.writeLong(this.startTimestamp);
-		out.writeLong(this.stopTimestamp);
-		keyValues.write(out);
-	}
-
-
-	public static AggregateResult build(List<String[]> keys,List<double[]> values,List<Integer> counts,long startTimestamp,long stopTimestamp){
-		if(keys.size() > values.size()){
-			throw new IllegalArgumentException("keys' size: "+keys.size()+" not equal with values' size: "+values.size());
-		}
-		AggregateResult result = new AggregateResult();
-		result.setStartTimestamp(startTimestamp);
-		result.setStopTimestamp(stopTimestamp);
-		WritableList<GroupbyKeyValue> keyValues = new WritableList<GroupbyKeyValue>(GroupbyKeyValue.class,keys.size());
-
-		for(int i=0;i<keys.size();i++) {
-			String[] key  = keys.get(i);
-			GroupbyKey gkey = new GroupbyKey();
-			for (String k : key) {
-				gkey.addValue(k.getBytes());
-			}
-			GroupbyValue gvalue = new GroupbyValue();
-			double[] value = values.get(i);
-			for(double v:value){
-				gvalue.add(v);
-				gvalue.addMeta(counts.get(i));
-			}
-			keyValues.add(new GroupbyKeyValue(gkey, gvalue));
-		}
-		result.setKeyValues(keyValues);
-		return result;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResultCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResultCallback.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResultCallback.java
deleted file mode 100755
index a68a592..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/AggregateResultCallback.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.query.coprocessor;
-
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.hadoop.hbase.client.coprocessor.Batch;
-
-/**
- * <h1>AggregateResultCallback Interface</h1>
- *
- * Merge coprocessor results from different regions and generate final aggregate result
- * <br/>
- *
- * @see org.apache.hadoop.hbase.client.HTableInterface
- * 		coprocessorExec(Class<T> protocol, byte[] startKey, byte[] endKey, Batch.Call<T,R> callable) throws IOException, Throwable;
- *
- */
-public interface AggregateResultCallback extends Batch.Callback<AggregateProtos.AggregateResult>{
-	/**
-	 * Generate final result after callback from region servers
-	 *
-	 * @return AggregateResult
-	 */
-    AggregateResult result();
-
-    /**
-     * Compatible for older callback interface in 0.94 or older
-     *
-     * @param region
-     * @param row
-     * @param result
-     */
-    void update(byte[] region, byte[] row, AggregateResult result);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/ProtoBufConverter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/ProtoBufConverter.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/ProtoBufConverter.java
deleted file mode 100644
index 060d3ba..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/ProtoBufConverter.java
+++ /dev/null
@@ -1,124 +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.query.coprocessor;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import com.google.protobuf.ByteString;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
-import org.apache.hadoop.io.Writable;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The protocol adapter for migrating from hbase-0.94 to hbase-0.96+
- *
- * @since 6/3/15
- */
-public final class ProtoBufConverter {
-    public static AggregateResult fromPBResult(AggregateProtos.AggregateResult pbResult) throws IOException {
-        ByteArrayDataInput byteArrayDataInput = ByteStreams.newDataInput(pbResult.getByteArray().toByteArray());;
-        AggregateResult result = new AggregateResult();
-        result.readFields(byteArrayDataInput);
-        return result;
-    }
-
-    public static AggregateProtos.AggregateRequest toPBRequest(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypesBytes, List<String> aggregatedFields) throws IOException {
-        AggregateProtos.AggregateRequest.Builder builder = AggregateProtos.AggregateRequest.newBuilder()
-                .setEntityDefinition(AggregateProtos.EntityDefinition.newBuilder().setByteArray(writableToByteString(entityDefinition)))
-                .setScan(toPBScan(scan));
-
-        for(String groupbyField:groupbyFields) builder.addGroupbyFields(groupbyField);
-        for(byte[] funcTypeBytes:aggregateFuncTypesBytes) builder.addAggregateFuncTypes(ByteString.copyFrom(funcTypeBytes));
-        for(String aggField:aggregatedFields) builder.addAggregatedFields(aggField);
-
-        return builder.build();
-    }
-
-    public static ByteString writableToByteString(Writable writable) throws IOException {
-        ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();;
-        writable.write(dataOutput);
-        return ByteString.copyFrom(dataOutput.toByteArray());
-    }
-
-    public static AggregateProtos.TimeSeriesAggregateRequest toPBTimeSeriesRequest(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypesBytes, List<String> aggregatedFields, long startTime, long endTime, long intervalMin) throws IOException {
-        AggregateProtos.TimeSeriesAggregateRequest.Builder builder = AggregateProtos.TimeSeriesAggregateRequest.newBuilder()
-                .setEntityDefinition(AggregateProtos.EntityDefinition.newBuilder().setByteArray(writableToByteString(entityDefinition)))
-                .setScan(toPBScan(scan));
-
-        for(String groupbyField:groupbyFields) builder.addGroupbyFields(groupbyField);
-        for(byte[] funcTypeBytes:aggregateFuncTypesBytes) builder.addAggregateFuncTypes(ByteString.copyFrom(funcTypeBytes));
-        for(String aggField:aggregatedFields) builder.addAggregatedFields(aggField);
-
-        builder.setStartTime(startTime);
-        builder.setEndTime(endTime);
-        builder.setIntervalMin(intervalMin);
-
-        return builder.build();
-    }
-
-    public static EntityDefinition fromPBEntityDefinition(AggregateProtos.EntityDefinition entityDefinition) throws IOException {
-        ByteArrayDataInput byteArrayDataInput = ByteStreams.newDataInput(entityDefinition.getByteArray().toByteArray());;
-        EntityDefinition result = new EntityDefinition();
-        result.readFields(byteArrayDataInput);
-        return result;
-    }
-
-    public static List<String> fromPBStringList(com.google.protobuf.ProtocolStringList groupbyFieldsList) {
-        List<String> result = new ArrayList<>(groupbyFieldsList.size());
-        for(ByteString byteString:groupbyFieldsList.asByteStringList()){
-            result.add(byteString.toStringUtf8());
-        }
-        return result;
-    }
-
-    public static List<byte[]> fromPBByteArrayList(List<ByteString> aggregateFuncTypesList) {
-        List<byte[]> bytesArrayList = new ArrayList<>(aggregateFuncTypesList.size());
-        for(ByteString byteString:aggregateFuncTypesList){
-            bytesArrayList.add(byteString.toByteArray());
-        }
-        return bytesArrayList;
-    }
-
-    /**
-     *
-     * @param scan
-     * @return
-     */
-    public static Scan fromPBScan(ClientProtos.Scan scan) throws IOException {
-        return ProtobufUtil.toScan(scan);
-    }
-
-    public static ClientProtos.Scan toPBScan(Scan scan) throws IOException {
-        return ProtobufUtil.toScan(scan);
-    }
-
-    public static AggregateProtos.AggregateResult toPBAggregateResult(AggregateResult result) throws IOException {
-        ByteArrayDataOutput output = ByteStreams.newDataOutput();
-        result.write(output);
-        return AggregateProtos.AggregateResult.newBuilder()
-                .setByteArray(ByteString.copyFrom(output.toByteArray()))
-                .build();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/_AggregateProtocolEndPoint.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/_AggregateProtocolEndPoint.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/_AggregateProtocolEndPoint.java
deleted file mode 100755
index af213e9..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/_AggregateProtocolEndPoint.java
+++ /dev/null
@@ -1,139 +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 eagle.storage.hbase.query.coprocessor;
-//
-//import eagle.log.entity.meta.EntityDefinition;
-//import eagle.query.aggregate.AggregateFunctionType;
-//import eagle.query.aggregate.raw.GroupbyKeyValue;
-//import eagle.query.aggregate.raw.RawAggregator;
-//import eagle.query.aggregate.timeseries.TimeSeriesAggregator;
-//import eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-//import eagle.storage.hbase.query.coprocessor.impl.AbstractAggregateEndPoint;
-//import hadoop.eagle.common.DateTimeUtil;
-//import com.google.protobuf.RpcCallback;
-//import com.google.protobuf.RpcController;
-//import org.apache.hadoop.hbase.client.Scan;
-//import org.apache.hadoop.hbase.protobuf.ResponseConverter;
-//import org.apache.hadoop.hbase.protobuf.generated.ClientProtos;
-//import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-//
-//import java.io.IOException;
-//import java.util.List;
-//
-///**
-// * Coprocessor EndPoint of protocol <code>AggregateProtocol</code>
-// *
-// * <br/>
-// * <h2>Deployment:</h2>
-// *
-// * Firstly deploy jar files to cluster on local file system or HDFS.<br/><br/>
-// * Secondly configure in <code>hbase-site.xml</code> as following:
-// * <pre>
-// * &lt;property&gt;
-// *   &lt;name>hbase.coprocessor.region.classes&lt;/name&gt;
-// *   &lt;value>AggregateProtocolEndPoint&lt;/value&gt;
-// * &lt;/property&gt;
-// * </pre>
-// * Or register on related hbase tables
-// * <pre>
-// * hbase(main):005:0>  alter 't1', METHOD => 'table_att', 'coprocessor'=>'hdfs:///foo.jar|AggregateProtocolEndPoint|1001|'
-// * </pre>
-// *
-// * <h2>Reference:</h2>
-// * <a href="https://blogs.apache.org/hbase/entry/coprocessor_introduction">
-// * 	Coprocessor Introduction
-// * 	(Authors: Trend Micro Hadoop Group: Mingjie Lai, Eugene Koontz, Andrew Purtell)
-// * </a> <br/><br/>
-// *
-// * @see AggregateProtocol
-// *
-//// * @since : 10/31/14,2014
-// */
-//@SuppressWarnings("unused")
-//public class AggregateProtocolEndPoint extends AbstractAggregateEndPoint {
-//	private final static Logger LOG = LoggerFactory.getLogger(AggregateProtocolEndPoint.class);
-//	/**
-//	 *
-//	 * @param entityDefinition
-//	 * @param scan
-//	 * @param groupbyFields
-//	 * @param aggregateFuncTypes
-//	 * @param aggregatedFields
-//	 * @return
-//	 * @throws Exception
-//	 */
-//	@Override
-//	public AggregateResult aggregate(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypes, List<String> aggregatedFields) throws IOException {
-////		LOG.info("Using coprocessor instance: "+this);
-//		checkNotNull(entityDefinition, "entityDefinition");
-//		String serviceName = entityDefinition.getService();
-//		LOG.info(this.getLogHeader() +" raw group aggregate on service: " + serviceName + " by: " + groupbyFields + " func: " + AggregateFunctionType.fromBytesList(aggregateFuncTypes) + " fields: " + aggregatedFields);
-//		if(LOG.isDebugEnabled()) LOG.debug("SCAN: "+scan.toJSON());
-//		long _start = System.currentTimeMillis();
-//		final RawAggregator aggregator = new RawAggregator(groupbyFields,AggregateFunctionType.fromBytesList(aggregateFuncTypes),aggregatedFields,entityDefinition);
-//		InternalReadReport report = this.asyncStreamRead(entityDefinition, scan, aggregator);
-//
-//		List<GroupbyKeyValue> keyValues = aggregator.getGroupbyKeyValues();
-//		AggregateResult result = new AggregateResult();
-//		result.setKeyValues(keyValues);
-//		result.setStartTimestamp(report.getStartTimestamp());
-//		result.setStopTimestamp(report.getStopTimestamp());
-//
-//		long _stop = System.currentTimeMillis();
-//		LOG.info(String.format("%s: scan = %d rows, group = %d keys, startTime = %d, endTime = %d, spend = %d ms", this.getLogHeader(),report.getCounter(),keyValues.size(),report.getStartTimestamp(),report.getStopTimestamp(),(_stop - _start)));
-//
-//		return result;
-//	}
-//
-//	/**
-//	 * TODO: refactor time series aggregator to remove dependency of business logic entity class
-//	 *
-//	 * @param entityDefinition
-//	 * @param scan
-//	 * @param groupbyFields
-//	 * @param aggregateFuncTypes
-//	 * @param aggregatedFields
-//	 * @param intervalMin
-//	 * @return
-//	 * @throws Exception
-//	 */
-//	@Override
-//	public AggregateResult aggregate(EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<byte[]> aggregateFuncTypes, List<String> aggregatedFields, long startTime,long endTime,long intervalMin) throws IOException {
-////		LOG.info("Using coprocessor instance: "+this);
-//		checkNotNull(entityDefinition, "entityDefinition");
-//		String serviceName = entityDefinition.getService();
-//		LOG.info(this.getLogHeader() + " time series group aggregate on service: " + serviceName + " by: " + groupbyFields + " func: " + AggregateFunctionType.fromBytesList(aggregateFuncTypes) + " fields: " + aggregatedFields + " intervalMin: " + intervalMin +
-//				" from: " + DateTimeUtil.millisecondsToHumanDateWithMilliseconds(startTime) + " to: " + DateTimeUtil.millisecondsToHumanDateWithMilliseconds(endTime));
-//		if(LOG.isDebugEnabled()) LOG.debug("SCAN: "+scan.toJSON());
-//		long _start = System.currentTimeMillis();
-//		final TimeSeriesAggregator aggregator = new TimeSeriesAggregator(groupbyFields,AggregateFunctionType.fromBytesList(aggregateFuncTypes),aggregatedFields,startTime,endTime,intervalMin);
-//		InternalReadReport report = this.asyncStreamRead(entityDefinition, scan,aggregator);
-//		List<GroupbyKeyValue> keyValues = aggregator.getGroupbyKeyValues();
-//
-//		AggregateResult result = new AggregateResult();
-//		result.setKeyValues(keyValues);
-//		result.setStartTimestamp(report.getStartTimestamp());
-//		result.setStopTimestamp(report.getStopTimestamp());
-//
-//		long _stop = System.currentTimeMillis();
-//		LOG.info(String.format("%s: scan = %d rows, group = %d keys, startTime = %d, endTime = %d, spend = %d ms", this.getLogHeader(),report.getCounter(),keyValues.size(),report.getStartTimestamp(),report.getStopTimestamp(),(_stop - _start)));
-//
-//		return result;
-//	}
-//}
\ No newline at end of file


[05/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
deleted file mode 100644
index 88e6187..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
+++ /dev/null
@@ -1,25 +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.
- */
-/**
- * <h2>Consistency Guarantee</h2>
- * <ul>
- *     <li> Rollback all changes if any single entity throws exception to make sure consistency guarantee </li>
- * </ul>
- *
- * @since 3/31/15
- */
-package org.apache.eagle.storage.jdbc.entity;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
deleted file mode 100644
index 79e1b94..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
+++ /dev/null
@@ -1,84 +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.
- */
-/**
- * <h1>Eagle Storage Extension - JDBC</h1>
- *
- * <h2>Configuration</h2>
- * <ul>
- *  <li>
- *     eagle.storage.type: <code>jdbc</code>
- *  </li>
- *  <li>
- *     eagle.storage.adapter:
- *      <code>mysql</code>
- *      <code>mysql</code>
- *      <code>oracle</code>
- *      <code>postgres</code>
- *      <code>mssql</code>
- *      <code>hsqldb</code>
- *      <code>derby</code>
- *  </li>
- *  <li>eagle.storage.username</li>
- *  <li>eagle.storage.password</li>
- *  <li>eagle.storage.database</li>
- *  <li>eagle.storage.connection.url</li>
- *  <li>eagle.storage.connection.props</li>
- *  <li>eagle.storage.driver.class</li>
- *  <li>eagle.storage.connection.max</li>
- * </ul>
- *
- * Sample:
- * <pre>
- *   eagle.storage.type=jdbc
- *   eagle.storage.adapter=mysql
- *   eagle.storage.username=eagle
- *   eagle.storage.password=eagle
- *   eagle.storage.database=eagle
- *   eagle.storage.connection.url=jdbc:mysql://localhost:3306/eagle
- *   eagle.storage.connection.props=encoding=UTF-8
- *   eagle.storage.driver.class=com.mysql.jdbc.Driver
- *   eagle.storage.connection.max=8
- * </pre>
- *
- * <h2>Rowkey</h2>
- *
- * We simply use UUID as row key of entities and use the key as the primary key named "uuid" in RDBMS table schema
- *
- * <h2>Features</h2>
- * <ul>
- *  <li>Support basic entity operation like  CREATE, READ, UPDATE and DELETE</li>
- *  <li>Support flatten aggregation query</li>
- *  <li>Support customized entity field type (JdbcEntityDefinitionManager#registerJdbcSerDeser) </li>
- * </ul>
- *
- * <h2>Dependencies</h2>
- * <ul>
- *     <li>Apache DB - Torque: http://db.apache.org/torque/torque-4.0/index.html</li>
- *     <li>Apache DB - DdlUtils: https://db.apache.org/ddlutils/</li>
- * </ul>
- *
- * <h2>TO-DO</h2>
- * <ul>
- *     <li>Support time-series based aggregation</li>
- *     <li>Investigate why writing performance becomes slower as records count in table increases</li>
- *     <li>Implement batch insert in JdbcEntityWriterImpl</li>
- *     <li>Implement DDL Management to generate default table schema DDL according entity definition</li>
- * </ul>
- *
- * @since 3/26/15
- */
-package org.apache.eagle.storage.jdbc;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
deleted file mode 100644
index 16cee99..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
+++ /dev/null
@@ -1,101 +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.jdbc.schema;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.storage.jdbc.schema.serializer.JdbcSerDeser;
-
-/**
- * @since 3/26/15
- */
-public class JdbcEntityDefinition {
-    private final EntityDefinition internal;
-    public JdbcEntityDefinition(EntityDefinition internal){
-        this.internal = internal;
-    }
-
-    /**
-     *
-     * @return internal entity definition
-     */
-    public EntityDefinition getInternal(){
-        return this.internal;
-    }
-
-    /**
-     * As to GenericMetricEntity, return "${tableName}", else return "${tableName}_${prefix}"
-     *
-     * @return jdbc table name in lowercase
-     */
-    public String getJdbcTableName(){
-        if(this.internal.getService().equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-            return this.internal.getTable().toLowerCase();
-        }else {
-            return String.format("%s_%s", this.internal.getTable(),this.internal.getPrefix()).toLowerCase();
-        }
-    }
-
-    public Class<?> getColumnType(String fieldName) throws NoSuchFieldException {
-        return internal.getEntityClass().getField(fieldName).getType();
-    }
-
-    /**
-     *
-     * TODO: Generate table schema DDL according entity definition
-     *
-     * @link https://db.apache.org/ddlutils/
-     *
-     * CREATE TABLE ${prefix}${tableName}{
-     *      prefix prefix;
-     *      encodedRowkey varchar;
-     *      intField1 int;
-     *      longField bitint;
-     *      tag varchar;
-     * } PRIMARY KEY(encodedRowkey);
-     *
-     * CREATE TABLE ${metricTable}{
-     *      encodedRowkey varchar;
-     *      prefix varchar;
-     *      intField1 int;
-     *      longField bitint;
-     *      tag varchar;
-     * } PRIMARY KEY(rowkey,prefix);
-     *
-     * @param tagsFields
-     * @return
-     */
-    @SuppressWarnings("unused")
-    public String getJdbcSchemaDDL(String[] tagsFields){
-        throw new RuntimeException("TODO: not implemented yet");
-    }
-
-    @SuppressWarnings("unchecked")
-    public JdbcSerDeser getJdbcSerDeser(String columnName) {
-        Qualifier qualifier = this.internal.getQualifierNameMap().get(columnName);
-        if(qualifier == null){
-            return JdbcEntityDefinitionManager.DEFAULT_JDBC_SERDESER;
-        }else {
-            return JdbcEntityDefinitionManager.getJdbcSerDeser(qualifier.getSerDeser().getClass());
-        }
-    }
-
-    public boolean isGenericMetric(){
-        return this.internal.getEntityClass().equals(GenericMetricEntity.class);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
deleted file mode 100644
index cfad442..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
+++ /dev/null
@@ -1,125 +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.jdbc.schema;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.storage.jdbc.schema.serializer.JdbcSerDeser;
-import org.apache.eagle.storage.jdbc.schema.serializer.DefaultJdbcSerDeser;
-
-import java.sql.Types;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * Manage the basic repository of all entity definitions and JDBC specific metadata
- *
- * @since 3/27/15
- */
-public class JdbcEntityDefinitionManager {
-    private final static Map<Class<? extends TaggedLogAPIEntity>,JdbcEntityDefinition> sqlEntityDefinitionCache = new HashMap<Class<? extends TaggedLogAPIEntity>,JdbcEntityDefinition>();
-
-    public static JdbcEntityDefinition getJdbcEntityDefinition(EntityDefinition entityDefinition){
-        Class<? extends TaggedLogAPIEntity> entityClass = entityDefinition.getEntityClass();
-        JdbcEntityDefinition jdbcEntityDefinition = sqlEntityDefinitionCache.get(entityClass);
-        if(jdbcEntityDefinition == null){
-            jdbcEntityDefinition = new JdbcEntityDefinition(entityDefinition);
-            sqlEntityDefinitionCache.put(entityClass, jdbcEntityDefinition);
-        }
-        return jdbcEntityDefinition;
-    }
-
-    public static void load(){
-        // TODO: 1. load all SQLEntityDefinition on init
-        // TODO: 2. do more initializing works
-    }
-
-    public static DefaultJdbcSerDeser DEFAULT_JDBC_SERDESER = new DefaultJdbcSerDeser();
-    private final static Map<Class<?>,JdbcSerDeser> _columnTypeSerDeserMapping = new HashMap<Class<?>, JdbcSerDeser>();
-
-    /**
-     *
-     * @param serDeser
-     */
-    public static void registerJdbcSerDeser(Class<? extends EntitySerDeser> entitySerDeser,JdbcSerDeser serDeser){
-        if(entitySerDeser == null || serDeser == null){
-            throw new IllegalArgumentException("should not be null");
-        }
-        _columnTypeSerDeserMapping.put(entitySerDeser, serDeser);
-    }
-
-    @SuppressWarnings("unchecked")
-    public static <T> JdbcSerDeser<T> getJdbcSerDeser(Class<?> type){
-        JdbcSerDeser serDeser = _columnTypeSerDeserMapping.get(type);
-        if(serDeser == null) {
-            return DEFAULT_JDBC_SERDESER;
-        }else{
-            return serDeser;
-        }
-    }
-
-
-    private final static Map<Class<?>,Integer> _classJdbcType = new HashMap<Class<?>, Integer>();
-
-    /**
-     * Get corresponding SQL types for certain entity field class type
-     *
-     * @see java.sql.Types
-     *
-     * @param fieldType entity field type class
-     * @return java.sql.Types
-     */
-    public static Integer getJdbcType(Class<?> fieldType) {
-        if(!_classJdbcType.containsKey(fieldType)){
-            throw new IllegalArgumentException("Unable to locate jdbc type for: "+fieldType);
-        }
-        return _classJdbcType.get(fieldType);
-    }
-
-    /**
-     * Register fieldType with SQL types
-     *
-     * @see java.sql.Types
-     *
-     * @param fieldType entity field type class
-     * @param jdbcType java.sql.Types
-     */
-    public static void registerJdbcType(Class<?> fieldType, Integer jdbcType){
-        _classJdbcType.put(fieldType,jdbcType);
-    }
-
-    //================================================
-    // Intially bind basic java types with SQL types
-    //================================================
-    static {
-        registerJdbcType(String.class, Types.VARCHAR);
-        registerJdbcType(Integer.class, Types.INTEGER);
-        registerJdbcType(Double.class, Types.DOUBLE);
-        registerJdbcType(Float.class, Types.FLOAT);
-        registerJdbcType(Long.class, Types.BIGINT);
-
-        registerJdbcType(int.class, Types.INTEGER);
-        registerJdbcType(float.class, Types.FLOAT);
-        registerJdbcType(double.class, Types.DOUBLE);
-        registerJdbcType(long.class, Types.BIGINT);
-        registerJdbcType(short.class, Types.INTEGER);
-        registerJdbcType(char[].class, Types.VARCHAR);
-        registerJdbcType(char.class, Types.CHAR);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/JdbcEntityDdlManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/JdbcEntityDdlManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/JdbcEntityDdlManager.java
deleted file mode 100644
index 1e622a5..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/JdbcEntityDdlManager.java
+++ /dev/null
@@ -1,24 +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.jdbc.schema.ddl;
-
-/**
- * @since 3/27/15
- */
-public interface JdbcEntityDdlManager {
-    void init();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
deleted file mode 100644
index b732b31..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
+++ /dev/null
@@ -1,24 +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.
- */
-/**
- * Manage RDBMS schemas according java entity definition
- *
- * TODO: not implemented yet
- *
- * @since 3/31/15
- */
-package org.apache.eagle.storage.jdbc.schema.ddl;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/DefaultJdbcSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/DefaultJdbcSerDeser.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/DefaultJdbcSerDeser.java
deleted file mode 100644
index f096d5f..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/DefaultJdbcSerDeser.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.schema.serializer;
-
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinitionManager;
-import org.apache.torque.util.JdbcTypedValue;
-
-import java.io.IOException;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-/**
- * @since 3/26/15
- */
-public class DefaultJdbcSerDeser<T,R> implements JdbcSerDeser<T> {
-
-    @Override
-    public T readValue(ResultSet result, String fieldName, JdbcEntityDefinition JdbcEntityDefinition) throws IOException {
-        try {
-            Object val = result.getObject(fieldName);
-            return (T) val;
-        } catch (SQLException e) {
-            throw new IOException(e);
-        }
-    }
-
-    /**
-     *
-     * @param fieldValue
-     * @param fieldType
-     * @return
-     */
-    @Override
-    public JdbcTypedValue getJdbcTypedValue(Object fieldValue, Class<?> fieldType) {
-        return new JdbcTypedValue(fieldValue, JdbcEntityDefinitionManager.getJdbcType(fieldType));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JdbcSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JdbcSerDeser.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JdbcSerDeser.java
deleted file mode 100644
index 3d4f793..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JdbcSerDeser.java
+++ /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.
- */
-package org.apache.eagle.storage.jdbc.schema.serializer;
-
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.torque.util.JdbcTypedValue;
-
-import java.io.IOException;
-import java.sql.ResultSet;
-
-/**
- * @since 3/26/15
- */
-public interface JdbcSerDeser<T> {
-    T readValue(ResultSet result, String fieldName, JdbcEntityDefinition JdbcEntityDefinition) throws IOException;
-    JdbcTypedValue getJdbcTypedValue(Object fieldValue, Class<?> fieldType);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JsonJdbcSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JsonJdbcSerDeser.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JsonJdbcSerDeser.java
deleted file mode 100644
index cece94d..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/serializer/JsonJdbcSerDeser.java
+++ /dev/null
@@ -1,57 +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.jdbc.schema.serializer;
-
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.torque.util.JdbcTypedValue;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import java.io.IOException;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Types;
-
-/**
- * @since 3/26/15
- */
-public class JsonJdbcSerDeser<T extends Object> implements JdbcSerDeser<T> {
-    private static ObjectMapper objectMapper = new ObjectMapper();
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public T readValue(ResultSet result, String fieldName, JdbcEntityDefinition jdbcEntityDefinition) throws IOException {
-        try {
-            String jsonString = result.getString(fieldName);
-            return (T) objectMapper.readValue(jsonString, jdbcEntityDefinition.getColumnType(fieldName));
-        } catch (IOException e) {
-           throw e;
-        } catch (SQLException e) {
-            throw new IOException(e);
-        } catch (NoSuchFieldException e) {
-            throw new IOException(e);
-        }
-    }
-
-    @Override
-    public JdbcTypedValue getJdbcTypedValue(Object fieldValue, Class<?> fieldType) {
-        try {
-            return new JdbcTypedValue(objectMapper.writeValueAsString(objectMapper.writeValueAsString(fieldValue)), Types.VARCHAR);
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
deleted file mode 100644
index fffc7b0..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
+++ /dev/null
@@ -1,38 +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.jdbc.spi;
-
-import org.apache.eagle.storage.jdbc.JdbcStorage;
-import org.apache.eagle.storage.spi.DataStorageServiceProvider;
-
-/**
- * @since 3/20/15
- */
-@SuppressWarnings("unused")
-public class JdbcStorageServiceProvider implements DataStorageServiceProvider<JdbcStorage> {
-    private final static String JDBC = "jdbc";
-
-    @Override
-    public String getType() {
-        return JDBC;
-    }
-
-    @Override
-    public JdbcStorage getStorage() {
-        return new JdbcStorage();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
deleted file mode 100644
index 61601a2..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.storage.jdbc.spi.JdbcStorageServiceProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
deleted file mode 100644
index c0ba13c..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
+++ /dev/null
@@ -1,233 +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.jdbc;
-
-import junit.framework.Assert;
-import org.apache.commons.lang.time.StopWatch;
-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.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;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.UUID;
-
-public class TestJdbcStorage {
-
-    JdbcStorage storage;
-    EntityDefinition entityDefinition;
-    final static Logger LOG = LoggerFactory.getLogger(TestJdbcStorage.class);
-
-    @Before
-    public void setUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
-        storage = (JdbcStorage) DataStorageManager.getDataStorageByEagleConfig();
-        storage.init();
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-    }
-
-    //@Test
-    public void testReadBySimpleQuery() throws QueryCompileException, IOException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime("2014-01-06 01:40:02");
-        rawQuery.setEndTime("2016-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult<TestTimeSeriesAPIEntity> result = storage.query(query, entityDefinition);
-        Assert.assertNotNull(result);
-    }
-
-//    @Test
-    public void testReadByComplexQuery() throws QueryCompileException, IOException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"cluster\" AND @field4 > 1000 AND @field7 CONTAINS \"subtext\" OR @jobID =\"jobID\" ]{@field1,@field2}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2016-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        storage.query(query,entityDefinition);
-    }
-
-    //@Test
-    public void testWrite() throws IOException {
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() > 0);
-    }
-
-    //@Test
-    public void testWriteAndRead() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-            // init read in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime+1));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult queryResult = storage.query(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    //@Test
-    public void testWriteAndAggregation() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-        // init read in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]<@c...@datacenter>{count,max(@field1),min(@field2),sum(@field3)}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult queryResult = storage.query(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1);
-    }
-
-    //@Test
-    public void testWriteAndDelete() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-        // delete in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        ModifyResult<String> queryResult = storage.delete(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    //@Test
-    public void testWriteAndUpdate() throws IOException, QueryCompileException {
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-
-        // record insertion finish time
-        ModifyResult<String> queryResult = storage.update(entityList, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    /**
-     * TODO: Investigate why writing performance becomes slower as records count increases
-     *
-     * 1) Wrote 100000 records in about 18820 ms for empty table
-     * 2) Wrote 100000 records in about 35056 ms when 1M records in table
-     *
-     * @throws IOException
-     */
-    //@Test
-    public void testWriterPerformance() throws IOException {
-        StopWatch stopWatch = new StopWatch();
-        stopWatch.start();
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 100000){
-            entityList.add(newInstance());
-            if(entityList.size()>=1000) {
-                ModifyResult<String> result = storage.create(entityList, entityDefinition);
-                Assert.assertNotNull(result);
-                entityList.clear();
-            }
-        }
-        stopWatch.stop();
-        LOG.info("Wrote 100000 records in "+stopWatch.getTime()+" ms");
-    }
-
-
-    private TestTimeSeriesAPIEntity newInstance(){
-        TestTimeSeriesAPIEntity instance = new TestTimeSeriesAPIEntity();
-        instance.setField1(123);
-        instance.setField2(234);
-        instance.setField3(1231312312l);
-        instance.setField4(12312312312l);
-        instance.setField5(123123.12312);
-        instance.setField6(-12312312.012);
-        instance.setField7(UUID.randomUUID().toString());
-        instance.setTags(new HashMap<String, String>() {{
-            put("cluster", "c4ut");
-            put("datacenter", "d4ut");
-        }});
-        instance.setTimestamp(System.currentTimeMillis());
-        return instance;
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
deleted file mode 100644
index 78b0210..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
+++ /dev/null
@@ -1,55 +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.jdbc.conn;
-
-import junit.framework.Assert;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-/**
- * @since 3/27/15
- */
-public class TestConnectionFactory {
-    final static Logger LOG = LoggerFactory.getLogger(TestConnectionFactory.class);
-
-//    @Test
-    public void testConnection(){
-        try {
-            Connection connection = ConnectionManagerFactory.getInstance().getConnection();
-            Statement statement = connection.createStatement();
-            ResultSet resultSet = statement.executeQuery("select 1");
-            Assert.assertTrue(resultSet.next());
-            Assert.assertEquals(1, resultSet.getInt(1));
-        } catch (SQLException e) {
-            LOG.error(e.getMessage(),e);
-            Assert.fail(e.getMessage());
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
deleted file mode 100644
index a5cb399..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
+++ /dev/null
@@ -1,88 +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.jdbc.criteria;
-
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.criteria.impl.QueryCriteriaBuilder;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.operation.RawQuery;
-import org.apache.torque.criteria.Criteria;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @since 3/27/15
- */
-public class TestQueryCriteriaBuilder {
-    private final static Logger LOG = LoggerFactory.getLogger(TestQueryCriteriaBuilder.class);
-
-    @Before
-    public void setUp() throws Exception {
-        ConnectionManagerFactory.getInstance();
-    }
-
-    //@Test
-    public void testSimpleQueryBuilder() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"thecluster\" AND @field4 > 1000 ]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    //@Test
-    public void testSimpleQueryBuilder2() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"thecluster\" AND @field4 > 1000 OR @field5 < 10000 ]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    //@Test
-    public void testSimpleMetricQueryBuilder() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("GenericMetricService[@cluster=\"thecluster\"]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setMetricName("metric.name.value");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
deleted file mode 100644
index a708aee..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
+++ /dev/null
@@ -1,119 +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.jdbc.criteria;
-
-import org.apache.commons.configuration.BaseConfiguration;
-import org.apache.commons.configuration.Configuration;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.Torque;
-import org.apache.torque.TorqueException;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.criteria.SqlEnum;
-import org.apache.torque.sql.Query;
-import org.apache.torque.sql.SqlBuilder;
-import org.apache.torque.util.BasePeerImpl;
-import org.apache.torque.util.ColumnValues;
-import org.apache.torque.util.JdbcTypedValue;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.*;
-import java.util.UUID;
-
-/**
- * @since 3/27/15
- */
-public class TestTorque {
-    final static Logger LOG = LoggerFactory.getLogger(TestTorque.class);
-
-    //@Before
-    public void setUp() throws TorqueException {
-        Configuration configuration = new BaseConfiguration();
-        configuration.addProperty("torque.database.default","eagle");
-        configuration.addProperty("torque.database.eagle.adapter","mysql");
-        configuration.addProperty("torque.dsfactory.eagle.factory","org.apache.torque.dsfactory.SharedPoolDataSourceFactory");
-
-        configuration.addProperty("torque.dsfactory.eagle.connection.driver","org.gjt.mm.mysql.Driver");
-        configuration.addProperty("torque.dsfactory.eagle.connection.url","jdbc:mysql://localhost:3306/eagle");
-        configuration.addProperty("torque.dsfactory.eagle.connection.user","eagle");
-        configuration.addProperty("torque.dsfactory.eagle.connection.password","eagle");
-
-        Torque.init(configuration);
-    }
-
-    //@Test
-    public void testSelect() throws TorqueException, SQLException {
-        Criteria crit = new Criteria();
-        crit.setDbName("eagle");
-        crit.addSelectColumn(new ColumnImpl("column1"));
-        crit.addSelectColumn(new ColumnImpl("column2"));
-        crit.addSelectColumn(new ColumnImpl("column2/100"));
-
-        crit.where(new ColumnImpl("column1"),SqlEnum.GREATER_EQUAL);
-
-        crit.addFrom("tableName");
-        crit.addAlias("column1", "c1");
-        crit.addGroupByColumn(new ColumnImpl("column1"));
-        crit.addAscendingOrderByColumn(new ColumnImpl("column3"));
-        crit.setLimit(1000);
-
-        Query query = SqlBuilder.buildQuery(crit);
-
-        String sql = query.toString();
-        System.out.println(sql);
-
-        Connection connection = Torque.getConnection();
-        PreparedStatement statement = connection.prepareStatement(sql);
-        statement.setInt(1,1000);
-
-        try {
-            ResultSet result = statement.executeQuery();
-        }catch (SQLException ex){
-            LOG.warn(ex.getMessage(),ex);
-        } finally {
-            connection.close();
-        }
-    }
-
-    //@Test
-    public void testDelete() throws TorqueException, SQLException {
-        Criteria crit = new Criteria();
-        crit.where(new ColumnImpl("unittest_testtsentity", "field1"), 2.0);
-        System.out.println(crit.toString());
-
-        BasePeerImpl basePeer = new BasePeerImpl();
-        basePeer.setDatabaseName("eagle");
-        basePeer.doDelete(crit);
-    }
-
-
-    //@Test
-    public void testInsert() throws TorqueException {
-        BasePeerImpl basePeer = new BasePeerImpl();
-        basePeer.setDatabaseName("eagle");
-        ColumnValues columnValues = new ColumnValues();
-        columnValues.put(new ColumnImpl("unittest_testtsentity","uuid"),new JdbcTypedValue(UUID.randomUUID().toString(),Types.VARCHAR));
-        columnValues.put(new ColumnImpl("unittest_testtsentity","field1"),new JdbcTypedValue(34,Types.INTEGER));
-        basePeer.doInsert(columnValues);
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/schema/TestDllUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/schema/TestDllUtils.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/schema/TestDllUtils.java
deleted file mode 100644
index b26173b..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/schema/TestDllUtils.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.schema;
-
-import org.apache.ddlutils.model.Column;
-import org.apache.ddlutils.model.Table;
-import org.apache.ddlutils.model.TypeMap;
-import org.junit.Test;
-
-public class TestDllUtils {
-    @Test
-    public void testTable(){
-        Table table = new Table();
-        Column column = new Column();
-        column.setName("id");
-        column.setDefaultValue("-1");
-        column.setDescription("rowkey");
-        column.setPrimaryKey(true);
-        column.setType(TypeMap.VARCHAR);
-        table.addColumn(column);
-        table.setName("eagle_table");
-
-        System.out.println(table.toString());
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index 61a899f..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +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.
-
-eagle {
-	service {
-		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
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
deleted file mode 100644
index 48bc367..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
+++ /dev/null
@@ -1,43 +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.
- *
- */
-
-SET NAMES utf8;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
---  Table structure for `unittest_testtsentity`
--- ----------------------------
-DROP TABLE IF EXISTS `unittest_testtsentity`;
-CREATE TABLE `unittest_testtsentity` (
-  `uuid` varchar(255) NOT NULL,
-  `field1` int(11) DEFAULT NULL,
-  `field2` int(11) DEFAULT NULL,
-  `field3` bigint(20) DEFAULT NULL,
-  `field4` bigint(20) DEFAULT NULL,
-  `field5` double DEFAULT NULL,
-  `field6` double DEFAULT NULL,
-  `field7` varchar(255) DEFAULT NULL,
-  `cluster` varchar(255) DEFAULT NULL,
-  `datacenter` varchar(255) DEFAULT NULL,
-  `timestamp` bigint(20) DEFAULT NULL,
-  `jobid` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`uuid`),
-  KEY `partition` (`cluster`,`datacenter`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-SET FOREIGN_KEY_CHECKS = 1;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
deleted file mode 100644
index d59ded6..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +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.
-
-log4j.rootLogger=INFO, stdout
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/pom.xml b/eagle-core/eagle-query/pom.xml
deleted file mode 100644
index b6068ee..0000000
--- a/eagle-core/eagle-query/pom.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-core</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-query-parent</artifactId>
-	<packaging>pom</packaging>
-
-	<name>eagle-query-parent</name>
-
-	<modules>
-		<module>eagle-common</module>
-		<module>eagle-antlr</module>
-		<module>eagle-entity-base</module>
-		<module>eagle-audit-base</module>
-		<module>eagle-client-base</module>
-		<module>eagle-service-base</module>
-        <module>eagle-query-base</module>
-        <module>eagle-storage-base</module>
-        <module>eagle-storage-hbase</module>
-        <module>eagle-storage-jdbc</module>
-    </modules>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>log4j-over-slf4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.carrotsearch</groupId>
-			<artifactId>junit-benchmarks</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.h2database</groupId>
-			<artifactId>h2</artifactId>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<profiles>
-		<profile>
-			<id>dev</id>
-			<properties>
-				<env>dev</env>
-			</properties>
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-		</profile>
-		<profile>
-			<id>test</id>
-			<properties>
-				<env>test</env>
-			</properties>
-		</profile>
-		<profile>
-			<id>prod</id>
-			<properties>
-				<env>prod</env>
-			</properties>
-		</profile>
-	</profiles>
-
-	<build>
-		<finalName>${project.name}-${project.version}</finalName>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>test-jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-		<resources>
-			<resource>
-				<directory>${basedir}/src/main/config/${env}</directory>
-			</resource>
-			<resource>
-				<directory>${basedir}/src/main/resources</directory>
-			</resource>
-		</resources>
-		<testResources>
-			<testResource>
-				<directory>${basedir}/src/test/config/${env}</directory>
-			</testResource>
-			<testResource>
-				<directory>${basedir}/src/test/resources</directory>
-			</testResource>
-		</testResources>
-	</build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
deleted file mode 100644
index 10b1dfb..0000000
--- a/eagle-core/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-parent</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-    <artifactId>eagle-core</artifactId>
-    <packaging>pom</packaging>
-    <name>eagle core</name>
-    <description>Distributed Real-time Monitoring and Alerting Framework Core</description>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <modules>
-        <module>eagle-data-process</module>
-        <module>eagle-policy</module>
-        <module>eagle-alert</module>
-        <module>eagle-query</module>
-   		<module>eagle-machinelearning</module>
-        <module>eagle-embed</module>
-        <module>eagle-metric</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-docker
----------------------------------------------------------------------
diff --git a/eagle-docker b/eagle-docker
deleted file mode 100755
index f581845..0000000
--- a/eagle-docker
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# NOTICE: This script is developed and maintained by Apache Eagle community under Apache Softwarw Foundation but not from official Docker product or community.
-
-$(dirname $0)/eagle-external/eagle-docker/bin/eagle-docker.sh $@

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/pom.xml b/eagle-examples/eagle-topology-example/pom.xml
deleted file mode 100644
index 8b75d72..0000000
--- a/eagle-examples/eagle-topology-example/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-examples</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-topology-example</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-query-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/resources</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/eagle-topology-example-assembly.xml</descriptor>
-                    <finalName>eagle-topology-example-${project.version}</finalName>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml b/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
deleted file mode 100644
index 0acf619..0000000
--- a/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.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.
-  -->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>assembly</id>
-    <formats>
-        <format>jar</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/</outputDirectory>
-            <useProjectArtifact>false</useProjectArtifact>
-            <unpack>true</unpack>
-            <scope>runtime</scope>
-            <unpackOptions>
-                <excludes>
-                    <exclude>**/application.conf</exclude>
-                    <exclude>**/defaults.yaml</exclude>
-                    <exclude>**/storm.yaml</exclude>
-                    <exclude>**/storm.yaml.1</exclude>
-                    <exclude>**/log4j.properties</exclude>
-                </excludes>
-            </unpackOptions>
-            <excludes>
-                <exclude>org.apache.storm:storm-core</exclude>
-                <exclude>org.slf4j:slf4j-api</exclude>
-                <exclude>org.slf4j:log4j-over-slf4j</exclude>
-                <exclude>org.slf4j:slf4j-log4j12</exclude>
-                <exclude>log4j:log4j</exclude>
-                <exclude>asm:asm</exclude>
-                <exclude>org.apache.log4j.wso2:log4j</exclude>
-            </excludes>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>${project.build.outputDirectory}</directory>
-            <outputDirectory>/</outputDirectory>
-            <excludes>
-            	<exclude>application.conf</exclude>
-            	<exclude>log4j.properties</exclude>
-            	<exclude>**/storm.yaml.1</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
deleted file mode 100644
index a5e39a5..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
+++ /dev/null
@@ -1,81 +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.example.notificationplugin;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * Created on 2/16/16.
- */
-public class NotificationPluginTestMain {
-    public static void main(String[] args){
-        System.setProperty("config.resource", "/application-plugintest.conf");
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        env.fromSpout(createProvider(env.getConfig())).withOutputFields(2).nameAs("testSpout").alertWithConsumer("testStream", "testExecutor");
-        env.execute();
-    }
-
-    public static StormSpoutProvider createProvider(Config config) {
-        return new StormSpoutProvider(){
-
-            @Override
-            public BaseRichSpout getSpout(Config context) {
-                return new TestSpout();
-            }
-        };
-    }
-
-    public static class TestSpout extends BaseRichSpout {
-        private static final Logger LOG = LoggerFactory.getLogger(TestSpout.class);
-        private SpoutOutputCollector collector;
-        public TestSpout() {
-        }
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-        }
-
-        @Override
-        public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-            this.collector = collector;
-        }
-
-        @Override
-        public void nextTuple() {
-            Utils.sleep(5000);
-            LOG.info("emitted tuple ...");
-            Map<String, Object> map = new TreeMap<>();
-            map.put("testAttribute", "testValue");
-            collector.emit(new Values("testStream", map));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
deleted file mode 100644
index 58dfe48..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
+++ /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.
- */
-package org.apache.eagle.example.persist;
-
-import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer;
-
-/**
- * Created on 1/4/16.
- */
-public class MetricSerializer implements SpoutKafkaMessageDeserializer {
-    @Override
-    public Object deserialize(byte[] arg0) {
-        String logLine = new String(arg0);
-
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
deleted file mode 100644
index 8f105fc..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
+++ /dev/null
@@ -1,115 +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.example.persist;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.core.StorageType;
-import org.apache.eagle.datastream.core.StreamProducer;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * Created on 1/4/16.
- *
- * This test demonstrates how user could use the new aggregate and persist feature for case like metrics processing&storage.
- *
- */
-public class PersistTopoTestMain {
-
-    public static void main(String[] args) {
-//        System.setProperty("config.resource", "application.conf");
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        StormSpoutProvider provider = createProvider(env.getConfig());
-        execWithDefaultPartition(env, provider);
-    }
-
-    @SuppressWarnings("unchecked")
-    public static void execWithDefaultPartition(StormExecutionEnvironment env, StormSpoutProvider provider) {
-        StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer");
-        StreamProducer filter = source;
-
-        // required : persistTestEventStream schema be created in metadata manager
-        // required : policy for aggregateExecutor1 be created in metadata manager
-        StreamProducer aggregate = filter.aggregate(Arrays.asList("persistTestEventStream"), "aggregateExecutor1", new PartitionStrategy() {
-            @Override
-            public int balance(String key, int buckNum) {
-                return 0;
-            }
-        });
-
-        StreamProducer persist = aggregate.persist("persistExecutor1", StorageType.KAFKA());
-
-        env.execute();
-    }
-
-    public static StormSpoutProvider createProvider(Config config) {
-
-        return new StormSpoutProvider(){
-
-            @Override
-            public BaseRichSpout getSpout(Config context) {
-                return new StaticMetricSpout();
-            }
-        };
-    }
-
-    public static class StaticMetricSpout extends BaseRichSpout {
-
-        private long base;
-        private SpoutOutputCollector collector;
-
-        public StaticMetricSpout() {
-            base = System.currentTimeMillis();
-        }
-
-        private Random cpuRandom = new Random();
-        private Random memRandom = new Random();
-        private static final long FULL_MEM_SIZE_BYTES = 512  * 1024 * 1024 * 1024;// 16g memory upbound limit
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-            declarer.declare(new Fields("timestamp", "host", "cpu", "mem"));
-        }
-
-        @Override
-        public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-            this.collector = collector;
-        }
-
-        @Override
-        public void nextTuple() {
-            Utils.sleep(100);
-            base = base + 100;// with fix steps..
-            long mem = Double.valueOf(memRandom.nextGaussian() * FULL_MEM_SIZE_BYTES).longValue();
-            collector.emit(new Values(base, "host", cpuRandom.nextInt(100), mem));
-        }
-    }
-
-}


[43/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
deleted file mode 100644
index 8ab290e..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/executor/AlertExecutorCreationUtils.java
+++ /dev/null
@@ -1,111 +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.alert.executor;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.policy.DefaultPolicyPartitioner;
-import org.apache.eagle.policy.PolicyPartitioner;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigValue;
-
-/**
- * Create alert executors and provide callback for programmer to link alert executor to immediate parent executors
- *
- * <br/><br/>
- * Explanations for programId, alertExecutorId and policy<br/><br/>
- * - programId - distributed or single-process program for example one storm topology<br/>
- * - alertExecutorId - one process/thread which executes multiple policies<br/>
- * - policy - some rules to be evaluated<br/>
- *
- * <br/>
- *
- * Normally the mapping is like following:
- * <pre>
- * programId (1:N) alertExecutorId
- * alertExecutorId (1:N) policy
- * </pre>
- */
-public class AlertExecutorCreationUtils {
-	private final static Logger LOG = LoggerFactory.getLogger(AlertExecutorCreationUtils.class);
-
-
-    /**
-     * Build DAG Tasks based on persisted alert definition and schemas from eagle store.
-     *
-     * <h3>Require configuration:</h3>
-     *
-     * <ul>
-     * <li>eagleProps.site: program site id.</li>
-     * <li>eagleProps.dataSource: program data source.</li>
-     * <li>alertExecutorConfigs: only configured executor will be built into execution tasks.</li>
-     * </ul>
-     *
-     * <h3>Steps:</h3>
-     *
-     * <ol>
-     * <li>(upstreamTasks) => Map[streamName:String,upstreamTask:Task]</li>
-     * <li>(dataSource) => Map[alertExecutorId:String,streamName:List[String]]</li>
-     * <li>(site,dataSource) => Map[alertExecutorId,Map[policyId,alertDefinition]]</li>
-     * <li>(config["alertExecutorConfigs"]) => AlertExecutor(alertExecutorID, partitioner, numPartitions, partitionSeq, alertDefs, alertDefDAO, sourceStreams)[]</li>
-     * </ol>
-     */
-	public static AlertExecutor[] createAlertExecutors(Config config, PolicyDefinitionDAO<AlertDefinitionAPIEntity> alertDefDAO,
-			List<String> streamNames, String alertExecutorId) throws Exception{
-		// Read `alertExecutorConfigs` from configuration and get config for this alertExecutorId
-        int numPartitions =1;
-        String partitionerCls = DefaultPolicyPartitioner.class.getCanonicalName();
-        String alertExecutorConfigsKey = "alertExecutorConfigs";
-        if(config.hasPath(alertExecutorConfigsKey)) {
-            Map<String, ConfigValue> alertExecutorConfigs = config.getObject(alertExecutorConfigsKey);
-            if(alertExecutorConfigs !=null && alertExecutorConfigs.containsKey(alertExecutorId)) {
-                Map<String, Object> alertExecutorConfig = (Map<String, Object>) alertExecutorConfigs.get(alertExecutorId).unwrapped();
-                int parts = 0;
-                if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism"));
-                numPartitions = parts == 0 ? 1 : parts;
-                if(alertExecutorConfig.containsKey("partitioner")) partitionerCls = (String) alertExecutorConfig.get("partitioner");
-            }
-        }
-
-        return createAlertExecutors(alertDefDAO, streamNames, alertExecutorId, numPartitions, partitionerCls);
-	}
-
-    /**
-     * Build alert executors and assign alert definitions between these executors by partitioner (alertExecutorConfigs["${alertExecutorId}"]["partitioner"])
-     */
-	public static AlertExecutor[] createAlertExecutors(PolicyDefinitionDAO alertDefDAO, List<String> sourceStreams,
-                                                          String alertExecutorID, int numPartitions, String partitionerCls) throws Exception{
-		LOG.info("Creating alert executors with alertExecutorID: " + alertExecutorID + ", numPartitions: " + numPartitions + ", Partition class is: "+ partitionerCls);
-
-        // TODO: Create sourceStreams with alertExecutorID into AlertExecutorService
-
-		PolicyPartitioner partitioner = (PolicyPartitioner)Class.forName(partitionerCls).newInstance();
-		AlertExecutor[] alertExecutors = new AlertExecutor[numPartitions];
-        String[] _sourceStreams = sourceStreams.toArray(new String[0]);
-
-		for(int i = 0; i < numPartitions; i++){
-			alertExecutors[i] = new AlertExecutor(alertExecutorID, partitioner, numPartitions, i, alertDefDAO,_sourceStreams);
-		}	
-		return alertExecutors;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/notification/AlertNotificationExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/notification/AlertNotificationExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/notification/AlertNotificationExecutor.java
deleted file mode 100644
index b024c39..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/notification/AlertNotificationExecutor.java
+++ /dev/null
@@ -1,128 +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.alert.notification;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import org.apache.eagle.notification.plugin.NotificationPluginManagerImpl;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.policy.DynamicPolicyLoader;
-import org.apache.eagle.policy.PolicyLifecycleMethods;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.datastream.JavaStormStreamExecutor1;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.typesafe.config.Config;
-import scala.Tuple1;
-
-/**
- * notify alert by email, kafka message, storage or other means
- */
-public class AlertNotificationExecutor extends JavaStormStreamExecutor1<String> implements PolicyLifecycleMethods<AlertDefinitionAPIEntity> {
-	private static final long serialVersionUID = 1690354365435407034L;
-	private static final Logger LOG = LoggerFactory.getLogger(AlertNotificationExecutor.class);
-	private Config config;
-	/** Notification Manager - Responsible for forward and invoke configured Notification Plugin **/
-	private NotificationPluginManagerImpl notificationManager;
-
-	private List<String> alertExecutorIdList;
-	private PolicyDefinitionDAO dao;
-
-
-    public AlertNotificationExecutor(List<String> alertExecutorIdList, PolicyDefinitionDAO dao){
-		this.alertExecutorIdList = alertExecutorIdList;
-		this.dao = dao;
-	}
-
-	@Override
-	public void init() {
-		String site = config.getString("eagleProps.site");
-		String application = config.getString("eagleProps.application");
-		Map<String, Map<String, AlertDefinitionAPIEntity>> initialAlertDefs;
-		try {
-			initialAlertDefs = dao.findActivePoliciesGroupbyExecutorId( site, application );
-		}
-		catch (Exception ex) {
-			LOG.error("fail to initialize initialAlertDefs: ", ex);
-			throw new IllegalStateException("fail to initialize initialAlertDefs: ", ex);
-		}
-
-		if(initialAlertDefs == null || initialAlertDefs.isEmpty()){
-			LOG.warn("No alert definitions found for site: "+site+", application: "+ application);
-		}
-		try{
-			notificationManager = new NotificationPluginManagerImpl(config);
-		}catch (Exception ex ){
-			LOG.error("Fail to initialize NotificationManager: ", ex);
-			throw new IllegalStateException("Fail to initialize NotificationManager: ", ex);
-		}
-
-		DynamicPolicyLoader<AlertDefinitionAPIEntity> policyLoader = DynamicPolicyLoader.getInstanceOf(AlertDefinitionAPIEntity.class);
-		policyLoader.init(initialAlertDefs, dao, config);
-		for (String alertExecutorId : alertExecutorIdList) {
-			policyLoader.addPolicyChangeListener(alertExecutorId, this);
-		}
-	}
-
-	@Override
-	public void prepareConfig(Config config) {
-		this.config = config;
-	}
-
-	@Override
-	public void flatMap(java.util.List<Object> input, Collector<Tuple1<String>> outputCollector){
-		AlertAPIEntity alertEntity = (AlertAPIEntity) input.get(1);
-		processAlerts(Arrays.asList(alertEntity));
-	}
-
-	private void processAlerts(List<AlertAPIEntity> list) {
-		for (AlertAPIEntity entity : list) {
-			notificationManager.notifyAlert(entity);
-		}
-	}
-
-	@Override
-	public void onPolicyCreated(Map<String, AlertDefinitionAPIEntity> added) {
-		if(LOG.isDebugEnabled()) LOG.debug(" alert notification config changed : " + added);
-		for(AlertDefinitionAPIEntity alertDef : added.values()){
-			LOG.info("alert notification config really changed " + alertDef);
-			notificationManager.updateNotificationPlugins( alertDef , false );
-		}
-	}
-
-	@Override
-	public void onPolicyChanged(Map<String, AlertDefinitionAPIEntity> changed) {
-		if(LOG.isDebugEnabled()) LOG.debug("alert notification config to be added : " + changed);
-		for(AlertDefinitionAPIEntity alertDef : changed.values()){
-			LOG.info("alert notification config really added " + alertDef);
-			notificationManager.updateNotificationPlugins( alertDef , false );
-		}
-	}
-
-	@Override
-	public void onPolicyDeleted(Map<String, AlertDefinitionAPIEntity> deleted) {
-		if(LOG.isDebugEnabled()) LOG.debug("alert notification config to be deleted : " + deleted);
-		for(AlertDefinitionAPIEntity alertDef : deleted.values()){
-			LOG.info("alert notification config really deleted " + alertDef);
-			notificationManager.updateNotificationPlugins( alertDef , true );
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/AlertPersistExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/AlertPersistExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/AlertPersistExecutor.java
deleted file mode 100644
index 61bb7dc..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/AlertPersistExecutor.java
+++ /dev/null
@@ -1,56 +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.alert.persist;
-
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import com.typesafe.config.Config;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.datastream.JavaStormStreamExecutor1;
-import scala.Tuple1;
-
-import java.util.Arrays;
-
-public class AlertPersistExecutor extends JavaStormStreamExecutor1<String> {
-
-	private static final long serialVersionUID = 1L;
-	private Config config;
-	private EaglePersist persist;
-
-	public AlertPersistExecutor(){
-	}
-    @Override
-	public void prepareConfig(Config config) {
-		this.config = config;		
-	}
-
-    @Override
-	public void init() {
-		String host = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-		int port = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-		String username = config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME)
-				? config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.USERNAME) : null;
-		String password = config.hasPath(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD)
-				? config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PASSWORD) : null;
-		this.persist = new EaglePersist(host, port, username, password);
-	}
-
-    @Override
-    public void flatMap(java.util.List<Object> input, Collector<Tuple1<String>> outputCollector){
-        persist.doPersist(Arrays.asList((AlertAPIEntity)(input.get(1))));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/EaglePersist.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/EaglePersist.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/EaglePersist.java
deleted file mode 100644
index ebba518..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/persist/EaglePersist.java
+++ /dev/null
@@ -1,71 +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.alert.persist;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class EaglePersist {
-		
-	private static Logger LOG = LoggerFactory.getLogger(EaglePersist.class);
-	private String eagleServiceHost;
-	private int eagleServicePort;
-	private String username;
-	private String password;
-
-	public EaglePersist(String eagleServiceHost, int eagleServicePort) {
-		this(eagleServiceHost, eagleServicePort, null, null);
-	}
-
-	public EaglePersist(String eagleServiceHost, int eagleServicePort, String username, String password) {
-		this.eagleServiceHost = eagleServiceHost;
-		this.eagleServicePort = eagleServicePort;
-		this.username = username;
-		this.password = password;
-	}
-	
-	public boolean doPersist(List<? extends TaggedLogAPIEntity> list) {
-		if (list.isEmpty()) return false;
-		LOG.info("Going to persist entities, type: " + " " + list.get(0).getClass().getSimpleName() + ", list size: " + list.size());
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(eagleServiceHost, eagleServicePort, username, password);
-			GenericServiceAPIResponseEntity<String> response = client.create(list);
-			client.close();
-			if (response.isSuccess()) {
-				LOG.info("Successfully create entities " + list.toString());
-				return true;
-			}
-			else {
-				LOG.error("Fail to create entities");
-				return false;
-			}
-		}
-		catch (Exception ex) {
-			LOG.error("Got an exception in persisting entities" + ex.getMessage(), ex);
-			return false;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java b/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
deleted file mode 100644
index d1e1bdc..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/SiddhiAlertAPIEntityRender.java
+++ /dev/null
@@ -1,109 +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.alert.siddhi;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.ResultRender;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.common.UrlBuilder;
-import org.apache.eagle.policy.siddhi.SiddhiPolicyEvaluator;
-import org.apache.eagle.policy.siddhi.SiddhiQueryCallbackImpl;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Serializable;
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-public class SiddhiAlertAPIEntityRender implements ResultRender<AlertDefinitionAPIEntity, AlertAPIEntity>, Serializable {
-
-	public static final Logger LOG = LoggerFactory.getLogger(SiddhiAlertAPIEntityRender.class);
-	public static final String source = ManagementFactory.getRuntimeMXBean().getName();
-
-	@Override
-	@SuppressWarnings("unchecked")
-	public AlertAPIEntity render(Config config, List<Object> results, PolicyEvaluationContext<AlertDefinitionAPIEntity, AlertAPIEntity> siddhiAlertContext, long timestamp) {
-		List<String> rets = SiddhiQueryCallbackImpl.convertToString(results);
-		SiddhiPolicyEvaluator<AlertDefinitionAPIEntity, AlertAPIEntity> evaluator = (SiddhiPolicyEvaluator<AlertDefinitionAPIEntity, AlertAPIEntity>) siddhiAlertContext.evaluator;
-		String alertExecutorId = siddhiAlertContext.alertExecutor.getExecutorId();
-		AlertAPIEntity entity = new AlertAPIEntity();
-		AlertContext context = new AlertContext();
-		String sourceStreams = evaluator.getAdditionalContext().get(Constants.SOURCE_STREAMS);
-		String[] sourceStreamsArr = sourceStreams.split(",");		
-		List<String> attrRenameList = evaluator.getOutputStreamAttrNameList();		
-		Map<String, String> tags = new HashMap<String, String>();
-		for (String sourceStream : sourceStreamsArr) {
-			 List<AlertStreamSchemaEntity> list = StreamMetadataManager.getInstance().getMetadataEntitiesForStream(sourceStream.trim());
-			 for (AlertStreamSchemaEntity alertStream : list) {
-				 if (alertStream.getUsedAsTag() != null && alertStream.getUsedAsTag() == true) {
-					 String attrName = alertStream.getTags().get(Constants.ATTR_NAME);
-					 tags.put(attrName, rets.get(attrRenameList.indexOf(attrName)));
-				 }				 
-			 }			 
-		}
-
-		for (int index = 0; index < rets.size(); index++) {
-			//attrRenameList.get(0) -> "eagleAlertContext". We need to skip "eagleAlertContext", index is from 1 for attRenameList.
-			context.addProperty(attrRenameList.get(index), rets.get(index));
-		}
-
-		StringBuilder sb = new StringBuilder();
-		for (Entry<String, String> entry : context.getProperties().entrySet()) {
-			String key = entry.getKey();
-			String value = entry.getValue();
-			sb.append(key + "=\"" + value + "\" ");			
-		}
-		context.addAll(evaluator.getAdditionalContext());
-		String policyId = context.getProperty(Constants.POLICY_ID);
-		String alertMessage = "The Policy \"" + policyId + "\" has been detected with the below information: " + sb.toString() ;
-		String site = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.SITE);
-		String application = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.APPLICATION);
-		String host = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-		Integer port = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-
-		context.addProperty(Constants.ALERT_EVENT, sb.toString());
-		context.addProperty(Constants.ALERT_MESSAGE, alertMessage);
-		context.addProperty(Constants.ALERT_TIMESTAMP_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()));
-		context.addProperty(EagleConfigConstants.APPLICATION, application);
-		context.addProperty(EagleConfigConstants.SITE, site);
-		entity.setTimestamp(timestamp);
-		/** If we need to add severity tag, we should add severity filed in AbstractpolicyDefinition, and pass it down **/
-		tags.put(EagleConfigConstants.SITE, site);
-		tags.put(EagleConfigConstants.APPLICATION, application);
-		tags.put(Constants.SOURCE_STREAMS, context.getProperty(Constants.SOURCE_STREAMS));
-		tags.put(Constants.POLICY_ID, context.getProperty(Constants.POLICY_ID));
-		tags.put(Constants.ALERT_SOURCE, source);
-		tags.put(Constants.ALERT_EXECUTOR_ID, alertExecutorId);
-		entity.setTags(tags);
-
-		context.addProperty(Constants.POLICY_DETAIL_URL, UrlBuilder.buiildPolicyDetailUrl(host, port, tags));
-		context.addProperty(Constants.ALERT_DETAIL_URL, UrlBuilder.buildAlertDetailUrl(host, port, entity));
-		entity.setAlertContext(context);
-		return entity;
-	}	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm b/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
deleted file mode 100644
index d4571f3..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/ALERT_DEFAULT.vm
+++ /dev/null
@@ -1,266 +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.
-  -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-		<meta name="viewport" content="width=device-width"/>
-		<style>
-			body {
-				width:100% !important;
-				min-width: 100%;
-				-webkit-text-size-adjust:100%;
-				-ms-text-size-adjust:100%;
-				margin:0;
-				padding:0;
-			}
-
-			table {
-				border-spacing: 0;
-				border-collapse: collapse;
-			}
-
-			table th,
-			table td {
-				padding: 3px 0 3px 0;
-			}
-
-			.body {
-				width: 100%;
-			}
-
-			p,a,h1,h2,h3,ul,ol,li {
-				font-family: Helvetica, Arial, sans-serif;
-				font-weight: normal;
-				margin: 0;
-				padding: 0;
-			}
-			p {
-				font-size: 14px;
-				line-height: 19px;
-			}
-			a {
-				color: #3294b1;
-			}
-			h1 {
-				font-size: 36px;
-				margin: 15px 0 5px 0;
-			}
-			h2 {
-				font-size: 32px;
-			}
-			h3 {
-				font-size: 28px;
-			}
-
-			ul,ol {
-				margin: 0 0 0 25px;
-				padding: 0;
-			}
-
-			.btn {
-				background: #2ba6cb !important;
-				border: 1px solid #2284a1;
-				padding: 10px 20px 10px 20px;
-				text-align: center;
-			}
-			.btn:hover {
-				background: #2795b6 !important;
-			}
-			.btn a {
-				color: #FFFFFF;
-				text-decoration: none;
-				font-weight: bold;
-				padding: 10px 20px 10px 20px;
-			}
-
-			.tableBordered {
-				border-top: 1px solid #b9e5ff;
-			}
-			.tableBordered th {
-				background: #ECF8FF;
-			}
-			.tableBordered th p {
-				font-weight: bold;
-				color: #3294b1;
-			}
-			.tableBordered th,
-			.tableBordered td {
-				color: #333333;
-				border-bottom: 1px solid #b9e5ff;
-				text-align: center;
-				padding-bottom: 5px;
-			}
-
-			.panel {
-				height: 100px;
-			}
-		</style>
-	</head>
-	<body>
-		#set ( $elem = $alertList[0] )
-		#set ( $alertUrl = $elem["alertDetailUrl"] )
-		#set ( $policyUrl = $elem["policyDetailUrl"] )
-		<table class="body">
-			<tr>
-				<td align="center" valign="top" style="background: #999999; padding: 0 0 0 0;">
-					<!-- Eagle Header -->
-					<table width="580">
-						<tr>
-							<td style="padding: 0 0 0 0;" align="left" >
-								<p style="color:#FFFFFF;font-weight: bold; font-size: 24px">Eagle</p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-
-			<tr>
-				<td align="center" valign="top">
-					<!-- Eagle Body -->
-					<table width="580">
-						<tr>
-							<!-- Title -->
-							<td align="center">
-								<h1>$elem["dataSource"] Alert Detected</h1>
-							</td>
-						</tr>
-						<tr>
-							<!-- Time -->
-							<td>
-								<table width="580">
-									<tr>
-										<td>
-											<p><b>Detected Time: $elem["alertTimestamp"]</b></p>
-										</td>
-										#set ( $severity = $elem["severity"] )
-										#if (!$severity || ("$severity" == ""))
-											#set ( $elem["severity"] = "WARNING")
-										#end
-										<td align="right">
-											<p><b>
-												Severity:
-									            #if ($elem["severity"] == "WARNING")
-													<span>$elem["severity"]</span>												
-    											#else
-													<span style="color: #FF0000;">$elem["severity"]</span>
-    											#end
-											</b></p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Description -->
-							<td valign="top" style="background: #ECF8FF; border: 1px solid #b9e5ff; padding: 10px 10px 12px 10px;">
-								<p>$elem["alertMessage"]</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$alertUrl">View Alert Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Basic Information:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Basic Information Content -->
-							<td>
-								<table class="tableBordered" width="580">
-									<tr>
-										<th>
-											<p>Site</p>
-										</th>
-										<th>
-											<p>Data Source</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["site"]</p>
-										</td>
-										<td>
-											<p>$elem["dataSource"]</p>
-										</td>
-									</tr>
-									<tr>
-										<th>
-											<p>Policy Name</p>
-										</th>
-										<th>
-											<p>Severity</p>
-										</th>
-									</tr>
-									<tr>
-										<td>
-											<p>$elem["policyId"]</p>
-										</td>
-										<td>
-											<p>$elem["severity"]</p>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>
-						<tr>
-							<!-- View Detail -->
-							<td align="center" style="padding: 10px 0 0 0;">
-								<table width="580">
-									<tr>
-										<td class="btn">
-											<a href="$policyUrl">View Policy Details on Eagle Web</a>
-										</td>
-									</tr>
-								</table>
-							</td>
-						</tr>						
-						<tr>
-							<!-- Actions Required -->
-							<td style="padding: 20px 0 0 0;">
-								<p><b>Actions Required:</b></p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Possible Root Causes Content -->
-							<td class="panel" valign="top" style="background: #F4F4F4; border: 1px solid #AAAAAA; padding: 10px 10px 12px 10px;">
-								<p> $elem["dataSource"] alert found, please check.</p>
-							</td>
-						</tr>
-						<tr>
-							<!-- Copyright -->
-							<td align="center">
-								<p><a href="http://123.xyz.com/alerts/alertlist.html">Copyright 2014 @ Hadoop Eagle</a></p>
-							</td>
-						</tr>
-					</table>
-				</td>
-			</tr>
-		</table>
-	</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider b/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
deleted file mode 100644
index eac2bfd..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/META-INF/services/org.apache.eagle.policy.PolicyEvaluatorServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.policy.siddhi.SiddhiPolicyEvaluatorServiceProviderImpl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/table-create.script
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/table-create.script b/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/table-create.script
deleted file mode 100644
index d4d3795..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/main/resources/table-create.script
+++ /dev/null
@@ -1,24 +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.
-
-##### create alert related tables
-create 'eagle_metric', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-create 'alertdetail', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-
-create 'alertDataSource', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-create 'alertStream', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-create 'alertExecutor', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-create 'alertStreamSchema', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-create 'alertdef', {NAME => 'f', VERSIONS => '3', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/META-INF/MANIFEST.MF b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/META-INF/MANIFEST.MF
deleted file mode 100644
index edfb15f..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +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.
- */
-Manifest-Version: 1.0
-Class-Path: 
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/cep/TestSiddhiEvaluator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/cep/TestSiddhiEvaluator.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/cep/TestSiddhiEvaluator.java
deleted file mode 100644
index 602e117..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/cep/TestSiddhiEvaluator.java
+++ /dev/null
@@ -1,135 +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.alert.cep;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.alert.executor.AlertExecutor;
-import org.apache.eagle.alert.siddhi.SiddhiAlertAPIEntityRender;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.dao.*;
-import org.apache.eagle.policy.siddhi.SiddhiPolicyDefinition;
-import org.apache.eagle.policy.siddhi.SiddhiPolicyEvaluator;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.junit.Test;
-import scala.Tuple2;
-
-import java.util.*;
-
-public class TestSiddhiEvaluator {
-
-	int alertCount = 0;
-
-	public AlertStreamSchemaEntity createStreamMetaEntity(String attrName, String type) {
-		AlertStreamSchemaEntity entity = new AlertStreamSchemaEntity();
-		Map<String, String> tags = new HashMap<String, String>();
-		tags.put("application", "hdfsAuditLog");
-		tags.put("streamName", "hdfsAuditLogEventStream");
-		tags.put("attrName", attrName);
-		entity.setTags(tags);
-		entity.setAttrType(type);
-		return entity;
-	}
-
-	@Test
-	public void test() throws Exception{
-        Config config = ConfigFactory.load("unittest.conf");
-		AlertStreamSchemaDAO streamDao = new AlertStreamSchemaDAOImpl(null, null) {
-			@Override
-			public List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(String dataSource) throws Exception {
-				List<AlertStreamSchemaEntity> list = new ArrayList<AlertStreamSchemaEntity>();
-				list.add(createStreamMetaEntity("cmd", "string"));
-				list.add(createStreamMetaEntity("dst", "string"));
-				list.add(createStreamMetaEntity("src", "string"));
-				list.add(createStreamMetaEntity("host", "string"));
-				list.add(createStreamMetaEntity("user", "string"));
-				list.add(createStreamMetaEntity("timestamp", "long"));
-				list.add(createStreamMetaEntity("securityZone", "string"));
-				list.add(createStreamMetaEntity("sensitivityType", "string"));
-				list.add(createStreamMetaEntity("allowed", "string"));
-				return list;
-			}
-		};
-        StreamMetadataManager.getInstance().reset();
-        StreamMetadataManager.getInstance().init(config, streamDao);
-
-		Map<String, Object> data1 =  new TreeMap<String, Object>(){{
-			put("cmd", "open");
-			put("dst", "");
-			put("src", "");
-			put("host", "");
-			put("user", "");
-			put("timestamp", String.valueOf(System.currentTimeMillis()));
-			put("securityZone", "");
-			put("sensitivityType", "");
-			put("allowed", "true");
-		}};
-        final SiddhiPolicyDefinition policyDef = new SiddhiPolicyDefinition();
-        policyDef.setType("siddhiCEPEngine");
-        String expression = "from hdfsAuditLogEventStream[cmd=='open'] " +
-							"select * " +
-							"insert into outputStream ;";
-        policyDef.setExpression(expression);
-
-		PolicyDefinitionDAO alertDao = new PolicyDefinitionEntityDAOImpl(new EagleServiceConnector(null, null),
-				Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME) {
-			@Override
-			public Map<String, Map<String, AlertDefinitionAPIEntity>> findActivePoliciesGroupbyExecutorId(String site, String dataSource) throws Exception {
-				return null;
-			}
-
-            @Override
-            public void updatePolicyDetails(AbstractPolicyDefinitionEntity entity) { /* do nothing */ }
-        };
-
-		AlertExecutor alertExecutor = new AlertExecutor("alertExecutorId", null, 3, 1, alertDao, new String[]{"hdfsAuditLogEventStream"}) {
-			@Override
-			protected Map<String, String> getDimensions(String policyId) {
-				return new HashMap<String, String>();
-			}
-		};
-		alertExecutor.prepareConfig(config);
-		alertExecutor.init();
-
-		PolicyEvaluationContext<AlertDefinitionAPIEntity, AlertAPIEntity> context = new PolicyEvaluationContext<>();
-		context.alertExecutor = alertExecutor;
-		context.policyId = "testPolicy";
-		context.resultRender = new SiddhiAlertAPIEntityRender();
-		context.outputCollector = new Collector<Tuple2<String, AlertAPIEntity>> () {
-			@Override
-			public void collect(Tuple2<String, AlertAPIEntity> stringAlertAPIEntityTuple2) {
-				alertCount++;
-			}
-		};
-
-		SiddhiPolicyEvaluator<AlertDefinitionAPIEntity, AlertAPIEntity> evaluator =
-				new SiddhiPolicyEvaluator<>(config, context, policyDef, new String[]{"hdfsAuditLogEventStream"}, false);
-
-		evaluator.evaluate(new ValuesArray(context.outputCollector, "hdfsAuditLogEventStream", data1));
-		Thread.sleep(2 * 1000);
-		Assert.assertEquals(alertCount, 1);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
deleted file mode 100644
index 4295bdc..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/config/TestAlertDedup.java
+++ /dev/null
@@ -1,38 +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.alert.config;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-
-public class TestAlertDedup {
-
-	@Test
-	public void test() throws Exception{
-		String alertDef = "{\"alertDedupIntervalMin\":\"720\",\"emailDedupIntervalMin\":\"1440\"}";
-		DeduplicatorConfig dedupConfig = JsonSerDeserUtils.deserialize(alertDef, DeduplicatorConfig.class);
-		Assert.assertEquals(dedupConfig.getAlertDedupIntervalMin(), 720);
-		Assert.assertEquals(dedupConfig.getEmailDedupIntervalMin(), 1440);
-		
-		alertDef = "null";
-		dedupConfig = JsonSerDeserUtils.deserialize(alertDef, DeduplicatorConfig.class);
-		Assert.assertEquals(dedupConfig, null);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestAlertDefinitionDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestAlertDefinitionDAOImpl.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestAlertDefinitionDAOImpl.java
deleted file mode 100644
index f7dcdde..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestAlertDefinitionDAOImpl.java
+++ /dev/null
@@ -1,81 +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.alert.dao;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.dao.PolicyDefinitionEntityDAOImpl;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class TestAlertDefinitionDAOImpl {
-
-	public AlertDefinitionAPIEntity buildTestAlertDefEntity(String site, String programId, String alertExecutorId, String policyId, String policyType) {
-		AlertDefinitionAPIEntity entity = new AlertDefinitionAPIEntity();
-		entity.setEnabled(true);
-		Map<String, String> tags = new HashMap<String, String>();
-		tags.put("site", site);
-		tags.put("programId", programId);
-		tags.put("alertExecutorId", alertExecutorId);
-		tags.put("policyId", policyId);
-		tags.put("policyType", policyType);
-		entity.setTags(tags);
-		return entity;
-	}
-	
-	@Test
-	public void test() throws Exception{
-		Config config = ConfigFactory.load();
-		String eagleServiceHost = config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST);
-		int eagleServicePort = config.getInt(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT);
-
-		String site = "sandbox";
-		String dataSource = "UnitTest";
-		PolicyDefinitionDAO dao = new PolicyDefinitionEntityDAOImpl(new EagleServiceConnector(eagleServiceHost, eagleServicePort),
-				Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME) {
-			@Override
-			public List<AlertDefinitionAPIEntity> findActivePolicies(String site, String dataSource) throws Exception {
-				List<AlertDefinitionAPIEntity> list = new ArrayList<AlertDefinitionAPIEntity>();
-				list.add(buildTestAlertDefEntity(site, dataSource, "TestExecutor1", "TestPolicyIDA", "TestPolicyTypeA"));
-				list.add(buildTestAlertDefEntity(site, dataSource, "TestExecutor1", "TestPolicyIDB", "TestPolicyTypeB"));
-				list.add(buildTestAlertDefEntity(site, dataSource, "TestExecutor2", "TestPolicyIDC", "TestPolicyTypeC"));
-				list.add(buildTestAlertDefEntity(site, dataSource, "TestExecutor2", "TestPolicyIDD", "TestPolicyTypeD"));
-				return list;
-			}
-
-            @Override
-			public void updatePolicyDetails(AbstractPolicyDefinitionEntity entity) { /* do nothing */ }
-		};
-
-		Map<String, Map<String, AlertDefinitionAPIEntity>> retMap = dao.findActivePoliciesGroupbyExecutorId(site, dataSource);
-		
-		Assert.assertEquals(2, retMap.size());
-		Assert.assertEquals(2, retMap.get("TestExecutor1").size());
-		Assert.assertEquals(2, retMap.get("TestExecutor2").size());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestSiddhiStreamMetadataUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestSiddhiStreamMetadataUtils.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestSiddhiStreamMetadataUtils.java
deleted file mode 100644
index a2b8a2d..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestSiddhiStreamMetadataUtils.java
+++ /dev/null
@@ -1,60 +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.alert.dao;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAO;
-import org.apache.eagle.policy.siddhi.SiddhiStreamMetadataUtils;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.junit.Test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-public class TestSiddhiStreamMetadataUtils {
-	@Test
-	public void test() throws Exception {
-        Config config = ConfigFactory.load();
-        StreamMetadataManager.getInstance().reset();
-        StreamMetadataManager.getInstance().init(config, new AlertStreamSchemaDAO() {
-            @Override
-            public List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(
-                    String application) {
-                return Arrays.asList(generateStreamMetadataAPIEntity("attrName1", "STRING"),
-                        generateStreamMetadataAPIEntity("attrName2", "LONG")
-                );
-            }
-        });
-		String siddhiStreamDef = SiddhiStreamMetadataUtils.convertToStreamDef("testStreamName");
-		Assert.assertEquals("define stream " + "testStreamName" + "(attrName1 string,attrName2 long);", siddhiStreamDef);
-	}
-	
-	private AlertStreamSchemaEntity generateStreamMetadataAPIEntity(final String attrName, String attrType){
-		AlertStreamSchemaEntity entity = new AlertStreamSchemaEntity();
-		entity.setTags(new HashMap<String, String>(){{
-			put("programId", "testProgramId");
-			put("streamName", "testStreamName");
-			put("attrName", attrName);
-		}});
-		entity.setAttrType(attrType);
-		return entity;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestStreamDefinitionDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestStreamDefinitionDAOImpl.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestStreamDefinitionDAOImpl.java
deleted file mode 100644
index 0bbfc4a..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/dao/TestStreamDefinitionDAOImpl.java
+++ /dev/null
@@ -1,67 +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.alert.dao;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAO;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAOImpl;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class TestStreamDefinitionDAOImpl {
-	
-	public AlertStreamSchemaEntity buildTestStreamDefEntity(String programId, String streamName, String attrName) {
-		AlertStreamSchemaEntity entity = new AlertStreamSchemaEntity();
-		entity.setAttrType("String");
-		entity.setAttrValueResolver("DefaultAttrValueResolver");
-		entity.setCategory("SimpleType");
-		Map<String, String> tags = new HashMap<String, String>();
-		tags.put("programId", programId);
-		tags.put("streamName", streamName);
-		tags.put("attrName", attrName);
-		entity.setTags(tags);
-		return entity;
-	}
-	
-	@Test
-	public void test() throws Exception{
-        Config config = ConfigFactory.load();
-		AlertStreamSchemaDAO dao = new AlertStreamSchemaDAOImpl(null, null) {
-			public List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(String application) throws Exception {
-				List<AlertStreamSchemaEntity> list = new ArrayList<AlertStreamSchemaEntity>();
-				String programId = "UnitTest";
-				list.add(buildTestStreamDefEntity(programId, "TestStream", "Attr1"));
-				list.add(buildTestStreamDefEntity(programId, "TestStream", "Attr2"));
-				list.add(buildTestStreamDefEntity(programId, "TestStream", "Attr3"));
-				list.add(buildTestStreamDefEntity(programId, "TestStream", "Attr4"));
-				return list;
-			}
-		};
-        StreamMetadataManager.getInstance().reset();
-		StreamMetadataManager.getInstance().init(config, dao);
-		Map<String, List<AlertStreamSchemaEntity>> retMap = StreamMetadataManager.getInstance().getMetadataEntitiesForAllStreams();
-		Assert.assertTrue(retMap.get("TestStream").size() == 4);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/executor/TestPolicyExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/executor/TestPolicyExecutor.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/executor/TestPolicyExecutor.java
deleted file mode 100644
index 90353be..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/executor/TestPolicyExecutor.java
+++ /dev/null
@@ -1,85 +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.alert.executor;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAOImpl;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.policy.PolicyEvaluator;
-import org.apache.eagle.policy.PolicyManager;
-import org.apache.eagle.policy.siddhi.SiddhiPolicyDefinition;
-import org.apache.eagle.policy.siddhi.StreamMetadataManager;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-
-import junit.framework.Assert;
-
-/**
- * @since Dec 18, 2015
- *
- */
-public class TestPolicyExecutor {
-
-	public static class T2 extends AbstractPolicyDefinitionEntity {
-		@Override
-		public String getPolicyDef() {
-			return null;
-		}
-		@Override
-		public boolean isEnabled() {
-			return false;
-		}
-	}
-
-	// not feasible to Unit test, it requires the local service.
-	@Ignore
-	@Test
-	public void testReflectCreatePolicyEvaluator() throws Exception {
-		System.setProperty("config.resource", "/unittest.conf");
-		String policyType = Constants.policyType.siddhiCEPEngine.name();
-		Class<? extends PolicyEvaluator> evalCls = PolicyManager.getInstance().getPolicyEvaluator(policyType);
-		Config config = ConfigFactory.load();
-
-		String def = "{\"expression\":\"from hdfsAuditLogEventStream select * insert into outputStream;\",\"type\":\"siddhiCEPEngine\"}";
-		// test1 : test json deserialization
-		AbstractPolicyDefinition policyDef = null;
-		policyDef = JsonSerDeserUtils.deserialize(def, AbstractPolicyDefinition.class,
-				PolicyManager.getInstance().getPolicyModules(policyType));
-		// Assert conversion succeed
-		Assert.assertEquals(SiddhiPolicyDefinition.class, policyDef.getClass());
-
-		// make sure meta data manager initialized
-		StreamMetadataManager.getInstance().init(config, new AlertStreamSchemaDAOImpl(config));
-
-		String[] sourceStreams = new String[] { "hdfsAuditLogEventStream" };
-		// test2 : test evaluator
-		PolicyEvaluator pe = evalCls.getConstructor(Config.class, String.class, AbstractPolicyDefinition.class,
-				String[].class, boolean.class).newInstance(config, "policy-id", policyDef, sourceStreams, false);
-
-		PolicyEvaluator<AlertDefinitionAPIEntity> e1 = (PolicyEvaluator<AlertDefinitionAPIEntity>) pe;
-
-		PolicyEvaluator<T2> e2 = (PolicyEvaluator<T2>) pe;
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestDynamicPolicyLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestDynamicPolicyLoader.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestDynamicPolicyLoader.java
deleted file mode 100644
index 0504784..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestDynamicPolicyLoader.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.alert.policy;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.policy.DynamicPolicyLoader;
-import org.apache.eagle.policy.PolicyLifecycleMethods;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-
-import junit.framework.Assert;
-
-public class TestDynamicPolicyLoader {
-	private final static Logger LOG = LoggerFactory.getLogger(TestDynamicPolicyLoader.class);
-
-	@Test
-	public void test() throws Exception{
-		System.setProperty("config.resource", "/unittest.conf");
-		Config config = ConfigFactory.load();
-		Map<String, PolicyLifecycleMethods<AlertDefinitionAPIEntity>> policyChangeListeners = new HashMap<String, PolicyLifecycleMethods<AlertDefinitionAPIEntity>>();
-		policyChangeListeners.put("testAlertExecutorId", new PolicyLifecycleMethods<AlertDefinitionAPIEntity>() {
-			@Override
-			public void onPolicyDeleted(Map<String, AlertDefinitionAPIEntity> deleted) {
-				LOG.info("deleted : " + deleted);
-			}
-			
-			@Override
-			public void onPolicyCreated(Map<String, AlertDefinitionAPIEntity> added) {
-				Assert.assertTrue(added.size() == 1);
-				LOG.info("added : " + added);
-			}
-			
-			@Override
-			public void onPolicyChanged(Map<String, AlertDefinitionAPIEntity> changed) {
-				Assert.assertTrue(changed.size() == 1);
-				LOG.info("changed :" + changed);
-			}
-		});
-		
-		Map<String, Map<String, AlertDefinitionAPIEntity>> initialAlertDefs = new HashMap<String, Map<String, AlertDefinitionAPIEntity>>();
-		initialAlertDefs.put("testAlertExecutorId", new HashMap<String, AlertDefinitionAPIEntity>());
-		Map<String, AlertDefinitionAPIEntity> map = initialAlertDefs.get("testAlertExecutorId");
-		map.put("policyId_1", buildTestAlertDefEntity("testProgramId", "testAlertExecutorId", "policyId_1", "siddhi", "policyDef_1"));
-		map.put("policyId_3", buildTestAlertDefEntity("testProgramId", "testAlertExecutorId", "policyId_3", "siddhi", "policyDef_3"));
-		
-		PolicyDefinitionDAO<AlertDefinitionAPIEntity> dao = new PolicyDefinitionDAO<AlertDefinitionAPIEntity>() {
-			@Override
-			public Map<String, Map<String, AlertDefinitionAPIEntity>> findActivePoliciesGroupbyExecutorId(
-					String site, String dataSource) {
-				Map<String, Map<String, AlertDefinitionAPIEntity>> currentAlertDefs = new HashMap<String, Map<String, AlertDefinitionAPIEntity>>();
-				currentAlertDefs.put("testAlertExecutorId", new HashMap<String, AlertDefinitionAPIEntity>());
-				Map<String, AlertDefinitionAPIEntity> map = currentAlertDefs.get("testAlertExecutorId");
-				map.put("policyId_1", buildTestAlertDefEntity("testProgramId", "testAlertExecutorId", "policyId_1", "siddhi", "policyDef_1_1"));
-				map.put("policyId_2", buildTestAlertDefEntity("testProgramId", "testAlertExecutorId", "policyId_2", "siddhi", "policyDef_2"));
-				return currentAlertDefs;
-			}
-			
-			@Override
-			public List<AlertDefinitionAPIEntity> findActivePolicies(String site, String dataSource) {
-				return null;
-			}
-
-            @Override
-            public void updatePolicyDetails(AlertDefinitionAPIEntity entity) { /* do nothing */ }
-		};
-		
-		DynamicPolicyLoader<AlertDefinitionAPIEntity> loader = DynamicPolicyLoader.getInstanceOf(AlertDefinitionAPIEntity.class);
-		loader.init(initialAlertDefs, dao, config);
-		
-		try{
-			Thread.sleep(5000);
-		}catch(Exception ex){
-			
-		}
-	}
-	
-	public AlertDefinitionAPIEntity buildTestAlertDefEntity(String programId, String alertExecutorId, String policyId, String policyType, String policyDef) {
-		AlertDefinitionAPIEntity entity = new AlertDefinitionAPIEntity();
-		entity.setEnabled(true);
-		Map<String, String> tags = new HashMap<String, String>();
-		tags.put("programId", programId);
-		tags.put("alertExecutorId", alertExecutorId);
-		tags.put("policyId", policyId);
-		tags.put("policyType", policyType);
-		entity.setTags(tags);
-		entity.setPolicyDef(policyDef);
-		return entity;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistribution.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistribution.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistribution.java
deleted file mode 100644
index 77aaec3..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistribution.java
+++ /dev/null
@@ -1,30 +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.alert.policy;
-
-import org.apache.eagle.policy.DefaultPolicyPartitioner;
-import org.junit.Test;
-
-public class TestPolicyDistribution {
-    @Test
-    public void test(){
-        DefaultPolicyPartitioner p = new DefaultPolicyPartitioner();
-        System.out.println(p.partition(2, "siddhiCEPEngine", "readtmpPII"));
-        System.out.println(p.partition(2, "siddhiCEPEngine", "readtmpPII2"));
-        System.out.println(p.partition(2, "siddhiCEPEngine", "tmpPIIpii"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistributionUpdater.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistributionUpdater.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistributionUpdater.java
deleted file mode 100644
index 1fb97fd..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyDistributionUpdater.java
+++ /dev/null
@@ -1,99 +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.alert.policy;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.alert.entity.AlertStreamSchemaEntity;
-import org.apache.eagle.alert.executor.AlertExecutor;
-import org.apache.eagle.policy.DefaultPolicyPartitioner;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.dao.AlertStreamSchemaDAO;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.dao.PolicyDefinitionEntityDAOImpl;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class TestPolicyDistributionUpdater {
-    private static Logger LOG = LoggerFactory.getLogger(TestPolicyDistributionUpdater.class);
-
-    @Test
-    public void testPolicyDistributionReporter() throws Exception{
-        PolicyDefinitionDAO alertDao = new PolicyDefinitionEntityDAOImpl(new EagleServiceConnector(null, 1),
-                Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME) {
-            @Override
-            public Map<String, Map<String, AlertDefinitionAPIEntity>> findActivePoliciesGroupbyExecutorId(String site, String dataSource) throws Exception {
-                final AlertDefinitionAPIEntity entity = new AlertDefinitionAPIEntity();
-                entity.setTags(new HashMap<String, String>() {{
-                    put(Constants.POLICY_TYPE, "siddhiCEPEngine");
-                    put(Constants.POLICY_ID, "policyId_1");
-                }});
-                Map<String, Map<String, AlertDefinitionAPIEntity>> map = new HashMap<String, Map<String, AlertDefinitionAPIEntity>>();
-                map.put("alertExecutorId_1", new HashMap<String, AlertDefinitionAPIEntity>() {{
-                    put("policyId_1", entity);
-                }});
-                entity.setPolicyDef("{\"type\":\"siddhiCEPEngine\",\"expression\":\"from testStream select name insert into outputStream ;\"}");
-                return map;
-            }
-
-            @Override
-            public void updatePolicyDetails(AbstractPolicyDefinitionEntity entity) { /* do nothing */ }
-        };
-
-        AlertExecutor alertExecutor = new AlertExecutor("alertExecutorId_1", new DefaultPolicyPartitioner(), 1, 0, alertDao, new String[]{"testStream"}){
-            public AlertStreamSchemaDAO getAlertStreamSchemaDAO(Config config){
-                return new AlertStreamSchemaDAO(){
-                    @Override
-                    public List<AlertStreamSchemaEntity> findAlertStreamSchemaByApplication(String application) throws Exception {
-                        AlertStreamSchemaEntity entity = new AlertStreamSchemaEntity();
-                        entity.setTags(new HashMap<String, String>(){{
-                            put("application", "UnitTest");
-                            put("streamName", "testStream");
-                            put("attrName", "name");
-                        }});
-                        entity.setAttrType("string");
-                        return Arrays.asList(entity);
-                    }
-                };
-            }
-
-            @Override
-            public void report() {
-                Assert.assertEquals(1, getPolicyEvaluators().size());
-                LOG.info("successuflly reported");
-            }
-        };
-
-        Config config = ConfigFactory.load();
-        alertExecutor.prepareConfig(config);
-        alertExecutor.init();
-        Thread.sleep(100);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyPartitioner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyPartitioner.java b/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyPartitioner.java
deleted file mode 100644
index c3bc4c9..0000000
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/java/org/apache/eagle/alert/policy/TestPolicyPartitioner.java
+++ /dev/null
@@ -1,30 +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.alert.policy;
-
-import org.apache.eagle.policy.DefaultPolicyPartitioner;
-import org.junit.Test;
-
-public class TestPolicyPartitioner {
-    @Test
-    public void test(){
-        DefaultPolicyPartitioner p = new DefaultPolicyPartitioner();
-        System.out.println(p.partition(2, "siddhiCEPEngine", "readtmpPII"));
-        System.out.println(p.partition(2, "siddhiCEPEngine", "readtmpPII2"));
-        System.out.println(p.partition(2, "siddhiCEPEngine", "tmpPIIpii"));
-    }
-}


[18/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/DefaultEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/DefaultEntityRepository.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/DefaultEntityRepository.java
deleted file mode 100755
index 1d0d398..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/DefaultEntityRepository.java
+++ /dev/null
@@ -1,34 +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.log.entity.repo;
-
-import org.apache.eagle.log.entity.MetricMetadataEntity;
-import org.apache.eagle.log.entity.test.TestLogAPIEntity;
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-
-/**
- * Default Eagle framework entity repository class.
- * 
- *
- */
-public class DefaultEntityRepository extends EntityRepository {
-	public DefaultEntityRepository() {
-		entitySet.add(MetricMetadataEntity.class);
-		entitySet.add(TestLogAPIEntity.class);
-		entitySet.add(TestTimeSeriesAPIEntity.class);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepository.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepository.java
deleted file mode 100644
index 0c24d30..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepository.java
+++ /dev/null
@@ -1,56 +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.log.entity.repo;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-
-/**
- * Entity repository is used to store entity definition class. Each domain should define its own entities. Eagle entity
- * framework will scan all derived class implementations to get all entity definitions, then register them to EntityDefinitionManager.
- * 
- *
- */
-public abstract class EntityRepository {
-
-	protected Set<Class<? extends TaggedLogAPIEntity>> entitySet = new HashSet<Class<? extends TaggedLogAPIEntity>>();
-	protected Map<Class<?>, EntitySerDeser<?>> serDeserMap = new HashMap<Class<?>, EntitySerDeser<?>>();
-
-	public synchronized Collection<Class<? extends TaggedLogAPIEntity>> getEntitySet() {
-		return new ArrayList<Class<? extends TaggedLogAPIEntity>>(entitySet);
-	}
-	
-	public synchronized Map<Class<?>, EntitySerDeser<?>> getSerDeserMap() {
-		return new HashMap<Class<?>, EntitySerDeser<?>>(serDeserMap);
-	}
-	
-	public synchronized void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) {
-		entitySet.add(clazz);
-	}
-
-	public synchronized void registerSerDeser(Class<?> clazz, EntitySerDeser<?> serDeser) {
-		serDeserMap.put(clazz, serDeser);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepositoryScanner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepositoryScanner.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepositoryScanner.java
deleted file mode 100644
index 049964b..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/repo/EntityRepositoryScanner.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.repo;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import net.sf.extcos.ComponentQuery;
-import net.sf.extcos.ComponentScanner;
-
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class EntityRepositoryScanner {
-
-	private static final Logger LOG = LoggerFactory.getLogger(EntityRepositoryScanner.class);
-
-	public static void scan() throws InstantiationException, IllegalAccessException {
-		// TODO currently extcos 0.3b doesn't support to search packages like "com.*.eagle.*", "org.*.eagle.*". However 0.4b depends on asm-all version 4.0, which is 
-		// conflicted with jersey server 1.8. We should fix it later
-		LOG.info("Scanning all entity repositories with pattern \"org.apache.eagle.*\"");
-		final ComponentScanner scanner = new ComponentScanner();
-		final Set<Class<?>> classes = scanner.getClasses(new EntityRepoScanQuery() );
-		for (Class<?> entityClass : classes) {
-			LOG.info("Processing entity repository: " + entityClass.getName());
-			if (EntityRepository.class.isAssignableFrom(entityClass)) {
-				EntityRepository repo = (EntityRepository)entityClass.newInstance();
-				addRepo(repo);
-			}
-		}
-	}
-
-	private static void addRepo(EntityRepository repo) {
-		final Map<Class<?>, EntitySerDeser<?>> serDeserMap = repo.getSerDeserMap();
-		for (Map.Entry<Class<?>, EntitySerDeser<?>> entry : serDeserMap.entrySet()) {
-			EntityDefinitionManager.registerSerDeser(entry.getKey(), entry.getValue());
-		}
-		final Collection<Class<? extends TaggedLogAPIEntity>> entityClasses = repo.getEntitySet();
-		for (Class<? extends TaggedLogAPIEntity> clazz : entityClasses) {
-			EntityDefinitionManager.registerEntity(clazz);
-		}
-	}
-
-	public static class EntityRepoScanQuery extends ComponentQuery {
-
-		@Override
-		protected void query() {
-			select().from("org.apache.eagle").returning(
-			allExtending(EntityRepository.class));
-		}
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestEntity.java
deleted file mode 100755
index 402e170..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestEntity.java
+++ /dev/null
@@ -1,107 +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.log.entity.test;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-
-/**
- * this class is written by customer, but it has some contracts
- * 0. This class should conform to java bean conventions
- * 1. Annotate this class with hbase table name
- * 2. Annotate this class with hbase column family name
- * 3. Annotate those qualifier fields with column name
- * 4. Fire property change event for all fields' setter method, where field name is mandatory parameter
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertdetail")
-@ColumnFamily("f")
-@Prefix("hadoop")
-@TimeSeries(true)
-public class TestEntity extends TaggedLogAPIEntity {
-	@Column("remediationID")
-	private String remediationID;
-	@Column("remediationStatus")
-	private String remediationStatus;
-	@Column("c")
-	private long count;
-	@Column("d")
-	private int numHosts;
-	@Column("e")
-	private Long numClusters;
-
-	public Long getNumClusters() {
-		return numClusters;
-	}
-
-	public void setNumClusters(Long numClusters) {
-		this.numClusters = numClusters;
-		_pcs.firePropertyChange("numClusters", null, null);
-	}
-
-	public int getNumHosts() {
-		return numHosts;
-	}
-
-	public void setNumHosts(int numHosts) {
-		this.numHosts = numHosts;
-		_pcs.firePropertyChange("numHosts", null, null);
-	}
-
-	public long getCount() {
-		return count;
-	}
-
-	public void setCount(long count) {
-		this.count = count;
-		_pcs.firePropertyChange("count", null, null);
-	}
-
-	public String getRemediationID() {
-		return remediationID;
-	}
-
-	public void setRemediationID(String remediationID) {
-		this.remediationID = remediationID;
-		_pcs.firePropertyChange("remediationID", null, null);
-	}
-
-	public String getRemediationStatus() {
-		return remediationStatus;
-	}
-
-	public void setRemediationStatus(String remediationStatus) {
-		this.remediationStatus = remediationStatus;
-		_pcs.firePropertyChange("remediationStatus", null, null);
-	}
-	
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		sb.append(super.toString());
-		sb.append(", remediationID:");
-		sb.append(remediationID);
-		sb.append(", remediationStatus:");
-		sb.append(remediationStatus);
-		return sb.toString();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestLogAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestLogAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestLogAPIEntity.java
deleted file mode 100755
index ea73f81..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestLogAPIEntity.java
+++ /dev/null
@@ -1,99 +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.log.entity.test;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("unittest")
-@ColumnFamily("f")
-@Prefix("entityut")
-@Service("TestLogAPIEntity")
-@TimeSeries(false)
-@Indexes({
-	@Index(name="jobIdIndex1", columns = { "jobID" }, unique = true),
-	@Index(name="jobIdNonIndex2", columns = { "hostname" }, unique = false)
-	})
-public class TestLogAPIEntity extends TaggedLogAPIEntity {
-
-	@Column("a")
-	private int field1;
-	@Column("b")
-	private Integer field2;
-	@Column("c")
-	private long field3;
-	@Column("d")
-	private Long field4;
-	@Column("e")
-	private double field5;
-	@Column("f")
-	private Double field6;
-	@Column("g")
-	private String field7;
-	
-	public int getField1() {
-		return field1;
-	}
-	public void setField1(int field1) {
-		this.field1 = field1;
-		_pcs.firePropertyChange("field1", null, null);
-	}
-	public Integer getField2() {
-		return field2;
-	}
-	public void setField2(Integer field2) {
-		this.field2 = field2;
-		_pcs.firePropertyChange("field2", null, null);
-	}
-	public long getField3() {
-		return field3;
-	}
-	public void setField3(long field3) {
-		this.field3 = field3;
-		_pcs.firePropertyChange("field3", null, null);
-	}
-	public Long getField4() {
-		return field4;
-	}
-	public void setField4(Long field4) {
-		this.field4 = field4;
-		_pcs.firePropertyChange("field4", null, null);
-	}
-	public double getField5() {
-		return field5;
-	}
-	public void setField5(double field5) {
-		this.field5 = field5;
-		_pcs.firePropertyChange("field5", null, null);
-	}
-	public Double getField6() {
-		return field6;
-	}
-	public void setField6(Double field6) {
-		this.field6 = field6;
-		_pcs.firePropertyChange("field6", null, null);
-	}
-	public String getField7() {
-		return field7;
-	}
-	public void setField7(String field7) {
-		this.field7 = field7;
-		_pcs.firePropertyChange("field7", null, null);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestTimeSeriesAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestTimeSeriesAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestTimeSeriesAPIEntity.java
deleted file mode 100755
index 1205961..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/test/TestTimeSeriesAPIEntity.java
+++ /dev/null
@@ -1,101 +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.log.entity.test;
-
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("unittest")
-@ColumnFamily("f")
-@Prefix("testTSEntity")
-@Service("TestTimeSeriesAPIEntity")
-@TimeSeries(true)
-public class TestTimeSeriesAPIEntity extends TaggedLogAPIEntity {
-
-	@Column("a")
-	private int field1;
-	@Column("b")
-	private Integer field2;
-	@Column("c")
-	private long field3;
-	@Column("d")
-	private Long field4;
-	@Column("e")
-	private double field5;
-	@Column("f")
-	private Double field6;
-	@Column("g")
-	private String field7;
-	
-	public int getField1() {
-		return field1;
-	}
-	public void setField1(int field1) {
-		this.field1 = field1;
-		_pcs.firePropertyChange("field1", null, null);
-	}
-	public Integer getField2() {
-		return field2;
-	}
-	public void setField2(Integer field2) {
-		this.field2 = field2;
-		_pcs.firePropertyChange("field2", null, null);
-	}
-	public long getField3() {
-		return field3;
-	}
-	public void setField3(long field3) {
-		this.field3 = field3;
-		_pcs.firePropertyChange("field3", null, null);
-	}
-	public Long getField4() {
-		return field4;
-	}
-	public void setField4(Long field4) {
-		this.field4 = field4;
-		_pcs.firePropertyChange("field4", null, null);
-	}
-	public double getField5() {
-		return field5;
-	}
-	public void setField5(double field5) {
-		this.field5 = field5;
-		_pcs.firePropertyChange("field5", null, null);
-	}
-	public Double getField6() {
-		return field6;
-	}
-	public void setField6(Double field6) {
-		this.field6 = field6;
-		_pcs.firePropertyChange("field6", null, null);
-	}
-	public String getField7() {
-		return field7;
-	}
-	public void setField7(String field7) {
-		this.field7 = field7;
-		_pcs.firePropertyChange("field7", null, null);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ExpressionParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ExpressionParser.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ExpressionParser.java
deleted file mode 100755
index 4f74715..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ExpressionParser.java
+++ /dev/null
@@ -1,207 +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.log.expression;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import parsii.eval.Expression;
-import parsii.eval.Parser;
-import parsii.eval.Scope;
-import parsii.eval.Variable;
-import parsii.tokenizer.ParseException;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- * <h1>Expression Evaluation</h1>
- *
- * Given expression in string and set context variables, return value in double
- *
- * <br/>
- * <br/>
- * For example:
- * <code>EXP{(max(a, b)* min(a, b)) / abs(a-b+c-d)} => 600.0</code>
- *
- * <br/>
- * <br/>
- * <b>NOTE:</b>  Expression variable <b>must</b> be in format: <code>fieldName</code> instead of <code>@fieldName</code>
- *
- * <br/>
- * <br/>
- * <h2>Dependencies:</h2>
- * <ul>
- *     <li>
- *         <a href="https://github.com/scireum/parsii">scireum/parsii</a>
- *         <i>Super fast and simple evaluator for mathematical expressions written in Java</i>
- *     </li>
- * </ul>
- *
- */
-public class ExpressionParser{
-	private final static Logger LOG = LoggerFactory.getLogger(ExpressionParser.class);
-
-	private String exprStr;
-	private Expression expression;
-	private Scope scope;
-
-	@SuppressWarnings("unused")
-	public Scope getScope() {
-		return scope;
-	}
-
-	private List<String> dependentFields;
-
-	/**
-	 * @param exprStr expression string in format like: <code>(max(a, b)* min(a, b)) / abs(a-b+c-d)</code>
-	 *
-	 * @throws ParseException
-	 * @throws ParsiiInvalidException
-	 */
-	public ExpressionParser(String exprStr) throws ParseException, ParsiiInvalidException{
-		this.exprStr = exprStr;
-		scope = Scope.create();
-		expression = Parser.parse(this.exprStr,scope);
-	}
-
-	@SuppressWarnings("unused")
-	public ExpressionParser(String exprStr, Map<String, Double> context) throws ParsiiInvalidException, ParseException, ParsiiUnknowVariableException {
-		this(exprStr);
-		setVariables(context);
-	}
-	
-	public ExpressionParser setVariables(Map<String, Double> tuple) throws ParsiiUnknowVariableException{
-//		for(String valName : tuple.keySet()) {
-//			Double value = tuple.get(valName);
-		for(Map.Entry<String,Double> entry : tuple.entrySet()) {
-            String valName = entry.getKey();
-            Double value = entry.getValue();
-			Variable variable = scope.getVariable(valName);
-			if(variable!=null && value !=null) {
-				variable.setValue(value);
-			}else{
-				if(LOG.isDebugEnabled()) LOG.warn("Variable for "+valName+" is null in scope of expression: "+this.exprStr);
-			}
-		}
-		return this;
-	}
-
-	@SuppressWarnings("unused")
-	public ExpressionParser setVariable(Entry<String, Double> tuple) throws ParsiiUnknowVariableException{
-		if (getDependentFields().contains(tuple.getKey())) {
-			scope.getVariable(tuple.getKey()).setValue(tuple.getValue());
-		}
-		else {
-			throw new ParsiiUnknowVariableException("unknown variable: " + tuple.getKey());
-		}
-		return this;
-	}
-	
-	public ExpressionParser setVariable(String key, Double value) throws ParsiiUnknowVariableException{
-		scope.getVariable(key).setValue(value);
-		return this;
-	}
-
-	public double eval() throws Exception{
-		return expression.evaluate();
-	}
-
-	/**
-	 * Thread safe
-	 *
-	 * @param tuple
-	 * @return
-	 * @throws ParsiiUnknowVariableException
-	 */
-	public double eval(Map<String, Double> tuple) throws Exception {
-		synchronized (this){
-			this.setVariables(tuple);
-			return this.eval();
-		}
-	}
-
-	public List<String> getDependentFields() {
-		if (dependentFields == null) {
-			dependentFields = new ArrayList<String>();
-			for (String variable : scope.getNames()) {
-				if (!variable.equals("pi") && !variable.equals("E") && !variable.equals("euler"))
-					dependentFields.add(variable);
-			}
-		}
-		return dependentFields; 
-	}
-
-	private final static Map<String, ExpressionParser> _exprParserCache = new HashMap<String, ExpressionParser>();
-
-	/**
-	 * Thread safe
-	 *
-	 * @param expr
-	 * @return
-	 * @throws ParsiiInvalidException
-	 * @throws ParseException
-	 */
-	public static ExpressionParser parse(String expr) throws ParsiiInvalidException, ParseException {
-		if(expr == null) throw new IllegalStateException("Expression to parse is null");
-		synchronized (_exprParserCache) {
-			ExpressionParser parser = _exprParserCache.get(expr);
-			if (parser == null) {
-				parser = new ExpressionParser(expr);
-				_exprParserCache.put(expr, parser);
-			}
-			return parser;
-		}
-	}
-	public static double eval(String expression,Map<String,Double> context) throws Exception {
-		ExpressionParser parser = parse(expression);
-		return parser.eval(context);
-	}
-
-	private static final Map<String,Method> _entityMethodCache = new HashMap<String, Method>();
-	public static double eval(String expression,TaggedLogAPIEntity entity) throws Exception {
-		ExpressionParser parser = parse(expression);
-		List<String> dependencies = parser.getDependentFields();
-		Map<String,Double> context = new HashMap<String,Double>();
-		for(String field:dependencies){
-			String methodName = "get"+field.substring(0, 1).toUpperCase() + field.substring(1);
-			String methodUID = entity.getClass().getName()+"."+methodName;
-
-			Method m;
-			synchronized (_entityMethodCache) {
-				m = _entityMethodCache.get(methodUID);
-				if (m == null) {
-					m = entity.getClass().getMethod(methodName);
-					_entityMethodCache.put(methodUID, m);
-				}
-			}
-			Object obj = m.invoke(entity);
-			Double doubleValue = EntityQualifierUtils.convertObjToDouble(obj);
-			// if(doubleValue == Double.NaN) throw new IllegalArgumentException("Field "+field+": "+obj+" in expression "+expression+" is not number");
-			context.put(field,doubleValue);
-		}
-		return parser.eval(context);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiInvalidException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiInvalidException.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiInvalidException.java
deleted file mode 100755
index 22301f8..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiInvalidException.java
+++ /dev/null
@@ -1,57 +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.log.expression;
-
-/**
- * @since Nov 7, 2014
- */
-public class ParsiiInvalidException extends Exception{
-	
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Default constructor
-	 */
-	public ParsiiInvalidException() {
-		super();
-	}
-
-	/**
-	 * @param message
-	 * @param cause
-	 */
-	public ParsiiInvalidException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	/**
-	 * @param message
-	 */
-	public ParsiiInvalidException(String message) {
-		super(message);
-	}
-
-	/**
-	 * @param cause
-	 */
-	public ParsiiInvalidException(Throwable cause) {
-		super(cause);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiUnknowVariableException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiUnknowVariableException.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiUnknowVariableException.java
deleted file mode 100755
index 1573a08..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/expression/ParsiiUnknowVariableException.java
+++ /dev/null
@@ -1,57 +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.log.expression;
-
-/**
- * @since Nov 7, 2014
- */
-public class ParsiiUnknowVariableException extends Exception{
-	
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Default constructor
-	 */
-	public ParsiiUnknowVariableException() {
-		super();
-	}
-
-	/**
-	 * @param message
-	 * @param cause
-	 */
-	public ParsiiUnknowVariableException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	/**
-	 * @param message
-	 */
-	public ParsiiUnknowVariableException(String message) {
-		super(message);
-	}
-
-	/**
-	 * @param cause
-	 */
-	public ParsiiUnknowVariableException(Throwable cause) {
-		super(cause);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/TestGenericServiceAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/TestGenericServiceAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/TestGenericServiceAPIResponseEntity.java
deleted file mode 100644
index a6b7cba..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/TestGenericServiceAPIResponseEntity.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
- *
- *    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.log;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import junit.framework.Assert;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.LinkedList;
-
-/**
- * @since 3/18/15
- */
-public class TestGenericServiceAPIResponseEntity {
-    final static Logger LOG = LoggerFactory.getLogger(TestGenericServiceAPIResponseEntity.class);
-
-    ObjectMapper objectMapper;
-
-    @Before
-    public void setUp(){
-        objectMapper = new ObjectMapper();
-    }
-
-    @JsonSerialize
-    public static class Item{
-        public Item(){}
-        public Item(String name,Double value){
-            this.name = name;
-            this.value = value;
-        }
-        private String name;
-        private Double value;
-
-        public String getName() {
-            return name;
-        }
-        public void setName(String name) {
-            this.name = name;
-        }
-        public Double getValue() {
-            return value;
-        }
-        public void setValue(Double value) {
-            this.value = value;
-        }
-    }
-
-    @Test
-    public void testSerDeserialize() throws IOException {
-        // mock up service side to serialize
-        GenericServiceAPIResponseEntity<Item> entity = new GenericServiceAPIResponseEntity<Item>(Item.class);
-        entity.setObj(Arrays.asList(new Item("a",1.2),new Item("b",1.3),new Item("c",1.4)));
-        entity.setMeta(new HashMap<String, Object>(){{
-            put("tag1","val1");
-            put("tag2","val2");
-        }});
-
-//        entity.setTypeByObj();
-        entity.setSuccess(true);
-        String json = objectMapper.writeValueAsString(entity);
-        LOG.info(json);
-
-        // mock up client side to deserialize
-        GenericServiceAPIResponseEntity deserEntity = objectMapper.readValue(json,GenericServiceAPIResponseEntity.class);
-        Assert.assertEquals(json,objectMapper.writeValueAsString(deserEntity));
-        Assert.assertEquals(3, deserEntity.getObj().size());
-        Assert.assertEquals(LinkedList.class,deserEntity.getObj().getClass());
-        Assert.assertEquals(Item.class,deserEntity.getObj().get(0).getClass());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDouble2DArraySerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDouble2DArraySerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDouble2DArraySerDeser.java
deleted file mode 100644
index 12fba59..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDouble2DArraySerDeser.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.entity.meta.Double2DArraySerDeser;
-import org.junit.Test;
-
-/**
- * @since 7/22/15
- */
-public class TestDouble2DArraySerDeser {
-    private Double2DArraySerDeser double2DArraySerDeser = new Double2DArraySerDeser();
-
-    @Test
-    public void testSerDeser(){
-        double[][] data = new double[][]{
-                {0,1,2,4},
-                {4,2,1,0},
-                {4},
-                null,
-                {}
-        };
-
-        byte[] bytes = double2DArraySerDeser.serialize(data);
-        double[][] data2 = double2DArraySerDeser.deserialize(bytes);
-
-        assert  data.length == data2.length;
-        assert data[0].length == data2[0].length;
-        assert data[1].length == data2[1].length;
-        assert data[2].length == data2[2].length;
-        assert data[3] == data2[3] && data2[3] == null;
-        assert data[4].length == data2[4].length;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDoubleSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDoubleSerDeser.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDoubleSerDeser.java
deleted file mode 100644
index 3a10cf2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestDoubleSerDeser.java
+++ /dev/null
@@ -1,58 +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.log.entity;
-
-import org.apache.eagle.log.entity.meta.DoubleSerDeser;
-import org.apache.eagle.common.ByteUtil;
-import junit.framework.Assert;
-import org.apache.hadoop.hbase.filter.BinaryComparator;
-import org.junit.Test;
-
-public class TestDoubleSerDeser {
-
-	@Test
-	public void test() {
-		DoubleSerDeser dsd = new DoubleSerDeser();
-		//byte[] t = {'N', 'a', 'N'};
-		byte [] t = dsd.serialize(Double.NaN); 
-	
-		Double d = dsd.deserialize(t);
-		System.out.println(d);
-		//Double d = dsd.deserialize(t);		
-	}
-
-	/**
-	 * @link http://en.wikipedia.org/wiki/Double-precision_floating-point_format
-	 */
-	@Test
-	public void testIEEE754_Binary64_DoublePrecisionFloatingPointFormat(){
-		for(Double last = null,i=Math.pow(-2.0,33);i< Math.pow(2.0,33);i+=Math.pow(2.0,10)){
-			if(last != null){
-				Assert.assertTrue(i > last);
-				if(last < 0 && i <0){
-					Assert.assertTrue("Negative double value and its  serialization Binary array have negative correlation", new BinaryComparator(ByteUtil.doubleToBytes(i)).compareTo(ByteUtil.doubleToBytes(last)) < 0);
-				}else if(last < 0 && i >=0){
-					Assert.assertTrue("Binary array for negative double is always greater than any positive doubles' ",new BinaryComparator(ByteUtil.doubleToBytes(i)).compareTo(ByteUtil.doubleToBytes(last)) < 0);
-				}else if(last >= 0){
-					Assert.assertTrue("Positive double value and its  serialization Binary array have positive correlation",new BinaryComparator(ByteUtil.doubleToBytes(i)).compareTo(ByteUtil.doubleToBytes(last)) > 0);
-				}
-			}
-			last = i;
-		}
-		Assert.assertTrue("Binary array for negative double is always greater than any positive doubles'",new BinaryComparator(ByteUtil.doubleToBytes(-1.0)).compareTo(ByteUtil.doubleToBytes(Math.pow(2.0,32)))>0) ;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestGenericEntityIndexStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestGenericEntityIndexStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestGenericEntityIndexStreamReader.java
deleted file mode 100755
index 84236c0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestGenericEntityIndexStreamReader.java
+++ /dev/null
@@ -1,169 +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.log.entity;
-
-import org.apache.eagle.log.entity.index.NonClusteredIndexStreamReader;
-import org.apache.eagle.log.entity.index.UniqueIndexStreamReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-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.query.parser.EagleQueryParser;
-import org.apache.eagle.service.hbase.TestHBaseBase;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-public class TestGenericEntityIndexStreamReader extends TestHBaseBase {
-
-	@Test
-	public void testUniqueIndexRead() throws Exception {
-		EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		
-		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("jobID", "index_test_job_id");
-		e.getTags().put("hostname", "testhost");
-		list.add(e);
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		Assert.assertNotNull(result);
-		
-		IndexDefinition indexDef = ed.getIndexes()[0];
-		SearchCondition condition = new SearchCondition();
-		condition.setOutputFields(new ArrayList<String>());
-		condition.getOutputFields().add("field1");
-		condition.getOutputFields().add("field2");
-		condition.getOutputFields().add("field3");
-		condition.getOutputFields().add("field4");
-		condition.getOutputFields().add("field5");
-		condition.getOutputFields().add("field6");
-		condition.getOutputFields().add("field7");
-
-		String query = "@field7 = \"7\" AND @jobID = \"index_test_job_id\" ";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		condition.setQueryExpression(parser.parse());
-
-		UniqueIndexStreamReader indexReader = new UniqueIndexStreamReader(indexDef, condition);
-		GenericEntityBatchReader batchReader = new GenericEntityBatchReader(indexReader);
-		List<TestLogAPIEntity> entities =  batchReader.read();
-		Assert.assertNotNull(entities);
-		Assert.assertTrue(entities.size() >= 1);
-		TestLogAPIEntity e1 = entities.get(0);
-		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());
-		
-		GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
-		deleter.delete(list);
-		
-		indexReader = new UniqueIndexStreamReader(indexDef, condition);
-		batchReader = new GenericEntityBatchReader(indexReader);
-		entities =  batchReader.read();
-		hbase.deleteTable(entityDefinition.getTable());
-		Assert.assertNotNull(entities);
-		Assert.assertTrue(entities.isEmpty());
-	}
-
-	@Test
-	public void testNonClusterIndexRead() throws Exception {
-        EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		EntityDefinition ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		
-		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("jobID", "index_test_job_id");
-		e.getTags().put("hostname", "testhost");
-		list.add(e);
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		Assert.assertNotNull(result);
-		
-		IndexDefinition indexDef = ed.getIndexes()[1];
-		SearchCondition condition = new SearchCondition();
-		condition.setOutputFields(new ArrayList<String>());
-		condition.getOutputFields().add("field1");
-		condition.getOutputFields().add("field2");
-		condition.getOutputFields().add("field3");
-		condition.getOutputFields().add("field4");
-		condition.getOutputFields().add("field5");
-		condition.getOutputFields().add("field6");
-		condition.getOutputFields().add("field7");
-
-		String query = "@field7 = \"7\" AND @jobID = \"index_test_job_id\" AND @hostname = \"testhost\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		condition.setQueryExpression(parser.parse());
-
-		NonClusteredIndexStreamReader indexReader = new NonClusteredIndexStreamReader(indexDef, condition);
-		GenericEntityBatchReader batchReader = new GenericEntityBatchReader(indexReader);
-		List<TestLogAPIEntity> entities =  batchReader.read();
-		Assert.assertNotNull(entities);
-		Assert.assertTrue(entities.size() >= 1);
-		TestLogAPIEntity e1 = entities.get(0);
-		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());
-
-
-		GenericDeleter deleter = new GenericDeleter(ed.getTable(), ed.getColumnFamily());
-		deleter.delete(list);
-		
-		indexReader = new NonClusteredIndexStreamReader(indexDef, condition);
-		batchReader = new GenericEntityBatchReader(indexReader);
-		entities =  batchReader.read();
-		hbase.deleteTable(entityDefinition.getTable());
-		Assert.assertNotNull(entities);
-		Assert.assertTrue(entities.isEmpty());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseIntegerLogHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseIntegerLogHelper.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseIntegerLogHelper.java
deleted file mode 100755
index b50a14a..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseIntegerLogHelper.java
+++ /dev/null
@@ -1,67 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-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.common.ByteUtil;
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @since : 11/10/14,2014
- */
-public class TestHBaseIntegerLogHelper {
-	@Test
-	public void testTimeSeriesAPIEntity(){
-		InternalLog internalLog = new InternalLog();
-		Map<String,byte[]> map = new HashMap<String,byte[]>();
-		TestTimeSeriesAPIEntity apiEntity = new TestTimeSeriesAPIEntity();
-		EntityDefinition ed = null;
-		try {
-			ed = EntityDefinitionManager.getEntityByServiceName("TestTimeSeriesAPIEntity");
-		} catch (InstantiationException e) {
-			e.printStackTrace();
-		} catch (IllegalAccessException e) {
-			e.printStackTrace();
-		}
-		map.put("a", ByteUtil.intToBytes(12));
-		map.put("c", ByteUtil.longToBytes(123432432l));
-		map.put("cluster", new String("cluster4ut").getBytes());
-		map.put("datacenter", new String("datacenter4ut").getBytes());
-
-		internalLog.setQualifierValues(map);
-		internalLog.setTimestamp(System.currentTimeMillis());
-
-		try {
-			TaggedLogAPIEntity entity = HBaseInternalLogHelper.buildEntity(internalLog, ed);
-			Assert.assertTrue(entity instanceof TestTimeSeriesAPIEntity);
-			TestTimeSeriesAPIEntity tsentity = (TestTimeSeriesAPIEntity) entity;
-			Assert.assertEquals("cluster4ut",tsentity.getTags().get("cluster"));
-			Assert.assertEquals("datacenter4ut",tsentity.getTags().get("datacenter"));
-			Assert.assertEquals(12,tsentity.getField1());
-			Assert.assertEquals(123432432l,tsentity.getField3());
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseWriteEntitiesPerformance.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseWriteEntitiesPerformance.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseWriteEntitiesPerformance.java
deleted file mode 100755
index d7e3705..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHBaseWriteEntitiesPerformance.java
+++ /dev/null
@@ -1,134 +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.log.entity;
-
-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.service.hbase.TestHBaseBase;
-import junit.framework.Assert;
-import org.apache.commons.lang.time.StopWatch;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-@Ignore
-public class TestHBaseWriteEntitiesPerformance extends TestHBaseBase {
-	private EntityDefinition ed;
-	private final static Logger LOG = LoggerFactory.getLogger(TestHBaseWriteEntitiesPerformance.class);
-
-	@Before
-	public void setUp() throws IllegalAccessException, InstantiationException, IOException {
-		EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-		EntityDefinitionManager.registerEntity(TestLogAPIEntity.class);
-		try {
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-			ed.setTimeSeries(true);
-		} catch (InstantiationException | IllegalAccessException e) {
-			Assert.fail(e.getMessage());
-		}
-    }
-
-	@After
-	public void cleanUp() throws IllegalAccessException, InstantiationException, IOException {
-		EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestLogAPIEntity.class);
-		hbase.deleteTable(entityDefinition.getTable());
-	}
-
-	private List<String> writeEntities(int count){
-		GenericEntityWriter writer = null;
-		try {
-			writer = new GenericEntityWriter(ed.getService());
-		} catch (InstantiationException e1) {
-			Assert.fail(e1.getMessage());
-		} catch (IllegalAccessException e1) {
-			Assert.fail(e1.getMessage());
-		}
-
-		if(LOG.isDebugEnabled()) LOG.debug("Start to write "+count+" entities");
-		int wroteCount = 0;
-		List<String> rowkeys = new ArrayList<String>();
-		List<TestLogAPIEntity> list = new ArrayList<TestLogAPIEntity>();
-		for(int i=0;i<= count;i++){
-			TestLogAPIEntity e = new TestLogAPIEntity();
-			e.setTimestamp(new Date().getTime());
-			e.setField1(i);
-			e.setField2(i);
-			e.setField3(i);
-			e.setField4(new Long(i));
-			e.setField5(new Double(i));
-			e.setField6(new Double(i));
-			e.setField7(String.valueOf(i));
-			e.setTags(new HashMap<String, String>());
-			e.getTags().put("jobID", "index_test_job_id");
-			e.getTags().put("hostname", "testhost");
-			e.getTags().put("index", String.valueOf(i));
-			e.getTags().put("class", e.toString());
-			list.add(e);
-
-			if(list.size()>=1000){
-				try {
-					StopWatch watch = new StopWatch();
-					watch.start();
-					rowkeys.addAll(writer.write(list));
-					watch.stop();
-					wroteCount += list.size();
-					if(LOG.isDebugEnabled()) LOG.debug("Wrote "+wroteCount+" / "+count+" entities"+" in "+watch.getTime()+" ms");
-					list.clear();
-				} catch (Exception e1) {
-					Assert.fail(e1.getMessage());
-				}
-			}
-		}
-
-		try {
-			rowkeys.addAll(writer.write(list));
-			wroteCount += list.size();
-			if(LOG.isDebugEnabled()) LOG.debug("wrote "+wroteCount+" / "+count+" entities");
-		} catch (Exception e) {
-			Assert.fail(e.getMessage());
-		}
-		if(LOG.isDebugEnabled()) LOG.debug("done "+count+" entities");
-		return rowkeys;
-	}
-
-	@SuppressWarnings("unused")
-	@Test
-	public void testWrite1MLogAPIEntities(){
-		Date startTime = new Date();
-		LOG.info("Start time: " + startTime);
-		StopWatch watch = new StopWatch();
-		watch.start();
-		List<String> rowKeys = writeEntities(10);
-		Assert.assertNotNull(rowKeys);
-		watch.stop();
-		Date endTime = new Date();
-		LOG.info("End time: " + endTime);
-		LOG.info("Totally take " + watch.getTime() * 1.0 / 1000 + " s");
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHbaseWritePerformance.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHbaseWritePerformance.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHbaseWritePerformance.java
deleted file mode 100644
index 81f1dce..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestHbaseWritePerformance.java
+++ /dev/null
@@ -1,100 +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.log.entity;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Put;
-import org.junit.Test;
-
-public class TestHbaseWritePerformance {
-
-	public static void main(String[] args) throws IOException {
-		
-		HTableInterface tbl = EagleConfigFactory.load().getHTable("unittest");
-
-		int putSize = 1000;
-		List<Put> list = new ArrayList<Put>(putSize);
-		for (int i = 0; i < putSize; ++i) {
-			byte[] v = Integer.toString(i).getBytes();
-			Put p = new Put(v);
-			p.add("f".getBytes(), "a".getBytes(), 100, v);
-			list.add(p);
-		}
-
-		// Case 1
-		System.out.println("Case 1: autoflush = true, individual put");
-		tbl.setAutoFlush(true);
-		long startTime = System.currentTimeMillis();
-		for (int i = 0; i < 1; ++i) {
-			for (Put p : list) {
-				tbl.put(p);
-			}
-			tbl.flushCommits();
-		}
-		long endTime = System.currentTimeMillis();
-		System.out.println("Case 1: " + (endTime - startTime) + " ms");
-		
-		
-		// Case 2
-		System.out.println("Case 2: autoflush = true, multi-put");
-		tbl.setAutoFlush(true);
-		startTime = System.currentTimeMillis();
-		for (int i = 0; i < 1; ++i) {
-			tbl.put(list);
-			tbl.flushCommits();
-		}
-		endTime = System.currentTimeMillis();
-		System.out.println("Case 2: " + (endTime - startTime) + " ms");
-
-		
-		// Case 3
-		System.out.println("Case 3: autoflush = false, multi-put");
-		tbl.setAutoFlush(false);
-		startTime = System.currentTimeMillis();
-		for (int i = 0; i < 1; ++i) {
-			tbl.put(list);
-			tbl.flushCommits();
-		}
-		endTime = System.currentTimeMillis();
-		System.out.println("Case 3: " + (endTime - startTime) + " ms");
-
-		
-		// Case 4
-		System.out.println("Case 4: autoflush = false, individual put");
-		tbl.setAutoFlush(true);
-		startTime = System.currentTimeMillis();
-		for (int i = 0; i < 1; ++i) {
-			for (Put p : list) {
-				tbl.put(p);
-			}
-			tbl.flushCommits();
-		}
-		endTime = System.currentTimeMillis();
-		System.out.println("Case 4: " + (endTime - startTime) + " ms");
-
-	}
-	
-	@Test
-	public void test() {
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100755
index 1839a99..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/TestTestLogAPIEntity.java
+++ /dev/null
@@ -1,405 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.index.UniqueIndexLogReader;
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-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.Assert;
-import org.junit.Test;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-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>());
-            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 {
-        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 {
-        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());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/base/taggedlog/TestTaggedLogAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/base/taggedlog/TestTaggedLogAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/base/taggedlog/TestTaggedLogAPIEntity.java
deleted file mode 100755
index db7ce41..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/test/java/org/apache/eagle/log/entity/base/taggedlog/TestTaggedLogAPIEntity.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.base.taggedlog;
-
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import junit.framework.Assert;
-
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.junit.Test;
-
-public class TestTaggedLogAPIEntity {
-    ObjectMapper objectMapper = new ObjectMapper();
-
-    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-    private class MockSubTaggedLogAPIEntity extends TaggedLogAPIEntity {
-        public double getField1() {
-            return field1;
-        }
-
-        public void setField1(double value) {
-            this.field1 = value;
-            _pcs.firePropertyChange("field1", null, null);
-        }
-
-        @Column("a")
-        private double field1;
-
-        public String getField2() {
-            return field2;
-        }
-
-        public void setField2(String field2) {
-            this.field2 = field2;
-            _pcs.firePropertyChange("field2", null, null);
-        }
-
-        @Column("b")
-        private String field2;
-    }
-
-    @SuppressWarnings("serial")
-	@Test
-    public void testJsonSerializeFilter() throws IOException {
-        MockSubTaggedLogAPIEntity mock = new MockSubTaggedLogAPIEntity();
-        Assert.assertTrue(mock instanceof TaggedLogAPIEntity);
-
-        long timestamp = System.currentTimeMillis();
-        mock.setTimestamp(timestamp);
-        mock.setEncodedRowkey("test_encoded_row_key");
-        mock.setPrefix("mock");
-        mock.setField2("ok");
-        String json = objectMapper.filteredWriter(TaggedLogAPIEntity.getFilterProvider()).writeValueAsString(mock);
-        System.out.println(json);
-        Assert.assertTrue(json.contains("field2"));
-        Assert.assertTrue(!json.contains("field1"));
-        mock.setTimestamp(timestamp);
-        mock.setEncodedRowkey("test_encoded_row_key");
-        mock.setPrefix("mock");
-        mock.setField2("ok");
-        mock.setField1(12.345);
-        mock.setTags(new HashMap<String, String>(){{
-            put("tagName", "tagValue");
-        }});
-        mock.setExp(new HashMap<String, Object>() {{
-            put("extra_field", 3.14);
-        }});
-        json = objectMapper.filteredWriter(TaggedLogAPIEntity.getFilterProvider()).writeValueAsString(mock);
-        System.out.println(json);
-        Assert.assertTrue(json.contains("field2"));
-        Assert.assertTrue(json.contains("field1"));
-    }
-}
\ No newline at end of file


[25/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceBaseClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceBaseClient.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceBaseClient.java
deleted file mode 100644
index 70e92bf..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceBaseClient.java
+++ /dev/null
@@ -1,339 +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.service.client.impl;
-
-import com.sun.jersey.api.client.AsyncWebResource;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.api.client.config.ClientConfig;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.client.urlconnection.URLConnectionClientHandler;
-import org.apache.eagle.common.Base64;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.service.client.EagleServiceAsyncClient;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.security.SecurityConstants;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.core.MediaType;
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public abstract class EagleServiceBaseClient implements IEagleServiceClient {
-    public final static String SERVICE_NAME="serviceName";
-    public final static String DELETE_BY_ID="byId";
-
-    private final String host;
-    private final int port;
-    private final String basePath;
-    private String username;
-    private String password;
-    protected boolean silence = false;
-
-    public String getBaseEndpoint() {
-        return baseEndpoint;
-    }
-
-    private final String baseEndpoint;
-
-    private final static Logger LOG = LoggerFactory.getLogger(EagleServiceBaseClient.class);
-
-    protected static final String DEFAULT_BASE_PATH = "/eagle-service/rest";
-    protected static final MediaType DEFAULT_MEDIA_TYPE = MediaType.APPLICATION_JSON_TYPE;
-    protected static final String DEFAULT_HTTP_HEADER_CONTENT_TYPE = "application/json";
-    protected static final String CONTENT_TYPE = "Content-Type";
-
-    protected final static String GENERIC_ENTITY_PATH = "/entities";
-    protected final static String GENERIC_ENTITY_DELETE_PATH = GENERIC_ENTITY_PATH+"/delete";
-    private final Client client;
-    private final List<Closeable> closeables = new LinkedList<Closeable>();
-
-    private volatile boolean isStopped = false;
-
-    public EagleServiceBaseClient(String host, int port, String basePath, String username, String password) {
-        this.host = host;
-        this.port = port;
-        this.basePath = basePath;
-        this.baseEndpoint = buildBathPath().toString();
-        this.username = username;
-        this.password = password;
-
-        ClientConfig cc = new DefaultClientConfig();
-        cc.getProperties().put(DefaultClientConfig.PROPERTY_CONNECT_TIMEOUT, 60 * 1000);
-        cc.getProperties().put(DefaultClientConfig.PROPERTY_READ_TIMEOUT, 60 * 1000);
-        cc.getClasses().add(JacksonJsonProvider.class);
-        cc.getProperties().put(URLConnectionClientHandler.PROPERTY_HTTP_URL_CONNECTION_SET_METHOD_WORKAROUND, true);
-        this.client = Client.create(cc);
-        client.addFilter(new com.sun.jersey.api.client.filter.GZIPContentEncodingFilter());
-        //        Runtime.getRuntime().addShutdownHook(new EagleServiceClientShutdownHook(this));
-    }
-
-    public EagleServiceBaseClient(String host, int port, String basePath){
-        this(host, port, basePath, null);
-    }
-
-    public EagleServiceBaseClient(String host, int port, String username, String password){
-        this(host, port, DEFAULT_BASE_PATH, username, password);
-    }
-
-//    private class EagleServiceClientShutdownHook extends Thread{
-//        final IEagleServiceClient client;
-//        EagleServiceClientShutdownHook(IEagleServiceClient client){
-//            this.client = client;
-//        }
-//
-//        @Override
-//        public void run() {
-//            LOG.info("Client shutdown hook");
-//            try {
-//                this.client.close();
-//            } catch (IOException e) {
-//                LOG.error(e.getMessage(),e);
-//            }
-//        }
-//    }
-
-    public Client getJerseyClient(){
-        return client;
-    }
-
-    public EagleServiceBaseClient(String host, int port){
-        this(host,port,DEFAULT_BASE_PATH);
-    }
-
-    protected final StringBuilder buildBathPath() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("http://");
-        sb.append(host);
-        sb.append(":");
-        sb.append(port);
-        sb.append(basePath);
-        return sb;
-    }
-
-    protected static String marshall(List<?> entities) throws JsonMappingException, JsonGenerationException, IOException {
-        final JsonFactory factory = new JsonFactory();
-        final ObjectMapper mapper = new ObjectMapper(factory);
-        mapper.setFilters(TaggedLogAPIEntity.getFilterProvider());
-        return mapper.writeValueAsString(entities);
-    }
-
-    protected <E extends TaggedLogAPIEntity> Map<String,List<E>> groupEntitiesByService(List<E> entities) throws EagleServiceClientException {
-        Map<String,List<E>> serviceEntityMap = new HashMap<String, List<E>>();
-        if(LOG.isDebugEnabled()) LOG.debug("Grouping entities by service name");
-        for(E entity: entities){
-            if(entity == null) {
-                LOG.warn("Skip null entity");
-                continue;
-            }
-
-            try {
-                EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(entity.getClass());
-                if(entityDefinition == null){
-                    throw new EagleServiceClientException("Failed to find entity definition of class: "+entity.getClass());
-                }
-                String serviceName = entityDefinition.getService();
-                List<E> bucket = serviceEntityMap.get(serviceName);
-                if(bucket == null){
-                    bucket = new LinkedList<E>();
-                    serviceEntityMap.put(serviceName, bucket);
-                }
-                bucket.add(entity);
-            } catch (InstantiationException e) {
-                throw new EagleServiceClientException(e);
-            } catch (IllegalAccessException e) {
-                throw new EagleServiceClientException(e);
-            }
-        }
-        return serviceEntityMap;
-    }
-
-    @Override
-    public SearchRequestBuilder search() {
-        return new SearchRequestBuilder(this);
-    }
-
-    @Override
-    public SearchRequestBuilder search(String query) {
-        return new SearchRequestBuilder(this).query(query);
-    }
-
-    protected void register(Closeable closeable){
-        this.closeables.add(closeable);
-    }
-
-    @Override
-    public MetricSender metric(String metricName) {
-        MetricSender metricGenerator = new MetricSender(this,metricName);
-        this.register(metricGenerator);
-        return metricGenerator;
-    }
-
-    protected WebResource getWebResource(String relativePath){
-        return this.getJerseyClient().resource(this.getBaseEndpoint() + relativePath);
-    }
-
-    protected AsyncWebResource getAsyncWebResource(String relativePath){
-        return this.getJerseyClient().asyncResource(this.getBaseEndpoint() + relativePath);
-    }
-
-    protected WebResource.Builder putAuthHeaderIfNeeded(WebResource.Builder r) {
-        if (username != null && password != null) {
-           r.header(SecurityConstants.AUTHORIZATION, SecurityConstants.BASIC_AUTHORIZATION_HEADER_PREFIX + Base64.encode(username + ":" + password));
-        }
-        return r;
-    }
-
-    /**
-     * Send HTTP POST request with entities and serviceName
-     *
-     * @param resourceURL
-     * @param entities
-     * @param serviceName
-     * @return
-     * @throws JsonMappingException
-     * @throws JsonGenerationException
-     * @throws IOException
-     */
-    @SuppressWarnings("unchecked")
-    protected GenericServiceAPIResponseEntity<String> postEntitiesWithService(String resourceURL, List<? extends TaggedLogAPIEntity> entities,String serviceName) throws JsonMappingException, JsonGenerationException, IOException {
-        final String json = marshall(entities);
-        final WebResource r = getWebResource(resourceURL);
-        return putAuthHeaderIfNeeded(r.queryParam(SERVICE_NAME,serviceName).accept(DEFAULT_MEDIA_TYPE))
-                .header(CONTENT_TYPE, DEFAULT_HTTP_HEADER_CONTENT_TYPE)
-                .post(GenericServiceAPIResponseEntity.class, json);
-    }
-
-    /**
-     * Send HTTP PUT request with entities and serviceName
-     *
-     * @param resourceURL
-     * @param entities
-     * @param serviceName
-     * @return
-     * @throws JsonMappingException
-     * @throws JsonGenerationException
-     * @throws IOException
-     */
-    @SuppressWarnings("unchecked")
-    protected GenericServiceAPIResponseEntity<String> putEntitiesWithService(String resourceURL, List<? extends TaggedLogAPIEntity> entities,String serviceName) throws JsonMappingException, JsonGenerationException, IOException {
-        final String json = marshall(entities);
-        final WebResource r = getWebResource(resourceURL);
-        return putAuthHeaderIfNeeded(r.queryParam(SERVICE_NAME,serviceName).accept(DEFAULT_MEDIA_TYPE))
-                .header(CONTENT_TYPE, DEFAULT_HTTP_HEADER_CONTENT_TYPE)
-                .put(GenericServiceAPIResponseEntity.class, json);
-    }
-
-
-    protected <E extends TaggedLogAPIEntity> String getServiceNameByClass(Class<E> entityClass) throws EagleServiceClientException {
-        EntityDefinition entityDefinition = null;
-        try {
-            entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(entityClass);
-        } catch (InstantiationException e) {
-            throw new EagleServiceClientException(e);
-        } catch (IllegalAccessException e) {
-            throw new EagleServiceClientException(e);
-        }
-
-        if(entityDefinition == null){
-            throw new EagleServiceClientException("cannot find entity definition of class "+entityClass);
-        }
-        return entityDefinition.getService();
-    }
-
-
-    @Override
-    public BatchSender batch(int batchSize) {
-        BatchSender batchSender = new BatchSender(this,batchSize);
-        this.register(batchSender);
-        return batchSender;
-    }
-
-    @Override
-    public EagleServiceAsyncClient async() {
-        EagleServiceAsyncClient async = new EagleServiceAsyncClientImpl(this);
-        this.register(async);
-        return async;
-    }
-
-    @Override
-    public ConcurrentSender parallel(int parallelNum) {
-        ConcurrentSender concurrentSender = new ConcurrentSender(this,parallelNum);
-        this.register(concurrentSender);
-        return concurrentSender;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities, Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return delete(entities, getServiceNameByClass(entityClass));
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities, Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return create(entities, getServiceNameByClass(entityClass));
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities, Class<E> entityClass) throws IOException, EagleServiceClientException {
-        return update(entities, getServiceNameByClass(entityClass));
-    }
-
-    @Override
-    public void close() throws IOException {
-        if(!this.isStopped) {
-            if(LOG.isDebugEnabled()) LOG.debug("Client is closing");
-            for (Closeable closeable : this.closeables) {
-                try {
-                    closeable.close();
-                } catch (IOException e) {
-                    LOG.error(e.getMessage(), e);
-                    throw e;
-                }
-            }
-        }
-        this.isStopped = true;
-    }
-
-    @Override
-    public DeleteRequestBuilder delete() {
-        return new DeleteRequestBuilder(this);
-    }
-
-    protected void checkNotNull(Object obj,String name) throws EagleServiceClientException{
-        if(obj == null) throw new EagleServiceClientException(name+" should not be null but given");
-    }
-
-    @Override
-    public EagleServiceBaseClient silence(boolean silence) {
-        this.silence = silence;
-        return this;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceClientImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceClientImpl.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceClientImpl.java
deleted file mode 100644
index 6018469..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/EagleServiceClientImpl.java
+++ /dev/null
@@ -1,201 +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.service.client.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.EagleServiceSingleEntityQueryRequest;
-import com.sun.jersey.api.client.WebResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public class EagleServiceClientImpl extends EagleServiceBaseClient {
-    private final static Logger LOG = LoggerFactory.getLogger(EagleServiceClientImpl.class);
-
-    public EagleServiceClientImpl(String host, int port){
-        super(host, port);
-    }
-
-    public EagleServiceClientImpl(EagleServiceConnector connector){
-        this(connector.getEagleServiceHost(), connector.getEagleServicePort(), connector.getUsername(), connector.getPassword());
-    }
-
-    public EagleServiceClientImpl(String host, int port, String username, String password){
-        super(host, port, username, password);
-    }
-
-    private String getWholePath(String urlString){
-    	return getBaseEndpoint() + urlString;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities, String serviceName) throws IOException,EagleServiceClientException {
-        checkNotNull(serviceName,"serviceName");
-        checkNotNull(entities,"entities");
-
-        final GenericServiceAPIResponseEntity<String> response;
-        response = postEntitiesWithService(GENERIC_ENTITY_PATH, entities, serviceName);
-        if (!response.isSuccess()) {
-            LOG.error("Failed to create entities for service: " + serviceName);
-        }
-        return response;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> create(List<E> entities) throws IOException, EagleServiceClientException {
-        checkNotNull(entities,"entities");
-
-        Map<String,List<E>> serviceEntityMap = groupEntitiesByService(entities);
-        if(LOG.isDebugEnabled()) LOG.debug("Creating entities for "+serviceEntityMap.keySet().size()+" services");
-
-        List<String> createdKeys = new LinkedList<String>();
-
-        for(Map.Entry<String,List<E>> entry: serviceEntityMap.entrySet()){
-            GenericServiceAPIResponseEntity<String> response = create(entry.getValue(),entry.getKey());
-            if(!response.isSuccess()){
-                throw new IOException("Service side exception: "+response.getException());
-            }else if(response.getObj()!=null){
-                createdKeys.addAll(response.getObj());
-            }
-        }
-        GenericServiceAPIResponseEntity<String> entity = new GenericServiceAPIResponseEntity<String>();
-        entity.setObj(createdKeys);
-        entity.setSuccess(true);
-        return entity;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities) throws IOException, EagleServiceClientException {
-        checkNotNull(entities,"entities");
-
-        Map<String,List<E>> serviceEntityMap = groupEntitiesByService(entities);
-        if(LOG.isDebugEnabled()) LOG.debug("Creating entities for "+serviceEntityMap.keySet().size()+" services");
-
-        List<String> deletedKeys = new LinkedList<String>();
-        for(Map.Entry<String,List<E>> entry: serviceEntityMap.entrySet()){
-            GenericServiceAPIResponseEntity<String> response = delete(entry.getValue(), entry.getKey());
-            if(!response.isSuccess()){
-                LOG.error("Got service exception: "+response.getException());
-                throw new IOException(response.getException());
-            }else if(response.getObj()!=null){
-                deletedKeys.addAll(response.getObj());
-            }
-        }
-        GenericServiceAPIResponseEntity<String> entity = new GenericServiceAPIResponseEntity<String>();
-        entity.setObj(deletedKeys);
-        entity.setSuccess(true);
-        return entity;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> delete(List<E> entities, String serviceName) throws IOException,EagleServiceClientException {
-        checkNotNull(entities,"entities");
-        checkNotNull(serviceName,"serviceName");
-
-        return postEntitiesWithService(GENERIC_ENTITY_DELETE_PATH,entities,serviceName);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public GenericServiceAPIResponseEntity<String> delete(EagleServiceSingleEntityQueryRequest request) throws IOException,EagleServiceClientException {
-        String queryString = request.getQueryParameterString();
-        StringBuilder sb = new StringBuilder();
-        sb.append(GENERIC_ENTITY_PATH);
-        sb.append("?");
-        sb.append(queryString);
-        final String urlString =  sb.toString();
-
-        if(!this.silence) LOG.info("Going to delete by querying service: " + getWholePath(urlString));
-        WebResource r = getWebResource(urlString);
-        return putAuthHeaderIfNeeded(r.accept(DEFAULT_MEDIA_TYPE)
-                                      .header(CONTENT_TYPE, DEFAULT_HTTP_HEADER_CONTENT_TYPE))
-                                      .delete(GenericServiceAPIResponseEntity.class);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public GenericServiceAPIResponseEntity<String> deleteById(List<String> ids, String serviceName) throws EagleServiceClientException, IOException {
-        checkNotNull(serviceName,"serviceName");
-        checkNotNull(ids,"ids");
-
-        final String json = marshall(ids);
-        final WebResource r = getWebResource(GENERIC_ENTITY_DELETE_PATH);
-        return putAuthHeaderIfNeeded(r.queryParam(SERVICE_NAME,serviceName)
-                                       .queryParam(DELETE_BY_ID, "true")
-                                       .accept(DEFAULT_MEDIA_TYPE))
-                                       .header(CONTENT_TYPE, DEFAULT_HTTP_HEADER_CONTENT_TYPE)
-                                       .post(GenericServiceAPIResponseEntity.class, json);
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities) throws IOException, EagleServiceClientException {
-        checkNotNull(entities,"entities");
-
-        Map<String,List<E>> serviceEntityMap = groupEntitiesByService(entities);
-        if(LOG.isDebugEnabled()) LOG.debug("Updating entities for "+serviceEntityMap.keySet().size()+" services");
-
-        List<String> createdKeys = new LinkedList<String>();
-
-        for(Map.Entry<String,List<E>> entry: serviceEntityMap.entrySet()){
-            GenericServiceAPIResponseEntity<String> response = update(entry.getValue(), entry.getKey());
-            if(!response.isSuccess()){
-                throw new IOException("Got service exception when updating service "+entry.getKey()+" : "+response.getException());
-            }else{
-                if(response.getObj()!=null) {
-                    createdKeys.addAll(response.getObj());
-                }
-            }
-        }
-
-        GenericServiceAPIResponseEntity<String> entity = new GenericServiceAPIResponseEntity<String>();
-        entity.setObj(createdKeys);
-        entity.setSuccess(true);
-        return entity;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> GenericServiceAPIResponseEntity<String> update(List<E> entities, String serviceName) throws IOException, EagleServiceClientException {
-        checkNotNull(entities,"entities");
-        checkNotNull(serviceName,"serviceName");
-
-        return putEntitiesWithService(GENERIC_ENTITY_PATH,entities,serviceName);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public <T extends Object> GenericServiceAPIResponseEntity<T> search(EagleServiceSingleEntityQueryRequest request) throws EagleServiceClientException {
-        String queryString = request.getQueryParameterString();
-        StringBuilder sb = new StringBuilder();
-        sb.append(GENERIC_ENTITY_PATH);
-        sb.append("?");
-        sb.append(queryString);
-        final String urlString =  sb.toString();
-        if(!this.silence) LOG.info("Going to query service: " + getWholePath(urlString));
-        WebResource r = getWebResource(urlString);
-        return putAuthHeaderIfNeeded(r.accept(DEFAULT_MEDIA_TYPE))
-                                       .header(CONTENT_TYPE, DEFAULT_HTTP_HEADER_CONTENT_TYPE)
-                                       .get(GenericServiceAPIResponseEntity.class);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/MetricSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/MetricSender.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/MetricSender.java
deleted file mode 100644
index dce5045..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/MetricSender.java
+++ /dev/null
@@ -1,75 +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.service.client.impl;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.EagleServiceClientException;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class MetricSender extends BatchSender {
-    private final String metricName;
-    private Map<String, String> tags;
-
-    public MetricSender(IEagleServiceClient client, String metricName) {
-        super(client,1);
-        this.metricName = metricName;
-    }
-
-    public MetricSender batch(int batchSize) {
-        super.setBatchSize(batchSize);
-        return this;
-    }
-
-    public MetricSender tags(Map<String,String> tags){
-        this.tags = tags;
-        return this;
-    }
-
-    public MetricSender send(String metricName,long timestamp,Map<String,String> tags,double ...values) throws IOException, EagleServiceClientException {
-        GenericMetricEntity metric = new GenericMetricEntity();
-        metric.setPrefix(metricName);
-        metric.setValue(values);
-        metric.setTimestamp(timestamp);
-        metric.setTags(tags);
-        super.send(metric);
-        return this;
-    }
-
-    public MetricSender send(Long timestamp,Map<String,String> tags,double ...values) throws IOException, EagleServiceClientException {
-        return this.send(this.metricName,timestamp,tags,values);
-    }
-
-    public MetricSender send(Long timestamp, double ... values) throws IOException, EagleServiceClientException {
-        return this.send(timestamp,new HashMap<String, String>(this.tags),values);
-    }
-
-//    public EagleServiceMetricSender send(String metricName,Map<String,String> tags,double ... values) throws IOException, EagleServiceClientException {
-//        return this.send(metricName,System.currentTimeMillis(),tags,values);
-//    }
-//
-//    public EagleServiceMetricSender send(Map<String,String> tags,double ...values) throws IOException, EagleServiceClientException {
-//        return this.send(this.metricName,System.currentTimeMillis(),tags,values);
-//    }
-//
-//    public EagleServiceMetricSender send(double ... values) throws IOException, EagleServiceClientException {
-//        return this.send(System.currentTimeMillis(), new HashMap<String, String>(this.tags), values);
-//    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/SearchRequestBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/SearchRequestBuilder.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/SearchRequestBuilder.java
deleted file mode 100644
index 331043c..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/SearchRequestBuilder.java
+++ /dev/null
@@ -1,97 +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.service.client.impl;
-
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.EagleServiceClientException;
-import org.apache.eagle.service.client.EagleServiceSingleEntityQueryRequest;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-public class SearchRequestBuilder {
-    private final EagleServiceSingleEntityQueryRequest request;
-    private final IEagleServiceClient client;
-    private final static Logger LOG = LoggerFactory.getLogger(SearchRequestBuilder.class);
-
-    public SearchRequestBuilder(IEagleServiceClient client) {
-        this.request = new EagleServiceSingleEntityQueryRequest();
-        this.client = client;
-    }
-
-    public SearchRequestBuilder query(String query){
-        try {
-            this.request.setQuery(URLEncoder.encode(query,"UTF-8"));
-        } catch (UnsupportedEncodingException e) {
-            LOG.error(e.getMessage(),e);
-        }
-        return this;
-    }
-
-    public SearchRequestBuilder startRowkey(String startRowkey){
-        this.request.setStartRowkey(startRowkey);
-        return this;
-    }
-
-    public SearchRequestBuilder pageSize(int pageSize){
-        this.request.setPageSize(pageSize);
-        return this;
-    }
-
-    public SearchRequestBuilder startTime(long startTime){
-        this.request.setStartTime(startTime);
-        return this;
-    }
-
-    public SearchRequestBuilder startTime(String startTime){
-        this.request.setStartTime(DateTimeUtil.humanDateToMillisecondsWithoutException(startTime));
-        return this;
-    }
-
-    public SearchRequestBuilder endTime(long endTime){
-        this.request.setEndTime(endTime);
-        return this;
-    }
-
-    public SearchRequestBuilder endTime(String endTime){
-        this.request.setEndTime(DateTimeUtil.humanDateToMillisecondsWithoutException(endTime));
-        return this;
-    }
-
-    public SearchRequestBuilder treeAgg(boolean treeAgg){
-        this.request.setTreeAgg(treeAgg);
-        return this;
-    }
-
-    public SearchRequestBuilder metricName(String metricName){
-        this.request.setMetricName(metricName);
-        return this;
-    }
-
-    public SearchRequestBuilder filterIfMissing(Boolean filterIfMissing){
-        this.request.setFilterIfMissing(filterIfMissing);
-        return this;
-    }
-
-    public <T> GenericServiceAPIResponseEntity<T> send() throws EagleServiceClientException {
-        return client.search(this.request);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/security/SecurityConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/security/SecurityConstants.java b/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/security/SecurityConstants.java
deleted file mode 100644
index 9c5e85b..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/security/SecurityConstants.java
+++ /dev/null
@@ -1,22 +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.service.client.security;
-
-public class SecurityConstants {
-    public static final String AUTHORIZATION = "Authorization";
-    public static final String BASIC_AUTHORIZATION_HEADER_PREFIX = "Basic ";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/Base.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/Base.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/Base.java
deleted file mode 100644
index 1f54f00..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/Base.java
+++ /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.
- */
-package org.apache.eagle.service.client;
-
-import org.codehaus.jackson.annotate.JsonSubTypes;
-import org.codehaus.jackson.annotate.JsonTypeInfo;
-
-
-//@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
-@JsonTypeInfo(use=JsonTypeInfo.Id.NAME )
-@JsonSubTypes({
-    @JsonSubTypes.Type(value=ClassA.class, name="ClassA"),
-    @JsonSubTypes.Type(value=ClassB.class, name="ClassB")
-})
-public abstract class Base {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassA.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassA.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassA.java
deleted file mode 100644
index 60158fc..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassA.java
+++ /dev/null
@@ -1,35 +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.service.client;
-
-import org.codehaus.jackson.annotate.JsonTypeName;
-
-
-@JsonTypeName("ClassA")
-public class ClassA extends Base {
-
-	private int a;
-
-	public int getA() {
-		return a;
-	}
-
-	public void setA(int a) {
-		this.a = a;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassB.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassB.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassB.java
deleted file mode 100644
index faa20ba..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClassB.java
+++ /dev/null
@@ -1,34 +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.service.client;
-
-import org.codehaus.jackson.annotate.JsonTypeName;
-
-@JsonTypeName("ClassB")
-public class ClassB extends Base {
-
-	private String b;
-
-	public String getB() {
-		return b;
-	}
-
-	public void setB(String b) {
-		this.b = b;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClientTestBase.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClientTestBase.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClientTestBase.java
deleted file mode 100644
index ac16b93..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/ClientTestBase.java
+++ /dev/null
@@ -1,32 +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.service.client;
-
-import org.apache.eagle.service.hbase.EmbeddedHbase;
-
-public class ClientTestBase {
-	
-	//protected static EmbeddedServer server;
-	protected static EmbeddedHbase hbase;
-
-	//@BeforeClass
-	public static void startup() throws Exception {
-		//hbase = EmbeddedHbase.getInstance();
-		//String webappDirLocation = "../../../eagle-webservice/target/eagle-service";
-		//server = EmbeddedServer.getInstance(webappDirLocation);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestEagleServiceClientImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestEagleServiceClientImpl.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestEagleServiceClientImpl.java
deleted file mode 100644
index 0625145..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestEagleServiceClientImpl.java
+++ /dev/null
@@ -1,339 +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.service.client;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.apache.eagle.service.client.impl.ConcurrentSender;
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.*;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
-public class TestEagleServiceClientImpl extends ClientTestBase {
-
-    IEagleServiceClient client = new EagleServiceClientImpl("localhost",38080);
-
-    //@Before
-    public void setUp() {
-        hbase.createTable("unittest", "f");
-    }
-
-    //After
-    public void cleanUp() {
-        hbase.deleteTable("unittest");
-    }
-
-    //@Test
-    public void testCreateAndSearch() throws IOException, EagleServiceClientException, IllegalAccessException, InstantiationException {
-        List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-
-        for(int i=0;i<100;i++){
-            TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-            entity.setTimestamp(System.currentTimeMillis());
-            entity.setTags(new HashMap<String, String>() {{
-                put("cluster", "cluster4ut");
-                put("datacenter", "datacenter4ut");
-                put("timestampStr",System.currentTimeMillis()+"");
-            }});
-            entity.setField1(1);
-            entity.setField2(1);
-            entity.setField3(1);
-            entity.setField4(1l);
-            entity.setField5(1l);
-            entity.setField5(1.2);
-            entity.setField6(-1.2);
-            entity.setField7("test unit string attribute");
-            entities.add(entity);
-        }
-
-        GenericServiceAPIResponseEntity response = client.create(entities);
-        assert response.isSuccess();
-        response = client.create(entities,TestTimeSeriesAPIEntity.class);
-        assert response.isSuccess();
-        response = client.create(entities,"TestTimeSeriesAPIEntity");
-        assert response.isSuccess();
-
-        response = client.search("TestTimeSeriesAPIEntity[]{*}")
-                .startTime(0)
-                .endTime(System.currentTimeMillis() + 25 * 3600 * 1000)
-                .pageSize(1000)
-                .send();
-
-        assert  response.isSuccess();
-        assert response.getObj().size() > 0;
-    }
-
-    private TestTimeSeriesAPIEntity newEntity(){
-        TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-        entity.setTimestamp(System.currentTimeMillis());
-        entity.setTags(new HashMap<String, String>() {{
-            put("cluster", "cluster4ut");
-            put("datacenter", "datacenter4ut");
-        }});
-        entity.setField1(1);
-        entity.setField2(1);
-        entity.setField3(1);
-        entity.setField4(1l);
-        entity.setField5(1l);
-        entity.setField5(1.2);
-        entity.setField6(-1.2);
-        entity.setField7("test unit string attribute");
-        return entity;
-    }
-
-    //@Test
-    public void testUpdate() throws IOException, EagleServiceClientException, IllegalAccessException, InstantiationException {
-        List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-        for(int i=0;i<100;i++){
-            TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-            entity.setTimestamp(System.currentTimeMillis());
-            entity.setTags(new HashMap<String, String>() {{
-                put("cluster", "cluster4ut");
-                put("datacenter", "datacenter4ut");
-            }});
-            entity.setField1(1);
-            entity.setField2(1);
-            entity.setField3(1);
-            entity.setField4(1l);
-            entity.setField5(1l);
-            entity.setField5(1.2);
-            entity.setField6(-1.2);
-            entity.setField7("updated");
-            entities.add(entity);
-        }
-
-        GenericServiceAPIResponseEntity response = client.update(entities);
-        assert response.isSuccess();
-        response = client.update(entities, TestTimeSeriesAPIEntity.class);
-        assert response.isSuccess();
-        response = client.update(entities, "TestTimeSeriesAPIEntity");
-        assert response.isSuccess();
-
-        response = client.search("TestTimeSeriesAPIEntity[]{*}")
-                .startTime(0)
-                .endTime(System.currentTimeMillis() + 25 * 3600 * 1000)
-                .pageSize(1000)
-                .send();
-
-        assert response.isSuccess();
-        assert response.getObj().size() > 0;
-    }
-
-    //@Test
-    public void testDelete() throws IOException, EagleServiceClientException {
-        List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-        for(int i=0;i<100;i++){
-            TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-            entity.setTimestamp(System.currentTimeMillis());
-            entity.setTags(new HashMap<String, String>() {{
-                put("cluster", "cluster4ut");
-                put("datacenter", "datacenter4ut");
-            }});
-
-            entity.setField1(1);
-            entity.setField2(1);
-            entity.setField3(1);
-            entity.setField4(1l);
-            entity.setField5(1l);
-            entity.setField5(1.2);
-            entity.setField6(-1.2);
-            entity.setField7(" unit test oriented string attribute");
-            entities.add(entity);
-        }
-
-        GenericServiceAPIResponseEntity response = client.delete(entities);
-        assert response.isSuccess();
-        response = client.delete(entities, TestTimeSeriesAPIEntity.class);
-        assert response.isSuccess();
-        response = client.delete(entities, "TestTimeSeriesAPIEntity");
-        assert response.isSuccess();
-
-        response = client.delete()
-                .byId(Arrays.asList("30RR1H___rOqxUr5M_sR-g5RxZlmldR_9eQ49A"))
-                .serviceName("TestTimeSeriesAPIEntity")
-                .send();
-
-        assert response.isSuccess();
-
-        response = client.delete()
-                .byQuery("TestTimeSeriesAPIEntity[]{*}")
-                .startTime(0)
-                .endTime(System.currentTimeMillis())
-                .pageSize(1000)
-                .send();
-
-        assert response.isSuccess();
-    }
-
-    //@Test
-    public void testMetricsSender() throws IOException, EagleServiceClientException {
-        List<GenericMetricEntity> entities = new ArrayList<GenericMetricEntity>();
-
-        Map<String,String> tags = new HashMap<String, String>() {{
-            put("cluster", "cluster4ut");
-            put("datacenter", "datacenter4ut");
-        }};
-
-        for(int i=0;i<100;i++){
-            GenericMetricEntity entity = new GenericMetricEntity();
-            entity.setTimestamp(System.currentTimeMillis());
-            entity.setTags(tags);
-            entity.setValue(new double[]{1.234});
-            entity.setPrefix("unit.test.metrics");
-            entities.add(entity);
-        }
-
-        GenericServiceAPIResponseEntity response = client.create(entities);
-        assert response.isSuccess();
-        response = client.create(entities,GenericMetricEntity.class);
-        assert response.isSuccess();
-        response = client.create(entities,GenericMetricEntity.GENERIC_METRIC_SERVICE);
-        assert response.isSuccess();
-
-        client.metric("unit.test.metrics")
-                .batch(5)
-                .tags(tags)
-                .send("unit.test.anothermetrics", System.currentTimeMillis(), tags, 0.1, 0.2, 0.3)
-                .send(System.currentTimeMillis(), 0.1)
-                .send(System.currentTimeMillis(),0.1,0.2)
-                .send(System.currentTimeMillis(),0.1,0.2,0.3)
-                .send(System.currentTimeMillis(),tags,0.1,0.2,0.3)
-                .send("unit.test.anothermetrics",System.currentTimeMillis(),tags,0.1,0.2,0.3)
-                .flush();
-
-        GenericServiceAPIResponseEntity<GenericMetricEntity> metricResponse = client.search("GenericMetricService[@cluster=\"cluster4ut\" AND @datacenter = \"datacenter4ut\"]{*}")
-                .startTime(0)
-                .endTime(System.currentTimeMillis()+24 * 3600 * 1000)
-                .metricName("unit.test.metrics")
-                .pageSize(1000)
-                .send();
-        List<GenericMetricEntity> metricEntities = metricResponse.getObj();
-        assert metricEntities != null;
-        assert metricResponse.isSuccess();
-
-        GenericServiceAPIResponseEntity<Map> metricAggResponse = client.search("GenericMetricService[@cluster=\"cluster4ut\" AND @datacenter = \"datacenter4ut\"]<@cluster>{sum(value)}")
-                .startTime(0)
-                .endTime(System.currentTimeMillis()+24 * 3600 * 1000)
-                .metricName("unit.test.metrics")
-                .pageSize(1000)
-                .send();
-        List<Map> aggResult = metricAggResponse.getObj();
-        assert aggResult != null;
-        assert metricAggResponse.isSuccess();
-
-        client.close();
-    }
-
-    //@Test
-    public void testBatchSender() throws IOException, EagleServiceClientException {
-        client.batch(2)
-                .send(newEntity())
-                .send(newEntity())
-                .send(newEntity());
-        client.close();
-    }
-
-    //@Test
-    public void testAsyncSender() throws IOException, EagleServiceClientException, ExecutionException, InterruptedException {
-        EagleServiceAsyncClient asyncClient = client.async();
-
-        Future<GenericServiceAPIResponseEntity<String>> future1 =
-                asyncClient.create(Arrays.asList(newEntity()));
-
-        GenericServiceAPIResponseEntity<String> response1 = future1.get();
-
-        Assert.assertTrue(response1.isSuccess());
-
-        Future<GenericServiceAPIResponseEntity<String>> future2 =
-                asyncClient.update(Arrays.asList(newEntity()));
-
-        GenericServiceAPIResponseEntity<String> response2 = future2.get();
-
-        Assert.assertTrue(response2.isSuccess());
-
-        Future<GenericServiceAPIResponseEntity<String>> future3 =
-                asyncClient.delete(Arrays.asList(newEntity()));
-
-        GenericServiceAPIResponseEntity<String> response3 = future3.get();
-
-        Assert.assertTrue(response3.isSuccess());
-
-        client.close();
-    }
-
-    //@Test
-    public void testParallelSender() throws IOException, EagleServiceClientException, InterruptedException {
-        // Case #1:
-        ConcurrentSender concurrentSender = client
-                .parallel(10)
-                .batchSize(30)
-                .batchInterval(1000);
-
-        int num = 1000;
-
-        for(int i=0; i< num;i++) {
-            concurrentSender.send(Arrays.asList(newEntity()));
-        }
-
-        // Case #2:
-        ConcurrentSender concurrentSender2 = client
-                .parallel(10)
-                .batchSize(20)
-                .batchInterval(3);
-
-        int num2 = 50;
-
-        for(int i=0; i< num2;i++) {
-            concurrentSender2.send(Arrays.asList(newEntity()));
-            Thread.sleep(1);
-        }
-        client.close();
-    }
-
-    //@Test
-    public void testSearch() throws EagleServiceClientException, IOException {
-        hbase.createTable("eagle_metric", "f");
-
-        GenericServiceAPIResponseEntity<TestTimeSeriesAPIEntity> response =
-                client.search("TestTimeSeriesAPIEntity[]{*}").startTime(0).endTime(System.currentTimeMillis()+1000).pageSize(1000).send();
-
-        Assert.assertTrue(response.isSuccess());
-
-        GenericServiceAPIResponseEntity<Map> response2 =
-                client.search("TestTimeSeriesAPIEntity[]<@cluster>{count}").startTime(0).endTime(System.currentTimeMillis()+1000).pageSize(1000).send();
-
-        Assert.assertTrue(response2.isSuccess());
-
-        GenericServiceAPIResponseEntity<GenericMetricEntity> response3 =
-                client.search("GenericMetricService[@cluster = \"cluster4ut\" AND @datacenter = \"datacenter4ut\"]{*}").metricName("unit.test.metrics").startTime(0).endTime(System.currentTimeMillis()+1000).pageSize(1000).send();
-
-        Assert.assertTrue(response3.isSuccess());
-        hbase.deleteTable("eagle_metric");
-    }
-
-    @Test
-    public void test() {
-
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestIEagleServiceClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestIEagleServiceClient.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestIEagleServiceClient.java
deleted file mode 100644
index a144118..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestIEagleServiceClient.java
+++ /dev/null
@@ -1,64 +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.service.client;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class TestIEagleServiceClient extends ClientTestBase {
-    IEagleServiceClient client;
-    //@Before
-    public void setUp(){
-        client = new EagleServiceClientImpl("localhost", EagleConfigFactory.load().getServicePort());
-    }
-
-    /**
-     * Just compiling passed is ok
-     */
-    //@Test
-    @SuppressWarnings("unused")
-    public void testCreate() throws IOException, EagleServiceClientException, IllegalAccessException, InstantiationException {
-        EntityDefinition entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(GenericMetricEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-
-        client = new EagleServiceClientImpl("localhost", EagleConfigFactory.load().getServicePort());
-        List<GenericMetricEntity> metricEntityList = new ArrayList<GenericMetricEntity>();
-        GenericServiceAPIResponseEntity<String> unTypedResponse = client.create(metricEntityList);
-        GenericServiceAPIResponseEntity<String> weakTypedResponse = client.create(metricEntityList,GenericMetricEntity.GENERIC_METRIC_SERVICE);
-        GenericServiceAPIResponseEntity<String> strongTypedResponse = client.create(metricEntityList,GenericMetricEntity.class);
-
-        GenericServiceAPIResponseEntity<GenericMetricEntity> weakTypedSearchResponse = client.search("").send();
-        if(weakTypedSearchResponse!=null) {
-            Class<GenericMetricEntity> typedClazz = weakTypedSearchResponse.getType();
-            List<GenericMetricEntity> typedEntities = weakTypedSearchResponse.getObj();
-        }
-    }
-
-    @Test
-    public void test() {
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestJackson.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestJackson.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestJackson.java
deleted file mode 100644
index 73d28be..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/client/TestJackson.java
+++ /dev/null
@@ -1,63 +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.service.client;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.Assert;
-
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-
-// http://wiki.fasterxml.com/JacksonPolymorphicDeserialization
-public class TestJackson {
-
-	@Test
-	public void testBase() throws JsonGenerationException, JsonMappingException, IOException {
-		List<Base> objs = new ArrayList<Base>();
-		ClassA a = new ClassA();
-		a.setA(1);
-		ClassB b = new ClassB();
-		b.setB("2");
-		
-		objs.add(a);
-		objs.add(b);
-		
-		ObjectMapper om = new ObjectMapper();
-		om.enableDefaultTyping();
-//		om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
-		String value = om.writeValueAsString(objs);
-		
-		System.out.println("value = " + value);
-		
-		@SuppressWarnings("rawtypes")
-		List result = om.readValue(value, ArrayList.class);
-		System.out.println("size = " + result.size());
-		Object obj1 = result.get(0);
-		Object obj2 = result.get(1);
-		
-		Assert.assertEquals("ClassA", obj1.getClass().getSimpleName());
-		Assert.assertEquals(1, ((ClassA)obj1).getA());
-		Assert.assertEquals("ClassB", obj2.getClass().getSimpleName());
-		Assert.assertEquals("2", ((ClassB)obj2).getB());
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/jackson/TestJacksonMarshalling.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/jackson/TestJacksonMarshalling.java b/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/jackson/TestJacksonMarshalling.java
deleted file mode 100644
index 808ee9a..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/java/org/apache/eagle/service/jackson/TestJacksonMarshalling.java
+++ /dev/null
@@ -1,149 +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.service.jackson;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import junit.framework.Assert;
-
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TestJacksonMarshalling {
-	private static Logger LOG = LoggerFactory.getLogger(TestJacksonMarshalling.class);
-
-	
-	
-	@Test
-	public void testJSonArrayMarshalling(){
-		String[] array = {"cluster", "datacenter", "rack", "hostname"};
-		JsonFactory factory = new JsonFactory(); 
-	    ObjectMapper mapper = new ObjectMapper(factory);
-	    String result = null;
-	    try{
-	    	result = mapper.writeValueAsString(array);
-	    }catch(Exception ex){
-	    	LOG.error("Cannot marshall", ex);
-	    	Assert.fail("cannot marshall an String array");
-	    }
-	    Assert.assertEquals("[\"cluster\",\"datacenter\",\"rack\",\"hostname\"]", result);
-	}
-	
-
-	static class Pojo{
-		private String field1;
-		private String field2;
-		public String getField1() {
-			return field1;
-		}
-		public void setField1(String field1) {
-			this.field1 = field1;
-		}
-		public String getField2() {
-			return field2;
-		}
-		public void setField2(String field2) {
-			this.field2 = field2;
-		}
-	}
-	
-	@Test
-	public void testPojoMarshalling(){
-		Pojo p = new Pojo();
-		p.setField1("field1");
-		p.setField2("field2");
-		
-		JsonFactory factory = new JsonFactory(); 
-	    ObjectMapper mapper = new ObjectMapper(factory);
-	    String result = null;
-	    try{
-	    	result = mapper.writeValueAsString(p);
-	    }catch(Exception ex){
-	    	LOG.error("Cannot marshall", ex);
-	    	Assert.fail("Cannot marshall a Pojo");
-	    }
-	    System.out.println(result);
-	    Assert.assertEquals("{\"field1\":\"field1\",\"field2\":\"field2\"}", result);
-	}
-	
-	@Test
-	public void testPojoArrayMashalling(){
-		Pojo[] ps = new Pojo[2];
-		ps[0] = new Pojo();
-		ps[0].setField1("0_field1");
-		ps[0].setField2("0_field2");
-		ps[1] = new Pojo();
-		ps[1].setField1("1_field1");
-		ps[1].setField2("1_field2");
-		
-		JsonFactory factory = new JsonFactory(); 
-	    ObjectMapper mapper = new ObjectMapper(factory);
-	    String result = null;
-	    try{
-	    	result = mapper.writeValueAsString(ps);
-	    }catch(Exception ex){
-	    	LOG.error("Cannot marshall", ex);
-	    	Assert.fail("Cannot marshall a Pojo array");
-	    }
-	    System.out.println(result);
-	    Assert.assertEquals("[{\"field1\":\"0_field1\",\"field2\":\"0_field2\"},{\"field1\":\"1_field1\",\"field2\":\"1_field2\"}]", result);
-	}
-	
-	@Test
-	public void testComplexMapMarshalling(){
-		Map<List<String>, String> map = new HashMap<List<String>, String>();
-		map.put(Arrays.asList("cluster1","dc1"), "123");
-		map.put(Arrays.asList("cluster1","dc1"), "456");
-		
-		JsonFactory factory = new JsonFactory(); 
-	    ObjectMapper mapper = new ObjectMapper(factory);
-	    String result = null;
-	    try{
-	    	result = mapper.writeValueAsString(map);
-	    }catch(Exception ex){
-	    	LOG.error("Cannot marshall", ex);
-	    	Assert.fail("Cannot marshall a complex map");
-	    }
-	    System.out.println(result);
-	}
-	
-	@Test
-	public void testMapMapMarshalling(){
-		Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();
-		Map<String, String> childmap1 = new HashMap<String, String>();
-		childmap1.put("dc1", "123");
-		childmap1.put("dc1", "456");
-		map.put("cluster1", childmap1);
-		
-		JsonFactory factory = new JsonFactory(); 
-	    ObjectMapper mapper = new ObjectMapper(factory);
-	    String result = null;
-	    try{
-	    	result = mapper.writeValueAsString(map);
-	    }catch(Exception ex){
-	    	LOG.error("Cannot marshall", ex);
-	    	Assert.fail("Cannot marshall a complex map");
-	    }
-	    System.out.println(result);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-client-base/src/test/resources/log4j.properties
deleted file mode 100644
index d59ded6..0000000
--- a/eagle-core/eagle-query/eagle-client-base/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +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.
-
-log4j.rootLogger=INFO, stdout
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/pom.xml b/eagle-core/eagle-query/eagle-common/pom.xml
deleted file mode 100644
index 1e0d79b..0000000
--- a/eagle-core/eagle-query/eagle-common/pom.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-common</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-common</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>commons-configuration</groupId>
-			<artifactId>commons-configuration</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hbase</groupId>
-			<artifactId>hbase-client</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-common</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>mail</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.velocity</groupId>
-			<artifactId>velocity</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.google.code.gson</groupId>
-			<artifactId>gson</artifactId>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.google.guava</groupId>
-			<artifactId>guava</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.netflix.archaius</groupId>
-			<artifactId>archaius-core</artifactId>
-		</dependency>
-		
-		<dependency>
-			<groupId>org.mortbay.jetty</groupId>
-			<artifactId>jetty</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.mortbay.jetty</groupId>
-			<artifactId>jetty-util</artifactId>
-		</dependency>
-        <dependency>
-            <groupId>com.typesafe</groupId>
-            <artifactId>config</artifactId>
-        </dependency>
-	</dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/META-INF/MANIFEST.MF b/eagle-core/eagle-query/eagle-common/src/main/java/META-INF/MANIFEST.MF
deleted file mode 100644
index c67816b..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +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.
- */
-Manifest-Version: 1.0
-Class-Path: 
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Base64.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Base64.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Base64.java
deleted file mode 100644
index aec84a3..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/Base64.java
+++ /dev/null
@@ -1,44 +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.common;
-
-import java.io.UnsupportedEncodingException;
-
-import javax.xml.bind.DatatypeConverter;
-
-public class Base64 {
-
-	public static String decode(String salted) {
-		try {
-			return new String(DatatypeConverter.parseBase64Binary(salted), "UTF-8");
-		} catch (UnsupportedEncodingException e) {
-			throw new RuntimeException("UTF-8 must be supported", e);
-		}
-	}
-
-	public static String encode(String plain) {
-		try {
-			return DatatypeConverter.printBase64Binary(plain.getBytes("UTF-8"));
-		} catch (UnsupportedEncodingException e) {
-			throw new RuntimeException("UTF-8 must be supported", e);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/ByteUtil.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/ByteUtil.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/ByteUtil.java
deleted file mode 100644
index c1d4976..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/ByteUtil.java
+++ /dev/null
@@ -1,178 +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.common;
-
-public class ByteUtil {
-	
-	public static double bytesToDouble(byte[] bytes, int offset){
-		return Double.longBitsToDouble(bytesToLong(bytes, offset));
-	}
-	
-	public static double bytesToDouble(byte[] bytes){
-		return Double.longBitsToDouble(bytesToLong(bytes));
-	}
-	
-	public static void doubleToBytes(double v, byte[] bytes){
-		doubleToBytes(v, bytes, 0);
-	}
-	
-	public static void doubleToBytes(double v, byte[] bytes, int offset){
-		longToBytes(Double.doubleToLongBits(v), bytes, offset);
-	}
-	
-	public static byte[] doubleToBytes(double v){
-		return longToBytes(Double.doubleToLongBits(v));
-	}
-	
-	public static long bytesToLong(byte[] bytes){
-		return bytesToLong(bytes, 0);
-	}
-	
-	public static long bytesToLong(byte[] bytes, int offset){
-		long value = 0;
-		for(int i=0; i<8; i++){
-			value <<= 8;
-			value |= (bytes[i+offset] & 0xFF);
-		}
-		return value;
-	}
-	
-	public static void longToBytes(long v, byte[] bytes){
-		longToBytes(v, bytes, 0);
-	}
-	
-	public static void longToBytes(long v, byte[] bytes, int offset){
-		long tmp = v;
-		for(int i=0; i<8; i++){
-			bytes[offset + 7 - i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-	}
-	
-	public static byte[] longToBytes(long v){
-		long tmp = v;
-		byte[] b = new byte[8];
-		for(int i=0; i<8; i++){
-			b[7-i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-		return b;
-	}
-	
-	public static int bytesToInt(byte[] bytes){
-		return bytesToInt(bytes, 0);
-	}
-	
-	public static int bytesToInt(byte[] bytes, int offset){
-		int value = 0;
-		for(int i=0; i<4; i++){
-			value <<= 8;
-			value |= (bytes[i+offset] & 0xFF);
-		}
-		return value;
-	}
-	
-	public static void intToBytes(int v, byte[] bytes){
-		intToBytes(v, bytes, 0);
-	}
-	
-	public static void intToBytes(int v, byte[] bytes, int offset){
-		int tmp = v;
-		for(int i=0; i<4; i++){
-			bytes[offset + 3 - i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-	}
-
-	public static byte[] intToBytes(int v){
-		int tmp = v;
-		byte[] b = new byte[4];
-		for(int i=0; i<4; i++){
-			b[3-i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-		return b;
-	}
-
-	//////
-	
-	public static short bytesToShort(byte[] bytes){
-		return bytesToShort(bytes, 0);
-	}
-	
-	public static short bytesToShort(byte[] bytes, int offset){
-		short value = 0;
-		for(int i=0; i < 2; i++){
-			value <<= 8;
-			value |= (bytes[i+offset] & 0xFF);
-		}
-		return value;
-	}
-	
-	public static void shortToBytes(short v, byte[] bytes){
-		shortToBytes(v, bytes, 0);
-	}
-	
-	public static void shortToBytes(short v, byte[] bytes, int offset){
-		int tmp = v;
-		for(int i=0; i < 2; i++){
-			bytes[offset + 1 - i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-	}
-
-	public static byte[] shortToBytes(short v){
-		int tmp = v;
-		byte[] b = new byte[2];
-		for(int i=0; i<2; i++){
-			b[1-i] = (byte)(tmp & 0xFF);
-			tmp >>= 8;
-		}
-		return b;
-	}
-
-	public static byte[] concat(byte[]... arrays) {
-        int length = 0;
-        for (byte[] array : arrays) {
-            length += array.length;
-        }
-        byte[] result = new byte[length];
-        int pos = 0;
-        for (byte[] array : arrays) {
-            System.arraycopy(array, 0, result, pos, array.length);
-            pos += array.length;
-        }
-        return result;
-    }
-	
-//    public static void main(String[] args){ 
-//    	int a = "ThreadName".hashCode();
-//    	byte[] b = intToBytes(a);
-//    	byte[] c = intToBytes(1676687583);
-//    	String s = new String(b);
-//    	System.out.println(s);
-    	
-//    	byte[] d = intToBytes(8652353);
-//    	System.out.println(bytesToInt(d));
-    	
-//    	byte[] e = longToBytes(12131513513l);
-//    	System.out.println(bytesToLong(e));
-//    	if(12131513513l == bytesToLong(e)){
-//    		System.out.println("yes");
-//    	}
-//    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayList.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayList.java b/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayList.java
deleted file mode 100644
index 49695e5..0000000
--- a/eagle-core/eagle-query/eagle-common/src/main/java/org/apache/eagle/common/CircularArrayList.java
+++ /dev/null
@@ -1,149 +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.common;
-
-import java.util.AbstractList;
-import java.util.RandomAccess;
-
-/**
- * Circular array implementation
- *
- * @param <E>
- */
-public class CircularArrayList<E> extends AbstractList<E> implements RandomAccess {
-  
-    private final E[] buf; // a List implementing RandomAccess
-    private int head = 0;
-    private int tail = 0;
-    private boolean full = false;
-  
-    public CircularArrayList(E[] array) {
-        buf = array;
-        full = (buf.length == 0);
-    }
-  
-    public int capacity() {
-        return buf.length;
-    }
-    
-    public int head() {
-    	return head;
-    }
-    
-    public int tail() {
-    	return tail;
-    }
-    
-    public boolean isFull() {
-    	return full;
-    }
-    
-    @Override
-    public void clear() {
-        head = 0;
-        tail = 0;
-        full = false;
-        for (int i = 0; i < buf.length; ++i) {
-        	buf[i] = null;
-        }
-    }
-
-    private int wrapIndex(int i) {
-        int m = i % buf.length;
-        if (m < 0) { // java modulus can be negative
-            throw new IndexOutOfBoundsException();
-        }
-        return m;
-    }
-  
-    // This method is O(n) but will never be called if the
-    // CircularArrayList is used in its typical/intended role.
-    private void shiftBlock(int startIndex, int endIndex) {
-        assert (endIndex > startIndex);
-        for (int i = endIndex - 1; i >= startIndex; i--) {
-            set(i + 1, get(i));
-        }
-    }
-    
-    public int find(E e) {
-    	final int size = size();
-    	for (int i = 0; i < size; ++i) {
-    		if (e.equals(get(i))) {
-    			return i;
-    		}
-    	}
-    	return -1;
-    }
-  
-    @Override
-    public int size() {
-    	if (full) {
-    		return buf.length;
-    	}
-        return tail - head + (tail < head ? buf.length : 0);
-    }
-  
-    @Override
-    public E get(int i) {
-        if (i < 0 || i >= size()) {
-            throw new IndexOutOfBoundsException();
-        }
-        return buf[wrapIndex(head + i)];
-    }
-  
-    @Override
-    public E set(int i, E e) {
-        if (i < 0 || i >= size()) {
-            throw new IndexOutOfBoundsException();
-        }
-        return buf[wrapIndex(head + i)] =  e;
-    }
-  
-    @Override
-    public void add(int i, E e) {
-        int s = size();
-        if (s == buf.length) {
-            throw new IllegalStateException("Cannot add element."
-                    + " CircularArrayList is filled to capacity.");
-        }
-        full = (s + 1 == buf.length);
-        if (i < 0 || i > s) {
-            throw new IndexOutOfBoundsException();
-        }
-        tail = wrapIndex(tail + 1);
-        if (i < s) {
-            shiftBlock(i, s);
-        }
-        set(i, e);
-    }
-  
-    @Override
-    public E remove(int i) {
-        int s = size();
-        if (i < 0 || i >= s) {
-            throw new IndexOutOfBoundsException();
-        }
-        final E e = get(i);
-        if (i > 0) {
-            shiftBlock(0, i);
-        }
-    	buf[head] = null;
-        head = wrapIndex(head + 1);
-        full = false;
-        return e;
-    }
-}
\ No newline at end of file


[10/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/ModifyResult.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/ModifyResult.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/ModifyResult.java
deleted file mode 100644
index 4c0f56b..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/ModifyResult.java
+++ /dev/null
@@ -1,34 +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.result;
-
-import java.util.List;
-
-/**
- * @since 3/18/15
- */
-public class ModifyResult<I> extends Result {
-    public List<I> getIdentifiers() {
-        return identifiers;
-    }
-
-    public void setIdentifiers(List<I> identifiers) {
-        this.identifiers = identifiers;
-    }
-
-    private List<I> identifiers;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/QueryResult.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/QueryResult.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/QueryResult.java
deleted file mode 100644
index 496315a..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/QueryResult.java
+++ /dev/null
@@ -1,67 +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.result;
-
-import java.util.List;
-
-/**
- * @since 3/18/15
- */
-public class QueryResult<E> extends Result {
-
-
-    public List<E> getData() {
-        return data;
-    }
-
-    public void setData(List<E> data) {
-        this.data = data;
-    }
-
-    private List<E> data;
-    private Long firstTimestamp;
-
-    public Long getLastTimestamp() {
-        return lastTimestamp;
-    }
-
-    public void setLastTimestamp(Long lastTimestamp) {
-        this.lastTimestamp = lastTimestamp;
-    }
-
-    public Long getFirstTimestamp() {
-        return firstTimestamp;
-    }
-
-    public void setFirstTimestamp(Long firstTimestamp) {
-        this.firstTimestamp = firstTimestamp;
-    }
-
-    private Long lastTimestamp;
-
-    public Class<E> getEntityType() {
-        return entityType;
-    }
-
-    public void setEntityType(Class<E> entityType) {
-        this.entityType = entityType;
-    }
-
-    private Class<E> entityType;
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/Result.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/Result.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/Result.java
deleted file mode 100644
index 492be08..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/result/Result.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.result;
-
-/**
- * @since 3/18/15
- */
-public class Result {
-    public boolean isSuccess() {
-        return success;
-    }
-
-    public void setSuccess(boolean success) {
-        this.success = success;
-    }
-    private boolean success;
-
-    private int size;
-
-    public void setSize(int size) {
-        this.size = size;
-    }
-
-    public int getSize() {
-        return size;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index da59a18..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceLoader.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.spi;
-
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-/**
- * @since 3/20/15
- */
-public class DataStorageServiceLoader {
-    private final Logger LOG = LoggerFactory.getLogger(DataStorageServiceLoader.class);
-    private final ServiceLoader<DataStorageServiceProvider> serviceLoader;
-    private final Map<String,DataStorageServiceProvider> storageServiceProviders;
-
-    private DataStorageServiceLoader(){
-        serviceLoader = ServiceLoader.load(DataStorageServiceProvider.class);
-        storageServiceProviders = new HashMap<String,DataStorageServiceProvider>();
-
-        // Load storage providers
-        load();
-    }
-
-    private static DataStorageServiceLoader instance;
-    public static DataStorageServiceLoader getInstance(){
-        if(instance == null){
-            instance = new DataStorageServiceLoader();
-        }
-        return instance;
-    }
-
-    private void load(){
-        Iterator<DataStorageServiceProvider> dataStorageServiceLoaders =  serviceLoader.iterator();
-        while(dataStorageServiceLoaders.hasNext()){
-            DataStorageServiceProvider provider = dataStorageServiceLoaders.next();
-            String storageType = provider.getType();
-
-            if(storageServiceProviders.containsKey(storageType)) {
-                LOG.warn("Overrode storage provider: type =" + storageType + ",  provider =  " + provider);
-            }else if(storageType == null){
-                LOG.error("Loaded storage provider: type = null , provider = " + provider);
-                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());
-    }
-
-    /**
-     * Get supported storage types
-     *
-     * @return supported storage types
-     */
-    public Set<String> getStorageTypes(){
-        return this.storageServiceProviders.keySet();
-    }
-
-    /**
-     * Reload storage providers
-     */
-    @SuppressWarnings("unused")
-    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());
-        }
-        return storageServiceProviders.get(type);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceProvider.java b/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceProvider.java
deleted file mode 100644
index 8533206..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/java/org/apache/eagle/storage/spi/DataStorageServiceProvider.java
+++ /dev/null
@@ -1,35 +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.spi;
-
-import org.apache.eagle.storage.DataStorage;
-
-/**
- * @since 3/20/15
- */
-public interface DataStorageServiceProvider<T extends DataStorage> {
-    /**
-     * @return unique storage type
-     */
-    String getType();
-
-    /**
-     *
-     * @return storage instance
-     */
-    T getStorage();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider b/eagle-core/eagle-query/eagle-storage-base/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
deleted file mode 100644
index 9f19f5f..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-# org.apache.eagle.storage.spi.DataStorageServiceProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestDataStorageLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestDataStorageLoader.java b/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestDataStorageLoader.java
deleted file mode 100644
index abfed52..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestDataStorageLoader.java
+++ /dev/null
@@ -1,51 +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;
-
-import org.apache.eagle.storage.exception.IllegalDataStorageException;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.spi.TestDataStorage;
-import org.apache.commons.configuration.AbstractConfiguration;
-import org.apache.commons.configuration.CombinedConfiguration;
-import org.junit.Test;
-
-import java.util.Properties;
-
-/**
- * @since 3/18/15
- */
-public class TestDataStorageLoader {
-    @Test
-    public void testDataStorage() throws IllegalDataStorageTypeException, IllegalDataStorageException {
-        DataStorage dataStorage = DataStorageManager.newDataStorage("test");
-        assert dataStorage instanceof TestDataStorage;
-
-        // get eagle.storage.type (value: test) from src/test/resources/application.conf
-        DataStorage dataStorage2 = DataStorageManager.getDataStorageByEagleConfig();
-        assert dataStorage2 instanceof TestDataStorage;
-
-        AbstractConfiguration configuration = new CombinedConfiguration();
-        configuration.addProperty(DataStorageManager.EAGLE_STORAGE_TYPE,"test");
-        DataStorage dataStorage3 = DataStorageManager.newDataStorage(configuration);
-        assert dataStorage3 instanceof TestDataStorage;
-
-        Properties properties = new Properties();
-        properties.put(DataStorageManager.EAGLE_STORAGE_TYPE, "test");
-        DataStorage dataStorage4 = DataStorageManager.newDataStorage(properties);
-        assert dataStorage4 instanceof TestDataStorage;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestUri.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestUri.java b/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestUri.java
deleted file mode 100644
index 9f42e29..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/TestUri.java
+++ /dev/null
@@ -1,42 +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;
-
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.net.URI;
-
-/**
- * @since 3/23/15
- */
-public class TestUri {
-    @Test
-    public void testUri(){
-        String url = "eagle:hbase://zk1:2181,zk2:2181/hbase?connectionTimeout=12";
-        String cleanURI = url.substring(6);
-
-        URI uri = URI.create(cleanURI);
-        Assert.assertEquals("hbase",uri.getScheme());
-
-        // the problem is here, can not parse host and port
-        Assert.assertEquals(null,uri.getHost());
-
-        Assert.assertEquals(-1,uri.getPort());
-        Assert.assertEquals("/hbase",uri.getPath());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorage.java b/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorage.java
deleted file mode 100644
index 0973242..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorage.java
+++ /dev/null
@@ -1,84 +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.spi;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.DataStorageBase;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @since 3/20/15
- */
-public class TestDataStorage extends DataStorageBase {
-
-    @Override
-    public void init() throws IOException {
-
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> update(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> create(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> delete(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public ModifyResult<String> deleteByID(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public ModifyResult<String> delete(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public <E> QueryResult<E> query(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public <E> QueryResult<E> queryById(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        return null;
-    }
-
-    @Override
-    public void close() throws IOException {
-
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorageServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorageServiceProvider.java b/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorageServiceProvider.java
deleted file mode 100644
index 0920c10..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/java/org/apache/eagle/storage/spi/TestDataStorageServiceProvider.java
+++ /dev/null
@@ -1,42 +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.spi;
-
-import org.apache.eagle.storage.DataStorage;
-import org.junit.Test;
-
-/**
- * @since 3/20/15
- */
-public class TestDataStorageServiceProvider implements DataStorageServiceProvider {
-    private final static String TEST = "test";
-
-    @Override
-    public String getType() {
-        return TEST;
-    }
-
-    @Override
-    public DataStorage getStorage() {
-        return new TestDataStorage();
-    }
-
-    @Test
-    public void test() {
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider b/eagle-core/eagle-query/eagle-storage-base/src/test/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
deleted file mode 100644
index 991484a..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
+++ /dev/null
@@ -1,16 +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.
-
-org.apache.eagle.storage.spi.TestDataStorageServiceProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/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
deleted file mode 100644
index dbaac1d..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +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.
-
-eagle{
-	service{
-		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"
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-base/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-storage-base/src/test/resources/log4j.properties
deleted file mode 100644
index d59ded6..0000000
--- a/eagle-core/eagle-query/eagle-storage-base/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +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.
-
-log4j.rootLogger=INFO, stdout
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml b/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
deleted file mode 100644
index 16762fe..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-query-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-storage-hbase</artifactId>
-
-    <dependencies>
-        <!-- added for jira EAGLE-47 -->
-		<dependency>
-			<groupId>org.springframework.security</groupId>
-			<artifactId>spring-security-core</artifactId>
-			<version>${spring.framework.version}</version>
-		</dependency> 
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-audit-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-server</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.hbase</groupId>
-            <artifactId>hbase-client</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.google.protobuf</groupId>
-            <artifactId>protobuf-java</artifactId>
-            <version>${protobuf-java.version}</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/hbase-coprocessor.xml</descriptor>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/assembly/hbase-coprocessor.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/assembly/hbase-coprocessor.xml b/eagle-core/eagle-query/eagle-storage-hbase/src/assembly/hbase-coprocessor.xml
deleted file mode 100644
index fa80c64..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/assembly/hbase-coprocessor.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-    <id>coprocessor</id>
-    <formats>
-        <format>jar</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/</outputDirectory>
-            <useProjectArtifact>false</useProjectArtifact>
-            <unpack>true</unpack>
-            <scope>runtime</scope>
-            <unpackOptions>
-                <excludes>
-                    <exclude>**/hbase-site.xml</exclude>
-                    <exclude>**/hdfs-site.xml</exclude>
-                    <exclude>**/hbase-default.xml</exclude>
-                </excludes>
-            </unpackOptions>
-            <excludes>
-                <!--<exclude>org.apache.hbase:hbase-server</exclude>-->
-                <!--<exclude>org.apache.hbase:hbase-client</exclude>-->
-                <exclude>org.apache.hbase:*</exclude>
-                <exclude>org.apache.hadoop:*</exclude>
-                <exclude>org.slf4j:slf4j-api</exclude>
-                <exclude>org.slf4j:log4j-over-slf4j</exclude>
-                <exclude>org.slf4j:slf4j-log4j12</exclude>
-            </excludes>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>${project.build.outputDirectory}</directory>
-            <outputDirectory>/</outputDirectory>
-        </fileSet>
-    </fileSets>
-</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
deleted file mode 100644
index 3cea080..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorage.java
+++ /dev/null
@@ -1,258 +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;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.index.RowKeyLogReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.old.GenericDeleter;
-import org.apache.eagle.query.GenericQuery;
-import org.apache.eagle.storage.DataStorageBase;
-import org.apache.eagle.storage.hbase.query.GenericQueryBuilder;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_EVENT_CREATE;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_EVENT_UPDATE;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_EVENT_DELETE;
-
-/**
- * @since 3/18/15
- */
-public class HBaseStorage extends DataStorageBase {
-
-    private final static Logger LOG = LoggerFactory.getLogger(HBaseStorage.class);
-    private HBaseStorageAudit audit = new HBaseStorageAudit();
-    
-    @Override
-    public void init() throws IOException {
-        LOG.info("Initializing");
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> update(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-    	ModifyResult<String> result = create(entities, entityDefinition);
-    	audit.auditOperation(AUDIT_EVENT_UPDATE, entities, null, entityDefinition); // added for jira: EAGLE-47
-    	return result;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> create(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<>();
-        try {
-            GenericEntityWriter entityWriter = new GenericEntityWriter(entityDefinition);
-            result.setIdentifiers(entityWriter.write(entities));
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new IOException(e);
-        }
-
-        audit.auditOperation(AUDIT_EVENT_CREATE, entities, null, entityDefinition); // added for jira: EAGLE-47
-        return result;
-    }
-    
-    /**
-     * @param entities
-     * @param entityDefinition
-     * @param <E>
-     *
-     * @return ModifyResult
-     *
-     * @throws IOException
-     */
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> delete(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try{
-            GenericDeleter deleter = new GenericDeleter(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-            result.setIdentifiers(deleter.delete(entities));
-        }catch(Exception ex){
-            LOG.error(ex.getMessage(),ex);
-            result.setSuccess(false);
-            throw new IOException(ex);
-        }
-        
-        audit.auditOperation(AUDIT_EVENT_DELETE, entities, null, entityDefinition); // added for jira: EAGLE-47
-        result.setSuccess(true);
-        return result;
-    }
-
-    /**
-     * TODO:
-     *
-     * @param ids
-     * @param entityDefinition
-     * @return
-     * @throws IOException
-     */
-    @Override
-    public ModifyResult<String> deleteByID(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try{
-            GenericDeleter deleter = new GenericDeleter(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-            deleter.deleteByEncodedRowkeys(ids);
-            result.setIdentifiers(ids);
-        }catch(Exception ex){
-            LOG.error(ex.getMessage(),ex);
-            result.setSuccess(false);
-            throw new IOException(ex);
-        }
-        
-        audit.auditOperation(AUDIT_EVENT_DELETE, null, ids, entityDefinition); // added for jira: EAGLE-47
-        result.setSuccess(true);
-        return result;
-    }
-
-    /**
-     * TODO:
-     *
-     * @param query
-     * @param entityDefinition
-     * @return
-     * @throws IOException
-     */
-    @Override
-    public ModifyResult<String> delete(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        if(query.isHasAgg()){
-            throw new IOException("delete by aggregation query is not supported");
-        }
-        ModifyResult<String> result;
-
-        try {
-            LOG.info("Querying for deleting: "+query);
-            GenericQuery reader = GenericQueryBuilder
-                    .select(query.getSearchCondition().getOutputFields())
-                    .from(query.getServiceName(),query.getRawQuery().getMetricName()).where(query.getSearchCondition())
-                    .groupBy(query.isHasAgg(), query.getGroupByFields(), query.getAggregateFunctionTypes(), query.getAggregateFields())
-                    .timeSeries(query.getRawQuery().isTimeSeries(),query.getRawQuery().getIntervalmin())
-                    .treeAgg(query.getRawQuery().isTreeAgg())
-                    .orderBy(query.getSortOptions(),query.getSortFunctions(),query.getSortFields())
-                    .top(query.getRawQuery().getTop())
-                    .parallel(query.getRawQuery().getParallel())
-                    .build();
-            List<? extends TaggedLogAPIEntity> entities = reader.result();
-            if(entities != null){
-                LOG.info("Deleting "+entities.size()+" entities");
-                result =  delete(entities,entityDefinition);
-            }else{
-                LOG.info("Deleting 0 entities");
-                result = new ModifyResult<String>();
-                result.setSuccess(true);
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    /**
-     * TODO:
-     *
-     * @param query
-     * @param entityDefinition
-     * @param <E>
-     * @return
-     * @throws IOException
-     */
-    @Override
-    @SuppressWarnings("unchecked")
-    public <E extends Object> QueryResult<E> query(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        QueryResult<E> result = new QueryResult<E>();
-        try {
-            GenericQuery reader = GenericQueryBuilder
-                    .select(query.getSearchCondition().getOutputFields())
-                    .from(query.getServiceName(),query.getRawQuery().getMetricName()).where(query.getSearchCondition())
-                    .groupBy(query.isHasAgg(), query.getGroupByFields(), query.getAggregateFunctionTypes(), query.getAggregateFields())
-                    .timeSeries(query.getRawQuery().isTimeSeries(),query.getRawQuery().getIntervalmin())
-                    .treeAgg(query.getRawQuery().isTreeAgg())
-                    .orderBy(query.getSortOptions(),query.getSortFunctions(),query.getSortFields())
-                    .top(query.getRawQuery().getTop())
-                    .parallel(query.getRawQuery().getParallel())
-                    .build();
-            List<E> entities =  reader.result();
-            result.setData(entities);
-            result.setFirstTimestamp(reader.getFirstTimeStamp());
-            result.setLastTimestamp(reader.getLastTimestamp());
-            result.setSize(entities.size());
-            if(!query.isHasAgg()) result.setEntityType((Class<E>) entityDefinition.getEntityClass());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    /**
-     * Query by HBase rowkey
-     *
-     * @param ids hbase rowkey list
-     * @param entityDefinition entity definition
-     * @param <E> entity type
-     * @return QueryResult with entity type <E>
-     *
-     * @throws IOException
-     */
-    @Override
-    public <E> QueryResult<E> queryById(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        List<byte[]> rowkeys = new ArrayList<>(ids.size());
-        QueryResult<E> result = new QueryResult<E>();
-        for(String id:ids) rowkeys.add(EagleBase64Wrapper.decode(id));
-        RowKeyLogReader reader = null;
-        try {
-            reader = new RowKeyLogReader(entityDefinition, rowkeys,null);
-            reader.open();
-            List<TaggedLogAPIEntity> entities = new LinkedList<>();
-
-            while(true) {
-                InternalLog log = reader.read();
-                if(log == null) break;
-                TaggedLogAPIEntity entity = HBaseInternalLogHelper.buildEntity(log, entityDefinition);
-                entities.add(entity);
-            }
-
-            result.setData((List<E>) entities);
-            result.setSuccess(true);
-            result.setSize(entities.size());
-            return result;
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            throw new IOException(e);
-        } finally{
-            if(reader != null) reader.close();
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        LOG.info("Shutting down");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorageAudit.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorageAudit.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorageAudit.java
deleted file mode 100644
index f6a6180..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/HBaseStorageAudit.java
+++ /dev/null
@@ -1,164 +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;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.audit.common.AuditEvent;
-import org.apache.eagle.audit.entity.GenericAuditEntity;
-import org.apache.eagle.audit.listener.AuditListener;
-import org.apache.eagle.audit.listener.AuditSupport;
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.operation.CreateStatement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_SERVICE_ENDPOINT;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_SERVICE_NAME;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_USER_ID;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_OPERATION;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_TIMESTAMP;
-
-/**
- * Implementation of AuditListener class. 
- * Used in HBaseStorage class for auditing HBase operations performed.
- */
-public class HBaseStorageAudit implements AuditListener {
-	
-	private final static Logger LOG = LoggerFactory.getLogger(HBaseStorageAudit.class);
-	private AuditSupport auditSupport = new AuditSupport(this);
-	
-	public HBaseStorageAudit() {
-		auditSupport.addAuditListener(this);
-	}
-	
-	@Override
-	public void auditEvent(AuditEvent event) {
-			LOG.info("firing audit event: " + event.toString());
-			persistAuditEntity(event.getAuditEntities());
-	}
-	
-	/**
-	 * Method to be invoked for firing audit event.
-	 * @param operation: HBase operation. Values like CREATE/UPDATE/DELETE.
-	 * @param entities: List of entities used in HBase operation.
-	 * @param encodedRowKeys: List of encodededRowKeys returned from successful HBase operation. To be passed only from deletebyID method. 
-	 * @param entityDefinition: EntityDefinition object used in the HBaseOperation.
-	 */
-    public void auditOperation(String operation, List<? extends TaggedLogAPIEntity> entities, List<String> encodedRowKeys, EntityDefinition entityDefinition) {
-    	if (isAuditingRequired(entityDefinition.getService())) {
-    		List<GenericAuditEntity> auditEntities = buildAuditEntities(operation, entities, encodedRowKeys, entityDefinition);
-    		if (null != auditEntities && 0 != auditEntities.size())
-    			auditSupport.fireAudit(entityDefinition.getService(), auditEntities);
-    	}
-    }
-    
-    /**
-     * Check if audit is required based on the service names and audit configuration.
-     * @param serviceName: Name of the service call.
-     * @return
-     */
-    private boolean isAuditingRequired (String serviceName) {
-    	if (EagleConfigFactory.load().isServiceAuditingEnabled()
-    			// As per jira EAGLE-47, HBase operation level audit is done only for Policy, Site and DataSource definitions. 
-    			&& ("AlertDefinitionService".equals(serviceName) || "AlertDataSourceService".equals(serviceName))) {
-    		return true;
-    	}
-
-    	return false;
-    }
-    
-    /**
-     * Build Audit entities based on the available infomration.
-     * @param operation: HBase operation performed.
-     * @param entities: List of entities used in HBase operation.
-     * @param encodedRowKeys: List of encodededRowKeys returned from successful HBase operation. To be passed only from deletebyID method.
-     * @param entityDefinition: EntityDefinition object used in the HBaseOperation.
-     * @return
-     */
-    private List<GenericAuditEntity> buildAuditEntities(String operation, List<? extends TaggedLogAPIEntity> entities, List<String> encodedRowKeys, EntityDefinition entityDefinition) {
-    	String serviceName = entityDefinition.getService();
-    	long timestamp = System.currentTimeMillis()/1000L;
-    	
-    	Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
-    	String userID = null != authentication.getName() ? authentication.getName() : "data not available"; // empty user
-
-    	List<GenericAuditEntity> auditEntities = new ArrayList<GenericAuditEntity>();
-    	GenericAuditEntity auditEntity = new GenericAuditEntity();
-    	
-		if (null != entities && 0 != entities.size())  {
-			Map<String, String> auditTags;
-			for (TaggedLogAPIEntity entity : entities) {
-	    		auditTags = entity.getTags();
-	    		auditTags.put(AUDIT_COLUMN_SERVICE_NAME, serviceName);
-	    		auditTags.put(AUDIT_COLUMN_USER_ID, userID);
-	    		auditTags.put(AUDIT_COLUMN_OPERATION, operation);
-	    		auditTags.put(AUDIT_COLUMN_TIMESTAMP, timestamp + "");
-	    		
-	    		auditEntity = new GenericAuditEntity();
-	    		auditEntity.setTags(auditTags);
-	    		auditEntities.add(auditEntity);
-	    	}
-			
-			return auditEntities;
-		} else if (null != encodedRowKeys && 0 != encodedRowKeys.size()) { // conditions yields true only in case of deleteByID 
-			Map<String, String> auditTags;
-			for (String encodedRowKey : encodedRowKeys) {
-				auditTags = new HashMap<String, String>();
-				auditTags.put("encodedRowKey", encodedRowKey);
-				auditTags.put(AUDIT_COLUMN_SERVICE_NAME, serviceName);
-	    		auditTags.put(AUDIT_COLUMN_USER_ID, userID);
-	    		auditTags.put(AUDIT_COLUMN_OPERATION, operation);
-	    		auditTags.put(AUDIT_COLUMN_TIMESTAMP, timestamp + "");
-	    		
-	    		auditEntity = new GenericAuditEntity();
-	    		auditEntity.setTags(auditTags);
-	    		auditEntities.add(auditEntity);
-			}
-
-			return auditEntities;
-		} else {
-			return null;
-		}
-    }
-
-    /**
-     * Persists audit entries into HBase.
-     * @param entityList
-     */
-    private void persistAuditEntity(List<? extends TaggedLogAPIEntity> entityList) {
-    	try {
-	    	if (null != entityList && 0 != entityList.size()) {
-		    	CreateStatement createStatement = new CreateStatement(entityList, AUDIT_SERVICE_ENDPOINT);
-		        createStatement.execute(DataStorageManager.newDataStorage("hbase"));
-	    	}
-    	} catch (IOException | IllegalDataStorageTypeException exception) {
-			LOG.error("exception in auditing storage event", exception.getMessage());
-		}
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/GenericQueryBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/GenericQueryBuilder.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/GenericQueryBuilder.java
deleted file mode 100755
index 3dd83cf..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/GenericQueryBuilder.java
+++ /dev/null
@@ -1,158 +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.query;
-
-import java.util.List;
-
-import org.apache.eagle.query.GenericEntityQuery;
-import org.apache.eagle.query.GenericQuery;
-import org.apache.eagle.storage.hbase.query.aggregate.GenericAggregateQuery;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.query.aggregate.AggregateCondition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-
-/**
- * TODO: decouple into eagle-query-base module
- *
- * @since : 10/30/14,2014
- */
-public class GenericQueryBuilder{
-	private Logger LOG = LoggerFactory.getLogger(GenericQueryBuilder.class);
-
-	private List<String> outputFields;
-	private String serviceName;
-	private String metricName;
-	private SearchCondition searchCondition;
-	@Deprecated
-	private int parallel;
-	private boolean hasAgg;
-	private List<String> groupByFields;
-	private List<AggregateFunctionType> aggregateFuncTypes;
-	private List<String> aggregateFields;
-	@Deprecated
-	private boolean treeAgg=false;
-	private boolean timeSeries=false;
-	private long intervalmin;
-	private List<SortOption> sortOptions;
-	private int top;
-	private List<AggregateFunctionType> sortFunctionTypes;
-	private List<String> sortFields;
-
-	public static GenericQueryBuilder select(List<String> outputFields) {
-		GenericQueryBuilder builder = new GenericQueryBuilder();
-		builder.output(outputFields);
-		return builder;
-	}
-
-	public GenericQueryBuilder output(List<String> outputFields) {
-		this.outputFields = outputFields;
-		return this;
-	}
-	public GenericQueryBuilder from(String serviceName, String metricName) {
-		this.serviceName = serviceName;
-		this.metricName = metricName;
-		return this;
-	}
-
-	public GenericQueryBuilder where(SearchCondition condition) {
-		this.searchCondition = condition;
-		return this;
-	}
-
-	/**
-	 * TODO: Parameter "parallel" no longer supported, ignore
-	 *
-	 * @param parallel
-	 * @return
-	 */
-	@Deprecated
-	public GenericQueryBuilder parallel(int parallel) {
-//		throw new IllegalArgumentException("Parameter \"parallel\" no longer supported");
-		if(parallel > 0) LOG.warn("Parameter \"parallel\" is deprecated, ignore");
-		return this;
-	}
-
-	/**
-	 * @param hasAgg
-	 * @param groupByFields
-	 * @param aggregateFunctionTypes
-	 * @param aggregateFields
-	 * @return
-	 */
-	public GenericQueryBuilder groupBy(boolean hasAgg, List<String> groupByFields, List<AggregateFunctionType> aggregateFunctionTypes, List<String> aggregateFields) {
-		this.hasAgg = hasAgg;
-		this.groupByFields = groupByFields;
-		this.aggregateFuncTypes = aggregateFunctionTypes;
-		this.aggregateFields = aggregateFields;
-		return this;
-	}
-
-	public GenericQueryBuilder timeSeries(boolean timeSeries, long intervalMin) {
-		this.timeSeries = timeSeries;
-		this.intervalmin = intervalMin;
-		return this;
-	}
-
-	public GenericQueryBuilder orderBy(List<SortOption> sortOptions, List<AggregateFunctionType> sortFunctionTypes, List<String> sortFields) {
-		this.sortOptions = sortOptions;
-		this.sortFunctionTypes = sortFunctionTypes;
-		this.sortFields = sortFields;
-		return this;
-	}
-
-	public GenericQueryBuilder top(int top) {
-		this.top = top;
-		return this;
-	}
-
-	/**
-	 * TODO: Parameter "treeAgg" no longer supported, ignore
-	 *
-	 * @param treeAgg
-	 * @return
-	 */
-	@Deprecated
-	public GenericQueryBuilder treeAgg(boolean treeAgg){
-		if(treeAgg) LOG.warn("Parameter \"treeAgg\" is deprecated, ignore");
-		return this;
-	}
-
-	public GenericQuery build() throws Exception {
-		if(hasAgg){
-			if(LOG.isDebugEnabled()) LOG.debug("Build GroupAggregateQuery");
-			AggregateCondition aggregateCondition = new AggregateCondition();
-			aggregateCondition.setGroupbyFields(this.groupByFields);
-			aggregateCondition.setAggregateFunctionTypes(this.aggregateFuncTypes);
-			aggregateCondition.setAggregateFields(this.aggregateFields);
-			aggregateCondition.setTimeSeries(this.timeSeries);
-			aggregateCondition.setIntervalMS(this.intervalmin * 60 * 1000);
-			return new GenericAggregateQuery(this.serviceName,
-					this.searchCondition,
-					aggregateCondition,
-					this.metricName,
-					this.sortOptions,this.sortFunctionTypes,this.sortFields,
-					this.top);
-		} else {
-			if(LOG.isDebugEnabled()) LOG.debug("Build GenericBatchQuery");
-			return new GenericEntityQuery(this.serviceName,this.searchCondition,this.metricName);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateQuery.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateQuery.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateQuery.java
deleted file mode 100755
index 8f20b61..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateQuery.java
+++ /dev/null
@@ -1,423 +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.query.aggregate;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.query.GenericQuery;
-import org.apache.eagle.query.QueryConstants;
-import org.apache.eagle.query.aggregate.AggregateCondition;
-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.query.aggregate.timeseries.PostFlatAggregateSort;
-import org.apache.eagle.query.aggregate.timeseries.SortOption;
-import org.apache.eagle.query.aggregate.timeseries.TimeSeriesAggregator;
-import org.apache.eagle.query.aggregate.timeseries.TimeSeriesPostFlatAggregateSort;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateResultCallbackImpl;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.*;
-
-/**
- * AggregateQuery
- *
- * <ol>
- *   <li>Open HBase connection</li>
- *   <li>Aggregate through Coprocessor</li>
- *   <li>Build GroupAggregateQuery.GroupAggregateQueryReader to process result and order as sort options</li>
- *   <li>Return result list</li>
- * </ol>
- *
- * @since : 11/7/14,2014
- */
-public class GenericAggregateQuery implements GenericQuery {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericAggregateQuery.class);
-	private final List<AggregateFunctionType> sortFuncs;
-	private final List<String> sortFields;
-
-	private EntityDefinition entityDef;
-	private SearchCondition searchCondition;
-	private AggregateCondition aggregateCondition;
-	private String prefix;
-	private long lastTimestamp = 0;
-	private long firstTimestamp = 0;
-	private List<SortOption> sortOptions;
-	private int top;
-
-	private int aggFuncNum;
-	private int sortAggFuncNum;
-	private int sortFuncNum;
-
-	/**
-	 *
-	 * @param serviceName
-	 * @param condition
-	 * @param aggregateCondition
-	 * @param metricName
-	 * @throws InstantiationException
-	 * @throws IllegalAccessException
-	 */
-	public GenericAggregateQuery(String serviceName, SearchCondition condition, AggregateCondition aggregateCondition, String metricName)
-			throws InstantiationException, IllegalAccessException{
-		this(serviceName, condition, aggregateCondition, metricName,null,null,null,0);
-	}
-
-	/**
-	 *
-	 * @param serviceName
-	 * @param condition
-	 * @param aggregateCondition
-	 * @param metricName
-	 * @param sortOptions
-	 * @param sortFunctionTypes
-	 * @param sortFields
-	 * @param top
-	 * @throws InstantiationException
-	 * @throws IllegalAccessException
-	 */
-	public GenericAggregateQuery(String serviceName, SearchCondition condition,
-	                           AggregateCondition aggregateCondition, String metricName,
-	                           List<SortOption> sortOptions,List<AggregateFunctionType> sortFunctionTypes,List<String> sortFields,int top)
-			throws InstantiationException, IllegalAccessException{
-		checkNotNull(serviceName, "serviceName");
-		this.searchCondition = condition;
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "EntityDefinition");
-		checkNotNull(entityDef, "GroupAggregateCondition");
-		this.aggregateCondition = aggregateCondition;
-		this.aggFuncNum = this.aggregateCondition.getAggregateFunctionTypes().size();
-		this.sortOptions = sortOptions;
-		this.sortFuncs  = sortFunctionTypes;
-		this.sortFuncNum = this.sortOptions == null ? 0: this.sortOptions.size();
-		this.sortFields = sortFields;
-		this.top = top;
-
-		if(serviceName.equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-			if(LOG.isDebugEnabled()) LOG.debug("list metric aggregate query");
-			if(metricName == null || metricName.isEmpty()){
-				throw new IllegalArgumentException("metricName should not be empty for metric list query");
-			}
-			if(!condition.getOutputFields().contains(GenericMetricEntity.VALUE_FIELD)){
-				condition.getOutputFields().add(GenericMetricEntity.VALUE_FIELD);
-			}
-			this.prefix = metricName;
-		}else{
-			if(LOG.isDebugEnabled()) LOG.debug("list entity aggregate query");
-			this.prefix = entityDef.getPrefix();
-		}
-
-		// Add sort oriented aggregation functions into aggregateCondtion
-		if(this.sortOptions!=null){
-			// if sort for time series aggregation
-			if(this.aggregateCondition.isTimeSeries()) {
-				this.sortAggFuncNum = 0;
-				int index = 0;
-				for (SortOption sortOption : this.sortOptions) {
-					if (!sortOption.isInGroupby()) {
-						if (LOG.isDebugEnabled())
-							LOG.debug("Add additional aggregation functions for sort options " + sortOption.toString() + " in index: " + (this.aggFuncNum + this.sortAggFuncNum));
-						AggregateFunctionType _sortFunc = this.sortFuncs.get(index);
-						if (AggregateFunctionType.avg.equals(_sortFunc)) {
-							this.aggregateCondition.getAggregateFunctionTypes().add(AggregateFunctionType.sum);
-						} else {
-							this.aggregateCondition.getAggregateFunctionTypes().add(_sortFunc);
-						}
-						this.aggregateCondition.getAggregateFields().add(this.sortFields.get(index));
-
-						sortOption.setIndex(this.sortAggFuncNum);
-						sortAggFuncNum++;
-					}
-					index++;
-				}
-			}
-		}
-	}
-
-
-	private void checkNotNull(Object o, String message){
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-
-	/**
-	 * TODO: Return List<GroupAggregateAPIEntity>
-	 *
-	 * @see GenericAggregateQuery.TimeSeriesGroupAggregateQueryReader#result()
-	 * @see GenericAggregateQuery.FlatGroupAggregateQueryReader#result()
-	 *
- 	 */
-	@Override
-	@SuppressWarnings("raw")
-	public List result() throws Exception {
-		Date start = null;
-		Date end = null;
-		// shortcut to avoid read when pageSize=0
-		if(searchCondition.getPageSize() <= 0){
-			return null;
-		}
-		// Process the time range if needed
-		if(entityDef.isTimeSeries()){
-			start = DateTimeUtil.humanDateToDate(searchCondition.getStartTime());
-			end = DateTimeUtil.humanDateToDate(searchCondition.getEndTime());
-		}else{
-			start = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_START_HUMANTIME);
-			end = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_END_HUMANTIME);
-		}
-		// Generate the output qualifiers
-		final byte[][] outputQualifiers = HBaseInternalLogHelper.getOutputQualifiers(entityDef, searchCondition.getOutputFields());
-		GenericAggregateReader reader = new GenericAggregateReader(entityDef,
-				searchCondition.getPartitionValues(),
-				start, end, searchCondition.getFilter(), searchCondition.getStartRowkey(), outputQualifiers, this.prefix,this.aggregateCondition);
-		try{
-			if(LOG.isDebugEnabled()) LOG.debug("open and read group aggregate reader");
-			reader.open();
-			List result = buildGroupAggregateQueryReader(reader,this.aggregateCondition.isTimeSeries()).result();
-			if(result == null) throw new IOException("result is null");
-			this.firstTimestamp = reader.getFirstTimestamp();
-			this.lastTimestamp = reader.getLastTimestamp();
-			if(LOG.isDebugEnabled()) LOG.debug("finish read aggregated " + result.size() + " rows");
-			return result;
-		}catch (IOException ex){
-			LOG.error("Fail reading aggregated results", ex);
-			throw ex;
-		}finally{
-			if(reader != null) {
-				if(LOG.isDebugEnabled()) LOG.debug("Release HBase connection");
-				reader.close();
-			}
-		}
-	}
-
-	///////////////////////////////////////////////////////////
-	// GroupAggregateQueryReader(GroupAggregateLogReader)
-	// 	|_ FlatGroupAggregateQueryReader
-	// 	|_ TimeSeriesGroupAggregateQueryReader
-	///////////////////////////////////////////////////////////
-
-	/**
-	 * Factory method for {@link GroupAggregateQueryReader}
-	 * <pre>
-	 * {@link GroupAggregateQueryReader}
-	 * |_ {@link FlatGroupAggregateQueryReader}
-	 * |_ {@link TimeSeriesGroupAggregateQueryReader}
-	 * </pre>
-	 * @param reader
-	 * @param isTimeSeries
-	 * @return
-	 * @throws IOException
-	 */
-	private  GroupAggregateQueryReader  buildGroupAggregateQueryReader(GenericAggregateReader reader,boolean isTimeSeries) throws IOException{
-		if(isTimeSeries){
-			return new TimeSeriesGroupAggregateQueryReader(reader,this);
-		}else{
-			return new FlatGroupAggregateQueryReader(reader,this);
-		}
-	}
-
-	private abstract class GroupAggregateQueryReader {
-		protected final GenericAggregateReader reader;
-		protected final GenericAggregateQuery query;
-
-		public GroupAggregateQueryReader(GenericAggregateReader reader, GenericAggregateQuery query){
-			this.reader = reader;
-			this.query = query;
-		}
-		public abstract <T> List<T> result() throws Exception;
-
-		protected Map<List<String>, List<Double>> keyValuesToMap(List<GroupbyKeyValue> entities) throws Exception {
-			Map<List<String>, List<Double>> aggResultMap = new HashMap<List<String>, List<Double>>();
-			try {
-				for(GroupbyKeyValue keyValue:entities){
-					List<String> key = new ArrayList<String>();
-					for(BytesWritable bw:keyValue.getKey().getValue()){
-						key.add(new String(bw.copyBytes(), QueryConstants.CHARSET));
-					}
-					List<Double> value = new ArrayList<Double>();
-					for(DoubleWritable wa:keyValue.getValue().getValue()){
-						value.add(wa.get());
-					}
-					aggResultMap.put(key, value);
-				}
-			} catch (UnsupportedEncodingException e) {
-				LOG.error(QueryConstants.CHARSET +" not support: "+e.getMessage(),e);
-			}
-			return aggResultMap;
-		}
-	}
-
-	private class FlatGroupAggregateQueryReader extends GroupAggregateQueryReader{
-		public FlatGroupAggregateQueryReader(GenericAggregateReader reader, GenericAggregateQuery query) {
-			super(reader,query);
-		}
-		@Override
-		public List<Map.Entry<List<String>, List<Double>>> result() throws Exception {
-			Map<List<String>, List<Double>> aggResultMap = this.keyValuesToMap(this.reader.read());
-			if(this.query.sortOptions == null)
-				return new ArrayList<Map.Entry<List<String>, List<Double>>>(aggResultMap.entrySet());
-			if(LOG.isDebugEnabled()) LOG.debug("Flat sorting");
-			return PostFlatAggregateSort.sort(aggResultMap, this.query.sortOptions, this.query.top);
-		}
-	}
-
-	private class TimeSeriesGroupAggregateQueryReader extends GroupAggregateQueryReader{
-		private final Date start;
-		private final Date end;
-		private final int pointsNum;
-		private final int aggFuncNum;
-		private final List<SortOption> sortOptions;
-		private final List<AggregateFunctionType> sortFuncs;
-		private final int sortAggFuncNum;
-
-		public TimeSeriesGroupAggregateQueryReader(GenericAggregateReader reader, GenericAggregateQuery query) throws IOException {
-			super(reader,query);
-			try {
-				if(entityDef.isTimeSeries()){
-						this.start = DateTimeUtil.humanDateToDate(searchCondition.getStartTime());
-					this.end = DateTimeUtil.humanDateToDate(searchCondition.getEndTime());
-				}else{
-					start = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_START_HUMANTIME);
-					end = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_END_HUMANTIME);
-				}
-				this.pointsNum = (int)((end.getTime()-1-start.getTime())/this.query.aggregateCondition.getIntervalMS() + 1);
-				this.aggFuncNum = this.query.aggFuncNum;
-				this.sortOptions = this.query.sortOptions;
-				this.sortFuncs = this.query.sortFuncs;
-				this.sortAggFuncNum = this.query.sortAggFuncNum;
-			} catch (Exception e) {
-				throw new IOException(e);
-			}
-		}
-
-		/**
-		 * <h2>TimeSeriesReader result</h2>
-		 * <ol>
-		 *  <li>generateTimeSeriesDataPoints()</li>
-		 *  <li>if not sort options, return generate time series data points</li>
-		 *  <li>if requiring sort, sort time series data points by order of flat aggregation</li>
-		 * </ol>
-		 *
-		 * 	<h2>Time Series Sort Algorithms</h2>
-		 * 	<ol>
-		 *	<li>Flat aggregate on grouped fields without time series bucket index</li>
-		 *	<li>Flat aggregated result according given sortOptions</li>
-		 *	<li>Sort Time Series Result according the same order of flat aggregated keys</li>
-		 * </ol>
-		 *
-		 * @see #convertToTimeSeriesDataPoints(java.util.List)
-		 *
-		 * @return
-		 * @throws Exception
-		 */
-		@Override
-		public List<Map.Entry<List<String>, List<double[]>>> result() throws Exception {
-			List<GroupbyKeyValue> result = this.reader.read();
-
-			// aggregated data points only
-			Map<List<String>,List<double[]>> timeseriesDataPoints = convertToTimeSeriesDataPoints(result);
-
-			if(this.query.sortOptions == null)
-				// return time-series data points without sort
-				return new ArrayList<Map.Entry<List<String>, List<double[]>>>(timeseriesDataPoints.entrySet());
-
-			LOG.info("Time series sorting");
-
-			// Time Series Sort Steps
-			// ======================
-			// 1. Flat aggregate on grouped fields without time series bucket index
-			// 2. Flat aggregated result according given sortOptions
-			// 3. Sort Time Series Result according flat aggregated keys' order
-
-			// 1. Flat aggregate on grouped fields without time series bucket index
-			AggregateResultCallbackImpl callback = new AggregateResultCallbackImpl(this.sortFuncs);
-			for(GroupbyKeyValue kv:result){
-				ArrayList<BytesWritable> copykey = new ArrayList<BytesWritable>(kv.getKey().getValue());
-				// remove time series bucket index
-				copykey.remove(copykey.size()-1);
-				GroupbyKey key = new GroupbyKey();
-
-				// [this.aggFuncNum,this.aggFuncNum + this.sortFuncNum)
-				GroupbyValue value = new GroupbyValue();
-				for(int i = this.aggFuncNum;i<this.aggFuncNum+this.sortAggFuncNum;i++){
-					value.add(kv.getValue().get(i));
-					value.addMeta(kv.getValue().getMeta(i));
-				}
-				key.addAll(copykey);
-				GroupbyKeyValue keyValue = new GroupbyKeyValue(key,value);
-				callback.update(keyValue);
-			}
-			AggregateResult callbackResult = callback.result();
-			Map<List<String>, List<Double>> mapForSort = this.keyValuesToMap(callbackResult.getKeyValues());
-
-			// 2. Flat aggregated result according given sortOptions
-//			List<Map.Entry<List<String>, List<Double>>> flatSort = PostFlatAggregateSort.sort(mapForSort , this.sortOptions, Integer.MAX_VALUE);
-//			mapForSort = new HashMap<List<String>, List<Double>>();
-//			for(Map.Entry<List<String>, List<Double>> entry:flatSort){
-//				mapForSort.put(entry.getKey(),entry.getValue());
-//			}
-
-			// 3. Sort Time Series Result according flat aggregated keys' order
-			return TimeSeriesPostFlatAggregateSort.sort(mapForSort,timeseriesDataPoints,this.sortOptions,this.query.top);
-		}
-
-		/**
-		 * Convert raw GroupbyKeyValue list into time-series data points hash map
-		 *
-		 * @param result <code>List&lt;GroupbyKeyValue&gt;</code>
-		 * @return Map&lt;List&lt;String&gt;,List&lt;double[]&gt;&gt;
-		 * @throws Exception
-		 */
-		private Map<List<String>,List<double[]>> convertToTimeSeriesDataPoints(List<GroupbyKeyValue> result) throws Exception {
-			Map<List<String>, List<Double>> aggResultMap = this.keyValuesToMap(result);
-			Map<List<String>,List<double[]>> timeseriesDataPoints = TimeSeriesAggregator.toMetric(aggResultMap,this.pointsNum,this.aggFuncNum);
-			return timeseriesDataPoints;
-		}
-	}
-
-	/**
-	 * Get last / max timestamp
-	 *
-	 * @return lastTimestamp
-	 */
-	@Override
-	public long getLastTimestamp() {
-		return this.lastTimestamp;
-	}
-
-	/**
-	 * Get first / min timestamp
-	 *
-	 * @return firstTimestamp
-	 */
-	@Override
-	public long getFirstTimeStamp() {
-		return this.firstTimestamp;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateReader.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateReader.java
deleted file mode 100755
index 3d0fa94..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/aggregate/GenericAggregateReader.java
+++ /dev/null
@@ -1,131 +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.query.aggregate;
-
-import org.apache.eagle.log.entity.AbstractHBaseLogReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.aggregate.AggregateCondition;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.filter.Filter;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-
-/**
- * @since : 11/7/14,2014
- */
-public class GenericAggregateReader extends AbstractHBaseLogReader<List<GroupbyKeyValue>> {
-	private final long startTime;
-	private final long endTime;
-	private AggregateClient aggregateClient = new AggregateClientImpl();
-	private EntityDefinition ed;
-	private final AggregateCondition aggregateCondition;
-	private AggregateResult result;
-
-	/**
-	 *
-	 * @param ed                Entity Definition
-	 * @param partitions        Partition values
-	 * @param startTime         Start time
-	 * @param endTime           End time
-	 * @param filter            HBase filter for scanning
-	 * @param lastScanKey       Last HBase scan row key in String
-	 * @param outputQualifiers  HBase output qualifiers in bytes
-	 * @param condition         GroupAggregateCondition Object
-	 *
-	 * @see org.apache.eagle.query.aggregate.AggregateCondition
-	 */
-	@SuppressWarnings("unused")
-	private GenericAggregateReader(EntityDefinition ed,
-	                                List<String> partitions,
-	                                Date startTime,
-	                                Date endTime,
-	                                Filter filter,
-	                                String lastScanKey,
-	                                byte[][] outputQualifiers,
-	                                AggregateCondition condition) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers);
-		this.ed = ed;
-		this.startTime = startTime.getTime();
-		this.endTime = endTime.getTime();
-		this.aggregateCondition = condition;
-	}
-
-	/**
-	 *
-	 * @param ed                Entity Definition
-	 * @param partitions        Partition values
-	 * @param startTime         Start time
-	 * @param endTime           End time
-	 * @param filter            HBase filter for scanning
-	 * @param lastScanKey       Last HBase scan row key in String
-	 * @param outputQualifiers  HBase output qualifiers in bytes
-	 * @param prefix            HBase prefix, not necessary except for GenericMetric query
-	 * @param condition         GroupAggregateCondition Object
-	 *
-	 * @see org.apache.eagle.query.aggregate.AggregateCondition
-	 */
-	public GenericAggregateReader(EntityDefinition ed,
-	                               List<String> partitions,
-	                               Date startTime,
-	                               Date endTime,
-	                               Filter filter,
-	                               String lastScanKey,
-	                               byte[][] outputQualifiers,
-	                               String prefix,
-	                               AggregateCondition condition) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers, prefix);
-		this.ed = ed;
-		this.startTime = startTime.getTime();
-		this.endTime = endTime.getTime();
-		this.aggregateCondition = condition;
-	}
-
-	@Override
-	protected void onOpen(HTableInterface tbl, Scan scan) throws IOException {
-		this.result = this.aggregateClient.aggregate(
-				tbl,
-				this.ed,
-				scan,
-				this.aggregateCondition.getGroupbyFields(),
-				this.aggregateCondition.getAggregateFunctionTypes(),
-				this.aggregateCondition.getAggregateFields(),
-				this.aggregateCondition.isTimeSeries(),
-				this.startTime,
-				this.endTime,
-				this.aggregateCondition.getIntervalMS());
-	}
-
-	@Override
-	public List<GroupbyKeyValue> read() throws IOException {
-		return this.result.getKeyValues();
-	}
-
-	public long getFirstTimestamp() {
-		return this.result.getStartTimestamp();
-	}
-
-	public long getLastTimestamp() {
-		return this.result.getStopTimestamp();
-	}
-}
\ No newline at end of file


[31/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleServiceReporterMetricListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleServiceReporterMetricListener.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleServiceReporterMetricListener.java
deleted file mode 100644
index 49a8cdc..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/EagleServiceReporterMetricListener.java
+++ /dev/null
@@ -1,63 +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.metric.reportor;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class EagleServiceReporterMetricListener implements EagleMetricListener{
-
-    private EagleServiceClientImpl client;
-    private static final Logger LOG = LoggerFactory.getLogger(EagleServiceReporterMetricListener.class);
-
-    public EagleServiceReporterMetricListener(String host, int port, String username, String password) {
-        client = new EagleServiceClientImpl(host, port, username, password);
-    }
-
-    public EagleServiceReporterMetricListener(String host, int port) {
-        client = new EagleServiceClientImpl(host, port, null, null);
-    }
-
-    public void onMetricFlushed(List<EagleMetric> metrics) {
-        List<GenericMetricEntity> entities = new ArrayList<>();
-        for (EagleMetric metric : metrics) {
-            String metricName = metric.name;
-            entities.add(MetricEntityAdaptor.convert(metricName, metric));
-        }
-        try {
-            int total = entities.size();
-            GenericServiceAPIResponseEntity<String> response = client.create(entities, GenericMetricEntity.GENERIC_METRIC_SERVICE);
-            if(response.isSuccess()) {
-                LOG.info("Wrote " + total + " entities to service");
-            }else{
-                LOG.error("Failed to write " + total + " entities to service, due to server exception: "+ response.getException());
-            }
-        }
-        catch (Exception ex) {
-            LOG.error("Got exception while writing entities: ", ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/IEagleMetric.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/IEagleMetric.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/IEagleMetric.java
deleted file mode 100644
index 43f8092..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/IEagleMetric.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- *    Licensed to the Apache Software Foundation (ASF) under one or more
- *    contributor license agreements.  See the NOTICE file distributed with
- *    this work for additional information regarding copyright ownership.
- *    The ASF licenses this file to You under the Apache License, Version 2.0
- *    (the "License"); you may not use this file except in compliance with
- *    the License.  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- *
- */
-
-package org.apache.eagle.metric.reportor;
-
-import com.codahale.metrics.Gauge;
-
-/**
- * It's just a workaround to extends Gauge instead of Metric interface
- * For MetricRegistry's notifyListenerOfRemovedMetric method will throw exception on unknown metric type
- */
-
-public interface IEagleMetric extends Gauge<Double> {
-
-    void registerListener(EagleMetricListener listener);
-
-    /**
-     * return true if the metric need to be flushed, otherwise return false
-     * @param value
-     * @param userTimeClock
-     * @return
-     */
-    boolean update(double value, long userTimeClock);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricEntityAdaptor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricEntityAdaptor.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricEntityAdaptor.java
deleted file mode 100644
index e1f8154..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricEntityAdaptor.java
+++ /dev/null
@@ -1,50 +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.metric.reportor;
-
-import com.codahale.metrics.Metric;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-
-public class MetricEntityAdaptor {
-
-    public static GenericMetricEntity convert(String name, Metric metric) {
-        //TODO: add other type metric support
-        EagleMetricKey metricName = MetricKeyCodeDecoder.decodeTSMetricKey(name);
-        if (metric instanceof EagleCounterMetric) {
-            EagleCounterMetric counter = (EagleCounterMetric)metric;
-            GenericMetricEntity entity = new GenericMetricEntity();
-            entity.setPrefix(metricName.metricName);
-            entity.setValue(new double[]{counter.getValue()});
-            entity.setTags(metricName.tags);
-            entity.setTimestamp(metricName.timestamp);
-            return entity;
-        }
-        else if (metric instanceof EagleGaugeMetric) {
-            EagleGaugeMetric gauge = (EagleGaugeMetric)metric;
-            GenericMetricEntity entity = new GenericMetricEntity();
-            entity.setPrefix(metricName.metricName);
-            entity.setValue(new double[]{gauge.getValue()});
-            entity.setTags(metricName.tags);
-            entity.setTimestamp(metricName.timestamp);
-            return entity;
-        }
-        throw new RuntimeException("Not support this metric type for now!");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricKeyCodeDecoder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricKeyCodeDecoder.java b/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricKeyCodeDecoder.java
deleted file mode 100644
index 7f798fb..0000000
--- a/eagle-core/eagle-metric/src/main/java/org/apache/eagle/metric/reportor/MetricKeyCodeDecoder.java
+++ /dev/null
@@ -1,64 +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.metric.reportor;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MetricKeyCodeDecoder {
-
-    public static String codeMetricKey(String metricName, Map<String, String> tags) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(metricName);
-        for (Map.Entry<String, String> entry : tags.entrySet()) {
-            String key = entry.getKey();
-            String value = entry.getValue();
-            sb.append(" " + key + ":" + value);
-        }
-        return sb.toString();
-    }
-
-    public static EagleMetricKey decodeMetricKey(String name) {
-        EagleMetricKey metricName = new EagleMetricKey();
-        String[] parts = name.split(" ");
-        metricName.metricName = parts[0];
-        metricName.tags = new HashMap<>();
-        for (int i = 1; i < parts.length; i++) {
-            String[] keyValue = parts[i].split(":");
-            metricName.tags.put(keyValue[0], keyValue[1]);
-        }
-        return metricName;
-    }
-
-    public static String addTimestampToMetricKey(long timestamp, String metricKey) {
-        return timestamp + " " + metricKey;
-    }
-
-    public static String codeTSMetricKey(long timestamp, String metricName, Map<String, String> tags) {
-        return addTimestampToMetricKey(timestamp, codeMetricKey(metricName, tags));
-    }
-
-    public static EagleMetricKey decodeTSMetricKey(String name) {
-        Integer index = name.indexOf(" ");
-        EagleMetricKey metricKey = decodeMetricKey(name.substring(index + 1));
-        metricKey.timestamp = Long.valueOf(name.substring(0, index));
-        return metricKey;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-metric/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-metric/src/test/resources/log4j.properties b/eagle-core/eagle-metric/src/test/resources/log4j.properties
deleted file mode 100644
index dccbc70..0000000
--- a/eagle-core/eagle-metric/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, stdout
-#eagle.log.dir=./logs
-#eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-## Daily Rolling File Appender
-#log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-#log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-#log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-##log4j.appender.DRFA.MaxBackupIndex=30
-#log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-#
-## Pattern format: Date LogLevel LoggerName LogMessage
-#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/pom.xml b/eagle-core/eagle-policy/eagle-policy-base/pom.xml
deleted file mode 100644
index 5f2b9f8..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>eagle</groupId>
-        <artifactId>eagle-policy-parent</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>eagle-policy-base</artifactId>
-    <packaging>jar</packaging>
-    <name>eagle-policy-base</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-client-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-metric</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.siddhi</groupId>
-            <artifactId>siddhi-extension-string</artifactId>
-            <version>${siddhi.version}</version>
-        </dependency>
-    </dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AbstractPolicyDefinitionEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AbstractPolicyDefinitionEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AbstractPolicyDefinitionEntity.java
deleted file mode 100644
index 3f45be7..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AbstractPolicyDefinitionEntity.java
+++ /dev/null
@@ -1,27 +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.alert.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-@SuppressWarnings("serial")
-public abstract class AbstractPolicyDefinitionEntity extends TaggedLogAPIEntity {
-	
-	public abstract String getPolicyDef();
-	
-	public abstract boolean isEnabled();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertAPIEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertAPIEntity.java
deleted file mode 100644
index 0e5d3c8..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertAPIEntity.java
+++ /dev/null
@@ -1,93 +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.alert.entity;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertdetail")
-@ColumnFamily("f")
-@Prefix("hadoop")
-@Service(Constants.ALERT_SERVICE_ENDPOINT_NAME)
-@TimeSeries(true)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class AlertAPIEntity extends TaggedLogAPIEntity{
-	@Column("description")
-	private String description;
-	@Column("remediationID")
-	private String remediationID;
-	@Column("remediationCallback")
-	private String remediationCallback;
-	@Column("alertContext")
-	private AlertContext alertContext;
-	@Column("streamId")
-	private String streamId;
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-		_pcs.firePropertyChange("description", null, null);
-	}
-
-	public String getRemediationID() {
-		return remediationID;
-	}
-
-	public void setRemediationID(String remediationID) {
-		this.remediationID = remediationID;
-		_pcs.firePropertyChange("remediationID", null, null);
-	}
-
-	public String getRemediationCallback() {
-		return remediationCallback;
-	}
-
-	public void setRemediationCallback(String remediationCallback) {
-		this.remediationCallback = remediationCallback;
-		_pcs.firePropertyChange("remediationCallback", null, null);
-	}
-
-	public AlertContext getAlertContext() {
-		return alertContext;
-	}
-	
-	public void setAlertContext(AlertContext alertContext) {
-		this.alertContext = alertContext;
-		_pcs.firePropertyChange("alertContext", null, null);
-	}
-
-	public String getStreamId() {
-		return streamId;
-	}
-
-	public void setStreamId(String streamId) {
-		this.streamId = streamId;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertContextSerDeser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertContextSerDeser.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertContextSerDeser.java
deleted file mode 100644
index f001725..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertContextSerDeser.java
+++ /dev/null
@@ -1,98 +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.alert.entity;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.hadoop.hbase.util.Bytes;
-
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-
-public class AlertContextSerDeser implements EntitySerDeser<AlertContext> {
-
-	@Override
-	public AlertContext deserialize(byte[] bytes) {
-		AlertContext context = new AlertContext();
-		Map<String, String> properties = new HashMap<String, String>();
-		final int length = bytes.length;
-		if (length < 4) { return context; }
-		int size = Bytes.toInt(bytes, 0, 4);
-		
-		int offset = 4;
-		for (int i = 0; i < size; i++) {
-			int keySize =  Bytes.toInt(bytes, offset, 4);
-			offset += 4;
-			int valueSize =  Bytes.toInt(bytes, offset, 4);
-			offset += 4;
-			String key = Bytes.toString(bytes, offset, keySize);
-			offset += keySize;
-			String value =Bytes.toString(bytes, offset, valueSize);
-			offset += valueSize;
-			properties.put(key, value);
-		}
-		context.addAll(properties);
-		return context;
-	}
-
-	@Override
-	public byte[] serialize(AlertContext context) {
-		
-		final Map<String, String> pair = context.getProperties();
-		int totalSize = 4;
-		for (Entry<String, String> entry : pair.entrySet()) {
-			String key = entry.getKey();
-			String value = entry.getValue();
-            int keySize = 0;
-            if(key!=null) keySize = key.getBytes().length;
-			int valueSize = 0;
-            if(value!=null) valueSize = value.getBytes().length;
-			totalSize += keySize + valueSize + 8;
-		}
-		byte[] buffer = new byte[totalSize];
-		
-		Bytes.putInt(buffer, 0, pair.size());
-		int offset = 4;
-		for (Entry<String, String> entry : pair.entrySet()) {
-			String key = entry.getKey();
-			String value = entry.getValue();
-
-			int keySize = key !=null ? key.getBytes().length : 0;
-            int valueSize = value != null ? value.getBytes().length:0;
-
-            Bytes.putInt(buffer, offset, keySize);
-			offset += 4;
-			Bytes.putInt(buffer, offset, valueSize);
-			offset += 4;
-
-
-            Bytes.putBytes(buffer, offset, key != null ? key.getBytes() : new byte[0], 0, keySize);
-			offset += keySize;
-			Bytes.putBytes(buffer, offset, value != null ? value.getBytes() : new byte[0], 0, valueSize);
-			offset += valueSize;
-		}
-		return buffer;
-	}
-
-
-	@Override
-	public Class<AlertContext> type(){
-		return AlertContext.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
deleted file mode 100644
index 0778ffc..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
+++ /dev/null
@@ -1,68 +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.alert.entity;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertDataSource")
-@ColumnFamily("f")
-@Prefix("alertDataSource")
-@Service(Constants.ALERT_DATA_SOURCE_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site", "dataSource"})
-@Deprecated
-public class AlertDataSourceEntity extends TaggedLogAPIEntity{
-    @Column("a")
-    private boolean enabled;
-    @Column("b")
-    private String config;
-    @Column("c")
-    private String desc;
-
-    public String getConfig() {
-        return config;
-    }
-
-    public void setConfig(String config) {
-        this.config = config;
-        valueChanged("config");
-    }
-
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-        valueChanged("desc");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDefinitionAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDefinitionAPIEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDefinitionAPIEntity.java
deleted file mode 100644
index 98dc704..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDefinitionAPIEntity.java
+++ /dev/null
@@ -1,194 +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.alert.entity;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Index;
-import org.apache.eagle.log.entity.meta.Indexes;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.Tags;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * site: site name
- * dataSource: data source name
- *
- * alertExecutorId: Group Policy by alertExecutorId, the policy definition with the sample ["site", "dataSource", "alertExecutorId"] should run on the sample alert executor
- *
- * policyId: policy name, should be unique
- * policyType: policy engine implementation type
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertdef")
-@ColumnFamily("f")
-@Prefix("alertdef")
-@Service(Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site", "application", "alertExecutorId", "policyId", "policyType"})
-@Indexes({
-	@Index(name="Index_1_alertExecutorId", columns = { "alertExecutorID" }, unique = true),
-})
-public class AlertDefinitionAPIEntity extends AbstractPolicyDefinitionEntity {
-	@Column("a")
-	private String desc;
-	@Column("b")
-	private String policyDef;
-	@Column("c")
-	private String dedupeDef;
-	@Column("d")
-	private String notificationDef;
-	@Column("e")
-	private String remediationDef;
-	@Column("f")
-	private boolean enabled;
-	@Column("g")
-	private String owner;
-	@Column("h")
-	private long lastModifiedDate;
-	@Column("i")
-	private long severity;
-	@Column("j")
-	private long createdTime;
-    @Column("k")
-    private boolean markdownEnabled;
-    @Column("l")
-    private String markdownReason;
-
-	public String getDesc() {
-		return desc;
-	}
-	public void setDesc(String desc) {
-		this.desc = desc;
-		valueChanged("desc");
-	}
-	public String getPolicyDef() {
-		return policyDef;
-	}
-	public void setPolicyDef(String policyDef) {
-		this.policyDef = policyDef;
-		valueChanged("policyDef");
-	}
-	public String getDedupeDef() {
-		return dedupeDef;
-	}
-	public void setDedupeDef(String dedupeDef) {
-		this.dedupeDef = dedupeDef;
-		valueChanged("dedupeDef");
-	}
-	public String getNotificationDef() {
-		return notificationDef;
-	}
-	public void setNotificationDef(String notificationDef) {
-		this.notificationDef = notificationDef;
-		valueChanged("notificationDef");
-	}
-	public String getRemediationDef() {
-		return remediationDef;
-	}
-	public void setRemediationDef(String remediationDef) {
-		this.remediationDef = remediationDef;
-		valueChanged("remediationDef");
-	}
-	public boolean isEnabled() {
-		return enabled;
-	}
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-		valueChanged("enabled");
-	}
-	public String getOwner() {
-		return owner;
-	}
-	public void setOwner(String owner) {
-		this.owner = owner;
-		valueChanged("owner");
-	}	
-	public long getLastModifiedDate() {
-		return lastModifiedDate;
-	}
-	public void setLastModifiedDate(long lastModifiedDate) {
-		this.lastModifiedDate = lastModifiedDate;
-		valueChanged("lastModifiedDate");
-	}	
-	public long getSeverity() {
-		return severity;
-	}
-	public void setSeverity(long severity) {
-		this.severity = severity;
-		valueChanged("severity");
-	}	
-	public long getCreatedTime() {
-		return createdTime;
-	}
-	public void setCreatedTime(long createdTime) {
-		this.createdTime = createdTime;
-		valueChanged("createdTime");
-	}
-    public boolean isMarkdownEnabled() { return markdownEnabled; }
-    public void setMarkdownEnabled(boolean markdownEnabled) {
-        this.markdownEnabled = markdownEnabled;
-        valueChanged("markdownEnabled");
-    }
-    public String getMarkdownReason() { return markdownReason; }
-    public void setMarkdownReason(String markdownReason) {
-        this.markdownReason = markdownReason;
-        valueChanged("markdownReason");
-    }
-
-	public boolean equals(Object o){
-		if(o == this)
-			return true;
-		if(!(o instanceof AlertDefinitionAPIEntity))
-			return false;
-		AlertDefinitionAPIEntity that = (AlertDefinitionAPIEntity)o;
-		if(that.enabled == this.enabled &&
-				compare(that.policyDef, this.policyDef) &&
-				compare(that.dedupeDef, this.dedupeDef) &&
-				compare(that.notificationDef, this.notificationDef) &&
-				compare(that.remediationDef, this.remediationDef))
-			return true;
-		return false;
-	}
-	
-	private boolean compare(String a, String b){
-		if(a == b)
-			return true;
-		if(a == null || b == null)
-			return false;
-		if(a.equals(b))
-			return true;
-		return false;
-	}
-	
-	public int hashCode(){
-		HashCodeBuilder builder = new HashCodeBuilder();
-		builder.append(enabled);
-		builder.append(policyDef);
-		builder.append(dedupeDef);
-		builder.append(notificationDef);
-		builder.append(remediationDef);
-		return builder.toHashCode();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
deleted file mode 100644
index 507c482..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
+++ /dev/null
@@ -1,38 +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.alert.entity;
-
-import org.apache.eagle.common.metric.AlertContext;
-import org.apache.eagle.log.entity.repo.EntityRepository;
-
-public class AlertEntityRepository extends EntityRepository {
-	public AlertEntityRepository() {
-		serDeserMap.put(AlertContext.class, new AlertContextSerDeser());
-		entitySet.add(AlertAPIEntity.class);
-		entitySet.add(AlertDefinitionAPIEntity.class);
-		entitySet.add(AlertStreamSchemaEntity.class);
-		entitySet.add(AlertStreamEntity.class);
-		//entitySet.add(AlertDataSourceEntity.class);
-        entitySet.add(AlertExecutorEntity.class);
-		entitySet.add(ApplicationDescServiceEntity.class);
-		entitySet.add(FeatureDescServiceEntity.class);
-		entitySet.add(SiteDescServiceEntity.class);
-		entitySet.add(SiteApplicationServiceEntity.class);
-		this.registerEntity(GenericResourceEntity.class);
-		entitySet.add(AlertNotificationEntity.class);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertExecutorEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertExecutorEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertExecutorEntity.java
deleted file mode 100644
index 692450f..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertExecutorEntity.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.alert.entity;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * Stream and Alert executor Id mapping should be automatically created by topology definition
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertExecutor")
-@ColumnFamily("f")
-@Prefix("alertExecutor")
-@Service(Constants.ALERT_EXECUTOR_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"application", "alertExecutorId", "streamName"})
-public class AlertExecutorEntity extends TaggedLogAPIEntity{
-    @Column("a")
-    private String desc;
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-        valueChanged("desc");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java
deleted file mode 100644
index 6bc6318..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertNotificationEntity.java
+++ /dev/null
@@ -1,66 +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.alert.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertNotifications")
-@ColumnFamily("f")
-@Prefix("alertNotifications")
-@Service(Constants.ALERT_NOTIFICATION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"notificationType"})
-public class AlertNotificationEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private String className;
-    public String getClassName(){
-        return className;
-    }
-    public void setClassName(String className){
-        this.className = className;
-        valueChanged("className");
-    }
-
-    @Column("b")
-    private String description;
-    public String getDescription(){
-        return description;
-    }
-    public void setDescription(String description){
-        this.description = description;
-        valueChanged("description");
-    }
-
-    @Column("c")
-    private boolean enabled;
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamEntity.java
deleted file mode 100644
index eedbbf7..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamEntity.java
+++ /dev/null
@@ -1,51 +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.alert.entity;
-
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.Tags;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertStream")
-@ColumnFamily("f")
-@Prefix("alertStream")
-@Service(Constants.ALERT_STREAM_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"application", "streamName"})
-public class AlertStreamEntity extends TaggedLogAPIEntity{
-	@Column("a")
-	private String desc;
-
-	public String getDesc() {
-		return desc;
-	}
-	public void setDesc(String desc) {
-		this.desc = desc;
-		valueChanged("desc");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamSchemaEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamSchemaEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamSchemaEntity.java
deleted file mode 100644
index 4dd9006..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertStreamSchemaEntity.java
+++ /dev/null
@@ -1,111 +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.alert.entity;
-
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.Tags;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-/**
- * ddl to create streammetadata table
- * 
- * create 'alertStreamSchema', {NAME => 'f', BLOOMFILTER => 'ROW', VERSIONS => '1', COMPRESSION => 'SNAPPY'}
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("alertStreamSchema")
-@ColumnFamily("f")
-@Prefix("alertStreamSchema")
-@Service(Constants.ALERT_STREAM_SCHEMA_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"application", "streamName", "attrName"})
-public class AlertStreamSchemaEntity extends TaggedLogAPIEntity{
-	@Column("a")
-	private String attrType;
-	@Column("b")
-	private String category;
-	@Column("c")
-	private String attrValueResolver;
-	/* all tags form the key for alert de-duplication */
-	@Column("d")
-	private Boolean usedAsTag;
-	@Column("e")
-	private String attrDescription;
-	@Column("f")
-	private String attrDisplayName;	
-	@Column("g")
-	private String defaultValue;
-
-	public String getAttrType() {
-		return attrType;
-	}
-	public void setAttrType(String attrType) {
-		this.attrType = attrType;
-		valueChanged("attrType");
-	}
-	public String getCategory() {
-		return category;
-	}
-	public void setCategory(String category) {
-		this.category = category;
-		valueChanged("category");
-	}
-	public String getAttrValueResolver() {
-		return attrValueResolver;
-	}
-	public void setAttrValueResolver(String attrValueResolver) {
-		this.attrValueResolver = attrValueResolver;
-		valueChanged("attrValueResolver");
-	}
-	public Boolean getUsedAsTag() {
-		return usedAsTag;
-	}
-	public void setUsedAsTag(Boolean usedAsTag) {
-		this.usedAsTag = usedAsTag;
-		valueChanged("usedAsTag");
-	}
-	public String getAttrDescription() {
-		return attrDescription;
-	}
-	public void setAttrDescription(String attrDescription) {
-		this.attrDescription = attrDescription;
-		valueChanged("attrDescription");
-	}
-	public String getAttrDisplayName() {
-		return attrDisplayName;
-	}
-	public void setAttrDisplayName(String attrDisplayName) {
-		this.attrDisplayName = attrDisplayName;
-		valueChanged("attrDisplayName");
-	}
-	public String getDefaultValue() {
-		return defaultValue;
-	}
-	public void setDefaultValue(String defaultValue) {
-		this.defaultValue = defaultValue;
-		valueChanged("defaultValue");
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
deleted file mode 100644
index 76a2500..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.eagle.alert.entity;
-
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import java.util.List;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagleApplicationDesc")
-@ColumnFamily("f")
-@Prefix("eagleApplicationDesc")
-@Service(Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"application"})
-public class ApplicationDescServiceEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private String desc;
-    @Column("b")
-    private String alias;
-    @Column("c")
-    private String group;
-    @Column("d")
-    private List<String> features;
-    @Column("e")
-    private String config;
-
-    public String getConfig() {
-        return config;
-    }
-
-    public void setConfig(String config) {
-        this.config = config;
-        valueChanged("config");
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-        valueChanged("desc");
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public void setGroup(String group) {
-        this.group = group;
-        valueChanged("group");
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void setAlias(String alias) {
-        this.alias = alias;
-        valueChanged("alias");
-    }
-
-    public List<String> getFeatures() {
-        return features;
-    }
-
-    public void setFeatures(List<String> features) {
-        this.features = features;
-        valueChanged("features");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
deleted file mode 100644
index 4fc6dac..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
+++ /dev/null
@@ -1,59 +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.alert.entity;
-
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagleFeatureDesc")
-@ColumnFamily("f")
-@Prefix("eagleFeatureDesc")
-@Service(Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"feature"})
-public class FeatureDescServiceEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private String desc;
-    @Column("b")
-    private String version;
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-        valueChanged("version");
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-        valueChanged("desc");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
deleted file mode 100644
index c855499..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
+++ /dev/null
@@ -1,47 +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.alert.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagle_metadata")
-@ColumnFamily("f")
-@Prefix("generic_resource")
-@Service(Constants.GENERIC_RESOURCE_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site", "name"})
-public class GenericResourceEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private String value;
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-        valueChanged("value");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
deleted file mode 100644
index 5eea4b3..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
+++ /dev/null
@@ -1,60 +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.alert.entity;
-
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagleSiteApplication")
-@ColumnFamily("f")
-@Prefix("eagleSiteApplication")
-@Service(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site", "application"})
-public class SiteApplicationServiceEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private String config;
-    @Column("b")
-    private Boolean enabled;
-
-    public String getConfig() {
-        return config;
-    }
-
-    public void setConfig(String config) {
-        this.config = config;
-        valueChanged("config");
-    }
-
-    public Boolean getEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(Boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
deleted file mode 100644
index a8245cf..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.eagle.alert.entity;
-
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagleSiteDesc")
-@ColumnFamily("f")
-@Prefix("eagleSiteDesc")
-@Service(Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site"})
-public class SiteDescServiceEntity extends TaggedLogAPIEntity {
-    @Column("a")
-    private Boolean enabled;
-
-    public Boolean getEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(Boolean enabled) {
-        this.enabled = enabled;
-        valueChanged("enabled");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DefaultPolicyPartitioner.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DefaultPolicyPartitioner.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DefaultPolicyPartitioner.java
deleted file mode 100644
index 1143b11..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DefaultPolicyPartitioner.java
+++ /dev/null
@@ -1,32 +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.policy;
-
-
-public class DefaultPolicyPartitioner implements PolicyPartitioner{
-	@Override
-	public int partition(int numTotalPartitions, String policyType,
-			String policyId) {
-		final int prime = 31;
-		int result = 1;
-		result = result * prime + policyType.hashCode();
-		result = result < 0 ? result*-1 : result;
-		result = result * prime + policyId.hashCode();
-		result = result < 0 ? result*-1 : result;
-		return result % numTotalPartitions;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DynamicPolicyLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DynamicPolicyLoader.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DynamicPolicyLoader.java
deleted file mode 100644
index 20da2cf..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/DynamicPolicyLoader.java
+++ /dev/null
@@ -1,268 +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.policy;
-
-import com.netflix.config.*;
-import com.sun.jersey.client.impl.CopyOnWriteHashMap;
-import com.typesafe.config.Config;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.common.config.EagleConfigConstants;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- *
- * @param <T>
- */
-public class DynamicPolicyLoader<T extends AbstractPolicyDefinitionEntity> {
-	private static final Logger LOG = LoggerFactory.getLogger(DynamicPolicyLoader.class);
-	
-	private final int defaultInitialDelayMillis = 30*1000;
-	private final int defaultDelayMillis = 60*1000;
-	private final boolean defaultIgnoreDeleteFromSource = true;
-    /**
-     * one alertExecutor may have multiple instances, that is why there is a list of PolicyLifecycleMethods
-     */
-	private volatile CopyOnWriteHashMap<String, List<PolicyLifecycleMethods<T>>> policyChangeListeners = new CopyOnWriteHashMap<>();
-    private volatile CopyOnWriteHashMap<String, List<PolicyDistributionReportMethods>> policyDistributionUpdaters = new CopyOnWriteHashMap<>();
-	private static DynamicPolicyLoader instance = new DynamicPolicyLoader();
-	private volatile boolean initialized = false;
-	
-	public void addPolicyChangeListener(String alertExecutorId, PolicyLifecycleMethods<T> alertExecutor){
-		synchronized(policyChangeListeners) {
-			if (policyChangeListeners.get(alertExecutorId) == null) {
-				policyChangeListeners.put(alertExecutorId, new ArrayList<PolicyLifecycleMethods<T>>());
-			}
-			policyChangeListeners.get(alertExecutorId).add(alertExecutor);
-		}
-	}
-
-	private static ConcurrentHashMap<Class, DynamicPolicyLoader> maps = new ConcurrentHashMap<Class, DynamicPolicyLoader>();
-    public void addPolicyDistributionReporter(String alertExecutorId, PolicyDistributionReportMethods policyDistUpdater){
-        synchronized(policyDistributionUpdaters) {
-            if(policyDistributionUpdaters.get(alertExecutorId) == null) {
-                policyDistributionUpdaters.put(alertExecutorId, new ArrayList<PolicyDistributionReportMethods>());
-            }
-            policyDistributionUpdaters.get(alertExecutorId).add(policyDistUpdater);
-        }
-    }
-	
-	@SuppressWarnings("unchecked")
-	public static <K extends AbstractPolicyDefinitionEntity> DynamicPolicyLoader<K> getInstanceOf(Class<K> clz) {
-		if (maps.containsKey(clz)) {
-			return maps.get(clz);
-		} else {
-			DynamicPolicyLoader<K> loader = new DynamicPolicyLoader<K>();
-			maps.putIfAbsent(clz, loader);
-			return maps.get(clz);
-		}
-	}
-	
-	/**
-	 * singleton with init would be good for unit test as well, and it ensures that
-	 * initialization happens only once before you use it.  
-	 * @param config
-	 * @param dao
-	 */
-	public void init(Map<String, Map<String, T>> initialAlertDefs, 
-			PolicyDefinitionDAO<T> dao, Config config){
-		if(!initialized){
-			synchronized(this){
-				if(!initialized){
-					internalInit(initialAlertDefs, dao, config);
-					initialized = true;
-				}
-			}
-		}
-	}
-	
-	/**
-	 * map from alertExecutorId+partitionId to AlertExecutor which implements PolicyLifecycleMethods
-	 * @param initialAlertDefs
-	 * @param dao
-	 * @param config
-	 */
-	private void internalInit(Map<String, Map<String, T>> initialAlertDefs,
-			PolicyDefinitionDAO<T> dao, Config config){
-		if(!config.getBoolean("dynamicConfigSource.enabled")) {
-            return;
-        }
-		AbstractPollingScheduler scheduler = new FixedDelayPollingScheduler(
-                config.getInt("dynamicConfigSource.initDelayMillis"),
-                config.getInt("dynamicConfigSource.delayMillis"),
-                false
-        );
-
-		scheduler.addPollListener(new PollListener(){
-			@SuppressWarnings("unchecked")
-			@Override
-			public void handleEvent(EventType eventType, PollResult lastResult,
-					Throwable exception) {
-				if (lastResult == null) {
-					LOG.error("The lastResult is null, something must be wrong, probably the eagle service is dead!");
-					throw new RuntimeException("The lastResult is null, probably the eagle service is dead! ", exception);
-				}
-				Map<String, Object> added = lastResult.getAdded();
-				Map<String, Object> changed = lastResult.getChanged();
-				Map<String, Object> deleted = lastResult.getDeleted();
-				for(Map.Entry<String, List<PolicyLifecycleMethods<T>>> entry : policyChangeListeners.entrySet()){
-					String alertExecutorId = entry.getKey();
-					for (PolicyLifecycleMethods<T> policyLifecycleMethod : entry.getValue()) {
-						Map<String, T> addedPolicies = (Map<String, T>)added.get(trimPartitionNum(alertExecutorId));
-						if(addedPolicies != null && addedPolicies.size() > 0){
-							policyLifecycleMethod.onPolicyCreated(addedPolicies);
-						}
-						Map<String, T> changedPolicies = (Map<String, T>)changed.get(trimPartitionNum(alertExecutorId));
-						if(changedPolicies != null && changedPolicies.size() > 0){
-							policyLifecycleMethod.onPolicyChanged(changedPolicies);
-						}
-						Map<String, T> deletedPolicies = (Map<String, T>)deleted.get(trimPartitionNum(alertExecutorId));
-						if(deletedPolicies != null && deletedPolicies.size() > 0){
-							policyLifecycleMethod.onPolicyDeleted(deletedPolicies);
-						}
-					}
-				}
-
-                // notify policyDistributionUpdaters
-                for(Map.Entry<String, List<PolicyDistributionReportMethods>> entry : policyDistributionUpdaters.entrySet()){
-                    for(PolicyDistributionReportMethods policyDistributionUpdateMethod : entry.getValue()){
-                        policyDistributionUpdateMethod.report();
-                    }
-                }
-			}
-			private String trimPartitionNum(String alertExecutorId){
-				int i = alertExecutorId.lastIndexOf('_');
-				if(i != -1){
-					return alertExecutorId.substring(0, i);
-				}
-				return alertExecutorId;
-			}
-		});
-		
-		ConcurrentCompositeConfiguration finalConfig = new ConcurrentCompositeConfiguration();
-		      
-		PolledConfigurationSource source = new DynamicPolicySource<T>(initialAlertDefs, dao, config);
-
-		try{
-			DynamicConfiguration dbSourcedConfiguration = new DynamicConfiguration(source, scheduler);
-			finalConfig.addConfiguration(dbSourcedConfiguration);
-		}catch(Exception ex){
-			LOG.warn("Fail loading from DB, continue without DB sourced configuration", ex);
-		}
-	}
-	
-	public static class DynamicPolicySource<M extends AbstractPolicyDefinitionEntity> implements PolledConfigurationSource {
-		private static Logger LOG = LoggerFactory.getLogger(DynamicPolicySource.class);
-		private Config config;
-		private PolicyDefinitionDAO<M> dao;
-		/**
-		 * mapping from alertExecutorId to list of policies 
-		 */
-		private Map<String, Map<String, M>> cachedAlertDefs;
-		
-		public DynamicPolicySource(Map<String, Map<String, M>> initialAlertDefs, PolicyDefinitionDAO<M> dao, Config config){
-			this.cachedAlertDefs = initialAlertDefs;
-			this.dao = dao;
-			this.config = config;
-		}
-
-		public PollResult poll(boolean initial, Object checkPoint) throws Exception {
-			LOG.info("Poll policy from eagle service " +  config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.HOST) +
-					":" + config.getString(EagleConfigConstants.EAGLE_PROPS + "." + EagleConfigConstants.EAGLE_SERVICE + "." + EagleConfigConstants.PORT) );
-			Map<String, Map<String, M>> newAlertDefs = 
-					dao.findActivePoliciesGroupbyExecutorId(config.getString("eagleProps.site"),
-                            config.getString("eagleProps.application"));
-			
-			// compare runtime alertDefs with cachedAlertDefs and figure out what are added/deleted/updated
-			Map<String, Object> added = new HashMap<String, Object>();
-			Map<String, Object> changed = new HashMap<String, Object>();
-			Map<String, Object> deleted = new HashMap<String, Object>();
-			
-			Set<String> newAlertExecutorIds = newAlertDefs.keySet();
-			Set<String> cachedAlertExecutorIds = cachedAlertDefs.keySet();
-			
-			// dynamically adding new alert executor is not supported, because alert executor is pre-built while program starts up
-			Collection<String> addedAlertExecutorIds = CollectionUtils.subtract(newAlertExecutorIds, cachedAlertExecutorIds);
-			if(addedAlertExecutorIds != null && addedAlertExecutorIds.size() > 0){
-				LOG.warn("New alertExecutorIds are found : " + addedAlertExecutorIds);
-			}
-			
-			// if one alert executor is missing, it means all policy under that alert executor should be removed
-			Collection<String> deletedAlertExecutorIds = CollectionUtils.subtract(cachedAlertExecutorIds, newAlertExecutorIds);
-			if(deletedAlertExecutorIds != null && deletedAlertExecutorIds.size() > 0){
-				LOG.warn("Some alertExecutorIds are deleted : " + deletedAlertExecutorIds);
-				for(String deletedAlertExecutorId : deletedAlertExecutorIds){
-					deleted.put(deletedAlertExecutorId, cachedAlertDefs.get(deletedAlertExecutorId));
-				}
-			}
-			
-			// we need calculate added/updated/deleted policy for all executors which are not deleted
-//			Collection<String> updatedAlertExecutorIds = CollectionUtils.intersection(newAlertExecutorIds, cachedAlertExecutorIds);
-            Collection<String> updatedAlertExecutorIds = newAlertExecutorIds;
-			for(String updatedAlertExecutorId : updatedAlertExecutorIds){
-				Map<String, M> newPolicies = newAlertDefs.get(updatedAlertExecutorId);
-				Map<String, M> cachedPolicies = cachedAlertDefs.get(updatedAlertExecutorId);
-				PolicyComparator.compare(updatedAlertExecutorId, newPolicies, cachedPolicies, added, changed, deleted);
-			}
-			
-			cachedAlertDefs = newAlertDefs;
-
-			return PollResult.createIncremental(added, changed, deleted, new Date().getTime());
-		}
-	}
-	
-	public static class PolicyComparator {
-		
-		public static <M extends AbstractPolicyDefinitionEntity> void compare(String alertExecutorId, Map<String, M> newPolicies, Map<String, M> cachedPolicies, 
-				Map<String, Object> added, Map<String, Object> changed, Map<String, Object> deleted){
-			Set<String> newPolicyIds = newPolicies.keySet();
-            Set<String> cachedPolicyIds = cachedPolicies != null ? cachedPolicies.keySet() : new HashSet<String>();
-			Collection<String> addedPolicyIds = CollectionUtils.subtract(newPolicyIds, cachedPolicyIds);
-			Collection<String> deletedPolicyIds = CollectionUtils.subtract(cachedPolicyIds, newPolicyIds);
-			Collection<String> changedPolicyIds = CollectionUtils.intersection(cachedPolicyIds, newPolicyIds);
-			if(addedPolicyIds != null && addedPolicyIds.size() > 0){
-				Map<String, M> tmp = new HashMap<String, M>();
-				for(String addedPolicyId : addedPolicyIds){
-					tmp.put(addedPolicyId, newPolicies.get(addedPolicyId));
-				}
-				added.put(alertExecutorId, tmp);
-			}
-			if(deletedPolicyIds != null && deletedPolicyIds.size() > 0){
-				Map<String, M> tmp = new HashMap<String, M>();
-				for(String deletedPolicyId : deletedPolicyIds){
-					tmp.put(deletedPolicyId, cachedPolicies.get(deletedPolicyId));
-				}
-				deleted.put(alertExecutorId, tmp);
-			}
-			if(changedPolicyIds != null && changedPolicyIds.size() > 0){
-				Map<String, M> tmp = new HashMap<String, M>();
-				for(String changedPolicyId : changedPolicyIds){
-					// check if policy is really changed
-					if(!newPolicies.get(changedPolicyId).equals(cachedPolicies.get(changedPolicyId))){
-						tmp.put(changedPolicyId, newPolicies.get(changedPolicyId));
-					}
-				}
-				changed.put(alertExecutorId, tmp);
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PartitionUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PartitionUtils.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PartitionUtils.java
deleted file mode 100644
index bc9a13f..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PartitionUtils.java
+++ /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.
- */
-package org.apache.eagle.policy;
-
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-
-public class PartitionUtils {
-	
-	public static boolean accept(AlertDefinitionAPIEntity alertDef, PolicyPartitioner partitioner, int numPartitions, int partitionSeq){
-		int targetPartitionSeq = partitioner.partition(numPartitions, alertDef.getTags().get(Constants.POLICY_TYPE), alertDef.getTags().get(Constants.POLICY_ID));
-		if(targetPartitionSeq == partitionSeq)
-			return true;
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistStatsDAOLogReporter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistStatsDAOLogReporter.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistStatsDAOLogReporter.java
deleted file mode 100644
index 30868f3..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistStatsDAOLogReporter.java
+++ /dev/null
@@ -1,47 +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.policy;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Set;
-
-/**
- * just append log
- */
-public class PolicyDistStatsDAOLogReporter implements PolicyDistributionStatsDAO{
-    private static Logger LOG = LoggerFactory.getLogger(PolicyDistStatsDAOLogReporter.class);
-
-    @Override
-    public void reportPolicyMembership(String policyGroupId, Set<String> policyIds) {
-        if(policyIds != null){
-            StringBuilder sb = new StringBuilder();
-            sb.append("policyDistirbutionStats for " + policyGroupId + "[" + "total: " + policyIds.size() + ", ");
-            for(String policyId : policyIds){
-                sb.append(policyId + ",");
-            }
-            sb.append("]");
-            LOG.info(sb.toString());
-        }else{
-            LOG.warn("No policies are assigned to " + policyGroupId);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionReportMethods.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionReportMethods.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionReportMethods.java
deleted file mode 100644
index 7181857..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionReportMethods.java
+++ /dev/null
@@ -1,27 +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.policy;
-
-/**
- * framework will call report method, it is AlertExecutor's responsibility to report policy distribution information
- */
-public interface PolicyDistributionReportMethods {
-    void report();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStats.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStats.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStats.java
deleted file mode 100644
index 7a70c95..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/PolicyDistributionStats.java
+++ /dev/null
@@ -1,74 +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.policy;
-
-/**
- * fields for a policy distribution statistics
- */
-public class PolicyDistributionStats {
-    private String policyGroupId;   // normally groupId is alertExecutorId
-    private String policyId;
-    private boolean markDown;       // true if this policy is marked down, false otherwise
-    private double weight;          // comprehensive factors for policy overhead
-
-    public String getPolicyId() {
-        return policyId;
-    }
-
-    public void setPolicyId(String policyId) {
-        this.policyId = policyId;
-    }
-
-    public boolean isMarkDown() {
-        return markDown;
-    }
-
-    public void setMarkDown(boolean markDown) {
-        this.markDown = markDown;
-    }
-
-    public double getWeight() {
-        return weight;
-    }
-
-    public void setWeight(double weight) {
-        this.weight = weight;
-    }
-
-    public String getPolicyGroupId() {
-        return policyGroupId;
-    }
-
-    public void setPolicyGroupId(String policyGroupId) {
-        this.policyGroupId = policyGroupId;
-    }
-
-    public String toString(){
-        StringBuilder sb = new StringBuilder();
-        sb.append("policyId:");
-        sb.append(policyId);
-        sb.append(", markDown:");
-        sb.append(markDown);
-        sb.append(", weight:");
-        sb.append(weight);
-
-        return sb.toString();
-    }
-}



[36/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyExecutor.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyExecutor.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyExecutor.scala
deleted file mode 100644
index 1e1664a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyExecutor.scala
+++ /dev/null
@@ -1,21 +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.datastream.core
-
-trait AbstractTopologyExecutor {
-  def execute
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/Configuration.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/Configuration.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/Configuration.scala
deleted file mode 100644
index e3f3050..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/Configuration.scala
+++ /dev/null
@@ -1,74 +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.datastream.core
-
-import com.typesafe.config.{Config, _}
-
-import scala.reflect.runtime.universe._
-
-/**
- * @since  12/4/15
- */
-case class Configuration(private var config:Config) extends Serializable{
-  def get:Config = config
-
-  def set[T<:AnyRef](key:String,value:T): Unit = {
-    config = config.withValue(key,ConfigValueFactory.fromAnyRef(value))
-  }
-
-  /**
-   *
-   * @param key config key
-   * @param default default value
-   * @tparam T return type
-   * @return
-   */
-  def get[T](key:String,default:T=null)(implicit tag:TypeTag[T]):T = {
-    if(get.hasPath(key)) {
-      get(key)
-    } else default
-  }
-
-  def get[T](key:String)(implicit tag: TypeTag[T]):T = tag.tpe match {
-    case STRING_TYPE => config.getString(key).asInstanceOf[T]
-    case TypeTag.Double => get.getDouble(key).asInstanceOf[T]
-    case TypeTag.Long => get.getLong(key).asInstanceOf[T]
-    case TypeTag.Int => get.getInt(key).asInstanceOf[T]
-    case TypeTag.Byte => get.getBytes(key).asInstanceOf[T]
-    case TypeTag.Boolean => get.getBoolean(key).asInstanceOf[T]
-    case NUMBER_TYPE => get.getNumber(key).asInstanceOf[T]
-    case OBJECT_TYPE => get.getObject(key).asInstanceOf[T]
-    case VALUE_TYPE => get.getValue(key).asInstanceOf[T]
-    case ANY_REF_TYPE => get.getAnyRef(key).asInstanceOf[T]
-    case INT_LIST_TYPE => get.getIntList(key).asInstanceOf[T]
-    case DOUBLE_LIST_TYPE => get.getDoubleList(key).asInstanceOf[T]
-    case BOOL_LIST_TYPE => get.getBooleanList(key).asInstanceOf[T]
-    case LONG_LIST_TYPE => get.getLongList(key).asInstanceOf[T]
-    case _ => throw new UnsupportedOperationException(s"$tag is not supported yet")
-  }
-
-  val STRING_TYPE = typeOf[String]
-  val NUMBER_TYPE = typeOf[Number]
-  val INT_LIST_TYPE = typeOf[List[Int]]
-  val BOOL_LIST_TYPE = typeOf[List[Boolean]]
-  val DOUBLE_LIST_TYPE = typeOf[List[Double]]
-  val LONG_LIST_TYPE = typeOf[List[Double]]
-  val OBJECT_TYPE = typeOf[ConfigObject]
-  val VALUE_TYPE = typeOf[ConfigValue]
-  val ANY_REF_TYPE = typeOf[AnyRef]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/ExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/ExecutionEnvironment.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/ExecutionEnvironment.scala
deleted file mode 100644
index c511484..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/ExecutionEnvironment.scala
+++ /dev/null
@@ -1,45 +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.datastream.core
-
-import com.typesafe.config.Config
-
-trait StreamContextAdapter{
-  def submit(context:StreamContext):Unit = {
-    execute(context.build)
-  }
-  def execute(dag: StreamDAG)
-}
-
-/**
- * TODO: Decouple execution environment with stream context
- *
- * @since 0.3.0
- */
-abstract class ExecutionEnvironment(private val conf:Config)
-  extends StreamContext(conf) with StreamContextAdapter     // Continue to support old API
-  with StreamSourceBuilder
-{
-  /**
-   * Start to execute
-   */
-  def execute():Unit = {
-    submit(this)
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAggregateExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAggregateExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAggregateExpansion.scala
deleted file mode 100644
index 9564a0d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAggregateExpansion.scala
+++ /dev/null
@@ -1,80 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.apache.eagle.dataproc.impl.aggregate.AggregateExecutorFactory
-import org.apache.eagle.datastream.FlatMapper
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.collection.JavaConversions.asScalaSet
-import scala.collection.mutable.ListBuffer
-
-/**
- * The expansion job for stream analyze
- * 
- * TODO : should re-use flow with stream alert expansion, make code cleaner
- */
-class StreamAggregateExpansion(config: Config) extends StreamAlertExpansion(config) {
-
-  override def onIteration(toBeAddedEdges: ListBuffer[StreamConnector[Any, Any]], toBeRemovedVertex: ListBuffer[StreamProducer[Any]],
-    dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any, Any]], current: StreamProducer[Any],
-    child: StreamProducer[Any]): Unit = {
-    child match {
-      case AggregateProducer(upStreamNames, analyzerId, cepQl, strategy) => {
-        /**
-         * Rewrite the tree to add output field wrapper since policy executors accept only fixed tuple format 
-         */
-        val newStreamProducers = rewriteWithStreamOutputWrapper(current, dag, toBeAddedEdges, toBeRemovedVertex, upStreamNames)
-
-        val analyzeExecutors = if (cepQl != null) {
-          AggregateExecutorFactory.Instance.createExecutors(upStreamNames, cepQl)
-        } else {
-          AggregateExecutorFactory.Instance.createExecutors(config, upStreamNames, analyzerId)
-        }
-
-        analyzeExecutors.foreach(exec => {
-          val t = FlatMapProducer(exec.asInstanceOf[FlatMapper[Any]]).initWith(dag,config, hook = false).nameAs(exec.getExecutorId + "_" + exec.getPartitionSeq).stream(child.stream)
-
-          // connect with previous
-          if (strategy == null) {
-            newStreamProducers.foreach(s => toBeAddedEdges += StreamConnector(s, t))
-          } else {
-            newStreamProducers.foreach(s => toBeAddedEdges += StreamConnector(s, t, strategy))
-          }
-
-          // connect with next
-          val outgoingEdges = dag.outgoingEdgesOf(child)
-          outgoingEdges.foreach(e => toBeAddedEdges += StreamConnector(t, e.to, e))
-        })
-        
-        // remote current child
-        toBeRemovedVertex += child
-      }
-      case _ => 
-    }
-  }
-}
-
-object StreamAggregateExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamAggregateExpansion ={
-    val e = new StreamAggregateExpansion(config)
-    e.expand(dag)
-    e
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAlertExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAlertExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAlertExpansion.scala
deleted file mode 100644
index 618bba3..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamAlertExpansion.scala
+++ /dev/null
@@ -1,257 +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.datastream.core
-
-import java.util
-
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity
-import org.apache.eagle.alert.executor.AlertExecutorCreationUtils
-import org.apache.eagle.policy.common.Constants
-import org.apache.eagle.policy.dao.PolicyDefinitionEntityDAOImpl
-
-import scala.collection.JavaConversions.asScalaSet
-import scala.collection.mutable.ListBuffer
-import org.apache.eagle.datastream.JavaStormExecutorForAlertWrapper
-import org.apache.eagle.datastream.JavaStormStreamExecutor
-import org.apache.eagle.datastream.StormStreamExecutor
-import org.apache.eagle.datastream.storm.StormExecutorForAlertWrapper
-import org.apache.eagle.datastream.utils.AlertExecutorConsumerUtils
-import org.apache.eagle.service.client.EagleServiceConnector
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-import com.typesafe.config.Config
-
-/**
- * The constraints for alert is:
- * 1. only 3 StreamProducers can be put immediately before MapProducer, FlatMapProducer, StreamUnionProducer
- * 2. For StreamUnionProducer, the only supported unioned producers are MapProducer and FlatMapProducer
- * 3. the output for MapProducer and FlatMapProducer is 2-field tuple, key and value, key is string, value has to be SortedMap
- * 4. the framework will wrapper original MapProducer and FlatMapProducer to emit 3-field tuple, {key, streamName and value}
- * 5. the framework will automatically partition traffic with first field
- *
- *
- * 2 steps
- * step 1: wrapper previous StreamProducer with one more field "streamName"
- * step 2: partition alert executor by policy partitioner class
- */
-
-case class StreamAlertExpansion(config: Config) extends StreamDAGExpansion(config) {
-  val LOG = LoggerFactory.getLogger(classOf[StreamAlertExpansion])
-  import StreamAlertExpansion._
-
-  override def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): Unit ={
-    val iter = dag.iterator()
-    val toBeAddedEdges = new ListBuffer[StreamConnector[Any,Any]]
-    val toBeRemovedVertex = new ListBuffer[StreamProducer[Any]]
-    while(iter.hasNext) {
-      val current = iter.next()
-      dag.outgoingEdgesOf(current).foreach(edge => {
-        val child = edge.to
-        onIteration(toBeAddedEdges, toBeRemovedVertex, dag, current, child)
-      })
-    }
-    // add back edges
-    toBeAddedEdges.foreach(e => {
-      dag.addVertex(e.from)
-      dag.addVertex(e.to)
-      dag.addEdge(e.from, e.to, e)
-    })
-    toBeRemovedVertex.foreach(v => dag.removeVertex(v))
-  }
-
-  def onIteration(toBeAddedEdges: ListBuffer[StreamConnector[Any,Any]], toBeRemovedVertex: ListBuffer[StreamProducer[Any]], 
-               dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]], current: StreamProducer[Any], child: StreamProducer[Any]): Unit = {
-    child match {
-      case AlertStreamProducer(upStreamNames, alertExecutorId, withConsumer,strategy) => {
-        /**
-         * step 1: wrapper previous StreamProducer with one more field "streamName"
-         * for AlertStreamSink, we check previous StreamProducer and replace that
-         */
-        val newStreamProducers = rewriteWithStreamOutputWrapper(current, dag, toBeAddedEdges, toBeRemovedVertex, upStreamNames)
-
-        /**
-         * step 2: partition alert executor by policy partitioner class
-         */
-        val alertExecutors = AlertExecutorCreationUtils.createAlertExecutors(config,
-          new PolicyDefinitionEntityDAOImpl[AlertDefinitionAPIEntity](new EagleServiceConnector(config), Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME),
-          upStreamNames, alertExecutorId)
-        var alertProducers = new scala.collection.mutable.MutableList[StreamProducer[Any]]
-        alertExecutors.foreach(exec => {
-          val t = FlatMapProducer(exec).nameAs(exec.getExecutorId + "_" + exec.getPartitionSeq).initWith(dag,config, hook = false)
-          alertProducers += t
-          newStreamProducers.foreach(newsp => toBeAddedEdges += StreamConnector[Any,Any](newsp, t,Seq(0)))
-          if (strategy == null) {
-             newStreamProducers.foreach(newsp => toBeAddedEdges += StreamConnector(newsp,t,Seq(0)))
-          }
-          else {
-            newStreamProducers.foreach(newsp => toBeAddedEdges += StreamConnector(newsp,t,strategy))
-          }
-        })
-
-        // remove AlertStreamSink
-        toBeRemovedVertex += child
-
-        // add alert consumer if necessary
-        if (withConsumer) {
-          AlertExecutorConsumerUtils.setupAlertConsumers(toBeAddedEdges, alertProducers.toList)
-        }
-      }
-      case _ =>
-    }
-  }
-
-  protected def rewriteWithStreamOutputWrapper(current: org.apache.eagle.datastream.core.StreamProducer[Any], dag: org.jgrapht.experimental.dag.DirectedAcyclicGraph[org.apache.eagle.datastream.core.StreamProducer[Any],org.apache.eagle.datastream.core.StreamConnector[Any,Any]], toBeAddedEdges: scala.collection.mutable.ListBuffer[org.apache.eagle.datastream.core.StreamConnector[Any,Any]], toBeRemovedVertex: scala.collection.mutable.ListBuffer[org.apache.eagle.datastream.core.StreamProducer[Any]], upStreamNames: java.util.List[String]) = {
-    if(upStreamNames == null) throw new NullPointerException("upStreamNames is null")
-
-    /**
-     * step 1: wrapper previous StreamProducer with one more field "streamName"
-     * for AlertStreamSink, we check previous StreamProducer and replace that
-     */
-    val newStreamProducers = new ListBuffer[StreamProducer[Any]]
-    current match {
-      case StreamUnionProducer(others) => {
-        val incomingEdges = dag.incomingEdgesOf(current)
-        incomingEdges.foreach(e => newStreamProducers += replace(toBeAddedEdges, toBeRemovedVertex, dag, e.from, upStreamNames.get(0)))
-        var i: Int = 1
-        others.foreach(o => {
-          newStreamProducers += replace(toBeAddedEdges, toBeRemovedVertex, dag, o, upStreamNames.get(i))
-          i += 1
-        })
-      }
-      case p: FlatMapProducer[AnyRef, AnyRef] => {
-        newStreamProducers += replace(toBeAddedEdges, toBeRemovedVertex, dag, current, recognizeSingleStreamName(p,upStreamNames))
-      }
-      case p: MapperProducer[AnyRef,AnyRef] => {
-        newStreamProducers += replace(toBeAddedEdges, toBeRemovedVertex, dag, current, recognizeSingleStreamName(p,upStreamNames))
-      }
-      case s: StreamProducer[AnyRef] if dag.inDegreeOf(s) == 0 => {
-        newStreamProducers += replace(toBeAddedEdges, toBeRemovedVertex, dag, current, recognizeSingleStreamName(s,upStreamNames))
-      }
-      case p@_ => throw new IllegalStateException(s"$p can not be put before AlertStreamSink, only StreamUnionProducer,FlatMapProducer and MapProducer are supported")
-    }
-    newStreamProducers
-  }
-
-
-  protected def replace(toBeAddedEdges: ListBuffer[StreamConnector[Any,Any]], toBeRemovedVertex: ListBuffer[StreamProducer[Any]],
-                      dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]], current: StreamProducer[Any], upStreamName: String) : StreamProducer[Any]= {
-    var newsp: StreamProducer[Any] = null
-    current match {
-      case _: FlatMapProducer[AnyRef, AnyRef] => {
-        val mapper = current.asInstanceOf[FlatMapProducer[_, _]].mapper
-        mapper match {
-          case a: JavaStormStreamExecutor[AnyRef] => {
-            val newmapper = new JavaStormExecutorForAlertWrapper(a.asInstanceOf[JavaStormStreamExecutor[Tuple2[String, util.SortedMap[AnyRef, AnyRef]]]], upStreamName)
-            newsp = FlatMapProducer(newmapper).initWith(dag,config,hook = false).stream(current.streamId)
-          }
-          case b: StormStreamExecutor[AnyRef] => {
-            val newmapper = StormExecutorForAlertWrapper(b.asInstanceOf[StormStreamExecutor[Tuple2[String, util.SortedMap[AnyRef, AnyRef]]]], upStreamName)
-            newsp = FlatMapProducer(newmapper).initWith(dag,config,hook = false).stream(current.streamId)
-          }
-          case _ => throw new IllegalArgumentException
-        }
-        // remove old StreamProducer and replace that with new StreamProducer
-        val incomingEdges = dag.incomingEdgesOf(current)
-        incomingEdges.foreach(e => toBeAddedEdges += StreamConnector(e.from, newsp))
-        val outgoingEdges = dag.outgoingEdgesOf(current)
-        outgoingEdges.foreach(e => toBeAddedEdges += StreamConnector(newsp, e.to))
-        toBeRemovedVertex += current
-      }
-      case _: MapperProducer[Any,Any] => {
-        val mapper = current.asInstanceOf[MapperProducer[Any,Any]].fn
-        val newfun: (Any => Any) = { a =>
-          val result = mapper(a)
-          result match {
-            case scala.Tuple1(x1) => (null, upStreamName, x1)
-            case scala.Tuple2(x1, x2) => (x1, upStreamName, x2)
-            case scala.Tuple3(_, _, _) => result
-            case _ => throw new IllegalArgumentException(s"Illegal message :$result, Tuple1/Tuple2/Tuple3 are supported")
-          }
-        }
-        current match {
-          case MapperProducer(_, fn) => newsp = MapperProducer(3, newfun).initWith(dag,config,hook = false).stream(current.stream)
-          case _ => throw new IllegalArgumentException(s"Illegal producer $current")
-        }
-        val incomingEdges = dag.incomingEdgesOf(current)
-        incomingEdges.foreach(e => toBeAddedEdges += StreamConnector(e.from, newsp))
-        val outgoingEdges = dag.outgoingEdgesOf(current)
-        outgoingEdges.foreach(e => toBeAddedEdges += StreamConnector(newsp, e.to))
-        toBeRemovedVertex += current
-      }
-      case s: StreamProducer[Any] if dag.inDegreeOf(s) == 0 => {
-        val fn:(AnyRef => AnyRef) = {
-          n => {
-            n match {
-              case scala.Tuple3 => n
-              case scala.Tuple2(x1,x2) => (x1,upStreamName,x2)
-              case scala.Tuple1(x1) => (if(x1 == null) null else x1.hashCode(),upStreamName,x1)
-              case _ => (if(n == null) null else n.hashCode(),upStreamName,n)
-            }
-          }
-        }
-        newsp = MapperProducer(3,fn).initWith(dag,config,hook = false).stream(s.stream)
-        toBeAddedEdges += StreamConnector(current,newsp)
-        val outgoingEdges = dag.outgoingEdgesOf(current)
-        outgoingEdges.foreach(e => toBeAddedEdges += StreamConnector(newsp,e.to))
-      }
-      case _ => throw new IllegalArgumentException("Only FlatMapProducer and MapProducer can be replaced before AlertStreamSink")
-    }
-    newsp
-  }
-}
-
-object StreamAlertExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamAlertExpansion ={
-    val e = StreamAlertExpansion(config)
-    e.expand(dag)
-    e
-  }
-
-  /**
-    * Try upStreamNames firstly, otherwise try producer.streamId
-    *
-    * @param producer
-    * @param upStreamNames
-    * @return
-    */
-  private def recognizeSingleStreamName(producer: StreamProducer[AnyRef],upStreamNames:util.List[String]):String = {
-    if(upStreamNames == null){
-      producer.streamId
-    }else if(upStreamNames.size()>1){
-      if(producer.streamId == null) {
-        if (upStreamNames.size() > 1)
-          throw new IllegalStateException("Too many (more than 1) upStreamNames " + upStreamNames + " given for " + producer)
-        else
-          upStreamNames.get(0)
-      } else {
-        producer.streamId
-      }
-    } else if(upStreamNames.size() == 1){
-      upStreamNames.get(0)
-    }else {
-      if(producer.streamId == null){
-        throw new IllegalArgumentException("No stream name found for "+producer)
-      } else
-        producer.streamId
-    }
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamBuilder.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamBuilder.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamBuilder.scala
deleted file mode 100644
index 6e21bcc..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamBuilder.scala
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream.core
-
-import com.typesafe.config.{Config, ConfigFactory}
-import org.apache.eagle.dataproc.util.ConfigOptionParser
-import org.apache.eagle.datastream.ExecutionEnvironments
-import org.apache.eagle.datastream.utils.GraphPrinter
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.reflect.runtime.universe._
-
-trait StreamContextBuilder extends StreamSourceBuilder {
-  def config:Configuration
-  /**
-   * Business logic DAG
-   * @return
-   */
-  def dag:DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]
-  /**
-   * Support Java Style Config
-   *
-   * @return
-   */
-  def getConfig:Config = config.get
-  def build:StreamDAG
-  def submit[E<:ExecutionEnvironment](implicit typeTag:TypeTag[E]):Unit
-  def submit(env:ExecutionEnvironment):Unit
-  def submit(clazz:Class[ExecutionEnvironment]):Unit
-}
-
-class StreamContext(private val conf:Config) extends StreamContextBuilder{
-  implicit private val _dag = new DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]](classOf[StreamConnector[Any,Any]])
-  private val _config:Configuration = Configuration(conf)
-  override def dag = _dag
-  override def config = _config
-  override def build: StreamDAG = {
-    implicit val i_conf = _config.get
-    StreamNameExpansion()
-    GraphPrinter.print(dag,message="Before expanded DAG ")
-    StreamAggregateExpansion()
-    StreamAlertExpansion()
-    StreamUnionExpansion()
-    StreamGroupbyExpansion()
-    StreamParallelismConfigExpansion()
-    StreamNameExpansion()
-    GraphPrinter.print(dag,message="After expanded DAG ")
-    GraphPrinter.printDotDigraph(dag)
-    StreamDAGTransformer.transform(dag)
-  }
-
-  override def submit(env: ExecutionEnvironment): Unit = {
-    env.submit(this)
-  }
-
-  override def submit(clazz: Class[ExecutionEnvironment]): Unit = {
-    ExecutionEnvironments.get(clazz,conf).submit(this)
-  }
-
-  override def submit[E <: ExecutionEnvironment](implicit typeTag: TypeTag[E]): Unit = {
-    ExecutionEnvironments.getWithConfig[E](conf).submit(this)
-  }
-}
-
-object StreamContext {
-  /**
-   * @return
-   */
-  def apply():StreamContext = {
-    new StreamContext(ConfigFactory.load())
-  }
-
-  /**
-   *
-   * @param args
-   * @return
-   */
-  def apply(args:Array[String]):StreamContext ={
-    new StreamContext(new ConfigOptionParser().load(args))
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamConnector.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamConnector.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamConnector.scala
deleted file mode 100644
index ce9d82c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamConnector.scala
+++ /dev/null
@@ -1,97 +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.datastream.core
-
-import org.apache.eagle.partition.PartitionStrategy
-
-abstract class StreamConnector[+T1 <: Any,+T2 <: Any](val from: StreamProducer[T1], val to: StreamProducer[T2]) extends Serializable
-
-case class ShuffleConnector[+T1 <: Any,+T2 <: Any](override val from: StreamProducer[T1], override val to: StreamProducer[T2])
-  extends StreamConnector[T1,T2](from,to){
-  override def toString: String = "shuffleGroup"
-}
-
-case class GroupbyFieldsConnector[+T1 <: Any,+T2 <: Any](override val from: StreamProducer[T1], override val to: StreamProducer[T2],groupByFields : Seq[Int])
-  extends StreamConnector[T1,T2](from,to){
-  override def toString: String = s"groupByFields( $groupByFields )"
-}
-
-case class GroupbyKeyConnector[T1 <: Any,+T2 <: Any](override val from: StreamProducer[T1], override val to: StreamProducer[T2],keySelector: T1 => Any)
-  extends StreamConnector[T1,T2](from,to){
-  override def toString: String = s"groupByKey($keySelector)"
-}
-
-case class GroupbyStrategyConnector[+T1 <: Any,+T2 <: Any](override val from: StreamProducer[T1], override val to: StreamProducer[T2],customGroupBy:PartitionStrategy)
-  extends StreamConnector[T1,T2](from,to){
-  override def toString: String = s"groupByStrategy( $customGroupBy )"
-}
-
-object StreamConnector{
-  /**
-   *
-   * @param from
-   * @param to
-   * @tparam T1
-   * @tparam T2
-   * @return
-   */
-  def apply[T1 <: Any,T2 <: Any](from: StreamProducer[T1], to: StreamProducer[T2]):ShuffleConnector[T1,T2] = ShuffleConnector(from,to)
-
-  /**
-   * Clone connector from old connector to apply to new processing element, return ShuffleConnector by default
-   *
-   * @param from
-   * @param to
-   * @param connector
-   * @tparam T1
-   * @tparam T2
-   * @return
-   */
-  def apply[T1 <: Any,T2 <: Any](from: StreamProducer[T1], to: StreamProducer[T2],connector: StreamConnector[Any,Any]):StreamConnector[T1,T2] = connector match {
-      case GroupbyFieldsConnector(_,_,fields) => GroupbyFieldsConnector[T1,T2](from,to,fields)
-      case GroupbyKeyConnector(_,_,keySelector) => GroupbyKeyConnector[T1,T2](from,to,keySelector)
-      case GroupbyStrategyConnector(_,_,strategy) => GroupbyStrategyConnector[T1,T2](from,to,strategy)
-      case null | ShuffleConnector(_,_) => ShuffleConnector[T1,T2](from,to)
-      case c@_ => throw new IllegalArgumentException(s"Unknown type of stream connector $c")
-  }
-
-  /**
-   *
-   * @param from
-   * @param to
-   * @param groupByFields
-   * @tparam T1
-   * @tparam T2
-   * @return
-   */
-  def apply[T1 <: Any,T2 <: Any](from: StreamProducer[T1], to: StreamProducer[T2],groupByFields : Seq[Int]):GroupbyFieldsConnector[T1,T2] = GroupbyFieldsConnector(from,to,groupByFields)
-
-  /**
-   *
-   * @param from
-   * @param to
-   * @param customGroupBy
-   * @tparam T1
-   * @tparam T2
-   * @return
-   */
-  def apply[T1 <: Any,T2 <: Any](from: StreamProducer[T1], to: StreamProducer[T2],customGroupBy: PartitionStrategy):GroupbyStrategyConnector[T1,T2] = GroupbyStrategyConnector(from,to,customGroupBy)
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAG.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAG.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAG.scala
deleted file mode 100644
index 7845740..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAG.scala
+++ /dev/null
@@ -1,70 +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.datastream.core
-
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.collection.JavaConverters._
-import scala.collection.{JavaConversions, mutable}
-
-/**
- * wrapper of DAG, used for storm topology compiler
- */
-class StreamDAG(val graph: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) extends StreamProducerGraph {
-  var nodeMap: mutable.Map[String, StreamProducer[Any]] = mutable.Map[String,StreamProducer[Any]]()
-  graph.iterator().asScala.foreach(p=> nodeMap.put(p.name,p))
-
-  override def addEdge(from: StreamProducer[Any], to: StreamProducer[Any], streamConnector: StreamConnector[Any,Any]): Unit = {
-    graph.addEdge(from, to, streamConnector)
-  }
-
-  override def addVertex(producer: StreamProducer[Any]): Unit = {
-    graph.addVertex(producer)
-    nodeMap.put(producer.name,producer)
-  }
-
-  override def iterator(): Iterator[StreamProducer[Any]] = {
-    JavaConversions.asScalaIterator(graph.iterator())
-  }
-
-  override def isSource(v: StreamProducer[Any]): Boolean = {
-    graph.inDegreeOf(v) match {
-      case 0 => true
-      case _ => false
-    }
-  }
-
-  override def outgoingEdgesOf(v: StreamProducer[Any]): scala.collection.mutable.Set[StreamConnector[Any,Any]] = {
-    JavaConversions.asScalaSet(graph.outgoingEdgesOf(v))
-  }
-
-  override def getNodeByName(name: String): Option[StreamProducer[Any]] = {
-    nodeMap.get(name)
-  }
-
-  def setNodeMap(nodeMap: mutable.Map[String, StreamProducer[Any]]): Unit = {
-    this.nodeMap = nodeMap
-  }
-
-  override def incomingVertexOf(v: StreamProducer[Any]): scala.collection.mutable.Set[StreamProducer[Any]] = {
-    val set = mutable.Set[StreamProducer[Any]]()
-    graph.incomingEdgesOf(v).asScala.foreach(e => set += graph.getEdgeSource(e))
-    set
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGExpansion.scala
deleted file mode 100644
index fcff639..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGExpansion.scala
+++ /dev/null
@@ -1,27 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-abstract class StreamDAGExpansion(config: Config) {
-  def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]])
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGTransformer.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGTransformer.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGTransformer.scala
deleted file mode 100644
index 6b20bf2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamDAGTransformer.scala
+++ /dev/null
@@ -1,46 +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.datastream.core
-
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.collection.mutable
-
-/**
- * convert generic DAG data structure to Storm specific DAG data structure for easy topology compiler
- */
-object StreamDAGTransformer {
-  /**
-   * Transform DirectedAcyclicGraph[StreamProducer, StreamConnector] into StormStreamDAG
-   *
-   * @param dag DirectedAcyclicGraph[StreamProducer, StreamConnector]
-   * @return StormStreamDAG
-   */
-  @deprecated("Use StreamDAG(dag) will transform directly")
-  def transform(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) : StreamDAG = {
-    val stormDAG = new StreamDAG(dag)
-    val nodeMap = mutable.HashMap[String, StreamProducer[Any]]()
-    val iter = dag.iterator()
-    while(iter.hasNext){
-      val sp = iter.next()
-      nodeMap.put(sp.name, sp)
-    }
-    stormDAG.setNodeMap(nodeMap)
-    stormDAG
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamGroupbyExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamGroupbyExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamGroupbyExpansion.scala
deleted file mode 100644
index 1a07e3f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamGroupbyExpansion.scala
+++ /dev/null
@@ -1,77 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.collection.JavaConversions._
-import scala.collection.mutable.ListBuffer
-
-/**
- * Replace GroupByProducer(Vertex) with StreamConnector (Edge)
- *
- * For example as to Storm, it's mainly for grouping method
- *
- * @param config context configuration
- */
-case class StreamGroupbyExpansion(config: Config) extends StreamDAGExpansion(config){
-  override def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) = {
-    val iter = dag.iterator()
-    var toBeAddedEdges = new ListBuffer[StreamConnector[Any,Any]]
-    var toBeRemovedVertex = new ListBuffer[StreamProducer[Any]]
-    while(iter.hasNext) {
-      val current = iter.next()
-      dag.outgoingEdgesOf(current).foreach(edge => {
-        val child = edge.to
-        child match {
-          case p : GroupByProducer[Any] => {
-            dag.outgoingEdgesOf(p).foreach(c2 => {
-              p match {
-                case GroupByFieldProducer(fields) =>
-                  toBeAddedEdges += GroupbyFieldsConnector(current, c2.to,fields)
-                case GroupByStrategyProducer(strategy) =>
-                  toBeAddedEdges += GroupbyStrategyConnector(current, c2.to,strategy)
-                case GroupByKeyProducer(keySelector) =>
-                  current.outKeyed = true
-                  current.keySelector = KeySelectorWrapper(keySelector)
-                  c2.to.inKeyed = true
-                  toBeAddedEdges += GroupbyKeyConnector(current, c2.to,keySelector)
-                case _ => toBeAddedEdges += ShuffleConnector(current, c2.to)
-              }
-            })
-            toBeRemovedVertex += p
-          }
-          case _ =>
-        }
-      })
-    }
-
-    // add back edges
-    toBeAddedEdges.foreach(e => dag.addEdge(e.from, e.to, e))
-    toBeRemovedVertex.foreach(v => dag.removeVertex(v))
-  }
-}
-
-object StreamGroupbyExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamGroupbyExpansion ={
-    val e = StreamGroupbyExpansion(config)
-    e.expand(dag)
-    e
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamNameExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamNameExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamNameExpansion.scala
deleted file mode 100644
index 4bc1812..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamNameExpansion.scala
+++ /dev/null
@@ -1,49 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.apache.eagle.datastream.utils.NodeNameSelector
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-/**
- * to set name for each StreamProducer
- * 1. if name is given programatically, then use this name
- * 2. otherwise use name generated by scala internally
- */
-case class StreamNameExpansion(config: Config) extends StreamDAGExpansion(config){
-  val LOG = LoggerFactory.getLogger(classOf[StreamNameExpansion])
-
-  override def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) = {
-    val iter = dag.iterator()
-    while(iter.hasNext){
-      val sp = iter.next()
-      sp.name = NodeNameSelector(sp).getName
-    }
-  }
-}
-
-
-object StreamNameExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamNameExpansion ={
-    val e = StreamNameExpansion(config)
-    e.expand(dag)
-    e
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
deleted file mode 100644
index 8699da6..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamParallelismConfigExpansion.scala
+++ /dev/null
@@ -1,65 +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.datastream.core
-
-import java.util.regex.Pattern
-
-import com.typesafe.config.{Config, ConfigObject, ConfigValue}
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConverters._
-
-case class StreamParallelismConfigExpansion(config: Config) extends StreamDAGExpansion(config){
-  val LOG = LoggerFactory.getLogger(classOf[StreamParallelismConfigExpansion])
-
-  override def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) = {
-    val map = getParallelismMap(config)
-    val iter = dag.iterator()
-    while(iter.hasNext){
-      val streamProducer = iter.next()
-      if(streamProducer.name != null) {
-        map.foreach(tuple => {
-          tuple._1.matcher(streamProducer.name).find() match {
-            case true => streamProducer.parallelism(tuple._2)
-            case false =>
-          }
-        })
-      }
-    }
-  }
-
-  private def getParallelismMap(config: Config) : Map[Pattern, Int]= {
-    if(config.hasPath("envContextConfig.parallelismConfig")) {
-      val parallelismConfig: ConfigObject = config.getObject("envContextConfig.parallelismConfig")
-      parallelismConfig.asScala.toMap map {
-        case (name, value) => (Pattern.compile(name), value.asInstanceOf[ConfigValue].unwrapped().asInstanceOf[Int])
-      }
-    }else{
-      Map[Pattern,Int]()
-    }
-  }
-}
-
-object StreamParallelismConfigExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamParallelismConfigExpansion ={
-    val e = StreamParallelismConfigExpansion(config)
-    e.expand(dag)
-    e
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducer.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducer.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducer.scala
deleted file mode 100644
index 6445643..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducer.scala
+++ /dev/null
@@ -1,342 +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.datastream.core
-
-import java.util
-import java.util.concurrent.atomic.AtomicInteger
-
-import backtype.storm.topology.base.BaseRichSpout
-import com.typesafe.config.Config
-import org.apache.eagle.alert.entity.AlertAPIEntity
-import org.apache.eagle.datastream.{FlatMapperWrapper, Collector, FlatMapper}
-import org.apache.eagle.partition.PartitionStrategy
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConversions.{asScalaBuffer, seqAsJavaList}
-import scala.collection.JavaConverters.asScalaBufferConverter
-/**
- * StreamProducer = StreamInfo + StreamProtocol
- *
- * StreamProducer is processing logic element, used the base class for all other concrete StreamProducer
- * Stream Producer can be treated as logical processing element but physical
- * It defines high level type-safe API for user to organize data stream flow
- *
- * StreamProducer is independent of execution environment
- *
- * @tparam T processed elements type
- */
-abstract class StreamProducer[+T <: Any] extends StreamInfo with StreamProtocol[T] {
-  private var graph: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]] = null
-  private val LOG = LoggerFactory.getLogger(classOf[StreamProducer[T]])
-
-  /**
-   * Should not modify graph when setting it
-   */
-  def initWith(graph:DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]],config:Config, hook:Boolean = true):StreamProducer[T]={
-    this.config = config
-    this.graph = graph
-    if(hook && ! this.graph.containsVertex(this)) {
-      this.graph.addVertex(this)
-    }
-    LOG.debug(this.graph.toString)
-    this
-  }
-  
-  /**
-   * Get stream pure metadata info
-   * @return
-   */
-  override def getInfo:StreamInfo = this.asInstanceOf[StreamInfo]
-
-  override def stream(streamId:String):StreamProducer[T] = {
-    this.streamId = streamId
-    this
-  }
-
-  override def filter(fn : T => Boolean): StreamProducer[T] ={
-    val ret = FilterProducer[T](fn)
-    connect(this, ret)
-    ret
-  }
-
-  override def flatMap[R](flatMapper:FlatMapper[R]): StreamProducer[R] = {
-    val ret = FlatMapProducer[T,R](flatMapper)
-    connect(this, ret)
-    ret
-  }
-  override def flatMap[R](func:(Any,Collector[R])=>Unit): StreamProducer[R] = {
-    val ret = FlatMapProducer[T,R](FlatMapperWrapper[R](func))
-    connect(this, ret)
-    ret
-  }
-
-
-  override def foreach(fn : T => Unit) : Unit = {
-    val ret = ForeachProducer[T](fn)
-    connect(this, ret)
-  }
-
-  override def map[R](fn : T => R) : StreamProducer[R] = {
-    val ret = MapperProducer[T,R](0,fn)
-    connect(this, ret)
-    ret
-  }
-
-  override def map1[R](fn : T => R): StreamProducer[R] = {
-    val ret = MapperProducer[T,R](1, fn)
-    connect(this, ret)
-    ret
-  }
-
-  override def map2[R](fn : T => R): StreamProducer[R] = {
-    val ret = MapperProducer[T,R](2, fn)
-    connect(this, ret)
-    ret
-  }
-
-  override def map3[R](fn : T => R): StreamProducer[R] = {
-    val ret = MapperProducer(3, fn)
-    connect(this, ret)
-    ret
-  }
-
-  override def map4[R](fn : T => R): StreamProducer[R] = {
-    val ret = MapperProducer(4, fn)
-    connect(this, ret)
-    ret
-  }
-
-  /**
-   * starting from 0, groupby operator would be upon edge of the graph
-   */
-  override def groupBy(fields : Int*) : StreamProducer[T] = {
-    // validate each field index is greater or equal to 0
-    fields.foreach(n => if(n<0) throw new IllegalArgumentException("field index should be always >= 0"))
-    val ret = GroupByFieldProducer[T](fields)
-    connect(this, ret)
-    ret
-  }
-
-  def groupByFieldIndex(fields : Seq[Int]) : StreamProducer[T] = {
-    // validate each field index is greater or equal to 0
-    fields.foreach(n => if(n<0) throw new IllegalArgumentException("field index should be always >= 0"))
-    val ret = GroupByFieldProducer[T](fields)
-    connect(this, ret)
-    ret
-  }
-
-  //groupBy java version, starting from 1
-  override def groupBy(fields : java.util.List[Integer]) : StreamProducer[T] = {
-    // validate each field index is greater or equal to 0
-    fields.foreach(n => if(n<0) throw new IllegalArgumentException("field index should be always >= 0"))
-    val ret = GroupByFieldProducer[T](fields.asScala.toSeq.asInstanceOf[Seq[Int]])
-    connect(this, ret)
-    ret
-  }
-
-  override def groupByKey(keySelector: T=> Any):StreamProducer[T] = {
-    val ret = GroupByKeyProducer(keySelector)
-    connect(this,ret)
-    ret
-  }
-
-  override def streamUnion[T2,T3](others : Seq[StreamProducer[T2]]) : StreamProducer[T3] = {
-    val ret = StreamUnionProducer[T, T2, T3](others)
-    connect(this, ret)
-    ret
-  }
-
-  def streamUnion[T2,T3](other : StreamProducer[T2]) : StreamProducer[T3] = {
-    streamUnion(Seq(other))
-  }
-
-  def streamUnion[T2,T3](others : util.List[StreamProducer[T2]]) : StreamProducer[T3] = streamUnion(others.asScala)
-
-  override def groupBy(strategy : PartitionStrategy) : StreamProducer[T] = {
-    val ret = GroupByStrategyProducer(strategy)
-    connect(this, ret)
-    ret
-  }
-
-  /**
-   * alert is always sink of data flow
-   */
-  def alertWithConsumer(upStreamNames: util.List[String], alertExecutorId : String) = {
-    alert(upStreamNames.asScala, alertExecutorId,consume = true)
-  }
-
-  def alertWithoutConsumer(upStreamNames: util.List[String], alertExecutorId : String) = {
-    alert(upStreamNames.asScala, alertExecutorId, consume = false)
-  }
-
-  override def alert(upStreamNames: Seq[String], alertExecutorId : String, consume: Boolean=true, strategy : PartitionStrategy=null):AlertStreamProducer = {
-    val ret = AlertStreamProducer(upStreamNames, alertExecutorId, consume, strategy)
-    connect(this, ret)
-    ret
-  }
-
-  def alertWithConsumer(upStreamName: String, alertExecutorId : String, strategy: PartitionStrategy): Unit ={
-    alert(util.Arrays.asList(upStreamName), alertExecutorId, consume = true, strategy = strategy)
-  }
-
-  def alertWithConsumer(upStreamName: String, alertExecutorId : String): Unit ={
-    alert(util.Arrays.asList(upStreamName), alertExecutorId, consume = true)
-  }
-
-  def alertWithoutConsumer(upStreamName: String, alertExecutorId : String, strategy: PartitionStrategy): Unit ={
-    alert(util.Arrays.asList(upStreamName), alertExecutorId, consume = false, strategy)
-  }
-
-  def alertWithoutConsumer(upStreamName: String, alertExecutorId : String): Unit ={
-    alert(util.Arrays.asList(upStreamName), alertExecutorId, consume = false)
-  }
-
-  def aggregate(upStreamNames: java.util.List[String], queryExecutorId : String, strategy: PartitionStrategy = null): StreamProducer[T] = {
-    val ret= AggregateProducer(upStreamNames, queryExecutorId, null, strategy)
-    connect(this, ret)
-    ret
-  }
-
-  def aggregateDirect(upStreamNames: java.util.List[String], cql : String, strategy: PartitionStrategy): StreamProducer[T] = {
-    val ret= AggregateProducer(upStreamNames, null, cql, strategy)
-    connect(this, ret)
-    ret
-  }
-
-  def persist(executorId : String, storageType: StorageType.StorageType) : StreamProducer[T] = {
-    val ret = PersistProducer(executorId, storageType)
-    connect(this, ret)
-    ret
-  }
-
-  def connect[T1,T2](current: StreamProducer[T1], next: StreamProducer[T2]) = {
-    if(current.graph == null) throw new NullPointerException(s"$current has not been registered to any graph before being connected")
-    current.graph.addVertex(next)
-    current.graph.addEdge(current, next, StreamConnector(current, next))
-    passOnContext[T1,T2](current, next)
-  }
-
-  def connect[T2]( next: StreamProducer[T2]) = {
-    if(this.graph == null) throw new NullPointerException("graph is null")
-    this.graph.addVertex(next)
-    this.graph.addEdge(this, next, StreamConnector(this, next))
-    passOnContext[T,T2](this, next)
-  }
-
-  private def passOnContext[T1 ,T2](current: StreamProducer[T1], next: StreamProducer[T2]): Unit ={
-    next.initWith(current.graph,current.config)
-  }
-
-  /**
-   * can be set by programatically or by configuration
-   */
-  override def parallelism(parallelism : Int) : StreamProducer[T] = {
-    this.parallelismNum = parallelism
-    this
-  }
-
-  override def parallelism : Int = this.parallelismNum
-  override def stream:String = this.streamId
-
-  /**
-   * Component name
-   *
-   * @param componentName component name
-   * @return
-   */
-  override def nameAs(componentName : String) : StreamProducer[T] = {
-    this.name = componentName
-    this
-  }
-}
-
-case class FilterProducer[T](fn : T => Boolean) extends StreamProducer[T]{
-  override def toString: String = s"FilterProducer"
-}
-
-case class FlatMapProducer[T, R](var mapper: FlatMapper[R]) extends StreamProducer[R]{
-  override def toString: String = mapper.toString
-}
-
-case class MapperProducer[T,R](numOutputFields : Int, var fn : T => R) extends StreamProducer[R]{
-  override def toString: String = s"MapperProducer"
-}
-
-case class ForeachProducer[T](var fn : T => Unit) extends StreamProducer[T]
-
-abstract class GroupByProducer[T] extends StreamProducer[T]
-case class GroupByFieldProducer[T](fields : Seq[Int]) extends GroupByProducer[T]
-case class GroupByStrategyProducer[T](partitionStrategy: PartitionStrategy) extends GroupByProducer[T]
-case class GroupByKeyProducer[T](keySelectorFunc:T => Any) extends GroupByProducer[T]{
-  override def toString: String = s"GroupByKey"
-}
-
-object GroupByProducer {
-  def apply[T](fields: Seq[Int]) = new GroupByFieldProducer[T](fields)
-  def apply[T](partitionStrategy : PartitionStrategy) = new GroupByStrategyProducer[T](partitionStrategy)
-  def apply[T](keySelector:T => Any) = new GroupByKeyProducer[T](keySelector)
-}
-
-case class StreamUnionProducer[T1,T2,T3](others: Seq[StreamProducer[T2]]) extends StreamProducer[T3]
-
-case class StormSourceProducer[T](source: BaseRichSpout) extends StreamProducer[T]{
-  var numFields : Int = 0
-
-  /**
-    * rename outputfields to f0, f1, f2, ...
-   * if one spout declare some field names, those fields names will be modified
-   * @param n
-   */
-  def withOutputFields(n : Int): StormSourceProducer[T] ={
-    this.numFields = n
-    this
-  }
-}
-
-case class IterableStreamProducer[T](iterable: Iterable[T],recycle:Boolean = false) extends StreamProducer[T]{
-  override def toString: String = s"IterableStreamProducer(${iterable.getClass.getSimpleName}))"
-}
-case class IteratorStreamProducer[T](iterator: Iterator[T]) extends StreamProducer[T]{
-  override def toString: String = s"IteratorStreamProducer(${iterator.getClass.getSimpleName})"
-}
-
-case class AlertStreamProducer(var upStreamNames: util.List[String], alertExecutorId : String, var consume: Boolean=true, strategy: PartitionStrategy=null) extends StreamProducer[AlertAPIEntity] {
-  def consume(consume: Boolean): AlertStreamProducer = {
-    this.consume = consume
-    this
-  }
-}
-
-case class AggregateProducer[T](var upStreamNames: util.List[String], analyzerId : String, cepQl: String = null, strategy:PartitionStrategy = null) extends StreamProducer[T]
-
-case class PersistProducer[T](executorId :String, storageType: StorageType.StorageType) extends StreamProducer[T]
-
-object UniqueId{
-  val id : AtomicInteger = new AtomicInteger(0);
-  def incrementAndGetId() : Int = {
-    id.incrementAndGet()
-  }
-}
-
-trait KeySelector extends Serializable{
-  def key(t:Any):Any
-}
-
-case class KeySelectorWrapper[T](fn:T => Any) extends KeySelector{
-  override def key(t: Any): Any = fn(t.asInstanceOf[T])
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducerGraph.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducerGraph.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducerGraph.scala
deleted file mode 100644
index f3fcc4d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProducerGraph.scala
+++ /dev/null
@@ -1,29 +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.datastream.core
-
-trait StreamProducerGraph {
-  def addEdge(from: StreamProducer[Any], to: StreamProducer[Any], streamConnector: StreamConnector[Any,Any])
-  def addVertex(producer: StreamProducer[Any])
-  def iterator() : Iterator[StreamProducer[Any]]
-  def isSource(v : StreamProducer[Any]) : Boolean
-  def outgoingEdgesOf(v : StreamProducer[Any]) : scala.collection.mutable.Set[StreamConnector[Any,Any]]
-  def getNodeByName(name : String) : Option[StreamProducer[Any]]
-  def incomingVertexOf(v: StreamProducer[Any]) : scala.collection.mutable.Set[StreamProducer[Any]]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProtocol.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProtocol.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProtocol.scala
deleted file mode 100644
index b54b21f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamProtocol.scala
+++ /dev/null
@@ -1,193 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.apache.commons.lang3.builder.HashCodeBuilder
-import org.apache.eagle.datastream.{Collector, FlatMapper}
-import org.apache.eagle.partition.PartitionStrategy
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-/**
- * StreamInfo should be fully serializable and having not runtime type information
- */
-class StreamInfo  extends Serializable{
-  /**
-   * Processing Element Id
-   */
-  val id:Int = UniqueId.incrementAndGetId()
-
-  /**
-   * Processing Element Name
-   */
-  var name: String = null
-
-  /**
-    * Output stream id, equals to name by default
-    */
-  var streamId:String=null
-
-  var parallelismNum: Int = 1
-
-  /**
-   * Keyed input stream
-   */
-  var inKeyed:Boolean = false
-  /**
-   * Keyed output stream
-   */
-  var outKeyed:Boolean = false
-  /**
-   * Output key selector
-   */
-  var keySelector:KeySelector = null
-
-// Type Information
-// ================
-//
-//  /**
-//   * Entity class type of T
-//   */
-//  var typeClass:Class[_] = null
-//
-//  /**
-//   * Type Class Simple Name
-//   * @return
-//   */
-//  def typeClassName = if(typeClass == null) null else typeClass.getSimpleName
-//
-//  @transient private var _typeTag[_] = null
-//
-//  def typeTag[_] = {
-//    if(_typeTag == null) _typeTag = Reflections.typeTag(this.typeClass)
-//    _typeTag
-//  }
-
-  var config: Config = null
-
-  def getInfo = this
-
-  override def hashCode(): Int = new HashCodeBuilder().append(this.id).append(this.getClass).toHashCode
-}
-
-
-object StorageType extends Enumeration {
-  type StorageType = Value
-  val KAFKA, DRUID, HBASE = Value
-}
-
-/**
- * Stream interaction protocol interface
- *
- * @tparam T processed elements type
- */
-trait StreamProtocol[+T <: Any]{
-  /**
-   * Initialize the stream metadata info
-   */
-  def initWith(graph:DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]],config:Config, hook:Boolean = true):StreamProducer[T]
-
-  /**
-   * Support Java API
-   *
-   * @param flatMapper
-   * @tparam R
-   * @return
-   */
-  def flatMap[R](flatMapper:FlatMapper[R]): StreamProducer[R]
-  def flatMap[R](func:(Any,Collector[R])=>Unit): StreamProducer[R]
-
-  /**
-   *
-   * @param fn
-   * @return
-   */
-  def filter(fn : T => Boolean): StreamProducer[T]
-
-  /**
-   *
-   * @param fn
-   */
-  def foreach(fn : T => Unit) : Unit
-
-  /**
-   * Type safe mapper
-   * @param fn
-   * @tparam R
-   * @return
-   */
-  def map[R](fn : T => R): StreamProducer[R]
-
-  /**
-   * Field base mapper
-   * @param fn
-   * @tparam R
-   * @return
-   */
-  def map1[R](fn : T => R) : StreamProducer[R]
-  def map2[R](fn : T => R) : StreamProducer[R]
-  def map3[R](fn : T => R) : StreamProducer[R]
-  def map4[R](fn : T => R) : StreamProducer[R]
-
-  def groupBy(fields : Int*) : StreamProducer[T]
-  def groupBy(fields : java.util.List[Integer]) : StreamProducer[T]
-  def groupBy(strategy : PartitionStrategy) : StreamProducer[T]
-
-  /**
-   * @param keyer key selector function
-   * @return
-   */
-  def groupByKey(keyer:T => Any):StreamProducer[T]
-
-  def streamUnion[T2,T3](otherStreams : Seq[StreamProducer[T2]]) : StreamProducer[T3]
-  def alert(upStreamNames: Seq[String], alertExecutorId : String, consume: Boolean,strategy : PartitionStrategy):AlertStreamProducer
-
-  def aggregate(upStreamNames: java.util.List[String], executorId :String, strategy:PartitionStrategy): StreamProducer[T]
-
-  def aggregateDirect(upStreamNames: java.util.List[String], cql : String, strategy:PartitionStrategy): StreamProducer[T]
-
-  def persist(executorId : String, storageType: StorageType.StorageType): StreamProducer[T]
-  
-  /**
-   * Set processing element parallelism setting
-   * @param parallelismNum parallelism value
-   * @return
-   */
-  def parallelism(parallelismNum : Int) : StreamProducer[T]
-  def parallelism : Int
-  /**
-   * Set component name
-   *
-   * @param componentName
-   * @return
-   */
-  def nameAs(componentName : String) : StreamProducer[T]
-
-  /**
-   * Set stream name
-   * @param streamId stream ID
-   * @return
-   */
-  def stream(streamId: String): StreamProducer[T]
-  def stream: String
-
-  def ? (fn:T => Boolean):StreamProducer[T] = this.filter(fn)
-  def ~>[R](flatMapper : FlatMapper[R]) = this.flatMap[R](flatMapper)
-  def ! (upStreamNames: Seq[String], alertExecutorId : String, consume: Boolean = true,strategy: PartitionStrategy = null) = alert(upStreamNames, alertExecutorId, consume,strategy)
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamSourceBuilder.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamSourceBuilder.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamSourceBuilder.scala
deleted file mode 100644
index 5f3bd22..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamSourceBuilder.scala
+++ /dev/null
@@ -1,63 +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.datastream.core
-
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-
-import scala.reflect.runtime.{universe => ru}
-
-/**
- * @since  12/7/15
- */
-trait StreamSourceBuilder {
-  def config:Configuration
-
-  /**
-   * Business logic DAG
-   * @return
-   */
-  def dag:DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]
-
-  /**
-   *
-   * @param iterable top level Iterable interface
-   * @param recycle
-   * @tparam T
-   * @return
-   */
-  def from[T:ru.TypeTag](iterable: Iterable[T],recycle:Boolean = false):IterableStreamProducer[T]={
-    val p = IterableStreamProducer[T](iterable,recycle)
-    p.initWith(dag,config.get)
-    p
-  }
-
-  def from[T:ru.TypeTag](iterator: Iterator[T],recycle:Boolean):IteratorStreamProducer[T]={
-    val p = IteratorStreamProducer[T](iterator)
-    p.initWith(dag,config.get)
-    p
-  }
-
-  def from(product: Product):IteratorStreamProducer[Any]={
-    val p = IteratorStreamProducer[Any](product.productIterator)
-    p.initWith(dag,config.get)
-    p
-  }
-
-  def register[T](producer:StreamProducer[T]):Unit = {
-    producer.initWith(dag,config.get)
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamUnionExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamUnionExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamUnionExpansion.scala
deleted file mode 100644
index 351782b..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/StreamUnionExpansion.scala
+++ /dev/null
@@ -1,71 +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.datastream.core
-
-import com.typesafe.config.Config
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConversions._
-import scala.collection.mutable.ListBuffer
-
-/**
- * union operator should be expanded
- */
-case class StreamUnionExpansion(config: Config) extends StreamDAGExpansion(config){
-  val LOG = LoggerFactory.getLogger(classOf[StreamUnionExpansion])
-
-  override def expand(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]) = {
-    val iter = dag.iterator()
-    var toBeAddedEdges = new ListBuffer[StreamConnector[Any,Any]]
-    var toBeRemovedVertex = new ListBuffer[StreamProducer[Any]]
-    while(iter.hasNext) {
-      val current = iter.next()
-      dag.outgoingEdgesOf(current).foreach(edge => {
-        val child = edge.to
-        child match {
-          case StreamUnionProducer(others) => {
-            dag.outgoingEdgesOf(child).foreach(c2 => {
-              toBeAddedEdges += StreamConnector(current, c2.to, edge)
-              others.foreach(o => {
-                toBeAddedEdges += StreamConnector(o, c2.to, edge)
-              })
-            })
-            toBeRemovedVertex += child
-          }
-          case _ =>
-        }
-      })
-    }
-
-    // add back edges
-    toBeAddedEdges.foreach(e => dag.addEdge(e.from, e.to, e))
-    toBeRemovedVertex.foreach(v => dag.removeVertex(v))
-  }
-}
-
-object StreamUnionExpansion{
-  def apply()(implicit config:Config, dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any,Any]]): StreamUnionExpansion ={
-    val e = StreamUnionExpansion(config)
-    e.expand(dag)
-    e
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/AbstractStreamBolt.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/AbstractStreamBolt.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/AbstractStreamBolt.scala
deleted file mode 100644
index 64b5f0f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/AbstractStreamBolt.scala
+++ /dev/null
@@ -1,119 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.task.{OutputCollector, TopologyContext}
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichBolt
-import backtype.storm.tuple.{Fields, Tuple}
-import org.apache.eagle.datastream.core.StreamInfo
-import org.apache.eagle.datastream.utils.NameConstants
-import org.slf4j.LoggerFactory
-
-/**
- *
- * @param fieldsNum zero-fieldsNum may means something different
- * @param ack
- * @param streamInfo
- * @tparam T
- */
-abstract class AbstractStreamBolt[T](val fieldsNum:Int=1, val ack:Boolean = true)(implicit streamInfo:StreamInfo) extends BaseRichBolt{
-  private var _collector: OutputCollector = null
-  private val LOG = LoggerFactory.getLogger(classOf[AbstractStreamBolt[T]])
-
-  /**
-   * If outKeyed then
-   *  Fields = ("key","value"]
-   * elsif num > 0
-   *  Fields = ["f0","f1",..,"fn"]
-   * elsif num == 0
-   *  Fields = ["f0"]
-   * end
-   *
-   * @param declarer
-   */
-  override def declareOutputFields(declarer: OutputFieldsDeclarer): Unit = {
-    if(streamInfo.outKeyed) {
-      declarer.declare(new Fields(NameConstants.FIELD_KEY,NameConstants.FIELD_VALUE))
-    }else{
-      if(fieldsNum > 0) {
-        val fields = new util.ArrayList[String]()
-        var i: Int = 0
-        while (i < fieldsNum) {
-          fields.add(NameConstants.FIELD_PREFIX + i)
-          i += 1
-        }
-        declarer.declare(new Fields(fields))
-      }else if(fieldsNum == 0){
-        declarer.declare(new Fields(NameConstants.FIELD_PREFIX + 0))
-      }
-    }
-  }
-
-  def emit(values:util.List[AnyRef])(implicit input:Tuple){
-    if (streamInfo.outKeyed) {
-      _collector.emit(input, util.Arrays.asList(streamInfo.keySelector.key(values).asInstanceOf[AnyRef], values))
-    } else {
-      _collector.emit(input, values)
-    }
-  }
-
-  def emit(value:Any)(implicit input:Tuple){
-    if(streamInfo.outKeyed) {
-      _collector.emit(input, util.Arrays.asList(streamInfo.keySelector.key(value).asInstanceOf[AnyRef],value.asInstanceOf[AnyRef]))
-    }else{
-      _collector.emit(input,util.Arrays.asList(value.asInstanceOf[AnyRef]))
-    }
-  }
-
-  override def execute(input: Tuple): Unit = {
-    try {
-      implicit val _input = input
-      if (streamInfo.inKeyed) {
-        val key = input.getValueByField(NameConstants.FIELD_KEY)
-        val value = input.getValueByField(NameConstants.FIELD_VALUE).asInstanceOf[T]
-        onKeyValue(key, value)
-      } else {
-        onValues(input.getValues)
-      }
-      if(ack) _collector.ack(input)
-    }catch {
-      case t: Throwable => {
-        LOG.error(s"Got exception when processing $input",t)
-        _collector.fail(input)
-      }
-    }
-  }
-
-  /**
-   * Handle keyed stream value
-   */
-  def onKeyValue(key:Any,value:T)(implicit input:Tuple)
-
-  /**
-   * Handle general stream values list
-   *
-   * @param values
-   */
-  def onValues(values:util.List[AnyRef])(implicit input:Tuple)
-
-  override def prepare(stormConf: util.Map[_, _], context: TopologyContext, collector: OutputCollector): Unit = {
-    _collector = collector
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/FilterBoltWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/FilterBoltWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/FilterBoltWrapper.scala
deleted file mode 100644
index b175b41..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/FilterBoltWrapper.scala
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream.storm
-
-import java.util
-
-import backtype.storm.tuple.Tuple
-import org.apache.eagle.datastream.core.StreamInfo
-
-case class FilterBoltWrapper(fn:Any => Boolean)(implicit info:StreamInfo) extends AbstractStreamBolt[Any](fieldsNum = 1){
-  /**
-   * Handle keyed stream value
-   */
-  override def onKeyValue(key: Any, value: Any)(implicit input:Tuple): Unit = {
-    if(fn(value)) emit(value)
-  }
-
-  /**
-   * Handle general stream values list
-   *
-   * @param values
-   */
-  override def onValues(values: util.List[AnyRef])(implicit input:Tuple): Unit = {
-    val value = values.get(0)
-    if(fn(value)) emit(value)
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/ForeachBoltWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/ForeachBoltWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/ForeachBoltWrapper.scala
deleted file mode 100644
index 4c105b2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/ForeachBoltWrapper.scala
+++ /dev/null
@@ -1,44 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.tuple.Tuple
-import org.apache.eagle.datastream.core.StreamInfo
-
-/**
- * @since  12/6/15
- */
-case class ForeachBoltWrapper(fn:Any=>Unit)(implicit info:StreamInfo) extends AbstractStreamBolt[Any]  {
-  /**
-   * Handle keyed stream value
-   * @param value
-   */
-  override def onKeyValue(key:Any,value: Any)(implicit input:Tuple): Unit = {
-    fn(value)
-  }
-
-  /**
-   * Handle non-keyed stream values list
-   *
-   * @param values
-   */
-  override def onValues(values: util.List[AnyRef])(implicit input:Tuple): Unit = {
-    fn(values)
-  }
-}
\ No newline at end of file



[40/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParser.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParser.java
deleted file mode 100644
index d0f3ae9..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParser.java
+++ /dev/null
@@ -1,26 +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.jobrunning.counter.parser;
-
-import java.util.Map;
-
-import org.jsoup.nodes.Document;
-
-public interface JobCountersParser {
-	
-	Map<String, Long> parse(Document doc);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParserImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParserImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParserImpl.java
deleted file mode 100644
index f098c54..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/counter/parser/JobCountersParserImpl.java
+++ /dev/null
@@ -1,44 +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.jobrunning.counter.parser;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.jsoup.select.Elements;
-
-public class JobCountersParserImpl implements JobCountersParser {
-
-	@Override
-	public Map<String, Long> parse(Document doc) {
-		Elements elements = doc.select("a[href*=singlejobcounter]");
-		Iterator<Element> iter = elements.iterator();
-		Map<String, Long> counters = new HashMap<String, Long>();
-		while(iter.hasNext()) {
-			Element element = iter.next().parent();
-			String metricName = element.text();
-			long metricValue = Long.parseLong(element.nextElementSibling()
-								   .nextElementSibling().nextElementSibling().text()
-								    .replace(",", "").trim());
-			counters.put(metricName, metricValue);
-		}
-		return counters;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ConfigWorkTask.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ConfigWorkTask.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ConfigWorkTask.java
deleted file mode 100644
index d9cf79c..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ConfigWorkTask.java
+++ /dev/null
@@ -1,66 +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.jobrunning.crawler;
-
-import java.util.List;
-
-import org.apache.eagle.jobrunning.util.JobUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.jobrunning.callback.RunningJobCallback;
-import org.apache.eagle.jobrunning.common.JobConstants.ResourceType;
-
-public class ConfigWorkTask implements Runnable {
-	
-	public JobContext context;
-	public ResourceFetcher fetcher;
-	public RunningJobCallback callback;
-	public RunningJobCrawler crawler;	
-	
-	private static final Logger LOG = LoggerFactory.getLogger(ConfigWorkTask.class);
-
-	public ConfigWorkTask(JobContext context, ResourceFetcher fetcher, RunningJobCallback callback, RunningJobCrawler crawler) {
-		this.context = context;
-		this.fetcher = fetcher;
-		this.callback = callback;
-		this.crawler = crawler;
-	}
-	
-	public void run() {
-		runConfigCrawlerWorkhread(context);
-	}
-
-	private void runConfigCrawlerWorkhread(JobContext context) {
-		LOG.info("Going to fetch job configuration information, jobId:" + context.jobId);
-		try {
-			List<Object> objs = fetcher.getResource(ResourceType.JOB_CONFIGURATION, JobUtils.getAppIDByJobID(context.jobId));
-			callback.onJobRunningInformation(context, ResourceType.JOB_CONFIGURATION, objs);
-		}
-		catch (Exception ex) {
-	        if (ex.getMessage().contains("Server returned HTTP response code: 500")) {
-	        	LOG.warn("The server returns 500 error, it's probably caused by job ACL setting, going to skip this job");
-	        	// the job remains in processing list, thus we will not do infructuous retry next round
-	        	// TODO need remove it from processing list when job finished to avoid memory leak       
-	        }
-	        else {
-	        	LOG.warn("Got an exception when fetching job config: ", ex);
-	        	crawler.removeFromProcessingList(ResourceType.JOB_CONFIGURATION, context);
-	        }
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/JobContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/JobContext.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/JobContext.java
deleted file mode 100644
index 7599457..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/JobContext.java
+++ /dev/null
@@ -1,55 +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.jobrunning.crawler;
-
-public class JobContext {
-	public String jobId;
-	public String user;
-	public Long fetchedTime;
-	
-	public JobContext() {
-		
-	}
-	
-	public JobContext(JobContext context) {
-		this.jobId = new String(context.jobId);
-		this.user = new String(context.user);
-		this.fetchedTime = new Long(context.fetchedTime);
-	}
-	
-	public JobContext(String jobId, String user, Long fetchedTime) {
-		this.jobId = jobId;
-		this.user = user;
-		this.fetchedTime = fetchedTime;
-	}
-	
-	@Override
-	public int hashCode() {	
-		return jobId.hashCode() ;
-	}			
-	
-	@Override
-	public boolean equals(Object obj) {
-		if (obj instanceof JobContext) {
-			JobContext context = (JobContext)obj;
-			if (this.jobId.equals(context.jobId)) {
-				return true;
-			}
-		}
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RMResourceFetcher.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RMResourceFetcher.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RMResourceFetcher.java
deleted file mode 100644
index 7c41431..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RMResourceFetcher.java
+++ /dev/null
@@ -1,272 +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.jobrunning.crawler;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URLConnection;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipException;
-
-import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig;
-import org.apache.eagle.jobrunning.counter.parser.JobCountersParser;
-import org.apache.eagle.jobrunning.counter.parser.JobCountersParserImpl;
-import org.apache.eagle.jobrunning.ha.HAURLSelector;
-import org.apache.eagle.jobrunning.ha.HAURLSelectorImpl;
-import org.apache.eagle.jobrunning.job.conf.JobConfParser;
-import org.apache.eagle.jobrunning.job.conf.JobConfParserImpl;
-import org.apache.eagle.jobrunning.util.InputStreamUtils;
-import org.apache.eagle.jobrunning.util.JobUtils;
-import org.apache.eagle.jobrunning.util.URLConnectionUtils;
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.yarn.model.AppWrapper;
-import org.apache.eagle.jobrunning.yarn.model.JobCompleteWrapper;
-import org.apache.eagle.jobrunning.yarn.model.JobCountersWrapper;
-import org.apache.eagle.jobrunning.yarn.model.JobsWrapper;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.jobrunning.url.JobCompleteCounterServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobCompleteDetailServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobCompletedConfigServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobCountersServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobDetailServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobListServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobRunningConfigServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.JobStatusServiceURLBuilderImpl;
-import org.apache.eagle.jobrunning.url.ServiceURLBuilder;
-import org.apache.eagle.jobrunning.yarn.model.AppInfo;
-import org.apache.eagle.jobrunning.yarn.model.AppsWrapper;
-import org.apache.eagle.jobrunning.yarn.model.JobDetailInfo;
-
-public class RMResourceFetcher implements ResourceFetcher{
-	
-	private static final Logger LOG = LoggerFactory.getLogger(RMResourceFetcher.class);
-	private final HAURLSelector selector;
-	private final String historyBaseUrl;
-	private final ServiceURLBuilder jobListServiceURLBuilder;
-	private final ServiceURLBuilder jobDetailServiceURLBuilder;
-	private final ServiceURLBuilder jobCounterServiceURLBuilder;
-	private final ServiceURLBuilder jobRunningConfigServiceURLBuilder;
-	private final ServiceURLBuilder jobCompleteDetailServiceURLBuilder;
-	private final ServiceURLBuilder jobCompleteCounterServiceURLBuilder;
-	private final ServiceURLBuilder jobCompletedConfigServiceURLBuilder;
-	private final ServiceURLBuilder jobStatusServiceURLBuilder;
-		
-	private static final int CONNECTION_TIMEOUT = 10000;
-	private static final int READ_TIMEOUT = 10000;
-	private static final String XML_HTTP_HEADER = "Accept";
-	private static final String XML_FORMAT = "application/xml";
-	
-	private static final ObjectMapper OBJ_MAPPER = new ObjectMapper();
-	
-	static {
-		OBJ_MAPPER.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true);
-	}
-	
-	public RMResourceFetcher(RunningJobCrawlConfig.RunningJobEndpointConfig config) {
-		this.jobListServiceURLBuilder = new JobListServiceURLBuilderImpl();
-		this.jobDetailServiceURLBuilder = new JobDetailServiceURLBuilderImpl();
-		this.jobCounterServiceURLBuilder = new JobCountersServiceURLBuilderImpl();
-		this.jobRunningConfigServiceURLBuilder = new JobRunningConfigServiceURLBuilderImpl();
-		this.jobCompleteDetailServiceURLBuilder = new JobCompleteDetailServiceURLBuilderImpl();
-		this.jobCompleteCounterServiceURLBuilder = new JobCompleteCounterServiceURLBuilderImpl();
-		this.jobCompletedConfigServiceURLBuilder = new JobCompletedConfigServiceURLBuilderImpl();
-		this.jobStatusServiceURLBuilder = new JobStatusServiceURLBuilderImpl();
-
-		this.selector = new HAURLSelectorImpl(config.RMBasePaths, jobListServiceURLBuilder, JobConstants.CompressionType.GZIP);
-		this.historyBaseUrl = config.HSBasePath;
-	}
-	
-	private void checkUrl() throws IOException {
-		if (!selector.checkUrl(jobListServiceURLBuilder.build(selector.getSelectedUrl(), JobConstants.JobState.RUNNING.name()))) {
-			selector.reSelectUrl();
-		}
-	}
-	
-	private List<Object> doFetchApplicationsList(String state) throws Exception {		
-		List<AppInfo> result = null;
-		InputStream is = null;
-		try {
-			checkUrl();
-			final String urlString = jobListServiceURLBuilder.build(selector.getSelectedUrl(), state);
-			LOG.info("Going to call yarn api to fetch running job list: " + urlString);
-			is = InputStreamUtils.getInputStream(urlString, JobConstants.CompressionType.GZIP);
-			final AppsWrapper appWrapper = OBJ_MAPPER.readValue(is, AppsWrapper.class);
-			if (appWrapper != null && appWrapper.getApps() != null
-					&& appWrapper.getApps().getApp() != null) {
-				result = appWrapper.getApps().getApp();
-				return Arrays.asList((Object)result);
-			}
-			return null;
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){} }
-		}
-	}
-	
-	private List<Object> doFetchRunningJobInfo(String appID) throws Exception{
-		InputStream is = null;
-		InputStream is2 = null;
-		try {
-			final String urlString = jobDetailServiceURLBuilder.build(selector.getSelectedUrl(), appID);
-			LOG.info("Going to fetch job detail information for " + appID + " , url: " + urlString);
-			try {
-				is = InputStreamUtils.getInputStream(urlString, JobConstants.CompressionType.GZIP);
-			}
-			catch (ZipException ex) {
-				// Here if job already completed, it will be redirected to job history page and throw java.util.zip.ZipException
-				LOG.info(appID + " has finished, skip this job");
-				return null;
-			}
-			final JobsWrapper jobWrapper = OBJ_MAPPER.readValue(is, JobsWrapper.class);
-			JobDetailInfo jobDetail = null;
-			if (jobWrapper != null && jobWrapper.getJobs() != null && jobWrapper.getJobs().getJob() != null
-				&& jobWrapper.getJobs().getJob().size() > 0) {
-				jobDetail = jobWrapper.getJobs().getJob().get(0);
-			}
-			final String urlString2 = jobCounterServiceURLBuilder.build(selector.getSelectedUrl(), appID);
-			LOG.info("Going to fetch job counters for application " + appID + " , url: " + urlString2);
-			is2 = InputStreamUtils.getInputStream(urlString2, JobConstants.CompressionType.GZIP);
-			final JobCountersWrapper jobCounterWrapper = OBJ_MAPPER.readValue(is2,JobCountersWrapper.class);
-			
-			return Arrays.asList(jobDetail, jobCounterWrapper);
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){} }
-			if (is2 != null) { try {is2.close();} catch (Exception e){} }
-		}
-	}
-	
-	private List<Object> doFetchCompleteJobInfo(String appId) throws Exception{
-		InputStream is = null;
-		InputStream is2 = null;
-		try {
-			checkUrl();
-			String jobID = JobUtils.getJobIDByAppID(appId);
-			String urlString = jobCompleteDetailServiceURLBuilder.build(selector.getSelectedUrl(), jobID);
-			LOG.info("Going to fetch job completed information for " + jobID + " , url: " + urlString);
-			is = InputStreamUtils.getInputStream(urlString, JobConstants.CompressionType.GZIP);
-			final JobCompleteWrapper jobWrapper = OBJ_MAPPER.readValue(is, JobCompleteWrapper.class);
-			
-			String urlString2 = jobCompleteCounterServiceURLBuilder.build(historyBaseUrl, jobID);
-			LOG.info("Going to fetch job completed counters for " + jobID + " , url: " + urlString2);
-			is2 = InputStreamUtils.getInputStream(urlString2, JobConstants.CompressionType.NONE, (int) (2 * DateUtils.MILLIS_PER_MINUTE));
-			final Document doc = Jsoup.parse(is2, StandardCharsets.UTF_8.name(), urlString2);
-			JobCountersParser parser = new JobCountersParserImpl();
-			Map<String, Long> counters = parser.parse(doc);
-			return Arrays.asList(jobWrapper, counters);
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){}  }
-			if (is2 != null) { try {is2.close();} catch (Exception e){}  }
-		}
-	}
-	
-	private List<Object> doFetchRunningJobConfiguration(String appID) throws Exception {
-		InputStream is = null;
-		try {
-			checkUrl();
-			String jobID = JobUtils.getJobIDByAppID(appID);
-			String urlString = jobRunningConfigServiceURLBuilder.build(selector.getSelectedUrl(), jobID);
-			LOG.info("Going to fetch job completed information for " + jobID + " , url: " + urlString);
-			final URLConnection connection = URLConnectionUtils.getConnection(urlString);
-			connection.setRequestProperty(XML_HTTP_HEADER, XML_FORMAT);
-			connection.setConnectTimeout(CONNECTION_TIMEOUT);
-			connection.setReadTimeout(READ_TIMEOUT);
-			is = connection.getInputStream();
-			Map<String, String> configs = XmlHelper.getConfigs(is);
-			return Arrays.asList((Object)configs);
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){}  }
-		}
-	}
-	
-	private List<Object> doFetchCompletedJobConfiguration(String appID) throws Exception {
-		InputStream is = null;
-		try {
-			String urlString = jobCompletedConfigServiceURLBuilder.build(historyBaseUrl, JobUtils.getJobIDByAppID(appID));
-			is = InputStreamUtils.getInputStream(urlString, JobConstants.CompressionType.NONE);
-			final Document doc = Jsoup.parse(is, "UTF-8", urlString);
-			JobConfParser parser = new JobConfParserImpl();
-			Map<String, String> configs = parser.parse(doc);
-			return Arrays.asList((Object)configs);
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){}  }
-		}
-	}
-	
-	public boolean checkIfJobIsRunning(String appID) throws Exception{
-		InputStream is = null;
-		try {
-			checkUrl();
-			final String urlString = jobStatusServiceURLBuilder.build(selector.getSelectedUrl(), appID);
-			LOG.info("Going to call yarn api to fetch job status: " + urlString);
-			is = InputStreamUtils.getInputStream(urlString, JobConstants.CompressionType.GZIP);
-			final AppWrapper appWrapper = OBJ_MAPPER.readValue(is, AppWrapper.class);
-			if (appWrapper != null && appWrapper.getApp() != null) {
-				AppInfo result = appWrapper.getApp();
-				if (result.getState().equals(JobConstants.JOB_STATE_RUNNING)) {
-					return true;
-				}
-				return false;
-			}
-			else {
-				LOG.error("The status of " + appID + " is not available");
-				throw new IllegalStateException("The status of " + appID + " is not available");
-			}
-		}
-		finally {
-			if (is != null) { try {is.close();} catch (Exception e){}  }
-		}
-	}
-	
-	public List<Object> getResource(JobConstants.ResourceType resoureType, Object... parameter) throws Exception{
-		switch(resoureType) {
-			case JOB_LIST:
-				return doFetchApplicationsList((String)parameter[0]);
-			case JOB_RUNNING_INFO:
-				//parameter[0]= appId
-				return doFetchRunningJobInfo((String)parameter[0]);
-			case JOB_COMPLETE_INFO:
-				//parameter[0]= appId
-				return doFetchCompleteJobInfo((String)parameter[0]);
-			case JOB_CONFIGURATION:
-				//parameter[0]= appId
-				boolean isRunning = checkIfJobIsRunning((String)parameter[0]);
-				if (isRunning)
-					return doFetchRunningJobConfiguration((String)parameter[0]);
-				else
-					return doFetchCompletedJobConfiguration((String)parameter[0]); 
-			default:
-				throw new Exception("Not support ressourceType :" + resoureType);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ResourceFetcher.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ResourceFetcher.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ResourceFetcher.java
deleted file mode 100644
index 5a5150b..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/ResourceFetcher.java
+++ /dev/null
@@ -1,27 +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.jobrunning.crawler;
-
-import java.util.List;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public interface ResourceFetcher {
-
-	List<Object> getResource(JobConstants.ResourceType resoureType, Object... parameter) throws Exception;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawler.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawler.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawler.java
deleted file mode 100644
index 103a2ff..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawler.java
+++ /dev/null
@@ -1,28 +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.jobrunning.crawler;
-
-import org.apache.eagle.jobrunning.common.JobConstants.ResourceType;
-
-public interface RunningJobCrawler {
-	
-	public void crawl() throws Exception;
-	
-	public void addIntoProcessingList(ResourceType type, JobContext context);
-	
-	public void removeFromProcessingList(ResourceType type, JobContext context);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawlerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawlerImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawlerImpl.java
deleted file mode 100644
index 72a340a..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/RunningJobCrawlerImpl.java
+++ /dev/null
@@ -1,352 +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.jobrunning.crawler;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.ReadWriteLock;
-
-import org.apache.eagle.jobrunning.zkres.JobRunningZKStateManager;
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.job.JobFilter;
-import org.apache.eagle.jobrunning.callback.RunningJobCallback;
-import org.apache.eagle.jobrunning.common.JobConstants.JobState;
-import org.apache.eagle.jobrunning.common.JobConstants.ResourceType;
-import org.apache.eagle.jobrunning.common.JobConstants.YarnApplicationType;
-import org.apache.eagle.jobrunning.util.JobUtils;
-import org.apache.eagle.jobrunning.yarn.model.AppInfo;
-import org.apache.eagle.common.DateTimeUtil;
-
-public class RunningJobCrawlerImpl implements RunningJobCrawler{
-
-	protected RunningJobCrawlConfig.RunningJobEndpointConfig endpointConfig;
-	protected RunningJobCrawlConfig.ControlConfig controlConfig;
-	protected JobFilter jobFilter;
-	private ResourceFetcher fetcher;
-	private JobRunningZKStateManager zkStateManager;
-	private Thread jobConfigProcessThread;
-	private Thread jobCompleteInfoProcessThread;
-	private Thread jobCompleteStatusCheckerThread;
-	private Thread zkCleanupThread;
-	private final RunningJobCallback callback;
-	private ReadWriteLock readWriteLock;
-	private Map<ResourceType, Map<String, JobContext>> processingJobMap = new ConcurrentHashMap<ResourceType, Map<String, JobContext>>();
-	
-	private BlockingQueue<JobContext> queueOfConfig;
-	private BlockingQueue<JobContext> queueOfCompleteJobInfo;
-	private static final int DEFAULT_CONFIG_THREAD_COUNT = 20;
-	private final long DELAY_TO_UPDATE_COMPLETION_JOB_INFO = 5 * DateUtils.MILLIS_PER_MINUTE;
-	private static final Logger LOG = LoggerFactory.getLogger(RunningJobCrawlerImpl.class);
-	
-	private static final ObjectMapper OBJ_MAPPER = new ObjectMapper();
-
-	static {
-		OBJ_MAPPER.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true);
-	}
-	
-	public RunningJobCrawlerImpl(RunningJobCrawlConfig config, JobRunningZKStateManager zkStateManager, 
-			RunningJobCallback callback, JobFilter jobFilter, ReadWriteLock readWriteLock) {
-		this.endpointConfig = config.endPointConfig;
-		this.controlConfig = config.controlConfig;
-		this.callback = callback;
-		this.fetcher = new RMResourceFetcher(endpointConfig);
-		this.jobFilter = jobFilter;
-		this.readWriteLock = readWriteLock;
-		if (config.controlConfig.jobInfoEnabled) {
-			jobCompleteInfoProcessThread = new Thread() {
-				@Override
-				public void run() {
-					startCompleteJobInfoProcessThread();
-				}
-			};
-			jobCompleteInfoProcessThread.setName("JobCompleteInfo-process-thread");
-			jobCompleteInfoProcessThread.setDaemon(true);
-			
-			jobCompleteStatusCheckerThread = new Thread() {
-				@Override
-				public void run() {
-					startCompleteStatusCheckerThread();
-				}
-			};
-			jobCompleteStatusCheckerThread.setName("JobComplete-statusChecker-thread");
-			jobCompleteStatusCheckerThread.setDaemon(true);
-		}
-
-		if (config.controlConfig.jobConfigEnabled) {
-			jobConfigProcessThread = new Thread() {
-				@Override
-				public void run() {
-					startJobConfigProcessThread();
-				}
-			};
-			jobConfigProcessThread.setName("JobConfig-process-thread");
-			jobConfigProcessThread.setDaemon(true);
-		}
-				
-		zkCleanupThread = new Thread() {
-			@Override
-			public void run() {
-				startzkCleanupThread();
-			}
-		};		
-		zkCleanupThread.setName("zk-cleanup-thread");
-		zkCleanupThread.setDaemon(true);
-		
-		this.zkStateManager = zkStateManager;
-		this.processingJobMap.put(ResourceType.JOB_CONFIGURATION, new ConcurrentHashMap<String, JobContext>());
-		this.processingJobMap.put(ResourceType.JOB_COMPLETE_INFO, new ConcurrentHashMap<String, JobContext>());
-		this.queueOfConfig = new ArrayBlockingQueue<JobContext>(controlConfig.sizeOfJobConfigQueue);
-		this.queueOfCompleteJobInfo = new ArrayBlockingQueue<JobContext>(controlConfig.sizeOfJobCompletedInfoQueue);
-	}
-	
-	private void startJobConfigProcessThread() {
-		int configThreadCount = DEFAULT_CONFIG_THREAD_COUNT;
-		LOG.info("Job Config crawler main thread started, pool size: " + DEFAULT_CONFIG_THREAD_COUNT);
-
-    	ThreadFactory factory = new ThreadFactory() {
-			private final AtomicInteger count = new AtomicInteger(0);
-
-			public Thread newThread(Runnable runnable) {
-				count.incrementAndGet();
-				Thread thread = Executors.defaultThreadFactory().newThread(runnable);
-				thread.setName("config-crawler-workthread-" + count.get());
-				return thread;
-			}
-		};
-		
-		ThreadPoolExecutor pool = new ThreadPoolExecutor(configThreadCount, configThreadCount, 0L,
-									  TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), factory);
-		
-		while (true) {
-			JobContext context;
-			try {
-				context = queueOfConfig.take();
-				LOG.info("queueOfConfig size: " + queueOfConfig.size());
-				Runnable configCrawlerThread = new ConfigWorkTask(new JobContext(context), fetcher, callback, this);
-				pool.execute(configCrawlerThread);
-			} catch (InterruptedException e) {
-				LOG.warn("Got an InterruptedException: " + e.getMessage());
-			} catch (RejectedExecutionException e2) {
-				LOG.warn("Got RejectedExecutionException: " + e2.getMessage());
-			}
-			catch (Throwable t) {
-				LOG.warn("Got an throwable t, " + t.getMessage());
-			}
-		}
-	}
-	
-	private void startCompleteJobInfoProcessThread() {
-		while(true) {
-			JobContext context = null;
-			try {
-				context = queueOfCompleteJobInfo.take();
-			} catch (InterruptedException ex) {
-			}
-			/** Delay an interval before fetch job complete info, for history url need some time to be accessible,
-			 *  The default interval is set as 5 min,
-			 *  Also need to consider if need multi thread to do this
-			 */
-			while (System.currentTimeMillis() < 
-			      context.fetchedTime + DELAY_TO_UPDATE_COMPLETION_JOB_INFO) {
-				try {
-					Thread.sleep(50);
-				} catch (InterruptedException e1) {
-				}
-			}
-			try {
-				List<Object> objs = fetcher.getResource(ResourceType.JOB_COMPLETE_INFO, JobUtils.getAppIDByJobID(context.jobId));
-				callback.onJobRunningInformation(context, ResourceType.JOB_COMPLETE_INFO, objs);
-			}
-			catch(Exception ex) {
-		        if (ex.getMessage().contains("Server returned HTTP response code: 500")) {
-		        	LOG.warn("The server returns 500 error, it's probably caused by job ACL setting, going to skip this job");
-		        	// the job remains in processing list, thus we will not do infructuous retry next round
-		        	// TODO need remove it from processing list when job finished to avoid memory leak 
-		        }
-		        else LOG.error("Got an exception when fetching resource ", ex);
-			}
-		}
-	}
-	
-	public void startCompleteStatusCheckerThread() {
-		while(true) {
-			List<Object> list;
-			try {
-				list = fetcher.getResource(ResourceType.JOB_LIST, JobState.COMPLETED.name());
-				if (list == null) {
-					LOG.warn("Current Completed Job List is Empty");
-					continue;
-				}
-				@SuppressWarnings("unchecked")
-				List<AppInfo> apps = (List<AppInfo>)list.get(0);
-				Set<JobContext> completedJobSet = new HashSet<JobContext>();
-				for (AppInfo app : apps) {
-					//Only fetch MapReduce job
-					if (!YarnApplicationType.MAPREDUCE.name().equals(app.getApplicationType()) 
-					|| !jobFilter.accept(app.getUser())) {
-						continue;
-					}
-					if (System.currentTimeMillis() - app.getFinishedTime() < controlConfig.completedJobOutofDateTimeInMin * DateUtils.MILLIS_PER_MINUTE) {
-						completedJobSet.add(new JobContext(JobUtils.getJobIDByAppID(app.getId()),app.getUser(), System.currentTimeMillis()));
-					}
-				}
-				
-				if (controlConfig.jobConfigEnabled) {
-					addIntoProcessingQueueAndList(completedJobSet, queueOfConfig, ResourceType.JOB_CONFIGURATION);
-				}
-
-				if (controlConfig.jobInfoEnabled) {
-					addIntoProcessingQueueAndList(completedJobSet, queueOfCompleteJobInfo, ResourceType.JOB_COMPLETE_INFO);
-				}
-				Thread.sleep(20 * 1000);
-			} catch (Throwable t) {
-				LOG.error("Got a throwable in fetching job completed list :", t);
-			}						
-		}
-	}
-	
-	public void startzkCleanupThread() {
-		LOG.info("zk cleanup thread started");
-		while(true) {
-			try {
-				long thresholdTime = System.currentTimeMillis() - controlConfig.zkCleanupTimeInday * DateUtils.MILLIS_PER_DAY; 
-				String date = DateTimeUtil.format(thresholdTime, "yyyyMMdd");
-				zkStateManager.truncateJobBefore(ResourceType.JOB_CONFIGURATION, date);
-				zkStateManager.truncateJobBefore(ResourceType.JOB_COMPLETE_INFO, date);
-				Thread.sleep(30 * 60 * 1000);
-			}
-			catch (Throwable t) {
-				LOG.warn("Got an throwable, t: ", t);
-			}
-		}
-	}
-	
-	public void addIntoProcessingQueueAndList(Set<JobContext> jobSet, BlockingQueue<JobContext> queue, ResourceType type) {
-		try {
-			readWriteLock.writeLock().lock();
-			LOG.info("Write lock acquired");
-			List<String> processingList = zkStateManager.readProcessedJobs(type);
-			processingList.addAll(extractJobList(type));
-			for (JobContext context: jobSet) {
-				String jobId = context.jobId;
-				if (!processingList.contains(jobId)) {
-					addIntoProcessingList(type, context);
-					queue.add(context);
-				}
-			}
-		}
-		finally {
-			try {readWriteLock.writeLock().unlock(); LOG.info("Write lock released");}
-			catch (Throwable t) { LOG.error("Fail to release Write lock", t);}
-		}
-	}
-	
-	private List<String> extractJobList(ResourceType type) {
-		Map<String, JobContext> contexts = processingJobMap.get(type);
-		return Arrays.asList(contexts.keySet().toArray(new String[0]));
-	}
-	
-	@Override
-	public void crawl() throws Exception {
-		// bring up crawler threads when crawl method is invoked first time
-		if (jobConfigProcessThread != null && !jobConfigProcessThread.isAlive()) {
-			jobConfigProcessThread.start();
-		}
-		
-		if (jobCompleteInfoProcessThread != null && !jobCompleteInfoProcessThread.isAlive()) {
-			jobCompleteInfoProcessThread.start();
-		}		
- 
-		if (jobCompleteStatusCheckerThread != null && !jobCompleteStatusCheckerThread.isAlive()) {
-			jobCompleteStatusCheckerThread.start();
-		}
-		
-		if (!zkCleanupThread.isAlive()) {
-			zkCleanupThread.start();
-		}
-		
-		List<Object> list = fetcher.getResource(ResourceType.JOB_LIST, JobState.RUNNING.name());		
-		if (list == null) {
-			LOG.warn("Current Running Job List is Empty");
-			return;
-		}
-		
-		@SuppressWarnings("unchecked")
-		List<AppInfo> apps = (List<AppInfo>)list.get(0);
-		LOG.info("Current Running Job List size : " + apps.size());
-		Set<JobContext> currentRunningJobSet = new HashSet<JobContext>();
-		for (AppInfo app : apps) {
-			//Only fetch MapReduce job
-			if (!YarnApplicationType.MAPREDUCE.name().equals(app.getApplicationType()) 
-			|| !jobFilter.accept(app.getUser())) {
-				continue;
-			}
-			currentRunningJobSet.add(new JobContext(JobUtils.getJobIDByAppID(app.getId()), app.getUser(), System.currentTimeMillis()));
-		}
-		
-		if (controlConfig.jobConfigEnabled) {
-			addIntoProcessingQueueAndList(currentRunningJobSet, queueOfConfig, ResourceType.JOB_CONFIGURATION);
-		}
-		
-		if (controlConfig.jobInfoEnabled) {			
-			// fetch job detail & jobcounters	
-			for (JobContext context : currentRunningJobSet) {
-				try {
-					List<Object> objs = fetcher.getResource(ResourceType.JOB_RUNNING_INFO, JobUtils.getAppIDByJobID(context.jobId));
-					callback.onJobRunningInformation(context, ResourceType.JOB_RUNNING_INFO, objs);
-				}
-				catch (Exception ex) {
-			        if (ex.getMessage().contains("Server returned HTTP response code: 500")) {
-			        	LOG.warn("The server returns 500 error, it's probably caused by job ACL setting, going to skip this job");
-			        	// the job remains in processing list, thus we will not do infructuous retry next round
-			        	// TODO need remove it from processing list when job finished to avoid memory leak 
-			        }
-			        else LOG.error("Got an exception when fetching resource, jobId: " + context.jobId , ex);
-				}
-			}
-		}		
-	}
-
-	@Override
-	public void addIntoProcessingList(ResourceType type, JobContext context) {
-		processingJobMap.get(type).put(context.jobId, context);
-	}
-
-	@Override
-	public void removeFromProcessingList(ResourceType type, JobContext context) {
-		processingJobMap.get(type).remove(context.jobId);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/XmlHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/XmlHelper.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/XmlHelper.java
deleted file mode 100644
index 9814f5b..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/crawler/XmlHelper.java
+++ /dev/null
@@ -1,55 +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.jobrunning.crawler;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-public class XmlHelper {
-	
-	public static Map<String, String> getConfigs(InputStream is) throws IOException, SAXException, ParserConfigurationException
-	{		
-		DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-		DocumentBuilder db = dbf.newDocumentBuilder();
-		
-		Document dt = db.parse(is);
-		Element element = dt.getDocumentElement();
-		Map<String, String> config = new TreeMap<String, String>();
-				
-		NodeList propertyList = element.getElementsByTagName("property");
-		int length = propertyList.getLength();
-		for(int i = 0; i < length; i++) {
-			Node property = propertyList.item(i);
-			String key = property.getChildNodes().item(0).getTextContent();
-			String value = property.getChildNodes().item(1).getTextContent();
-			config.put(key, value);
-		}
-		return config;		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelector.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelector.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelector.java
deleted file mode 100644
index 2219868..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelector.java
+++ /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.
- */
-package org.apache.eagle.jobrunning.ha;
-
-import java.io.IOException;
-
-/**
- * @since Aug 21, 2014
- */
-public interface HAURLSelector {
-	
-	boolean checkUrl(String url);
-		
-	void reSelectUrl() throws IOException;
-	
-	String getSelectedUrl();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelectorImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelectorImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelectorImpl.java
deleted file mode 100644
index 21a81ed..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/ha/HAURLSelectorImpl.java
+++ /dev/null
@@ -1,101 +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.jobrunning.ha;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-import org.apache.eagle.jobrunning.url.ServiceURLBuilder;
-import org.apache.eagle.jobrunning.util.InputStreamUtils;
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.hadoop.util.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class HAURLSelectorImpl implements HAURLSelector {
-
-	private final String[] urls;
-	private volatile String selectedUrl;
-	private final ServiceURLBuilder builder;
-	
-	private volatile boolean reselectInProgress;
-	private final JobConstants.CompressionType compressionType;
-	private static final long MAX_RETRY_TIME = 3;
-	private static final Logger LOG = LoggerFactory.getLogger(HAURLSelectorImpl.class);
-	
-	public HAURLSelectorImpl(String[] urls, ServiceURLBuilder builder, JobConstants.CompressionType compressionType) {
-		this.urls = urls;
-		this.compressionType = compressionType;
-		this.builder = builder;
-	}
-	
-	public boolean checkUrl(String urlString) {
-		InputStream is = null;
-		try {
-			is = InputStreamUtils.getInputStream(urlString, compressionType);
-		}
-		catch (Exception ex) {
-			LOG.info("get inputstream from url: " + urlString + " failed. ");
-			return false;
-		}
-		finally {
-			if (is != null) { try {	is.close(); } catch (IOException e) {/*Do nothing*/} }
-		}
-		return true;
-	}
-
-	@Override
-	public String getSelectedUrl() {
-		if (selectedUrl == null) {
-			selectedUrl = urls[0];
-		}
-		return selectedUrl;
-	}
-	
-	@Override
-	public void reSelectUrl() throws IOException {
-		if (reselectInProgress) return;
-		synchronized(this) {
-			if (reselectInProgress) return;
-			reselectInProgress = true;
-			try {
-				LOG.info("Going to reselect url");
-				for (int i = 0; i < urls.length; i++) {		
-					String urlToCheck = urls[i];
-					LOG.info("Going to try url :" + urlToCheck);
-					for (int time = 0; time < MAX_RETRY_TIME; time++) {
-						if (checkUrl(builder.build(urlToCheck, JobConstants.JobState.RUNNING.name()))) {
-							selectedUrl = urls[i];
-							LOG.info("Successfully switch to new url : " + selectedUrl);
-							return;
-						}
-						LOG.info("try url " + urlToCheck + "fail for " + (time+1) + " times, sleep 5 seconds before try again. ");
-						try {
-							Thread.sleep(5 * 1000);
-						}
-						catch (InterruptedException ex) { /* Do Nothing */}
-					}
-				}
-				throw new IOException("No alive url found: "+ StringUtils.join(";", Arrays.asList(this.urls)));
-			}
-			finally {
-				reselectInProgress = false;
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParser.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParser.java
deleted file mode 100644
index 112b73d..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParser.java
+++ /dev/null
@@ -1,26 +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.jobrunning.job.conf;
-
-import java.util.Map;
-
-import org.jsoup.nodes.Document;
-
-public interface JobConfParser {
-	
-	Map<String, String> parse(Document doc);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParserImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParserImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParserImpl.java
deleted file mode 100644
index 7a97550..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/job/conf/JobConfParserImpl.java
+++ /dev/null
@@ -1,42 +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.jobrunning.job.conf;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.jsoup.select.Elements;
-
-public class JobConfParserImpl implements JobConfParser {
-	
-	public Map<String, String> parse(Document doc) {
-		Elements elements = doc.select("table[id=conf]").select("tbody").select("tr");
-		Iterator<Element> iter = elements.iterator();
-		Map<String, String> configs = new HashMap<String, String>();
-		while(iter.hasNext()) {
-			Element element = iter.next();
-			Elements tds = element.children();
-			String key = tds.get(0).text();
-			String value = tds.get(1).text();
-			configs.put(key, value);
-		}
-		return configs;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilter.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilter.java
deleted file mode 100644
index 3e601e1..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilter.java
+++ /dev/null
@@ -1,27 +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.jobrunning.storm;
-
-import java.io.Serializable;
-import java.util.Map;
-
-/**
- * define what content in job running stream should be streamed
- */
-public interface JobRunningContentFilter extends Serializable {
-	boolean acceptJobConf(Map<String, String> config);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilterImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilterImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilterImpl.java
deleted file mode 100644
index b00f195..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningContentFilterImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.jobrunning.storm;
-
-import java.util.Map;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-/**
- * define what content in job running stream should be streamed
- */
-public class JobRunningContentFilterImpl implements JobRunningContentFilter {
-	private static final long serialVersionUID = 1L;
-	
-	@Override
-	public boolean acceptJobConf(Map<String, String> config) {
-		if (config.containsKey(JobConstants.HIVE_QUERY_STRING)) {
-			return true;
-		}
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpout.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpout.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpout.java
deleted file mode 100644
index 3dd55c1..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpout.java
+++ /dev/null
@@ -1,200 +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.jobrunning.storm;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.eagle.jobrunning.callback.DefaultRunningJobInputStreamCallback;
-import org.apache.eagle.jobrunning.callback.RunningJobMessageId;
-import org.apache.eagle.jobrunning.config.RunningJobCrawlConfig;
-import org.apache.eagle.jobrunning.crawler.RunningJobCrawler;
-import org.apache.eagle.jobrunning.crawler.RunningJobCrawlerImpl;
-import org.apache.eagle.jobrunning.zkres.JobRunningZKStateManager;
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.crawler.JobContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-
-import org.apache.eagle.job.JobFilter;
-import org.apache.eagle.job.JobFilterByPartition;
-import org.apache.eagle.job.JobPartitioner;
-import org.apache.eagle.jobrunning.callback.RunningJobCallback;
-
-public class JobRunningSpout extends BaseRichSpout {
-	private static final long serialVersionUID = 1L;
-	private static final Logger LOG = LoggerFactory.getLogger(JobRunningSpout.class);
-
-	private RunningJobCrawlConfig config;
-	private JobRunningZKStateManager zkStateManager;
-	private transient RunningJobCrawler crawler;
-	private JobRunningSpoutCollectorInterceptor interceptor;
-	private RunningJobCallback callback;
-	private ReadWriteLock readWriteLock;
-    private static final int DEFAULT_WAIT_SECONDS_BETWEEN_ROUNDS = 10;
-
-    public JobRunningSpout(RunningJobCrawlConfig config){
-		this(config, new JobRunningSpoutCollectorInterceptor());
-	}
-	
-	/**
-	 * mostly this constructor signature is for unit test purpose as you can put customized interceptor here
-	 * @param config
-	 * @param interceptor
-	 */
-	public JobRunningSpout(RunningJobCrawlConfig config, JobRunningSpoutCollectorInterceptor interceptor){
-		this.config = config;
-		this.interceptor = interceptor;
-		this.callback = new DefaultRunningJobInputStreamCallback(interceptor);
-		this.readWriteLock = new ReentrantReadWriteLock();
-	}
-	
-	
-	/**
-	 * TODO: just copy this part from jobHistorySpout, need to move it to a common place
-	 * @param context
-	 * @return
-	 */
-	private int calculatePartitionId(TopologyContext context){
-		int thisGlobalTaskId = context.getThisTaskId();
-		String componentName = context.getComponentId(thisGlobalTaskId);
-		List<Integer> globalTaskIds = context.getComponentTasks(componentName);
-		int index = 0;
-		for(Integer id : globalTaskIds){
-			if(id == thisGlobalTaskId){
-				return index;
-			}
-			index++;
-		}
-		throw new IllegalStateException();
-	}
-	
-	@SuppressWarnings("rawtypes")
-	@Override
-	public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-		int partitionId = calculatePartitionId(context);
-		// sanity verify 0<=partitionId<=numTotalPartitions-1
-		if(partitionId < 0 || partitionId > config.controlConfig.numTotalPartitions){
-			throw new IllegalStateException("partitionId should be less than numTotalPartitions with partitionId " + 
-					partitionId + " and numTotalPartitions " + config.controlConfig.numTotalPartitions);
-		}
-		Class<? extends JobPartitioner> partitionerCls = config.controlConfig.partitionerCls;
-		JobPartitioner partitioner = null;
-		try {
-			partitioner = partitionerCls.newInstance();
-		} catch (Exception e) {
-			LOG.error("failing instantiating job partitioner class " + partitionerCls.getCanonicalName());
-			throw new IllegalStateException(e);
-		}
-		JobFilter jobFilter = new JobFilterByPartition(partitioner, config.controlConfig.numTotalPartitions, partitionId);
-		interceptor.setSpoutOutputCollector(collector);		
-		try {
-			zkStateManager = new JobRunningZKStateManager(config);
-			crawler = new RunningJobCrawlerImpl(config, zkStateManager, callback, jobFilter, readWriteLock);
-		} catch (Exception e) {
-			LOG.error("failing creating crawler driver");
-			throw new IllegalStateException(e);
-		}
-	}
-
-	@Override
-	public void nextTuple() {
-		try{
-			crawler.crawl();
-		}catch(Exception ex){
-			LOG.error("fail crawling running job and continue ...", ex);
-		}
-        try{
-            Thread.sleep(DEFAULT_WAIT_SECONDS_BETWEEN_ROUNDS *1000);
-        }catch(Exception x){
-        }
-    }
-	
-	/**
-	 * empty because framework will take care of output fields declaration
-	 */
-	@Override
-	public void declareOutputFields(OutputFieldsDeclarer declarer) {
-		
-	}
-	
-	/**
-	 * add to processedJob
-	 */
-	@Override
-    public void ack(Object msgId) {
-		RunningJobMessageId messageId = (RunningJobMessageId) msgId;
-		JobConstants.ResourceType type = messageId.type;
-		LOG.info("Ack on messageId: " + messageId.toString());
-		switch(type) {
-			case JOB_CONFIGURATION:
-			case JOB_COMPLETE_INFO:
-				/** lock this for making processed/processing job list unchanged during crawler calculating last round running job list **/
-				try {
-					readWriteLock.readLock().lock();
-					zkStateManager.addProcessedJob(type, messageId.jobID);
-					// Here username & timestamp is meaningless, set to null
-					crawler.removeFromProcessingList(type, new JobContext(messageId.jobID, null, null));
-				}
-				finally {
-					try {readWriteLock.readLock().unlock(); LOG.info("Read lock released");}
-					catch (Throwable t) { LOG.error("Fail to release Read lock", t);}
-				}
-				break;				
-			default:
-				break;
-		}	
-    }
-
-	/**
-	 * job is not fully processed
-	 */
-    @Override
-    public void fail(Object msgId) {
-		RunningJobMessageId messageId = (RunningJobMessageId) msgId;
-		JobConstants.ResourceType type = messageId.type;
-		// Here timestamp is meaningless, set to null
-		if (type.equals(JobConstants.ResourceType.JOB_COMPLETE_INFO) || type.equals(JobConstants.ResourceType.JOB_CONFIGURATION)) {
-			try {
-				readWriteLock.readLock().lock();
-				// Here username in not used, set to null
-				crawler.removeFromProcessingList(type, new JobContext(messageId.jobID, null, null));
-			}
-			finally {
-				try {readWriteLock.readLock().unlock(); LOG.info("Read lock released");}
-				catch (Throwable t) { LOG.error("Fail to release Read lock", t);}
-			}
-		}
-    }
-   
-    @Override
-    public void deactivate() {
-    	
-    }
-   
-    @Override
-    public void close() {
-    	
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpoutCollectorInterceptor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpoutCollectorInterceptor.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpoutCollectorInterceptor.java
deleted file mode 100644
index d65ad93..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/storm/JobRunningSpoutCollectorInterceptor.java
+++ /dev/null
@@ -1,47 +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.jobrunning.storm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import backtype.storm.spout.SpoutOutputCollector;
-
-import org.apache.eagle.dataproc.core.EagleOutputCollector;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.jobrunning.callback.RunningJobMessageId;
-
-public class JobRunningSpoutCollectorInterceptor implements EagleOutputCollector{
-
-	private static final long serialVersionUID = 1L;
-	private SpoutOutputCollector collector;
-	
-	public void setSpoutOutputCollector(SpoutOutputCollector collector){
-		this.collector = collector;
-	}
-
-	@Override
-	public void collect(ValuesArray t) {
-		// the first value is fixed as messageId
-		RunningJobMessageId messageId = (RunningJobMessageId) t.get(0);
-		List<Object> list = new ArrayList<Object>();
-		for (int i = 1; i < t.size(); i++) {
-			list.add(t.get(i));
-		}
-		collector.emit(list, messageId);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteCounterServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteCounterServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteCounterServiceURLBuilderImpl.java
deleted file mode 100644
index 48c7dac..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteCounterServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,29 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobCompleteCounterServiceURLBuilderImpl implements ServiceURLBuilder {
-		
-	public String build(String ... parameters) {
-		// parameters[0] = historyBaseUrl, parameters[1] = jobID		
-		// {historyUrl}/jobhistory/jobcounters/job_xxxxxxxxxxxxx_xxxxx?anonymous=true
-		return parameters[0] + "jobhistory/jobcounters/" + parameters[1] 
-							 + "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteDetailServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteDetailServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteDetailServiceURLBuilderImpl.java
deleted file mode 100644
index 9c4e9ba..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompleteDetailServiceURLBuilderImpl.java
+++ /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.
- */
-package org.apache.eagle.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.util.JobUtils;
-
-public class JobCompleteDetailServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String ... parameters) {
-		// parameters[0] = baseUrl, parameters[1] = jobID		
-		// {baseUrl}/ws/v1/cluster/apps/job_xxxxxxxxxxxxx_xxxxx?anonymous=true
-		return parameters[0] + JobConstants.V2_COMPLETE_APPS_URL
-			 + JobUtils.getAppIDByJobID(parameters[1])
-			 + "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompletedConfigServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompletedConfigServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompletedConfigServiceURLBuilderImpl.java
deleted file mode 100644
index b869182..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCompletedConfigServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,30 +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.jobrunning.url;
-
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobCompletedConfigServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String ... parameters) {
-		// parameters[0] = baseUrl, parameters[1] = jobID
-		// {historyUrl}/jobhistory/conf/job_xxxxxxxxxxxxx_xxxxxx		
-		return parameters[0] + "jobhistory/conf/" + parameters[1]
-				+ "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCountersServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCountersServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCountersServiceURLBuilderImpl.java
deleted file mode 100644
index ad2aadd..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobCountersServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,33 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.util.JobUtils;
-
-public class JobCountersServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String ... parameters) {
-		// parameter[0] = baseUrl, parameter[1] = appID;
-		// {rmUrl}/proxy/application_xxxxxxxxxxxxx_xxxxxx/ws/v1/mapreduce/jobs/job_xxxxxxxxxxxxx_xxxxxx/counters?anonymous=true"
-		return parameters[0] + JobConstants.V2_PROXY_PREFIX_URL +
-			   parameters[1] + JobConstants.V2_MR_APPMASTER_PREFIX +
-			   JobUtils.getJobIDByAppID(parameters[1]) + JobConstants.V2_MR_COUNTERS_URL +
-			   "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobDetailServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobDetailServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobDetailServiceURLBuilderImpl.java
deleted file mode 100644
index ead9077..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobDetailServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,28 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobDetailServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String... parameters) {
-		// parameter[0] = baseUrl , parameter[1] = appID
-		// {rmUrl}/proxy/application_xxx/ws/v1/mapreduce/jobs?anonymous=true
-		return parameters[0] + JobConstants.V2_PROXY_PREFIX_URL + parameters[1] + JobConstants.V2_APP_DETAIL_URL + "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobListServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobListServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobListServiceURLBuilderImpl.java
deleted file mode 100644
index 92cb09a..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobListServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,37 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobListServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String ... parameters) {
-		// {rmUrl}/ws/v1/cluster/apps?state=RUNNING 
-		String jobState = parameters[1];
-		if (jobState.equals(JobConstants.JobState.RUNNING.name())) {
-			return parameters[0] + JobConstants.V2_APPS_RUNNING_URL + "&" + JobConstants.ANONYMOUS_PARAMETER;
-		}
-		else if (jobState.equals(JobConstants.JobState.COMPLETED.name())) {
-			return parameters[0] + JobConstants.V2_APPS_COMPLETED_URL + "&" + JobConstants.ANONYMOUS_PARAMETER;		
-		}
-		else if (jobState.equals(JobConstants.JobState.ALL.name())) {
-			return parameters[0] + JobConstants.V2_APPS_URL + "&" + JobConstants.ANONYMOUS_PARAMETER;		
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobRunningConfigServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobRunningConfigServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobRunningConfigServiceURLBuilderImpl.java
deleted file mode 100644
index bc883d4..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobRunningConfigServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,33 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-import org.apache.eagle.jobrunning.util.JobUtils;
-
-public class JobRunningConfigServiceURLBuilderImpl implements ServiceURLBuilder {
-	
-	public String build(String ... parameters) {
-		// parameters[0] = baseUrl, parameters[1] = jobID
-		// {baseUrl}/proxy/application_xxxxxxxxxxxxx_xxxxx/ws/v1/mapreduce/jobs/job_xxxxxxxxxxxxx_xxxxx/conf
-		String urlString = parameters[0] + JobConstants.V2_PROXY_PREFIX_URL
-				+ JobUtils.getAppIDByJobID(parameters[1]) + JobConstants.V2_MR_APPMASTER_PREFIX
-				+ parameters[1] + JobConstants.V2_CONF_URL 
-				+ "?" + JobConstants.ANONYMOUS_PARAMETER;
-		return urlString;		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobStatusServiceURLBuilderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobStatusServiceURLBuilderImpl.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobStatusServiceURLBuilderImpl.java
deleted file mode 100644
index bfe162c..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/JobStatusServiceURLBuilderImpl.java
+++ /dev/null
@@ -1,29 +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.jobrunning.url;
-
-import org.apache.eagle.jobrunning.common.JobConstants;
-
-public class JobStatusServiceURLBuilderImpl implements ServiceURLBuilder {
-		
-	public String build(String ... parameters) {
-		// parameters[0] = rmUrl, parameters[1] = appID
-		// {rmUrl}/ws/v1/cluster/apps/application_xxxxxxxxxxxxx_xxxxx?anonymous=true
-		return parameters[0] + "ws/v1/cluster/apps/" + parameters[1] 
-							 + "?" + JobConstants.ANONYMOUS_PARAMETER;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/ServiceURLBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/ServiceURLBuilder.java b/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/ServiceURLBuilder.java
deleted file mode 100644
index 5a50462..0000000
--- a/eagle-core/eagle-data-process/eagle-storm-jobrunning-spout/src/main/java/org/apache/eagle/jobrunning/url/ServiceURLBuilder.java
+++ /dev/null
@@ -1,21 +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.jobrunning.url;
-
-public interface ServiceURLBuilder {
-	String build(String ... parameters);
-}



[34/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestSimpleAggregateExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestSimpleAggregateExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestSimpleAggregateExecutor.java
deleted file mode 100644
index 0d0638d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestSimpleAggregateExecutor.java
+++ /dev/null
@@ -1,73 +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.datastream;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.dataproc.impl.aggregate.SimpleAggregateExecutor;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.junit.Test;
-import scala.Tuple2;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Created on 1/20/16.
- */
-public class TestSimpleAggregateExecutor {
-
-    @Test
-    public void test() throws Exception {
-        SimpleAggregateExecutor sae = new SimpleAggregateExecutor(new String[]{"s1"},
-                "define stream s1(eagleAlertContext object, timestamp long, metric string);" +
-                        " @info(name='query')" +
-                        " from s1 select * insert into tmp;"
-                ,
-                "siddhiCEPEngine",
-                0,
-                1);
-
-        Config config = ConfigFactory.empty();
-        sae.prepareConfig(config);
-        sae.init();
-
-        List<Object> tuple = new ArrayList<>(3);
-        tuple.add(0, "groupbykey");
-        tuple.add(1, "s1");
-        SortedMap value = new TreeMap();
-        value.put("timestamp", System.currentTimeMillis());
-        value.put("metric", "name-of-the-metric");
-        tuple.add(2, value);
-
-        final AtomicInteger count = new AtomicInteger();
-        sae.flatMap(tuple, new Collector<Tuple2<String, AggregateEntity>>(){
-            @Override
-            public void collect(Tuple2<String, AggregateEntity> stringAggregateEntityTuple2) {
-                System.out.print(stringAggregateEntityTuple2._1());
-                count.incrementAndGet();
-            }
-        });
-
-        Thread.sleep(3000);
-        Assert.assertEquals(1, count.get());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestStreamAggregate.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestStreamAggregate.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestStreamAggregate.java
deleted file mode 100644
index ed5d705..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestStreamAggregate.java
+++ /dev/null
@@ -1,152 +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.datastream;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.datastream.core.*;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph;
-import org.junit.Before;
-import org.junit.Test;
-import scala.collection.Seq;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * @since Dec 18, 2015
- *
- */
-public class TestStreamAggregate {
-
-	private Config config;
-
-	@SuppressWarnings("serial")
-	private final class SimpleSpout extends BaseRichSpout {
-		@SuppressWarnings("rawtypes")
-		@Override
-		public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-		}
-		@Override
-		public void nextTuple() {
-		}
-		@Override
-		public void declareOutputFields(OutputFieldsDeclarer declarer) {
-		}
-	}
-
-	public static class TestEnvironment extends StormExecutionEnvironment {
-		private static final long serialVersionUID = 1L;
-		public TestEnvironment(Config conf) {
-			super(conf);
-		}
-		@Override
-		public void execute(StreamDAG dag) {
-			System.out.println("DAT completed!");
-		}
-	}
-	
-	public static class DummyStrategy implements PartitionStrategy {
-		private static final long serialVersionUID = 1L;
-		@Override
-		public int balance(String key, int buckNum) {
-			return 0;
-		}
-	};
-	
-	public static class DummyExecutor extends JavaStormStreamExecutor2<String, AlertAPIEntity>  {
-		@Override
-		public void prepareConfig(Config config) {
-		}
-		@Override
-		public void init() {
-		}
-		@Override
-		public void flatMap(List input, Collector collector) {
-		}
-	}
-	
-	@Before
-	public void setUp() {
-		System.setProperty("config.resource", "/application.conf");
-		ConfigFactory.invalidateCaches();
-		config = ConfigFactory.load();
-	}
-
-	@SuppressWarnings({ "unchecked", "rawtypes", "serial" })
-	@Test
-	public void testAggregate1() {
-		StormExecutionEnvironment exe = new TestEnvironment(config);
-		
-		BaseRichSpout spout = new SimpleSpout();
-		StormSourceProducer ssp = exe.fromSpout(spout);
-		
-		ssp.flatMap(new FlatMapper<String>() {
-			@Override
-			public void flatMap(Seq<Object> input, Collector<String> collector) {
-				// do nothing
-			}
-		}).aggregate(Arrays.asList("c3EsLogEventStream"), "qid", new DummyStrategy());
-		
-		try {
-			exe.execute();
-			Assert.fail("customzied flat mapper(non java storm executor) before analyze is not supported!");
-		} catch (Exception e ){
-		}
-	}
-	
-	@SuppressWarnings({ "unchecked", "rawtypes", "serial" })
-	@Test
-	public void testAggregate() {
-		StormExecutionEnvironment exe = new TestEnvironment(config);
-		StormSourceProducer ssp = exe.fromSpout(new SimpleSpout());
-		DummyExecutor dummy = new DummyExecutor();
-		ssp.flatMap(dummy).aggregate(Arrays.asList("c3EsLogEventStream"), "analyzeStreamExecutor", new DummyStrategy());
-
-		try {
-			exe.execute();
-		} catch (Exception e) {
-			Assert.fail("customized flat mapper before");
-		}
-		// Assertion
-		DirectedAcyclicGraph<StreamProducer<Object>, StreamConnector<Object, Object>> dag = exe.dag();
-		Assert.assertEquals("three vertex", 3, dag.vertexSet().size());
-		boolean hasWrapped = false;
-		for (StreamProducer<Object> obj : dag.vertexSet()) {
-			if (obj instanceof FlatMapProducer) {
-				if (((FlatMapProducer) obj).mapper() instanceof JavaStormExecutorForAlertWrapper) {
-					hasWrapped = true;
-					Assert.assertEquals("dummy executor should be wrapped in the alert wrapper func", dummy,
-							((JavaStormExecutorForAlertWrapper) ((FlatMapProducer) obj).mapper() ).getDelegate());
-
-				}
-			}
-		}
-		Assert.assertTrue(hasWrapped);
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/application.conf b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/application.conf
deleted file mode 100644
index 87b1947..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/application.conf
+++ /dev/null
@@ -1,79 +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.
-
-{
-	"envContextConfig" : {
-		"env" : "storm",
-		"mode" : "local",
-		"topologyName" : "kafka-monitor-topology",
-		"parallelismConfig" : {
-			"kafkaMsgConsumer" : 1
-		}
-	},
-	"dataSourceConfig": {
-		"topic" : "nn_jmx_metric_sandbox",
-		"zkConnection" : "localhost:2181",
-		"zkConnectionTimeoutMS" : 15000,
-		"consumerGroupId" : "EagleConsumer",
-		"fetchSize" : 1048586,
-		"transactionZKServers" : "localhost",
-		"transactionZKPort" : 2181,
-		"transactionZKRoot" : "/consumers",
-		"transactionStateUpdateMS" : 2000
-	},
-	"alertExecutorConfigs" : {
-		"eventStreamExecutor" : {
-			"parallelism" : 1,
-			"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-			"needValidation" : "true"
-		}
-	},
-	"persistExecutorConfigs" {
-		"persistExecutor1" : {
-			"kafka": {
-				"bootstrap_servers" : "localhost",
-				"topics" : {
-					"defaultOutput" : "downSampleOutput"
-				}
-			}
-		}
-	},
-	"aggregateExecutorConfigs" : {
-		"aggregateStreamExecutor" : {
-			"parallelism" : 1,
-			"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-			"needValidation" : "true"
-		}
-	},
-	"eagleProps" : {
-		"site" : "sandbox",
-		"application": "eventSource",
-		"dataJoinPollIntervalSec" : 30,
-		"mailHost" : "mail.host.com",
-		"mailSmtpPort":"25",
-		"mailDebug" : "true",
-		"eagleService": {
-			"host": "localhost",
-			"port": 38080,
-			"username": "admin",
-			"password": "secret"
-		}
-	},
-	"dynamicConfigSource" : {
-		"enabled" : true,
-		"initDelayMillis" : 0,
-		"delayMillis" : 30000
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/event-metadata-init.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/event-metadata-init.sh b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/event-metadata-init.sh
deleted file mode 100644
index 3e57b6c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/event-metadata-init.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-export EAGLE_SERVICE_USER="admin"
-export EAGLE_SERVICE_PASSWD="secret"
-export EAGLE_SERVICE_HOST="localhost"
-export EAGLE_SERVICE_PORT=38080
-
-# AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for stream... "
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"eventSource"}, "enabled": "true", "config" : ""}]'
-
-## AlertStreamService: alert streams generated from data source
-echo ""
-echo "Importing AlertStreamService for stream... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"dataSource":"eventSource","streamName":"eventStream"},"desc":"alert event stream from hdfs audit log"}]'
-
-## AlertExecutorService: what alert streams are consumed by alert executor
-echo ""
-echo "Importing AlertExecutorService for stream ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"dataSource":"eventSource","alertExecutorId":"eventStreamExecutor","streamName":"eventStream"},"desc":"alert executor for event stream"}]'
-
-## AlertStreamSchemaService: schema for event from alert stream
-echo ""
-echo "Importing AlertStreamSchemaService for stream ... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"eventSource","streamName":"eventStream","attrName":"timestamp"},"attrDescription":"event timestamp","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"eventSource","streamName":"eventStream","attrName":"name"},"attrDescription":"event name","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"eventSource","streamName":"eventStream","attrName":"value"},"attrDescription":"event value","attrType":"integer","category":"","attrValueResolver":""}]'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/log4j.properties b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/log4j.properties
deleted file mode 100644
index 3499c46..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=./logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/StormWrapperUtilsSpec.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/StormWrapperUtilsSpec.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/StormWrapperUtilsSpec.scala
deleted file mode 100644
index 9d378c9..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/StormWrapperUtilsSpec.scala
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
-  * Licensed to the Apache Software Foundation (ASF) under one or more
-  * contributor license agreements.  See the NOTICE file distributed with
-  * this work for additional information regarding copyright ownership.
-  * The ASF licenses this file to You under the Apache License, Version 2.0
-  * (the "License"); you may not use this file except in compliance with
-  * the License.  You may obtain a copy of the License at
-  *
-  * http://www.apache.org/licenses/LICENSE-2.0
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-package org.apache.eagle.datastream
-
-import org.apache.eagle.datastream.storm.StormWrapperUtils
-import org.scalatest.{FlatSpec, Matchers}
-
-class StormWrapperUtilsSpec extends FlatSpec with Matchers{
-  import StormWrapperUtils._
-  "StormWrapperUtils" should "convert Tuple{1,2,3,..} to java.util.List" in {
-    val list1 = productAsJavaList(new Tuple1("a"))
-    list1.size() should be(1)
-    list1.get(0) should be("a")
-
-    val list2 = productAsJavaList(new Tuple2("a","b"))
-    list2.size() should be(2)
-    list2.get(0) should be("a")
-    list2.get(1) should be("b")
-
-    val list3 = productAsJavaList(new Tuple3("a","b","c"))
-    list3.size() should be(3)
-    list3.get(0) should be("a")
-    list3.get(1) should be("b")
-    list3.get(2) should be("c")
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestDAGExpansion.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestDAGExpansion.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestDAGExpansion.scala
deleted file mode 100644
index 4339e5a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestDAGExpansion.scala
+++ /dev/null
@@ -1,104 +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.datastream
-
-import com.typesafe.config.{Config, ConfigFactory}
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment
-
-object testStreamUnionExpansion extends App{
-  val config : Config = ConfigFactory.load
-  val env = new StormExecutionEnvironment(config)
-  val tail1 = env.fromSpout(TestSpout()).flatMap(WordPrependForAlertExecutor("test")).map2(a => ("key1",a))
-  val tail2 = env.fromSpout(TestSpout()).flatMap(WordAppendForAlertExecutor("test")).map2(a => ("key1",a))
-  tail1.streamUnion(List(tail2)).map1(a => "xyz")
-}
-
-object testStreamGroupbyExpansion extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  env.fromSpout(TestSpout()).flatMap(WordPrependForAlertExecutor("test")).groupBy(1).map2(a => ("key1",a))
-  //env.execute
-}
-
-object testStreamUnionAndGroupbyExpansion extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  val tail1 = env.fromSpout(TestSpout()).flatMap(WordPrependForAlertExecutor("test")).map2(a => ("key1",a)).groupBy(1)
-  val tail2 = env.fromSpout(TestSpout()).flatMap(WordAppendForAlertExecutor("test")).map2(a => ("key1",a)).groupBy(0)
-  tail1.streamUnion(List(tail2)).map1(a => "xyz")
-//  env.execute()
-}
-
-/**
- * 1. stream schema
- * curl -X POST -H 'Content-Type:application/json' "http://localhost:38080/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"ds1","streamName":"s1","attrName":"word"},"attrDescription":"word","attrType":"string","category":"","attrValueResolver":""}]'
- * 2. policy
- * curl -X POST -H 'Content-Type:application/json' "http://localhost:38080/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d '[{"tags":{"site":"sandbox","dataSource":"ds1","alertExecutorId":"alert1","policyId":"testAlert","policyType":"siddhiCEPEngine"},"desc":"test alert","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from s1 [(str:regexp(word,'\'.*test.*==true)] select * insert into outputStream ;\"}","dedupeDef":"","notificationDef":"","remediationDef":"","enabled":"true"}]'
- */
-object testAlertExpansion extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  val tail1 = env.fromSpout(TestSpout()).nameAs("testSpout1")
-                  .flatMap(WordPrependForAlertExecutor("test")).nameAs("prepend")
-                  .alertWithConsumer("s1", "alert1")
-  //env.execute
-}
-
-/**
- * 1. stream schema
- * curl -X POST -H 'Content-Type:application/json' "http://localhost:38080/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"ds1","streamName":"s1","attrName":"word"},"attrDescription":"word","attrType":"string","category":"","attrValueResolver":""}]'
- * curl -X POST -H 'Content-Type:application/json' "http://localhost:38080/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"ds1","streamName":"s2","attrName":"word"},"attrDescription":"word","attrType":"string","category":"","attrValueResolver":""}]'
- * 2. policy
- * curl -X POST -H 'Content-Type:application/json' "http://localhost:38080/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d '[{"tags":{"site":"sandbox","dataSource":"ds1","alertExecutorId":"alert1","policyId":"testAlert","policyType":"siddhiCEPEngine"},"desc":"test alert","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from s1 [(str:regexp(word,'\'.*test.*\)==true)] select * insert into outputStream ;\"}","dedupeDef":"","notificationDef":"","remediationDef":"","enabled":"true"}]'
- */
-object testAlertExpansionWithUnion extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  val tail1 = env.fromSpout(TestSpout()).nameAs("testSpout1").flatMap(WordPrependForAlertExecutor("test")).nameAs("prepend") //.map2(a => ("key1",a))
-  val tail2 = env.fromSpout(TestSpout()).flatMap(WordAppendForAlertExecutor("test")) //.map2(a => ("key1",a))
-  tail1.streamUnion(List(tail2)).alert(Seq("s1","s2"), "alert1", consume = true)
-  //env.execute
-}
-
-
-object testStreamUnionExpansionWithSharedSpout extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  val source = env.fromSpout(TestSpout())
-  val tail1 = source.flatMap(WordPrependForAlertExecutor("test")).map2(a => ("key1",a))
-  val tail2 = source.flatMap(WordAppendForAlertExecutor("test")).map2(a => ("key1",a))
-  tail1.streamUnion(List(tail2)).map1(a  => {
-    println(a)
-    "xyz"
-  })
-//    env.execute
-}
-
-object testStreamUnionExpansionWithSharedSpout_2 extends App{
-  val config : Config = ConfigFactory.load;
-  val env = new StormExecutionEnvironment(config)
-  val source = env.fromSpout(TestSpout())
-  val tail1 = source.flatMap(WordPrependForAlertExecutor("test")).map2(a => ("key1",a))
-  source.streamUnion(List(tail1)).map1(a  => {
-    println(a)
-    "xyz"
-  })
-//  env.execute
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestExecutionEnvironment.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestExecutionEnvironment.scala
deleted file mode 100644
index ccd3deb..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestExecutionEnvironment.scala
+++ /dev/null
@@ -1,34 +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.datastream
-
-import com.typesafe.config.ConfigFactory
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment
-
-/**
- * @since  12/5/15
- */
-object TestExecutionEnvironment extends App{
-  val env0 = ExecutionEnvironments.get[StormExecutionEnvironment]
-  println(env0)
-  val config = ConfigFactory.load()
-  val env1 = ExecutionEnvironments.getWithConfig[StormExecutionEnvironment](config)
-  println(env1)
-  val env2 = ExecutionEnvironments.get[StormExecutionEnvironment](Array[String]("-D","key=value"))
-  println(env2)
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestScala.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestScala.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestScala.scala
deleted file mode 100644
index d785689..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestScala.scala
+++ /dev/null
@@ -1,20 +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.datastream
-
-trait A { val x: Int }
-case class B(val x: Int, y: Int) extends A
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormNodes.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormNodes.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormNodes.scala
deleted file mode 100644
index 231ebab..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormNodes.scala
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream
-
-import java.util
-
-import backtype.storm.spout.SpoutOutputCollector
-import backtype.storm.task.TopologyContext
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichSpout
-import backtype.storm.tuple.Fields
-import com.typesafe.config.Config
-import org.slf4j.LoggerFactory
-
-case class TestSpout() extends BaseRichSpout {
-  val LOG = LoggerFactory.getLogger(TestSpout.getClass)
-  var _collector : SpoutOutputCollector = null
-  override def nextTuple : Unit = {
-    _collector.emit(util.Arrays.asList("abc"))
-    LOG.info("send spout data abc")
-    Thread.sleep(1000)
-  }
-  override def declareOutputFields (declarer: OutputFieldsDeclarer): Unit ={
-    declarer.declare(new Fields("value"))
-  }
-  override def open(conf: java.util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector): Unit ={
-    _collector = collector
-  }
-}
-
-case class TestKeyValueSpout() extends BaseRichSpout {
-  val LOG = LoggerFactory.getLogger(TestSpout.getClass)
-  var _collector : SpoutOutputCollector = null
-  var count : Int = 0
-  override def nextTuple : Unit = {
-    if(count%3 == 0) {
-      _collector.emit(util.Arrays.asList("abc", new Integer(1)))
-    }else{
-      _collector.emit(util.Arrays.asList("xyz", new Integer(1)))
-    }
-    count += 1;
-    LOG.info("send spout data abc/xyz")
-    Thread.sleep(1000)
-  }
-  override def declareOutputFields (declarer: OutputFieldsDeclarer): Unit ={
-    declarer.declare(new Fields("word", "count"))
-  }
-  override def open(conf: java.util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector): Unit ={
-    _collector = collector
-  }
-}
-
-case class EchoExecutor() extends StormStreamExecutor1[String] {
-  val LOG = LoggerFactory.getLogger(EchoExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[String]]): Unit ={
-    outputCollector.collect(Tuple1(input.head.asInstanceOf[String]))
-    LOG.info("echo " + input.head)
-  }
-}
-
-case class WordPrependExecutor(prefix : String) extends StormStreamExecutor1[String] {
-  val LOG = LoggerFactory.getLogger(WordPrependExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[String]]): Unit ={
-    outputCollector.collect(Tuple1(prefix + "_" + input.head))
-    LOG.info("preappend " + prefix + "_" + input.head)
-  }
-}
-
-case class WordPrependForAlertExecutor(prefix : String) extends StormStreamExecutor2[String, util.SortedMap[Object, Object]] {
-  val LOG = LoggerFactory.getLogger(WordPrependExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple2[String, util.SortedMap[Object, Object]]]): Unit ={
-    val value = new util.TreeMap[Object, Object]()
-    value.put("word", prefix + "_" + input.head)
-    outputCollector.collect(Tuple2("key1",value))
-    LOG.info("preappend " + prefix + "_" + input.head)
-  }
-}
-
-case class WordPrependForAlertExecutor2(prefix : String) extends StormStreamExecutor1[util.SortedMap[Object, Object]] {
-  val LOG = LoggerFactory.getLogger(WordPrependExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[util.SortedMap[Object, Object]]]): Unit ={
-    val value = new util.TreeMap[Object, Object]()
-    value.put("word", prefix + "_" + input.head)
-    outputCollector.collect(Tuple1(value))
-    LOG.info("preappend " + prefix + "_" + input.head)
-  }
-}
-
-case class WordAppendExecutor(suffix : String) extends StormStreamExecutor1[String] {
-  val LOG = LoggerFactory.getLogger(WordPrependExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[String]]): Unit ={
-    outputCollector.collect(Tuple1(input.head + "_" + suffix))
-    LOG.info("append " + input.head + "_" + suffix)
-  }
-}
-
-case class WordAppendForAlertExecutor(suffix : String) extends StormStreamExecutor2[String, util.SortedMap[Object, Object]] {
-  val LOG = LoggerFactory.getLogger(WordPrependExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple2[String, util.SortedMap[Object, Object]]]): Unit ={
-    val value = new util.TreeMap[Object, Object]()
-    value.put("word", input.head + "_" + suffix)
-    outputCollector.collect(Tuple2("key1", value))
-    LOG.info("append " + input.head + "_" + suffix)
-  }
-}
-
-case class PatternAlertExecutor(pattern : String) extends StormStreamExecutor1[String] {
-  val LOG = LoggerFactory.getLogger(PatternAlertExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[String]]): Unit ={
-    LOG.info("send out " + input.head)
-    if(input.head.asInstanceOf[String].matches(pattern)){
-      LOG.info("Alert hadppens for input " + input.head + " and for pattern " + pattern)
-    }
-  }
-}
-
-case class GroupedEchoExecutor() extends StormStreamExecutor1[String] {
-  val LOG = LoggerFactory.getLogger(GroupedEchoExecutor.getClass)
-  var config : Config = null
-  override def prepareConfig(config : Config){this.config = config}
-  override def init {}
-  override def flatMap(input : Seq[AnyRef], outputCollector : Collector[Tuple1[String]]): Unit ={
-    LOG.info("get " + input(0))
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
deleted file mode 100644
index c071eb2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStormRunner.scala
+++ /dev/null
@@ -1,120 +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.datastream
-
-import com.typesafe.config.{Config, ConfigFactory}
-
-/**
- * explicit union
- * a.union(b,c).alert() means (a,b,c)'s output is united into alert()
- * before running this testing, we should define in eagle service one policy and one stream schema
- * 1. stream schema
- * curl -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"ds1","streamName":"s1","attrName":"word"},"attrDescription":"word","attrType":"string","category":"","attrValueResolver":""}]'
- * 2. policy
- * curl -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d '[{"tags":{"site":"sandbox","dataSource":"ds1","alertExecutorId":"alert1","policyId":"testAlert","policyType":"siddhiCEPEngine"},"desc":"test alert","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from s1 [(str:regexp(word,'\'.*test.*\)==true)] select * insert into outputStream ;\"}","dedupeDef":"","notificationDef":"","remediationDef":"","enabled":"true"}]'
- */
-object UnionForAlert extends App{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  val tail1 = env.fromSpout(TestSpout()).flatMap(WordPrependForAlertExecutor("test")).map2(a => ("key1",a))
-  val tail2 = env.fromSpout(TestSpout()).flatMap(WordAppendForAlertExecutor("test")).map2(a => ("key2",a))
-  tail1.streamUnion(List(tail2)).alert(Seq("s1","s2"), "alert1", consume = false)
-  env.execute()
-}
-
-/**
- * test alert after flatMap
- */
-object TestAlertAfterFlatMap extends App{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  val tail1 = env.fromSpout(TestSpout())
-                  .flatMap(WordPrependForAlertExecutor("test"))
-                  .alert(Seq("s1"), "alert1", consume = false)
-  //env.execute
-}
-
-/**
- * test alert after Map
- */
-object TestAlertAfterMap extends App{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  val tail1 = env.fromSpout(TestSpout())
-    .flatMap(WordPrependForAlertExecutor2("test"))
-    .map2(a => ("key", a))
-    .alert(Seq("s1"), "alert1", false)
-  //env.execute
-}
-
-object StormRunnerWithoutSplitOrJoin extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  env.fromSpout(TestSpout()).flatMap(EchoExecutor()).flatMap(WordPrependExecutor("test"))
-    .flatMap(PatternAlertExecutor("test.*"))
-//  env.execute()
-}
-
-object StormRunnerWithSplit extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  val toBeSplit = env.fromSpout(TestSpout()).flatMap(EchoExecutor())
-  toBeSplit.flatMap(WordPrependExecutor("test")).flatMap(PatternAlertExecutor("test.*"))
-  toBeSplit.flatMap(WordAppendExecutor("test"))
-//  env.execute()
-}
-
-object StormRunnerWithUnion extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  val tail1 = env.fromSpout(TestSpout()).flatMap(WordPrependExecutor("test"))
-  val tail2 = env.fromSpout(TestSpout()).flatMap(WordAppendExecutor("test"))
-  tail1.streamUnion(List(tail2)).flatMap(PatternAlertExecutor(".*test.*"))
-  env.execute()
-}
-
-object StormRunnerWithFilter extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  env.fromSpout(TestSpout()).flatMap(EchoExecutor()).flatMap(WordPrependExecutor("test")).
-    filter(_=>false).
-    flatMap(PatternAlertExecutor("test.*"))
-  //env.execute
-}
-
-object StormRunnerWithJavaExecutor extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  env.fromSpout(TestSpout()).flatMap(new JavaEchoExecutor()).flatMap(WordPrependExecutor("test")).
-    filter(_=>false).
-    flatMap(PatternAlertExecutor("test.*"))
-  //env.execute
-}
-
-object StormRunnerWithKeyValueSpout extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  env.fromSpout(TestKeyValueSpout()).groupBy(1).flatMap(new GroupedEchoExecutor()).parallelism(2)
-  //env.execute
-}
-
-object StormRunnerWithKeyValueSpoutRenameOutputFields extends Application{
-  val config : Config = ConfigFactory.load;
-  val env = ExecutionEnvironments.getStorm(config)
-  env.fromSpout(TestKeyValueSpout()).withOutputFields(2).groupBy(0).flatMap(new GroupedEchoExecutor()).parallelism(2)
-  //env.execute
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStreamDAGBuilder.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStreamDAGBuilder.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStreamDAGBuilder.scala
deleted file mode 100644
index 48dc7e5..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestStreamDAGBuilder.scala
+++ /dev/null
@@ -1,236 +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.datastream
-
-import com.typesafe.config.ConfigFactory
-import org.scalatest.{FlatSpec, Matchers}
-
-class TestStreamDAGBuilder extends FlatSpec with Matchers{
-//  "a single source DAG with groupBy" should "be traversed without groupBy node" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val tail = env.newSource(null).flatMap(EchoExecutor()).groupBy(0).flatMap(WordPrependExecutor("test"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[EchoExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//  }
-//
-//  "a single source DAG with groupBy from spout" should "be traversed without groupBy node" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val tail = env.newSource(null).groupBy(0).flatMap(WordPrependExecutor("test"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//  }
-//
-//  "a single source DAG with groupBy from spout and then split" should "be traversed without groupBy node" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val groupby = env.newSource(null).groupBy(0)
-//    groupby.flatMap(WordPrependExecutor("test"))
-//    groupby.flatMap(WordAppendExecutor("test"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordAppendExecutor])
-//      case _ => assert(false)
-//    }
-//  }
-//
-//  "a single source DAG without stream join" should "be traversed sequentially like specified" in{
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val tail = env.newSource(null).flatMap(EchoExecutor()).flatMap(WordPrependExecutor("test"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[EchoExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match{
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//  }
-//
-//  "a single source with split" should "has more than one tail producer" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val echo = env.newSource(null).flatMap(EchoExecutor())
-//    val tail1 = echo.flatMap(WordPrependExecutor("test"))
-//    val tail2 = echo.flatMap(WordAppendExecutor("test"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[EchoExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordAppendExecutor])
-//      case _ => assert(false)
-//    }
-//  }
-//
-//  "a single source with split and join" should "has join" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val echo = env.newSource(null).flatMap(EchoExecutor())
-//    val tail1 = echo.flatMap(WordPrependExecutor("test"))
-//    val tail2 = echo.flatMap(WordAppendExecutor("test")).filter(_=>true).streamUnion(List(tail1)).
-//      flatMap(PatternAlertExecutor("test*"))
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case StormSourceProducer(t) => assert(t == null)
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[EchoExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordAppendExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FilterProducer(fn) =>
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.asInstanceOf[PatternAlertExecutor].pattern.equals("test*"))
-//      case _ => assert(false)
-//    }
-//    assert(!iter.hasNext)
-//  }
-//
-//  "multiple sources with split and union" should "has union" in {
-//    val config = ConfigFactory.load()
-//    val env = ExecutionEnvironmentFactory.getStorm(config)
-//    val source1 = env.newSource(TestSpout())
-//    val source2 = env.newSource(TestSpout())
-//    val source3 = env.newSource(TestSpout())
-//
-//    val tail1 = source1.flatMap(WordPrependExecutor("test"))
-//    val tail2 = source2.filter(_=>true)
-//    val tail3 = source3.flatMap(WordAppendExecutor("test")).streamUnion(List(tail1, tail2)).
-//      flatMap(PatternAlertExecutor("abc*"))
-//
-//    val dag = new StreamDAGBuilder(env.heads).build()
-//    val iter = dag.iterator()
-//
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case StormSourceProducer(t) => assert(t.isInstanceOf[TestSpout])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordPrependExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case StormSourceProducer(t) => assert(t.isInstanceOf[String])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FilterProducer(fn) =>
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case SourceProducer(t) => assert(t.isInstanceOf[String])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.isInstanceOf[WordAppendExecutor])
-//      case _ => assert(false)
-//    }
-//    assert(iter.hasNext)
-//    iter.next() match {
-//      case FlatMapProducer(worker) => assert(worker.asInstanceOf[PatternAlertExecutor].pattern.equals("abc*"))
-//      case _ => assert(false)
-//    }
-//    assert(!iter.hasNext)
-//  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestTypeSafedDSL.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestTypeSafedDSL.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestTypeSafedDSL.scala
deleted file mode 100644
index 7754765..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/scala/org/apache/eagle/datastream/TestTypeSafedDSL.scala
+++ /dev/null
@@ -1,115 +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.datastream
-
-import org.apache.eagle.datastream.core.StreamContext
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment
-
-/**
- * @since  12/4/15
- */
-case class Entity(name:String,value:Double,var inc:Int=0)
-
-object TestIterableWithGroupBy extends App {
-
-  val env = ExecutionEnvironments.get[StormExecutionEnvironment](args)
-
-  val tuples = Seq(
-    Entity("a", 1),
-    Entity("a", 2),
-    Entity("a", 3),
-    Entity("b", 2),
-    Entity("c", 3),
-    Entity("d", 3)
-  )
-
-  env.from(tuples)
-    .groupByKey(_.name)
-    .map(o => {o.inc += 2;o})
-    .filter(_.name != "b")
-    .filter(_.name != "c")
-    .groupByKey(o=>(o.name,o.value))
-    .map(o => (o.name,o))
-    .map(o => (o._1,o._2.value,o._2.inc))
-    .foreach(println)
-
-  env.execute()
-}
-
-object TestIterableWithGroupByWithStreamContext extends App {
-  val stream = StreamContext(args)
-
-  val tuples = Seq(
-    Entity("a", 1),
-    Entity("a", 2),
-    Entity("a", 3),
-    Entity("b", 2),
-    Entity("c", 3),
-    Entity("d", 3)
-  )
-
-  stream.from(tuples)
-    .groupByKey(_.name)
-    .map(o => {o.inc += 2;o})
-    .filter(_.name != "b")
-    .filter(_.name != "c")
-    .groupByKey(o=>(o.name,o.value))
-    .map(o => (o.name,o))
-    .map(o => (o._1,o._2.value,o._2.inc))
-    .foreach(println)
-
-  stream.submit[StormExecutionEnvironment]
-}
-
-object TestIterableWithGroupByCircularly extends App{
-  val env = ExecutionEnvironments.get[StormExecutionEnvironment](args)
-
-  val tuples = Seq(
-    Entity("a", 1),
-    Entity("a", 2),
-    Entity("a", 3),
-    Entity("b", 2),
-    Entity("c", 3),
-    Entity("d", 3)
-  )
-
-  env.from(tuples,recycle = true)
-    .map(o => {o.inc += 2;o})
-    .groupByKey(_.name)
-    .foreach(println)
-  env.execute()
-}
-
-object TestGroupByKeyOnSpoutproxy extends App{
-  val env = ExecutionEnvironments.get[StormExecutionEnvironment](args)
-
-  val tuples = Seq(
-    Entity("a", 1),
-    Entity("a", 2),
-    Entity("a", 3),
-    Entity("b", 2),
-    Entity("c", 3),
-    Entity("d", 3)
-  )
-
-  env.fromSpout[String](TestSpout())
-    .groupByKey(_.charAt(0))
-    .foreach(println)
-  env.execute()
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
deleted file mode 100644
index 740de03..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>eagle</groupId>
-        <artifactId>eagle-data-process-parent</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>eagle-stream-process-base</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-math3</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.kafka</groupId>
-            <artifactId>kafka_${scala.version}</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.typesafe</groupId>
-            <artifactId>config</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-annotations</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-common</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.scalatest</groupId>
-            <artifactId>scalatest_${scala.version}</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <!--<dependency>-->
-            <!--<groupId>org.apache.storm</groupId>-->
-            <!--<artifactId>storm-core</artifactId>-->
-            <!--<exclusions>-->
-                <!--<exclusion>-->
-                    <!--<groupId>ch.qos.logback</groupId>-->
-                    <!--<artifactId>logback-classic</artifactId>-->
-                <!--</exclusion>-->
-                <!--<exclusion>-->
-                    <!--<groupId>log4j</groupId>-->
-                    <!--<artifactId>log4j</artifactId>-->
-                <!--</exclusion>-->
-                <!--<exclusion>-->
-                    <!--<groupId>org.slf4j</groupId>-->
-                    <!--<artifactId>log4j-over-slf4j</artifactId>-->
-                <!--</exclusion>-->
-            <!--</exclusions>-->
-        <!--</dependency>-->
-    </dependencies>
-
-    <build>
-    <plugins>
-        <plugin>
-            <groupId>org.scala-tools</groupId>
-            <artifactId>maven-scala-plugin</artifactId>
-            <executions>
-                <execution>
-                    <id>scala-compile-first</id>
-                    <phase>process-resources</phase>
-                    <goals>
-                        <goal>add-source</goal>
-                        <goal>compile</goal>
-                    </goals>
-                </execution>
-                <execution>
-                    <id>scala-test-compile</id>
-                    <phase>process-test-resources</phase>
-                    <goals>
-                        <goal>testCompile</goal>
-                    </goals>
-                </execution>
-            </executions>
-        </plugin>
-
-        <plugin>
-            <groupId>org.scalatest</groupId>
-            <artifactId>scalatest-maven-plugin</artifactId>
-            <configuration>
-                <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
-                <junitxml>.</junitxml>
-                <filereports>TestSuite.txt</filereports>
-            </configuration>
-            <executions>
-                <execution>
-                    <id>test</id>
-                    <goals>
-                        <goal>test</goal>
-                    </goals>
-                </execution>
-            </executions>
-        </plugin>
-    </plugins>
-    </build>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/EagleOutputCollector.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/EagleOutputCollector.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/EagleOutputCollector.java
deleted file mode 100644
index 0c4b1ab..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/EagleOutputCollector.java
+++ /dev/null
@@ -1,27 +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.dataproc.core;
-
-import java.io.Serializable;
-
-/**
- * expose simple interface for streaming executor to populate output data
- *
- */
-public interface EagleOutputCollector extends Serializable{
-	void collect(ValuesArray t);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/JsonSerDeserUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/JsonSerDeserUtils.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/JsonSerDeserUtils.java
deleted file mode 100644
index 5df7e55..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/JsonSerDeserUtils.java
+++ /dev/null
@@ -1,54 +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.dataproc.core;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class JsonSerDeserUtils {
-	private static final Logger LOG = LoggerFactory.getLogger(JsonSerDeserUtils.class);
-
-	public static <T> String serialize(T o) throws Exception{
-		return serialize(o, null);
-	}
-	
-	public static <T> String serialize(T o, List<Module> modules) throws Exception {
-		ObjectMapper mapper = new ObjectMapper();
-		if (modules != null) { 
-			mapper.registerModules(modules);
-		}
-		return mapper.writeValueAsString(o);
-	}
-
-	public static <T> T deserialize(String value, Class<T> cls) throws Exception{
-		return deserialize(value, cls, null);
-	}
-	
-	public static <T> T deserialize(String value, Class<T> cls, List<Module> modules) throws Exception{
-		ObjectMapper mapper = new ObjectMapper();
-		if (modules != null) { 
-			mapper.registerModules(modules);
-		}
-		return mapper.readValue(value, cls);	
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/StreamingProcessConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/StreamingProcessConstants.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/StreamingProcessConstants.java
deleted file mode 100644
index fc2a016..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/StreamingProcessConstants.java
+++ /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.
- */
-package org.apache.eagle.dataproc.core;
-
-public class StreamingProcessConstants {
-	public static final String EVENT_PARTITION_KEY = "eventPartitionKey";
-	public static final String EVENT_STREAM_NAME = "streamName";
-	public static final String EVENT_ATTRIBUTE_MAP = "value";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/ValuesArray.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/ValuesArray.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/ValuesArray.java
deleted file mode 100644
index 9971cb2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/core/ValuesArray.java
+++ /dev/null
@@ -1,38 +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.dataproc.core;
-
-import java.util.ArrayList;
-
-/**
- * multiple datapoints are stored within one ValuesArray object
- * sent out
- */
-public class ValuesArray extends ArrayList<Object>{
-	private static final long serialVersionUID = -8218427810421668178L;
-
-	public ValuesArray() {
-        
-    }
-    
-    public ValuesArray(Object... vals) {
-        super(vals.length);
-        for(Object o: vals) {
-            add(o);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/AbstractConfigOptionParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/AbstractConfigOptionParser.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/AbstractConfigOptionParser.java
deleted file mode 100644
index f40bb76..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/AbstractConfigOptionParser.java
+++ /dev/null
@@ -1,68 +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.dataproc.util;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import org.apache.commons.cli.*;
-
-import java.util.Map;
-
-/**
- * @since 8/22/15
- */
-public abstract class AbstractConfigOptionParser {
-
-    // private final Options options;
-    private final Parser parser;
-
-    public AbstractConfigOptionParser(){
-        parser = parser();
-        //options = options();
-    }
-
-    /**
-     * @return Parser
-     */
-    protected abstract Parser parser();
-
-    /**
-     * @return Options
-     */
-    protected abstract Options options();
-
-    public abstract Map<String,String> parseConfig(String[] arguments) throws ParseException;
-
-    /**
-     * Load config as system properties
-     *
-     * @param arguments command line arguments
-     * @throws ParseException
-     */
-    public Config load(String[] arguments) throws ParseException {
-        Map<String,String> configProps = parseConfig(arguments);
-        for(Map.Entry<String,String> entry:configProps.entrySet()){
-            System.setProperty(entry.getKey(),entry.getValue());
-        }
-        System.setProperty("config.trace", "loads");
-        return ConfigFactory.load();
-    }
-
-    public CommandLine parse(String[] arguments) throws ParseException {
-        return this.parser.parse(this.options(),arguments);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/ConfigOptionParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/ConfigOptionParser.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/ConfigOptionParser.java
deleted file mode 100644
index bbd4e38..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/dataproc/util/ConfigOptionParser.java
+++ /dev/null
@@ -1,67 +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.dataproc.util;
-
-import org.apache.commons.cli.*;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class ConfigOptionParser extends AbstractConfigOptionParser {
-    private final static String CONFIG_OPT_FLAG = "D";
-
-    @Override
-    protected Parser parser() {
-        return new BasicParser();
-    }
-
-    @Override
-    protected Options options() {
-        Options options = new Options();
-        options.addOption(CONFIG_OPT_FLAG, true, "Config properties in format of \"-D key=value\"");
-        return options;
-    }
-
-    @Override
-    public Map<String,String> parseConfig(String[] arguments) throws ParseException {
-        CommandLine cmd = parse(arguments);
-        return parseCommand(cmd);
-    }
-
-    protected Map<String,String> parseCommand(CommandLine cmd) throws ParseException {
-        Map<String,String> result = new HashMap<>();
-        if(cmd.hasOption(CONFIG_OPT_FLAG)){
-            String[] values = cmd.getOptionValues(CONFIG_OPT_FLAG);
-            for(String value:values){
-                int eqIndex = value.indexOf("=");
-                if(eqIndex>0 && eqIndex<value.length()){
-                    String k = value.substring(0,eqIndex);
-                    String v = value.substring(eqIndex+1,value.length());
-                    if(result.containsKey(k)){
-                        throw new ParseException("Duplicated "+CONFIG_OPT_FLAG+" "+value);
-                    }else{
-                        result.put(k,v);
-                    }
-                }else{
-                    throw new ParseException("Invalid format: -"+CONFIG_OPT_FLAG+" "+value+", required: -"+CONFIG_OPT_FLAG+" key=value");
-                }
-            }
-        }
-        return result;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaMapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaMapper.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaMapper.java
deleted file mode 100644
index 7e66478..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaMapper.java
+++ /dev/null
@@ -1,26 +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.datastream;
-
-import java.util.List;
-
-public interface JavaMapper {
-    List<Object> map(List<Object> input);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaTypeCompatible.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaTypeCompatible.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaTypeCompatible.java
deleted file mode 100644
index 39ce6c2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/datastream/JavaTypeCompatible.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.apache.eagle.datastream;
-/*
- * 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.
- */
-
-/**
- * @since 12/8/15
- */
-public interface JavaTypeCompatible {
-    Class<?> getType();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/DataDistributionDao.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/DataDistributionDao.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/DataDistributionDao.java
deleted file mode 100644
index 0b17775..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/DataDistributionDao.java
+++ /dev/null
@@ -1,28 +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.partition;
-
-import java.io.Serializable;
-import java.util.List;
-
-public interface DataDistributionDao extends Serializable {
-
-    List<Weight> fetchDataDistribution(long startTime, long endTime) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionAlgorithm.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionAlgorithm.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionAlgorithm.java
deleted file mode 100644
index 0614388..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionAlgorithm.java
+++ /dev/null
@@ -1,29 +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.partition;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public interface PartitionAlgorithm extends Serializable {
-    Map<String, Integer> partition(List<Weight> weights, int k);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategy.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategy.java b/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategy.java
deleted file mode 100644
index e431f28..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-base/src/main/java/org/apache/eagle/partition/PartitionStrategy.java
+++ /dev/null
@@ -1,27 +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.partition;
-
-import java.io.Serializable;
-
-public interface PartitionStrategy extends Serializable {
-
-    int balance(String key, int buckNum);
-}



[51/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/0ea130ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/0ea130ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/0ea130ef

Branch: refs/heads/document
Commit: 0ea130efe1438bd4137b291e646f5cef3664c699
Parents: 2b09be9
Author: Hao Chen <ha...@apache.org>
Authored: Thu Mar 3 10:08:39 2016 -0800
Committer: Hao Chen <ha...@apache.org>
Committed: Thu Mar 3 10:08:39 2016 -0800

----------------------------------------------------------------------
 .travis.yml                                     |   22 -
 KEYS                                            |   71 -
 README.md                                       |   89 +-
 eagle-assembly/pom.xml                          |  126 -
 eagle-assembly/src/assembly/eagle-bin.xml       |  238 -
 eagle-assembly/src/main/README.md               |   97 -
 eagle-assembly/src/main/bin/eagle-ambari.sh     |   20 -
 eagle-assembly/src/main/bin/eagle-check-env.sh  |   43 -
 .../src/main/bin/eagle-create-table.rb          |   47 -
 .../src/main/bin/eagle-drop-tables.sh           |   26 -
 eagle-assembly/src/main/bin/eagle-env.sh        |   48 -
 eagle-assembly/src/main/bin/eagle-policy.sh     |  168 -
 .../src/main/bin/eagle-service-init.sh          |   35 -
 eagle-assembly/src/main/bin/eagle-service.sh    |  113 -
 .../src/main/bin/eagle-topology-init.sh         |  144 -
 eagle-assembly/src/main/bin/eagle-topology.sh   |  189 -
 .../src/main/bin/eagle-userprofile-scheduler.sh |  226 -
 .../src/main/bin/eagle-userprofile-training.sh  |  163 -
 .../src/main/bin/hadoop-metric-monitor.sh       |   50 -
 .../bin/hdfs-securitylog-metadata-create.sh     |   40 -
 .../src/main/bin/kafka-stream-monitor.sh        |   61 -
 eagle-assembly/src/main/bin/pipeline-runner.sh  |   52 -
 eagle-assembly/src/main/conf/eagle-service.conf |   36 -
 eagle-assembly/src/main/conf/log4j.properties   |   35 -
 eagle-assembly/src/main/conf/pipeline.conf      |   40 -
 .../main/conf/sandbox-hadoopjmx-pipeline.conf   |   49 -
 .../main/conf/sandbox-hadoopjmx-topology.conf   |   69 -
 .../sandbox-hbaseSecurityLog-application.conf   |   66 -
 .../conf/sandbox-hdfsAuditLog-application.conf  |   66 -
 .../sandbox-hdfsSecurityLog-application.conf    |   66 -
 .../conf/sandbox-hiveQueryLog-application.conf  |   63 -
 .../conf/sandbox-userprofile-scheduler.conf     |   66 -
 .../main/conf/sandbox-userprofile-topology.conf |   49 -
 eagle-assembly/src/main/docs/kafka.rb           |  191 -
 .../src/main/docs/logstash-kafka-conf.md        |  164 -
 .../src/main/examples/eagle-sandbox-starter.sh  |  136 -
 .../examples/hadoop-metric-policy-create.sh     |   45 -
 .../examples/hadoop-metric-sandbox-starter.sh   |  125 -
 .../src/main/examples/sample-policy-create.sh   |   31 -
 .../sample-sensitivity-resource-create.sh       |   32 -
 eagle-assembly/src/main/lib/share/.placeholder  |   14 -
 eagle-assembly/src/main/lib/tomcat/LICENSE      | 1050 --
 eagle-assembly/src/main/lib/tomcat/NOTICE       |   36 -
 .../src/main/lib/tomcat/RELEASE-NOTES           |  230 -
 eagle-assembly/src/main/lib/tomcat/RUNNING.txt  |  478 -
 .../src/main/lib/tomcat/bin/bootstrap.jar       |  Bin 28052 -> 0 bytes
 .../src/main/lib/tomcat/bin/catalina.sh         |  551 --
 .../src/main/lib/tomcat/bin/commons-daemon.jar  |  Bin 24283 -> 0 bytes
 .../src/main/lib/tomcat/bin/configtest.sh       |   60 -
 .../src/main/lib/tomcat/bin/daemon.sh           |  252 -
 .../src/main/lib/tomcat/bin/digest.sh           |   60 -
 .../src/main/lib/tomcat/bin/setclasspath.sh     |   94 -
 .../src/main/lib/tomcat/bin/shutdown.sh         |   60 -
 .../src/main/lib/tomcat/bin/startup.sh          |   60 -
 .../src/main/lib/tomcat/bin/tomcat-juli.jar     |  Bin 38222 -> 0 bytes
 .../src/main/lib/tomcat/bin/tool-wrapper.sh     |  139 -
 .../src/main/lib/tomcat/bin/version.sh          |   60 -
 .../src/main/lib/tomcat/conf/catalina.policy    |  248 -
 .../main/lib/tomcat/conf/catalina.properties    |  133 -
 .../src/main/lib/tomcat/conf/context.xml        |   35 -
 .../src/main/lib/tomcat/conf/logging.properties |   64 -
 .../src/main/lib/tomcat/conf/server.xml         |  144 -
 .../src/main/lib/tomcat/conf/tomcat-users.xml   |   36 -
 eagle-assembly/src/main/lib/tomcat/conf/web.xml | 4614 ---------
 .../src/main/lib/tomcat/lib/.keepempty          |   14 -
 .../src/main/lib/topology/.placeholder          |   14 -
 .../src/main/lib/userprofile/.placeholder       |   14 -
 eagle-core/eagle-alert/eagle-alert-base/pom.xml |   52 -
 .../eagle/alert/common/AlertEmailSender.java    |  159 -
 .../eagle/alert/email/AlertEmailComponent.java  |   32 -
 .../eagle/alert/email/AlertEmailContext.java    |   69 -
 .../eagle-alert-notification-plugin/pom.xml     |   90 -
 .../base/NotificationConstants.java             |   31 -
 .../notification/base/NotificationStatus.java   |   26 -
 .../notification/dao/AlertNotificationDAO.java  |   36 -
 .../dao/AlertNotificationDAOImpl.java           |   70 -
 .../notification/email/AlertEmailComponent.java |   32 -
 .../notification/email/AlertEmailContext.java   |   69 -
 .../notification/email/AlertEmailGenerator.java |  136 -
 .../email/AlertEmailGeneratorBuilder.java       |   59 -
 .../notification/email/AlertEmailSender.java    |  157 -
 .../plugin/AlertEagleStorePersister.java        |   85 -
 .../plugin/AlertEagleStorePlugin.java           |   99 -
 .../notification/plugin/AlertEmailPlugin.java   |  144 -
 .../notification/plugin/AlertKafkaPlugin.java   |  132 -
 .../plugin/KafkaProducerSingleton.java          |   44 -
 .../notification/plugin/NotificationPlugin.java |   59 -
 .../plugin/NotificationPluginLoader.java        |   92 -
 .../plugin/NotificationPluginManager.java       |   39 -
 .../plugin/NotificationPluginManagerImpl.java   |  158 -
 .../utils/NotificationPluginUtils.java          |   68 -
 .../src/main/resources/ALERT_DEFAULT.vm         |  275 -
 .../src/main/resources/application.conf         |   69 -
 .../main/resources/notification-plugins-init.sh |   66 -
 .../testcases/TestAlertEagleStorePlugin.java    |   48 -
 .../testcases/TestAlertEmailPlugin.java         |   56 -
 .../testcases/TestAlertKafkaPlugin.java         |   61 -
 .../testcases/TestGetAllNotifications.java      |   41 -
 .../testcases/TestNotificationPluginLoader.java |   41 -
 .../src/test/resources/application.conf         |   69 -
 .../src/test/resources/log4j.properties         |   35 -
 .../eagle-alert/eagle-alert-process/pom.xml     |  139 -
 .../eagle/alert/config/DeduplicatorConfig.java  |   37 -
 .../alert/config/EmailNotificationConfig.java   |   49 -
 .../eagle/alert/config/NotificationConfig.java  |   44 -
 .../apache/eagle/alert/config/Remediation.java  |   32 -
 .../dedup/AlertDeduplicationExecutorBase.java   |  192 -
 .../dedup/AlertEmailDeduplicationExecutor.java  |   30 -
 .../dedup/AlertEntityDeduplicationExecutor.java |   31 -
 .../eagle/alert/dedup/DefaultDeduplicator.java  |  116 -
 .../eagle/alert/dedup/EntityDeduplicator.java   |   36 -
 .../eagle/alert/dedup/EntityTagsUniq.java       |   81 -
 .../eagle/alert/executor/AlertExecutor.java     |   41 -
 .../executor/AlertExecutorCreationUtils.java    |  111 -
 .../notification/AlertNotificationExecutor.java |  128 -
 .../alert/persist/AlertPersistExecutor.java     |   56 -
 .../eagle/alert/persist/EaglePersist.java       |   71 -
 .../siddhi/SiddhiAlertAPIEntityRender.java      |  109 -
 .../src/main/resources/ALERT_DEFAULT.vm         |  266 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 .../src/main/resources/table-create.script      |   24 -
 .../src/test/java/META-INF/MANIFEST.MF          |   19 -
 .../eagle/alert/cep/TestSiddhiEvaluator.java    |  135 -
 .../eagle/alert/config/TestAlertDedup.java      |   38 -
 .../alert/dao/TestAlertDefinitionDAOImpl.java   |   81 -
 .../dao/TestSiddhiStreamMetadataUtils.java      |   60 -
 .../alert/dao/TestStreamDefinitionDAOImpl.java  |   67 -
 .../alert/executor/TestPolicyExecutor.java      |   85 -
 .../alert/policy/TestDynamicPolicyLoader.java   |  114 -
 .../alert/policy/TestPolicyDistribution.java    |   30 -
 .../policy/TestPolicyDistributionUpdater.java   |   99 -
 .../alert/policy/TestPolicyPartitioner.java     |   30 -
 .../alert/siddhi/TestExternalBatchWindow.java   |  307 -
 .../eagle/alert/siddhi/TestSiddhiEngine.java    |  243 -
 .../alert/siddhi/TestSiddhiSlideWindow.java     |  129 -
 .../eagle/alert/siddhi/TestSiddhiStream.java    |   34 -
 .../eagle/alert/state/TestAggregation.java      |   98 -
 .../alert/state/TestSiddhiExpiredEvents.java    |  129 -
 .../TestSiddhiStateSnapshotAndRestore.java      |  504 -
 .../src/test/resources/application.conf         |   33 -
 .../src/test/resources/log4j.properties         |   34 -
 .../src/test/resources/str.siddhiext            |   39 -
 .../src/test/resources/unittest.conf            |   65 -
 .../eagle-alert/eagle-alert-service/pom.xml     |   60 -
 .../alert/AlertPolicyValidateProvider.java      |   36 -
 .../service/alert/PolicyValidateResource.java   |   64 -
 .../SiddhiAlertPolicyValidateProvider.java      |  133 -
 .../alert/resolver/AttributeResolvable.java     |   44 -
 .../resolver/AttributeResolveException.java     |   26 -
 .../resolver/AttributeResolveResource.java      |   81 -
 .../resolver/AttributeResolveResponse.java      |   40 -
 .../resolver/AttributeResolverFactory.java      |   50 -
 .../BadAttributeResolveRequestException.java    |   31 -
 .../GenericAttributeResolveRequest.java         |   54 -
 .../alert/resolver/SiteApplicationObject.java   |   62 -
 .../alert/resolver/SiteApplicationResource.java |  189 -
 .../resolver/impl/BooleanAttributeResolver.java |   43 -
 .../resolver/impl/EntityAttributeResolver.java  |  142 -
 ...le.service.alert.AlertPolicyValidateProvider |   16 -
 .../src/main/resources/core-site.xml            |   24 -
 ...le.service.alert.AlertPolicyValidateProvider |   16 -
 .../src/test/resources/log4j.properties         |   35 -
 eagle-core/eagle-alert/pom.xml                  |   38 -
 .../eagle-data-process/eagle-job-common/pom.xml |   32 -
 .../eagle/job/DefaultJobPartitionerImpl.java    |   26 -
 .../java/org/apache/eagle/job/JobFilter.java    |   21 -
 .../apache/eagle/job/JobFilterByPartition.java  |   37 -
 .../org/apache/eagle/job/JobPartitioner.java    |   21 -
 .../eagle-storm-jobrunning-spout/pom.xml        |   66 -
 .../DefaultRunningJobInputStreamCallback.java   |   58 -
 .../jobrunning/callback/RunningJobCallback.java |   37 -
 .../callback/RunningJobMessageId.java           |   56 -
 .../eagle/jobrunning/common/JobConstants.java   |   53 -
 .../config/RunningJobCrawlConfig.java           |   53 -
 .../jobrunning/counter/CounterGroupKey.java     |   30 -
 .../eagle/jobrunning/counter/CounterKey.java    |   28 -
 .../eagle/jobrunning/counter/JobCounters.java   |   38 -
 .../counter/parser/JobCountersParser.java       |   26 -
 .../counter/parser/JobCountersParserImpl.java   |   44 -
 .../jobrunning/crawler/ConfigWorkTask.java      |   66 -
 .../eagle/jobrunning/crawler/JobContext.java    |   55 -
 .../jobrunning/crawler/RMResourceFetcher.java   |  272 -
 .../jobrunning/crawler/ResourceFetcher.java     |   27 -
 .../jobrunning/crawler/RunningJobCrawler.java   |   28 -
 .../crawler/RunningJobCrawlerImpl.java          |  352 -
 .../eagle/jobrunning/crawler/XmlHelper.java     |   55 -
 .../eagle/jobrunning/ha/HAURLSelector.java      |   31 -
 .../eagle/jobrunning/ha/HAURLSelectorImpl.java  |  101 -
 .../jobrunning/job/conf/JobConfParser.java      |   26 -
 .../jobrunning/job/conf/JobConfParserImpl.java  |   42 -
 .../storm/JobRunningContentFilter.java          |   27 -
 .../storm/JobRunningContentFilterImpl.java      |   36 -
 .../eagle/jobrunning/storm/JobRunningSpout.java |  200 -
 .../JobRunningSpoutCollectorInterceptor.java    |   47 -
 ...JobCompleteCounterServiceURLBuilderImpl.java |   29 -
 .../JobCompleteDetailServiceURLBuilderImpl.java |   31 -
 ...JobCompletedConfigServiceURLBuilderImpl.java |   30 -
 .../url/JobCountersServiceURLBuilderImpl.java   |   33 -
 .../url/JobDetailServiceURLBuilderImpl.java     |   28 -
 .../url/JobListServiceURLBuilderImpl.java       |   37 -
 .../JobRunningConfigServiceURLBuilderImpl.java  |   33 -
 .../url/JobStatusServiceURLBuilderImpl.java     |   29 -
 .../eagle/jobrunning/url/ServiceURLBuilder.java |   21 -
 .../eagle/jobrunning/util/InputStreamUtils.java |   61 -
 .../apache/eagle/jobrunning/util/JobUtils.java  |   43 -
 .../jobrunning/util/URLConnectionUtils.java     |  108 -
 .../apache/eagle/jobrunning/yarn/model/App.java |  145 -
 .../eagle/jobrunning/yarn/model/AppInfo.java    |  146 -
 .../eagle/jobrunning/yarn/model/AppWrapper.java |   35 -
 .../jobrunning/yarn/model/Applications.java     |   38 -
 .../jobrunning/yarn/model/AppsWrapper.java      |   36 -
 .../eagle/jobrunning/yarn/model/Counter.java    |   51 -
 .../jobrunning/yarn/model/CounterGroup.java     |   39 -
 .../yarn/model/JobCompleteWrapper.java          |   34 -
 .../jobrunning/yarn/model/JobCounters.java      |   39 -
 .../yarn/model/JobCountersWrapper.java          |   32 -
 .../jobrunning/yarn/model/JobDetailInfo.java    |  243 -
 .../eagle/jobrunning/yarn/model/Jobs.java       |   38 -
 .../jobrunning/yarn/model/JobsWrapper.java      |   37 -
 .../jobrunning/zkres/JobRunningZKStateLCM.java  |   35 -
 .../zkres/JobRunningZKStateManager.java         |  210 -
 .../src/main/resources/log4j.properties         |   34 -
 .../src/test/resources/hive-jobrunning.conf     |   54 -
 .../src/test/resources/log4j.properties         |   34 -
 .../eagle-stream-pipeline/README.md             |   61 -
 .../eagle-stream-pipeline/pom.xml               |  158 -
 .../apache/eagle/stream/pipeline/Pipeline.scala |   27 -
 .../stream/pipeline/annotation/Extension.scala  |   21 -
 .../pipeline/compiler/PipelineCompiler.scala    |   61 -
 .../pipeline/extension/ModuleManager.scala      |  186 -
 .../eagle/stream/pipeline/parser/DataFlow.scala |  235 -
 .../eagle/stream/pipeline/parser/Pipeline.scala |   89 -
 .../eagle/stream/pipeline/parser/Schema.scala   |  152 -
 .../stream/pipeline/runner/PipelineRunner.scala |  115 -
 .../stream/pipeline/utils/Exceptions.scala      |   20 -
 .../src/test/resources/application.conf         |   34 -
 .../src/test/resources/eagle-pipeline.sh        |   20 -
 .../src/test/resources/log4j.properties         |   19 -
 .../src/test/resources/pipeline_1.conf          |  131 -
 .../src/test/resources/pipeline_2.conf          |   93 -
 .../src/test/resources/pipeline_3.conf          |  152 -
 .../src/test/resources/pipeline_4.conf          |  125 -
 .../src/test/resources/pipeline_5.conf          |  110 -
 .../eagle/stream/pipeline/ConfigSpec.scala      |   37 -
 .../eagle/stream/pipeline/DataFlowSpec.scala    |  113 -
 .../eagle/stream/pipeline/PipelineSpec.scala    |   61 -
 .../eagle-stream-process-api/pom.xml            |  145 -
 .../impl/aggregate/AggregateExecutor.java       |   46 -
 .../aggregate/AggregateExecutorFactory.java     |  117 -
 .../impl/aggregate/AggregateResultRender.java   |   45 -
 .../impl/aggregate/SimpleAggregateExecutor.java |  189 -
 .../entity/AggregateDefinitionAPIEntity.java    |  121 -
 .../impl/aggregate/entity/AggregateEntity.java  |   43 -
 .../entity/AggregateEntityRepository.java       |   28 -
 .../dataproc/impl/persist/IPersistService.java  |   28 -
 .../dataproc/impl/persist/PersistExecutor.java  |   84 -
 .../druid/AggregateEntitySerializer.java        |   66 -
 .../impl/persist/druid/KafkaPersistService.java |  122 -
 .../dataproc/impl/storm/StormSpoutProvider.java |   29 -
 .../storm/hdfs/DataCollectionHDFSSpout.java     |  230 -
 .../hdfs/HDFSSourcedStormSpoutProvider.java     |   61 -
 .../hdfs/UserProfileGenerationHDFSSpout.java    |  299 -
 .../impl/storm/kafka/JsonSerializer.java        |   58 -
 .../storm/kafka/KafkaSourcedSpoutProvider.java  |  104 -
 .../storm/kafka/KafkaSourcedSpoutScheme.java    |   71 -
 .../kafka/SpoutKafkaMessageDeserializer.java    |   23 -
 .../partition/CustomPartitionGrouping.java      |   51 -
 .../impl/storm/zookeeper/ZKStateConfig.java     |   28 -
 .../datastream/JavaMapperStormExecutor.java     |   83 -
 .../JavaStormExecutorForAlertWrapper.java       |   62 -
 .../eagle/datastream/utils/JavaReflections.java |   31 -
 .../datastream/ExecutionEnvironments.scala      |  140 -
 .../core/AbstractTopologyCompiler.scala         |   21 -
 .../core/AbstractTopologyExecutor.scala         |   21 -
 .../eagle/datastream/core/Configuration.scala   |   74 -
 .../datastream/core/ExecutionEnvironment.scala  |   45 -
 .../core/StreamAggregateExpansion.scala         |   80 -
 .../datastream/core/StreamAlertExpansion.scala  |  257 -
 .../eagle/datastream/core/StreamBuilder.scala   |   95 -
 .../eagle/datastream/core/StreamConnector.scala |   97 -
 .../eagle/datastream/core/StreamDAG.scala       |   70 -
 .../datastream/core/StreamDAGExpansion.scala    |   27 -
 .../datastream/core/StreamDAGTransformer.scala  |   46 -
 .../core/StreamGroupbyExpansion.scala           |   77 -
 .../datastream/core/StreamNameExpansion.scala   |   49 -
 .../core/StreamParallelismConfigExpansion.scala |   65 -
 .../eagle/datastream/core/StreamProducer.scala  |  342 -
 .../datastream/core/StreamProducerGraph.scala   |   29 -
 .../eagle/datastream/core/StreamProtocol.scala  |  193 -
 .../datastream/core/StreamSourceBuilder.scala   |   63 -
 .../datastream/core/StreamUnionExpansion.scala  |   71 -
 .../datastream/storm/AbstractStreamBolt.scala   |  119 -
 .../datastream/storm/FilterBoltWrapper.scala    |   41 -
 .../datastream/storm/ForeachBoltWrapper.scala   |   44 -
 .../datastream/storm/IterableStreamSpout.scala  |   71 -
 .../datastream/storm/IteratorStreamSpout.scala  |   65 -
 .../datastream/storm/JavaStormBoltWrapper.scala |   51 -
 .../storm/JsonMessageDeserializer.scala         |   49 -
 .../datastream/storm/KafkaStreamMonitor.scala   |   31 -
 .../eagle/datastream/storm/MapBoltWrapper.scala |   66 -
 .../eagle/datastream/storm/SpoutProxy.scala     |  111 -
 .../datastream/storm/StormBoltFactory.scala     |   64 -
 .../datastream/storm/StormBoltWrapper.scala     |   61 -
 .../storm/StormExecutionEnvironment.scala       |   39 -
 .../storm/StormExecutorForAlertWrapper.scala    |   44 -
 .../storm/StormFlatFunctionWrapper.scala        |   45 -
 .../storm/StormFlatMapperWrapper.scala          |   44 -
 .../datastream/storm/StormSpoutFactory.scala    |   69 -
 .../storm/StormTopologyCompiler.scala           |  118 -
 .../storm/StormTopologyExecutorImpl.scala       |  103 -
 .../datastream/storm/StormWrapperUtils.scala    |   28 -
 .../utils/AlertExecutorConsumerUtils.scala      |   76 -
 .../eagle/datastream/utils/GraphPrinter.scala   |   59 -
 .../eagle/datastream/utils/NameConstants.scala  |   24 -
 .../datastream/utils/NodeNameSelector.scala     |   28 -
 .../eagle/datastream/utils/ReflectionS.scala    |   55 -
 .../eagle/datastream/utils/UnionUtils.scala     |   43 -
 .../dataproc/util/TestConfigOptionParser.java   |  105 -
 .../eagle/datastream/JavaEchoExecutor.java      |   45 -
 .../TestExecutionEnvironmentJava.java           |   41 -
 .../apache/eagle/datastream/TestJavaMain.java   |   57 -
 .../datastream/TestJavaReflectionUtils.java     |   36 -
 .../datastream/TestKafkaStreamMonitor.java      |   28 -
 .../datastream/TestSimpleAggregateExecutor.java |   73 -
 .../eagle/datastream/TestStreamAggregate.java   |  152 -
 .../src/test/resources/application.conf         |   79 -
 .../src/test/resources/event-metadata-init.sh   |   41 -
 .../src/test/resources/log4j.properties         |   35 -
 .../datastream/StormWrapperUtilsSpec.scala      |   40 -
 .../eagle/datastream/TestDAGExpansion.scala     |  104 -
 .../datastream/TestExecutionEnvironment.scala   |   34 -
 .../org/apache/eagle/datastream/TestScala.scala |   20 -
 .../eagle/datastream/TestStormNodes.scala       |  160 -
 .../eagle/datastream/TestStormRunner.scala      |  120 -
 .../eagle/datastream/TestStreamDAGBuilder.scala |  236 -
 .../eagle/datastream/TestTypeSafedDSL.scala     |  115 -
 .../eagle-stream-process-base/pom.xml           |  130 -
 .../dataproc/core/EagleOutputCollector.java     |   27 -
 .../eagle/dataproc/core/JsonSerDeserUtils.java  |   54 -
 .../core/StreamingProcessConstants.java         |   23 -
 .../apache/eagle/dataproc/core/ValuesArray.java |   38 -
 .../util/AbstractConfigOptionParser.java        |   68 -
 .../eagle/dataproc/util/ConfigOptionParser.java |   67 -
 .../org/apache/eagle/datastream/JavaMapper.java |   26 -
 .../eagle/datastream/JavaTypeCompatible.java    |   24 -
 .../eagle/partition/DataDistributionDao.java    |   28 -
 .../eagle/partition/PartitionAlgorithm.java     |   29 -
 .../eagle/partition/PartitionStrategy.java      |   27 -
 .../eagle/partition/PartitionStrategyImpl.java  |   86 -
 .../java/org/apache/eagle/partition/Weight.java |   30 -
 .../org/apache/eagle/datastream/Collector.scala |   21 -
 .../apache/eagle/datastream/FlatMapper.scala    |   25 -
 .../eagle/datastream/StormStreamExecutor.scala  |   69 -
 eagle-core/eagle-data-process/pom.xml           |   36 -
 .../eagle-embed/eagle-embed-hbase/pom.xml       |   73 -
 .../src/main/initdata/eagle-topology-init.sh    |   98 -
 .../src/main/initdata/prepare-dev-data.sh       |   21 -
 .../src/main/initdata/sample-policy-create.sh   |   31 -
 .../sample-sensitivity-resource-create.sh       |   30 -
 .../eagle/service/hbase/EmbeddedHbase.java      |  132 -
 .../org/apache/eagle/service/hbase/Tables.java  |   51 -
 .../src/main/resources/hbase-default.xml        |  935 --
 .../eagle/service/hbase/TestHBaseBase.java      |   35 -
 .../eagle-embed/eagle-embed-server/pom.xml      |   85 -
 .../eagle-embed-server/runEmbeddedServer.sh     |   19 -
 .../service/embedded/tomcat/EmbeddedServer.java |  109 -
 .../embedded/tomcat/TestEmbeddedServer.java     |   26 -
 eagle-core/eagle-embed/pom.xml                  |   37 -
 .../eagle-machinelearning-base/pom.xml          |   38 -
 .../apache/eagle/ml/MLAlgorithmEvaluator.java   |   50 -
 .../org/apache/eagle/ml/MLAnomalyCallback.java  |   28 -
 .../java/org/apache/eagle/ml/MLConstants.java   |   24 -
 .../java/org/apache/eagle/ml/MLModelDAO.java    |   30 -
 .../org/apache/eagle/ml/MLPolicyEvaluator.java  |  170 -
 .../eagle/ml/impl/MLAnomalyCallbackImpl.java    |  107 -
 .../apache/eagle/ml/impl/MLModelDAOImpl.java    |   62 -
 .../MLPolicyEvaluatorServiceProviderImpl.java   |   52 -
 .../org/apache/eagle/ml/model/MLAlgorithm.java  |   61 -
 .../apache/eagle/ml/model/MLCallbackResult.java |  137 -
 .../eagle/ml/model/MLEntityRepository.java      |   25 -
 .../apache/eagle/ml/model/MLModelAPIEntity.java |   67 -
 .../eagle/ml/model/MLPolicyDefinition.java      |   82 -
 .../eagle/ml/utils/MLReflectionUtils.java       |   38 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 .../src/test/resources/application.conf         |   57 -
 .../src/test/resources/log4j.properties         |   34 -
 .../test/resources/ml-policyDef-UserProfile.txt |   51 -
 eagle-core/eagle-machinelearning/pom.xml        |   35 -
 eagle-core/eagle-metric/pom.xml                 |   51 -
 .../apache/eagle/metric/MetricConstants.java    |   24 -
 .../metric/reportor/EagleCounterMetric.java     |   73 -
 .../eagle/metric/reportor/EagleGaugeMetric.java |   45 -
 .../eagle/metric/reportor/EagleMetric.java      |   64 -
 .../eagle/metric/reportor/EagleMetricKey.java   |   28 -
 .../metric/reportor/EagleMetricListener.java    |   31 -
 .../EagleServiceReporterMetricListener.java     |   63 -
 .../eagle/metric/reportor/IEagleMetric.java     |   40 -
 .../metric/reportor/MetricEntityAdaptor.java    |   50 -
 .../metric/reportor/MetricKeyCodeDecoder.java   |   64 -
 .../src/test/resources/log4j.properties         |   34 -
 .../eagle-policy/eagle-policy-base/pom.xml      |   62 -
 .../entity/AbstractPolicyDefinitionEntity.java  |   27 -
 .../eagle/alert/entity/AlertAPIEntity.java      |   93 -
 .../alert/entity/AlertContextSerDeser.java      |   98 -
 .../alert/entity/AlertDataSourceEntity.java     |   68 -
 .../alert/entity/AlertDefinitionAPIEntity.java  |  194 -
 .../alert/entity/AlertEntityRepository.java     |   38 -
 .../eagle/alert/entity/AlertExecutorEntity.java |   48 -
 .../alert/entity/AlertNotificationEntity.java   |   66 -
 .../eagle/alert/entity/AlertStreamEntity.java   |   51 -
 .../alert/entity/AlertStreamSchemaEntity.java   |  111 -
 .../entity/ApplicationDescServiceEntity.java    |   94 -
 .../alert/entity/FeatureDescServiceEntity.java  |   59 -
 .../alert/entity/GenericResourceEntity.java     |   47 -
 .../entity/SiteApplicationServiceEntity.java    |   60 -
 .../alert/entity/SiteDescServiceEntity.java     |   48 -
 .../eagle/policy/DefaultPolicyPartitioner.java  |   32 -
 .../eagle/policy/DynamicPolicyLoader.java       |  268 -
 .../org/apache/eagle/policy/PartitionUtils.java |   31 -
 .../policy/PolicyDistStatsDAOLogReporter.java   |   47 -
 .../policy/PolicyDistributionReportMethods.java |   27 -
 .../eagle/policy/PolicyDistributionStats.java   |   74 -
 .../policy/PolicyDistributionStatsDAO.java      |   26 -
 .../policy/PolicyDistroStatsLogReporter.java    |   50 -
 .../eagle/policy/PolicyEvaluationContext.java   |   34 -
 .../apache/eagle/policy/PolicyEvaluator.java    |   61 -
 .../policy/PolicyEvaluatorServiceProvider.java  |   49 -
 .../eagle/policy/PolicyLifecycleMethods.java    |   27 -
 .../org/apache/eagle/policy/PolicyManager.java  |   61 -
 .../apache/eagle/policy/PolicyPartitioner.java  |   26 -
 .../org/apache/eagle/policy/ResultRender.java   |   32 -
 .../apache/eagle/policy/common/Constants.java   |   75 -
 .../apache/eagle/policy/common/UrlBuilder.java  |   63 -
 .../policy/config/AbstractPolicyDefinition.java |   42 -
 .../eagle/policy/dao/AlertExecutorDAO.java      |   26 -
 .../eagle/policy/dao/AlertExecutorDAOImpl.java  |   88 -
 .../apache/eagle/policy/dao/AlertStreamDAO.java |   25 -
 .../eagle/policy/dao/AlertStreamDAOImpl.java    |   60 -
 .../eagle/policy/dao/AlertStreamSchemaDAO.java  |   25 -
 .../policy/dao/AlertStreamSchemaDAOImpl.java    |   84 -
 .../eagle/policy/dao/PolicyDefinitionDAO.java   |   47 -
 .../dao/PolicyDefinitionEntityDAOImpl.java      |  118 -
 .../eagle/policy/executor/IPolicyExecutor.java  |   29 -
 .../policy/executor/PolicyProcessExecutor.java  |  442 -
 .../eagle/policy/siddhi/AttributeType.java      |   30 -
 .../policy/siddhi/SiddhiEvaluationHandler.java  |   27 -
 .../siddhi/SiddhiOutputStreamCallback.java      |   68 -
 .../policy/siddhi/SiddhiPolicyDefinition.java   |   56 -
 .../policy/siddhi/SiddhiPolicyEvaluator.java    |  315 -
 ...iddhiPolicyEvaluatorServiceProviderImpl.java |   46 -
 .../policy/siddhi/SiddhiQueryCallbackImpl.java  |   95 -
 .../siddhi/SiddhiStreamMetadataUtils.java       |  119 -
 .../policy/siddhi/StreamMetadataManager.java    |  128 -
 .../extension/ContainsIgnoreCaseExtension.java  |   87 -
 .../extension/EqualsIgnoreCaseExtension.java    |   91 -
 .../ExternalTimeBatchWindowProcessor.java       |  184 -
 .../RegexpIgnoreCaseFunctionExtension.java      |   89 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 .../src/main/resources/eagle.siddhiext          |   18 -
 .../src/main/resources/str.siddhiext            |   40 -
 .../apache/eagle/policy/dao/TestSchemaDao.java  |   37 -
 eagle-core/eagle-policy/pom.xml                 |   37 -
 eagle-core/eagle-query/eagle-antlr/pom.xml      |   42 -
 .../eagle-antlr/src/main/java/EagleFilter.g4    |  114 -
 .../query/antlr/generated/EagleFilter.tokens    |   36 -
 .../generated/EagleFilterBaseListener.java      |   91 -
 .../query/antlr/generated/EagleFilterLexer.java |  216 -
 .../antlr/generated/EagleFilterLexer.tokens     |   36 -
 .../antlr/generated/EagleFilterListener.java    |   57 -
 .../antlr/generated/EagleFilterParser.java      |  364 -
 .../eagle/query/parser/ANDExpression.java       |   33 -
 .../eagle/query/parser/AtomicExpression.java    |   67 -
 .../eagle/query/parser/ComparisonOperator.java  |   55 -
 .../query/parser/EagleANTLRErrorStrategy.java   |   48 -
 .../parser/EagleQueryFilterListenerImpl.java    |  176 -
 .../query/parser/EagleQueryParseException.java  |   29 -
 .../eagle/query/parser/EagleQueryParser.java    |   54 -
 .../eagle/query/parser/LogicalOperator.java     |   23 -
 .../apache/eagle/query/parser/ORExpression.java |   60 -
 .../eagle/query/parser/TokenConstant.java       |   52 -
 .../apache/eagle/query/parser/TokenType.java    |   44 -
 .../UnsupportedExpressionOperatorException.java |   25 -
 .../eagle-antlr/src/main/java/readme.txt        |   31 -
 .../query/parser/test/TestEagleQueryParser.java |  832 --
 .../eagle/query/parser/test/TestValueType.java  |   73 -
 eagle-core/eagle-query/eagle-audit-base/pom.xml |   51 -
 .../eagle/audit/common/AuditConstants.java      |   35 -
 .../apache/eagle/audit/common/AuditEvent.java   |   51 -
 .../eagle/audit/common/AuditListenerMap.java    |   43 -
 .../audit/common/BaseAuditListenerMap.java      |  149 -
 .../apache/eagle/audit/dao/ServiceAuditDAO.java |   90 -
 .../eagle/audit/dao/ServiceAuditDAOImpl.java    |  176 -
 .../eagle/audit/entity/GenericAuditEntity.java  |   80 -
 .../entity/repo/AuditEntityRepository.java      |   28 -
 .../eagle/audit/listener/AuditListener.java     |   25 -
 .../audit/listener/AuditListenerProxy.java      |   41 -
 .../eagle/audit/listener/AuditSupport.java      |  111 -
 .../eagle-query/eagle-client-base/pom.xml       |   70 -
 .../service/client/EagleServiceAsyncClient.java |  117 -
 .../client/EagleServiceClientException.java     |   64 -
 .../service/client/EagleServiceConnector.java   |   70 -
 .../client/EagleServiceGroupByQueryRequest.java |  173 -
 .../client/EagleServiceQueryBuilder.java        |  107 -
 .../client/EagleServiceQueryRequest.java        |  151 -
 .../EagleServiceSingleEntityQueryRequest.java   |  211 -
 .../service/client/IEagleServiceClient.java     |  129 -
 .../client/IEagleServiceRequestBuilder.java     |   83 -
 .../ListGroupByQueryAPIResponseEntity.java      |   90 -
 .../ListQueryAPIResponseConvertHelper.java      |  117 -
 .../ListTimeSeriesQueryAPIResponseEntity.java   |   84 -
 .../RowkeyQueryAPIResponseConvertHelper.java    |  110 -
 .../eagle/service/client/ServiceConfig.java     |   40 -
 .../TimeSeriesGroupByAPIResponseEntity.java     |  101 -
 .../eagle/service/client/impl/BatchSender.java  |   93 -
 .../service/client/impl/ConcurrentSender.java   |  170 -
 .../client/impl/DeleteRequestBuilder.java       |  137 -
 .../impl/EagleServiceAsyncClientImpl.java       |  156 -
 .../client/impl/EagleServiceBaseClient.java     |  339 -
 .../client/impl/EagleServiceClientImpl.java     |  201 -
 .../eagle/service/client/impl/MetricSender.java |   75 -
 .../client/impl/SearchRequestBuilder.java       |   97 -
 .../client/security/SecurityConstants.java      |   22 -
 .../org/apache/eagle/service/client/Base.java   |   31 -
 .../org/apache/eagle/service/client/ClassA.java |   35 -
 .../org/apache/eagle/service/client/ClassB.java |   34 -
 .../eagle/service/client/ClientTestBase.java    |   32 -
 .../client/TestEagleServiceClientImpl.java      |  339 -
 .../service/client/TestIEagleServiceClient.java |   64 -
 .../eagle/service/client/TestJackson.java       |   63 -
 .../service/jackson/TestJacksonMarshalling.java |  149 -
 .../src/test/resources/log4j.properties         |   21 -
 eagle-core/eagle-query/eagle-common/pom.xml     |   84 -
 .../src/main/java/META-INF/MANIFEST.MF          |   19 -
 .../java/org/apache/eagle/common/Base64.java    |   44 -
 .../java/org/apache/eagle/common/ByteUtil.java  |  178 -
 .../apache/eagle/common/CircularArrayList.java  |  149 -
 .../common/CircularArrayListSortedSet.java      |  106 -
 .../org/apache/eagle/common/DateTimeUtil.java   |  138 -
 .../apache/eagle/common/EagleBase64Wrapper.java |   32 -
 .../eagle/common/EagleExceptionWrapper.java     |   42 -
 .../org/apache/eagle/common/Environment.java    |   23 -
 .../main/java/org/apache/eagle/common/OS.java   |   41 -
 .../apache/eagle/common/config/EagleConfig.java |   57 -
 .../common/config/EagleConfigConstants.java     |   59 -
 .../eagle/common/config/EagleConfigFactory.java |  191 -
 .../eagle/common/config/EagleConfigHelper.java  |   51 -
 .../eagle/common/email/EagleMailClient.java     |  248 -
 .../eagle/common/metric/AlertContext.java       |   66 -
 .../common/service/HadoopAccountService.java    |   23 -
 .../apache/eagle/common/service/HadoopUser.java |   44 -
 .../eagle/common/service/LdapService.java       |  259 -
 .../common/service/POSTResultEntityBase.java    |   42 -
 .../service/TrustAllSSLSocketFactory.java       |   94 -
 .../eagle-common/src/main/resources/footer.vm   |   25 -
 .../eagle-common/src/main/resources/header.vm   |  303 -
 .../src/main/resources/templates/tec_alert.vm   |  113 -
 .../org/apache/eagle/common/TestByteUtil.java   |  112 -
 .../eagle/common/TestCircularArrayList.java     |   75 -
 .../common/TestCircularArrayListSortedSet.java  |   59 -
 .../apache/eagle/common/TestDateTimeUtil.java   |   88 -
 .../eagle/common/TestEagleBase64Wrapper.java    |   38 -
 .../eagle/common/config/TestEagleConfig.java    |   43 -
 .../eagle-common/src/test/resources/footer.vm   |   25 -
 .../eagle-common/src/test/resources/header.vm   |  299 -
 .../src/test/resources/log4j.properties         |   34 -
 .../src/test/resources/templates/tec_alert.vm   |  119 -
 .../resources/templates/test_anomaly_alert.vm   |  137 -
 .../src/test/resources/test-service-config.conf |   30 -
 .../eagle-query/eagle-entity-base/pom.xml       |   85 -
 .../eagle/log/base/taggedlog/EntityContext.java |   40 -
 .../log/base/taggedlog/NoSuchRowException.java  |   29 -
 .../log/base/taggedlog/RowkeyAPIEntity.java     |   81 -
 .../log/base/taggedlog/TaggedLogAPIEntity.java  |  238 -
 .../base/taggedlog/TaggedLogObjectMapper.java   |   35 -
 .../log/entity/AbstractHBaseLogReader.java      |  240 -
 .../eagle/log/entity/BaseEntityRepository.java  |   26 -
 .../log/entity/EntityCreationListener.java      |   26 -
 .../eagle/log/entity/EntityQualifierUtils.java  |  281 -
 .../org/apache/eagle/log/entity/EntityUniq.java |   67 -
 .../entity/GenericCreateAPIResponseEntity.java  |   57 -
 .../log/entity/GenericEntityBatchReader.java    |   58 -
 .../entity/GenericEntityScanStreamReader.java   |  129 -
 .../log/entity/GenericEntityStreamReader.java   |  125 -
 .../log/entity/GenericEntityStreamReaderMT.java |  151 -
 .../eagle/log/entity/GenericEntityWriter.java   |   78 -
 .../eagle/log/entity/GenericMetricEntity.java   |   59 -
 .../entity/GenericMetricEntityBatchReader.java  |   54 -
 ...ricMetricEntityDecompactionStreamReader.java |   98 -
 .../log/entity/GenericMetricShadowEntity.java   |   34 -
 .../entity/GenericServiceAPIResponseEntity.java |  121 -
 ...ricServiceAPIResponseEntityDeserializer.java |   84 -
 .../log/entity/HBaseInternalLogHelper.java      |  245 -
 .../eagle/log/entity/HBaseLogReader2.java       |   86 -
 .../apache/eagle/log/entity/HBaseLogWriter.java |  152 -
 .../apache/eagle/log/entity/InternalLog.java    |  139 -
 .../log/entity/ListQueryAPIResponseEntity.java  |   78 -
 .../org/apache/eagle/log/entity/LogReader.java  |   28 -
 .../org/apache/eagle/log/entity/LogWriter.java  |   32 -
 .../eagle/log/entity/MetricMetadataEntity.java  |  117 -
 .../log/entity/QualifierCreationListener.java   |   28 -
 .../entity/QualifierNotDefinedException.java    |   28 -
 .../apache/eagle/log/entity/RowkeyBuilder.java  |  140 -
 .../entity/RowkeyQueryAPIResponseEntity.java    |   45 -
 .../eagle/log/entity/SearchCondition.java       |  148 -
 .../apache/eagle/log/entity/StreamReader.java   |   55 -
 .../filter/BooleanExpressionComparator.java     |  300 -
 .../log/entity/filter/HBaseFilterBuilder.java   |  585 --
 .../entity/filter/QualifierFilterEntity.java    |  105 -
 .../eagle/log/entity/filter/RowValueFilter.java |  144 -
 .../entity/filter/TypedByteArrayComparator.java |  213 -
 .../eagle/log/entity/index/IndexLogReader.java  |   45 -
 .../log/entity/index/IndexStreamReader.java     |   94 -
 .../index/NonClusteredIndexLogReader.java       |  197 -
 .../index/NonClusteredIndexStreamReader.java    |   51 -
 .../eagle/log/entity/index/RowKeyLogReader.java |  107 -
 .../log/entity/index/UniqueIndexLogReader.java  |  124 -
 .../entity/index/UniqueIndexStreamReader.java   |   52 -
 .../eagle/log/entity/meta/BooleanSerDeser.java  |   54 -
 .../apache/eagle/log/entity/meta/Column.java    |   28 -
 .../eagle/log/entity/meta/ColumnFamily.java     |   28 -
 .../log/entity/meta/Double2DArraySerDeser.java  |   97 -
 .../log/entity/meta/DoubleArraySerDeser.java    |   68 -
 .../eagle/log/entity/meta/DoubleSerDeser.java   |   41 -
 .../eagle/log/entity/meta/EntityConstants.java  |   30 -
 .../eagle/log/entity/meta/EntityDefinition.java |  318 -
 .../entity/meta/EntityDefinitionManager.java    |  463 -
 .../eagle/log/entity/meta/EntitySerDeser.java   |   23 -
 .../log/entity/meta/EntitySerDeserializer.java  |   79 -
 .../org/apache/eagle/log/entity/meta/Index.java |   32 -
 .../eagle/log/entity/meta/IndexDefinition.java  |  335 -
 .../apache/eagle/log/entity/meta/Indexes.java   |   29 -
 .../eagle/log/entity/meta/IntArraySerDeser.java |   71 -
 .../eagle/log/entity/meta/IntSerDeser.java      |   42 -
 .../eagle/log/entity/meta/ListSerDeser.java     |  128 -
 .../eagle/log/entity/meta/LongSerDeser.java     |   43 -
 .../eagle/log/entity/meta/MapSerDeser.java      |  168 -
 .../apache/eagle/log/entity/meta/Metric.java    |   29 -
 .../eagle/log/entity/meta/MetricDefinition.java |   68 -
 .../eagle/log/entity/meta/NonUniqueIndex.java   |   28 -
 .../eagle/log/entity/meta/NonUniqueIndexes.java |   31 -
 .../eagle/log/entity/meta/NullObject.java       |   21 -
 .../eagle/log/entity/meta/NullSerDeser.java     |   37 -
 .../apache/eagle/log/entity/meta/Partition.java |   40 -
 .../apache/eagle/log/entity/meta/Prefix.java    |   28 -
 .../apache/eagle/log/entity/meta/Qualifier.java |  100 -
 .../apache/eagle/log/entity/meta/Service.java   |   28 -
 .../eagle/log/entity/meta/ServicePath.java      |   34 -
 .../log/entity/meta/StringArraySerDeser.java    |   94 -
 .../eagle/log/entity/meta/StringSerDeser.java   |   39 -
 .../org/apache/eagle/log/entity/meta/Table.java |   28 -
 .../org/apache/eagle/log/entity/meta/Tags.java  |   31 -
 .../eagle/log/entity/meta/TimeSeries.java       |   28 -
 .../log/entity/old/GenericByRowkeyReader.java   |   78 -
 .../eagle/log/entity/old/GenericDeleter.java    |  135 -
 .../eagle/log/entity/old/GenericReader.java     |  115 -
 .../eagle/log/entity/old/GenericWriter.java     |   93 -
 .../log/entity/old/HBaseLogByRowkeyReader.java  |  161 -
 .../eagle/log/entity/old/HBaseLogDeleter.java   |  131 -
 .../eagle/log/entity/old/HBaseLogReader.java    |  247 -
 .../apache/eagle/log/entity/old/LogDeleter.java |   34 -
 .../eagle/log/entity/old/RowkeyHelper.java      |   85 -
 .../org/apache/eagle/log/entity/old/Schema.java |   24 -
 .../entity/repo/DefaultEntityRepository.java    |   34 -
 .../eagle/log/entity/repo/EntityRepository.java |   56 -
 .../entity/repo/EntityRepositoryScanner.java    |   72 -
 .../eagle/log/entity/test/TestEntity.java       |  107 -
 .../eagle/log/entity/test/TestLogAPIEntity.java |   99 -
 .../entity/test/TestTimeSeriesAPIEntity.java    |  101 -
 .../eagle/log/expression/ExpressionParser.java  |  207 -
 .../log/expression/ParsiiInvalidException.java  |   57 -
 .../ParsiiUnknowVariableException.java          |   57 -
 .../TestGenericServiceAPIResponseEntity.java    |   92 -
 .../log/entity/TestDouble2DArraySerDeser.java   |   48 -
 .../eagle/log/entity/TestDoubleSerDeser.java    |   58 -
 .../TestGenericEntityIndexStreamReader.java     |  169 -
 .../log/entity/TestHBaseIntegerLogHelper.java   |   67 -
 .../TestHBaseWriteEntitiesPerformance.java      |  134 -
 .../log/entity/TestHbaseWritePerformance.java   |  100 -
 .../eagle/log/entity/TestTestLogAPIEntity.java  |  405 -
 .../base/taggedlog/TestTaggedLogAPIEntity.java  |   91 -
 .../filter/TestEntityQualifierHelper.java       |  182 -
 .../entity/filter/TestExpressionComparator.java |  195 -
 .../entity/filter/TestHBaseFilterBuilder.java   |  282 -
 .../filter/TestTypedByteArrayComparator.java    |   61 -
 .../log/entity/meta/TestArraySerDeser.java      |   64 -
 .../meta/TestEntityDefinitionManager.java       |   35 -
 .../eagle/log/entity/meta/TestListSerDeser.java |  101 -
 .../eagle/log/entity/meta/TestMapSerDeser.java  |  106 -
 .../repo/TestEntityRepositoryScanner.java       |   30 -
 .../log/expression/TestExpressionParser.java    |  256 -
 .../expression/TestExpressionPerformance.java   |  120 -
 .../src/test/resources/application.conf         |   28 -
 .../src/test/resources/log4j.properties         |   34 -
 eagle-core/eagle-query/eagle-query-base/pom.xml |   44 -
 .../apache/eagle/query/GenericEntityQuery.java  |   74 -
 .../org/apache/eagle/query/GenericQuery.java    |   46 -
 .../apache/eagle/query/ListQueryCompiler.java   |  380 -
 .../org/apache/eagle/query/QueryConstants.java  |   24 -
 .../query/aggregate/AggregateAPIEntity.java     |   69 -
 .../aggregate/AggregateAPIEntityFactory.java    |   21 -
 .../query/aggregate/AggregateCondition.java     |   73 -
 .../AggregateFunctionNotSupportedException.java |   28 -
 .../query/aggregate/AggregateFunctionType.java  |   85 -
 .../aggregate/AggregateFunctionTypeMatcher.java |   41 -
 .../eagle/query/aggregate/AggregateParams.java  |   77 -
 .../aggregate/AggregateParamsValidator.java     |   94 -
 .../aggregate/AggregateResultAPIEntity.java     |   52 -
 .../eagle/query/aggregate/Aggregator.java       |  168 -
 .../eagle/query/aggregate/BucketQuery.java      |   84 -
 .../IllegalAggregateFieldTypeException.java     |   28 -
 .../query/aggregate/PostAggregateSorting.java   |  101 -
 .../query/aggregate/SortFieldOrderType.java     |   59 -
 .../aggregate/SortFieldOrderTypeMatcher.java    |   38 -
 .../eagle/query/aggregate/raw/Function.java     |  106 -
 .../query/aggregate/raw/FunctionFactory.java    |   75 -
 .../eagle/query/aggregate/raw/GroupbyKey.java   |  138 -
 .../aggregate/raw/GroupbyKeyAggregatable.java   |   39 -
 .../aggregate/raw/GroupbyKeyComparator.java     |   43 -
 .../query/aggregate/raw/GroupbyKeyValue.java    |   91 -
 .../raw/GroupbyKeyValueCreationListener.java    |   24 -
 .../eagle/query/aggregate/raw/GroupbyValue.java |  139 -
 .../query/aggregate/raw/RawAggregator.java      |   71 -
 .../query/aggregate/raw/RawGroupbyBucket.java   |  196 -
 .../eagle/query/aggregate/raw/WritableList.java |  104 -
 .../timeseries/AbstractAggregator.java          |  184 -
 .../query/aggregate/timeseries/Aggregator.java  |   29 -
 .../EntityCreationListenerFactory.java          |   25 -
 .../aggregate/timeseries/FlatAggregator.java    |   61 -
 .../aggregate/timeseries/GroupbyBucket.java     |  241 -
 .../timeseries/GroupbyFieldsComparator.java     |   39 -
 .../timeseries/HierarchicalAggregateEntity.java |   67 -
 .../timeseries/HierarchicalAggregator.java      |   82 -
 .../timeseries/PostFlatAggregateSort.java       |   93 -
 .../PostHierarchicalAggregateSort.java          |   92 -
 .../query/aggregate/timeseries/SortOption.java  |   49 -
 .../aggregate/timeseries/SortOptionsParser.java |   69 -
 .../timeseries/SynchronizedAggregator.java      |   35 -
 .../SynchronizedEntityCreationListener.java     |   36 -
 .../timeseries/TimeSeriesAggregator.java        |  169 -
 .../aggregate/timeseries/TimeSeriesBucket.java  |   76 -
 .../TimeSeriesPostFlatAggregateSort.java        |  151 -
 .../query/aggregate/raw/TestGroupbyKey.java     |   74 -
 .../query/aggregate/raw/TestRawAggregator.java  |  517 -
 .../raw/TestRawHBaseLogReaderAndAgg.java        |   26 -
 .../query/aggregate/test/TestAggregator.java    |  251 -
 .../aggregate/test/TestAlertAggService.java     |   56 -
 .../query/aggregate/test/TestBucketQuery.java   |  156 -
 .../query/aggregate/test/TestBucketQuery2.java  |  160 -
 .../aggregate/test/TestFlatAggregator.java      |  400 -
 .../test/TestGroupbyFieldComparator.java        |   35 -
 .../test/TestHierarchicalAggregator.java        |  332 -
 .../test/TestPostFlatAggregateSort.java         |  143 -
 .../test/TestTimeSeriesAggregator.java          |  176 -
 .../eagle-query/eagle-service-base/pom.xml      |   77 -
 .../service/common/EagleExceptionWrapper.java   |   42 -
 .../common/SplitFullScanEntityReader.java       |  289 -
 .../generic/GenericEntityServiceResource.java   |  630 --
 .../generic/GenericObjectMapperProvider.java    |   44 -
 .../service/generic/ListQueryResource.java      |  504 -
 .../eagle/service/generic/MetadataResource.java |  198 -
 .../service/metric/EagleMetricResource.java     |   58 -
 .../service/rowkey/RowKeyQueryResource.java     |   88 -
 .../eagle/service/rowkey/RowkeyResource.java    |  133 -
 .../EagleServiceSelfCheckAPIEntity.java         |   47 -
 .../EagleServiceSelfCheckResource.java          |   38 -
 .../service/selfcheck/ServiceResource.java      |   64 -
 .../src/main/webapp/WEB-INF/web.xml             |   52 -
 .../service/generic/TestHBaseLogReader2.java    |  162 -
 .../service/generic/TestListQueryCompiler.java  |  243 -
 .../service/generic/TestListQueryResource.java  |  601 --
 .../eagle-query/eagle-storage-base/pom.xml      |   37 -
 .../org/apache/eagle/storage/DataStorage.java   |  111 -
 .../apache/eagle/storage/DataStorageBase.java   |   31 -
 .../eagle/storage/DataStorageManager.java       |  124 -
 .../exception/IllegalDataStorageException.java  |   38 -
 .../IllegalDataStorageTypeException.java        |   38 -
 .../exception/QueryCompileException.java        |   38 -
 .../eagle/storage/operation/CompiledQuery.java  |  253 -
 .../storage/operation/CreateStatement.java      |   68 -
 .../storage/operation/DeleteStatement.java      |   98 -
 .../eagle/storage/operation/QueryStatement.java |   52 -
 .../eagle/storage/operation/RawQuery.java       |  232 -
 .../storage/operation/RowkeyQueryStatement.java |   61 -
 .../eagle/storage/operation/Statement.java      |   34 -
 .../storage/operation/UpdateStatement.java      |   56 -
 .../eagle/storage/result/ModifyResult.java      |   34 -
 .../eagle/storage/result/QueryResult.java       |   67 -
 .../org/apache/eagle/storage/result/Result.java |   41 -
 .../storage/spi/DataStorageServiceLoader.java   |   94 -
 .../storage/spi/DataStorageServiceProvider.java |   35 -
 ...eagle.storage.spi.DataStorageServiceProvider |   16 -
 .../eagle/storage/TestDataStorageLoader.java    |   51 -
 .../java/org/apache/eagle/storage/TestUri.java  |   42 -
 .../eagle/storage/spi/TestDataStorage.java      |   84 -
 .../spi/TestDataStorageServiceProvider.java     |   42 -
 ...eagle.storage.spi.DataStorageServiceProvider |   16 -
 .../src/test/resources/application.conf         |   28 -
 .../src/test/resources/log4j.properties         |   21 -
 .../eagle-query/eagle-storage-hbase/pom.xml     |  103 -
 .../src/assembly/hbase-coprocessor.xml          |   56 -
 .../eagle/storage/hbase/HBaseStorage.java       |  258 -
 .../eagle/storage/hbase/HBaseStorageAudit.java  |  164 -
 .../hbase/query/GenericQueryBuilder.java        |  158 -
 .../query/aggregate/GenericAggregateQuery.java  |  423 -
 .../query/aggregate/GenericAggregateReader.java |  131 -
 .../query/coprocessor/AggregateClient.java      |   89 -
 .../query/coprocessor/AggregateProtocol.java    |   68 -
 .../coprocessor/AggregateProtocolEndPoint.java  |  447 -
 .../query/coprocessor/AggregateResult.java      |  129 -
 .../coprocessor/AggregateResultCallback.java    |   48 -
 .../query/coprocessor/ProtoBufConverter.java    |  124 -
 .../coprocessor/_AggregateProtocolEndPoint.java |  139 -
 .../coprocessor/generated/AggregateProtos.java  | 4214 --------
 .../coprocessor/impl/AggregateClientImpl.java   |  146 -
 .../impl/AggregateResultCallbackImpl.java       |  143 -
 .../hbase/query/coprocessor/package-info.java   |  111 -
 .../hbase/spi/HBaseStorageServiceProvider.java  |   38 -
 .../src/main/protobuf/AggregateProtocol.proto   |   65 -
 ...eagle.storage.spi.DataStorageServiceProvider |   16 -
 .../eagle/storage/hbase/TestHBaseStatement.java |  103 -
 .../eagle/storage/hbase/TestHBaseStorage.java   |   34 -
 .../TestAggregateResultCallback.java            |  184 -
 .../coprocessor/TestGroupAggregateClient.java   |  253 -
 .../TestGroupAggregateTimeSeriesClient.java     |  218 -
 .../storage/hbase/spi/TestHBaseStorage.java     |   29 -
 .../hbase/spi/TestHBaseStorageLoader.java       |   43 -
 .../src/test/resources/application.conf         |   28 -
 .../src/test/resources/log4j.properties         |   21 -
 .../eagle-query/eagle-storage-jdbc/pom.xml      |   55 -
 .../eagle/storage/jdbc/JdbcConstants.java       |   37 -
 .../apache/eagle/storage/jdbc/JdbcStorage.java  |  211 -
 .../storage/jdbc/conn/ConnectionConfig.java     |  100 -
 .../jdbc/conn/ConnectionConfigFactory.java      |   57 -
 .../storage/jdbc/conn/ConnectionManager.java    |   69 -
 .../jdbc/conn/ConnectionManagerFactory.java     |   75 -
 .../storage/jdbc/conn/PrimaryKeyBuilder.java    |   32 -
 .../storage/jdbc/conn/StatementExecutor.java    |   43 -
 .../conn/impl/TorqueConnectionManagerImpl.java  |  142 -
 .../jdbc/conn/impl/TorqueStatementPeerImpl.java |   57 -
 .../jdbc/conn/impl/UUIDPrimaryKeyBuilder.java   |   31 -
 .../storage/jdbc/criteria/CriteriaBuilder.java  |   26 -
 .../storage/jdbc/criteria/CriterionBuilder.java |   26 -
 .../impl/ExpressionCriterionBuilder.java        |  119 -
 .../impl/PrimaryKeyCriteriaBuilder.java         |   48 -
 .../criteria/impl/QueryCriteriaBuilder.java     |  115 -
 .../storage/jdbc/entity/JdbcEntityDeleter.java  |   48 -
 .../storage/jdbc/entity/JdbcEntityReader.java   |   49 -
 .../jdbc/entity/JdbcEntitySerDeserHelper.java   |  220 -
 .../storage/jdbc/entity/JdbcEntityUpdater.java  |   34 -
 .../storage/jdbc/entity/JdbcEntityWriter.java   |   37 -
 .../jdbc/entity/impl/AggreagteRecordMapper.java |   56 -
 .../jdbc/entity/impl/EntityRecordMapper.java    |   51 -
 .../jdbc/entity/impl/JdbcEntityDeleterImpl.java |   87 -
 .../jdbc/entity/impl/JdbcEntityReaderImpl.java  |  109 -
 .../jdbc/entity/impl/JdbcEntityUpdaterImpl.java |   82 -
 .../jdbc/entity/impl/JdbcEntityWriterImpl.java  |  103 -
 .../eagle/storage/jdbc/entity/package-info.java |   25 -
 .../apache/eagle/storage/jdbc/package-info.java |   84 -
 .../jdbc/schema/JdbcEntityDefinition.java       |  101 -
 .../schema/JdbcEntityDefinitionManager.java     |  125 -
 .../jdbc/schema/ddl/JdbcEntityDdlManager.java   |   24 -
 .../storage/jdbc/schema/ddl/package-info.java   |   24 -
 .../schema/serializer/DefaultJdbcSerDeser.java  |   52 -
 .../jdbc/schema/serializer/JdbcSerDeser.java    |   31 -
 .../schema/serializer/JsonJdbcSerDeser.java     |   57 -
 .../jdbc/spi/JdbcStorageServiceProvider.java    |   38 -
 ...eagle.storage.spi.DataStorageServiceProvider |   16 -
 .../eagle/storage/jdbc/TestJdbcStorage.java     |  233 -
 .../jdbc/conn/TestConnectionFactory.java        |   55 -
 .../jdbc/criteria/TestQueryCriteriaBuilder.java |   88 -
 .../eagle/storage/jdbc/criteria/TestTorque.java |  119 -
 .../eagle/storage/jdbc/schema/TestDllUtils.java |   40 -
 .../src/test/resources/application.conf         |   28 -
 .../resources/ddl/unittest_testtsentity.sql     |   43 -
 .../src/test/resources/log4j.properties         |   21 -
 eagle-core/eagle-query/pom.xml                  |  136 -
 eagle-core/pom.xml                              |   46 -
 eagle-docker                                    |   20 -
 eagle-examples/eagle-topology-example/pom.xml   |   70 -
 .../eagle-topology-example-assembly.xml         |   63 -
 .../NotificationPluginTestMain.java             |   81 -
 .../eagle/example/persist/MetricSerializer.java |   31 -
 .../example/persist/PersistTopoTestMain.java    |  115 -
 .../example/persist/PersistTopoTestMain2.java   |   60 -
 .../add-notification-for-plugin-test.sh         |   50 -
 .../main/resources/application-plugintest.conf  |   59 -
 .../src/main/resources/application.conf         |   86 -
 .../resources/create-policy-for-plugin-test.sh  |   99 -
 .../resources/delete-email-for-plugin-test.sh   |   50 -
 .../src/main/resources/log4j.properties         |   40 -
 .../main/resources/persist-test-topo-init.sh    |  194 -
 .../src/main/resources/persit-test-storm.yaml   |   18 -
 eagle-examples/pom.xml                          |   35 -
 eagle-external/eagle-ambari/.gitignore          |    3 -
 eagle-external/eagle-ambari/README.md           |   47 -
 eagle-external/eagle-ambari/bin/eagle-ambari.sh |  215 -
 .../lib/EAGLE/configuration/application.conf    |   77 -
 .../lib/EAGLE/configuration/eagle-env.sh        |   15 -
 .../lib/EAGLE/configuration/eagle-service.conf  |   25 -
 .../lib/EAGLE/configuration/log4j.properties    |   35 -
 .../eagle-ambari/lib/EAGLE/metainfo.xml         |  180 -
 .../package/patches/add-eagle-quicklink.patch   |   27 -
 .../lib/EAGLE/package/patches/app.js.gz         |  Bin 768285 -> 0 bytes
 .../lib/EAGLE/package/scripts/__init__.py       |   15 -
 .../lib/EAGLE/package/scripts/actions.py        |  147 -
 .../EAGLE/package/scripts/eagle_audit_kafka.py  |   61 -
 .../lib/EAGLE/package/scripts/eagle_client.py   |   27 -
 .../package/scripts/eagle_hdfs_topology.py      |   88 -
 .../package/scripts/eagle_hive_topology.py      |   87 -
 .../lib/EAGLE/package/scripts/eagle_service.py  |   85 -
 .../package/scripts/eagle_service_check.py      |   29 -
 .../lib/EAGLE/package/scripts/eagle_topology.py |   84 -
 .../package/scripts/eagle_topology_check.py     |   29 -
 .../scripts/eagle_userprofile_scheduler.py      |   84 -
 .../scripts/eagle_userprofile_topology.py       |   88 -
 .../lib/EAGLE/package/scripts/params.py         |   57 -
 .../lib/EAGLE/package/scripts/service_check.py  |   34 -
 eagle-external/eagle-ambari/lib/metainfo.xml    |   27 -
 eagle-external/eagle-docker/Dockerfile          |   47 -
 eagle-external/eagle-docker/LICENSE             |  209 -
 eagle-external/eagle-docker/README.md           |  125 -
 eagle-external/eagle-docker/bin/eagle-docker.sh |  299 -
 eagle-external/eagle-docker/bin/eagle-lib.sh    |  163 -
 .../eagle-docker/resource/deploy-eagle.sh       |   85 -
 .../eagle-docker/resource/eagle-multinode.json  |  163 -
 .../eagle-docker/resource/eagle-singlenode.json |  122 -
 .../eagle-docker/resource/install-cluster.sh    |   36 -
 .../eagle-docker/resource/serf/etc/ambari.json  |    9 -
 .../eagle-docker/resource/serf/handlers/eagle   |   22 -
 .../eagle-docker/resource/wait-for-eagle.sh     |   38 -
 eagle-external/eagle-log4jkafka/pom.xml         |  116 -
 .../eagle-log4jkafka/src/assembly/build.xml     |   61 -
 .../resources/conf/log4j-template.properties    |   31 -
 .../eagle/log4j/kafka/JKafkaLog4jAppender.scala |  136 -
 .../eagle/log4j/kafka/KafkaLog4jAppender.scala  |  163 -
 .../org/apache/eagle/log4j/kafka/Keyer.scala    |   32 -
 .../apache/eagle/log4j/kafka/TopicPicker.scala  |   32 -
 .../log4j/kafka/hadoop/AuditLogKeyer.scala      |   33 -
 .../log4j/kafka/hadoop/AuditLogUtils.scala      |   29 -
 .../kafka/hadoop/AuditSecurityLogKeyer.scala    |   43 -
 .../hadoop/FailedAuthenticationFilter.scala     |   42 -
 .../log4j/kafka/hadoop/GenericLogKeyer.scala    |   45 -
 .../log4j/kafka/hadoop/SecurityLogKeyer.scala   |   50 -
 .../kafka/hadoop/SecurityLogTopicPicker.scala   |   53 -
 .../src/test/resources/log4j.properties         |   35 -
 .../eagle/log4j/kafka/TestGenericLogKeyer.scala |   46 -
 .../log4j/kafka/TestKafkaLog4jAppender.scala    |   33 -
 eagle-external/hadoop_jmx_collector/.gitignore  |    2 -
 eagle-external/hadoop_jmx_collector/README.md   |   75 -
 .../hadoop_jmx_collector/config-sample.json     |   29 -
 .../hadoop_jmx_collector/hadoop_ha_checker.py   |  128 -
 .../hadoop_jmx_collector/hadoop_jmx_kafka.py    |   79 -
 .../lib/kafka-python/.gitignore                 |   30 -
 .../lib/kafka-python/.gitmodules                |   18 -
 .../lib/kafka-python/.travis.yml                |   44 -
 .../lib/kafka-python/AUTHORS.md                 |   35 -
 .../lib/kafka-python/CHANGES.md                 |   92 -
 .../lib/kafka-python/LICENSE                    |  202 -
 .../lib/kafka-python/MANIFEST.in                |    2 -
 .../lib/kafka-python/POWERED-BY.md              |   25 -
 .../lib/kafka-python/README.rst                 |   53 -
 .../lib/kafka-python/VERSION                    |    1 -
 .../lib/kafka-python/build_integration.sh       |   86 -
 .../lib/kafka-python/docs/Makefile              |  177 -
 .../kafka-python/docs/apidoc/kafka.consumer.rst |   46 -
 .../docs/apidoc/kafka.partitioner.rst           |   38 -
 .../kafka-python/docs/apidoc/kafka.producer.rst |   38 -
 .../lib/kafka-python/docs/apidoc/kafka.rst      |   79 -
 .../lib/kafka-python/docs/apidoc/modules.rst    |    7 -
 .../lib/kafka-python/docs/conf.py               |  291 -
 .../lib/kafka-python/docs/index.rst             |   58 -
 .../lib/kafka-python/docs/install.rst           |   79 -
 .../lib/kafka-python/docs/make.bat              |  242 -
 .../lib/kafka-python/docs/requirements.txt      |    7 -
 .../lib/kafka-python/docs/tests.rst             |   59 -
 .../lib/kafka-python/docs/usage.rst             |  124 -
 .../lib/kafka-python/example.py                 |   69 -
 .../lib/kafka-python/kafka/NOTES.md             |   32 -
 .../lib/kafka-python/kafka/__init__.py          |   27 -
 .../lib/kafka-python/kafka/client.py            |  503 -
 .../lib/kafka-python/kafka/codec.py             |  143 -
 .../lib/kafka-python/kafka/common.py            |  215 -
 .../lib/kafka-python/kafka/conn.py              |  208 -
 .../lib/kafka-python/kafka/consumer/__init__.py |    7 -
 .../lib/kafka-python/kafka/consumer/base.py     |  173 -
 .../lib/kafka-python/kafka/consumer/kafka.py    |  758 --
 .../kafka-python/kafka/consumer/multiprocess.py |  251 -
 .../lib/kafka-python/kafka/consumer/simple.py   |  330 -
 .../lib/kafka-python/kafka/context.py           |  175 -
 .../kafka-python/kafka/partitioner/__init__.py  |    6 -
 .../lib/kafka-python/kafka/partitioner/base.py  |   24 -
 .../kafka-python/kafka/partitioner/hashed.py    |   14 -
 .../kafka/partitioner/roundrobin.py             |   23 -
 .../lib/kafka-python/kafka/producer/__init__.py |    6 -
 .../lib/kafka-python/kafka/producer/base.py     |  214 -
 .../lib/kafka-python/kafka/producer/keyed.py    |   68 -
 .../lib/kafka-python/kafka/producer/simple.py   |   81 -
 .../lib/kafka-python/kafka/protocol.py          |  604 --
 .../lib/kafka-python/kafka/util.py              |  153 -
 .../lib/kafka-python/load_example.py            |   60 -
 .../servers/0.8.0/resources/kafka.properties    |   59 -
 .../servers/0.8.0/resources/log4j.properties    |   24 -
 .../0.8.0/resources/zookeeper.properties        |   19 -
 .../servers/0.8.1.1/resources/kafka.properties  |  118 -
 .../servers/0.8.1.1/resources/log4j.properties  |   24 -
 .../0.8.1.1/resources/zookeeper.properties      |   21 -
 .../servers/0.8.1/resources/kafka.properties    |   59 -
 .../servers/0.8.1/resources/log4j.properties    |   24 -
 .../0.8.1/resources/zookeeper.properties        |   19 -
 .../servers/0.8.2.0/resources/kafka.properties  |  118 -
 .../servers/0.8.2.0/resources/log4j.properties  |   24 -
 .../0.8.2.0/resources/zookeeper.properties      |   21 -
 .../servers/trunk/resources/kafka.properties    |  118 -
 .../servers/trunk/resources/log4j.properties    |   24 -
 .../trunk/resources/zookeeper.properties        |   21 -
 .../lib/kafka-python/setup.py                   |   70 -
 .../lib/kafka-python/test/__init__.py           |    6 -
 .../lib/kafka-python/test/fixtures.py           |  236 -
 .../lib/kafka-python/test/service.py            |  111 -
 .../lib/kafka-python/test/test_client.py        |  403 -
 .../test/test_client_integration.py             |   67 -
 .../lib/kafka-python/test/test_codec.py         |   72 -
 .../lib/kafka-python/test/test_conn.py          |  164 -
 .../lib/kafka-python/test/test_consumer.py      |   15 -
 .../test/test_consumer_integration.py           |  401 -
 .../lib/kafka-python/test/test_context.py       |  117 -
 .../test/test_failover_integration.py           |  201 -
 .../lib/kafka-python/test/test_package.py       |   29 -
 .../lib/kafka-python/test/test_producer.py      |   42 -
 .../test/test_producer_integration.py           |  481 -
 .../lib/kafka-python/test/test_protocol.py      |  732 --
 .../lib/kafka-python/test/test_util.py          |  126 -
 .../lib/kafka-python/test/testutil.py           |  105 -
 .../lib/kafka-python/tox.ini                    |   50 -
 .../lib/kafka-python/travis_selector.sh         |   16 -
 .../hadoop_jmx_collector/lib/six/.gitignore     |   23 -
 .../hadoop_jmx_collector/lib/six/CHANGES        |  231 -
 .../hadoop_jmx_collector/lib/six/CONTRIBUTORS   |   21 -
 .../hadoop_jmx_collector/lib/six/LICENSE        |   18 -
 .../hadoop_jmx_collector/lib/six/MANIFEST.in    |    6 -
 .../hadoop_jmx_collector/lib/six/README         |   16 -
 .../lib/six/documentation/Makefile              |  130 -
 .../lib/six/documentation/conf.py               |  217 -
 .../lib/six/documentation/index.rst             |  757 --
 .../hadoop_jmx_collector/lib/six/setup.cfg      |    2 -
 .../hadoop_jmx_collector/lib/six/setup.py       |   32 -
 .../hadoop_jmx_collector/lib/six/six.py         |  762 --
 .../hadoop_jmx_collector/lib/six/test_six.py    |  736 --
 .../hadoop_jmx_collector/lib/six/tox.ini        |   12 -
 .../hadoop_jmx_collector/metric_collector.py    |  354 -
 .../hadoop_jmx_collector/system_metric_kafka.py |  393 -
 .../hadoop_jmx_collector/util_func.py           |   79 -
 eagle-external/pom.xml                          |   36 -
 eagle-gc/pom.xml                                |   50 -
 .../org/apache/eagle/gc/GCLogProcessorMain.java |   42 -
 .../org/apache/eagle/gc/common/GCConstants.java |   30 -
 .../gc/executor/GCLogAnalysorExecutor.java      |   77 -
 .../gc/executor/GCMetricGeneratorExecutor.java  |  108 -
 .../apache/eagle/gc/model/GCPausedEvent.java    |  249 -
 .../apache/eagle/gc/parser/DateTimeParser.java  |   37 -
 .../apache/eagle/gc/parser/GCEventParser.java   |   31 -
 .../eagle/gc/parser/GCEventParserEnum.java      |   46 -
 .../java/org/apache/eagle/gc/parser/GCType.java |   26 -
 .../eagle/gc/parser/OtherLogFormatParser.java   |   39 -
 .../exception/IgnoredLogFormatException.java    |   39 -
 .../UnrecognizedLogFormatException.java         |   39 -
 .../full/ConcurrentModeFailureParser.java       |   62 -
 .../gc/parser/full/NormalFullGCParser.java      |   79 -
 .../full/ParaNewPromotionFailureParser.java     |  106 -
 .../gc/parser/tenured/CMSInitialMarkParser.java |   63 -
 .../gc/parser/tenured/CMSRemarkParser.java      |   72 -
 .../eagle/gc/parser/young/ParaNewParser.java    |   77 -
 .../eagle/gc/spout/GCLogDeserializer.java       |   39 -
 .../apache/eagle/gc/stream/GCStreamBuilder.java |   46 -
 eagle-gc/src/main/resources/alert-gc-policy.sh  |   21 -
 .../main/resources/alert-metadata-create-gc.sh  |   27 -
 eagle-gc/src/main/resources/application.conf    |   60 -
 eagle-gc/src/main/resources/gc-storm.yaml       |   18 -
 eagle-gc/src/main/resources/log4j.properties    |   39 -
 .../java/org/apache/eagle/TestGCLogParser.java  |  118 -
 eagle-hadoop-metric/pom.xml                     |   60 -
 .../assembly/eagle-hadoop-metric-assembly.xml   |   64 -
 .../hadoop/metric/HadoopJmxMetricMonitor.java   |   35 -
 .../org/apache/eagle/hadoop/metric/Utils.java   |   64 -
 .../src/main/resources/application.conf         |   69 -
 .../resources/capacityused-policy-import.sh     |   51 -
 .../src/main/resources/eagle-env.sh             |   44 -
 .../src/main/resources/hadoop-metric-init.sh    |  180 -
 .../src/main/resources/hadoopjmx.yaml           |   18 -
 .../src/main/resources/hastate-policy-import.sh |   51 -
 .../lastcheckpointtime-policy-import.sh         |   51 -
 .../src/main/resources/log4j.properties         |   40 -
 .../resources/missingblock-policy-import.sh     |   51 -
 .../main/resources/namenodelag-policy-import.sh |   49 -
 .../main/resources/nodecount-policy-import.sh   |   51 -
 .../resources/safemodecheck-policy-import.sh    |   51 -
 .../metric/HadoopJmxMetricDeserializerTest.java |   39 -
 .../hadoop/metric/TestHadoopMetricSiddhiQL.java |  313 -
 .../src/test/resources/cassandra.json           |   13 -
 .../eclipse-java-templates.xml                  |   20 -
 .../eclipse-scala-templates.xml                 |  117 -
 eagle-security/eagle-metric-collection/pom.xml  |  100 -
 .../metric/kafka/EagleMetricCollectorMain.java  |  122 -
 .../eagle/metric/kafka/KafkaConsumerOffset.java |   27 -
 .../kafka/KafkaConsumerOffsetFetcher.java       |   70 -
 .../metric/kafka/KafkaLatestOffsetFetcher.java  |   96 -
 .../kafka/KafkaMessageDistributionExecutor.java |  103 -
 .../metric/kafka/KafkaOffsetCheckerConfig.java  |   44 -
 .../kafka/KafkaOffsetSourceSpoutProvider.java   |   51 -
 .../eagle/metric/kafka/KafkaOffsetSpout.java    |  135 -
 .../src/main/resources/application.conf         |   55 -
 .../src/main/resources/log4j.properties         |   39 -
 .../kafka/TestDataDistributionDaoImpl.java      |   46 -
 .../eagle/metric/kafka/TestGreedyPartition.java |   49 -
 .../eagle/metric/kafka/TestKafkaOffset.java     |   71 -
 eagle-security/eagle-security-common/pom.xml    |   61 -
 .../entity/FileSensitivityAPIEntity.java        |   52 -
 .../eagle/security/entity/FileStatusEntity.java |  176 -
 .../security/entity/HbaseResourceEntity.java    |  105 -
 .../HbaseResourceSensitivityAPIEntity.java      |   47 -
 .../entity/HdfsUserCommandPatternEntity.java    |   82 -
 .../security/entity/HiveResourceEntity.java     |  104 -
 .../HiveResourceSensitivityAPIEntity.java       |   53 -
 .../eagle/security/entity/IPZoneEntity.java     |   52 -
 .../entity/SecurityEntityRepository.java        |   32 -
 .../eagle/security/hdfs/HDFSAuditLogObject.java |   30 -
 .../eagle/security/hdfs/HDFSAuditLogParser.java |   86 -
 .../apache/eagle/security/partition/Bucket.java |   30 -
 .../security/partition/BucketComparator.java    |   36 -
 .../partition/DataDistributionDaoImpl.java      |  103 -
 .../partition/GreedyPartitionAlgorithm.java     |   65 -
 .../resolver/AbstractCommandResolver.java       |   72 -
 .../AbstractSensitivityTypeResolver.java        |   82 -
 .../AbstractResourceSensitivityPollingJob.java  |   56 -
 .../util/BadMetadataAccessConfigException.java  |   30 -
 .../eagle/security/util/ExternalDataCache.java  |   43 -
 .../eagle/security/util/ExternalDataJoiner.java |  105 -
 .../security/util/JVMSingleQuartzScheduler.java |   51 -
 .../eagle/security/util/LogParseUtil.java       |   41 -
 .../crawler/audit/TestHDFSAuditLogParser.java   |   40 -
 .../eagle-security-hbase-securitylog/pom.xml    |   40 -
 .../hbase/HbaseAuditLogProcessorMain.java       |   33 -
 .../parse/HbaseAuditLogKafkaDeserializer.java   |   65 -
 .../hbase/parse/HbaseAuditLogObject.java        |   28 -
 .../hbase/parse/HbaseAuditLogParser.java        |  147 -
 ...baseResourceSensitivityDataJoinExecutor.java |   94 -
 .../HbaseResourceSensitivityPollingJob.java     |   63 -
 .../src/main/resources/application.conf         |   66 -
 .../security/hbase/TestHbaseAuditLogParser.java |   46 -
 .../src/test/resources/securityAuditLog         |   25 -
 eagle-security/eagle-security-hbase-web/pom.xml |   41 -
 .../hbase/HbaseMetadataBrowseWebResource.java   |  145 -
 .../hbase/HbaseMetadataBrowseWebResponse.java   |   45 -
 .../hbase/HbaseSensitivityResourceService.java  |   80 -
 .../hbase/dao/HbaseMetadataAccessConfig.java    |   43 -
 .../dao/HbaseMetadataAccessConfigDAOImpl.java   |   61 -
 .../hbase/dao/HbaseMetadataDAOImpl.java         |   94 -
 .../hbase/resolver/HbaseActionResolver.java     |   36 -
 .../hbase/resolver/HbaseMetadataResolver.java   |  107 -
 .../hbase/resolver/HbaseRequestResolver.java    |   60 -
 .../resolver/HbaseSensitivityTypeResolver.java  |   38 -
 .../hbase/TestHbaseMetadataResolver.java        |   41 -
 .../eagle-security-hdfs-auditlog/pom.xml        |   64 -
 .../run_auditlog_topology.sh                    |   17 -
 .../run_hostname_lookkup.sh                     |   20 -
 .../run_message_producer.sh                     |   19 -
 .../run_message_producer_in_assembly.sh         |   16 -
 .../assembly/eagle-dam-auditlog-assembly.xml    |   63 -
 .../FileSensitivityDataJoinExecutor.java        |   87 -
 .../auditlog/HdfsAuditLogKafkaDeserializer.java |   70 -
 .../auditlog/HdfsAuditLogProcessorMain.java     |  114 -
 .../HdfsUserCommandPatternByDBImpl.java         |   61 -
 .../HdfsUserCommandPatternByFileImpl.java       |   49 -
 .../auditlog/HdfsUserCommandPatternDAO.java     |   31 -
 .../auditlog/HdfsUserCommandReassembler.java    |  163 -
 .../auditlog/IPZoneDataJoinExecutor.java        |   67 -
 .../auditlog/kafka/UserPartitioner.java         |   33 -
 .../timer/FileSensitivityPollingJob.java        |   82 -
 .../auditlog/timer/IPZonePollingJob.java        |   83 -
 .../security/auditlog/util/SimplifyPath.java    |   53 -
 .../src/main/resources/application.conf         |   69 -
 .../main/resources/hdfsUserCommandPattern.json  |   54 -
 .../src/main/resources/log4j.properties         |   40 -
 .../main/resources/security-auditlog-storm.yaml |   18 -
 .../src/test/java/META-INF/MANIFEST.MF          |   19 -
 .../TestHdfsUserCommandPatternByDB.java         |   46 -
 .../TestHdfsUserCommandPatternByFile.java       |   42 -
 .../security/auditlog/TestSiddhiPattern.java    |  120 -
 .../auditlog/TestUserCommandReassembler.java    |  138 -
 .../auditlogtraining/util/TestSimplifyPath.java |   31 -
 .../security/dataproc/TestIPZonePollingJob.java |   45 -
 .../security/dataproc/TestOuterDataJoiner.java  |   59 -
 .../eagle-security-hdfs-securitylog/pom.xml     |   41 -
 .../HDFSSecurityLogKafkaDeserializer.java       |   63 -
 .../HDFSSecurityLogProcessorMain.java           |   31 -
 .../parse/HDFSSecurityLogObject.java            |   27 -
 .../parse/HDFSSecurityLogParser.java            |   82 -
 .../src/main/resources/application.conf         |   65 -
 .../security/TestHDFSSecuritylogParser.java     |   69 -
 eagle-security/eagle-security-hdfs-web/pom.xml  |   65 -
 .../service/security/hdfs/HDFSFileSystem.java   |  102 -
 .../security/hdfs/HDFSResourceAccessConfig.java |   45 -
 .../security/hdfs/HDFSResourceConstants.java    |   25 -
 .../hdfs/HDFSResourceSensitivityDataJoiner.java |   98 -
 .../hdfs/HDFSResourceSensitivityService.java    |  101 -
 .../security/hdfs/HDFSResourceUtils.java        |   63 -
 .../hdfs/resolver/HDFSCommandResolver.java      |   74 -
 .../hdfs/resolver/HDFSResourceResolver.java     |  124 -
 .../resolver/HDFSSensitivityTypeResolver.java   |   75 -
 .../rest/HDFSResourceWebRequestValidator.java   |   38 -
 .../hdfs/rest/HDFSResourceWebResource.java      |   76 -
 .../hdfs/rest/HDFSResourceWebResponse.java      |   53 -
 .../create-hdfs-resource-access-config.sh       |   20 -
 .../src/main/resources/sample_site.conf         |   23 -
 .../hdfs/test/HDFSChildSensitivityTypeTest.java |   49 -
 .../security/hdfs/test/HDFSFileSystemTest.java  |   34 -
 .../hdfs/test/HDFSResourceAccessConfigTest.java |   35 -
 .../hdfs/test/HDFSResourceConfigAccessTest.java |   34 -
 .../hdfs/test/HDFSResourceResolverTest.java     |   36 -
 .../HDFSResourceSensitivityServiceTest.java     |   42 -
 .../security/hdfs/test/HDFSResourceWebTest.java |   35 -
 eagle-security/eagle-security-hive-web/pom.xml  |   71 -
 .../BadHiveMetadataAccessConfigException.java   |   27 -
 .../hive/dao/HiveMetadataAccessConfig.java      |   70 -
 .../hive/dao/HiveMetadataAccessConfigDAO.java   |   26 -
 .../dao/HiveMetadataAccessConfigDAOImpl.java    |   76 -
 .../hive/dao/HiveMetadataAccessType.java        |   22 -
 .../dao/HiveMetadataByHiveServer2DAOImpl.java   |  127 -
 .../dao/HiveMetadataByMetastoreDBDAOImpl.java   |  151 -
 .../security/hive/dao/HiveMetadataDAO.java      |   25 -
 .../hive/dao/HiveMetadataDAOFactory.java        |   30 -
 .../hive/dao/HiveSensitivityMetadataDAO.java    |   29 -
 .../dao/HiveSensitivityMetadataDAOImpl.java     |   81 -
 .../hive/res/HiveMetadataBrowseWebResource.java |  145 -
 .../hive/res/HiveMetadataBrowseWebResponse.java |   46 -
 .../hive/resolver/HiveCommandResolver.java      |   70 -
 .../hive/resolver/HiveMetadataResolver.java     |  114 -
 .../resolver/HiveSensitivityTypeResolver.java   |   73 -
 .../hive/TestHiveDataSourceConfigDAOImpl.java   |   32 -
 .../security/hive/TestHiveMetadataDAO.java      |   55 -
 .../security/hive/TestHiveSensitivityDAO.java   |   32 -
 eagle-security/eagle-security-hive/pom.xml      |   91 -
 .../run_hiveauditlog_topology.sh                |   17 -
 .../eagle-dam-hiveQueryLog-assembly.xml         |   62 -
 .../HiveJobRunningMonitoringMain.java           |   43 -
 ...HiveJobRunningSourcedStormSpoutProvider.java |   79 -
 .../jobrunning/HiveQueryParserExecutor.java     |  154 -
 .../JobConfigurationAdaptorExecutor.java        |   78 -
 .../security/hive/ql/HiveQLParserContent.java   |   55 -
 .../apache/eagle/security/hive/ql/Parser.java   |  365 -
 ...HiveResourceSensitivityDataJoinExecutor.java |  100 -
 .../HiveResourceSensitivityPollingJob.java      |   86 -
 .../alert-metadata-create-jobhistory.sh         |   24 -
 .../main/resources/application-hive-ranger.conf |   52 -
 .../src/main/resources/application.conf         |   63 -
 .../create-hiveResourceSensitivity-metadata.sh  |   18 -
 .../src/main/resources/hive.storm.yaml          |   16 -
 .../src/main/resources/log4j.properties         |   37 -
 .../main/resources/sample-data-create.script    |   53 -
 .../src/main/resources/sample-hive-policy.sh    |   18 -
 .../src/test/java/META-INF/MANIFEST.MF          |   19 -
 .../eagle/security/hive/ql/TestParser.java      |  268 -
 .../src/test/resources/onelinehiveauditlog.txt  |    1 -
 .../resources/ranger-policy-update-request.txt  |    1 -
 .../eagle-security-userprofile/common/pom.xml   |  128 -
 .../common/run_mltraining_topology.sh           |   19 -
 .../security/userprofile/UserPartitioner.java   |   32 -
 .../userprofile/UserProfileConstants.java       |   37 -
 .../security/userprofile/UserProfileUtils.java  |   53 -
 .../model/ScheduleCommandEntity.java            |   73 -
 .../model/UserActivityAggModelDeserializer.java |   52 -
 .../model/UserActivityAggModelEntity.java       |   87 -
 .../model/UserCommandStatistics.java            |   83 -
 .../model/UserProfileEigenModelEntity.java      |  204 -
 .../model/UserProfileEntityRepository.java      |   25 -
 .../model/UserProfileKDEModelEntity.java        |  129 -
 .../userprofile/model/package-info.java         |   20 -
 .../common/src/main/resources/log4j.properties  |   35 -
 .../common/src/main/resources/storm.yaml.1      |   29 -
 .../userprofile/model/AuditlogParser.scala      |   54 -
 .../userprofile/model/EntityConversion.scala    |   27 -
 .../model/UserActivityAggModel.scala            |   28 -
 .../model/UserProfileEigenModel.scala           |   44 -
 .../userprofile/model/UserProfileKDEModel.scala |   37 -
 .../userprofile/model/UserProfileModel.scala    |   22 -
 .../common/TestUserProfileUtils.java            |  106 -
 .../common/src/test/resources/log4j.properties  |   35 -
 .../common/src/test/resources/storm.yaml.2      |   29 -
 .../detection/dev-supports/prepare-metadata.sh  |   45 -
 .../detection/dev-supports/prepare-table.sh     |   21 -
 .../produce-useractivity-with-spark.sh          |   18 -
 .../dev-supports/produce-useractivity.sh        |   18 -
 .../dev-supports/useractivity-agg-json.txt      |   16 -
 .../userprofile-executor-definition.json        |    1 -
 .../userprofile-policy-definition.json          |    1 -
 .../userprofile-stream-description.json         |    1 -
 .../userprofile-stream-metadata.json            |    1 -
 .../detection/pom.xml                           |   87 -
 .../detection/run_onlineprediction_topology.sh  |   19 -
 .../eagle/security/userprofile/TimeWindow.java  |   45 -
 .../userprofile/UserActivityAggregator.java     |   34 -
 .../UserProfileAggregatorExecutor.java          |   79 -
 .../userprofile/UserProfileAnomalyDetector.java |   44 -
 .../UserProfileDetectionBatchMain.java          |   68 -
 .../UserProfileDetectionConstants.java          |   25 -
 .../userprofile/UserProfileDetectionMain.java   |   43 -
 .../UserProfileDetectionStreamMain.java         |   56 -
 .../UserProfileMLAlgorithmEvaluator.java        |  118 -
 .../impl/AbstractUserProfileEigenEvaluator.java |   50 -
 .../impl/AbstractUserProfileKDEEvaluator.java   |   40 -
 .../userprofile/impl/TimeWindowImpl.java        |   87 -
 .../impl/UserActivityAggregatorImpl.java        |  169 -
 .../impl/UserProfileAnomalyEigenEvaluator.java  |  173 -
 .../impl/UserProfileAnomalyKDEEvaluator.java    |  142 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 .../src/main/resources/application-batch.conf   |   63 -
 .../src/main/resources/application-stream.conf  |   65 -
 .../src/main/resources/log4j.properties         |   35 -
 .../main/resources/ml-policyDef-UserProfile.txt |   33 -
 .../src/main/resources/samplePolicy.json        |   18 -
 .../src/main/resources/userprofile.storm.yaml   |   29 -
 .../userprofile/TestUserActivityAggregator.java |  103 -
 .../TestUserProfileAnomalyEigenEvaluator.java   |  117 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   16 -
 .../test/resources/ml-policyDef-UserProfile.txt |    1 -
 .../detection/src/test/resources/storm.yaml.1   |   29 -
 .../eagle-security-userprofile/pom.xml          |   39 -
 .../training/README.md                          |   54 -
 .../training/dev-supports/run-scheduler.sh      |   48 -
 .../training/dev-supports/run-training.sh       |   25 -
 .../training/dev-supports/run-with-kafka.sh     |   30 -
 .../training/dev-supports/run-with-localfile.sh |   33 -
 .../training/dev-supports/run-with-service.sh   |   33 -
 .../training/dev-supports/run-with-spark.sh     |   52 -
 .../dev-supports/trigger-onetime-training.sh    |   23 -
 .../eagle-security-userprofile/training/pom.xml |  221 -
 .../training/src/assembly/assembly.xml          |   67 -
 .../model/JavaUserProfileModeler.java           |   50 -
 .../model/eigen/UserProfileEigenModeler.java    |  297 -
 .../model/kde/UserProfileKDEModeler.java        |  147 -
 .../src/main/resources/application.conf         |   36 -
 .../training/src/main/resources/hdfs-audit.log  | 1920 ----
 .../src/main/resources/log4j.properties         |   35 -
 .../training/src/main/resources/reference.conf  |   35 -
 .../main/sbin/submit-userprofile-training.sh    |   23 -
 .../userprofile/UserProfileJobFactory.scala     |   31 -
 .../userprofile/UserProfileTrainingApp.scala    |   80 -
 .../userprofile/UserProfileTrainingCLI.scala    |   58 -
 .../security/userprofile/daemon/Command.scala   |  116 -
 .../security/userprofile/daemon/Consumers.scala |   83 -
 .../userprofile/daemon/Coordinator.scala        |   58 -
 .../security/userprofile/daemon/Producers.scala |  154 -
 .../userprofile/daemon/SchedulePolicy.scala     |  100 -
 .../security/userprofile/daemon/Scheduler.scala |   62 -
 .../userprofile/daemon/SchedulerContext.scala   |  143 -
 .../daemon/UserProfileCommandDao.scala          |   90 -
 .../security/userprofile/daemon/Utils.scala     |   77 -
 .../job/AuditLogTrainingSparkJob.scala          |  157 -
 .../job/UserProfileTrainingJob.scala            |   64 -
 .../userprofile/model/UserProfileContext.scala  |   22 -
 .../userprofile/model/UserProfileModeler.scala  |   36 -
 .../userprofile/sink/UserActivityAggSink.scala  |   84 -
 .../userprofile/sink/UserProfileModelSink.scala |   89 -
 .../model/UserProfileEigenModelerTest.java      |   56 -
 .../model/UserProfileKDEModelerTest.java        |   55 -
 .../security/userprofile/daemon/UtilsSpec.scala |   39 -
 eagle-security/pom.xml                          |   46 -
 eagle-topology-assembly/pom.xml                 |  106 -
 .../src/assembly/eagle-topology-assembly.xml    |   68 -
 ....eagle.policy.PolicyEvaluatorServiceProvider |   17 -
 eagle-tutorial/SetupDevelopmentEnvOnMac.md      |  122 -
 eagle-webservice/.gitignore                     |    5 -
 .../WebContent/META-INF/MANIFEST.MF             |    3 -
 eagle-webservice/pom.xml                        |  318 -
 .../security/auth/AuthenticationResource.java   |   54 -
 .../security/auth/AuthenticationResult.java     |   47 -
 .../security/auth/LogoutSuccessHandlerImpl.java |   47 -
 .../service/security/auth/MonitorResource.java  |   44 -
 .../service/security/auth/package-info.java     |   23 -
 .../profile/EagleServiceProfileInitializer.java |   41 -
 .../pwdgen/BasicAuthenticationEncoder.java      |   26 -
 .../pwdgen/PasswordEncoderGenerator.java        |   28 -
 .../src/main/resources/application.conf         |   25 -
 .../src/main/resources/applicationContext.xml   |   43 -
 .../src/main/resources/eagleSecurity.xml        |   93 -
 .../src/main/resources/hbase-default.xml        |  935 --
 .../src/main/resources/ldap.properties          |   23 -
 .../src/main/resources/log4j.properties         |   21 -
 eagle-webservice/src/main/webapp/Gruntfile.js   |  168 -
 .../src/main/webapp/META-INF/MANIFEST.MF        |    3 -
 eagle-webservice/src/main/webapp/README.md      |    4 -
 .../src/main/webapp/WEB-INF/web.xml             |  105 -
 eagle-webservice/src/main/webapp/app/index.html |  243 -
 .../webapp/app/partials/config/application.html |  103 -
 .../webapp/app/partials/config/feature.html     |   64 -
 .../main/webapp/app/partials/config/site.html   |   94 -
 .../src/main/webapp/app/partials/landing.html   |   12 -
 .../src/main/webapp/app/partials/login.html     |   54 -
 .../main/webapp/app/public/css/animation.css    |   46 -
 .../src/main/webapp/app/public/css/main.css     |  687 --
 .../public/feature/classification/controller.js |  301 -
 .../classification/page/sensitivity.html        |   40 -
 .../classification/page/sensitivity/folder.html |  110 -
 .../classification/page/sensitivity/table.html  |  150 -
 .../app/public/feature/common/controller.js     | 1023 --
 .../public/feature/common/page/alertDetail.html |   61 -
 .../public/feature/common/page/alertList.html   |   69 -
 .../feature/common/page/policyDetail.html       |  172 -
 .../public/feature/common/page/policyEdit.html  |  349 -
 .../public/feature/common/page/policyList.html  |   84 -
 .../app/public/feature/metadata/controller.js   |   66 -
 .../feature/metadata/page/streamList.html       |   84 -
 .../app/public/feature/metrics/controller.js    |  403 -
 .../public/feature/metrics/page/dashboard.html  |  201 -
 .../public/feature/userProfile/controller.js    |  268 -
 .../public/feature/userProfile/page/detail.html |   87 -
 .../public/feature/userProfile/page/list.html   |  138 -
 .../main/webapp/app/public/images/favicon.png   |  Bin 4209 -> 0 bytes
 .../webapp/app/public/images/favicon_white.png  |  Bin 1621 -> 0 bytes
 .../src/main/webapp/app/public/js/app.config.js |  104 -
 .../src/main/webapp/app/public/js/app.js        |  484 -
 .../src/main/webapp/app/public/js/app.time.js   |   70 -
 .../src/main/webapp/app/public/js/app.ui.js     |   76 -
 .../src/main/webapp/app/public/js/common.js     |  250 -
 .../app/public/js/components/charts/line3d.js   |  348 -
 .../webapp/app/public/js/components/file.js     |   50 -
 .../webapp/app/public/js/components/main.js     |   19 -
 .../webapp/app/public/js/components/nvd3.js     |  374 -
 .../app/public/js/components/sortTable.js       |  113 -
 .../webapp/app/public/js/components/tabs.js     |  223 -
 .../webapp/app/public/js/ctrl/authController.js |   91 -
 .../public/js/ctrl/configurationController.js   |  332 -
 .../src/main/webapp/app/public/js/ctrl/main.js  |   42 -
 .../webapp/app/public/js/srv/applicationSrv.js  |  168 -
 .../app/public/js/srv/authorizationSrv.js       |  143 -
 .../webapp/app/public/js/srv/entitiesSrv.js     |  281 -
 .../src/main/webapp/app/public/js/srv/main.js   |   19 -
 .../main/webapp/app/public/js/srv/pageSrv.js    |  131 -
 .../main/webapp/app/public/js/srv/siteSrv.js    |  193 -
 .../src/main/webapp/app/public/js/srv/uiSrv.js  |  218 -
 .../webapp/app/public/js/srv/wrapStateSrv.js    |  109 -
 eagle-webservice/src/main/webapp/grunt.json     |   42 -
 eagle-webservice/src/main/webapp/index.html     |   28 -
 eagle-webservice/src/main/webapp/package.json   |   48 -
 eagle-webservice/ui-build.sh                    |   42 -
 pom.xml                                         | 1006 --
 website/.gitignore                              |    5 +
 website/CNAME                                   |    1 +
 website/FAQ.md                                  |   36 +
 website/README.md                               |   49 +
 website/_config.yml                             |   61 +
 website/_includes/footer.html                   |   41 +
 website/_includes/head.html                     |   46 +
 website/_includes/header.html                   |   29 +
 website/_layouts/default.html                   |   14 +
 website/_layouts/dev.html                       |   28 +
 website/_layouts/doc.html                       |   34 +
 website/_layouts/page.html                      |   48 +
 website/_layouts/post.html                      |   14 +
 .../2015-10-26-apache-eagle-announce-cn.md      |  187 +
 website/_sass/_base.scss                        |   94 +
 website/_sass/_layout.scss                      |  235 +
 website/_sass/_syntax-highlighting.scss         |   67 +
 website/about.md                                |   11 +
 website/ambari-plugin-install.md                |   39 +
 website/architecture-highlights.md              |   29 +
 website/community.md                            |   55 +
 website/configuration.md                        |   82 +
 website/css/animate.css                         | 2809 ++++++
 website/css/bootstrap.min.css                   |    7 +
 website/css/colorbox.css                        |   50 +
 website/css/font-awesome.min.css                |    4 +
 website/css/main.scss                           |   50 +
 website/css/misc.css                            |   87 +
 website/css/style.css                           |  813 ++
 website/css/styles.css                          |  137 +
 website/data/user1.hdfs-audit.2015-10-11-00.txt | 7337 ++++++++++++++
 website/data/user1.hdfs-audit.2015-10-11-01.txt | 9346 ++++++++++++++++++
 website/data/userprofile-validate.txt           |    8 +
 website/deployment-in-production.md             |  133 +
 website/deployment-in-sandbox.md                |  113 +
 website/development.md                          |   14 +
 website/documentation.md                        |   41 +
 website/ecosystem.md                            |   19 +
 website/feed.xml                                |   30 +
 website/fonts/FontAwesome.otf                   |  Bin 0 -> 106260 bytes
 website/fonts/flexslider-icon.eot               |  Bin 0 -> 2082 bytes
 website/fonts/flexslider-icon.svg               |   19 +
 website/fonts/flexslider-icon.ttf               |  Bin 0 -> 1892 bytes
 website/fonts/flexslider-icon.woff              |  Bin 0 -> 1268 bytes
 website/fonts/fontawesome-webfont.eot           |  Bin 0 -> 68875 bytes
 website/fonts/fontawesome-webfont.svg           |  640 ++
 website/fonts/fontawesome-webfont.ttf           |  Bin 0 -> 138204 bytes
 website/fonts/fontawesome-webfont.woff          |  Bin 0 -> 81284 bytes
 website/fonts/fontawesome-webfont.woff2         |  Bin 0 -> 64464 bytes
 website/fonts/google-font-roboto.css            |  224 +
 website/fonts/google-font-titillium-web.css     |   48 +
 website/images/apache-incubator-logo-small.png  |  Bin 0 -> 8626 bytes
 website/images/apache-logo-small.gif            |  Bin 0 -> 7129 bytes
 website/images/close.png                        |  Bin 0 -> 835 bytes
 website/images/controls.png                     |  Bin 0 -> 503 bytes
 website/images/diagr.png                        |  Bin 0 -> 269666 bytes
 website/images/diagram.png                      |  Bin 0 -> 128729 bytes
 website/images/diagram2.png                     |  Bin 0 -> 234022 bytes
 website/images/docs/Log4j.png                   |  Bin 0 -> 110525 bytes
 website/images/docs/Port.png                    |  Bin 0 -> 449283 bytes
 website/images/docs/Roadmap.png                 |  Bin 0 -> 241433 bytes
 website/images/docs/Services.png                |  Bin 0 -> 132717 bytes
 website/images/docs/add-service.png             |  Bin 0 -> 12188 bytes
 website/images/docs/eagle-highlights.png        |  Bin 0 -> 37967 bytes
 website/images/docs/eagle-partition.png         |  Bin 0 -> 81467 bytes
 website/images/docs/eagle-service-success.png   |  Bin 0 -> 82737 bytes
 website/images/docs/eagle-service.png           |  Bin 0 -> 449283 bytes
 website/images/docs/hbase-superuser.png         |  Bin 0 -> 147292 bytes
 website/images/docs/hdfs-browse.png             |  Bin 0 -> 294385 bytes
 website/images/docs/hdfs-delete1.png            |  Bin 0 -> 226819 bytes
 website/images/docs/hdfs-delete2.png            |  Bin 0 -> 252037 bytes
 website/images/docs/hdfs-env-conf.png           |  Bin 0 -> 460829 bytes
 website/images/docs/hdfs-env-conf2.png          |  Bin 0 -> 265131 bytes
 website/images/docs/hdfs-import1.png            |  Bin 0 -> 226470 bytes
 website/images/docs/hdfs-import2.png            |  Bin 0 -> 247560 bytes
 website/images/docs/hdfs-import3.png            |  Bin 0 -> 250243 bytes
 website/images/docs/hdfs-log4j-conf.png         |  Bin 0 -> 359551 bytes
 website/images/docs/hdfs-mark1.png              |  Bin 0 -> 238948 bytes
 website/images/docs/hdfs-mark2.png              |  Bin 0 -> 244250 bytes
 website/images/docs/hdfs-mark3.png              |  Bin 0 -> 238063 bytes
 website/images/docs/hdfs-policy1.png            |  Bin 0 -> 269907 bytes
 website/images/docs/hdfs-policy2.png            |  Bin 0 -> 332129 bytes
 website/images/docs/hdfs-policy3.png            |  Bin 0 -> 357626 bytes
 website/images/docs/hdfs-remove.png             |  Bin 0 -> 244657 bytes
 website/images/docs/hdfs-setup.png              |  Bin 0 -> 248431 bytes
 website/images/docs/hive-policy1.png            |  Bin 0 -> 267743 bytes
 website/images/docs/hive-policy2.png            |  Bin 0 -> 313274 bytes
 website/images/docs/hive-policy3.png            |  Bin 0 -> 346090 bytes
 website/images/docs/hive-setup.png              |  Bin 0 -> 270525 bytes
 website/images/docs/login.png                   |  Bin 0 -> 53305 bytes
 website/images/docs/new-site.png                |  Bin 0 -> 251150 bytes
 website/images/docs/offline-userprofile.png     |  Bin 0 -> 575145 bytes
 website/images/docs/online-userprofile.png      |  Bin 0 -> 576626 bytes
 website/images/docs/selectSite.png              |  Bin 0 -> 199804 bytes
 website/images/docs/sensitivity-policy.png      |  Bin 0 -> 343947 bytes
 website/images/docs/site.png                    |  Bin 0 -> 23437 bytes
 website/images/docs/start-spark.png             |  Bin 0 -> 378390 bytes
 website/images/docs/start-storm.png             |  Bin 0 -> 500714 bytes
 website/images/docs/storm-slot.png              |  Bin 0 -> 480504 bytes
 website/images/docs/userProfile1.png            |  Bin 0 -> 232435 bytes
 website/images/docs/userProfile2.png            |  Bin 0 -> 239916 bytes
 website/images/docs/userProfile3.png            |  Bin 0 -> 238282 bytes
 website/images/docs/userProfile4.png            |  Bin 0 -> 253588 bytes
 website/images/docs/userprofile-arch copy.png   |  Bin 0 -> 163746 bytes
 website/images/docs/userprofile-arch.png        |  Bin 0 -> 163746 bytes
 website/images/docs/userprofile-model.png       |  Bin 0 -> 46939 bytes
 website/images/docs/userprofile-setup.png       |  Bin 0 -> 258500 bytes
 website/images/ebay.png                         |  Bin 0 -> 9572 bytes
 website/images/favicon.png                      |  Bin 0 -> 4209 bytes
 website/images/feather.png                      |  Bin 0 -> 11241 bytes
 website/images/loading.gif                      |  Bin 0 -> 6244 bytes
 website/images/logo.png                         |  Bin 0 -> 10533 bytes
 website/images/logo2.png                        |  Bin 0 -> 26590 bytes
 website/images/logo_700x400.png                 |  Bin 0 -> 20425 bytes
 website/images/logo_700x400_narrow.png          |  Bin 0 -> 90926 bytes
 website/images/logo_945x354.png                 |  Bin 0 -> 26546 bytes
 website/images/logo_square.png                  |  Bin 0 -> 12333 bytes
 website/images/next.png                         |  Bin 0 -> 724 bytes
 website/images/paypal.svg                       |   55 +
 website/images/posts/density-estimation.png     |  Bin 0 -> 110635 bytes
 website/images/posts/eagle-group.png            |  Bin 0 -> 37967 bytes
 website/images/posts/eagle-header.png           |  Bin 0 -> 584947 bytes
 website/images/posts/eagle_compressed.pdf       |  Bin 0 -> 172734 bytes
 website/images/posts/eigen-decomposition.png    |  Bin 0 -> 46939 bytes
 website/images/posts/ml-pipeline.png            |  Bin 0 -> 163746 bytes
 website/images/posts/policy-partition.png       |  Bin 0 -> 81467 bytes
 website/images/previous.png                     |  Bin 0 -> 726 bytes
 website/images/qrcode-8cm.jpg                   |  Bin 0 -> 27951 bytes
 website/images/slider/1.jpg                     |  Bin 0 -> 443262 bytes
 website/images/slider/2.jpg                     |  Bin 0 -> 521068 bytes
 website/images/slider/3.jpg                     |  Bin 0 -> 562523 bytes
 website/images/slider/4.jpg                     |  Bin 0 -> 895483 bytes
 website/images/step1.png                        |  Bin 0 -> 3350 bytes
 website/images/step2.png                        |  Bin 0 -> 3341 bytes
 website/images/step3.png                        |  Bin 0 -> 3275 bytes
 website/images/step4.png                        |  Bin 0 -> 3276 bytes
 website/images/usecases/1.png                   |  Bin 0 -> 10984 bytes
 website/images/usecases/2.png                   |  Bin 0 -> 5553 bytes
 website/images/usecases/3.png                   |  Bin 0 -> 5809 bytes
 website/images/usecases/4.png                   |  Bin 0 -> 7417 bytes
 website/import-hdfs-auditLog.md                 |  126 +
 website/index.html                              |  474 +
 website/install.md                              |   70 +
 website/introduction.md                         |   30 +
 website/js/custom.js                            |  154 +
 website/js/jquery-1.11.1.min.js                 |    4 +
 website/js/jquery.colorbox.js                   | 1085 ++
 website/js/jquery.flexslider.js                 | 1136 +++
 website/js/jquery.singlePageNav.js              |  183 +
 website/js/modernizr.min.js                     |    1 +
 website/js/responsiveCarousel.min.js            |    7 +
 website/js/svg.js                               |   24 +
 website/policy-api.md                           |  188 +
 website/quick-start.md                          |   68 +
 website/standalone-install.md                   |   20 +
 website/terminology.md                          |   16 +
 website/tutorial-classfication.md               |   49 +
 website/tutorial-ldap.md                        |   38 +
 website/tutorial-policy.md                      |   59 +
 website/tutorial-setup.md                       |   97 +
 website/tutorial-userprofile.md                 |   65 +
 website/usecase.md                              |   14 +
 website/user-profile-ml.md                      |   23 +
 1610 files changed, 27154 insertions(+), 141137 deletions(-)
----------------------------------------------------------------------




[03/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology.py
deleted file mode 100755
index 0d90789..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleTopology(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-TOPOLOGY"}
-
-  def install(self, env):
-    Logger.info('Install the eagle topology')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # eagle_topology_exec(action = 'init')
-
-  def configure(self,env):
-    Logger.info("Configure eagle topology")
-    import params
-    env.set_params(params)
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing Rolling Upgrade pre-restart")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle-topology {version}"))
-
-  def stop(self, env):
-    Logger.info('Stop the eagle topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_topology_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Start the eagle topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_topology_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Status of the eagle topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_topology_exec(action = 'status')
-
-if __name__ == "__main__":
-  EagleTopology().execute()

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology_check.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology_check.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology_check.py
deleted file mode 100644
index ac28fad..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_topology_check.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-from resource_management import *
-
-class EagleTopologyCheck(Script):
-  def service_check(self,env):
-    import params
-    env.set_params(params)
-    import actions
-    eagle_service_exec(action="status")
-
-if __name__ == "__main__":
-  EagleTopologyCheck().execute()    

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_scheduler.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_scheduler.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_scheduler.py
deleted file mode 100755
index f2d5289..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_scheduler.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleUserProfileScheduler(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-TOPOLOGY"}
-
-  def install(self, env):
-    Logger.info('Install Eagle UserProfile Scheduler')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # eagle_topology_exec(action = 'init')
-
-  def configure(self,env):
-    Logger.info("Configure Eagle UserProfile Scheduler")
-    import params
-    env.set_params(params)
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing rolling pre-restart Eagle UserProfile Scheduler")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle-topology {version}"))
-
-  def stop(self, env):
-    Logger.info('Stopping Eagle UserProfile Scheduler')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_userprofile_scheduler_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Starting Eagle UserProfile Scheduler')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_userprofile_scheduler_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Checking Eagle UserProfile Scheduler')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_userprofile_scheduler_exec(action = 'status')
-
-if __name__ == "__main__":
-    EagleUserProfileScheduler().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_topology.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_topology.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_topology.py
deleted file mode 100755
index 3671ff6..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/eagle_userprofile_topology.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-import sys
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions import get_unique_id_and_date
-from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
-from resource_management.libraries.functions.security_commons import build_expectations, \
-  cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
-  FILE_TYPE_JAAS_CONF
-from resource_management.core.shell import call
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.validate import call_and_match_output
-
-from actions import *
-
-class EagleUserProfileTopology(Script):
-  # def get_stack_to_component(self):
-  #  return {"HDP": "EAGLE-TOPOLOGY"}
-
-  def install(self, env):
-    Logger.info('Install Eagle DAM UserProfile Topology')
-    # self.install_packages(env)
-    import params
-    env.set_params(params)
-    self.configure(env)
-    # eagle_hdfs_topology_exec(action = 'init')
-
-
-  def configure(self,env):
-    Logger.info("Configure Eagle DAM UserProfile Topology")
-    import params
-    env.set_params(params)
-    # eagle_hdfs_topology_exec(action = 'init')
-
-  def pre_rolling_restart(self,env):
-    Logger.info("Executing rolling pre-restart Eagle DAM UserProfile Topology")
-    import params
-    env.set_params(params)
-
-    # if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
-    #  Execute(format("hdp-select set eagle-topology {version}"))
-
-  def stop(self, env):
-    Logger.info('Stopping Eagle DAM UserProfile Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_userprofile_topology_exec(action = 'stop')
-
-  def start(self, env):
-    Logger.info('Starting Eagle DAM UserProfile Topology')
-    import params
-    env.set_params(params)
-    self.configure(env)
-
-    eagle_userprofile_topology_exec(action = 'init')
-    eagle_userprofile_topology_exec(action = 'start')
-
-  def status(self, env):
-    Logger.info('Checking Eagle DAM UserProfile Topology status')
-    import params
-    env.set_params(params)
-    self.configure(env)
-    eagle_userprofile_topology_exec(action = 'status')
-
-if __name__ == "__main__":
-    EagleUserProfileTopology().execute()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/params.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/params.py
deleted file mode 100755
index 1e0f839..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/params.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-"""
-Ambari Agent
-"""
-
-from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions
-from resource_management.libraries.functions.default import default
-from resource_management import *
-# import status_params
-
-# server configurations
-config = Script.get_config()
-tmp_dir = Script.get_tmp_dir()
-
-stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
-hdp_stack_version = format_hdp_stack_version(stack_version_unformatted)
-
-stack_name = default("/hostLevelParams/stack_name", None)
-
-# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
-version = default("/commandParams/version", None)
-
-#hadoop params
-if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  role_root = "eagle"
-  command_role = default("/role", "")
-
-  if command_role == "EAGLE_SERVICE":
-    role_root = "eagle"
-
-  eagle_home = format("/usr/hdp/current/{role_root}")
-  eagle_bin = format("/usr/hdp/current/{role_root}/bin")
-  eagle_conf = format("/usr/hdp/current/{role_root}/conf")
-else:
-  eagle_home = "/usr"
-  eagle_bin = "/usr/lib/zookeeper/bin"
-
-eagle_user =  'root'
-eagle_site = 'sandbox'
-eagle_service_pid_file = format("{eagle_home}/temp/service.pid")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py b/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py
deleted file mode 100644
index b84ffc0..0000000
--- a/eagle-external/eagle-ambari/lib/EAGLE/package/scripts/service_check.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-
-# 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.
-
-from resource_management import *
-from resource_management.libraries.script.script import Script
-from resource_management.libraries.functions.validate import call_and_match_output
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-
-class EagleServiceCheck(Script):
-  def service_check(self,env):
-    Logger.info("Checking eagle service") 
-    import params
-    env.set_params(params)
-    check_eagle_service_cmd=format("ls {eagle_service_pid_file} >/dev/null 2>&1 && ps -p `cat {eagle_service_pid_file}` >/dev/null 2>&1")
-    Execute(check_eagle_service_cmd,logoutput=True,try_sleep=3, tries=5)
-
-if __name__ == "__main__":
-  EagleServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-ambari/lib/metainfo.xml
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-ambari/lib/metainfo.xml b/eagle-external/eagle-ambari/lib/metainfo.xml
deleted file mode 100644
index 0953c8f..0000000
--- a/eagle-external/eagle-ambari/lib/metainfo.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.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.
--->
-
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>EAGLE</name>
-      <extends>common-services/EAGLE/0.0.1</extends>
-    </service>
-  </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/Dockerfile
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/Dockerfile b/eagle-external/eagle-docker/Dockerfile
deleted file mode 100644
index 4aa3dec..0000000
--- a/eagle-external/eagle-docker/Dockerfile
+++ /dev/null
@@ -1,47 +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.
-
-# NOTICE: This docker image is built based sequenceiq/ambari which is open sourced under github: https://github.com/sequenceiq/docker-ambari
-FROM sequenceiq/ambari:1.7.0
-
-MAINTAINER dev@eagle.incubator.apache.org
-
-# Eagle environment
-ENV EAGLE_HOME=/usr/hdp/current/eagle
-
-# Install Eagle Package
-#
-# [Option #1] Download eagle package from external link
-# ENV EAGLE_DOWNLOAD_LINK http://66.211.190.194/eagle-0.1.0.tar.gz
-# RUN curl -sL $EAGLE_DOWNLOAD_LINK | tar -xz -C /usr/hdp/current
-# RUN cd /usr/hdp/current && ln -s ./eagle-0.1.0 eagle
-
-# [Option #2] Load eagle package from locally built,
-# In such way, should build with `eagle-docker.sh buid` instead of executing native
-# `docker build` directly, to prepare the eagle package into build/eagle
-ADD target/eagle-current /usr/hdp/current/eagle
-
-# Load External Packages
-RUN yum install -y kafka zookeeper storm hbase tez hadoop snappy snappy-devel hadoop-libhdfs ambari-log4j hive hive-hcatalog hive-webhcat webhcat-tar-hive webhcat-tar-pig mysql-connector-java mysql-server
-
-# Load Static Resources
-ADD resource/serf /usr/local/serf
-ADD resource/install-cluster.sh /tmp/
-ADD resource/eagle-singlenode.json /tmp/
-ADD resource/eagle-multinode.json /tmp/
-ADD resource/wait-for-eagle.sh /tmp/
-ADD resource/deploy-eagle.sh /usr/hdp/current/eagle/deploy.sh
-
-EXPOSE 9099 8744 8080 2181 2888 6667 60020 60030 60010

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/LICENSE
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/LICENSE b/eagle-external/eagle-docker/LICENSE
deleted file mode 100644
index b9c8eef..0000000
--- a/eagle-external/eagle-docker/LICENSE
+++ /dev/null
@@ -1,209 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed 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.
-
-==============================================================================
-Apache Eagle (incubating) Subcomponents:
-
-The Apache Eagle project contains subcomponents with separate copyright
-notices and license terms. Your use of the source code for the these
-subcomponents is subject to the terms and conditions of the following
-licenses.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/README.md
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/README.md b/eagle-external/eagle-docker/README.md
deleted file mode 100644
index 105fee0..0000000
--- a/eagle-external/eagle-docker/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-{% comment %}
-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.
-{% endcomment %}
--->
-
-# Eagle in Docker
-
-> Docker image for Apache Eagle https://hub.docker.com/r/apacheeagle/sandbox
-
-This is docker container for eagle to help users to have a quick preview about eagle features. 
-And this project is to build apache/eagle images and provide eagle-functions to start the containers of eagle.
-
-## Prerequisite
-* [Apache Maven](https://maven.apache.org)
-* [NPM](https://www.npmjs.com)
-* [Docker](https://www.docker.com)
- 	* [Mac OS X](http://docs.docker.com/mac/started)
- 	* [Linux](http://docs.docker.com/linux/started)
- 	* [Windows](http://docs.docker.com/windows/started)
-
-## Getting Started
-The fastest way to get started with Eagle is to run with [docker](https://github.com/docker/docker) by one of following options:
-
-* Pull latest eagle docker image from [docker hub](https://hub.docker.com/r/apacheeagle/sandbox/) directly:
-
-        docker pull apacheeagle/sandbox
-
-  Then run eagle docker image:
-
-      docker run -p 9099:9099 -p 8080:8080 -p 8744:8744 -p 2181:2181 -p 2888:2888 -p 6667:6667 -p 60020:60020 \
-        -p 60030:60030 -p 60010:60010 -d --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh \
-        -e KEYCHAIN= --env EAGLE_SERVER_HOST=sandbox.eagle.incubator.apache.org --name sandbox \
-        -h sandbox.eagle.incubator.apache.org --privileged=true apacheeagle/sandbox:latest \
-        --tag ambari-server=true
-      docker run -it --rm -e EXPECTED_HOST_COUNT=1 -e BLUEPRINT=hdp-singlenode-eagle --link sandbox:ambariserver\
-        --entrypoint /bin/sh apacheeagle/sandbox:latest -c /tmp/install-cluster.sh
-
-      
-* Build eagle docker image from source code with [eagle-docker](eagle-external/eagle-docker):
-
-        git clone https://github.com/apache/incubator-eagle.git
-        cd incubator-eagle && ./eagle-docker boot
-
-## Usage ##
-Basic usage of the entry script of eagle-docker: [bin/eagle-docker.sh](bin/eagle-docker.sh)
- 
-    Usage: ./eagle-docker [options] [command]
-    
-    Apache Eagle Docker Image : apacheeagle/sandbox:latest
-    
-    Commands:
-      build           Build eagle docker image
-      deploy          Deploy eagle docker image
-      start           Start eagle docker instance
-      stop            Stop eagle docker instance
-      status          List eagle docker image and instance status
-      clean           Clean docker image and instance
-      shell           Execute docker instance bash, default: eagle-sandbox
-      boot            Simply bootstrap eagle docker by building then deploying
-    
-    Options:
-      --node [num]    Docker instances node number, default is 1
-      --help          Display eagle docker image usage information
-
-## Advanced
-1. **Build Image**: Go to the root directory where the [Dockerfile](Dockerfile) is in, build image with following command:
- 
-        docker built -t apacheeagle/sandbox . 
- 
-    > The docker image is named `apacheeagle/sandbox`. Eagle docker image is based on [`ambari:1.7.0`](https://github.com/sequenceiq/docker-ambari), it will install ganglia, hbase,hive,storm,kafka and so on in this image. Add startup script and buleprint file into image. 
-
-2. **Verify Image**: After building the `apacheeagle/sandbox` image successfully, verify the images and could find eagle image.
-
-        docker images
-
-3. **Deploy Image**: This project also provides helper functions in script [eagle-lib.sh](bin/eagle-lib.sh) for convenience.
-  
-        # Firstly, load the helper functions into context
-        source eagle-functions
-            
-        # Secondly, start to deploy eagle cluster
-    
-        # (1) start single-node container
-        eagle-deploy-cluster 1 
-
-        # (2) Or muti-node containers
-        eagle-deploy-cluster 3 
-
-4. **Find IP and Port Mapping**: After the container is up and running. The first thing you need to do is finding the IP address and port mapping of the docker container:
-
-        docker inspect -f '{{ .NetworkSettings.IPAddress }}' eagle-server
-        docker ps
-
-5. **Start to use Eagle**: Congratulations! You are able to start using Eagle now. Please open eagle ui at following address (username: ADMIN, password: secret by default)
-
-        http://{{container_ip}}:9099/eagle-service  
-
-6. **Manage Eagle Cluster**: This step is about how to managing the eagle cluster though not must-have at starting. Eagle docker depends on Ambari to manage the cluster infrastructure of Eagle. Following are some helpful links:
-
-  * Ambari UI: `http://{{container_ip}}:8080` (username: ADMIN, password: ADMIN)
-  * Storm UI: `http://{{container_ip}}:8744`
-
-## Get Help
-The fastest way to get response from eagle community is to send email to the mail list [dev@eagle.incubator.apache.org](mailto:dev@eagle.incubator.apache.org),
-and remember to subscribe our mail list via [dev-subscribe@eagle.incubator.apache.org](mailto:dev-subscribe@eagle.incubator.apache.org)
-
-## FAQ
-[https://cwiki.apache.org/confluence/display/EAG/FAQ#FAQ-EagleDocker](https://cwiki.apache.org/confluence/display/EAG/FAQ#FAQ-EagleDocker)
-
-## License
-Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). More details, please refer to [LICENSE](LICENSE) file.

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/bin/eagle-docker.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/bin/eagle-docker.sh b/eagle-external/eagle-docker/bin/eagle-docker.sh
deleted file mode 100755
index d490d21..0000000
--- a/eagle-external/eagle-docker/bin/eagle-docker.sh
+++ /dev/null
@@ -1,299 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# NOTICE: This script is developed and maintained by Apache Eagle community under Apache Softwarw Foundation but not from official Docker product or community.
-
-EAGLE_DOCKER_VERSION=latest
-EAGLE_DOCKER_NAME=apacheeagle/sandbox
-EAGLE_DOCKER_PREFIX=sandbox
-
-export NODE_NUM=1
-
-cd `dirname $0`/../
-source bin/eagle-lib.sh	
-
-function check_env(){
-	which docker 1>/dev/null 2>&1
-
-	if [ $? != 0 ];then
-		echo "[ERROR] docker commnad is not found, please make sure install and configure Docker Engine properly, docker docs: http://docs.docker.com" 1>&2
-		exit 1
-	else
-		log=`docker images 2>&1`
-		if [ $? != 0 ];then
-			echo "[ERROR] $log"
-			exit 1
-		fi
-	fi
-}
-
-function usage() {
-	echo "Usage: ./eagle-docker [options] [command]"
-
-	echo ""
-	echo "Apache Eagle Docker Image : ${EAGLE_DOCKER_NAME}:${EAGLE_DOCKER_VERSION}"
-	echo ""
-	echo "Commands:"
-	echo "  build           Build eagle docker image"
-	echo "  deploy          Deploy eagle docker image"
-	echo "  start           Start eagle docker instance"
-	echo "  stop            Stop eagle docker instance"
-	echo "  status          List eagle docker image and instance status"
-	echo "  clean           Clean docker image and instance"
-	echo "  shell           Execute docker instance bash, default: eagle-sandbox"
-	echo "  boot            Simply bootstrap eagle docker by building then deploying"
-	echo ""
-	echo "Options:"
-	echo "  --node [num]    Docker instances node number, default is 1"
-	echo "  --help          Display eagle docker image usage information"
-	echo ""
-	exit 0
-}
-
-function build(){
-	check_env
-	# ==========================================
-	# Check Eagle Docker Image
-	# ==========================================
-	echo "[1/3] Validate Environment"
-	# echo "Checking eagle docker image ..."
-	docker images | grep $EAGLE_DOCKER_NAME 1>/dev/null 2>&1
-	if [ $? == 0 ];then
-		echo "Eagle docker image already exists:"
-		echo ""
-		docker images | grep $EAGLE_DOCKER_NAME
-		echo ""
-		echo "Rebuild it now [Y/N]? "
-		read rebuild
-		if [ $rebuild == "Y" ] || [ $rebuild == "y" ];then
-			echo  "Clean eagle image"
-			clean
-		else
-			echo "Quit now"
-			exit 1
-		fi
- 	else
-		echo "No existing eagle docker images, environment is ready"
-	fi	
-
-	# ==========================================
-	# Build Eagle Binary Package 
-	# ==========================================
-	echo "[2/3] Build Eagle Binary Package"
-	# echo "Checking eagle binary package"
-	cd ../../
-	ls eagle-assembly/target/eagle-*-bin.tar.gz 1>/dev/null 2>&1
-	if [ $? == 0 ];then
-		eagle_bin_pkg=`ls eagle-assembly/target/eagle-*-bin.tar.gz`
-		echo "Found eagle binary package at $eagle_bin_pkg"	
-	else
-		echo "Eagle binary package is not found"
-		echo "Build eagle binary package now"
-		# ==========================================
-		# Build Eagle Binary Package with Maven
-		# ==========================================
-		echo ""
-		echo "Execute: mvn package -DskipTests "
-		mvn package -DskipTests
-		if [ $? == 0 ];then
-			echo "Built successfully existing with 0"	
-			ls eagle-assembly/target/eagle-*-bin.tar.gz 1>/dev/null 2>&1
-			if [ $? == 0 ];then
-				eagle_bin_pkg=`ls eagle-assembly/target/eagle-*-bin.tar.gz`
-				echo ""
-				echo "[SUCCESS] Successfully build eagle binary package at $eagle_bin_pkg"	
-			else
-				echo ""
-				echo "[FAILED] Built eagle binary package exiting with 0, but package is not found"
-				exit 1
-			fi
-		else
-			echo ""
-			echo "[FAILED] Failed to build eagle binary package, exit 1"
-			exit 1
-		fi
-	fi
-
-  	# =====================================
-	# Build Eagle Docker Image
-  	# =====================================
-	echo "[3/3] Build Eagle Docker Image: $EAGLE_DOCKER_NAME"
-	echo "Extracting $eagle_bin_pkg" 
-	if [ -e eagle-external/eagle-docker/target ];then
-		rm -rf eagle-external/eagle-docker/target
-	fi
-	mkdir -p eagle-external/eagle-docker/target/eagle-current
-
-	out=`tar -xzf $eagle_bin_pkg -C eagle-external/eagle-docker/target/`
-	if [ $? != 0 ];then
-		echo "[ERROR] Failed to execute 'tar -xzf $eagle_bin_pkg -C eagle-external/eagle-docker/target/': $out" 1>&2 
-		exit 1
-	fi
-	mv eagle-external/eagle-docker/target/eagle-*/* eagle-external/eagle-docker/target/eagle-current
-
-	echo "Execute: docker build -t $EAGLE_DOCKER_NAME ."
-        cd eagle-external/eagle-docker
-	docker build -t $EAGLE_DOCKER_NAME .
-	
-	if [ $? == 0 ];then
-		echo ""
-		echo "[SUCCESS] Successfully built eagle docker image : $EAGLE_DOCKER_NAME"
-	else
-		echo ""
-		echo "[FAILED] Failed to build eagle docker image : $EAGLE_DOCKER_NAME"
-	fi
-}
-
-
-function start(){
-	check_env
-	docker ps -a | grep $EAGLE_DOCKER_NAME 1>/dev/null 
-	if [ $? != 0 ];then
-		echo "No eagle docker instance found"
-		exit 1
-	fi
-	docker ps -a | grep $EAGLE_DOCKER_NAME | grep Exited  1>/dev/null 
-	if [ $? != 0 ];then
-		echo "No exited eagle docker instance found, all should be running"
-		exit 1
-	fi
-	docker ps -a | grep $EAGLE_DOCKER_NAME | grep Exited | awk '{ print $1 }' | while read id; do echo "Starting $id";docker start $id 1>/dev/null;done
-
-	echo ""
-	echo "[Eagle Docker Instances (Up)]"	
-	echo ""
-	docker ps | grep $EAGLE_DOCKER_NAME
-}
-
-function stop(){
-	check_env
-	docker ps | grep $EAGLE_DOCKER_NAME  1>/dev/null
-	if [ $? != 0 ];then
-		echo "No eagle docker instance is running"
-		exit 1
-	fi
-	docker ps | grep $EAGLE_DOCKER_NAME  | awk '{ print $1 }' | while read id; do echo "Stopping $id";docker kill $id;done
-
-	echo ""
-	echo "[Eagle Docker Instances (Exited)]"	
-	echo ""
-	docker ps -a| grep $EAGLE_DOCKER_NAME
-}
-
-function status(){
-	check_env
-	echo "[Eagle Docker Images]"
-	echo ""
-	docker images | grep $EAGLE_DOCKER_NAME
-	[[ $? == 0 ]] || echo "no images found for eagle"
-	echo ""
-
-	echo "[Eagle Docker Instances]"	
-	echo ""
-	docker ps -a | grep $EAGLE_DOCKER_NAME 
-	[[ $? == 0 ]] || echo "no instances found eagle"
-	echo ""
-}
-
-
-function clean(){
-	check_env
-	echo "[1/4] Stop eagle instances"
-	# Call in multi-process to avoid exiting by stopping
-	echo `stop`
-	
-	echo "[2/4] Remove eagle instances"
-	docker ps -a | grep $EAGLE_DOCKER_NAME |awk '{print $1}'| while read id; do echo "Removing instance $id";docker rm $id;done
-
-	echo "[3/4] Remove eagle images"
-	docker images | grep $EAGLE_DOCKER_NAME | awk '{print $3}' | while read id; do echo "Removing image $id"; docker rmi $id;done
-
-	echo "[4/4] Clean temp files"
-        [[ -e target/ ]] && rm -rf target/
-	
-	echo "Cleaning Done."
-}
-
-function deploy(){
-	check_env
-	if [ "$NODE_NUM" == "" ];then
-		export NODE_NUM=1
-	fi 
-	echo "Deploying $NODE_NUM nodes"
-	eagle-deploy-cluster $NODE_NUM
-}
-
-function boot(){
-	check_env
-	build
-	deploy
-	status
-}
-
-function exec_bash(){
-	docker exec -it $EAGLE_DOCKER_PREFIX bash
-}
-
-while [[ -n $1 ]]; do
-	case $1 in
-	"--node")
-		if [ $# -lt 2 ]; then
-        	usage
-        	exit 1
-     		fi
-	 	NODE_NUM=$2
-     		shift
-     		;;
-	"deploy")
-        	deploy 
-		exit
-		;;
-	"build")
-        	build	
-		exit
-		;;
-	"boot")
-        	boot	
-		exit
-		;;
-	"status")
-        	status 
-		exit
-		;;
-	"start")
- 		start	
-		exit
-		;;
-	"stop")
- 		stop	
-		exit
-		;;
-	"clean")	
-		clean	
-		exit
-		;;
-	"shell")	
-		exec_bash
-		exit
-		;;
-	*)
-		usage
-		exit 1
-	;;
-	esac
-	shift
-done

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/bin/eagle-lib.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/bin/eagle-lib.sh b/eagle-external/eagle-docker/bin/eagle-lib.sh
deleted file mode 100755
index c988866..0000000
--- a/eagle-external/eagle-docker/bin/eagle-lib.sh
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-: ${VERSION:=latest}
-: ${IMAGE:="apacheeagle/sandbox:${VERSION}"}
-
-: ${NODE_PREFIX:=sandbox}
-: ${AMBARI_SERVER_NAME:=${NODE_PREFIX}}
-: ${MYDOMAIN:=eagle.incubator.apache.org}
-: ${DOCKER_OPTS:="--dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN=$KEYCHAIN --env EAGLE_SERVER_HOST=${AMBARI_SERVER_NAME}.${MYDOMAIN}"}
-: ${CLUSTER_SIZE:=1}
-: ${DEBUG:=1}
-: ${SLEEP_TIME:=2}
-: ${DRY_RUN:=false}
-
-run-command() {
-  CMD="$@"
-  if [ "$DRY_RUN" == "false" ]; then
-    debug "$CMD"
-    "$@"
-  else
-    debug [DRY_RUN] "$CMD"
-  fi
-}
-
-amb-clean() {
-  unset NODE_PREFIX AMBARI_SERVER_NAME MYDOMAIN IMAGE DOCKER_OPTS DEBUG SLEEP_TIME AMBARI_SERVER_IP DRY_RUN
-}
-
-get-ambari-server-ip() {
-  AMBARI_SERVER_IP=$(get-host-ip ${AMBARI_SERVER_NAME})
-}
-
-get-host-ip() {
-  HOST=$1
-  docker inspect --format="{{.NetworkSettings.IPAddress}}" ${HOST}
-}
-
-amb-members() {
-  get-ambari-server-ip
-  serf members --rpc-addr $(docker inspect --format "{{.NetworkSettings.IPAddress}}" ${AMBARI_SERVER_NAME}):7373
-}
-
-amb-settings() {
-  cat <<EOF
-  NODE_PREFIX=$NODE_PREFIX
-  MYDOMAIN=$MYDOMAIN
-  CLUSTER_SIZE=$CLUSTER_SIZE
-  AMBARI_SERVER_NAME=$AMBARI_SERVER_NAME
-  IMAGE=$IMAGE
-  DOCKER_OPTS=$DOCKER_OPTS
-  AMBARI_SERVER_IP=$AMBARI_SERVER_IP
-  DRY_RUN=$DRY_RUN
-EOF
-}
-
-debug() {
-  [ $DEBUG -gt 0 ] && echo [DEBUG] "$@" 1>&2
-}
-
-docker-ps() {
-  #docker ps|sed "s/ \{3,\}/#/g"|cut -d '#' -f 1,2,7|sed "s/#/\t/g"
-  docker inspect --format="{{.Name}} {{.NetworkSettings.IPAddress}} {{.Config.Image}} {{.Config.Entrypoint}} {{.Config.Cmd}}" $(docker ps -q)
-}
-
-docker-psa() {
-  #docker ps|sed "s/ \{3,\}/#/g"|cut -d '#' -f 1,2,7|sed "s/#/\t/g"
-  docker inspect --format="{{.Name}} {{.NetworkSettings.IPAddress}} {{.Config.Image}} {{.Config.Entrypoint}} {{.Config.Cmd}}" $(docker ps -qa)
-}
-
-amb-start-cluster() {
-  local act_cluster_size=$1
-  : ${act_cluster_size:=$CLUSTER_SIZE}
-  echo starting an ambari cluster with: $act_cluster_size nodes
-
-  amb-start-first
-  [ $act_cluster_size -gt 1 ] && for i in $(seq $((act_cluster_size - 1))); do
-    amb-start-node $i
-  done
-}
-
-_amb_run_shell() {
-  COMMAND=$1
-  : ${COMMAND:? required}
-  get-ambari-server-ip
-  NODES=$(docker inspect --format="{{.Config.Image}} {{.Name}}" $(docker ps -q)|grep $IMAGE|grep $NODE_PREFIX|wc -l|xargs)
-  run-command docker run -it --rm -e EXPECTED_HOST_COUNT=$NODES -e BLUEPRINT=$BLUEPRINT --link ${AMBARI_SERVER_NAME}:ambariserver --entrypoint /bin/sh $IMAGE -c $COMMAND
-}
-
-amb-shell() {
-  _amb_run_shell /tmp/ambari-shell.sh
-}
-
-eagle-deploy-cluster() {
-  local act_cluster_size=$1
-  : ${act_cluster_size:=$CLUSTER_SIZE}
-
-  if [ $# -gt 1 ]; then
-    BLUEPRINT=$2
-  else
-    [ $act_cluster_size -gt 1 ] && BLUEPRINT=hdp-multinode-eagle || BLUEPRINT=hdp-singlenode-eagle
-  fi
-
-  : ${BLUEPRINT:?" required (hdp-singlenode-eagle / hdp-multinode-eagle)"}
-
-  amb-start-cluster $act_cluster_size
-  _amb_run_shell /tmp/install-cluster.sh
-}
-
-amb-start-first() {
-  run-command docker run -p 9099:9099 -p 8080:8080 -p 8744:8744 -p 2181:2181 -p 2888:2888 -p 6667:6667 -p 60020:60020 -p 60030:60030 -p 60010:60010 -d $DOCKER_OPTS --name $AMBARI_SERVER_NAME -h $AMBARI_SERVER_NAME.$MYDOMAIN --privileged=true $IMAGE --tag ambari-server=true
-}
-
-amb-copy-to-hdfs() {
-  get-ambari-server-ip
-  FILE_PATH=${1:?"usage: <FILE_PATH> <NEW_FILE_NAME_ON_HDFS> <HDFS_PATH>"}
-  FILE_NAME=${2:?"usage: <FILE_PATH> <NEW_FILE_NAME_ON_HDFS> <HDFS_PATH>"}
-  DIR=${3:?"usage: <FILE_PATH> <NEW_FILE_NAME_ON_HDFS> <HDFS_PATH>"}
-  amb-create-hdfs-dir $DIR
-  DATANODE=$(curl -si -X PUT "http://$AMBARI_SERVER_IP:50070/webhdfs/v1$DIR/$FILE_NAME?user.name=hdfs&op=CREATE" |grep Location | sed "s/\..*//; s@.*http://@@")
-  DATANODE_IP=$(get-host-ip $DATANODE)
-  curl -T $FILE_PATH "http://$DATANODE_IP:50075/webhdfs/v1$DIR/$FILE_NAME?op=CREATE&user.name=hdfs&overwrite=true&namenoderpcaddress=$AMBARI_SERVER_IP:8020"
-}
-
-amb-create-hdfs-dir() {
-  get-ambari-server-ip
-  DIR=$1
-  curl -X PUT "http://$AMBARI_SERVER_IP:50070/webhdfs/v1$DIR?user.name=hdfs&op=MKDIRS" > /dev/null 2>&1
-}
-
-amb-scp-to-first() {
-  get-ambari-server-ip
-  FILE_PATH=${1:?"usage: <FILE_PATH> <DESTINATION_PATH>"}
-  DEST_PATH=${2:?"usage: <FILE_PATH> <DESTINATION_PATH>"}
-  scp $FILE_PATH root@$AMBARI_SERVER_IP:$DEST_PATH
-}
-
-amb-start-node() {
-  get-ambari-server-ip
-  : ${AMBARI_SERVER_IP:?"AMBARI_SERVER_IP is needed"}
-  NUMBER=${1:?"please give a <NUMBER> parameter it will be used as node<NUMBER>"}
-  if [ $# -eq 1 ] ;then
-    MORE_OPTIONS="-d"
-  else
-    shift
-    MORE_OPTIONS="$@"
-  fi
-  run-command docker run $MORE_OPTIONS -e SERF_JOIN_IP=$AMBARI_SERVER_IP $DOCKER_OPTS --name ${NODE_PREFIX}_$NUMBER -h ${NODE_PREFIX}_${NUMBER}.$MYDOMAIN $IMAGE --log-level debug
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/deploy-eagle.sh
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/deploy-eagle.sh b/eagle-external/eagle-docker/resource/deploy-eagle.sh
deleted file mode 100755
index a1e5a19..0000000
--- a/eagle-external/eagle-docker/resource/deploy-eagle.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-set -o pipefail  # trace ERR through pipes
-set -o errtrace  # trace ERR through 'time command' and other functions
-
-function error() {
-SCRIPT="$0"           # script name
-LASTLINE="$1"         # line of error occurrence
-LASTERR="$2"          # error code
-echo "ERROR exit from ${SCRIPT} : line ${LASTLINE} with exit code ${LASTERR}"
-exit 1
-}
-
-trap 'error ${LINENO} ${?}' ERR
-
-echo ""
-echo "Welcome to try Eagle"
-echo ""
-
-echo "Eagle home folder path is $EAGLE_HOME"
-cd $EAGLE_HOME
-
-
-#Initializing Eagle Service ...
-sh ./bin/eagle-service-init.sh
-
-sleep 10
-
-#Starting Eagle Service ...
-sh ./bin/eagle-service.sh start
-
-sleep 10
-
-echo "Creating kafka topics for eagle ... "
-KAFKA_HOME=/usr/hdp/current/kafka-broker
-EAGLE_ZOOKEEPER_QUORUM=$EAGLE_SERVER_HOST:2181
-topic=`${KAFKA_HOME}/bin/kafka-topics.sh --list --zookeeper $EAGLE_ZOOKEEPER_QUORUM --topic sandbox_hdfs_audit_log`
-if [ -z $topic ]; then
-        $KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $EAGLE_ZOOKEEPER_QUORUM --replication-factor 1 --partitions 1 --topic sandbox_hdfs_audit_log
-fi
-
-if [ $? = 0 ]; then
-echo "==> Create kafka topic successfully for eagle"
-else
-echo "==> Failed, exiting"
-exit 1
-fi
-
-EAGLE_NIMBUS_HOST=$EAGLE_SERVER_HOST
-EAGLE_SERVICE_HOST=$EAGLE_SERVER_HOST
-EAGLE_TOPOLOGY_JAR=`ls ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar`
-
-${EAGLE_HOME}/bin/eagle-topology-init.sh
-[ $? != 0 ] && exit 1
-${EAGLE_HOME}/examples/sample-sensitivity-resource-create.sh
-[ $? != 0 ] && exit 1
-${EAGLE_HOME}/examples/sample-policy-create.sh
-[ $? != 0 ] && exit 1
-storm jar $EAGLE_TOPOLOGY_JAR org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain -D config.file=${EAGLE_HOME}/conf/sandbox-hdfsAuditLog-application.conf  -D eagleProps.eagleService.host=$EAGLE_SERVICE_HOST
-[ $? != 0 ] && exit 1
-storm jar $EAGLE_TOPOLOGY_JAR org.apache.eagle.security.hive.jobrunning.HiveJobRunningMonitoringMain -D config.file=${EAGLE_HOME}/conf/sandbox-hiveQueryLog-application.conf  -D eagleProps.eagleService.host=$EAGLE_SERVICE_HOST
-[ $? != 0 ] && exit 1
-storm jar $EAGLE_TOPOLOGY_JAR org.apache.eagle.security.userprofile.UserProfileDetectionMain -D config.file=${EAGLE_HOME}/conf/sandbox-userprofile-topology.conf  -D eagleProps.eagleService.host=$EAGLE_SERVICE_HOST
-[ $? != 0 ] && exit 1
-
-# TODO: More eagle start
-
-echo "Eagle is deployed successfully!"
-
-echo "Please visit http://<container_ip>:9099/eagle-service to play with Eagle!"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-external/eagle-docker/resource/eagle-multinode.json
----------------------------------------------------------------------
diff --git a/eagle-external/eagle-docker/resource/eagle-multinode.json b/eagle-external/eagle-docker/resource/eagle-multinode.json
deleted file mode 100644
index 6d6da67..0000000
--- a/eagle-external/eagle-docker/resource/eagle-multinode.json
+++ /dev/null
@@ -1,163 +0,0 @@
-{
-"configurations": [
-    {
-      "hdfs-site": {
-        "dfs.permissions.enabled": "false"
-      },
-      "hive-site": {
-        "javax.jdo.option.ConnectionUserName": "hive",
-        "javax.jdo.option.ConnectionPassword": "hive"
-      }
-    },
-    {
-       "hadoop-env": {
-          "properties" : {
-            "content" : "\r\n# Set Hadoop-specific environment variables here.\r\n\r\n# The only required environment variable is JAVA_HOME.  All others are\r\n# optional.  When running a distributed configuration it is best to\r\n# set JAVA_HOME in this file, so that it is correctly defined on\r\n# remote nodes.\r\n\r\n# The java implementation to use.  Required.\r\nexport JAVA_HOME={{java_home}}\r\nexport HADOOP_HOME_WARN_SUPPRESS=1\r\n\r\n# Hadoop home directory\r\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\r\n\r\n# Hadoop Configuration Directory\r\n\r\n{# this is different for HDP1 #}\r\n# Path to jsvc required by secure HDP 2.0 datanode\r\nexport JSVC_HOME={{jsvc_path}}\r\n\r\n\r\n# The maximum amount of heap to use, in MB. Default is 1000.\r\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\r\n\r\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\r\n\r\n# Extra Java runtime options.  Empty by default.\r\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=tr
 ue ${HADOOP_OPTS}\"\r\n\r\n# Command specific options appended to HADOOP_OPTS when specified\r\nexport HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSize={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT,KAFKA_HDFS_AUDIT ${HADOOP_NAMENODE_OPTS}\"\r\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d
 %H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\r\n\r\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\r\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\r\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCE
 R_OPTS}\"\r\n\r\nexport HADOOP_SECONDARYNAMENODE_OPTS=$HADOOP_NAMENODE_OPTS\r\n\r\n# The following applies to multiple commands (fs, dfs, fsck, distcp etc)\r\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\r\n\r\n# On secure datanodes, user to run the datanode as after dropping privileges\r\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\r\n\r\n# Extra ssh options.  Empty by default.\r\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\r\n\r\n# Where log files are stored.  $HADOOP_HOME/logs by default.\r\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\r\n\r\n# History server logs\r\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\r\n\r\n# Where log files are stored in the secure data environment.\r\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_DN_USER\r\n\r\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\r\n# e
 xport HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\r\n\r\n# host:path where hadoop code should be rsync'd from.  Unset by default.\r\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\r\n\r\n# Seconds to sleep between slave commands.  Unset by default.  This\r\n# can be useful in large clusters, where, e.g., slave rsyncs can\r\n# otherwise arrive faster than the master can service them.\r\n# export HADOOP_SLAVE_SLEEP=0.1\r\n\r\n# The directory where pid files are stored. /tmp by default.\r\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\r\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\r\n\r\n# History server pid\r\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\r\n\r\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\r\n\r\n# A string representing this instance of hadoop. $USER by default.\r\nexport HADOOP_IDENT_STRING=$USER\r\n\r\n# The scheduling priority for daemon processes.  See 'm
 an nice'.\r\n\r\n# export HADOOP_NICENESS=10\r\n\r\n# Use libraries from standard classpath\r\nJAVA_JDBC_LIBS=\"\"\r\n#Add libraries required by mysql connector\r\nfor jarFile in `ls /usr/share/java/*mysql* 2>/dev/null`\r\ndo\r\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\r\ndone\r\n# Add libraries required by oracle connector\r\nfor jarFile in `ls /usr/share/java/*ojdbc* 2>/dev/null`\r\ndo\r\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\r\ndone\r\n# Add libraries required by nodemanager\r\nMAPREDUCE_LIBS={{mapreduce_libs_path}}\r\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}:/usr/hdp/current/eagle/lib/log4jkafka/lib/*\r\n\r\n# added to the HADOOP_CLASSPATH\r\nif [ -d \"/usr/hdp/current/tez-client\" ]; then\r\n  if [ -d \"/etc/tez/conf/\" ]; then\r\n    # When using versioned RPMs, the tez-client will be a symlink to the current folder of tez in HDP.\r\n    export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:/usr/hdp/current/tez-client/*:/usr/hdp/current/tez
 -client/lib/*:/etc/tez/conf/\r\n  fi\r\nfi\r\n\r\n# Setting path to hdfs command line\r\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\r\n\r\n# Mostly required for hadoop 2.0\r\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\r\n\r\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"\r\n"
-	  }
-        }
-    },
-    {
-      "hdfs-log4j": {
-        "properties": {
-          "content" : "\r\n#\r\n# Licensed to the Apache Software Foundation (ASF) under one\r\n# or more contributor license agreements.  See the NOTICE file\r\n# distributed with this work for additional information\r\n# regarding copyright ownership.  The ASF licenses this file\r\n# to you under the Apache License, Version 2.0 (the\r\n# \"License\"); you may not use this file except in compliance\r\n# with the License.  You may obtain a copy of the License at\r\n#\r\n#  http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing,\r\n# software distributed under the License is distributed on an\r\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n# KIND, either express or implied.  See the License for the\r\n# specific language governing permissions and limitations\r\n# under the License.\r\n#\r\n\r\n\r\n# Define some default values that can be overridden by system properties\r\n# To change daemon root logger use hadoo
 p_root_logger in hadoop-env\r\nhadoop.root.logger=INFO,console\r\nhadoop.log.dir=.\r\nhadoop.log.file=hadoop.log\r\n\r\n\r\n# Define the root logger to the system property \"hadoop.root.logger\".\r\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\r\n\r\n# Logging Threshold\r\nlog4j.threshhold=ALL\r\n\r\n#\r\n# Daily Rolling File Appender\r\n#\r\n\r\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\r\n\r\n# Rollver at midnight\r\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\r\n\r\n# 30-day backup\r\n#log4j.appender.DRFA.MaxBackupIndex=30\r\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\r\n\r\n# Pattern format: Date LogLevel LoggerName LogMessage\r\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\n# Debugging Pattern format\r\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\r\n\r\n\r\n#\r\n# console\r\n# Add \"console\" to rootlog
 ger above if you want to use this\r\n#\r\n\r\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\r\nlog4j.appender.console.target=System.err\r\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\r\n\r\n#\r\n# TaskLog Appender\r\n#\r\n\r\n#Default values\r\nhadoop.tasklog.taskid=null\r\nhadoop.tasklog.iscleanup=false\r\nhadoop.tasklog.noKeepSplits=4\r\nhadoop.tasklog.totalLogFileSize=100\r\nhadoop.tasklog.purgeLogSplits=true\r\nhadoop.tasklog.logsRetainHours=12\r\n\r\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\r\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\r\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\r\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\r\n\r\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\n\r\n#\r\n#Security audit appender\r\
 n#\r\nhadoop.security.logger=INFO,console\r\nhadoop.security.log.maxfilesize=256MB\r\nhadoop.security.log.maxbackupindex=20\r\nlog4j.category.SecurityLogger=${hadoop.security.logger}\r\nhadoop.security.log.file=SecurityAuth.audit\r\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\r\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\r\n\r\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\r\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\r\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\r\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\r\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\r\n\r\n#\r\n# hdfs audit l
 ogging\r\n#\r\nhdfs.audit.logger=INFO,console\r\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\r\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=false\r\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\r\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\r\n\r\nlog4j.appender.KAFKA_HDFS_AUDIT=org.apache.eagle.log4j.kafka.KafkaLog4jAppender\r\nlog4j.appender.KAFKA_HDFS_AUDIT.Topic=sandbox_hdfs_audit_log\r\nlog4j.appender.KAFKA_HDFS_AUDIT.BrokerList=sandbox.eagle.incubator.apache.org:6667\r\nlog4j.appender.KAFKA_HDFS_AUDIT.KeyClass=org.apache.eagle.log4j.kafka.hadoop.AuditLogKeyer\r\nlog4j.appender.KAFKA_HDFS_AUDIT.Layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.KAFKA_HDFS_AUDIT
 .Layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.KAFKA_HDFS_AUDIT.ProducerType=async\r\nlog4j.appender.KAFKA_HDFS_AUDIT.BatchSize=1\r\nlog4j.appender.KAFKA_HDFS_AUDIT.QueueSize=1\r\n\r\n#\r\n# mapred audit logging\r\n#\r\nmapred.audit.logger=INFO,console\r\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\r\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\r\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\r\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\r\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\r\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\r\n\r\n#\r\n# Rolling File Appender\r\n#\r\n\r\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\r\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\r\n\r\n# Logfile size and and 30-day backups\r\nlog4j.appender.RFA.MaxFileSize=256MB\r\
 nlog4j.appender.RFA.MaxBackupIndex=10\r\n\r\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\r\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\r\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\r\n\r\n\r\n# Custom Logging levels\r\n\r\nhadoop.metrics.log.level=INFO\r\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\r\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\r\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\r\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\r\n\r\n# Jets3t library\r\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\r\n\r\n#\r\n# Null Appender\r\n# Trap security logger on the hadoop client side\r\n#\r\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\r\n\r\n#\r\n# Event Counter Appender\r\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\r\n#\r\nlog4j.appender.EventCounter
 =org.apache.hadoop.log.metrics.EventCounter\r\n\r\n# Removes \"deprecated\" messages\r\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\r\n\r\n#\r\n# HDFS block state change log from block manager\r\n#\r\n# Uncomment the following to suppress normal block state change\r\n# messages from BlockManager in NameNode.\r\n#log4j.logger.BlockStateChange=WARN\r\n"
-         }
-      }
-    }
-  ],
-  "host_groups": [
-    {
-      "name": "master",
-      "components": [
-        {
-          "name": "APP_TIMELINE_SERVER"
-        },
-        {
-          "name": "HISTORYSERVER"
-        },
-        {
-          "name": "HBASE_REGIONSERVER"
-        },
-        {
-          "name": "HBASE_CLIENT"
-        },
-        {
-          "name": "WEBHCAT_SERVER"
-        },
-        {
-          "name": "HCAT"
-        },
-        {
-          "name": "NAMENODE"
-        },
-        {
-          "name": "AMBARI_SERVER"
-        },
-        {
-          "name": "HDFS_CLIENT"
-        },
-        {
-          "name": "HIVE_CLIENT"
-        },
-        {
-          "name": "NODEMANAGER"
-        },
-        {
-          "name": "DATANODE"
-        },
-        {
-          "name": "RESOURCEMANAGER"
-        },
-        {
-          "name": "ZOOKEEPER_SERVER"
-        },
-        {
-          "name": "ZOOKEEPER_CLIENT"
-        },
-        {
-          "name": "HBASE_MASTER"
-        },
-        {
-          "name": "HIVE_SERVER"
-        },
-        {
-          "name": "SECONDARY_NAMENODE"
-        },
-        {
-          "name": "HIVE_METASTORE"
-        },
-        {
-          "name": "YARN_CLIENT"
-        },
-        {
-          "name": "MAPREDUCE2_CLIENT"
-        },
-        {
-          "name": "MYSQL_SERVER"
-        },
-	{ 
-	  "name": "GANGLIA_SERVER"
-	},
-	{
-	  "name" : "DRPC_SERVER"
-	},
-	{
-	  "name" : "STORM_UI_SERVER"
-	},
-	{
-          "name" : "NIMBUS"
-        },
-        {
-          "name" : "KAFKA_BROKER"
-        }
-      ],
-      "cardinality": "1"
-    },
-    {
-      "name": "slave_1",
-      "components": [
-        {
-          "name": "HBASE_CLIENT"
-        },
-        {
-          "name": "HDFS_CLIENT"
-        },
-        {
-          "name": "HIVE_CLIENT"
-        },
-        {
-          "name": "NODEMANAGER"
-        },
-        {
-          "name": "DATANODE"
-        },
-        { 
-          "name": "ZOOKEEPER_SERVER"
-        },
-        {
-          "name": "ZOOKEEPER_CLIENT"
-        },
-        {
-          "name": "YARN_CLIENT"
-        },
-        {
-          "name": "MAPREDUCE2_CLIENT"
-        },
-	{
-	  "name" : "KAFKA_BROKER"
-	},
-	{ 
-	  "name": "GANGLIA_MONITOR"
-	},
-        {
-          "name" : "SUPERVISOR"
-        }
-      ],
-      "cardinality": "1"
-    }
-  ],
-  "Blueprints": {
-    "blueprint_name": "hdp-multinode-eagle",
-    "stack_name": "HDP",
-    "stack_version": "2.2"
-}
-}


[37/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/SimpleAggregateExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/SimpleAggregateExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/SimpleAggregateExecutor.java
deleted file mode 100644
index e0dadbf..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/SimpleAggregateExecutor.java
+++ /dev/null
@@ -1,189 +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.dataproc.impl.aggregate;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.core.JsonSerDeserUtils;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateDefinitionAPIEntity;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.datastream.JavaStormStreamExecutor2;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.PolicyEvaluator;
-import org.apache.eagle.policy.PolicyManager;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.config.AbstractPolicyDefinition;
-import org.apache.eagle.policy.executor.IPolicyExecutor;
-import org.apache.eagle.policy.siddhi.SiddhiEvaluationHandler;
-import org.apache.hadoop.hbase.util.MD5Hash;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import scala.Tuple2;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Only one policy for one simple aggregate executor
- *
- * Created on 1/10/16.
- */
-public class SimpleAggregateExecutor
-        extends JavaStormStreamExecutor2<String, AggregateEntity>
-        implements SiddhiEvaluationHandler<AggregateDefinitionAPIEntity, AggregateEntity>, IPolicyExecutor<AggregateDefinitionAPIEntity, AggregateEntity> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(SimpleAggregateExecutor.class);
-
-    private final String cql;
-    private final int partitionSeq;
-    private final int totalPartitionNum;
-
-    private final String[] upStreamNames;
-    private String policyId;
-    private String executorId;
-    private Config config;
-    private AggregateDefinitionAPIEntity aggDef;
-    private PolicyEvaluator<AggregateDefinitionAPIEntity> evaluator;
-
-    public SimpleAggregateExecutor(String[] upStreams, String cql, String policyType, int partitionSeq, int totalPartitionNum) {
-        this.cql = cql;
-        this.partitionSeq = partitionSeq;
-        this.upStreamNames = upStreams;
-        this.totalPartitionNum = totalPartitionNum;
-        // create an fixed definition policy api entity, and indicate it has full definition
-        aggDef = new AggregateDefinitionAPIEntity();
-        aggDef.setTags(new HashMap<String, String>());
-        aggDef.getTags().put(Constants.POLICY_TYPE, policyType);
-        // TODO make it more general, not only hard code siddhi cep support here.
-        try {
-            Map<String,Object> template = new HashMap<>();
-            template.put("type","siddhiCEPEngine");
-            template.put("expression",this.cql);
-            template.put("containsDefinition",true);
-            aggDef.setPolicyDef(new ObjectMapper().writer().writeValueAsString(template));
-        } catch (Exception e) {
-            LOG.error("Simple aggregate generate policy definition failed!", e);
-        }
-        aggDef.setCreatedTime(new Date().getTime());
-        aggDef.setLastModifiedDate(new Date().getTime());
-        aggDef.setName("anonymous-aggregation-def");
-        aggDef.setOwner("anonymous");
-        aggDef.setEnabled(true);
-        aggDef.setDescription("anonymous aggregation definition");
-
-        String random = MD5Hash.getMD5AsHex(cql.getBytes());
-        policyId = "anonymousAggregatePolicyId-" + random;
-        executorId= "anonymousAggregateId-" +random;
-    }
-
-    @Override
-    public void prepareConfig(Config config) {
-        this.config = config;
-    }
-
-    @Override
-    public void init() {
-        evaluator = createPolicyEvaluator(aggDef);
-    }
-
-    /**
-     * Create PolicyEvaluator instance according to policyType-mapped policy evaluator class
-     *
-     * @return PolicyEvaluator instance
-     */
-    @SuppressWarnings({"unchecked", "rawtypes"})
-    protected PolicyEvaluator<AggregateDefinitionAPIEntity> createPolicyEvaluator(AggregateDefinitionAPIEntity alertDef) {
-        String policyType = alertDef.getTags().get(Constants.POLICY_TYPE);
-        Class<? extends PolicyEvaluator> evalCls = PolicyManager.getInstance().getPolicyEvaluator(policyType);
-        if (evalCls == null) {
-            String msg = "No policy evaluator defined for policy type : " + policyType;
-            LOG.error(msg);
-            throw new IllegalStateException(msg);
-        }
-
-        AbstractPolicyDefinition policyDef = null;
-        try {
-            policyDef = JsonSerDeserUtils.deserialize(alertDef.getPolicyDef(), AbstractPolicyDefinition.class,
-                    PolicyManager.getInstance().getPolicyModules(policyType));
-        } catch (Exception ex) {
-            LOG.error("Fail initial alert policy def: " + alertDef.getPolicyDef(), ex);
-        }
-
-        PolicyEvaluator<AggregateDefinitionAPIEntity> pe;
-        PolicyEvaluationContext<AggregateDefinitionAPIEntity, AggregateEntity> context = new PolicyEvaluationContext<>();
-        context.policyId = alertDef.getTags().get("policyId");
-        context.alertExecutor = this;
-        context.resultRender = new AggregateResultRender();
-        try {
-            // create evaluator instances
-            pe = (PolicyEvaluator<AggregateDefinitionAPIEntity>) evalCls
-                    .getConstructor(Config.class, PolicyEvaluationContext.class, AbstractPolicyDefinition.class, String[].class, boolean.class)
-                    .newInstance(config, context, policyDef, upStreamNames, false);
-        } catch (Exception ex) {
-            LOG.error("Fail creating new policyEvaluator", ex);
-            LOG.warn("Broken policy definition and stop running : " + alertDef.getPolicyDef());
-            throw new IllegalStateException(ex);
-        }
-        return pe;
-    }
-
-    @Override
-    public void flatMap(List<Object> input, Collector<Tuple2<String, AggregateEntity>> collector) {
-        if (input.size() != 3)
-            throw new IllegalStateException("AggregateExecutor always consumes exactly 3 fields: key, stream name and value(SortedMap)");
-        if (LOG.isDebugEnabled()) LOG.debug("Msg is coming " + input.get(2));
-        if (LOG.isDebugEnabled()) LOG.debug("Current policyEvaluators: " + evaluator);
-
-        try {
-            evaluator.evaluate(new ValuesArray(collector, input.get(1), input.get(2)));
-        } catch (Exception ex) {
-            LOG.error("Got an exception, but continue to run " + input.get(2).toString(), ex);
-        }
-    }
-
-    @Override
-    public void onEvalEvents(PolicyEvaluationContext<AggregateDefinitionAPIEntity, AggregateEntity> context, List<AggregateEntity> alerts) {
-        if (alerts != null && !alerts.isEmpty()) {
-            String policyId = context.policyId;
-            LOG.info(String.format("Detected %d alerts for policy %s", alerts.size(), policyId));
-            Collector outputCollector = context.outputCollector;
-            PolicyEvaluator<AggregateDefinitionAPIEntity> evaluator = context.evaluator;
-            for (AggregateEntity entity : alerts) {
-                synchronized (this) {
-                    outputCollector.collect(new Tuple2(policyId, entity));
-                }
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("A new alert is triggered: " + executorId + ", partition " + partitionSeq + ", Got an alert with output context: " + entity + ", for policy " + evaluator);
-                }
-            }
-        }
-    }
-
-    @Override
-    public String getExecutorId() {
-        return executorId;
-    }
-
-    @Override
-    public int getPartitionSeq() {
-        return partitionSeq;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateDefinitionAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateDefinitionAPIEntity.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateDefinitionAPIEntity.java
deleted file mode 100644
index 62830ae..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateDefinitionAPIEntity.java
+++ /dev/null
@@ -1,121 +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.dataproc.impl.aggregate.entity;
-
-import org.apache.eagle.alert.entity.AbstractPolicyDefinitionEntity;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.policy.common.Constants;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * entity of stream analyze definition
- *
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("aggregatedef")
-@ColumnFamily("f")
-@Prefix("aggregatedef")
-@Service(Constants.AGGREGATE_DEFINITION_SERVICE_ENDPOINT_NAME)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({"site", "dataSource", "executorId", "policyId", "policyType"})
-@Indexes({
-	@Index(name="Index_1_aggregateExecutorId", columns = { "executorId" }, unique = true),
-})
-@SuppressWarnings("serial")
-public class AggregateDefinitionAPIEntity extends AbstractPolicyDefinitionEntity {
-
-	@Column("a")
-	private String name;
-	@Column("b")
-	private String policyDef;
-	@Column("c")
-	private String description;
-	@Column("d")
-	private boolean enabled;
-	@Column("e")
-	private String owner;
-	@Column("f")
-	private long lastModifiedDate;
-	@Column("g")
-	private long createdTime;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getPolicyDef() {
-		return policyDef;
-	}
-
-	public void setPolicyDef(String policyDef) {
-		this.policyDef = policyDef;
-		valueChanged("policyDef");
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-		valueChanged("description");
-	}
-
-	public boolean isEnabled() {
-		return enabled;
-	}
-
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-		valueChanged("enabled");
-	}
-
-	public String getOwner() {
-		return owner;
-	}
-
-	public void setOwner(String owner) {
-		this.owner = owner;
-		valueChanged("owner");
-	}
-
-	public long getLastModifiedDate() {
-		return lastModifiedDate;
-	}
-
-	public void setLastModifiedDate(long lastModifiedDate) {
-		this.lastModifiedDate = lastModifiedDate;
-		valueChanged("lastModifiedDate");
-	}
-
-	public long getCreatedTime() {
-		return createdTime;
-	}
-
-	public void setCreatedTime(long createdTime) {
-		this.createdTime = createdTime;
-		valueChanged("createdTime");
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntity.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntity.java
deleted file mode 100644
index 64c20b2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntity.java
+++ /dev/null
@@ -1,43 +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.dataproc.impl.aggregate.entity;
-
-import java.io.Serializable;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Event entity during stream processing
- * 
- * @since Dec 17, 2015
- *
- */
-public class AggregateEntity implements Serializable {
-
-	private static final long serialVersionUID = 5911351515190098292L;
-
-    private List<Object> data = new LinkedList<>();
-
-    public void add(Object res) {
-        data.add(res);
-    }
-
-    public List<Object> getData() {
-        return data;
-    }
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntityRepository.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntityRepository.java
deleted file mode 100644
index 7c932d4..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/entity/AggregateEntityRepository.java
+++ /dev/null
@@ -1,28 +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.dataproc.impl.aggregate.entity;
-
-import org.apache.eagle.log.entity.repo.EntityRepository;
-
-/**
- * Created on 1/6/16.
- */
-public class AggregateEntityRepository extends EntityRepository {
-    public AggregateEntityRepository() {
-        entitySet.add(AggregateDefinitionAPIEntity.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/IPersistService.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/IPersistService.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/IPersistService.java
deleted file mode 100644
index 0732639..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/IPersistService.java
+++ /dev/null
@@ -1,28 +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.dataproc.impl.persist;
-
-/**
- * Interface by the stream framework to storage
- * 
- * @since Dec 19, 2015
- *
- */
-public interface IPersistService<T> {
-
-	boolean save(String stream, T apiEntity) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/PersistExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/PersistExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/PersistExecutor.java
deleted file mode 100644
index 2e1754b..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/PersistExecutor.java
+++ /dev/null
@@ -1,84 +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.dataproc.impl.persist;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.eagle.dataproc.impl.persist.druid.KafkaPersistService;
-import org.apache.eagle.datastream.Collector;
-import org.apache.eagle.datastream.JavaStormStreamExecutor2;
-import org.apache.eagle.datastream.core.StorageType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import scala.Tuple2;
-
-import java.text.MessageFormat;
-import java.util.List;
-
-/**
- *
- * TODO: currently only accept to be used after aggregation node (See the AggregateEntity reference here).
- * @since Dec 19, 2015
- *
- */
-public class PersistExecutor extends JavaStormStreamExecutor2<String, AggregateEntity> {
-	
-	private static final Logger LOG = LoggerFactory.getLogger(PersistExecutor.class);
-
-	private Config config;
-	private IPersistService<AggregateEntity> persistService;
-	private String persistExecutorId;
-	private String persistType;
-
-	public PersistExecutor(String persistExecutorId, String persistType) {
-		this.persistExecutorId = persistExecutorId;
-		this.persistType = persistType;
-	}
-
-    @Override
-	public void prepareConfig(Config config) {
-		this.config = config;
-	}
-
-    @Override
-	public void init() {
-		if (persistType.equalsIgnoreCase(StorageType.KAFKA().toString())) {
-			Config subConfig = this.config.getConfig("persistExecutorConfigs" + "." + persistExecutorId);
-			persistService = new KafkaPersistService(subConfig);
-		} else {
-			throw new RuntimeException(String.format("Persist type '%s' not supported yet!", persistService));
-		}
-	}
-
-	@Override
-	public void flatMap(List<Object> input, Collector<Tuple2<String, AggregateEntity>> collector) {
-		if (input.size() != 2) {
-			LOG.error(String.format("Persist executor expect two elements per tuple. But actually got size %d lists!",
-					input.size()));
-			return;
-		}
-
-		String policyId = (String) input.get(0);
-		AggregateEntity entity = (AggregateEntity) input.get(1);
-		try {
-			persistService.save("defaultOutput", entity);
-		} catch (Exception e) {
-			LOG.error(MessageFormat.format("persist entity failed: {0}", entity), e);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/AggregateEntitySerializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/AggregateEntitySerializer.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/AggregateEntitySerializer.java
deleted file mode 100644
index ea61278..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/AggregateEntitySerializer.java
+++ /dev/null
@@ -1,66 +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.dataproc.impl.persist.druid;
-
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.kafka.common.serialization.Serializer;
-import org.apache.kafka.common.serialization.StringSerializer;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * TODO: configurable null handling for serialization??
- * Created on 1/4/16.
- */
-public class AggregateEntitySerializer implements
-        Closeable, AutoCloseable, Serializer<AggregateEntity> {
-
-    private final StringSerializer stringSerializer = new StringSerializer();
-    private static final Logger logger = LoggerFactory.getLogger(AggregateEntitySerializer.class);
-    private static final ObjectMapper om = new ObjectMapper();
-
-    static {
-        om.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, true);
-    }
-
-    @Override
-    public void configure(Map<String, ?> configs, boolean isKey) {
-
-    }
-
-    @Override
-    public byte[] serialize(String topic, AggregateEntity data) {
-        String str = null;
-        try {
-            str = om.writeValueAsString(data.getData());
-        } catch (IOException e) {
-            logger.error("Kafka serialization for send error!", e);
-        }
-        return stringSerializer.serialize(topic, str);
-    }
-
-    @Override
-    public void close() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/KafkaPersistService.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/KafkaPersistService.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/KafkaPersistService.java
deleted file mode 100644
index 919b92e..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/persist/druid/KafkaPersistService.java
+++ /dev/null
@@ -1,122 +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.dataproc.impl.persist.druid;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigValue;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.eagle.dataproc.impl.persist.IPersistService;
-import org.apache.kafka.clients.producer.KafkaProducer;
-import org.apache.kafka.clients.producer.ProducerRecord;
-import org.apache.kafka.clients.producer.RecordMetadata;
-import org.apache.kafka.common.serialization.StringSerializer;
-
-import java.util.*;
-import java.util.concurrent.Future;
-
-/**
- * TODO : support more general entity input
- * @since Dec 21, 2015
- *
- */
-public class KafkaPersistService implements IPersistService<AggregateEntity> {
-
-	private static final String ACKS = "acks";
-	private static final String RETRIES = "retries";
-	private static final String BATCH_SIZE = "batchSize";
-	private static final String LINGER_MS = "lingerMs";
-	private static final String BUFFER_MEMORY = "bufferMemory";
-	private static final String KEY_SERIALIZER = "keySerializer";
-	private static final String VALUE_SERIALIZER = "valueSerializer";
-	private static final String BOOTSTRAP_SERVERS = "bootstrap_servers";
-	
-	private KafkaProducer<String, AggregateEntity> producer;
-	private final Config config;
-	private final SortedMap<String, String> streamTopicMap;
-	private final Properties props;
-	
-	/**
-	 * <pre>
-	 * props.put("bootstrap.servers", "localhost:4242");
-	 * props.put("acks", "all");
-	 * props.put("retries", 0);
-	 * props.put("batch.size", 16384);
-	 * props.put("linger.ms", 1);
-	 * props.put("buffer.memory", 33554432);
-	 * props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-	 * props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-	 * </pre>
-	 */
-	public KafkaPersistService(Config config) {
-		this.config = config;
-		Config kafkaConfig = config.getConfig("kafka");
-		if (kafkaConfig == null) {
-			throw new IllegalStateException("Druid persiste service failed to find kafka configurations!");
-		}
-		props = new Properties();
-		if (kafkaConfig.hasPath(BOOTSTRAP_SERVERS)) {
-			props.put("bootstrap.servers", kafkaConfig.getString(BOOTSTRAP_SERVERS));
-		}
-		if (kafkaConfig.hasPath(ACKS)) {
-			props.put(ACKS, kafkaConfig.getString(ACKS));
-		}
-		if (kafkaConfig.hasPath(RETRIES)) {
-			props.put(RETRIES, kafkaConfig.getInt(RETRIES));
-		}
-		if (kafkaConfig.hasPath(BATCH_SIZE)) {
-			props.put("batch.size", kafkaConfig.getInt(BATCH_SIZE));
-		}
-		if (kafkaConfig.hasPath(LINGER_MS)) {
-			props.put("linger.ms", kafkaConfig.getInt(LINGER_MS));
-		}
-		if (kafkaConfig.hasPath(BUFFER_MEMORY)) {
-			props.put("buffer.memory", kafkaConfig.getLong(BUFFER_MEMORY));
-		}
-		if (kafkaConfig.hasPath(KEY_SERIALIZER)) {
-			props.put("key.serializer", kafkaConfig.getString(KEY_SERIALIZER));
-		} else {
-			props.put("key.serializer", StringSerializer.class.getCanonicalName());
-		}
-//		if (kafkaConfig.hasPath(VALUE_SERIALIZER)) {
-//			props.put("value.serializer", kafkaConfig.getString(VALUE_SERIALIZER));
-//		}
-		props.put("value.serializer", AggregateEntitySerializer.class.getCanonicalName());
-
-		streamTopicMap = new TreeMap<>();
-		if (kafkaConfig.hasPath("topics")) {
-			Config topicConfig = kafkaConfig.getConfig("topics");
-			Set<Map.Entry<String, ConfigValue>> topics = topicConfig.entrySet();
-			for (Map.Entry<String, ConfigValue> t : topics) {
-				streamTopicMap.put(t.getKey(), (String) t.getValue().unwrapped());
-			}
-		}
-
-		producer = new KafkaProducer<>(props);
-	}
-
-	@Override
-	public boolean save(String stream, AggregateEntity apiEntity) throws Exception {
-		if (streamTopicMap.get(stream) != null) {
-			ProducerRecord<String, AggregateEntity> record = new ProducerRecord<>(streamTopicMap.get(stream), apiEntity);
-			Future<RecordMetadata> future = producer.send(record);
-			// TODO : more for check the sending status
-			return true;
-		}
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/StormSpoutProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/StormSpoutProvider.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/StormSpoutProvider.java
deleted file mode 100644
index ab90ad7..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/StormSpoutProvider.java
+++ /dev/null
@@ -1,29 +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.dataproc.impl.storm;
-
-import backtype.storm.topology.base.BaseRichSpout;
-
-import com.typesafe.config.Config;
-
-/**
- * Normally storm spout is a special part of storm topology and it is implemented in underlying spout implementation
- * which can be retrieved from getSpout method.
- */
-public interface StormSpoutProvider {
-	public BaseRichSpout getSpout(Config context);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/DataCollectionHDFSSpout.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/DataCollectionHDFSSpout.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/DataCollectionHDFSSpout.java
deleted file mode 100644
index 2b00b92..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/DataCollectionHDFSSpout.java
+++ /dev/null
@@ -1,230 +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.dataproc.impl.storm.hdfs;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.*;
-import java.util.zip.GZIPInputStream;
-
-import com.typesafe.config.Config;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.tuple.Fields;
-import backtype.storm.utils.Utils;
-
-import org.apache.eagle.dataproc.impl.storm.hdfs.HDFSSourcedStormSpoutProvider.HDFSSpout;
-
-public class DataCollectionHDFSSpout extends HDFSSpout{
-
-	private static final long serialVersionUID = 8775646842131298552L;
-	private Config configContext;
-	private TopologyContext _context; 
-	SpoutOutputCollector _collector;
-	private Map<String, Boolean> processFileMap = null; 
-	private static final Logger LOG = LoggerFactory.getLogger(DataCollectionHDFSSpout.class);
-	
-	public DataCollectionHDFSSpout(Config configContext){
-		this.configContext = configContext;
-		processFileMap = new HashMap<String, Boolean>();
-		LOG.info("DataCollectionHDFSSpout called");
-		
-	}
-	
-	public void copyFiles(){
-		LOG.info("Inside listFiles()");
-		Configuration conf = new Configuration(); 
-		// _____________ TO TEST THAT CORRECT HADOOP JARs ARE INCLUDED __________________
-		ClassLoader cl = ClassLoader.getSystemClassLoader();
-        URL[] urls = ((URLClassLoader)cl).getURLs();
-		if(LOG.isDebugEnabled()) {
-			for (URL url : urls) {
-				LOG.debug(url.getFile());
-			}
-		}
-		// _________________________________________
-        String hdfsConnectionStr = configContext.getString("dataSourceConfig.hdfsConnnection");
-        LOG.info("HDFS connection string: " + hdfsConnectionStr);
-       
-		String hdfsPath = configContext.getString("dataSourceConfig.hdfsPath");
-		LOG.info("HDFS path: " + hdfsPath);
-		 
-		String copyToPath = configContext.getString("dataSourceConfig.copyToPath");
-		LOG.info("copyToPath: " + copyToPath);
-		String srcPathStr = new String("hdfs://" + hdfsConnectionStr + hdfsPath);
-		Path srcPath = new Path(srcPathStr); 
-		LOG.info("listFiles called");
-		LOG.info("srcPath: " + srcPath);
-		try {
-			FileSystem fs = srcPath.getFileSystem(conf);
-			/*CompressionCodecFactory codecFactory = new CompressionCodecFactory(conf); 
-			CompressionCodec codec = codecFactory.getCodec(srcPath);
-			DataInputStream inputStream = new DataInputStream(codec.createInputStream(fs.open(srcPath)));
-			*/
-			
-			Path destPath = new Path(copyToPath);
-			LOG.info("Destination path: " + destPath);
-			fs.copyToLocalFile(srcPath, destPath);
-			LOG.info("Copy to local succeed");
-			fs.close();
-							
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-	}
-	
-	private List<String> getAllFiles(String root, int level){
-		
-		List<String> lists = new ArrayList<String>();
-		File rootFile = new File(root);
-		File[] tempList = rootFile.listFiles();
-		if(tempList == null)
-			return lists; 
-		
-		for(File temp:tempList){
-			if(temp.isDirectory())
-				lists.addAll(getAllFiles(temp.getAbsolutePath(), ++level));
-			else{
-				if(temp.getName().endsWith(".gz") || temp.getName().endsWith(".csv"))
-					lists.add(temp.getAbsolutePath());
-			}
-		}
-		return lists;
-			
-	}
-	
-	public List<String> listFiles(){
-		
-		String copyToPath = configContext.getString("dataSourceConfig.copyToPath");
-		LOG.info("Reading from: " + copyToPath);
-		List<String> files = new ArrayList<String>();
-		files = getAllFiles(copyToPath, 0); 
-		return files;
-	}
-	
-	@Override
-	public void nextTuple() {
-		LOG.info("Releasing nextTuple");
-		List<String> files = listFiles();
-		LOG.info("Files returned: " + files.size());
-		String typeOfFile = configContext.getString("dataSourceConfig.fileFormat");
-		LOG.info("typeOfFile returned: " + typeOfFile);
-		
-		for(String fileName:files){
-			LOG.info("fileName: " + fileName);
-			LOG.info("processFileMap.get(fileName): " + processFileMap.get(fileName));
-			if(processFileMap.get(fileName) == null || processFileMap.get(fileName) == false){
-				processFileMap.put(fileName, true);
-				BufferedReader br = null; 
-				Reader decoder = null;
-				GZIPInputStream in = null; 
-				InputStream inStream = null;
-				
-				try{
-					if(typeOfFile.equalsIgnoreCase("GZIP")){
-						in = new GZIPInputStream(new FileInputStream(new File(fileName)));
-						decoder = new InputStreamReader(in);
-					}else if(typeOfFile.equalsIgnoreCase("CSV")){
-						inStream = new FileInputStream(new File(fileName)); 
-						decoder = new InputStreamReader(inStream);
-					}else{
-						LOG.error("No known file type specified");
-						continue;
-					}
-					
-					br = new BufferedReader(decoder);
-					int lineNo = 0; 
-					String line = "";
-					while((line = br.readLine())!= null){
-						++lineNo;
-			        	//String line = br.readLine();
-			        	//loggerHDFSSpout.info("line number " + lineNo + "is: " + line);
-			        	//if(line == null || line.equalsIgnoreCase(""))
-			        	//	break;
-			        	LOG.info("Emitting line from file: " + fileName);
-			        	//_collector.emit(new ValuesArray(line), lineNo);
-                        _collector.emit(Arrays.asList((Object)line));
-			        	LOG.info("Emitted line no: " + lineNo + " and line: " + line);
-						Utils.sleep(100);
-					}
-				}
-				catch (Exception e) {
-					// TODO: handle exception
-					e.printStackTrace();
-				}finally{
-					try {
-						if(br != null)
-							br.close();
-						if(decoder != null)
-							decoder.close();
-						if(in != null)
-							in.close();
-						if(inStream != null)
-							inStream.close();
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-				}
-			}else{
-				LOG.info("Processed the files before, already done! ");
-				//Utils.sleep(10000);
-			}
-			
-		}
-		
-	}
-	
-	public void fail(Object msgId) {
-	    int transactionId = (Integer) msgId;
-	    LOG.info(transactionId + " failed");
-	}
-	
-	public void ack(Object msgId) {
-	    int transactionId = (Integer) msgId;
-	    LOG.info(transactionId + " acknowledged");
-	}
-
-	@Override
-	public void open(Map arg0, TopologyContext context,
-			SpoutOutputCollector collector) {
-		 _collector = collector;
-		 _context = context;
-	}
-
-	@Override
-	public void declareOutputFields(OutputFieldsDeclarer declarer) {
-		// TODO Auto-generated method stub
-		declarer.declare(new Fields("line"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/HDFSSourcedStormSpoutProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/HDFSSourcedStormSpoutProvider.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/HDFSSourcedStormSpoutProvider.java
deleted file mode 100644
index 2323f39..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/HDFSSourcedStormSpoutProvider.java
+++ /dev/null
@@ -1,61 +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.dataproc.impl.storm.hdfs;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import backtype.storm.topology.base.BaseRichSpout;
-
-public class HDFSSourcedStormSpoutProvider implements StormSpoutProvider {
-	private static final Logger LOG = LoggerFactory.getLogger(HDFSSourcedStormSpoutProvider.class);
-	
-	public abstract static class HDFSSpout extends BaseRichSpout{
-		public abstract void copyFiles(); 
-		public void fail(Object msgId) {
-		    int transactionId = (Integer) msgId;
-		    LOG.info(transactionId + " failed");
-		}
-		
-		public void ack(Object msgId) {
-		    int transactionId = (Integer) msgId;
-		    LOG.info(transactionId + " acknowledged");
-		}
-		
-		public static HDFSSpout getHDFSSpout(String conf, Config configContext){
-			if(conf.equalsIgnoreCase("data collection")){
-				return new DataCollectionHDFSSpout(configContext); 
-			}
-			if(conf.equalsIgnoreCase("user profile generation")){
-				return new UserProfileGenerationHDFSSpout(configContext); 
-			}
-			return null;
-		}
-	}
-	
-	@Override
-	public BaseRichSpout getSpout(Config context){
-		LOG.info("GetHDFSSpout called");
-		String typeOperation = context.getString("dataSourceConfig.typeOperation");
-		HDFSSpout spout = HDFSSpout.getHDFSSpout(typeOperation, context);
-		spout.copyFiles();
-		return spout;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/UserProfileGenerationHDFSSpout.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/UserProfileGenerationHDFSSpout.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/UserProfileGenerationHDFSSpout.java
deleted file mode 100644
index e07ee81..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/hdfs/UserProfileGenerationHDFSSpout.java
+++ /dev/null
@@ -1,299 +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.dataproc.impl.storm.hdfs;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.Serializable;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.core.StreamingProcessConstants;
-import org.apache.eagle.dataproc.core.ValuesArray;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.mapred.JobConf;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.tuple.Fields;
-import backtype.storm.utils.Utils;
-
-import com.esotericsoftware.minlog.Log;
-
-public class UserProfileGenerationHDFSSpout extends HDFSSourcedStormSpoutProvider.HDFSSpout {
-
-	private static final long serialVersionUID = 2274234104008894386L;
-	private Config configContext;
-	private TopologyContext _context; 
-	SpoutOutputCollector _collector;
-	
-	public class UserProfileData implements Serializable{
-		private static final long serialVersionUID = -3315860110144736840L;
-		private String user; 
-		private List<String> dateTime = new ArrayList<String>(); 
-		private List<Integer> hrInDay = new ArrayList<Integer>(); 
-		private List<String> line = new ArrayList<String>();
-		
-		public String getUser() {
-			return user;
-		}
-		public void setUser(String user) {
-			this.user = user;
-		}
-		public String getDateTime(int index) {
-			return dateTime.get(index);
-		}
-		public List<String> getDateTimes() {
-			return dateTime;
-		}
-		public void setDateTime(String dateTime) {
-			this.dateTime.add(dateTime);
-		}
-		public int getHrInDay(int index) {
-			return hrInDay.get(index);
-		}
-		public List<Integer> getHrsInDay() {
-			return hrInDay;
-		}
-		public void setHrInDay(int hrInDay) {
-			this.hrInDay.add(hrInDay);
-		}
-		public String getLine(int index) {
-			return line.get(index);
-		}
-		public List<String> getLines() {
-			return line;
-		}
-		public void setLine(String line) {
-			this.line.add(line);
-		} 
-		
-	}
-	
-	private static final Logger LOG = LoggerFactory.getLogger(UserProfileGenerationHDFSSpout.class);
-	
-	public UserProfileGenerationHDFSSpout(Config configContext){
-		this.configContext = configContext;
-		LOG.info("UserProfileGenerationHDFSSpout called");
-	}
-	
-	public void copyFiles(){
-		LOG.info("Inside listFiles()");
-		//Configuration conf = new Configuration();
-		JobConf conf = new JobConf();
-		// _____________ TO TEST THAT CORRECT HADOOP JARs ARE INCLUDED __________________
-		ClassLoader cl = ClassLoader.getSystemClassLoader();
-        URL[] urls = ((URLClassLoader)cl).getURLs();
-        if(LOG.isDebugEnabled()) {
-			for (URL url : urls) {
-				LOG.debug(url.getFile());
-			}
-		}
-		// _________________________________________
-        String hdfsConnectionStr = configContext.getString("dataSourceConfig.hdfsConnection");
-        LOG.info("HDFS connection string: " + hdfsConnectionStr);
-       
-		String hdfsPath = configContext.getString("dataSourceConfig.hdfsPath");
-		LOG.info("HDFS path: " + hdfsPath);
-		 
-		String copyToPath = configContext.getString("dataSourceConfig.copyToPath");
-		LOG.info("copyToPath: " + copyToPath);
-		String srcPathStr = new String("hdfs://" + hdfsConnectionStr + hdfsPath);
-		Path srcPath = new Path(srcPathStr); 
-		LOG.info("listFiles called");
-		LOG.info("srcPath: " + srcPath);
-		try {
-			FileSystem fs = srcPath.getFileSystem(conf);
-			/*CompressionCodecFactory codecFactory = new CompressionCodecFactory(conf); 
-			CompressionCodec codec = codecFactory.getCodec(srcPath);
-			DataInputStream inputStream = new DataInputStream(codec.createInputStream(fs.open(srcPath)));
-			*/
-			
-			Path destPath = new Path(copyToPath);
-			LOG.info("Destination path: " + destPath);
-			String userListFileName = configContext.getString("dataSourceConfig.userList");
-			//loggerHDFSSpout.info("userListFileName: " + userListFileName);
-			List<String> userList = getUser(userListFileName);
-			for(String user:userList){
-				Path finalSrcPath = new Path(srcPath.getName() + "/" + user);
-				fs.copyToLocalFile(finalSrcPath, destPath);
-			}
-			LOG.info("Copy to local succeed");
-			fs.close();
-							
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-	}
-	
-	private List<String> getAllFiles(String root, int level){
-		
-		List<String> lists = new ArrayList<String>();
-		File rootFile = new File(root);
-		File[] tempList = rootFile.listFiles();
-		if(tempList == null)
-			return lists; 
-		
-		for(File temp:tempList){
-			if(temp.isDirectory())
-				lists.addAll(getAllFiles(temp.getAbsolutePath(), ++level));
-			else{
-				if(temp.getName().endsWith(".csv"))
-					lists.add(temp.getAbsolutePath());
-			}
-		}
-		return lists;
-			
-	}
-	
-	public List<String> listFiles(String path){
-		
-		LOG.info("Reading from: " + path);
-		List<String> files = new ArrayList<String>();
-		files = getAllFiles(path, 0); 
-		return files;
-	}
-	
-	private List<String> getUser(String listFileName){
-		List<String> userList = new ArrayList<String>();
-		BufferedReader reader = null; 
-		try{
-			InputStream is = getClass().getResourceAsStream(listFileName);
-			reader = new BufferedReader(new InputStreamReader(is));
-			String line = ""; 
-			while((line = reader.readLine()) != null){
-				userList.add(line);
-				LOG.info("User added:" + line);
-			}
-		}catch(Exception e){
-			e.printStackTrace();
-		}finally{
-			try {
-				if(reader != null)
-					reader.close();
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-		return userList;
-	}
-	
-	@Override
-	public void nextTuple() {
-		LOG.info("Releasing nextTuple");
-		
-		String userListFileName = configContext.getString("dataSourceConfig.userList");
-
-		//loggerHDFSSpout.info("userListFileName: " + userListFileName);
-		List<String> userList = getUser(userListFileName);
-		//loggerHDFSSpout.info("user list size:" + userList.size());
-		for(String user: userList){
-			LOG.info("Processing user: " + user);
-			String copyToPath = configContext.getString("dataSourceConfig.copyToPath");
-			//loggerHDFSSpout.info("copyToPath: " + copyToPath);
-			
-			copyToPath +="/" + user; 
-			List<String> files = listFiles(copyToPath);
-			LOG.info("Files returned: " + files.size());
-			String typeOfFile = configContext.getString("dataSourceConfig.fileFormat");
-			//loggerHDFSSpout.info("typeOfFile returned: " + typeOfFile);
-			UserProfileData usersProfileDataset = new UserProfileData();
-				
-			for(String fileName:files){
-				LOG.info("FileName: " + fileName);
-				usersProfileDataset.setDateTime(fileName.substring(fileName.lastIndexOf("/")+1, fileName.lastIndexOf(".")));
-				BufferedReader br = null; 
-				Reader decoder = null;
-				InputStream inStream = null;
-				
-				try{
-					inStream = new FileInputStream(new File(fileName));
-					decoder = new InputStreamReader(inStream);
-					br = new BufferedReader(decoder);
-					int lineNo = 0; 
-					String line = "";
-					while((line = br.readLine())!= null){
-						boolean containsFileHeader = configContext.getBoolean("dataSourceConfig.containsFileHeader");
-						//loggerHDFSSpout.info("containsFileHeader returned: " + containsFileHeader);
-						if(containsFileHeader == true && lineNo == 0){
-							// ignore the header column
-							lineNo++;
-							continue;
-						}
-			        	//loggerHDFSSpout.info("emitting line from file: " + fileName);
-			        	
-						usersProfileDataset.setLine(line);
-						usersProfileDataset.setHrInDay(lineNo);
-			        	lineNo++;
-					}
-				}
-				catch (Exception e) {
-					Log.error("File operation failed");
-					throw new IllegalStateException();
-				}finally{
-					try {
-						if(br != null)
-							br.close();
-						if(decoder != null)
-							decoder.close();
-						if(inStream != null)
-							inStream.close();
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-				}
-			}
-			usersProfileDataset.setUser(user);
-			_collector.emit(new ValuesArray(user, "HDFSSourcedStormExecutor", usersProfileDataset));
-        	LOG.info("Emitting data of length: " + usersProfileDataset.getLines().size());
-			Utils.sleep(1000);
-		}
-		this.close();
-	}
-	
-	@Override
-	public void open(Map arg0, TopologyContext context,
-			SpoutOutputCollector collector) {
-		 _collector = collector;
-		 _context = context;
-	}
-
-	@Override
-	public void declareOutputFields(OutputFieldsDeclarer declarer) {
-		// TODO Auto-generated method stub
-		declarer.declare(new Fields(StreamingProcessConstants.EVENT_PARTITION_KEY, StreamingProcessConstants.EVENT_STREAM_NAME, StreamingProcessConstants.EVENT_ATTRIBUTE_MAP));
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/JsonSerializer.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/JsonSerializer.java
deleted file mode 100644
index 416aaa3..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/JsonSerializer.java
+++ /dev/null
@@ -1,58 +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.dataproc.impl.storm.kafka;
-
-import org.apache.kafka.common.serialization.Serializer;
-import org.apache.kafka.common.serialization.StringSerializer;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Map;
-
-public class JsonSerializer implements Serializer<Object> {
-    private final StringSerializer stringSerializer = new StringSerializer();
-    private static final Logger logger = LoggerFactory.getLogger(JsonSerializer.class);
-    private static final ObjectMapper om = new ObjectMapper();
-
-    static {
-        om.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, true);
-    }
-
-    @Override
-    public void configure(Map<String, ?> configs, boolean isKey) {
-        stringSerializer.configure(configs,isKey);
-    }
-
-    @Override
-    public byte[] serialize(String topic, Object data) {
-        String str = null;
-        try {
-            str = om.writeValueAsString(data);
-        } catch (IOException e) {
-            logger.error("Kafka serialization for send error!", e);
-        }
-        return stringSerializer.serialize(topic, str);
-    }
-
-    @Override
-    public void close() {
-        stringSerializer.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutProvider.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutProvider.java
deleted file mode 100644
index 0107a9b..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutProvider.java
+++ /dev/null
@@ -1,104 +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.dataproc.impl.storm.kafka;
-
-import java.util.Arrays;
-
-import com.typesafe.config.Config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import storm.kafka.BrokerHosts;
-import storm.kafka.KafkaSpout;
-import storm.kafka.SpoutConfig;
-import storm.kafka.ZkHosts;
-import backtype.storm.spout.SchemeAsMultiScheme;
-import backtype.storm.topology.base.BaseRichSpout;
-
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-
-public class KafkaSourcedSpoutProvider implements StormSpoutProvider {
-    private final static Logger LOG = LoggerFactory.getLogger(KafkaSourcedSpoutProvider.class);
-
-	public SchemeAsMultiScheme getStreamScheme(String deserClsName, Config context) {
-		return new SchemeAsMultiScheme(new KafkaSourcedSpoutScheme(deserClsName, context));
-	}
-
-    private String configPrefix = "dataSourceConfig";
-
-    public KafkaSourcedSpoutProvider(){}
-
-    public KafkaSourcedSpoutProvider(String prefix){
-        this.configPrefix = prefix;
-    }
-
-	@Override
-	public BaseRichSpout getSpout(Config config){
-        Config context = config;
-        if(this.configPrefix!=null) context = config.getConfig(configPrefix);
-		// Kafka topic
-		String topic = context.getString("topic");
-		// Kafka consumer group id
-		String groupId = context.getString("consumerGroupId");
-		// Kafka fetch size
-		int fetchSize = context.getInt("fetchSize");
-		// Kafka deserializer class
-		String deserClsName = context.getString("deserializerClass");
-		// Kafka broker zk connection
-		String zkConnString = context.getString("zkConnection");
-		// transaction zkRoot
-		String zkRoot = context.getString("transactionZKRoot");
-
-        LOG.info(String.format("Use topic id: %s",topic));
-
-        String brokerZkPath = null;
-        if(context.hasPath("brokerZkPath")) {
-            brokerZkPath = context.getString("brokerZkPath");
-        }
-
-        BrokerHosts hosts;
-        if(brokerZkPath == null) {
-            hosts = new ZkHosts(zkConnString);
-        } else {
-            hosts = new ZkHosts(zkConnString, brokerZkPath);
-        }
-        
-		SpoutConfig spoutConfig = new SpoutConfig(hosts, 
-				topic,
-				zkRoot + "/" + topic,
-				groupId);
-		
-		// transaction zkServers
-		spoutConfig.zkServers = Arrays.asList(context.getString("transactionZKServers").split(","));
-		// transaction zkPort
-		spoutConfig.zkPort = context.getInt("transactionZKPort");
-		// transaction update interval
-		spoutConfig.stateUpdateIntervalMs = context.getLong("transactionStateUpdateMS");
-		// Kafka fetch size
-		spoutConfig.fetchSizeBytes = fetchSize;		
-		// "startOffsetTime" is for test usage, prod should not use this
-		if (context.hasPath("startOffsetTime")) {
-			spoutConfig.startOffsetTime = context.getInt("startOffsetTime");
-		}		
-		// "forceFromStart" is for test usage, prod should not use this 
-		if (context.hasPath("forceFromStart")) {
-			spoutConfig.forceFromStart = context.getBoolean("forceFromStart");
-		}
-		
-		spoutConfig.scheme = getStreamScheme(deserClsName, context);
-        return new KafkaSpout(spoutConfig);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutScheme.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutScheme.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutScheme.java
deleted file mode 100644
index 15401fd..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/KafkaSourcedSpoutScheme.java
+++ /dev/null
@@ -1,71 +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.dataproc.impl.storm.kafka;
-
-import backtype.storm.spout.Scheme;
-import backtype.storm.tuple.Fields;
-import com.typesafe.config.Config;
-import org.apache.eagle.datastream.utils.NameConstants;
-
-import java.lang.reflect.Constructor;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * This scheme defines how a kafka message is deserialized and the output field name for storm stream
- * it includes the following:
- * 1. data source is kafka, so need kafka message deserializer class
- * 2. output field declaration
- */
-public class KafkaSourcedSpoutScheme implements Scheme {
-	protected SpoutKafkaMessageDeserializer deserializer;
-	
-	public KafkaSourcedSpoutScheme(String deserClsName, Config context){
-		try{
-			Properties prop = new Properties();
-            if(context.hasPath("eagleProps")) {
-                prop.putAll(context.getObject("eagleProps"));
-            }
-			Constructor<?> constructor =  Class.forName(deserClsName).getConstructor(Properties.class);
-			deserializer = (SpoutKafkaMessageDeserializer) constructor.newInstance(prop);
-		}catch(Exception ex){
-			throw new RuntimeException("Failed to create new instance for decoder class " + deserClsName, ex);
-		}
-	}
-	
-	@Override
-	public List<Object> deserialize(byte[] ser) {
-		Object tmp = deserializer.deserialize(ser);
-		if(tmp == null)
-			return null;
-		// the following tasks are executed within the same process of kafka spout
-		return Arrays.asList(tmp);
-	}
-
-    /**
-     * Default only f0, but it requires to be overrode if different
-     *
-     * TODO: Handle the schema with KeyValue based structure
-     *
-     * @return Fields
-     */
-	@Override
-	public Fields getOutputFields() {
-        return new Fields(NameConstants.FIELD_PREFIX()+"0");
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/SpoutKafkaMessageDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/SpoutKafkaMessageDeserializer.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/SpoutKafkaMessageDeserializer.java
deleted file mode 100644
index 76ca458..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/kafka/SpoutKafkaMessageDeserializer.java
+++ /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.
- */
-package org.apache.eagle.dataproc.impl.storm.kafka;
-
-import java.io.Serializable;
-
-public interface SpoutKafkaMessageDeserializer extends Serializable{
-	public Object deserialize(byte[] arg0);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/partition/CustomPartitionGrouping.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/partition/CustomPartitionGrouping.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/partition/CustomPartitionGrouping.java
deleted file mode 100644
index 9c1ab68..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/partition/CustomPartitionGrouping.java
+++ /dev/null
@@ -1,51 +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.dataproc.impl.storm.partition;
-
-import backtype.storm.generated.GlobalStreamId;
-import backtype.storm.grouping.CustomStreamGrouping;
-import backtype.storm.task.WorkerTopologyContext;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class CustomPartitionGrouping implements CustomStreamGrouping {
-
-    public List<Integer> targetTasks;
-    public PartitionStrategy strategy;
-
-    public CustomPartitionGrouping(PartitionStrategy strategy) {
-        this.strategy = strategy;
-    }
-
-    @Override
-    public void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<Integer> targetTasks) {
-        this.targetTasks = new ArrayList<>(targetTasks);
-    }
-
-    @Override
-    public List<Integer> chooseTasks(int taskId, List<Object> values) {
-        int numTasks = targetTasks.size();
-        int targetTaskIndex = strategy.balance((String)values.get(0), numTasks);
-        return Arrays.asList(targetTasks.get(targetTaskIndex));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/zookeeper/ZKStateConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/zookeeper/ZKStateConfig.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/zookeeper/ZKStateConfig.java
deleted file mode 100644
index f9515f5..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/storm/zookeeper/ZKStateConfig.java
+++ /dev/null
@@ -1,28 +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.dataproc.impl.storm.zookeeper;
-
-import java.io.Serializable;
-
-public class ZKStateConfig implements Serializable {
-    private static final long serialVersionUID = 1L;
-    public String zkQuorum;
-    public String zkRoot;
-    public int zkSessionTimeoutMs;
-    public int zkRetryTimes;
-    public int zkRetryInterval;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaMapperStormExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaMapperStormExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaMapperStormExecutor.java
deleted file mode 100644
index 993a4a2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaMapperStormExecutor.java
+++ /dev/null
@@ -1,83 +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.datastream;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import backtype.storm.task.OutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichBolt;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Tuple;
-import org.apache.eagle.datastream.utils.NameConstants;
-
-public class JavaMapperStormExecutor extends BaseRichBolt{
-    public static class e1 extends JavaMapperStormExecutor {
-        public e1(JavaMapper mapper){
-            super(1, mapper);
-        }
-    }
-    public static class e2 extends JavaMapperStormExecutor {
-        public e2(JavaMapper mapper){
-            super(2, mapper);
-        }
-    }
-    public static class e3 extends JavaMapperStormExecutor {
-        public e3(JavaMapper mapper){
-            super(3, mapper);
-        }
-    }
-    public static class e4 extends JavaMapperStormExecutor {
-        public e4(JavaMapper mapper){
-            super(4, mapper);
-        }
-    }
-
-    private JavaMapper mapper;
-    private OutputCollector collector;
-    private int numOutputFields;
-    public JavaMapperStormExecutor(int numOutputFields, JavaMapper mapper){
-        this.numOutputFields = numOutputFields;
-        this.mapper = mapper;
-    }
-
-    @Override
-    public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
-        this.collector = collector;
-    }
-
-    @Override
-    public void execute(Tuple input) {
-        List<Object> ret = mapper.map(input.getValues());
-        this.collector.emit(ret);
-    }
-
-    @Override
-    public void declareOutputFields(OutputFieldsDeclarer declarer) {
-        List<String> fields = new ArrayList<String>();
-        for(int i=0; i<numOutputFields; i++){
-            fields.add(NameConstants.FIELD_PREFIX() + i);
-        }
-        declarer.declare(new Fields(fields));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaStormExecutorForAlertWrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaStormExecutorForAlertWrapper.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaStormExecutorForAlertWrapper.java
deleted file mode 100644
index a485d76..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/JavaStormExecutorForAlertWrapper.java
+++ /dev/null
@@ -1,62 +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.datastream;
-
-import java.util.List;
-import java.util.SortedMap;
-
-import com.typesafe.config.Config;
-import scala.Tuple2;
-import scala.Tuple3;
-
-public class JavaStormExecutorForAlertWrapper extends JavaStormStreamExecutor3<String, String, SortedMap<Object, Object>>{
-    private JavaStormStreamExecutor<Tuple2<String, SortedMap<Object, Object>>> delegate;
-    private String streamName;
-    public JavaStormExecutorForAlertWrapper(JavaStormStreamExecutor<Tuple2<String, SortedMap<Object, Object>>> delegate, String streamName){
-        this.delegate = delegate;
-        this.streamName = streamName;
-    }
-    @Override
-    public void prepareConfig(Config config) {
-        delegate.prepareConfig(config);
-    }
-
-    @Override
-    public void init() {
-        delegate.init();
-    }
-
-    @Override
-    public void flatMap(List<Object> input, final Collector<Tuple3<String, String, SortedMap<Object, Object>>> collector) {
-        Collector delegateCollector = new Collector(){
-            @Override
-            public void collect(Object o) {
-                Tuple2 tuple2 = (Tuple2)o;
-                collector.collect(new Tuple3(tuple2._1, streamName, tuple2._2));
-            }
-        };
-        delegate.flatMap(input, delegateCollector);
-    }
-    
-    public JavaStormStreamExecutor<Tuple2<String, SortedMap<Object, Object>>> getDelegate() {
-    	return delegate;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/utils/JavaReflections.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/utils/JavaReflections.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/utils/JavaReflections.java
deleted file mode 100644
index 04b4bed..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/datastream/utils/JavaReflections.java
+++ /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.
- */
-package org.apache.eagle.datastream.utils;
-
-import java.lang.reflect.ParameterizedType;
-
-/**
- * @since 12/7/15
- */
-class JavaReflections {
-    @SuppressWarnings("unchecked")
-    public static Class<?> getGenericTypeClass(final Object obj,int index) {
-        return (Class<?>) ((ParameterizedType) obj
-                .getClass()
-                .getGenericSuperclass()).getActualTypeArguments()[index];
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/ExecutionEnvironments.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/ExecutionEnvironments.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/ExecutionEnvironments.scala
deleted file mode 100644
index 90e59cf..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/ExecutionEnvironments.scala
+++ /dev/null
@@ -1,140 +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.datastream
-
-import com.typesafe.config.{Config, ConfigFactory}
-import org.apache.eagle.dataproc.util.ConfigOptionParser
-import org.apache.eagle.datastream.core._
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment
-
-import scala.reflect.runtime.universe._
-
-/**
- * Execution environment factory
- *
- * The factory is mainly used for create or manage execution environment,
- * and also handles the shared works like configuration, arguments for execution environment
- *
- * Notice: this factory class should not know any implementation like storm or spark
- *
- * @since 0.3.0
- */
-object ExecutionEnvironments{
-  type storm = StormExecutionEnvironment
-
-  /**
-   * Use `'''get[StormExecutionEnvironment](config)'''` instead
-   *
-   * @param config
-   * @return
-   */
-  @deprecated("Execution environment should not know implementation of Storm")
-  def getStorm(config : Config) = new StormExecutionEnvironment(config)
-
-  /**
-   * Use `'''get[StormExecutionEnvironment]'''` instead
-   *
-   * @return
-   */
-  @deprecated("Execution environment should not know implementation of Storm")
-  def getStorm:StormExecutionEnvironment = {
-    val config = ConfigFactory.load()
-    getStorm(config)
-  }
-
-  /**
-   * Use `'''get[StormExecutionEnvironment](args)'''` instead
-   *
-   * @see get[StormExecutionEnvironment](args)
-    * @param args
-   * @return
-   */
-  @deprecated("Execution environment should not know implementation of Storm")
-  def getStorm(args:Array[String]):StormExecutionEnvironment = {
-    getStorm(new ConfigOptionParser().load(args))
-  }
-
-  /**
-   * @param typeTag
-   * @tparam T
-   * @return
-   */
-  def get[T<:ExecutionEnvironment](implicit typeTag: TypeTag[T]): T ={
-    getWithConfig[T](ConfigFactory.load())
-  }
-
-  /**
-   *
-   * @param config
-   * @param typeTag
-   * @tparam T
-   * @return
-   */
-  def getWithConfig[T <: ExecutionEnvironment](config:Config)(implicit typeTag: TypeTag[T]): T ={
-    typeTag.mirror.runtimeClass(typeOf[T]).getConstructor(classOf[Config]).newInstance(config).asInstanceOf[T]
-  }
-
-  /**
-   *
-   * @param args
-   * @param typeTag
-   * @tparam T
-   * @return
-   */
-  def get[T<:ExecutionEnvironment](args:Array[String])(implicit typeTag: TypeTag[T]): T ={
-    getWithConfig[T](new ConfigOptionParser().load(args))
-  }
-
-  /**
-   * Support java style for default config
-   *
-   * @param clazz execution environment class
-   * @tparam T execution environment type
-   * @return
-   */
-  def get[T<:ExecutionEnvironment](clazz:Class[T]):T ={
-    get[T](ConfigFactory.load(),clazz)
-  }
-
-  def get[T<:ExecutionEnvironment](clazz:Class[T], config:Config):T ={
-    get[T](config,clazz)
-  }
-
-  /**
-   * Support java style
-    *
-    * @param config command config
-   * @param clazz execution environment class
-   * @tparam T execution environment type
-   * @return
-   */
-  def get[T<:ExecutionEnvironment](config:Config,clazz:Class[T]):T ={
-    clazz.getConstructor(classOf[Config]).newInstance(config)
-  }
-
-  /**
-   * Support java style
-   *
-   * @param args command arguments in string array
-   * @param clazz execution environment class
-   * @tparam T execution environment type
-   * @return
-   */
-  def get[T<:ExecutionEnvironment](args:Array[String],clazz:Class[T]):T ={
-    clazz.getConstructor(classOf[Config]).newInstance(new ConfigOptionParser().load(args))
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyCompiler.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyCompiler.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyCompiler.scala
deleted file mode 100644
index 46f4738..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/core/AbstractTopologyCompiler.scala
+++ /dev/null
@@ -1,21 +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.datastream.core
-
-trait AbstractTopologyCompiler{
-  def buildTopology : AbstractTopologyExecutor
-}



[22/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
deleted file mode 100644
index 6ffa621..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
+++ /dev/null
@@ -1,57 +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.log.entity;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success", "exception", "encodedRowkeys"})
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class GenericCreateAPIResponseEntity{
-	private boolean success;
-	private String exception;
-	private List<String> encodedRowkeys;
-	
-	public List<String> getEncodedRowkeys() {
-		return encodedRowkeys;
-	}
-	public void setEncodedRowkeys(List<String> encodedRowkeys) {
-		this.encodedRowkeys = encodedRowkeys;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
deleted file mode 100755
index 9c42ab2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
+++ /dev/null
@@ -1,58 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityBatchReader implements EntityCreationListener{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityBatchReader.class);
-	
-	private List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-	private StreamReader reader;
-	
-	public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		reader = new GenericEntityStreamReader(serviceName, condition);
-		reader.register(this);
-	}
-	
-	public GenericEntityBatchReader(StreamReader reader) throws InstantiationException, IllegalAccessException{
-		this.reader = reader;
-		reader.register(this);
-	}
-	
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-	public long getFirstTimestamp(){ return reader.getFirstTimestamp();}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity){
-		entities.add(entity);
-	}
-	
-	@SuppressWarnings("unchecked")
-	public <T> List<T> read() throws Exception{
-		if(LOG.isDebugEnabled()) LOG.debug("Start reading as batch mode");
-		reader.readAsStream();
-		return (List<T>)entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
deleted file mode 100755
index 3f97e78..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
+++ /dev/null
@@ -1,129 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Date;
-
-public class GenericEntityScanStreamReader extends StreamReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityScanStreamReader.class);
-	
-	private EntityDefinition entityDef;
-	private SearchCondition condition;
-	private String prefix;
-	private long lastTimestamp = 0;
-	private long firstTimestamp = 0;
-	
-	public GenericEntityScanStreamReader(String serviceName, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(serviceName, "serviceName");
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-	}
-
-	public GenericEntityScanStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(entityDef, "entityDef");
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-	}
-	
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-	
-	private void checkNotNull(Object o, String message){
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-
-	public EntityDefinition getEntityDefinition() {
-		return entityDef;
-	}
-
-	public SearchCondition getSearchCondition() {
-		return condition;
-	}
-
-	@Override
-	public void readAsStream() throws Exception{
-		Date start = null;
-		Date end = null;
-		// shortcut to avoid read when pageSize=0
-		if(condition.getPageSize() <= 0){
-			return; // return nothing
-		}
-		// Process the time range if needed
-		if(entityDef.isTimeSeries()){
-			start = DateTimeUtil.humanDateToDate(condition.getStartTime());
-			end = DateTimeUtil.humanDateToDate(condition.getEndTime());
-		}else{
-			start = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_START_HUMANTIME);
-			end = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_END_HUMANTIME);
-		}
-		byte[][] outputQualifiers = null;
-		if(!condition.isOutputAll()) {
-			// Generate the output qualifiers
-			outputQualifiers = HBaseInternalLogHelper.getOutputQualifiers(entityDef, condition.getOutputFields());
-		}
-		HBaseLogReader2 reader = new HBaseLogReader2(entityDef, condition.getPartitionValues(), start, end, condition.getFilter(), condition.getStartRowkey(), outputQualifiers, this.prefix);
-		try{
-			reader.open();
-			InternalLog log;
-			int count = 0;
-			while ((log = reader.read()) != null) {
-				TaggedLogAPIEntity entity = HBaseInternalLogHelper.buildEntity(log, entityDef);
-				if (lastTimestamp < entity.getTimestamp()) {
-					lastTimestamp = entity.getTimestamp();
-				}
-				if(firstTimestamp > entity.getTimestamp() || firstTimestamp == 0){
-					firstTimestamp = entity.getTimestamp();
-				}
-
-				entity.setSerializeVerbose(condition.isOutputVerbose());
-				entity.setSerializeAlias(condition.getOutputAlias());
-
-				for(EntityCreationListener l : _listeners){
-					l.entityCreated(entity);
-				}
-				if(++count == condition.getPageSize())
-					break;
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail reading log", ioe);
-			throw ioe;
-		}finally{
-			reader.close();
-		}		
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return this.firstTimestamp;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
deleted file mode 100755
index c3d916e..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
+++ /dev/null
@@ -1,125 +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.log.entity;
-
-import org.apache.eagle.log.entity.index.NonClusteredIndexStreamReader;
-import org.apache.eagle.log.entity.index.UniqueIndexStreamReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.query.parser.ORExpression;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityStreamReader extends StreamReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityStreamReader.class);
-	
-	private EntityDefinition entityDef;
-	private SearchCondition condition;
-	private String prefix;
-	private StreamReader readerAfterPlan;
-
-	public GenericEntityStreamReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		this(serviceName, condition, null);
-	}
-
-	public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		this(entityDef, condition, entityDef.getPrefix());
-	}
-	
-	public GenericEntityStreamReader(String serviceName, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(serviceName, "serviceName");
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-		this.readerAfterPlan = selectQueryReader();
-	}
-
-	public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(entityDef, "entityDef");
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-		this.readerAfterPlan = selectQueryReader();
-	}
-
-	private void checkNotNull(Object o, String message){
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-	
-	public EntityDefinition getEntityDefinition() {
-		return entityDef;
-	}
-	
-	public SearchCondition getSearchCondition() {
-		return condition;
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		readerAfterPlan._listeners.addAll(this._listeners);
-		readerAfterPlan.readAsStream();
-	}
-	
-	private StreamReader selectQueryReader() throws InstantiationException, IllegalAccessException {
-		final ORExpression query = condition.getQueryExpression();
-		IndexDefinition[] indexDefs = entityDef.getIndexes();
-
-        // Index just works with query condition
-		if (indexDefs != null && condition.getQueryExpression()!=null) {
-			List<byte[]> rowkeys = new ArrayList<>();
-			for (IndexDefinition index : indexDefs) {
-				// Check unique index first
-				if (index.isUnique()) {
-					final IndexDefinition.IndexType type = index.canGoThroughIndex(query, rowkeys);
-					if (!IndexDefinition.IndexType.NON_INDEX.equals(type)) {
-						LOG.info("Selectd query unique index " + index.getIndexName() + " for query: " + condition.getQueryExpression());
-						return new UniqueIndexStreamReader(index, condition, rowkeys);
-					}
-				}
-			}
-			for (IndexDefinition index : indexDefs) {
-				// Check non-clustered index
-				if (!index.isUnique()) {
-					final IndexDefinition.IndexType type = index.canGoThroughIndex(query, rowkeys);
-					if (!IndexDefinition.IndexType.NON_INDEX.equals(type)) {
-						LOG.info("Selectd query non clustered index " + index.getIndexName() + " for query: " + condition.getQueryExpression().toString());
-						return new NonClusteredIndexStreamReader(index, condition, rowkeys);
-					}
-				}
-			}
-		}
-		return new GenericEntityScanStreamReader(entityDef, condition, this.prefix);
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return readerAfterPlan.getLastTimestamp();
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return readerAfterPlan.getFirstTimestamp();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
deleted file mode 100755
index 1946d6c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
+++ /dev/null
@@ -1,151 +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.log.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-/**
- * multi-threading stream readers which only applies to time-series entity where we split the query into
- * different time range
- * 
- * When this class is used together with list query or aggregate query, be aware that the query's behavior could
- * be changed for example pageSize does not work well, output sequence is not determined
- */
-public class GenericEntityStreamReaderMT extends StreamReader{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityStreamReaderMT.class);
-	private List<GenericEntityStreamReader> readers = new ArrayList<GenericEntityStreamReader>(); 
-	
-	public GenericEntityStreamReaderMT(String serviceName, SearchCondition condition, int numThreads) throws Exception{
-		checkIsTimeSeries(serviceName);
-		checkNumThreads(numThreads);
-		long queryStartTime = DateTimeUtil.humanDateToSeconds(condition.getStartTime())*1000;
-		long queryEndTime = DateTimeUtil.humanDateToSeconds(condition.getEndTime())*1000;
-		long subStartTime = queryStartTime;
-		long subEndTime = 0;
-		long interval = (queryEndTime-queryStartTime) / numThreads;
-		for(int i=0; i<numThreads; i++){
-			// split search condition by time range
-			subStartTime = queryStartTime + i*interval;
-			if(i == numThreads-1){
-				subEndTime = queryEndTime;
-			}else{
-				subEndTime = subStartTime + interval;
-			}
-			String strStartTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(subStartTime);
-			String strEndTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(subEndTime);
-			SearchCondition sc = new SearchCondition(condition);
-			sc.setStartTime(strStartTime);
-			sc.setEndTime(strEndTime);
-			GenericEntityStreamReader reader = new GenericEntityStreamReader(serviceName, sc);
-			readers.add(reader);
-		}
-	}
-	
-	private void checkIsTimeSeries(String serviceName) throws Exception{
-		EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		if(!ed.isTimeSeries()){
-			throw new IllegalArgumentException("Multi-threading stream reader must be applied to time series table");
-		}
-	}
-	
-	private void checkNumThreads(int numThreads){
-		if(numThreads <= 0){
-			throw new IllegalArgumentException("Multi-threading stream reader must have numThreads >= 1");
-		}
-	}
-	
-	/**
-	 * default to 2 threads
-	 * @param serviceName
-	 * @param condition
-	 */
-	public GenericEntityStreamReaderMT(String serviceName, SearchCondition condition) throws Exception{
-		this(serviceName, condition, 2);
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		// populate listeners to all readers
-		for(EntityCreationListener l : _listeners){
-			for(GenericEntityStreamReader r : readers){
-				r.register(l);
-			}
-		}
-
-		List<Future<Void>> futures = new ArrayList<Future<Void>>();
-		for(GenericEntityStreamReader r : readers){
-			SingleReader reader = new SingleReader(r);
-			Future<Void> readFuture = EagleConfigFactory.load().getExecutor().submit(reader);
-			futures.add(readFuture);
-		}
-		
-		// join threads and check exceptions
-		for(Future<Void> future : futures){
-			try{
-				future.get();
-			}catch(Exception ex){
-				LOG.error("Error in read", ex);
-				throw ex;
-			}
-		}
-	}
-	
-	private static class SingleReader implements Callable<Void>{
-		private GenericEntityStreamReader reader;
-		public SingleReader(GenericEntityStreamReader reader){
-			this.reader = reader;
-		}
-		@Override
-		public Void call() throws Exception{
-			reader.readAsStream();
-			return null;
-		}
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		long lastTimestamp = 0;
-		for (GenericEntityStreamReader reader : readers) {
-			if (lastTimestamp < reader.getLastTimestamp()) {
-				lastTimestamp = reader.getLastTimestamp();
-			}
-		}
-		return lastTimestamp;
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		long firstTimestamp = 0;
-		for (GenericEntityStreamReader reader : readers) {
-			if (firstTimestamp > reader.getLastTimestamp() || firstTimestamp == 0) {
-				firstTimestamp = reader.getLastTimestamp();
-			}
-		}
-		return firstTimestamp;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
deleted file mode 100755
index 5c8b12d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
+++ /dev/null
@@ -1,78 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityWriter {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityWriter.class);
-	private EntityDefinition entityDef;
-
-	public GenericEntityWriter(String serviceName) throws InstantiationException, IllegalAccessException{
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "serviceName");
-	}
-
-	public GenericEntityWriter(EntityDefinition entityDef) throws InstantiationException, IllegalAccessException{
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "serviceName");
-	}
-	
-	private void checkNotNull(Object o, String message) {
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-
-	/**
-	 * @param entities
-	 * @return row keys
-	 * @throws Exception
-	 */
-	public List<String> write(List<? extends TaggedLogAPIEntity> entities) throws Exception{
-		HBaseLogWriter writer = new HBaseLogWriter(entityDef.getTable(), entityDef.getColumnFamily());
-		List<String> rowkeys = new ArrayList<String>(entities.size());
-		List<InternalLog> logs = new ArrayList<InternalLog>(entities.size());
-		
-		try{
-			writer.open();
-			for(TaggedLogAPIEntity entity : entities){
-				final InternalLog entityLog = HBaseInternalLogHelper.convertToInternalLog(entity, entityDef);
-				logs.add(entityLog);
-			}
-			List<byte[]> bRowkeys  = writer.write(logs);
-			for (byte[] rowkey : bRowkeys) {
-				rowkeys.add(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-			}
-
-		}catch(Exception ex){
-			LOG.error("fail writing tagged log", ex);
-			throw ex;
-		}finally{
-			writer.close();
-	 	}
-		return rowkeys;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
deleted file mode 100755
index a9a8c75..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
+++ /dev/null
@@ -1,59 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.ServicePath;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.entity.meta.Metric;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-/**
- * GenericMetricEntity should use prefix field which is extended from TaggedLogAPIEntity as metric name
- * metric name is used to partition the metric tables
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagle_metric")
-@ColumnFamily("f")
-@Prefix(GenericMetricEntity.GENERIC_METRIC_PREFIX_PLACE_HOLDER)
-@Service(GenericMetricEntity.GENERIC_METRIC_SERVICE)
-@TimeSeries(true)
-@Metric(interval=60000)
-@ServicePath(path = "/metric")
-public class GenericMetricEntity extends TaggedLogAPIEntity {
-	public static final String GENERIC_METRIC_SERVICE = "GenericMetricService";
-	public static final String GENERIC_METRIC_PREFIX_PLACE_HOLDER = "GENERIC_METRIC_PREFIX_PLACEHODLER";
-	public static final String VALUE_FIELD ="value";
-
-	@Column("a")
-	private double[] value;
-
-	public double[] getValue() {
-		return value;
-	}
-
-	public void setValue(double[] value) {
-		this.value = value;
-		_pcs.firePropertyChange("value", null, null);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
deleted file mode 100755
index 84b02ae..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
+++ /dev/null
@@ -1,54 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericMetricEntityBatchReader  implements EntityCreationListener{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityBatchReader.class);
-	
-	private List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-	private GenericEntityStreamReader reader;
-	
-	public GenericMetricEntityBatchReader(String metricName, SearchCondition condition) throws Exception{
-		reader = new GenericEntityStreamReader(GenericMetricEntity.GENERIC_METRIC_SERVICE, condition, metricName);
-	}
-	
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-	public long getFirstTimestamp() {
-		return reader.getFirstTimestamp();
-	}
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity){
-		entities.add(entity);
-	}
-	
-	@SuppressWarnings("unchecked")
-	public <T> List<T> read() throws Exception{
-		if(LOG.isDebugEnabled()) LOG.debug("Start reading as batch mode");
-		reader.register(this);
-		reader.readAsStream();
-		return (List<T>)entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
deleted file mode 100755
index b1dd64c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
+++ /dev/null
@@ -1,98 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.text.ParseException;
-
-public class GenericMetricEntityDecompactionStreamReader extends StreamReader implements EntityCreationListener{
-	@SuppressWarnings("unused")
-	private static final Logger LOG = LoggerFactory.getLogger(GenericMetricEntityDecompactionStreamReader.class);
-	private GenericEntityStreamReader reader;
-	private EntityDefinition ed;
-	private String serviceName = GenericMetricEntity.GENERIC_METRIC_SERVICE;
-	private long start;
-	private long end;
-	private GenericMetricShadowEntity single = new GenericMetricShadowEntity();
-	
-	/**
-	 * it makes sense that serviceName should not be provided while metric name should be provided as prefix
-	 * @param metricName
-	 * @param condition
-	 * @throws InstantiationException
-	 * @throws IllegalAccessException
-	 * @throws ParseException
-	 */
-	public GenericMetricEntityDecompactionStreamReader(String metricName, SearchCondition condition) throws InstantiationException, IllegalAccessException, ParseException{
-		ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkIsMetric(ed);
-		reader = new GenericEntityStreamReader(serviceName, condition, metricName);
-		start = DateTimeUtil.humanDateToSeconds(condition.getStartTime())*1000;
-		end = DateTimeUtil.humanDateToSeconds(condition.getEndTime())*1000;
-	}
-	
-	private void checkIsMetric(EntityDefinition ed){
-		if(ed.getMetricDefinition() == null)
-			throw new IllegalArgumentException("Only metric entity comes here");
-	}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity) throws Exception{
-		GenericMetricEntity e = (GenericMetricEntity)entity;
-		double[] value = e.getValue();
-		if(value != null) {
-			int count =value.length;
-			@SuppressWarnings("unused")
-			Class<?> cls = ed.getMetricDefinition().getSingleTimestampEntityClass();
-			for (int i = 0; i < count; i++) {
-				long ts = entity.getTimestamp() + i * ed.getMetricDefinition().getInterval();
-				// exclude those entity which is not within the time range in search condition. [start, end)
-				if (ts < start || ts >= end) {
-					continue;
-				}
-				single.setTimestamp(ts);
-				single.setTags(entity.getTags());
-				single.setValue(e.getValue()[i]);
-				for (EntityCreationListener l : _listeners) {
-					l.entityCreated(single);
-				}
-			}
-		}
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		reader.register(this);
-		reader.readAsStream();
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return reader.getFirstTimestamp();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
deleted file mode 100644
index acd1290..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
+++ /dev/null
@@ -1,34 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-/**
- * just a shadow class to avoid dynamically create the class and instantiate using reflection
- */
-public class GenericMetricShadowEntity extends TaggedLogAPIEntity {
-	private double value;
-
-	public double getValue() {
-		return value;
-	}
-
-	public void setValue(double value) {
-		this.value = value;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
deleted file mode 100644
index edb9fc0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
+++ /dev/null
@@ -1,121 +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.log.entity;
-
-import org.apache.eagle.common.EagleExceptionWrapper;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonDeserialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The only GenericServiceAPIResponseEntity for both client and server side
- *
- * @see GenericServiceAPIResponseEntityDeserializer
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success","exception","meta","type","obj"})
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonDeserialize(using = GenericServiceAPIResponseEntityDeserializer.class)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class GenericServiceAPIResponseEntity<T>{
-    /**
-     * Please use primitive type of value in meta as possible
-     */
-    private Map<String,Object> meta;
-	private boolean success;
-	private String exception;
-    private List<T> obj;
-    private Class<T> type;
-
-    public GenericServiceAPIResponseEntity(){
-        // default constructor
-    }
-    public GenericServiceAPIResponseEntity(Class<T> type){
-        this.setType(type);
-    }
-
-    public Map<String, Object> getMeta() {
-        return meta;
-    }
-
-    public void setMeta(Map<String, Object> meta) {
-        this.meta = meta;
-    }
-
-    public List<T> getObj() {
-        return obj;
-    }
-
-    public void setObj(List<T> obj) {
-        this.obj = obj;
-    }
-
-    public void setObj(List<T> obj,Class<T> type) {
-        this.setObj(obj);
-        this.setType(type);
-    }
-
-    public Class<T> getType() {
-        return type;
-    }
-
-    /**
-     * Set the first object's class as type
-     */
-    @SuppressWarnings("unused")
-    public void setTypeByObj(){
-        for(T t:this.obj){
-            if(this.type == null && t!=null){
-                this.type = (Class<T>) t.getClass();
-            }
-        }
-    }
-
-    /**
-     * can explicitly change type class
-     *
-     * @param type
-     */
-    public void setType(Class<T> type) {
-        this.type = type;
-    }
-
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-
-    public void setException(Exception exception){
-        if(exception!=null) this.exception = EagleExceptionWrapper.wrap(exception);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
deleted file mode 100644
index 85b875d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
+++ /dev/null
@@ -1,84 +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.log.entity;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.ObjectCodec;
-import org.codehaus.jackson.map.DeserializationContext;
-import org.codehaus.jackson.map.JsonDeserializer;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.codehaus.jackson.type.JavaType;
-
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @since 3/18/15
- */
-public class GenericServiceAPIResponseEntityDeserializer extends JsonDeserializer<GenericServiceAPIResponseEntity> {
-    private final static String META_FIELD="meta";
-    private final static String SUCCESS_FIELD="success";
-    private final static String EXCEPTION_FIELD="exception";
-    private final static String OBJ_FIELD="obj";
-    private final static String TYPE_FIELD="type";
-
-    @Override
-    public GenericServiceAPIResponseEntity deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
-        GenericServiceAPIResponseEntity entity = new GenericServiceAPIResponseEntity();
-        ObjectCodec objectCodec = jp.getCodec();
-
-        JsonNode rootNode = jp.getCodec().readTree(jp);
-        if(rootNode.isObject()){
-            Iterator<Map.Entry<String,JsonNode>> fields = rootNode.getFields();
-            JsonNode objNode = null;
-            while(fields.hasNext()){
-                Map.Entry<String,JsonNode> field = fields.next();
-                if (META_FIELD.equals(field.getKey()) && field.getValue() != null)
-                    entity.setMeta(objectCodec.readValue(field.getValue().traverse(), Map.class));
-                else if(SUCCESS_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    entity.setSuccess(field.getValue().getValueAsBoolean(false));
-                }else if(EXCEPTION_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    entity.setException(field.getValue().getTextValue());
-                }else if(TYPE_FIELD.endsWith(field.getKey())  && field.getValue() != null){
-                    try {
-                        entity.setType(Class.forName(field.getValue().getTextValue()));
-                    } catch (ClassNotFoundException e) {
-                        throw new IOException(e);
-                    }
-                }else if(OBJ_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    objNode = field.getValue();
-                }
-            }
-
-            if(objNode!=null) {
-                JavaType collectionType=null;
-                if (entity.getType() != null) {
-                    collectionType = TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, entity.getType());
-                }else{
-                    collectionType = TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, Map.class);
-                }
-                List obj = objectCodec.readValue(objNode.traverse(), collectionType);
-                entity.setObj(obj);
-            }
-        }else{
-            throw new IOException("root node is not object");
-        }
-        return entity;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
deleted file mode 100755
index 7a38033..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
+++ /dev/null
@@ -1,245 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.client.Result;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-public class HBaseInternalLogHelper {
-	private final static Logger LOG  = LoggerFactory.getLogger(HBaseInternalLogHelper.class);
-
-	private static final EntitySerDeserializer ENTITY_SERDESER = new EntitySerDeserializer();
-
-	/**
-	 *
-	 * @param ed
-	 * @param r
-	 * @param qualifiers if null, return all qualifiers defined in ed
-	 * @return
-	 */
-	public static InternalLog parse(EntityDefinition ed, Result r, byte[][] qualifiers) {
-		final byte[] row = r.getRow();
-		// skip the first 4 bytes : prefix
-		final int offset = (ed.getPartitions() == null) ? (4) : (4 + ed.getPartitions().length * 4);
-		long timestamp = ByteUtil.bytesToLong(row, offset);
-		// reverse timestamp
-		timestamp = Long.MAX_VALUE - timestamp;
-		final byte[] family = ed.getColumnFamily().getBytes();
-		final Map<String, byte[]> allQualifierValues = new HashMap<String, byte[]>();
-
-		if (qualifiers != null) {
-			int count = qualifiers.length;
-			final byte[][] values = new byte[count][];
-			for (int i = 0; i < count; i++) {
-				// TODO if returned value is null, it means no this column for this row, so why set null to the object?
-				values[i] = r.getValue(family, qualifiers[i]);
-				allQualifierValues.put(new String(qualifiers[i]), values[i]);
-			}
-		}else{
-			// return all qualifiers
-			for(KeyValue kv:r.list()){
-				byte[] qualifier = kv.getQualifier();
-				byte[] value = kv.getValue();
-				allQualifierValues.put(new String(qualifier),value);
-			}
-		}
-		final InternalLog log = buildObject(ed, row, timestamp, allQualifierValues);
-		return log;
-	}
-
-	/**
-	 *
-	 * @param ed
-	 * @param row
-	 * @param timestamp
-	 * @param allQualifierValues <code>Map &lt; Qualifier name (not display name),Value in bytes array &gt;</code>
-	 * @return
-	 */
-	public static InternalLog buildObject(EntityDefinition ed, byte[] row, long timestamp, Map<String, byte[]> allQualifierValues) {
-		InternalLog log = new InternalLog();
-		String myRow = EagleBase64Wrapper.encodeByteArray2URLSafeString(row);
-		log.setEncodedRowkey(myRow);
-		log.setPrefix(ed.getPrefix());
-		log.setTimestamp(timestamp);
-
-		Map<String, byte[]> logQualifierValues = new HashMap<String, byte[]>();
-		Map<String, String> logTags = new HashMap<String, String>();
-		Map<String, Object> extra = null;
-
-		Map<String,Double> doubleMap = null;
-		// handle with metric
-		boolean isMetricEntity = GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(ed.getService());
-		double[] metricValueArray = null;
-
-		for (Map.Entry<String, byte[]> entry : allQualifierValues.entrySet()) {
-			if (ed.isTag(entry.getKey())) {
-				if (entry.getValue() != null) {
-					logTags.put(entry.getKey(), new String(entry.getValue()));
-				}else if (TokenConstant.isExpression(entry.getKey())){
-					if(doubleMap == null) doubleMap = EntityQualifierUtils.bytesMapToDoubleMap(allQualifierValues, ed);
-					// Caculate expression based fields
-					String expression = TokenConstant.parseExpressionContent(entry.getKey());
-					if (extra == null) extra = new HashMap<String, Object>();
-
-					// Evaluation expression as output based on entity
-					// -----------------------------------------------
-					// 1) Firstly, check whether is metric entity and expression requires value and also value is not number (i.e. double[])
-					// 2) Treat all required fields as double, if not number, then set result as NaN
-
-					try {
-						ExpressionParser parser = ExpressionParser.parse(expression);
-						boolean isRequiringValue = parser.getDependentFields().contains(GenericMetricEntity.VALUE_FIELD);
-
-						if(isMetricEntity && isRequiringValue && doubleMap.get(GenericMetricEntity.VALUE_FIELD)!=null
-								&& Double.isNaN(doubleMap.get(GenericMetricEntity.VALUE_FIELD))) // EntityQualifierUtils will convert non-number field into Double.NaN
-						{
-							// if dependent fields require "value"
-							// and value exists but value's type is double[] instead of double
-
-							// handle with metric value array based expression
-							// lazily extract metric value as double array if required
-							if(metricValueArray == null){
-								// if(allQualifierValues.containsKey(GenericMetricEntity.VALUE_FIELD)){
-								Qualifier qualifier = ed.getDisplayNameMap().get(GenericMetricEntity.VALUE_FIELD);
-								EntitySerDeser serDeser = qualifier.getSerDeser();
-								if(serDeser instanceof DoubleArraySerDeser){
-									byte[] value = allQualifierValues.get(qualifier.getQualifierName());
-									if(value !=null ) metricValueArray = (double[]) serDeser.deserialize(value);
-								}
-								// }
-							}
-
-							if(metricValueArray!=null){
-								double[] resultBucket = new double[metricValueArray.length];
-								Map<String, Double> _doubleMap = new HashMap<String,Double>(doubleMap);
-								_doubleMap.remove(entry.getKey());
-								for(int i=0;i< resultBucket.length;i++) {
-									_doubleMap.put(GenericMetricEntity.VALUE_FIELD, metricValueArray[i]);
-									resultBucket[i]=  parser.eval(_doubleMap);
-								}
-								extra.put(expression,resultBucket);
-							}else{
-								LOG.warn("Failed convert metric value into double[] type which is required by expression: "+expression);
-								// if require value in double[] is NaN
-								double value = parser.eval(doubleMap);
-								extra.put(expression, value);
-							}
-						}else {
-							double value = parser.eval(doubleMap);
-							extra.put(expression, value);
-							// LOG.info("DEBUG: "+entry.getKey()+" = "+ value);
-						}
-					} catch (Exception e) {
-						LOG.error("Failed to eval expression "+expression+", exception: "+e.getMessage(),e);
-					}
-				}
-			} else {
-				logQualifierValues.put(entry.getKey(),entry.getValue());
-			}
-		}
-		log.setQualifierValues(logQualifierValues);
-		log.setTags(logTags);
-		log.setExtraValues(extra);
-		return log;
-	}
-	
-	public static TaggedLogAPIEntity buildEntity(InternalLog log, EntityDefinition entityDef) throws Exception {
-		Map<String, byte[]> qualifierValues = log.getQualifierValues();
-		TaggedLogAPIEntity entity = ENTITY_SERDESER.readValue(qualifierValues, entityDef);
-		if (entity.getTags() == null && log.getTags() != null) {
-			entity.setTags(log.getTags());
-		}
-		entity.setExp(log.getExtraValues());
-		entity.setTimestamp(log.getTimestamp());
-		entity.setEncodedRowkey(log.getEncodedRowkey());
-		entity.setPrefix(log.getPrefix());
-		return entity;
-	}
-	
-	public static List<TaggedLogAPIEntity> buildEntities(List<InternalLog> logs, EntityDefinition entityDef) throws Exception {
-		final List<TaggedLogAPIEntity> result = new ArrayList<TaggedLogAPIEntity>(logs.size());
-		for (InternalLog log : logs) {
-			result.add(buildEntity(log, entityDef));
-		}
-		return result;
-	}
-	
-	public static byte[][] getOutputQualifiers(EntityDefinition entityDef, List<String> outputFields) {
-		final byte[][] result = new byte[outputFields.size()][];
-		int index = 0;
-		for(String field : outputFields){
-			// convert displayName to qualifierName
-			Qualifier q = entityDef.getDisplayNameMap().get(field);
-			if(q == null){ // for tag case
-				result[index++] = field.getBytes();
-			}else{ // for qualifier case
-				result[index++] = q.getQualifierName().getBytes();
-			}
-		}
-		return result;
-	}
-
-	public static InternalLog convertToInternalLog(TaggedLogAPIEntity entity, EntityDefinition entityDef) throws Exception {
-		final InternalLog log = new InternalLog();
-		final Map<String, String> inputTags = entity.getTags();
-		final Map<String, String> tags = new TreeMap<String, String>();
-		if(inputTags!=null) {
-			for (Map.Entry<String, String> entry : inputTags.entrySet()) {
-				tags.put(entry.getKey(), entry.getValue());
-			}
-		}
-		log.setTags(tags);
-		if(entityDef.isTimeSeries()){
-			log.setTimestamp(entity.getTimestamp());
-		}else{
-			log.setTimestamp(EntityConstants.FIXED_WRITE_TIMESTAMP); // set timestamp to MAX, then actually stored 0
-		}
-		
-		// For Metric entity, prefix is populated along with entity instead of EntityDefinition
-		if(entity.getPrefix() != null && !entity.getPrefix().isEmpty()){
-			log.setPrefix(entity.getPrefix());
-		}else{
-			log.setPrefix(entityDef.getPrefix());
-		}
-		
-		log.setPartitions(entityDef.getPartitions());
-		EntitySerDeserializer des = new EntitySerDeserializer();
-		log.setQualifierValues(des.writeValue(entity, entityDef));
-		
-		final IndexDefinition[] indexDefs = entityDef.getIndexes();
-		if (indexDefs != null) {
-			final List<byte[]> indexRowkeys = new ArrayList<byte[]>();
-			for (int i = 0; i < indexDefs.length; ++i) {
-				final IndexDefinition indexDef = indexDefs[i];
-				final byte[] indexRowkey = indexDef.generateIndexRowkey(entity);
-				indexRowkeys.add(indexRowkey);
-			}
-			log.setIndexRowkeys(indexRowkeys);
-		}
-		return log;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
deleted file mode 100755
index c8b9a33..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
+++ /dev/null
@@ -1,86 +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.log.entity;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.client.ResultScanner;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.filter.Filter;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-
-public class HBaseLogReader2 extends AbstractHBaseLogReader<InternalLog> {
-	protected ResultScanner rs;
-
-	public HBaseLogReader2(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime, Filter filter, String lastScanKey, byte[][] outputQualifiers) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers);
-	}
-
-	/**
-	 * This constructor supports partition.
-	 *
-	 * @param ed               entity definition
-	 * @param partitions       partition values, which is sorted in partition definition order. TODO: in future we need to support
-	 *                         multiple values for one partition field
-	 * @param startTime        start time of the query
-	 * @param endTime          end time of the query
-	 * @param filter           filter for the hbase scan
-	 * @param lastScanKey      the key of last scan
-	 * @param outputQualifiers the bytes of output qualifier names
-	 * @param prefix           can be populated from outside world specifically for generic metric reader
-	 */
-	public HBaseLogReader2(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime, Filter filter, String lastScanKey, byte[][] outputQualifiers, String prefix) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers, prefix);
-	}
-
-	@Override
-	protected void onOpen(HTableInterface tbl, Scan scan) throws IOException {
-		rs = tbl.getScanner(scan);
-	}
-
-	/**
-	 * <h2>Close:</h2>
-	 * 1. Call super.close(): release current table connection <br></br>
-	 * 2. Close Scanner<br></br>
-	 *
-	 * @throws IOException
-	 */
-	@Override
-	public void close() throws IOException {
-		super.close();
-		if(rs != null){
-			rs.close();
-		}
-	}
-
-	@Override
-	public InternalLog read() throws IOException {
-		if (rs == null)
-			throw new IllegalArgumentException(
-					"ResultScanner must be initialized before reading");
-		InternalLog t = null;
-		Result r = rs.next();
-		if (r != null) {
-			t = HBaseInternalLogHelper.parse(_ed, r, qualifiers);
-		}
-		return t;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
deleted file mode 100644
index 059ee7f..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
+++ /dev/null
@@ -1,152 +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.log.entity;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Put;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class HBaseLogWriter implements LogWriter {
-	private static Logger LOG = LoggerFactory.getLogger(HBaseLogWriter.class);
-	private static byte[] EMPTY_INDEX_QUALIFER_VALUE = "".getBytes();
-	
-	private HTableInterface tbl;
-	private String table;
-	private String columnFamily;
-	
-	public HBaseLogWriter(String table, String columnFamily) {
-		// TODO assert for non-null of table and columnFamily
-		this.table = table;
-		this.columnFamily = columnFamily;
-	}
-	
-	@Override
-	public void open() throws IOException {
-		try{
-			tbl = EagleConfigFactory.load().getHTable(this.table);
-//			LOGGER.info("HBase table " + table + " audo reflush is " + (tbl.isAutoFlush() ? "enabled" : "disabled"));
-		}catch(Exception ex){
-			LOG.error("Cannot create htable", ex);
-			throw new IOException(ex);
-		}
-	}
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-
-	@Override
-	public void flush() throws IOException {
-		tbl.flushCommits();
-	}
-	
-	protected void populateColumnValues(Put p, InternalLog log){
-		Map<String, byte[]> qualifierValues = log.getQualifierValues();
-		// iterate all qualifierValues
-		for(Map.Entry<String, byte[]> entry : qualifierValues.entrySet()){
-			p.add(columnFamily.getBytes(), entry.getKey().getBytes(), entry.getValue());
-		}
-		
-		Map<String, String> tags = log.getTags();
-		// iterate all tags, each tag will be stored as a column qualifier
-		if(tags != null){
-			for(Map.Entry<String, String> entry : tags.entrySet()){
-				// TODO need a consistent handling of null values
-				if(entry.getValue() != null)
-					p.add(columnFamily.getBytes(), entry.getKey().getBytes(), entry.getValue().getBytes());
-			}
-		}
-	}
-
-	/**
-	 * TODO need think about if multi-PUT is necessary, by checking if autoFlush works
-	 */
-	@Override
-	public byte[] write(InternalLog log) throws IOException{
-		final byte[] rowkey = RowkeyBuilder.buildRowkey(log);
-		final Put p = new Put(rowkey);
-		populateColumnValues(p, log);
-		tbl.put(p);
-		final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-		if (indexRowkeys != null) {
-			writeIndexes(rowkey, indexRowkeys);
-		}
-		return rowkey;
-	}
-
-	/**
-	 * TODO need think about if multi-PUT is necessary, by checking if autoFlush works
-	 */
-	public List<byte[]> write(List<InternalLog> logs) throws IOException{
-		final List<Put> puts = new ArrayList<Put>(logs.size());
-		final List<byte[]> result = new ArrayList<byte[]>(logs.size());
-		for (InternalLog log : logs) {
-			final byte[] rowkey = RowkeyBuilder.buildRowkey(log);
-			final Put p = new Put(rowkey);
-			populateColumnValues(p, log);
-			puts.add(p);
-			final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-			if (indexRowkeys != null) {
-				writeIndexes(rowkey, indexRowkeys, puts);
-			}
-			result.add(rowkey);
-		}
-		tbl.put(puts);
-		return result;
-	}
-	
-	@Override
-	public void updateByRowkey(byte[] rowkey, InternalLog log) throws IOException{
-		Put p = new Put(rowkey);
-		populateColumnValues(p, log);
-		tbl.put(p);
-		final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-		if (indexRowkeys != null) {
-			writeIndexes(rowkey, indexRowkeys);
-		}
-	}
-
-	private void writeIndexes(byte[] rowkey, List<byte[]> indexRowkeys) throws IOException {
-		for (byte[] indexRowkey : indexRowkeys) {
-			Put p = new Put(indexRowkey);
-			p.add(columnFamily.getBytes(), rowkey, EMPTY_INDEX_QUALIFER_VALUE);
-			tbl.put(p);
-		}
-	}
-
-	private void writeIndexes(byte[] rowkey, List<byte[]> indexRowkeys, List<Put> puts) throws IOException {
-		for (byte[] indexRowkey : indexRowkeys) {
-			Put p = new Put(indexRowkey);
-			p.add(columnFamily.getBytes(), rowkey, EMPTY_INDEX_QUALIFER_VALUE);
-			puts.add(p);
-//			tbl.put(p);
-		}
-	}
-
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
deleted file mode 100755
index 8276640..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
+++ /dev/null
@@ -1,139 +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.log.entity;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO we should decouple BaseLog during write time and BaseLog during read time
- */
-public class InternalLog {
-	private String encodedRowkey;
-	private String prefix;
-	private String[] partitions;
-	private long timestamp;
-	private Map<String, byte[]> qualifierValues;
-
-	private Map<String,Object> extraValues;
-	private Map<String, String> tags;
-	private Map<String, List<String>> searchTags;
-	private List<byte[]> indexRowkeys;
-
-	public String getEncodedRowkey() {
-		return encodedRowkey;
-	}
-
-	public void setEncodedRowkey(String encodedRowkey) {
-		this.encodedRowkey = encodedRowkey;
-	}
-	
-	public Map<String, byte[]> getQualifierValues() {
-		return qualifierValues;
-	}
-	public void setQualifierValues(Map<String, byte[]> qualifierValues) {
-		this.qualifierValues = qualifierValues;
-	}
-
-	public Map<String, List<String>> getSearchTags() {
-		return searchTags;
-	}
-	public void setSearchTags(Map<String, List<String>> searchTags) {
-		this.searchTags = searchTags;
-	}
-	public String getPrefix() {
-		return prefix;
-	}
-	public void setPrefix(String prefix) {
-		this.prefix = prefix;
-	}
-	public String[] getPartitions() {
-		return partitions;
-	}
-	public void setPartitions(String[] partitions) {
-		this.partitions = partitions;
-	}
-	public long getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-	public Map<String, String> getTags() {
-		return tags;
-	}
-	public void setTags(Map<String, String> tags) {
-		this.tags = tags;
-	}
-	public List<byte[]> getIndexRowkeys() {
-		return indexRowkeys;
-	}
-	public void setIndexRowkeys(List<byte[]> indexRowkeys) {
-		this.indexRowkeys = indexRowkeys;
-	}
-	public Map<String, Object> getExtraValues() { return extraValues; }
-	public void setExtraValues(Map<String, Object> extraValues) { this.extraValues = extraValues; }
-
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		sb.append(prefix);
-		sb.append("|");
-		sb.append(DateTimeUtil.millisecondsToHumanDateWithMilliseconds(timestamp));
-		sb.append("(");
-		sb.append(timestamp);
-		sb.append(")");
-		sb.append("|searchTags:");
-		if(searchTags != null){
-			for(String tagkey : searchTags.keySet()){
-				sb.append(tagkey);
-				sb.append('=');
-				List<String> tagValues = searchTags.get(tagkey);
-				sb.append("(");
-				for(String tagValue : tagValues){
-					sb.append(tagValue);
-					sb.append(",");
-				}
-				sb.append(")");
-				sb.append(",");
-			}
-		}
-		sb.append("|tags:");
-		if(tags != null){
-			for(Map.Entry<String, String> entry : tags.entrySet()){
-				sb.append(entry.getKey());
-				sb.append("=");
-				sb.append(entry.getValue());
-				sb.append(",");
-			}
-		}
-		sb.append("|columns:");
-		if(qualifierValues != null){
-			for(String qualifier : qualifierValues.keySet()){
-				byte[] value = qualifierValues.get(qualifier);
-				sb.append(qualifier);
-				sb.append("=");
-				if(value != null){
-					sb.append(new String(value));
-				}
-				sb.append(",");
-			}
-		}
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
deleted file mode 100755
index 15de946..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
+++ /dev/null
@@ -1,78 +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.log.entity;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * TODO: (hchen9) currently we disable firstTimestamp in response avoid breaking older client implementation, but we may need to remove "firstTimestamp" from @JsonIgnoreProperties(ignoreUnknown = true,value={"firstTimestamp"}) to enable the feature later
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true,value={"firstTimestamp"})
-public class ListQueryAPIResponseEntity {
-	private boolean success;
-	private String exception;
-	private int totalResults;
-	private long elapsedms;
-	private long lastTimestamp;
-	private long firstTimestamp;
-	public long getFirstTimestamp() {
-		return firstTimestamp;
-	}
-	public void setFirstTimestamp(long firstTimestamp) {
-		this.firstTimestamp = firstTimestamp;
-	}
-	private Object obj;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public int getTotalResults() {
-		return totalResults;
-	}
-	public void setTotalResults(int totalResults) {
-		this.totalResults = totalResults;
-	}
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-	public void setLastTimestamp(long lastTimestamp) {
-		this.lastTimestamp = lastTimestamp;
-	}
-	public Object getObj() {
-		return obj;
-	}
-	public void setObj(Object obj) {
-		this.obj = obj;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
deleted file mode 100755
index da1e1ab..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
+++ /dev/null
@@ -1,28 +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.log.entity;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-public interface LogReader<T> extends Closeable{
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-	
-	public T read() throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
deleted file mode 100644
index 6ef4ee3..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
+++ /dev/null
@@ -1,32 +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.log.entity;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-public interface LogWriter extends Closeable{
-	public void flush() throws IOException;
-
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-
-	public byte[] write(InternalLog log) throws IOException;
-	
-	public void updateByRowkey(byte[] rowkey, InternalLog log) throws IOException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
deleted file mode 100755
index f655ba0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
+++ /dev/null
@@ -1,117 +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.log.entity;
-
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Indexes;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Index;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagle_metric")
-@ColumnFamily("f")
-@Prefix("dmeta")
-@Service("MetricMetadataService")
-@TimeSeries(false)
-@Indexes({
-	@Index(name="Index_1_name", columns = { "name" }, unique = true)
-	})
-public class MetricMetadataEntity extends TaggedLogAPIEntity {
-	
-	@Column("a")
-	private String storeType;
-	@Column("b")
-	private String displayName;
-	@Column("c")
-	private String defaultDownSamplingFunction;
-	@Column("d")
-	private String defaultAggregateFunction;
-	@Column("e")
-	private String aggFunctions;
-	@Column("f")
-	private String downSamplingFunctions;
-	@Column("g")
-	private String resolutions;
-	@Column("h")
-	private String drillDownPaths;
-	
-	public String getStoreType() {
-		return storeType;
-	}
-	public void setStoreType(String storeType) {
-		this.storeType = storeType;
-		_pcs.firePropertyChange("storeType", null, null);
-	}
-	public String getDisplayName() {
-		return displayName;
-	}
-	public void setDisplayName(String displayName) {
-		this.displayName = displayName;
-		_pcs.firePropertyChange("displayName", null, null);
-	}
-	public String getDefaultDownSamplingFunction() {
-		return defaultDownSamplingFunction;
-	}
-	public void setDefaultDownSamplingFunction(String defaultDownSamplingFunction) {
-		this.defaultDownSamplingFunction = defaultDownSamplingFunction;
-		_pcs.firePropertyChange("defaultDownSamplingFunction", null, null);
-	}
-	public String getDefaultAggregateFunction() {
-		return defaultAggregateFunction;
-	}
-	public void setDefaultAggregateFunction(String defaultAggregateFunction) {
-		this.defaultAggregateFunction = defaultAggregateFunction;
-		_pcs.firePropertyChange("defaultAggregateFunction", null, null);
-	}
-	public String getAggFunctions() {
-		return aggFunctions;
-	}
-	public void setAggFunctions(String aggFunctions) {
-		this.aggFunctions = aggFunctions;
-		_pcs.firePropertyChange("aggFunctions", null, null);
-	}
-	public String getDownSamplingFunctions() {
-		return downSamplingFunctions;
-	}
-	public void setDownSamplingFunctions(String downSamplingFunctions) {
-		this.downSamplingFunctions = downSamplingFunctions;
-		_pcs.firePropertyChange("downSamplingFunctions", null, null);
-	}
-	public String getResolutions() {
-		return resolutions;
-	}
-	public void setResolutions(String resolutions) {
-		this.resolutions = resolutions;
-		_pcs.firePropertyChange("resolutions", null, null);
-	}
-	public String getDrillDownPaths() {
-		return drillDownPaths;
-	}
-	public void setDrillDownPaths(String drillDownPaths) {
-		this.drillDownPaths = drillDownPaths;
-		_pcs.firePropertyChange("drillDownPaths", null, null);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
deleted file mode 100755
index b0eeaed..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
+++ /dev/null
@@ -1,28 +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.log.entity;
-
-import java.util.Map;
-
-public interface QualifierCreationListener {
-	/**
-	 * Qualifier <b>display name</b> mapped to qualifier value in bytes[]
-	 *
-	 * @param qualifiers
-	 */
-	public void qualifierCreated(Map<String, byte[]> qualifiers);
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierNotDefinedException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierNotDefinedException.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierNotDefinedException.java
deleted file mode 100644
index 88135bb..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierNotDefinedException.java
+++ /dev/null
@@ -1,28 +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.log.entity;
-
-public class QualifierNotDefinedException extends Exception{
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	public QualifierNotDefinedException(String message){
-		super(message);
-	}
-}



[06/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfigFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfigFactory.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfigFactory.java
deleted file mode 100644
index 71f19aa..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfigFactory.java
+++ /dev/null
@@ -1,57 +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.jdbc.conn;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.storage.jdbc.JdbcConstants;
-
-/**
- * @since 3/26/15
- */
-public class ConnectionConfigFactory {
-    /**
-     * Read connection config from config.properties
-     *
-     * @return
-     */
-    public static ConnectionConfig getFromEagleConfig(){
-        String username = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_DB_USERNAME);
-        String password = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_DB_PASSWORD);
-        String connUrl = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_CONN_URL);
-        String connProps = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_CONN_PROPS);
-        String adapter = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_ADAPTER);
-        String databaseName = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_DATABASE);
-        String driverClass = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_DRIVER_CLASS);
-        String connMaxSize = EagleConfigFactory.load().getConfig().getString(JdbcConstants.EAGLE_CONN_MAX_SIZE);
-
-        ConnectionConfig config = new ConnectionConfig();
-        if(username != null) config.setUserName(username);
-        if(password != null)config.setPassword(password);
-        if(connUrl != null) config.setConnectionUrl(connUrl);
-        if(connProps!=null) config.setConnectionProperties(connProps);
-        if(adapter!=null) config.setAdapter(adapter);
-        if(databaseName!=null) config.setDatabaseName(databaseName);
-        if(driverClass!=null) config.setDriverClassName(driverClass);
-
-
-        if(connMaxSize!=null){
-            config.setConnectionMaxActive(Integer.parseInt(connMaxSize));
-        }
-
-        return config;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManager.java
deleted file mode 100644
index 4472542..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManager.java
+++ /dev/null
@@ -1,69 +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.jdbc.conn;
-
-import java.sql.Connection;
-
-/**
- * @since 3/27/15
- */
-public interface ConnectionManager {
-    /**
-     *
-     * @param config
-     * @throws Exception
-     */
-    void init(ConnectionConfig config) throws Exception;
-
-    ConnectionConfig getConfig();
-
-    /**
-     *
-     * @return
-     * @throws Exception
-     */
-    Connection getConnection() throws Exception;
-
-    /**
-     * Get default database StatementExecutor
-     *
-     * @return StatementExecutor implementation
-     */
-    <T extends StatementExecutor> T getStatementExecutor();
-
-    /**
-     * Get default database StatementExecutor
-     *
-     * @return StatementExecutor implementation
-     */
-    <T extends StatementExecutor> T getStatementExecutor(String tableName);
-
-    /**
-     *
-     * @param connection
-     * @throws Exception
-     */
-    void close(Connection connection) throws Exception;
-
-    /**
-     *
-     * @throws Exception
-     */
-    void shutdown() throws Exception;
-
-    boolean isClosed();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManagerFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManagerFactory.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManagerFactory.java
deleted file mode 100644
index 089ca60..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionManagerFactory.java
+++ /dev/null
@@ -1,75 +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.jdbc.conn;
-
-import org.apache.eagle.storage.jdbc.conn.impl.TorqueConnectionManagerImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @since 3/27/15
- */
-public class ConnectionManagerFactory {
-	private final static Logger LOG = LoggerFactory.getLogger(ConnectionManagerFactory.class);
-    private static ConnectionManager instance;
-    private static volatile boolean initialized; 
-    private final static Object lock = new Object();
-    
-    private static void initialize(ConnectionConfig config) throws Exception{
-    	instance = new TorqueConnectionManagerImpl();
-        LOG.info("Created new connection manager instance "+instance);
-        LOG.info("Initializing connection manager");
-        instance.init(config);
-        Runtime.getRuntime().addShutdownHook(new ConnectionManagerShutdownHook(instance));
-        if(LOG.isDebugEnabled()) LOG.debug("Registered connection manager shutdown hook");
-    }
-
-    /**
-     * Get instance from eagle configuration
-     *
-     * @return
-     */
-    public static ConnectionManager getInstance() throws Exception {
-    	if(!initialized){
-    		synchronized(lock){
-    			if(!initialized){
-    				initialize(ConnectionConfigFactory.getFromEagleConfig());
-    				initialized = true;
-    			}
-    		}
-    	}
-    	return instance;
-    }
-
-    private static class ConnectionManagerShutdownHook extends Thread{
-        private final ConnectionManager connectionManager;
-
-        ConnectionManagerShutdownHook(ConnectionManager connectionManager){
-            this.connectionManager = connectionManager;
-        }
-
-        @Override
-        public void run() {
-            LOG.info("Shutting down");
-            try {
-                this.connectionManager.shutdown();
-            } catch (Exception e) {
-                LOG.error(e.getMessage(),e);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/PrimaryKeyBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/PrimaryKeyBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/PrimaryKeyBuilder.java
deleted file mode 100644
index 2e6829b..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/PrimaryKeyBuilder.java
+++ /dev/null
@@ -1,32 +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.jdbc.conn;
-
-/**
- * Primary key builder
- *
- * @since 3/29/15
- */
-public interface PrimaryKeyBuilder<K> {
-    /**
-     *
-     * @param t entity instance
-     * @param <T> entity type
-     * @return primary in type of K
-     */
-    <T> K build(T t);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/StatementExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/StatementExecutor.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/StatementExecutor.java
deleted file mode 100644
index 7edfdb9..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/StatementExecutor.java
+++ /dev/null
@@ -1,43 +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.jdbc.conn;
-
-/**
- * An interface for abstract StatementExecutor from detailed implementation
- *
- * @since 3/29/15
- */
-public interface StatementExecutor {
-    /**
-     * Initialize statement for action like SELECT
-     *
-     * @param config
-     */
-    void init(ConnectionConfig config);
-
-    /**
-     * Initialize statement for action like CREATE, UPDATE, DELETE which need table name
-     *
-     * @param config connection config
-     * @param tableName
-     */
-    void init(ConnectionConfig config,String tableName);
-    /**
-     * @return customized primary key builder if no built-in primary key generation method like auto-increment and so on.
-     */
-    PrimaryKeyBuilder<String> getPrimaryKeyBuilder();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueConnectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueConnectionManagerImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueConnectionManagerImpl.java
deleted file mode 100644
index 42e851b..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueConnectionManagerImpl.java
+++ /dev/null
@@ -1,142 +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.jdbc.conn.impl;
-
-import org.apache.eagle.storage.jdbc.JdbcConstants;
-import org.apache.eagle.storage.jdbc.conn.ConnectionConfig;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManager;
-import org.apache.commons.configuration.BaseConfiguration;
-import org.apache.commons.configuration.Configuration;
-import org.apache.torque.Torque;
-import org.apache.torque.TorqueException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-
-/**
- * @since 3/27/15
- */
-public class TorqueConnectionManagerImpl implements ConnectionManager {
-    private final static Logger LOG = LoggerFactory.getLogger(TorqueConnectionManagerImpl.class);
-    public final static String DEFAULT_DATA_SOURCE_FACTORY_CLASS = "org.apache.torque.dsfactory.SharedPoolDataSourceFactory";
-
-    private ConnectionConfig config;
-
-    @Override
-    public void init(ConnectionConfig config) throws Exception {
-        if(this.config != null) LOG.warn("Resetting config");
-        this.config = config;
-
-        if(!Torque.isInit()) {
-            try {
-                if(LOG.isDebugEnabled()) LOG.debug("Apache Torque initializing");
-                Torque.init(buildConfiguration(config));
-            } catch (TorqueException e) {
-                throw new Exception(e);
-            }
-        }else{
-            LOG.warn("Apache Torque has already been initialized, ignore");
-        }
-    }
-
-    @Override
-    public ConnectionConfig getConfig() {
-        return this.config;
-    }
-
-    @Override
-    public Connection getConnection() throws Exception {
-        try {
-            return Torque.getConnection();
-        } catch (TorqueException e) {
-            LOG.error("Failed to get connection",e);
-            throw new Exception(e);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public TorqueStatementPeerImpl getStatementExecutor() {
-        TorqueStatementPeerImpl statementPeer = new TorqueStatementPeerImpl();
-        statementPeer.init(this.getConfig());
-        return statementPeer;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public TorqueStatementPeerImpl getStatementExecutor(String tableName) {
-        TorqueStatementPeerImpl statementPeer = new TorqueStatementPeerImpl();
-        statementPeer.init(this.getConfig(),tableName);
-        return statementPeer;
-    }
-
-    @Override
-    public void close(Connection connection) {
-        Torque.closeConnection(connection);
-    }
-
-    @Override
-    public void shutdown() throws Exception {
-        Torque.shutdown();
-    }
-
-    @Override
-    public boolean isClosed() {
-        return !Torque.isInit();
-    }
-
-    /**
-     * http://db.apache.org/torque/torque-4.0/documentation/orm-reference/initialisation-configuration.html
-     * http://commons.apache.org/proper/commons-dbcp/configuration.html
-     *
-     * @param config
-     * @return
-     */
-    private Configuration buildConfiguration(ConnectionConfig config){
-        Configuration configuration = new BaseConfiguration();
-
-
-        String databaseName = config.getDatabaseName();
-        if(databaseName==null){
-            LOG.warn(JdbcConstants.EAGLE_DATABASE+" is null, trying default database name as: eagle");
-            databaseName = "eagle";
-        }
-
-        LOG.info("Using default database: "+databaseName+" (adapter: "+config.getAdapter()+")");
-
-        configuration.addProperty("torque.database.default",config.getDatabaseName());
-
-        // This factory uses the SharedDataSource available in the commons-dbcp package
-        configuration.addProperty(String.format("torque.dsfactory.%s.factory",databaseName), DEFAULT_DATA_SOURCE_FACTORY_CLASS);
-
-        // mysql, oracle, ...
-        configuration.addProperty(String.format("torque.database.%s.adapter",databaseName),config.getAdapter());
-
-        // "org.gjt.mm.mysql.Driver"
-        configuration.addProperty(String.format("torque.dsfactory.%s.connection.driver",databaseName),config.getDriverClassName());
-
-        configuration.addProperty(String.format("torque.dsfactory.%s.connection.url",databaseName),config.getConnectionUrl());
-        configuration.addProperty(String.format("torque.dsfactory.%s.connection.user",databaseName),config.getUserName());
-        configuration.addProperty(String.format("torque.dsfactory.%s.connection.password",databaseName),config.getPassword());
-        configuration.addProperty(String.format("torque.dsfactory.%s.pool.maxActive",databaseName),Integer.toString(config.getConnectionMaxActive()));
-//        configuration.addProperty(String.format("torque.dsfactory.%s.pool.minIdle",databaseName),Integer.toString(config.getConnectionMinIdle()));
-//        configuration.addProperty(String.format("torque.dsfactory.%s.pool.initialSize",databaseName),Integer.toString(config.getConnectionInitialSize()));
-
-        return configuration;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueStatementPeerImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueStatementPeerImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueStatementPeerImpl.java
deleted file mode 100644
index 69e1192..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/TorqueStatementPeerImpl.java
+++ /dev/null
@@ -1,57 +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.jdbc.conn.impl;
-
-import org.apache.eagle.storage.jdbc.conn.ConnectionConfig;
-import org.apache.eagle.storage.jdbc.conn.PrimaryKeyBuilder;
-import org.apache.eagle.storage.jdbc.conn.StatementExecutor;
-import org.apache.torque.adapter.IDMethod;
-import org.apache.torque.map.TableMap;
-import org.apache.torque.util.BasePeerImpl;
-
-/**
- * @since 3/29/15
- */
-public class TorqueStatementPeerImpl<T> implements StatementExecutor {
-    private BasePeerImpl<T> basePeer;
-    public TorqueStatementPeerImpl(){
-        this.basePeer = new BasePeerImpl<T>();
-    }
-
-    @Override
-    public void init(ConnectionConfig config) {
-        this.basePeer.setDatabaseName(config.getDatabaseName());
-    }
-
-    @Override
-    public void init(ConnectionConfig config, String tableName) {
-        this.basePeer.setDatabaseName(config.getDatabaseName());
-        TableMap tableMap = new TableMap(tableName,null,null);
-        tableMap.setPrimaryKeyMethodInfo(IDMethod.NO_ID_METHOD);
-        this.basePeer.setTableMap(tableMap);
-    }
-
-    private static PrimaryKeyBuilder<String> _primaryKeyBuilderInstance = new UUIDPrimaryKeyBuilder();;
-    @Override
-    public PrimaryKeyBuilder<String> getPrimaryKeyBuilder() {
-        return _primaryKeyBuilderInstance;
-    }
-
-    public BasePeerImpl<T> delegate(){
-        return this.basePeer;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/UUIDPrimaryKeyBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/UUIDPrimaryKeyBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/UUIDPrimaryKeyBuilder.java
deleted file mode 100644
index 74bde6b..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/impl/UUIDPrimaryKeyBuilder.java
+++ /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.
- */
-package org.apache.eagle.storage.jdbc.conn.impl;
-
-import org.apache.eagle.storage.jdbc.conn.PrimaryKeyBuilder;
-
-import java.util.UUID;
-
-/**
- * @since 3/29/15
- */
-public class UUIDPrimaryKeyBuilder implements PrimaryKeyBuilder<String> {
-    @Override
-    public <T> String build(T t) {
-        return UUID.randomUUID().toString();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriteriaBuilder.java
deleted file mode 100644
index f8db26a..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriteriaBuilder.java
+++ /dev/null
@@ -1,26 +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.jdbc.criteria;
-
-import org.apache.torque.criteria.Criteria;
-
-/**
- * @since 3/27/15
- */
-public interface CriteriaBuilder {
-    Criteria build();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriterionBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriterionBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriterionBuilder.java
deleted file mode 100644
index a5347a9..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/CriterionBuilder.java
+++ /dev/null
@@ -1,26 +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.jdbc.criteria;
-
-import org.apache.torque.criteria.Criterion;
-
-/**
- * @since 3/27/15
- */
-public interface CriterionBuilder {
-    Criterion build();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/ExpressionCriterionBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/ExpressionCriterionBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/ExpressionCriterionBuilder.java
deleted file mode 100644
index ec92849..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/ExpressionCriterionBuilder.java
+++ /dev/null
@@ -1,119 +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.jdbc.criteria.impl;
-
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-import org.apache.eagle.storage.jdbc.criteria.CriterionBuilder;
-import org.apache.eagle.query.parser.*;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.criteria.Criterion;
-import org.apache.torque.criteria.SqlEnum;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-
-/**
- * @since 3/27/15
- */
-public class ExpressionCriterionBuilder implements CriterionBuilder {
-    private final String tableName;
-    private final ORExpression expression;
-
-    public ExpressionCriterionBuilder(ORExpression expression,String tableName) {
-        this.expression = expression;
-        this.tableName = tableName;
-    }
-
-    @Override
-    public Criterion build() {
-        Criterion orCriterion = null;
-        for(ANDExpression andExpression:expression.getANDExprList()){
-            Criterion andCriterion = null;
-            for(AtomicExpression atomicExpression : andExpression.getAtomicExprList()){
-                Criterion atomicCriterion = toAtomicCriterion(atomicExpression);
-                if(andCriterion == null){
-                    andCriterion = atomicCriterion;
-                }else{
-                    andCriterion = andCriterion.and(atomicCriterion);
-                }
-            }
-
-            if(andCriterion!=null){
-                if(orCriterion == null){
-                    orCriterion = andCriterion;
-                }else{
-                    orCriterion = orCriterion.or(andCriterion);
-                }
-            }
-        }
-        return orCriterion;
-    }
-
-    private Criterion toAtomicCriterion(AtomicExpression atomic){
-        Object left = toColumn(atomic.getKeyType(), atomic.getKey(),atomic.getOp());
-        Object right = toColumn(atomic.getValueType(), atomic.getValue(),atomic.getOp());
-        SqlEnum op = toSqlEnum(atomic.getOp());
-        return new Criterion(left,right,op);
-    }
-
-    private Object toColumn(TokenType tokenType,String value,ComparisonOperator op){
-        if(op.equals(ComparisonOperator.CONTAINS) && tokenType.equals(TokenType.STRING)){
-            return "%"+value+"%";
-        }else if(tokenType.equals(TokenType.ID)){
-            return new ColumnImpl(this.tableName,parseEntityAttribute(value));
-        }else if(!tokenType.equals(TokenType.ID) && op.equals(ComparisonOperator.IN)){
-            return EntityQualifierUtils.parseList(value);
-        }else if(tokenType.equals(TokenType.NUMBER)){
-            // TODO: currently only treat all number value as double
-            return Double.parseDouble(value);
-        }else{
-            // TODO: parse type according entity field type
-            return value;
-        }
-    }
-
-    private SqlEnum toSqlEnum(ComparisonOperator op){
-        SqlEnum sqlEnum = _opSqlEnum.get(op);
-        if(sqlEnum == null){
-            throw new IllegalArgumentException("Failed to convert ComparisonOperator:"+op+" to SqlEnum");
-        }
-        return sqlEnum;
-    }
-
-    private static String parseEntityAttribute(String fieldName){
-        Matcher m = TokenConstant.ID_PATTERN.matcher(fieldName);
-        if(m.find()){
-            return m.group(1);
-        }
-        return fieldName;
-    }
-
-    private final static Map<ComparisonOperator,SqlEnum> _opSqlEnum = new HashMap<ComparisonOperator,SqlEnum>();
-    static{
-        _opSqlEnum.put(ComparisonOperator.CONTAINS, SqlEnum.LIKE);
-        _opSqlEnum.put(ComparisonOperator.EQUAL, SqlEnum.EQUAL);
-        _opSqlEnum.put(ComparisonOperator.GREATER, SqlEnum.GREATER_THAN);
-        _opSqlEnum.put(ComparisonOperator.GREATER_OR_EQUAL, SqlEnum.GREATER_EQUAL);
-        _opSqlEnum.put(ComparisonOperator.IN, SqlEnum.IN);
-        _opSqlEnum.put(ComparisonOperator.IS, SqlEnum.EQUAL);
-        _opSqlEnum.put(ComparisonOperator.IS_NOT, SqlEnum.NOT_EQUAL);
-        _opSqlEnum.put(ComparisonOperator.LESS, SqlEnum.LESS_THAN);
-        _opSqlEnum.put(ComparisonOperator.LESS_OR_EQUAL, SqlEnum.LESS_EQUAL);
-        _opSqlEnum.put(ComparisonOperator.LIKE, SqlEnum.LIKE);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/PrimaryKeyCriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/PrimaryKeyCriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/PrimaryKeyCriteriaBuilder.java
deleted file mode 100644
index 4683cf0..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/PrimaryKeyCriteriaBuilder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.criteria.impl;
-
-import org.apache.eagle.storage.jdbc.JdbcConstants;
-import org.apache.eagle.storage.jdbc.criteria.CriteriaBuilder;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.criteria.Criterion;
-import org.apache.torque.criteria.SqlEnum;
-
-import java.util.List;
-
-/**
- * @since 3/30/15
- */
-public class PrimaryKeyCriteriaBuilder implements CriteriaBuilder {
-    private final List<String> keys;
-    private final String tableName;
-
-    public PrimaryKeyCriteriaBuilder(List<String> keys,String tableName){
-        this.keys = keys;
-        this.tableName = tableName;
-    }
-
-    @Override
-    public Criteria build() {
-        Criteria root = new Criteria();
-        for(String key:keys){
-            root = root.or(new Criterion(new ColumnImpl(this.tableName, JdbcConstants.ROW_KEY_COLUMN_NAME),key, SqlEnum.EQUAL));
-        }
-        return root;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
deleted file mode 100644
index 4d590de..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/criteria/impl/QueryCriteriaBuilder.java
+++ /dev/null
@@ -1,115 +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.jdbc.criteria.impl;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.parser.ORExpression;
-import org.apache.eagle.storage.jdbc.criteria.CriteriaBuilder;
-import org.apache.eagle.storage.jdbc.criteria.CriterionBuilder;
-import org.apache.eagle.storage.jdbc.JdbcConstants;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.criteria.Criterion;
-import org.apache.torque.criteria.SqlEnum;
-
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public class QueryCriteriaBuilder implements CriteriaBuilder {
-
-    private final CompiledQuery query;
-    private final String tableName;
-
-    public QueryCriteriaBuilder(CompiledQuery query, String tableName){
-        this.query = query;
-        this.tableName = tableName;
-    }
-
-    @Override
-    public Criteria build() {
-        Criteria root = new Criteria();
-        SearchCondition searchCondition = query.getSearchCondition();
-
-        // SELECT
-        if(query.isHasAgg()){
-            List<String> aggFields = query.getAggregateFields();
-            List<AggregateFunctionType> aggFuncs = query.getAggregateFunctionTypes();
-            for(int i=0;i<aggFuncs.size();i++){
-                AggregateFunctionType aggFunc = aggFuncs.get(i);
-                String aggField = aggFields.get(i);
-                if(aggFunc.equals(AggregateFunctionType.count)){
-                    root.addSelectColumn(new ColumnImpl(aggFunc.name()+"(*)"));
-                }else{
-                    root.addSelectColumn(new ColumnImpl(String.format("%s(%s.%s)",aggFunc.name(),this.tableName,aggField)));
-                }
-            }
-        } else if(searchCondition.isOutputAll()){
-            // SELECT *
-            root.addSelectColumn(new ColumnImpl(this.tableName, "*"));
-        }else{
-            // SELECT $outputFields
-            List<String> outputFields = searchCondition.getOutputFields();
-            for(String field:outputFields) {
-                root.addSelectColumn(new ColumnImpl(this.tableName, field));
-            }
-            if(!outputFields.contains(JdbcConstants.ROW_KEY_COLUMN_NAME)) {
-                root.addSelectColumn(new ColumnImpl(this.tableName, JdbcConstants.ROW_KEY_COLUMN_NAME));
-            }
-            if(!outputFields.contains(JdbcConstants.TIMESTAMP_COLUMN_NAME)) {
-                root.addSelectColumn(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME));
-            }
-        }
-
-        // FROM $tableName
-        root.addFrom(this.tableName);
-
-        // WHERE timestamp in time range
-        Criterion where = new Criterion(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME),query.getStartTime(), SqlEnum.GREATER_EQUAL)
-                        .and(new Criterion(new ColumnImpl(this.tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME),query.getEndTime(), SqlEnum.LESS_THAN));
-        ORExpression expression = searchCondition.getQueryExpression();
-        if(expression!=null){
-            CriterionBuilder criterionBuilder = new ExpressionCriterionBuilder(expression,tableName);
-            where = where.and(criterionBuilder.build());
-        }
-
-        // AND metricName = "metric.name.value"
-        if(query.getServiceName().equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-            where = where.and(new Criterion(new ColumnImpl(this.tableName, JdbcConstants.METRIC_NAME_COLUMN_NAME),this.query.getRawQuery().getMetricName(),SqlEnum.EQUAL));
-        }
-
-        root.where(where);
-
-        // LIMITED BY $pageSize
-        root.setLimit((int) searchCondition.getPageSize());
-
-        // TODO: GROUP BY
-        if(query.isHasAgg()){
-            for(String groupByField:query.getGroupByFields()){
-                root.addGroupByColumn(new ColumnImpl(this.tableName,groupByField));
-            }
-        }
-
-        // TODO: ORDER BY
-
-        return root;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityDeleter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityDeleter.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityDeleter.java
deleted file mode 100644
index 56cd0bf..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityDeleter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.storage.operation.CompiledQuery;
-
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public interface JdbcEntityDeleter<E extends TaggedLogAPIEntity> {
-    /**
-     *
-     * @param entities
-     * @return
-     */
-    public int delete(List<E> entities) throws Exception;
-
-    /**
-     *
-     * @param ids
-     * @return
-     */
-    public int deleteByIds(List<String> ids)  throws Exception;
-
-    /**
-     *
-     * @param query
-     * @return
-     */
-    public int deleteByQuery(CompiledQuery query) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityReader.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityReader.java
deleted file mode 100644
index 8e85ebf..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityReader.java
+++ /dev/null
@@ -1,49 +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.jdbc.entity;
-
-import org.apache.eagle.storage.operation.CompiledQuery;
-
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public interface JdbcEntityReader {
-    /**
-     *
-     * @param query query
-     * @param <E> entity type
-     * @return result entities list
-     * @throws Exception
-     */
-    public <E extends Object> List<E> query(CompiledQuery query) throws Exception;
-
-    public <E extends Object> List<E> query(List<String> pk) throws Exception;
-
-    /**
-     *
-     * @return firstTimestamp
-     */
-    public Long getResultFirstTimestamp();
-
-    /**
-     *
-     * @return lastTimeStamp
-     */
-    public Long getResultLastTimestamp();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntitySerDeserHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntitySerDeserHelper.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntitySerDeserHelper.java
deleted file mode 100644
index 651ee19..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntitySerDeserHelper.java
+++ /dev/null
@@ -1,220 +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.jdbc.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.storage.jdbc.JdbcConstants;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinitionManager;
-import org.apache.eagle.storage.jdbc.schema.serializer.JdbcSerDeser;
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.util.ColumnValues;
-import org.apache.torque.util.JdbcTypedValue;
-
-import java.beans.PropertyDescriptor;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @since 3/26/15
- */
-public class JdbcEntitySerDeserHelper {
-    /**
-     *
-     * @param row
-     * @param entityDefinition
-     * @param <E>
-     * @return
-     * @throws IllegalAccessException
-     * @throws InstantiationException
-     * @throws InvocationTargetException
-     * @throws NoSuchMethodException
-     */
-    public static <E extends TaggedLogAPIEntity> E buildEntity(Map<String, Object> row, JdbcEntityDefinition entityDefinition) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException {
-        EntityDefinition ed = entityDefinition.getInternal();
-
-        Class<? extends TaggedLogAPIEntity> clazz = ed.getEntityClass();
-        if(clazz == null){
-            throw new NullPointerException("Entity class of service "+ed.getService()+" is null");
-        }
-
-        TaggedLogAPIEntity obj = clazz.newInstance();
-        Map<String, Qualifier> map = ed.getDisplayNameMap();
-        for(Map.Entry<String, Object> entry : row.entrySet()){
-            // timestamp;
-            if(JdbcConstants.TIMESTAMP_COLUMN_NAME.equals(entry.getKey())){
-                obj.setTimestamp((Long) entry.getValue());
-                continue;
-            }
-
-            // set metric as prefix for generic metric
-            if(entityDefinition.getInternal().getService().equals(GenericMetricEntity.GENERIC_METRIC_SERVICE) &&
-                    JdbcConstants.METRIC_NAME_COLUMN_NAME.equals(entry.getKey())){
-                obj.setPrefix((String) entry.getValue());
-                continue;
-            }
-
-            // rowkey: uuid
-            if(JdbcConstants.ROW_KEY_COLUMN_NAME.equals(entry.getKey())){
-                obj.setEncodedRowkey((String) entry.getValue());
-                continue;
-            }
-
-            Qualifier q = map.get(entry.getKey().toLowerCase());
-            if(q == null){
-                // if it's not pre-defined qualifier, it must be tag unless it's a bug
-                if(obj.getTags() == null){
-                    obj.setTags(new HashMap<String, String>());
-                }
-                obj.getTags().put(entry.getKey(), (String) entry.getValue());
-                continue;
-            }
-
-            // parse different types of qualifiers
-            String fieldName = q.getDisplayName();
-            // PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(obj, fieldName);
-            PropertyDescriptor pd = getPropertyDescriptor(obj,fieldName);
-            if(entry.getValue() != null){
-                pd.getWriteMethod().invoke(obj, entry.getValue());
-            }
-        }
-
-        if(!entityDefinition.getInternal().getService().equals(GenericMetricEntity.GENERIC_METRIC_SERVICE) ){
-            obj.setPrefix(entityDefinition.getInternal().getPrefix());
-        }
-        return (E)obj;
-    }
-
-    private final static Map<String,PropertyDescriptor> _propertyDescriptorCache = new HashMap<String, PropertyDescriptor>();
-
-    /**
-     *
-     * @param obj
-     * @param fieldName
-     * @return
-     * @throws IllegalAccessException
-     * @throws NoSuchMethodException
-     * @throws InvocationTargetException
-     */
-    public static PropertyDescriptor getPropertyDescriptor(Object obj,String fieldName) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
-        String key = obj.getClass().getName()+"."+fieldName;
-        PropertyDescriptor propertyDescriptor = _propertyDescriptorCache.get(key);
-        if(propertyDescriptor ==null){
-            propertyDescriptor = PropertyUtils.getPropertyDescriptor(obj, fieldName);
-            _propertyDescriptorCache.put(key,propertyDescriptor);
-        }
-        return propertyDescriptor;
-    }
-
-    /**
-     *
-     * @param resultSet
-     * @param entityDefinition
-     * @param <E>
-     * @return
-     * @throws IOException
-     * @throws SQLException
-     * @throws InvocationTargetException
-     * @throws NoSuchMethodException
-     * @throws InstantiationException
-     * @throws IllegalAccessException
-     */
-    public static <E extends TaggedLogAPIEntity> E readEntity(ResultSet resultSet, JdbcEntityDefinition entityDefinition) throws IOException, SQLException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
-        return buildEntity(readInternal(resultSet, entityDefinition), entityDefinition);
-    }
-
-    /**
-     *
-     * @param resultSet
-     * @param entityDefinition
-     * @return
-     * @throws SQLException
-     * @throws IOException
-     */
-    public static Map<String,Object> readInternal(ResultSet resultSet, JdbcEntityDefinition entityDefinition) throws SQLException, IOException {
-        ResultSetMetaData metadata = resultSet.getMetaData();
-        int columnCount = metadata.getColumnCount();
-        Map<String,Object> row = new HashMap<String, Object>();
-        for (int i = 1; i <= columnCount; i++) {
-            String columnName = metadata.getColumnName(i);
-            JdbcSerDeser serDeser = entityDefinition.getJdbcSerDeser(columnName);
-            if(serDeser==null){
-                throw new IOException("SQLSerDeser for column: "+columnName+" is null");
-            }
-            Object value = serDeser.readValue(resultSet, columnName, entityDefinition);
-            row.put(columnName,value);
-        }
-        return row;
-    }
-
-    /**
-     *
-     * @param entity
-     * @param jdbcEntityDefinition
-     * @param <E>
-     * @return
-     * @throws InvocationTargetException
-     * @throws IllegalAccessException
-     */
-    public static <E extends TaggedLogAPIEntity> ColumnValues buildColumnValues(E entity, JdbcEntityDefinition jdbcEntityDefinition) throws InvocationTargetException, IllegalAccessException {
-        String tableName = jdbcEntityDefinition.getJdbcTableName();
-        ColumnValues columnValues = new ColumnValues();
-
-        if(jdbcEntityDefinition.isGenericMetric()){
-            columnValues.put(new ColumnImpl(tableName, JdbcConstants.METRIC_NAME_COLUMN_NAME),new JdbcTypedValue(entity.getPrefix(), Types.VARCHAR));
-        }
-
-        columnValues.put(new ColumnImpl(tableName, JdbcConstants.ROW_KEY_COLUMN_NAME),new JdbcTypedValue(entity.getEncodedRowkey(), Types.VARCHAR));
-        columnValues.put(new ColumnImpl(tableName, JdbcConstants.TIMESTAMP_COLUMN_NAME),new JdbcTypedValue(entity.getTimestamp(), Types.BIGINT));
-
-        // qualifier fields
-        Map<String,Qualifier> displayQualifier = jdbcEntityDefinition.getInternal().getDisplayNameMap();
-        Map<String,Method> getMethods = jdbcEntityDefinition.getInternal().getQualifierGetterMap();
-        for(Map.Entry<String,Qualifier> entry:displayQualifier.entrySet()){
-            String displayName = entry.getKey();
-
-            Qualifier qualifier = entry.getValue();
-//            String qualifierName = qualifier.getQualifierName();
-            Method getMethod = getMethods.get(displayName);
-            Object fieldValue = getMethod.invoke(entity);
-
-            Class<?> fieldType = qualifier.getSerDeser().type();
-            JdbcSerDeser jdbcSerDeser = JdbcEntityDefinitionManager.getJdbcSerDeser(fieldType);
-            JdbcTypedValue jdbcTypedValue = jdbcSerDeser.getJdbcTypedValue(fieldValue, fieldType);
-            columnValues.put(new ColumnImpl(tableName,displayName),jdbcTypedValue);
-        }
-
-        // tag fields
-        if(entity.getTags()!=null) {
-            for (Map.Entry<String, String> tag : entity.getTags().entrySet()) {
-                columnValues.put(new ColumnImpl(tableName, tag.getKey()), new JdbcTypedValue(tag.getValue(), Types.VARCHAR));
-            }
-        }
-        return columnValues;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityUpdater.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityUpdater.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityUpdater.java
deleted file mode 100644
index f844d11..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityUpdater.java
+++ /dev/null
@@ -1,34 +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.jdbc.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public interface JdbcEntityUpdater<E extends TaggedLogAPIEntity> {
-    /**
-     *
-     * @param entities
-     * @return
-     * @throws Exception
-     */
-    public int update(List<E> entities) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityWriter.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityWriter.java
deleted file mode 100644
index 072174e..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/JdbcEntityWriter.java
+++ /dev/null
@@ -1,37 +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.jdbc.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public interface JdbcEntityWriter<E extends TaggedLogAPIEntity> {
-    /**
-     * <h2>Consistency Guarantee</h2>
-     *
-     * Rollback all changes if any single entity throws exception to make sure consistency guarantee
-     *
-     * @param entities entities to write
-     * @return primary keys' list
-     * @throws Exception
-     */
-    public List<String> write(List<E> entities) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/AggreagteRecordMapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/AggreagteRecordMapper.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/AggreagteRecordMapper.java
deleted file mode 100644
index 6dffd9f..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/AggreagteRecordMapper.java
+++ /dev/null
@@ -1,56 +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.jdbc.entity.impl;
-
-import org.apache.eagle.storage.jdbc.entity.JdbcEntitySerDeserHelper;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.torque.TorqueException;
-import org.apache.torque.criteria.CriteriaInterface;
-import org.apache.torque.om.mapper.RecordMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Map;
-
-/**
- * @since 3/27/15
- */
-public class AggreagteRecordMapper implements RecordMapper<Map> {
-    private final static Logger LOG = LoggerFactory.getLogger(AggreagteRecordMapper.class);
-    private final JdbcEntityDefinition jdbcEntityDefinition;
-
-    public AggreagteRecordMapper(CompiledQuery query, JdbcEntityDefinition jdbcEntityDefinition) {
-        this.jdbcEntityDefinition = jdbcEntityDefinition;
-    }
-
-    @Override
-    public Map processRow(ResultSet resultSet, int rowOffset, CriteriaInterface<?> criteria) throws TorqueException {
-        try {
-            return JdbcEntitySerDeserHelper.readInternal(resultSet, this.jdbcEntityDefinition);
-        } catch (SQLException e) {
-            LOG.error("Failed to read result set",e);
-            throw new TorqueException(e);
-        } catch (IOException e) {
-            LOG.error("Failed to read result set",e);
-            throw new TorqueException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/EntityRecordMapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/EntityRecordMapper.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/EntityRecordMapper.java
deleted file mode 100644
index 553f90b..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/EntityRecordMapper.java
+++ /dev/null
@@ -1,51 +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.jdbc.entity.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntitySerDeserHelper;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.torque.TorqueException;
-import org.apache.torque.criteria.CriteriaInterface;
-import org.apache.torque.om.mapper.RecordMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.ResultSet;
-
-/**
- * @since 3/27/15
- */
-public class EntityRecordMapper<E extends TaggedLogAPIEntity> implements RecordMapper<E> {
-    private final static Logger LOG = LoggerFactory.getLogger(EntityRecordMapper.class);
-
-    private final JdbcEntityDefinition entityDefinition;
-
-    public EntityRecordMapper(JdbcEntityDefinition entityDefinition) {
-        this.entityDefinition = entityDefinition;
-    }
-
-    @Override
-    public E processRow(ResultSet resultSet, int rowOffset, CriteriaInterface<?> criteria) throws TorqueException {
-        try {
-            return JdbcEntitySerDeserHelper.readEntity(resultSet, entityDefinition);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new TorqueException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityDeleterImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityDeleterImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityDeleterImpl.java
deleted file mode 100644
index 35e1078..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityDeleterImpl.java
+++ /dev/null
@@ -1,87 +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.jdbc.entity.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.conn.impl.TorqueStatementPeerImpl;
-import org.apache.eagle.storage.jdbc.criteria.impl.PrimaryKeyCriteriaBuilder;
-import org.apache.eagle.storage.jdbc.criteria.impl.QueryCriteriaBuilder;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityDeleter;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.sql.SqlBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public class JdbcEntityDeleterImpl<E extends TaggedLogAPIEntity> implements JdbcEntityDeleter<E> {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcEntityDeleterImpl.class);
-    private final JdbcEntityDefinition jdbcEntityDefinition;
-    public JdbcEntityDeleterImpl(JdbcEntityDefinition jdbcEntityDefinition) {
-        this.jdbcEntityDefinition = jdbcEntityDefinition;
-    }
-
-    @Override
-    public int delete(List<E> entities) throws Exception {
-        List<String> primaryKeys = new LinkedList<String>();
-        for(E e:entities){
-            primaryKeys.add(e.getEncodedRowkey());
-        }
-        return deleteByIds(primaryKeys);
-    }
-
-    @Override
-    public int deleteByIds(List<String> ids) throws Exception {
-        PrimaryKeyCriteriaBuilder primaryKeyCriteriaBuilder = new PrimaryKeyCriteriaBuilder(ids,this.jdbcEntityDefinition.getJdbcTableName());
-        Criteria criteria = primaryKeyCriteriaBuilder.build();
-        return deleteByCriteria(criteria);
-    }
-
-    @Override
-    public int deleteByQuery(CompiledQuery query) throws Exception {
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,this.jdbcEntityDefinition.getJdbcTableName());
-        Criteria criteria = criteriaBuilder.build();
-        return deleteByCriteria(criteria);
-    }
-
-    private int deleteByCriteria(Criteria criteria) throws Exception {
-        String displaySql = SqlBuilder.buildQuery(criteria).getDisplayString();
-        StopWatch stopWatch = new StopWatch();
-        stopWatch.start();
-
-        if(LOG.isDebugEnabled()) LOG.debug("Deleting by query: " + displaySql);
-        try {
-            TorqueStatementPeerImpl peer = ConnectionManagerFactory.getInstance().getStatementExecutor();
-            int result = peer.delegate().doDelete(criteria);
-            LOG.info(String.format("Deleted %s records in %s ms (sql: %s)",result,stopWatch.getTime(),displaySql));
-            return result;
-        } catch (Exception e) {
-            LOG.error("Failed to delete by query: "+displaySql,e);
-            throw e;
-        } finally {
-            stopWatch.stop();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityReaderImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityReaderImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityReaderImpl.java
deleted file mode 100644
index d0d6a61..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityReaderImpl.java
+++ /dev/null
@@ -1,109 +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.jdbc.entity.impl;
-
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.conn.impl.TorqueStatementPeerImpl;
-import org.apache.eagle.storage.jdbc.criteria.impl.PrimaryKeyCriteriaBuilder;
-import org.apache.eagle.storage.jdbc.criteria.impl.QueryCriteriaBuilder;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityReader;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.om.mapper.RecordMapper;
-import org.apache.torque.sql.SqlBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public class JdbcEntityReaderImpl implements JdbcEntityReader {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcEntityReaderImpl.class);
-    private final JdbcEntityDefinition jdbcEntityDefinition;
-    private long resultFirstTimestamp = 0;
-    private long resultLastTimestamp = 0;
-
-    public JdbcEntityReaderImpl(JdbcEntityDefinition jdbcEntityDefinition) {
-        this.jdbcEntityDefinition = jdbcEntityDefinition;
-    }
-
-    @SuppressWarnings("unchecked")
-    public <E extends Object> List<E> query(CompiledQuery query) throws Exception {
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,this.jdbcEntityDefinition.getJdbcTableName());
-        Criteria criteria = criteriaBuilder.build();
-        String displaySql = SqlBuilder.buildQuery(criteria).getDisplayString();
-
-        if(LOG.isDebugEnabled()) LOG.debug("Querying: " + displaySql);
-
-        RecordMapper<E> recordMapper;
-        if(query.isHasAgg()) {
-            recordMapper = (RecordMapper<E>) new AggreagteRecordMapper(query, jdbcEntityDefinition);
-        }else{
-            recordMapper = new EntityRecordMapper(jdbcEntityDefinition);
-        }
-        final StopWatch stopWatch = new StopWatch();
-        List<E> result;
-        try {
-            stopWatch.start();
-            TorqueStatementPeerImpl peer = ConnectionManagerFactory.getInstance().getStatementExecutor();
-            result = peer.delegate().doSelect(criteria, recordMapper);
-            LOG.info(String.format("Read %s records in %s ms (sql: %s)",result.size(),stopWatch.getTime(),displaySql));
-        }catch (Exception ex){
-            LOG.error("Failed to query by: "+displaySql+", due to: "+ex.getMessage(),ex);
-            throw new IOException("Failed to query by: "+displaySql,ex);
-        }finally {
-            stopWatch.stop();
-        }
-        return result;
-    }
-
-    @Override
-    public <E> List<E> query(List<String> ids) throws Exception {
-        PrimaryKeyCriteriaBuilder criteriaBuilder = new PrimaryKeyCriteriaBuilder(ids,this.jdbcEntityDefinition.getJdbcTableName());
-        Criteria criteria = criteriaBuilder.build();
-        String displaySql = SqlBuilder.buildQuery(criteria).getDisplayString();
-        if(LOG.isDebugEnabled()) LOG.debug("Querying: " + displaySql);
-        EntityRecordMapper recordMapper = new EntityRecordMapper(jdbcEntityDefinition);
-        final StopWatch stopWatch = new StopWatch();
-        List<E> result;
-        try {
-            stopWatch.start();
-            TorqueStatementPeerImpl peer = ConnectionManagerFactory.getInstance().getStatementExecutor();
-            result = peer.delegate().doSelect(criteria, recordMapper);
-            LOG.info(String.format("Read %s records in %s ms (sql: %s)",result.size(),stopWatch.getTime(),displaySql));
-        }catch (Exception ex){
-            LOG.error("Failed to query by: "+displaySql+", due to: "+ex.getMessage(),ex);
-            throw new IOException("Failed to query by: "+displaySql,ex);
-        }finally {
-            stopWatch.stop();
-        }
-        return result;
-    }
-
-    public Long getResultFirstTimestamp() {
-        return resultFirstTimestamp;
-    }
-
-    public Long getResultLastTimestamp() {
-        return resultLastTimestamp;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityUpdaterImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityUpdaterImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityUpdaterImpl.java
deleted file mode 100644
index 6f9bf3d..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityUpdaterImpl.java
+++ /dev/null
@@ -1,82 +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.jdbc.entity.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManager;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.conn.impl.TorqueStatementPeerImpl;
-import org.apache.eagle.storage.jdbc.criteria.impl.PrimaryKeyCriteriaBuilder;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntitySerDeserHelper;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityUpdater;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.sql.SqlBuilder;
-import org.apache.torque.util.ColumnValues;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public class JdbcEntityUpdaterImpl<E extends TaggedLogAPIEntity> implements JdbcEntityUpdater<E> {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcEntityUpdaterImpl.class);
-    private final JdbcEntityDefinition jdbcEntityDefinition;
-
-    public JdbcEntityUpdaterImpl(JdbcEntityDefinition jdbcEntityDefinition) {
-        this.jdbcEntityDefinition = jdbcEntityDefinition;
-    }
-
-    @Override
-    public int update(List<E> entities) throws Exception {
-        ConnectionManager cm = ConnectionManagerFactory.getInstance();
-        TorqueStatementPeerImpl<E> peer = cm.getStatementExecutor(this.jdbcEntityDefinition.getJdbcTableName());
-        Connection connection = cm.getConnection();
-        connection.setAutoCommit(false);
-
-        StopWatch stopWatch = new StopWatch();
-        stopWatch.start();
-        int num = 0;
-        try {
-            for (E entity : entities) {
-                String primaryKey = entity.getEncodedRowkey();
-                PrimaryKeyCriteriaBuilder pkBuilder = new PrimaryKeyCriteriaBuilder(Arrays.asList(primaryKey), this.jdbcEntityDefinition.getJdbcTableName());
-                Criteria selectCriteria = pkBuilder.build();
-                if(LOG.isDebugEnabled()) LOG.debug("Updating by query: "+SqlBuilder.buildQuery(selectCriteria).getDisplayString());
-                ColumnValues columnValues = JdbcEntitySerDeserHelper.buildColumnValues(entity, this.jdbcEntityDefinition);
-                num += peer.delegate().doUpdate(selectCriteria, columnValues, connection);
-            }
-            if(LOG.isDebugEnabled()) LOG.debug("Committing updates");
-            connection.commit();
-        } catch (Exception ex) {
-            LOG.error("Failed to update, rolling back",ex);
-            connection.rollback();
-            throw ex;
-        }finally {
-            stopWatch.stop();
-            if(LOG.isDebugEnabled()) LOG.debug("Closing connection");
-            connection.close();
-        }
-        LOG.info(String.format("Updated %s records in %s ms",num,stopWatch.getTime()));
-        return num;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
deleted file mode 100644
index d1dc9bd..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/impl/JdbcEntityWriterImpl.java
+++ /dev/null
@@ -1,103 +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.jdbc.entity.impl;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManager;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.conn.impl.TorqueStatementPeerImpl;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntitySerDeserHelper;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityWriter;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.torque.om.ObjectKey;
-import org.apache.torque.util.ColumnValues;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @since 3/27/15
- */
-public class JdbcEntityWriterImpl<E extends TaggedLogAPIEntity> implements JdbcEntityWriter<E> {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcEntityWriterImpl.class);
-
-    private ConnectionManager connectionManager;
-    private JdbcEntityDefinition jdbcEntityDefinition;
-
-    public JdbcEntityWriterImpl(JdbcEntityDefinition jdbcEntityDefinition) {
-        this.jdbcEntityDefinition = jdbcEntityDefinition;
-        try {
-            this.connectionManager = ConnectionManagerFactory.getInstance();
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Override
-    public List<String> write(List<E> entities) throws Exception {
-        List<String> keys = new ArrayList<String>();
-        if(LOG.isDebugEnabled()) LOG.debug("Writing "+entities.size()+" entities");
-        StopWatch stopWatch = new StopWatch();
-        stopWatch.start();
-        Connection connection = ConnectionManagerFactory.getInstance().getConnection();
-        // set auto commit false and commit by hands for 3x~5x better performance
-        connection.setAutoCommit(false);
-
-        try {
-            TorqueStatementPeerImpl<E> peer = connectionManager.getStatementExecutor(this.jdbcEntityDefinition.getJdbcTableName());
-            for (E entity : entities) {
-                entity.setEncodedRowkey(peer.getPrimaryKeyBuilder().build(entity));
-                ColumnValues columnValues = JdbcEntitySerDeserHelper.buildColumnValues(entity, this.jdbcEntityDefinition);
-
-                // TODO: implement batch insert for better performance
-                ObjectKey key = peer.delegate().doInsert(columnValues,connection);
-
-                try {
-                    if (key != null) {
-                        keys.add((String) key.getValue());
-                    } else {
-                        keys.add(entity.getEncodedRowkey());
-                    }
-                } catch (ClassCastException ex) {
-                    throw new RuntimeException("Key is not in type of String (VARCHAR) , but JdbcType (java.sql.Types): " + key.getJdbcType() + ", value: " + key.getValue(), ex);
-                }
-            }
-
-            // Why not commit in finally: give up all if any single entity throws exception to make sure consistency guarantee
-            if(LOG.isDebugEnabled()){
-                LOG.debug("Committing writing");
-            }
-            connection.commit();
-        }catch (Exception ex) {
-            LOG.error("Failed to write records, rolling back",ex);
-            connection.rollback();
-            throw ex;
-        }finally {
-            stopWatch.stop();
-            if(LOG.isDebugEnabled()) LOG.debug("Closing connection");
-            connection.close();
-        }
-
-        LOG.info(String.format("Wrote %s records in %s ms (table: %s)",keys.size(),stopWatch.getTime(),this.jdbcEntityDefinition.getJdbcTableName()));
-        return keys;
-    }
-}
\ No newline at end of file


[45/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/tomcat/lib/.keepempty
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/tomcat/lib/.keepempty b/eagle-assembly/src/main/lib/tomcat/lib/.keepempty
deleted file mode 100644
index 823c394..0000000
--- a/eagle-assembly/src/main/lib/tomcat/lib/.keepempty
+++ /dev/null
@@ -1,14 +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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/topology/.placeholder
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/topology/.placeholder b/eagle-assembly/src/main/lib/topology/.placeholder
deleted file mode 100644
index 823c394..0000000
--- a/eagle-assembly/src/main/lib/topology/.placeholder
+++ /dev/null
@@ -1,14 +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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/userprofile/.placeholder
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/userprofile/.placeholder b/eagle-assembly/src/main/lib/userprofile/.placeholder
deleted file mode 100644
index 823c394..0000000
--- a/eagle-assembly/src/main/lib/userprofile/.placeholder
+++ /dev/null
@@ -1,14 +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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/pom.xml b/eagle-core/eagle-alert/eagle-alert-base/pom.xml
deleted file mode 100644
index ce05d83..0000000
--- a/eagle-core/eagle-alert/eagle-alert-base/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-alert-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-alert-base</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-alert-base</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-client-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-policy-base</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	</dependencies>
-</project>
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java b/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
deleted file mode 100644
index faea5be..0000000
--- a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/common/AlertEmailSender.java
+++ /dev/null
@@ -1,159 +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.alert.common;
-
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.alert.email.AlertEmailContext;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.velocity.VelocityContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.alert.email.AlertEmailComponent;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.email.EagleMailClient;
-import com.netflix.config.ConcurrentMapConfiguration;
-import com.typesafe.config.ConfigObject;
-
-public class AlertEmailSender implements Runnable {
-	
-	protected final List<Map<String, String>> alertContexts = new ArrayList<Map<String, String>>();
-	protected final String configFileName;
-	protected final String subject;
-	protected final String sender;
-	protected final String recipents;
-	protected final String cc;
-	protected final String origin;
-	protected boolean sentSuccessfully = false;
-
-	private final static Logger LOG = LoggerFactory.getLogger(AlertEmailSender.class);
-	private final static int MAX_RETRY_COUNT = 3;
-		
-	private static final String MAIL_HOST = "mail.host";	
-	private static final String MAIL_PORT = "mail.smtp.port";
-	private static final String MAIL_DEBUG = "mail.debug";
-	
-	private static final String CONF_KEY_MAIL_HOST = "mailHost";	
-	private static final String CONF_KEY_MAIL_PORT = "mailSmtpPort";
-	private static final String CONF_KEY_MAIL_DEBUG = "mailDebug";
-
-	private ConfigObject eagleProps;
-
-
-    private String threadName;
-	/**
-	 * Derived class may have some additional context properties to add
-	 * @param context velocity context
-	 * @param env environment
-	 */
-	protected void additionalContext(VelocityContext context, String env) {
-		// By default there's no additional context added
-	}
-
-	public AlertEmailSender(AlertEmailContext alertEmail){
-		this.recipents = alertEmail.getRecipients();
-		this.configFileName = alertEmail.getVelocityTplFile();
-		this.subject = alertEmail.getSubject();
-		this.sender = alertEmail.getSender();
-		this.cc = alertEmail.getCc();
-		for(AlertEmailComponent bean : alertEmail.getComponents()){
-			this.alertContexts.add(bean.getAlertContext().getProperties());
-		}
-		String tmp = ManagementFactory.getRuntimeMXBean().getName();
-		this.origin = tmp.split("@")[1] + "(pid:" + tmp.split("@")[0] + ")";
-        threadName = Thread.currentThread().getName();
-		LOG.info("Initialized "+threadName+": origin is : " + this.origin+", recipient of the email: " + this.recipents+", velocity TPL file: " + this.configFileName);
-	}
-
-	public AlertEmailSender(AlertEmailContext alertEmail, ConfigObject eagleProps){
-		this(alertEmail);
-		this.eagleProps = eagleProps;
-	}
-
-	@Override
-	public void run() {
-		int count = 0;
-		boolean success = false;
-		while(count++ < MAX_RETRY_COUNT && !success){
-			LOG.info("Sending email, tried: " + count+", max: "+MAX_RETRY_COUNT);
-			try {
-				final EagleMailClient client;
-				if (eagleProps != null) {
-					ConcurrentMapConfiguration con = new ConcurrentMapConfiguration();					
-					con.addProperty(MAIL_HOST, eagleProps.get(CONF_KEY_MAIL_HOST).unwrapped());
-					con.addProperty(MAIL_PORT, eagleProps.get(CONF_KEY_MAIL_PORT).unwrapped());
-					if (eagleProps.get(CONF_KEY_MAIL_DEBUG) != null) {
-						con.addProperty(MAIL_DEBUG, eagleProps.get(CONF_KEY_MAIL_DEBUG).unwrapped());
-					}
-					client = new EagleMailClient(con);
-				}
-				else {
-					client = new EagleMailClient();
-				}
-				String env = "prod";
-				if (eagleProps != null && eagleProps.get("env") != null) {
-					env = (String) eagleProps.get("env").unwrapped();
-				}
-				LOG.info("Env is: " + env);
-				final VelocityContext context = new VelocityContext();
-				generateCommonContext(context);
-				LOG.info("After calling generateCommonContext...");
-				additionalContext(context, env);
-				
-				if (recipents == null || recipents.equals("")) {
-					LOG.error("Recipients is null, skip sending emails ");
-					return;
-				}
-				String title = subject;
-				if (!env.trim().equals("prod")) {
-					title = "[" + env + "]" + title; 				
-				}
-				success = client.send(sender, recipents, cc, title, configFileName, context, null);
-				LOG.info("Success of sending email: " + success);
-				if(!success && count < MAX_RETRY_COUNT) {
-					LOG.info("Sleep for a while before retrying");
-					Thread.sleep(10*1000);
-				}
-			}
-			catch (Exception e){
-				LOG.warn("Sending mail exception", e);
-			}
-		}
-
-		if(success){
-			sentSuccessfully = true;
-            LOG.info(String.format("Successfully send email, thread: %s",threadName));
-		}else{
-			LOG.warn(String.format("Fail sending email after tries %s times, thread: %s",MAX_RETRY_COUNT,threadName));
-		}
-	}
-	
-	private void generateCommonContext(VelocityContext context) {
-		context.put(Constants.ALERT_EMAIL_TIME_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds( System.currentTimeMillis() ));
-		context.put(Constants.ALERT_EMAIL_COUNT_PROPERTY, alertContexts.size());
-		context.put(Constants.ALERT_EMAIL_ALERTLIST_PROPERTY, alertContexts);
-		context.put(Constants.ALERT_EMAIL_ORIGIN_PROPERTY, origin);
-	}
-
-	public boolean sentSuccessfully(){
-		return this.sentSuccessfully;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java b/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java
deleted file mode 100644
index c4537b7..0000000
--- a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailComponent.java
+++ /dev/null
@@ -1,32 +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.alert.email;
-
-import org.apache.eagle.common.metric.AlertContext;
-
-/**
- * Alert email component is one part of an email, which could be an individual alert
- */
-public class AlertEmailComponent {
-	private AlertContext alertContext;
-	public AlertContext getAlertContext() {
-		return alertContext;
-	}
-	public void setAlertContext(AlertContext alertContext) {
-		this.alertContext = alertContext;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java b/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
deleted file mode 100644
index 5d0609b..0000000
--- a/eagle-core/eagle-alert/eagle-alert-base/src/main/java/org/apache/eagle/alert/email/AlertEmailContext.java
+++ /dev/null
@@ -1,69 +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.alert.email;
-
-import java.util.List;
-
-/**
- * alert email bean
- * one email consists of a list of email component
- */
-public class AlertEmailContext {
-	private List<AlertEmailComponent> components;
-	private String sender;
-	private String subject;
-	private String recipients;
-	private String velocityTplFile;
-	private String cc;
-	
-	public List<AlertEmailComponent> getComponents() {
-		return components;
-	}
-	public void setComponents(List<AlertEmailComponent> components) {
-		this.components = components;
-	}
-	public String getVelocityTplFile() {
-		return velocityTplFile;
-	}
-	public void setVelocityTplFile(String velocityTplFile) {
-		this.velocityTplFile = velocityTplFile;
-	}
-	public String getRecipients() {
-		return recipients;
-	}
-	public void setRecipients(String recipients) {
-		this.recipients = recipients;
-	}
-	public String getSender() {
-		return sender;
-	}
-	public void setSender(String sender) {
-		this.sender = sender;
-	}
-	public String getSubject() {
-		return subject;
-	}
-	public void setSubject(String subject) {
-		this.subject = subject;
-	}
-	public String getCc() {
-		return cc;
-	}
-	public void setCc(String cc) {
-		this.cc = cc;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml b/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
deleted file mode 100644
index b73d43b..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/pom.xml
+++ /dev/null
@@ -1,90 +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.
- */
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>eagle</groupId>
-    <artifactId>eagle-alert-parent</artifactId>
-    <version>0.3.0</version>
-  </parent>
-  <groupId>eagle</groupId>
-  <artifactId>eagle-alert-notification-plugin</artifactId>
-  <name>eagle-alert-notification-plugin</name>
-  <description>Apache Eagle Notification Plugin to  enable services to use custom or default notification </description>
-  <dependencies>
-  	<dependency>
-          <groupId>eagle</groupId>
-          <artifactId>eagle-policy-base</artifactId>
-          <version>${project.version}</version>
-          <exclusions>
-              <exclusion>
-                  <groupId>org.slf4j</groupId>
-                  <artifactId>log4j-over-slf4j</artifactId>
-              </exclusion>
-              <exclusion>
-                  <groupId>org.slf4j</groupId>
-                  <artifactId>slf4j-simple</artifactId>
-              </exclusion>
-          </exclusions>
-      </dependency>
-  	<dependency>
-	    <groupId>org.apache.kafka</groupId>
-	    <artifactId>kafka-clients</artifactId>
-	</dependency>
-      <dependency>
-          <groupId>com.fasterxml.jackson.core</groupId>
-          <artifactId>jackson-core</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>com.fasterxml.jackson.core</groupId>
-          <artifactId>jackson-annotations</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>com.fasterxml.jackson.core</groupId>
-          <artifactId>jackson-databind</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>com.fasterxml.jackson.module</groupId>
-          <artifactId>jackson-module-scala_${scala.version}</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>org.codehaus.jackson</groupId>
-          <artifactId>jackson-mapper-asl</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>org.codehaus.jackson</groupId>
-          <artifactId>jackson-core-asl</artifactId>
-      </dependency>
-
-      <dependency>
-          <groupId>org.reflections</groupId>
-          <artifactId>reflections</artifactId>
-          <exclusions>
-              <exclusion>
-                  <groupId>org.slf4j</groupId>
-                  <artifactId>slf4j-simple</artifactId>
-              </exclusion>
-          </exclusions>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-hdfs</artifactId>
-      </dependency>
-  </dependencies>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java
deleted file mode 100644
index 98d6b5c..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationConstants.java
+++ /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.
- */
-
-package org.apache.eagle.notification.base;
-
-public class NotificationConstants {
-    public static final String NOTIFICATION_TYPE = "notificationType";
-    public static final String EMAIL_NOTIFICATION = "email";
-    public static final String KAFKA_STORE = "kafka";
-    public static final String EAGLE_STORE = "eagleStore";
-
-    // email specific constants
-    public static final String SUBJECT = "subject";
-    public static final String SENDER = "sender";
-    public static final String RECIPIENTS = "recipients";
-    public static final String TPL_FILE_NAME = "tplFileName";
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java
deleted file mode 100644
index d57dbf9..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/base/NotificationStatus.java
+++ /dev/null
@@ -1,26 +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.notification.base;
-
-/**
- * Object that holds the status of Notification Posted to Notification Plugin  
- */
-public class NotificationStatus {
-	public boolean successful;
-	public String errorMessage;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
deleted file mode 100644
index bf2e75e..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eagle.notification.dao;
-
-
-
-import org.apache.eagle.alert.entity.AlertNotificationEntity;
-
-import java.util.List;
-
-/**
- * Alert Notification Data Access Obj Interface
- */
-public interface AlertNotificationDAO {
-    /**
-     * find the Alert Notification Types by querying alertNotifications Table
-     * @return
-     * @throws Exception
-     */
-    List<AlertNotificationEntity> findAlertNotificationTypes() throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
deleted file mode 100644
index 7251da3..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/dao/AlertNotificationDAOImpl.java
+++ /dev/null
@@ -1,70 +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.notification.dao;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.alert.entity.AlertNotificationEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-/**
- * Notification Service API implementation which Provides Read/Write API's of Hbase AlertNotifications Table
- */
-public class AlertNotificationDAOImpl implements  AlertNotificationDAO {
-
-    private final Logger LOG = LoggerFactory.getLogger(AlertNotificationDAOImpl.class);
-    private final EagleServiceConnector connector;
-
-    public AlertNotificationDAOImpl(EagleServiceConnector connector){
-        this.connector = connector;
-    }
-
-    /**
-     * Find the Alerts by NotificationType
-     * @return
-     * @throws Exception
-     */
-    @Override
-    public List<AlertNotificationEntity> findAlertNotificationTypes() throws Exception {
-        try{
-            IEagleServiceClient client = new EagleServiceClientImpl(connector);
-            String query = Constants.ALERT_NOTIFICATION_SERVICE_ENDPOINT_NAME+"[@enabled=\"true\"]{*}";
-            GenericServiceAPIResponseEntity response = client.search(query).startTime(0)
-                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
-                    .pageSize(Integer.MAX_VALUE)
-                    .query(query)
-                    .send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Got an exception when query eagle service: " + response.getException());
-            }
-            return response.getObj();
-        }
-        catch (Exception ex) {
-            LOG.error("Got an exception when query alert notification service ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java
deleted file mode 100644
index 3fe55bf..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailComponent.java
+++ /dev/null
@@ -1,32 +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.notification.email;
-
-import org.apache.eagle.common.metric.AlertContext;
-
-/**
- * Alert email component is one part of an email, which could be an individual alert
- */
-public class AlertEmailComponent {
-    private AlertContext alertContext;
-    public AlertContext getAlertContext() {
-        return alertContext;
-    }
-    public void setAlertContext(AlertContext alertContext) {
-        this.alertContext = alertContext;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java
deleted file mode 100644
index f1642be..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailContext.java
+++ /dev/null
@@ -1,69 +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.notification.email;
-
-import java.util.List;
-
-/**
- * alert email bean
- * one email consists of a list of email component
- */
-public class AlertEmailContext {
-    private List<AlertEmailComponent> components;
-    private String sender;
-    private String subject;
-    private String recipients;
-    private String velocityTplFile;
-    private String cc;
-
-    public List<AlertEmailComponent> getComponents() {
-        return components;
-    }
-    public void setComponents(List<AlertEmailComponent> components) {
-        this.components = components;
-    }
-    public String getVelocityTplFile() {
-        return velocityTplFile;
-    }
-    public void setVelocityTplFile(String velocityTplFile) {
-        this.velocityTplFile = velocityTplFile;
-    }
-    public String getRecipients() {
-        return recipients;
-    }
-    public void setRecipients(String recipients) {
-        this.recipients = recipients;
-    }
-    public String getSender() {
-        return sender;
-    }
-    public void setSender(String sender) {
-        this.sender = sender;
-    }
-    public String getSubject() {
-        return subject;
-    }
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-    public String getCc() {
-        return cc;
-    }
-    public void setCc(String cc) {
-        this.cc = cc;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
deleted file mode 100644
index ddd3c96..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGenerator.java
+++ /dev/null
@@ -1,136 +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.notification.email;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.*;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import com.typesafe.config.ConfigObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AlertEmailGenerator{
-    private String tplFile;
-    private String sender;
-    private String recipients;
-    private String subject;
-    private ConfigObject eagleProps;
-
-    private ThreadPoolExecutor executorPool;
-
-    private final static Logger LOG = LoggerFactory.getLogger(AlertEmailGenerator.class);
-
-    private final static long MAX_TIMEOUT_MS =60000;
-
-    public boolean sendAlertEmail(AlertAPIEntity entity) {
-        return sendAlertEmail(entity, recipients, null);
-    }
-
-    public boolean sendAlertEmail(AlertAPIEntity entity, String recipients) {
-        return sendAlertEmail(entity, recipients, null);
-    }
-
-    public boolean sendAlertEmail(AlertAPIEntity entity, String recipients, String cc) {
-        boolean sentSuccessfully = false;
-        AlertEmailContext email = new AlertEmailContext();
-
-        AlertEmailComponent component = new AlertEmailComponent();
-        component.setAlertContext(entity.getAlertContext());
-        List<AlertEmailComponent> components = new ArrayList<AlertEmailComponent>();
-        components.add(component);
-        email.setComponents(components);
-        if (entity.getAlertContext().getProperty(Constants.SUBJECT) != null) {
-            email.setSubject(entity.getAlertContext().getProperty(Constants.SUBJECT));
-        }
-        else email.setSubject(subject);
-        email.setVelocityTplFile(tplFile);
-        email.setRecipients(recipients);
-        email.setCc(cc);
-        email.setSender(sender);
-
-        /** asynchronized email sending */
-        @SuppressWarnings("rawtypes")
-        AlertEmailSender thread = new AlertEmailSender(email, eagleProps);
-
-        if(this.executorPool == null) throw new IllegalStateException("Invoking thread executor pool but it's is not set yet");
-
-        LOG.info("Sending email  in asynchronous to: "+recipients+", cc: "+cc);
-        Future future = this.executorPool.submit(thread);
-        try {
-            future.get(MAX_TIMEOUT_MS, TimeUnit.MILLISECONDS);
-            sentSuccessfully = true;
-            LOG.info(String.format("Successfully send email to %s", recipients));
-        } catch (InterruptedException | ExecutionException  e) {
-            sentSuccessfully = false;
-            LOG.error(String.format("Failed to send email to %s, due to:%s",recipients,e),e);
-        } catch (TimeoutException e) {
-            sentSuccessfully = false;
-            LOG.error(String.format("Failed to send email to %s due to timeout exception, max timeout: %s ms ",recipients, MAX_TIMEOUT_MS),e);
-        }
-        return sentSuccessfully;
-    }
-
-    public String getTplFile() {
-        return tplFile;
-    }
-
-    public void setTplFile(String tplFile) {
-        this.tplFile = tplFile;
-    }
-
-    public String getSender() {
-        return sender;
-    }
-
-    public void setSender(String sender) {
-        this.sender = sender;
-    }
-
-    public String getRecipients() {
-        return recipients;
-    }
-
-    public void setRecipients(String recipients) {
-        this.recipients = recipients;
-    }
-
-    public String getSubject() {
-        return subject;
-    }
-
-    public void setSubject(String subject) {
-        this.subject = subject;
-    }
-
-    public ConfigObject getEagleProps() {
-        return eagleProps;
-    }
-
-    public void setEagleProps(ConfigObject eagleProps) {
-        this.eagleProps = eagleProps;
-    }
-
-    public void setExecutorPool(ThreadPoolExecutor executorPool) {
-        this.executorPool = executorPool;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGeneratorBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGeneratorBuilder.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGeneratorBuilder.java
deleted file mode 100644
index 2e63dab..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailGeneratorBuilder.java
+++ /dev/null
@@ -1,59 +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.notification.email;
-
-import java.util.concurrent.ThreadPoolExecutor;
-
-import com.typesafe.config.ConfigObject;
-
-public class AlertEmailGeneratorBuilder {
-    private AlertEmailGenerator generator;
-    private AlertEmailGeneratorBuilder(){
-        generator = new AlertEmailGenerator();
-    }
-    public static AlertEmailGeneratorBuilder newBuilder(){
-        return new AlertEmailGeneratorBuilder();
-    }
-    public AlertEmailGeneratorBuilder withSubject(String subject){
-        generator.setSubject(subject);
-        return this;
-    }
-    public AlertEmailGeneratorBuilder withSender(String sender){
-        generator.setSender(sender);
-        return this;
-    }
-    public AlertEmailGeneratorBuilder withRecipients(String recipients){
-        generator.setRecipients(recipients);
-        return this;
-    }
-    public AlertEmailGeneratorBuilder withTplFile(String tplFile){
-        generator.setTplFile(tplFile);
-        return this;
-    }
-    public AlertEmailGeneratorBuilder withEagleProps(ConfigObject eagleProps) {
-        generator.setEagleProps(eagleProps);
-        return this;
-    }
-    public AlertEmailGeneratorBuilder withExecutorPool(ThreadPoolExecutor threadPoolExecutor) {
-        generator.setExecutorPool(threadPoolExecutor);
-        return this;
-    }
-
-    public AlertEmailGenerator build(){
-        return this.generator;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
deleted file mode 100644
index 2b18f1e..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/email/AlertEmailSender.java
+++ /dev/null
@@ -1,157 +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.notification.email;
-
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.velocity.VelocityContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.common.email.EagleMailClient;
-import com.netflix.config.ConcurrentMapConfiguration;
-import com.typesafe.config.ConfigObject;
-
-public class AlertEmailSender implements Runnable {
-
-    protected final List<Map<String, String>> alertContexts = new ArrayList<Map<String, String>>();
-    protected final String configFileName;
-    protected final String subject;
-    protected final String sender;
-    protected final String recipents;
-    protected final String cc;
-    protected final String origin;
-    protected boolean sentSuccessfully = false;
-
-    private final static Logger LOG = LoggerFactory.getLogger(AlertEmailSender.class);
-    private final static int MAX_RETRY_COUNT = 3;
-
-    private static final String MAIL_HOST = "mail.host";
-    private static final String MAIL_PORT = "mail.smtp.port";
-    private static final String MAIL_DEBUG = "mail.debug";
-
-    private static final String CONF_KEY_MAIL_HOST = "mailHost";
-    private static final String CONF_KEY_MAIL_PORT = "mailSmtpPort";
-    private static final String CONF_KEY_MAIL_DEBUG = "mailDebug";
-
-    private ConfigObject eagleProps;
-
-
-    private String threadName;
-    /**
-     * Derived class may have some additional context properties to add
-     * @param context velocity context
-     * @param env environment
-     */
-    protected void additionalContext(VelocityContext context, String env) {
-        // By default there's no additional context added
-    }
-
-    public AlertEmailSender(AlertEmailContext alertEmail){
-        this.recipents = alertEmail.getRecipients();
-        this.configFileName = alertEmail.getVelocityTplFile();
-        this.subject = alertEmail.getSubject();
-        this.sender = alertEmail.getSender();
-        this.cc = alertEmail.getCc();
-        for(AlertEmailComponent bean : alertEmail.getComponents()){
-            this.alertContexts.add(bean.getAlertContext().getProperties());
-        }
-        String tmp = ManagementFactory.getRuntimeMXBean().getName();
-        this.origin = tmp.split("@")[1] + "(pid:" + tmp.split("@")[0] + ")";
-        threadName = Thread.currentThread().getName();
-        LOG.info("Initialized "+threadName+": origin is : " + this.origin+", recipient of the email: " + this.recipents+", velocity TPL file: " + this.configFileName);
-    }
-
-    public AlertEmailSender(AlertEmailContext alertEmail, ConfigObject eagleProps){
-        this(alertEmail);
-        this.eagleProps = eagleProps;
-    }
-
-    @Override
-    public void run() {
-        int count = 0;
-        boolean success = false;
-        while(count++ < MAX_RETRY_COUNT && !success){
-            LOG.info("Sending email, tried: " + count+", max: "+MAX_RETRY_COUNT);
-            try {
-                final EagleMailClient client;
-                if (eagleProps != null) {
-                    ConcurrentMapConfiguration con = new ConcurrentMapConfiguration();
-                    con.addProperty(MAIL_HOST, eagleProps.get(CONF_KEY_MAIL_HOST).unwrapped());
-                    con.addProperty(MAIL_PORT, eagleProps.get(CONF_KEY_MAIL_PORT).unwrapped());
-                    if (eagleProps.get(CONF_KEY_MAIL_DEBUG) != null) {
-                        con.addProperty(MAIL_DEBUG, eagleProps.get(CONF_KEY_MAIL_DEBUG).unwrapped());
-                    }
-                    client = new EagleMailClient(con);
-                }
-                else {
-                    client = new EagleMailClient();
-                }
-                String env = "prod";
-                if (eagleProps != null && eagleProps.get("env") != null) {
-                    env = (String) eagleProps.get("env").unwrapped();
-                }
-                LOG.info("Env is: " + env);
-                final VelocityContext context = new VelocityContext();
-                generateCommonContext(context);
-                LOG.info("After calling generateCommonContext...");
-                additionalContext(context, env);
-
-                if (recipents == null || recipents.equals("")) {
-                    LOG.error("Recipients is null, skip sending emails ");
-                    return;
-                }
-                String title = subject;
-                if (!env.trim().equals("prod")) {
-                    title = "[" + env + "]" + title;
-                }
-                success = client.send(sender, recipents, cc, title, configFileName, context, null);
-                LOG.info("Success of sending email: " + success);
-                if(!success && count < MAX_RETRY_COUNT) {
-                    LOG.info("Sleep for a while before retrying");
-                    Thread.sleep(10*1000);
-                }
-            }
-            catch (Exception e){
-                LOG.warn("Sending mail exception", e);
-            }
-        }
-
-        if(success){
-            sentSuccessfully = true;
-            LOG.info(String.format("Successfully send email, thread: %s",threadName));
-        }else{
-            LOG.warn(String.format("Fail sending email after tries %s times, thread: %s",MAX_RETRY_COUNT,threadName));
-        }
-    }
-
-    private void generateCommonContext(VelocityContext context) {
-        context.put(Constants.ALERT_EMAIL_TIME_PROPERTY, DateTimeUtil.millisecondsToHumanDateWithSeconds( System.currentTimeMillis() ));
-        context.put(Constants.ALERT_EMAIL_COUNT_PROPERTY, alertContexts.size());
-        context.put(Constants.ALERT_EMAIL_ALERTLIST_PROPERTY, alertContexts);
-        context.put(Constants.ALERT_EMAIL_ORIGIN_PROPERTY, origin);
-    }
-
-    public boolean sentSuccessfully(){
-        return this.sentSuccessfully;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePersister.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePersister.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePersister.java
deleted file mode 100644
index e098256..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePersister.java
+++ /dev/null
@@ -1,85 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-/**
- * Alert API entity Persistor
- */
-public class AlertEagleStorePersister {
-	private static Logger LOG = LoggerFactory.getLogger(AlertEagleStorePersister.class);
-	private String eagleServiceHost;
-	private int eagleServicePort;
-	private String username;
-	private String password;
-
-
-	public AlertEagleStorePersister(String eagleServiceHost, int eagleServicePort) {
-		this(eagleServiceHost, eagleServicePort, null, null);
-	}
-
-	public AlertEagleStorePersister(String eagleServiceHost, int eagleServicePort, String username, String password) {
-		this.eagleServiceHost = eagleServiceHost;
-		this.eagleServicePort = eagleServicePort;
-		this.username = username;
-		this.password = password;
-	}
-
-	public AlertEagleStorePersister(Config config ) {
-		this.eagleServiceHost = config.getString("eagleProps.eagleService.host");
-		this.eagleServicePort = config.getInt("eagleProps.eagleService.port");
-		this.username = config.getString("eagleProps.eagleService.username");
-		this.password =config.getString("eagleProps.eagleService.password");
-	}
-
-	/**
-	 * Persist passes list of Entities
-	 * @param list
-	 * @return
-     */
-	public boolean doPersist(List<? extends TaggedLogAPIEntity> list) {
-		if (list.isEmpty()) return false;
-		LOG.info("Going to persist entities, type: " + " " + list.get(0).getClass().getSimpleName() + ", list size: " + list.size());
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(eagleServiceHost, eagleServicePort, username, password);
-			GenericServiceAPIResponseEntity<String> response = client.create(list);
-			client.close();
-			if (response.isSuccess()) {
-				LOG.info("Successfully create entities " + list.toString());
-				return true;
-			}
-			else {
-				LOG.error("Fail to create entities with exception " + response.getException());
-				return false;
-			}
-		}
-		catch (Exception ex) {
-			LOG.error("Got an exception in persisting entities", ex);
-			return false;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePlugin.java
deleted file mode 100644
index cb0df70..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEagleStorePlugin.java
+++ /dev/null
@@ -1,99 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.notification.base.NotificationStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Plugin to persist alerts to Eagle Storage
- */
-public class AlertEagleStorePlugin implements NotificationPlugin {
-    private static final Logger LOG = LoggerFactory.getLogger(AlertEagleStorePlugin.class);
-    private NotificationStatus status;
-    private AlertEagleStorePersister persist;
-
-    @Override
-    public void init(Config config, List<AlertDefinitionAPIEntity> initAlertDefs) throws Exception {
-        this.persist = new AlertEagleStorePersister(config);
-        this.status = new NotificationStatus();
-        LOG.info("initialized plugin for EagleStorePlugin");
-    }
-
-    @Override
-    public void update(String policyId, Map<String,String> notificationConf , boolean isPolicyDelete ) throws Exception {
-        if( isPolicyDelete ){
-            LOG.info("Deleted policy ...");
-            return;
-        }
-        LOG.info("created/updated plugin ...");
-    }
-
-    @Override
-    public NotificationStatus getStatus() {
-        return this.status;
-    }
-
-    /**
-     * Persist AlertEntity to alert_details table
-     * @param alertEntity
-     */
-    @Override
-    public void onAlert(AlertAPIEntity alertEntity) {
-        LOG.info("write alert to eagle storage " + alertEntity);
-        try{
-            List<AlertAPIEntity> list = new ArrayList<AlertAPIEntity>();
-            list.add(alertEntity);
-            boolean result = persist.doPersist( list );
-            if(result) {
-                status.successful = true;
-                status.errorMessage = "";
-            }else{
-                status.successful = false;
-                status.errorMessage = "";
-            }
-        }catch (Exception ex ){
-            status.successful = false;
-            status.errorMessage = ex.getMessage();
-            LOG.error("Fail writing alert entity to Eagle Store", ex);
-        }
-    }
-
-    @Override
-    public int hashCode(){
-        return new HashCodeBuilder().append(getClass().getCanonicalName()).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object o){
-        if(o == this)
-            return true;
-        if(!(o instanceof AlertEagleStorePlugin))
-            return false;
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEmailPlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEmailPlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEmailPlugin.java
deleted file mode 100644
index f9a7ed3..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertEmailPlugin.java
+++ /dev/null
@@ -1,144 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.notification.base.NotificationConstants;
-import org.apache.eagle.notification.base.NotificationStatus;
-import org.apache.eagle.notification.email.AlertEmailGenerator;
-import org.apache.eagle.notification.email.AlertEmailGeneratorBuilder;
-import org.apache.eagle.notification.utils.NotificationPluginUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-/**
- *  Send alert to email
- */
-public class AlertEmailPlugin implements NotificationPlugin {
-	private static final Logger LOG = LoggerFactory.getLogger(AlertEmailPlugin.class);
-	private Map<String, AlertEmailGenerator> emailGenerators = new ConcurrentHashMap<>();
-	private final static int DEFAULT_THREAD_POOL_CORE_SIZE = 4;
-	private final static int DEFAULT_THREAD_POOL_MAX_SIZE = 8;
-	private final static long DEFAULT_THREAD_POOL_SHRINK_TIME = 60000L; // 1 minute
-	private transient ThreadPoolExecutor executorPool;
-	private NotificationStatus status = new NotificationStatus();
-	private Config config;
-
-	@Override
-	public void init(Config config, List<AlertDefinitionAPIEntity> initAlertDefs) throws Exception {
-		this.config = config;
-		executorPool = new ThreadPoolExecutor(DEFAULT_THREAD_POOL_CORE_SIZE, DEFAULT_THREAD_POOL_MAX_SIZE, DEFAULT_THREAD_POOL_SHRINK_TIME, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
-		LOG.info(" Creating Email Generator... ");
-		for( AlertDefinitionAPIEntity  entity : initAlertDefs ){
-			List<Map<String,String>>  configMaps = NotificationPluginUtils.deserializeNotificationConfig(entity.getNotificationDef());
-			for( Map<String,String> notificationConfigMap : configMaps ){
-				String notificationType = notificationConfigMap.get(NotificationConstants.NOTIFICATION_TYPE);
-				// for backward compatibility, default notification is email
-				if(notificationType == null || notificationType.equalsIgnoreCase(NotificationConstants.EMAIL_NOTIFICATION)){
-					AlertEmailGenerator generator = createEmailGenerator( notificationConfigMap );
-						this.emailGenerators.put(entity.getTags().get(Constants.POLICY_ID), generator);
-						LOG.info("Successfully initialized email notification for policy " + entity.getTags().get(Constants.POLICY_ID) + ",with " + notificationConfigMap);
-				}
-			}
-		}
-	}
-
-	/**
-	 * @param notificationConf
-	 * @throws Exception
-     */
-	@Override
-	public void update(String policyId, Map<String,String> notificationConf  , boolean isPolicyDelete ) throws Exception {
-		if( isPolicyDelete ){
-			LOG.info(" Policy been deleted.. Removing reference from Notification Plugin ");
-			this.emailGenerators.remove(policyId);
-			return;
-		}
-		AlertEmailGenerator generator = createEmailGenerator(notificationConf);
-		this.emailGenerators.put(policyId , generator );
-		LOG.info("created/updated email generator for updated policy " + policyId);
-	}
-
-	/**
-	 * API to send email
-	 * @param alertEntity
-	 * @throws Exception
-     */
-	@Override
-	public void onAlert(AlertAPIEntity alertEntity) throws  Exception {
-		String policyId = alertEntity.getTags().get(Constants.POLICY_ID);
-		AlertEmailGenerator generator = this.emailGenerators.get(policyId);
-		boolean isSuccess = generator.sendAlertEmail(alertEntity);
-		if( !isSuccess ) {
-			status.errorMessage = "Failed to send email";
-			status.successful = false;
-		}else {
-			status.errorMessage = "";
-			status.successful = true;
-		}
-	}
-
-	@Override
-	public NotificationStatus getStatus() {
-		return this.status;
-	}
-
-	/**
-	 * @param notificationConfig
-	 * @return
-     */
-	private AlertEmailGenerator createEmailGenerator( Map<String,String> notificationConfig ) {
-		String tplFileName = notificationConfig.get(NotificationConstants.TPL_FILE_NAME);
-		if (tplFileName == null || tplFileName.equals("")) {
-			tplFileName = "ALERT_DEFAULT.vm";
-		}
-		AlertEmailGenerator gen = AlertEmailGeneratorBuilder.newBuilder().
-				withEagleProps(this.config.getObject("eagleProps")).
-				withSubject(notificationConfig.get(NotificationConstants.SUBJECT)).
-				withSender(notificationConfig.get(NotificationConstants.SENDER)).
-				withRecipients(notificationConfig.get(NotificationConstants.RECIPIENTS)).
-				withTplFile(tplFileName).
-				withExecutorPool(this.executorPool).build();
-		return gen;
-	}
-
-	@Override
-	public int hashCode(){
-		return new HashCodeBuilder().append(getClass().getCanonicalName()).toHashCode();
-	}
-
-	@Override
-	public boolean equals(Object o){
-		if(o == this)
-			return true;
-		if(!(o instanceof AlertEmailPlugin))
-			return false;
-		return true;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertKafkaPlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertKafkaPlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertKafkaPlugin.java
deleted file mode 100644
index cc4f89d..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/AlertKafkaPlugin.java
+++ /dev/null
@@ -1,132 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.notification.base.NotificationConstants;
-import org.apache.eagle.notification.base.NotificationStatus;
-import org.apache.eagle.notification.utils.NotificationPluginUtils;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.kafka.clients.producer.KafkaProducer;
-import org.apache.kafka.clients.producer.ProducerRecord;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- *  send alert to Kafka bus
- */
-@SuppressWarnings({ "rawtypes", "unchecked" })
-public class AlertKafkaPlugin implements NotificationPlugin {
-	private static final Logger LOG = LoggerFactory.getLogger(AlertKafkaPlugin.class);
-	private NotificationStatus status = new NotificationStatus();
-	private Map<String, Map<String, String>> kafaConfigs = new ConcurrentHashMap<>();
-	private Config config;
-
-	@Override
-	public void init(Config config, List<AlertDefinitionAPIEntity> initAlertDefs) throws Exception {
-		this.config = config;
-		for( AlertDefinitionAPIEntity entity : initAlertDefs ) {
-			List<Map<String,String>>  configMaps = NotificationPluginUtils.deserializeNotificationConfig(entity.getNotificationDef());
-			for( Map<String,String> notificationConfigMap : configMaps ){
-				String notificationType = notificationConfigMap.get(NotificationConstants.NOTIFICATION_TYPE);
-				if(notificationType == null){
-					LOG.error("no notificationType field for this notification, ignoring and continue " + notificationConfigMap);
-					continue;
-				}else {
-					// single policy can have multiple configs , only load Kafka Config's
-					if (notificationType.equalsIgnoreCase(NotificationConstants.KAFKA_STORE)) {
-						kafaConfigs.put(entity.getTags().get(Constants.POLICY_ID), notificationConfigMap);
-						break;
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Update API to update policy delete/create/update in Notification Plug-ins
-	 * @param  notificationConf
-	 * @param isPolicyDelete
-	 * @throws Exception
-     */
-	@Override
-	public void update(String policyId, Map<String,String> notificationConf , boolean isPolicyDelete ) throws Exception {
-		if( isPolicyDelete ){
-			LOG.info(" Policy been deleted.. Removing reference from Notification Plugin ");
-			this.kafaConfigs.remove(policyId);
-			return;
-		}
-		kafaConfigs.put(policyId, notificationConf );
-	}
-
-	/**
-	 * Post Notification to KafkaTopic
-	 * @param alertEntity
-     */
-	@Override
-	public void onAlert(AlertAPIEntity alertEntity) {
-		try{
-			KafkaProducer producer = KafkaProducerSingleton.INSTANCE.getProducer(config);
-			producer.send(createRecord(alertEntity));
-			status.successful = true;
-			status.errorMessage = "";
-		}catch(Exception ex ){
-			LOG.error("fail writing alert to Kafka bus", ex);
-			status.successful = false;
-			status.errorMessage = ex.getMessage();
-		}
-	}
-
-	/**
-	 * To Create  KafkaProducer Record 
-	 * @param entity
-	 * @return
-	 * @throws Exception
-	 */
-	private ProducerRecord  createRecord(AlertAPIEntity entity ) throws Exception {
-		String policyId = entity.getTags().get(Constants.POLICY_ID);
-		ProducerRecord  record  = new ProducerRecord( this.kafaConfigs.get(policyId).get("topic"), NotificationPluginUtils.objectToStr(entity));
-		return record;
-	}	
-	
-	@Override
-	public NotificationStatus getStatus() {
-		return status;
-	}
-
-	@Override
-	public int hashCode(){
-		return new HashCodeBuilder().append(getClass().getCanonicalName()).toHashCode();
-	}
-
-	@Override
-	public boolean equals(Object o){
-		if(o == this)
-			return true;
-		if(!(o instanceof AlertKafkaPlugin))
-			return false;
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/KafkaProducerSingleton.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/KafkaProducerSingleton.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/KafkaProducerSingleton.java
deleted file mode 100644
index 53f3bb0..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/KafkaProducerSingleton.java
+++ /dev/null
@@ -1,44 +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.notification.plugin;
-
-import java.util.Properties;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.notification.utils.NotificationPluginUtils;
-import org.apache.kafka.clients.producer.KafkaProducer;
-
-/**
- * The producer is thread safe and sharing a single producer instance across threads will generally be faster than having multiple instances. 
- */
-public enum KafkaProducerSingleton {
-	INSTANCE;	
-
-	public KafkaProducer<String, Object>  getProducer(Config config) throws Exception{
-		Properties configMap = new Properties();
-		configMap.put("bootstrap.servers", NotificationPluginUtils.getPropValue(config, "kafka_broker"));
-		configMap.put("metadata.broker.list", NotificationPluginUtils.getPropValue(config, "kafka_broker"));
-		configMap.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-		configMap.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
-		configMap.put("request.required.acks", "1");	     
-		configMap.put("key.deserializer","org.apache.kafka.common.serialization.StringDeserializer");
-		configMap.put("value.deserializer","org.apache.kafka.common.serialization.StringDeserializer");
-		KafkaProducer<String, Object> producer = new KafkaProducer<>(configMap);
-		return producer;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPlugin.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPlugin.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPlugin.java
deleted file mode 100644
index 5780176..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPlugin.java
+++ /dev/null
@@ -1,59 +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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-import org.apache.eagle.notification.base.NotificationStatus;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Created on 2/10/16.
- * Notification Plug-in interface which provide abstraction layer to notify to different system
- */
-public interface NotificationPlugin {
-    /**
-     * for initialization
-     * @throws Exception
-     */
-    public void init(Config config, List<AlertDefinitionAPIEntity> initAlertDefs) throws  Exception;
-
-    /**
-     * Update Plugin if any change in Policy Definition
-     * @param policy to be impacted
-     * @param  notificationConf
-     * @throws Exception
-     */
-    public void update(String policy, Map<String,String> notificationConf , boolean isPolicyDelete ) throws  Exception;
-
-    /**
-     * Post a notification for the given alertEntity
-     * @param alertEntity
-     * @throws Exception
-     */
-
-    public void onAlert( AlertAPIEntity alertEntity ) throws  Exception;
-
-    /**
-     * Returns Status of Notification Post
-     * @return
-     */
-    public NotificationStatus getStatus();
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginLoader.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginLoader.java
deleted file mode 100644
index 4aa90c5..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginLoader.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
- *
- *    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.notification.plugin;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.alert.entity.AlertNotificationEntity;
-import org.apache.eagle.notification.base.NotificationConstants;
-import org.apache.eagle.notification.dao.AlertNotificationDAO;
-import org.apache.eagle.notification.dao.AlertNotificationDAOImpl;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.reflections.Reflections;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Created on 2/10/16.
- * don't support dynamic discovery as of 2/10
- */
-public class NotificationPluginLoader {
-    private static final Logger LOG = LoggerFactory.getLogger(NotificationPluginLoader.class);
-    private static NotificationPluginLoader instance = new NotificationPluginLoader();
-    private static Map<String,NotificationPlugin> notificationMapping = new ConcurrentHashMap<>();
-
-    private Config config;
-    private boolean initialized = false;
-
-    public static NotificationPluginLoader getInstance(){
-        return instance;
-    }
-
-    public void init(Config config){
-        if(!initialized){
-            synchronized (this){
-                if(!initialized){
-                    internalInit(config);
-                    initialized = true;
-                }
-            }
-        }
-    }
-
-    private void internalInit(Config config){
-        this.config = config;
-        loadPlugins();
-    }
-
-    /**
-     * Scan & Load Plugins
-     */
-    private void loadPlugins(){
-        try {
-            LOG.info("Start loading Plugins from eagle service ...");
-            AlertNotificationDAO dao = new AlertNotificationDAOImpl(new EagleServiceConnector(config));
-            List<AlertNotificationEntity> activeNotificationPlugins = dao.findAlertNotificationTypes();
-            for(AlertNotificationEntity plugin : activeNotificationPlugins){
-                notificationMapping.put(plugin.getTags().get(NotificationConstants.NOTIFICATION_TYPE),
-                        (NotificationPlugin) Class.forName(plugin.getClassName()).newInstance());
-            }
-            LOG.info("successfully loaded Plugins from eagle service " + activeNotificationPlugins);
-        }catch ( Exception ex ){
-            LOG.error("Error in loading Notification Plugins: ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-
-    public Map<String, NotificationPlugin> getNotificationMapping() {
-        ensureInitialized();
-        return notificationMapping;
-    }
-
-    private void ensureInitialized(){
-        if(!initialized)
-            throw new IllegalStateException("Plugin loader not initialized");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManager.java b/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManager.java
deleted file mode 100644
index fdf62d1..0000000
--- a/eagle-core/eagle-alert/eagle-alert-notification-plugin/src/main/java/org/apache/eagle/notification/plugin/NotificationPluginManager.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eagle.notification.plugin;
-
-import org.apache.eagle.alert.entity.AlertAPIEntity;
-import org.apache.eagle.alert.entity.AlertDefinitionAPIEntity;
-
-/**
- * Created on 2/10/16.
- */
-public interface NotificationPluginManager {
-    /**
-     * notify alerts to plugins for one specific alert entity
-     * @param entity
-     */
-    void notifyAlert( AlertAPIEntity entity );
-
-    /**
-     * responds to changes of alert notification definition
-     * @param entity
-     * @param isDelete
-     */
-    void updateNotificationPlugins(AlertDefinitionAPIEntity entity , boolean isDelete );
-}


[21/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyBuilder.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyBuilder.java
deleted file mode 100755
index 1978d43..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyBuilder.java
+++ /dev/null
@@ -1,140 +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.log.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.common.ByteUtil;
-
-public class RowkeyBuilder {
-	
-	public static final int EMPTY_PARTITION_DEFAULT_HASH_CODE = 0;
-	
-	/**
-	 * Generate the internal sorted hashmap for tags. Please note the partition tags should not be included in the result map.
-	 * @param partitions array of partition tags in order
-	 * @param tags tags of the entity
-	 * @return the sorted hash map of the tags
-	 */
-	public static SortedMap<Integer, Integer> generateSortedTagMap(String[] partitions, Map<String, String> tags) {
-		final SortedMap<Integer, Integer> tagHashMap = new TreeMap<Integer, Integer>();
-		for (Map.Entry<String, String> entry: tags.entrySet()) {
-			final String tagName = entry.getKey();
-			final String tagValue = entry.getValue();
-			// If it's a partition tag, we need to remove it from tag hash list. It need to 
-			// put to the fix partition hash slot in rowkey.
-			if (tagValue == null || isPartitionTag(partitions, tagName))
-				continue;
-			tagHashMap.put(tagName.hashCode(), tagValue.hashCode());
-		}
-		return tagHashMap;
-	}
-	
-	/**
-	 * build rowkey from InternalLog object
-	 * @param log internal log entity to write
-	 * @return the rowkey of the entity
-	 */
-	public static byte[] buildRowkey(InternalLog log) {
-		final String[] partitions = log.getPartitions();
-		final Map<String, String> tags = log.getTags();
-		final SortedMap<Integer, Integer> tagHashMap = generateSortedTagMap(partitions, tags);
-		
-		// reverse timestamp
-		long ts = Long.MAX_VALUE - log.getTimestamp();
-		
-		List<Integer> partitionHashValues = new ArrayList<Integer>();
-		if (partitions != null) {
-			for (String partition : partitions) {
-				final String tagValue = tags.get(partition);
-				if (tagValue != null) {
-					partitionHashValues.add(tagValue.hashCode());
-				} else {
-					partitionHashValues.add(EMPTY_PARTITION_DEFAULT_HASH_CODE);
-				}
-			}
-		}
-		return buildRowkey(log.getPrefix().hashCode(), partitionHashValues, ts, tagHashMap);
-	}
-	
-	public static long getTimestamp(byte[] rowkey, EntityDefinition ed) {
-		if (!ed.isTimeSeries()) {
-			return EntityConstants.FIXED_WRITE_TIMESTAMP;
-		}
-		final int offset = (ed.getPartitions() == null) ? 4 : (4 + ed.getPartitions().length * 4);
-		return Long.MAX_VALUE - ByteUtil.bytesToLong(rowkey, offset);
-	}
-	
-	/**
-	 * Check if the tagName is one of the partition tags
-	 * @param partitions paritition tags of the entity
-	 * @param tagName the tag name that needs to check
-	 * @return
-	 */
-	private static boolean isPartitionTag(String[] partitions, String tagName) {
-		if (partitions != null) {
-			for (String partition : partitions) {
-				if (partition.equals(tagName)) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * rowkey is: prefixHash:4 + (partitionValueHash:4)* + timestamp:8 + (tagnameHash:4 + tagvalueHash:4)*
-	 * partition fields are sorted by partition definition order, while tag fields are sorted by tag name's 
-	 * hash code values. 
-	 */
-	private static byte[] buildRowkey(int prefixHash, List<Integer> partitionHashValues, long timestamp, SortedMap<Integer, Integer> tags){
-		// alloacate byte array for rowkey
-		final int len = 4 + 8 + tags.size() * (4 + 4) + (partitionHashValues.size() * 4);
-		final byte[] rowkey = new byte[len];
-		int offset = 0;
-
-		// 1. set prefix
-		ByteUtil.intToBytes(prefixHash, rowkey, offset);
-		offset += 4;
-		
-		// 2. set partition
-		for (Integer partHash : partitionHashValues) {
-			ByteUtil.intToBytes(partHash, rowkey, offset);
-			offset += 4;
-		}
-		
-		// 3. set timestamp
-		ByteUtil.longToBytes(timestamp, rowkey, offset);
-		offset += 8;
-
-		// 4. set tag key/value hashes
-		for (Map.Entry<Integer, Integer> entry : tags.entrySet()) {
-			ByteUtil.intToBytes(entry.getKey(), rowkey, offset);
-			offset += 4;
-			ByteUtil.intToBytes(entry.getValue(), rowkey, offset);
-			offset += 4;
-		}
-		
-		return rowkey;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyQueryAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyQueryAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyQueryAPIResponseEntity.java
deleted file mode 100644
index 1745f74..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/RowkeyQueryAPIResponseEntity.java
+++ /dev/null
@@ -1,45 +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.log.entity;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class RowkeyQueryAPIResponseEntity {
-	private boolean success;
-	private String exception;
-	private Object obj;
-
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public Object getObj() {
-		return obj;
-	}
-	public void setObj(Object obj) {
-		this.obj = obj;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/SearchCondition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/SearchCondition.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/SearchCondition.java
deleted file mode 100755
index fada0e2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/SearchCondition.java
+++ /dev/null
@@ -1,148 +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.log.entity;
-
-import org.apache.eagle.query.parser.ORExpression;
-import org.apache.hadoop.hbase.filter.Filter;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * search condition includes the following:
- * 1. prefix - part of rowkey
- * 2. startTime,endTime - timestamp, part of rowkey
- * 3. hbase filter converted from query 
- * 4. aggregate parameters
- * 4. sort options
- * 5. output fields and tags
- * 6. entityName
- * 7. pagination: pageSize and startRowkey
- */
-public class SearchCondition{
-	private String startTime;
-	private String endTime;
-	private Filter filter;
-	private List<String> outputFields;
-	private boolean outputAll;
-	private long pageSize;
-	private String startRowkey;
-	private String entityName;
-	private List<String> partitionValues;
-	private ORExpression queryExpression;
-
-	public boolean isOutputVerbose() {
-		return outputVerbose;
-	}
-
-	public void setOutputVerbose(boolean outputVerbose) {
-		this.outputVerbose = outputVerbose;
-	}
-
-	public Map<String, String> getOutputAlias() {
-		return outputAlias;
-	}
-
-	public void setOutputAlias(Map<String, String> outputAlias) {
-		this.outputAlias = outputAlias;
-	}
-
-	private boolean outputVerbose;
-	private Map<String,String> outputAlias;
-
-	/**
-	 * copy constructor
-	 * @param sc
-	 */
-	public SearchCondition(SearchCondition sc){
-		this.startTime = sc.startTime;
-		this.endTime = sc.endTime;
-		this.filter = sc.filter;
-		this.outputFields = sc.outputFields;
-		this.pageSize = sc.pageSize;
-		this.startRowkey = sc.startRowkey;
-		this.entityName = sc.entityName;
-		this.partitionValues = sc.partitionValues;
-		this.queryExpression = sc.queryExpression;
-	}
-	
-	public SearchCondition(){
-	}
-	
-	public Filter getFilter() {
-		return filter;
-	}
-	public void setFilter(Filter filter) {
-		this.filter = filter;
-	}
-	public long getPageSize() {
-		return pageSize;
-	}
-	public void setPageSize(long pageSize) {
-		this.pageSize = pageSize;
-	}
-	public String getStartRowkey() {
-		return startRowkey;
-	}
-	public void setStartRowkey(String startRowkey) {
-		this.startRowkey = startRowkey;
-	}
-	public String getEntityName() {
-		return entityName;
-	}
-	public void setEntityName(String entityName) {
-		this.entityName = entityName;
-	}
-	public List<String> getOutputFields() {
-		return outputFields;
-	}
-	public void setOutputFields(List<String> outputFields) {
-		this.outputFields = outputFields;
-	}
-	public String getStartTime() {
-		return startTime;
-	}
-	public void setStartTime(String startTime) {
-		this.startTime = startTime;
-	}
-	public String getEndTime() {
-		return endTime;
-	}
-	public void setEndTime(String endTime) {
-		this.endTime = endTime;
-	}
-	public List<String> getPartitionValues() {
-		return partitionValues;
-	}
-	public void setPartitionValues(List<String> partitionValues) {
-		this.partitionValues = partitionValues;
-	}
-	public ORExpression getQueryExpression() {
-		return queryExpression;
-	}
-	public void setQueryExpression(ORExpression queryExpression) {
-		this.queryExpression = queryExpression;
-	}
-
-	public boolean isOutputAll() {
-		return outputAll;
-	}
-
-	public void setOutputAll(boolean outputAll) {
-		this.outputAll = outputAll;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/StreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/StreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/StreamReader.java
deleted file mode 100755
index 005a2e2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/StreamReader.java
+++ /dev/null
@@ -1,55 +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.log.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public abstract class StreamReader {
-	protected List<EntityCreationListener> _listeners = new ArrayList<EntityCreationListener>();
-
-	/**
-	 * Listener can be only notified after it is added to listener list
-	 * @param listener
-	 */
-	public synchronized void register(EntityCreationListener listener){
-		_listeners.add(listener);
-	}
-	
-	/**
-	 * Listener can not get notification once after it is removed from listener list
-	 * @param listener
-	 */
-	public synchronized void unregister(EntityCreationListener listener){
-		_listeners.remove(listener);
-	}
-	
-	public abstract void readAsStream() throws Exception;
-	
-	/**
-	 * Get scanned last entity timestamp
-	 * 
-	 * @return
-	 */
-	public abstract long getLastTimestamp();
-	
-	/**
-	 * Get scanned first entity timestamp
-	 * @return
-	 */
-	public abstract long getFirstTimestamp();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/BooleanExpressionComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/BooleanExpressionComparator.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/BooleanExpressionComparator.java
deleted file mode 100755
index 0d71e10..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/BooleanExpressionComparator.java
+++ /dev/null
@@ -1,300 +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.log.entity.filter;
-
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.log.expression.ParsiiInvalidException;
-import org.apache.eagle.query.parser.ComparisonOperator;
-import org.apache.eagle.query.parser.TokenType;
-import org.apache.commons.lang.StringUtils;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.io.WritableComparable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import parsii.tokenizer.ParseException;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * BooleanExpressionComparator
- *
- * Currently support double expression only.
- *
- * TODO: 1) thread-safe? 2) Rewrite filter expression to evaluate once
- *
- */
-public class BooleanExpressionComparator implements WritableComparable<List<KeyValue>> {
-    private final static Logger LOG = LoggerFactory.getLogger(BooleanExpressionComparator.class);
-
-    // Should be Writable
-    private QualifierFilterEntity filterEntity;
-    private EntityDefinition ed;
-
-    // Should not be writable
-    private double leftValue;
-    private double rightValue;
-    private BooleanExprFunc func = null;
-
-    public Set<String> getRequiredFields() {
-        return requiredFields;
-    }
-
-    private Set<String> requiredFields = new HashSet<String>();
-
-    public BooleanExpressionComparator(){}
-
-    public BooleanExpressionComparator(QualifierFilterEntity entity,EntityDefinition ed){
-        this.filterEntity  = entity;
-        this.ed = ed;
-        try {
-            this.init();
-        } catch (Exception ex) {
-            // Client side expression validation to fast fail if having error
-            LOG.error("Got exception: "+ex.getMessage(),ex);
-            throw new ExpressionEvaluationException(ex.getMessage(),ex);
-        }
-    }
-
-    private void init() throws ParsiiInvalidException, ParseException {
-        LOG.info("Filter expression: "+filterEntity.toString());
-        if (filterEntity.getKey() != null) {
-            if (filterEntity.getKeyType() == TokenType.NUMBER) {
-                leftValue = Double.parseDouble(filterEntity.getKey());
-            } else {
-                ExpressionParser parser = ExpressionParser.parse(filterEntity.getKey());
-                requiredFields.addAll(parser.getDependentFields());
-            }
-        } else {
-            throw new IllegalStateException("QualifierFilterEntity key is null");
-        }
-
-        if (filterEntity.getValue() != null) {
-            if (filterEntity.getValueType() == TokenType.NUMBER) {
-                rightValue = Double.parseDouble(filterEntity.getValue());
-            } else {
-                ExpressionParser parser = ExpressionParser.parse(filterEntity.getValue());
-                requiredFields.addAll(parser.getDependentFields());
-            }
-        } else {
-            throw new IllegalStateException("QualifierFilterEntity value is null");
-        }
-
-        if (this.filterEntity.getOp() == null)
-            throw new IllegalStateException("QualifierFilterEntity op is null");
-        this.func = _opExprFuncMap.get(this.filterEntity.getOp());
-        if (this.func == null)
-            throw new IllegalStateException("No boolean evaluation function found for operation: " + this.filterEntity.getOp());
-    }
-
-    /**
-     * if(Double.isInfinite(leftValue) || Double.isInfinite(rightValue)) return false;
-     *
-     * @param context Map[String,Double]
-     * @return evaluation result as true (1) or false (0)
-     * @throws Exception
-     */
-    private boolean eval(Map<String,Double> context) throws Exception {
-        if(filterEntity.getKeyType() != TokenType.NUMBER){
-            leftValue = eval(filterEntity.getKey(),context);
-        }
-        if(filterEntity.getValueType() != TokenType.NUMBER){
-            rightValue = eval(filterEntity.getValue(),context);
-        }
-        if(Double.isInfinite(leftValue) || Double.isInfinite(rightValue)){
-//            if(LOG.isDebugEnabled()) {
-            if (Double.isInfinite(leftValue)) {
-                LOG.warn("Evaluation result of key: " + this.filterEntity.getKey() + " is " + leftValue + " (Infinite), ignore");
-            } else {
-                LOG.warn("Evaluation result of value: "+this.filterEntity.getValue()+" is "+rightValue+" (Infinite), ignore");
-            }
-//            }
-            return false;
-        }
-        return func.eval(leftValue,rightValue);
-    }
-
-    /**
-     * if(Double.isInfinite(leftValue) || Double.isInfinite(rightValue)) return false;
-     *
-     * @param expr
-     * @param context
-     * @return
-     * @throws Exception
-     */
-    private double eval(String expr,Map<String,Double> context) throws Exception {
-        return ExpressionParser.parse(expr).eval(context);
-    }
-
-    /**
-     *
-     * @param row List[KeyValue] All key values in a row
-     *
-     * @return 0 to filter out row [false], otherwise to include row into scanner [true]
-     */
-    @Override
-    public int compareTo(List<KeyValue> row) {
-        Map<String,Double> context = new HashMap<String, Double>();
-        for(KeyValue kv:row){
-            String qualifierName = new String(kv.getQualifier());
-
-            // Because assume just handle about double value
-            // so ignore tag whose value is String
-            if(!this.ed.isTag(qualifierName)){
-                Qualifier qualifier = this.ed.getQualifierNameMap().get(qualifierName);
-                String displayName = qualifier.getDisplayName();
-                if(displayName == null) displayName = qualifierName;
-                try {
-                    if(this.requiredFields.contains(displayName)) {
-                        EntitySerDeser serDeser = qualifier.getSerDeser();
-                        double value = EntityQualifierUtils.convertObjToDouble(serDeser.deserialize(kv.getValue()));
-                        if (Double.isNaN(value)) {
-                            context.put(displayName, value);
-                        }
-                    }
-                }catch (Exception ex){
-                    LOG.warn("Failed to parse value of field "+displayName+" as double, ignore: "+ex.getMessage(),ex);
-                }
-            }
-        }
-        return compareTo(context);
-    }
-
-    /**
-     * @param context Map[String,Double]
-     *
-     * @return context.keySet().containsAll(this.requiredFields) && eval(context) ? 1:0;
-     */
-    int compareTo(Map<String,Double> context){
-        try {
-            if(context.keySet().containsAll(this.requiredFields)){
-                return eval(context)? 1:0;
-            }else{
-                if(LOG.isDebugEnabled()) {
-                    LOG.debug("Require variables: [" + StringUtils.join(this.requiredFields, ",") + "], but just given: [" + StringUtils.join(context.keySet(), ",") + "]");
-                }
-                return 0;
-            }
-        } catch (Exception e) {
-            LOG.error(e.getMessage(),e);
-            throw new ExpressionEvaluationException(e.getMessage(),e);
-        }
-    }
-
-    @Override
-    public void write(DataOutput out) throws IOException {
-        this.filterEntity.write(out);
-        this.ed.write(out);
-    }
-
-    @Override
-    public void readFields(DataInput in) throws IOException {
-        this.filterEntity = new QualifierFilterEntity();
-        this.filterEntity.readFields(in);
-        this.ed = new EntityDefinition();
-        this.ed.readFields(in);
-
-        try {
-            this.init();
-        } catch (Exception ex){
-            LOG.error("Got exception: "+ex.getMessage(),ex);
-            throw new IOException(ex.getMessage(),ex);
-        }
-    }
-
-    private static Map<ComparisonOperator,BooleanExprFunc> _opExprFuncMap = new HashMap<ComparisonOperator, BooleanExprFunc>();
-
-    static {
-        _opExprFuncMap.put(ComparisonOperator.EQUAL,new EqualExprFunc());
-        _opExprFuncMap.put(ComparisonOperator.IS,new EqualExprFunc());
-
-        _opExprFuncMap.put(ComparisonOperator.NOT_EQUAL,new NotEqualExprFunc());
-        _opExprFuncMap.put(ComparisonOperator.IS_NOT,new NotEqualExprFunc());
-
-        _opExprFuncMap.put(ComparisonOperator.LESS,new LessExprFunc());
-        _opExprFuncMap.put(ComparisonOperator.LESS_OR_EQUAL,new LessOrEqualExprFunc());
-        _opExprFuncMap.put(ComparisonOperator.GREATER,new GreaterExprFunc());
-        _opExprFuncMap.put(ComparisonOperator.GREATER_OR_EQUAL,new GreaterOrEqualExprFunc());
-
-        // "Life should be much better with functional programming language" - Hao Chen Nov 18th, 2014
-    }
-
-    private static interface BooleanExprFunc {
-        boolean eval(double val1,double val2);
-    }
-
-    private static class EqualExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 == val2;
-        }
-    }
-    private static class NotEqualExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 != val2;
-        }
-    }
-
-    private static class LessExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 < val2;
-        }
-    }
-    private static class LessOrEqualExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 <= val2;
-        }
-    }
-    private static class GreaterExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 > val2;
-        }
-    }
-    private static class GreaterOrEqualExprFunc implements BooleanExprFunc {
-        @Override
-        public boolean eval(double val1, double val2) {
-            return val1 >= val2;
-        }
-    }
-
-    public static class ExpressionEvaluationException extends RuntimeException{
-        public ExpressionEvaluationException(String message, Throwable cause) {
-            super(message, cause);
-        }
-        public ExpressionEvaluationException(String message) {
-            super(message);
-        }
-        public ExpressionEvaluationException(Throwable cause) {
-            super(cause);
-        }
-    }
-
-    @Override
-    public String toString() {
-        return this.getClass().getSimpleName()+" ("+this.filterEntity.toString()+")";
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/HBaseFilterBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/HBaseFilterBuilder.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/HBaseFilterBuilder.java
deleted file mode 100755
index 8209445..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/HBaseFilterBuilder.java
+++ /dev/null
@@ -1,585 +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.log.entity.filter;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.EntityQualifierUtils;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.query.parser.*;
-import org.apache.hadoop.hbase.filter.*;
-import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
-import org.apache.hadoop.hbase.filter.FilterList.Operator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.nio.charset.Charset;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * the steps of building hbase filters
- * 1. receive ORExpression from eagle-antlr
- * 2. iterate all ANDExpression in ORExpression
- *    2.1 put each ANDExpression to a new filter list with MUST_PASS_ONE option
- *    2.2 iterate all AtomicExpression in ANDExpression
- *       2.2.1 group AtomicExpression into 2 groups by looking up metadata, one is for tag filters, the other is for column filters
- *       2.2.2 put the above 2 filters to a filter list with MUST_PASS_ALL option
- */
-public class HBaseFilterBuilder {
-	private static final Logger LOG = LoggerFactory.getLogger(HBaseFilterBuilder.class);
-	
-	/**
-	 * syntax is @<fieldname>
-	 */
-//	private static final String fnRegex = "^@(.*)$";
-	private static final Pattern _fnPattern = TokenConstant.ID_PATTERN;// Pattern.compile(fnRegex);
-	private static final Charset _defaultCharset = Charset.forName("ISO-8859-1");
-
-	private ORExpression _orExpr;
-	private EntityDefinition _ed;
-	private boolean _filterIfMissing;
-	private Charset _charset = _defaultCharset;
-
-	/**
-	 * TODO: Verify performance impact
-	 *
-	 * @return
-	 */
-	public Set<String> getFilterFields() {
-		return _filterFields;
-	}
-
-	/**
-	 * Just add filter fields for expression filter
-	 */
-	private Set<String> _filterFields;
-
-	public HBaseFilterBuilder(EntityDefinition ed, ORExpression orExpr) {
-		this(ed, orExpr, false);
-	}
-	
-	public HBaseFilterBuilder(EntityDefinition ed, ORExpression orExpr, boolean filterIfMissing) {
-		this._ed = ed;
-		this._orExpr = orExpr;
-		this._filterIfMissing = filterIfMissing;
-	}
-	
-	public void setCharset(String charsetName){
-		_charset = Charset.forName(charsetName);
-	}
-	
-	public Charset getCharset(){
-		return _charset;
-	}
-	
-	/**
-	 * Because we don't have metadata for tag, we regard non-qualifer field as tag. So one field possibly is not a real tag when this function return true. This happens
-	 * when a user input an wrong field name which is neither tag or qualifier
-	 *   
-	 * @param field
-	 */
-	private boolean isTag(String field){
-		return _ed.isTag(field);
-	}
-	
-	/**
-	 * check whether this field is one entity attribute or not 
-	 * @param fieldName
-	 * @return
-	 */
-	private String parseEntityAttribute(String fieldName){
-		Matcher m = _fnPattern.matcher(fieldName);
-		if(m.find()){
-			return m.group(1);
-		}
-		return null;
-	}
-
-	/**
-	 * Return the partition values for each or expression. The size of the returned list should be equal to
-	 * the size of FilterList that {@link #buildFilters()} returns.
-	 * 
-	 * TODO: For now we don't support one query to query multiple partitions. In future if partition is defined, 
-	 * for the entity, internally We need to spawn multiple queries and send one query for each partition.
-	 * 
-	 * @return Return the partition values for each or expression. Return null if the entity doesn't support
-	 * partition
-	 */
-	public List<String[]> getPartitionValues() {
-		final String[] partitions = _ed.getPartitions();
-		if (partitions == null || partitions.length == 0) {
-			return null;
-		}
-		final List<String[]> result = new ArrayList<String[]>();
-		final Map<String, String> partitionKeyValueMap = new HashMap<String, String>();
-		for(ANDExpression andExpr : _orExpr.getANDExprList()) {
-			partitionKeyValueMap.clear();
-			for(AtomicExpression ae : andExpr.getAtomicExprList()) {
-				// TODO temporarily ignore those fields which are not for attributes
-				if(ae.getKeyType() == TokenType.ID) {
-					final String fieldName = parseEntityAttribute(ae.getKey());
-					if (fieldName == null) {
-						LOG.warn(fieldName + " field does not have format @<FieldName>, ignored");
-						continue;
-					}
-					if (_ed.isPartitionTag(fieldName) && ComparisonOperator.EQUAL.equals(ae.getOp())) {
-						final String value = ae.getValue();
-						partitionKeyValueMap.put(fieldName, value);
-					}
-				}
-			}
-			final String[] values = new String[partitions.length];
-			result.add(values);
-			for (int i = 0; i < partitions.length; ++i) {
-				final String partition = partitions[i];
-				final String value = partitionKeyValueMap.get(partition);
-				values[i] = value;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * @see org.apache.eagle.query.parser.TokenType
-	 *
-	 * @return
-	 */
-	public FilterList buildFilters(){
-		// TODO: Optimize to select between row filter or column filter for better performance
-		// Use row key filter priority by default
-		boolean rowFilterPriority = true;
-
-		FilterList fltList = new FilterList(Operator.MUST_PASS_ONE);
-		for(ANDExpression andExpr : _orExpr.getANDExprList()){
-			
-			FilterList list = new FilterList(Operator.MUST_PASS_ALL);
-			Map<String, List<String>> tagFilters = new HashMap<String, List<String>>();
-			List<QualifierFilterEntity> qualifierFilters = new ArrayList<QualifierFilterEntity>();
-//			List<QualifierFilterEntry> tagLikeQualifierFilters = new ArrayList<QualifierFilterEntry>();
-
-			// TODO refactor not to use too much if/else
-			for(AtomicExpression ae : andExpr.getAtomicExprList()){
-				// TODO temporarily ignore those fields which are not for attributes
-
-				String fieldName = ae.getKey();
-				if(ae.getKeyType() == TokenType.ID){
-					fieldName = parseEntityAttribute(fieldName);
-					if(fieldName == null){
-						LOG.warn(fieldName + " field does not have format @<FieldName>, ignored");
-						continue;
-					}
-				}
-
-				String value = ae.getValue();
-				ComparisonOperator op = ae.getOp();
-				TokenType keyType = ae.getKeyType();
-				TokenType valueType = ae.getValueType();
-				QualifierFilterEntity entry = new QualifierFilterEntity(fieldName,value,op,keyType,valueType);
-
-				// TODO Exact match, need to add escape for those special characters here, including:
-				// "-", "[", "]", "/", "{", "}", "(", ")", "*", "+", "?", ".", "\\", "^", "$", "|"
-
-				if(keyType == TokenType.ID && isTag(fieldName)){
-					if ((ComparisonOperator.EQUAL.equals(op) || ComparisonOperator.IS.equals(op))
-							&& !TokenType.NULL.equals(valueType))
-					{
-						// Use RowFilter for equal TAG
-						if(tagFilters.get(fieldName) == null) tagFilters.put(fieldName, new ArrayList<String>());
-						tagFilters.get(fieldName).add(value);
-					} else if (rowFilterPriority && ComparisonOperator.IN.equals(op))
-					{
-						// Use RowFilter here by default
-						if(tagFilters.get(fieldName) == null) tagFilters.put(fieldName, new ArrayList<String>());
-						tagFilters.get(fieldName).addAll(EntityQualifierUtils.parseList(value));
-					} else if (ComparisonOperator.LIKE.equals(op)
-						|| ComparisonOperator.NOT_LIKE.equals(op)
-						|| ComparisonOperator.CONTAINS.equals(op)
-						|| ComparisonOperator.NOT_CONTAINS.equals(op)
-						|| ComparisonOperator.IN.equals(op)
-						|| ComparisonOperator.IS.equals(op)
-						|| ComparisonOperator.IS_NOT.equals(op)
-						|| ComparisonOperator.NOT_EQUAL.equals(op)
-						|| ComparisonOperator.EQUAL.equals(op)
-						|| ComparisonOperator.NOT_IN.equals(op))
-					{
-						qualifierFilters.add(entry);
-					} else
-					{
-						LOG.warn("Don't support operation: \"" + op + "\" on tag field: " + fieldName + " yet, going to ignore");
-						throw new IllegalArgumentException("Don't support operation: "+op+" on tag field: "+fieldName+", avaliable options: =, =!, =~, !=~, in, not in, contains, not contains");
-					}
-				}else{
-					qualifierFilters.add(entry);
-				}
-			}
-
-			// Build RowFilter for equal tags
-			list.addFilter(buildTagFilter(tagFilters));
-
-			// Build SingleColumnValueFilter
-			FilterList qualifierFilterList = buildQualifierFilter(qualifierFilters);
-			if(qualifierFilterList != null && qualifierFilterList.getFilters().size()>0){
-				list.addFilter(qualifierFilterList);
-			}else {
-				if(LOG.isDebugEnabled()) LOG.debug("Ignore empty qualifier filter from "+qualifierFilters.toString());
-			}
-			fltList.addFilter(list);
-		}
-		LOG.info("Query: " + _orExpr.toString() + " => Filter: " + fltList.toString());
-		return fltList;
-	}
-	
-	/**
-	 * _charset is used to decode the byte array, in hbase server, RegexStringComparator uses the same
-	 * charset to decode the byte array stored in qualifier
-	 * for tag filter regex, it's always ISO-8859-1 as it only comes from String's hashcode (Integer)
-	 * Note: regex comparasion is to compare String
-	 */
-	protected Filter buildTagFilter(Map<String, List<String>> tagFilters){
-		RegexStringComparator regexStringComparator = new RegexStringComparator(buildTagFilterRegex(tagFilters));
-		regexStringComparator.setCharset(_charset);
-		RowFilter filter = new RowFilter(CompareOp.EQUAL, regexStringComparator);
-		return filter;
-	}
-	
-	/**
-	 * all qualifiers' condition must be satisfied.
-	 *
-	 * <H1>Use RegexStringComparator for:</H1>
-	 *      IN
-	 *      LIKE
-	 *      NOT_LIKE
-	 *
-	 * <H1>Use SubstringComparator for:</H1>
-	 *      CONTAINS
-	 *
-	 * <H1>Use EntityQualifierHelper for:</H1>
-	 *      EQUALS
-	 *      NOT_EUQALS
-	 *      LESS
-	 *      LESS_OR_EQUAL
-	 *      GREATER
-	 *      GREATER_OR_EQUAL
-	 *
-	 * <H2>
-	 *     TODO: Compare performance of RegexStringComparator ,SubstringComparator ,EntityQualifierHelper
-	 * </H2>
-	 *
-	 * @param qualifierFilters
-	 * @return
-	 */
-	protected FilterList buildQualifierFilter(List<QualifierFilterEntity> qualifierFilters){
-		FilterList list = new FilterList(Operator.MUST_PASS_ALL);
-		// iterate all the qualifiers
-		for(QualifierFilterEntity entry : qualifierFilters){
-			// if contains expression based filter
-			if(entry.getKeyType() == TokenType.EXP
-					|| entry.getValueType() == TokenType.EXP
-					|| entry.getKeyType() != TokenType.ID){
-				if(!EagleConfigFactory.load().isCoprocessorEnabled()) {
-					LOG.warn("Expression in filter may not support, because custom filter and coprocessor is disabled: " + entry.toString());
-				}
-				list.addFilter(buildExpressionBasedFilter(entry));
-				continue;
-			}
-
-			// else using SingleColumnValueFilter
-			String qualifierName = entry.getKey();
-			if(!isTag(entry.getKey())){
-				Qualifier qualifier = _ed.getDisplayNameMap().get(entry.getKey());
-				qualifierName = qualifier.getQualifierName();
-			}
-
-			// Comparator to be used for building HBase Filter
-			// WritableByteArrayComparable comparator;
-            ByteArrayComparable comparable;
-			if(ComparisonOperator.IN.equals(entry.getOp())
-				|| ComparisonOperator.NOT_IN.equals(entry.getOp())){
-				Filter setFilter = buildListQualifierFilter(entry);
-				if(setFilter!=null){
-					list.addFilter(setFilter);
-				}
-			}else{
-				// If [=,!=,is,is not] NULL, use NullComparator else throw exception
-				if(TokenType.NULL.equals(entry.getValueType())){
-					if(ComparisonOperator.EQUAL.equals(entry.getOp())
-						||ComparisonOperator.NOT_EQUAL.equals(entry.getOp())
-						||ComparisonOperator.IS.equals(entry.getOp())
-						||ComparisonOperator.IS_NOT.equals(entry.getOp()))
-                        comparable = new NullComparator();
-					else
-						throw new IllegalArgumentException("Operation: "+entry.getOp()+" with NULL is not supported yet: "+entry.toString()+", avaliable options: [=, !=, is, is not] null|NULL");
-				}
-				// If [contains, not contains],use SubstringComparator
-				else if (ComparisonOperator.CONTAINS.equals(entry.getOp())
-					|| ComparisonOperator.NOT_CONTAINS.equals(entry.getOp())) {
-                    comparable = new SubstringComparator(entry.getValue());
-				}
-				// If [like, not like], use RegexStringComparator
-				else if (ComparisonOperator.LIKE.equals(entry.getOp())
-						|| ComparisonOperator.NOT_LIKE.equals(entry.getOp())){
-					// Use RegexStringComparator for LIKE / NOT_LIKE
-					RegexStringComparator _comparator = new RegexStringComparator(buildQualifierRegex(entry.getValue()));
-					_comparator.setCharset(_charset);
-                    comparable = _comparator;
-				} else{
-					Class type = EntityQualifierUtils.getType(_ed, entry.getKey());
-					// if type is null (is Tag or not found) or not defined for TypedByteArrayComparator
-					if(!EagleConfigFactory.load().isCoprocessorEnabled() || type == null || TypedByteArrayComparator.get(type) == null){
-                        comparable = new BinaryComparator(EntityQualifierUtils.toBytes(_ed, entry.getKey(), entry.getValue()));
-					}else {
-                        comparable = new TypedByteArrayComparator(EntityQualifierUtils.toBytes(_ed, entry.getKey(), entry.getValue()),type);
-					}
-				}
-
-				SingleColumnValueFilter filter =
-						new SingleColumnValueFilter(_ed.getColumnFamily().getBytes(), qualifierName.getBytes(), convertToHBaseCompareOp(entry.getOp()), comparable);
-				filter.setFilterIfMissing(_filterIfMissing);
-				list.addFilter(filter);
-			}
-		}
-
-		return list;
-	}
-
-	private Filter buildExpressionBasedFilter(QualifierFilterEntity entry) {
-		BooleanExpressionComparator expressionComparator  = new BooleanExpressionComparator(entry,_ed);
-		_filterFields = expressionComparator.getRequiredFields();
-		RowValueFilter filter = new RowValueFilter(expressionComparator);
-		return filter;
-	}
-
-	/**
-	 * Currently use BinaryComparator only
-	 * <h2>TODO: </h2>
-	 * Possibility to tune performance by using: OR[BinaryComparator,...] instead of RegexStringComparator?
-	 *
-	 *<br/> <br/>
-	 *
-	 * ! Check op must be IN or NOTIN in caller
-	 *
-	 * @param entry
-	 * @return
-	 */
-	private Filter buildListQualifierFilter(QualifierFilterEntity entry){
-		List<String> valueSet = EntityQualifierUtils.parseList(entry.getValue());
-		Iterator<String> it = valueSet.iterator();
-		String fieldName = entry.getKey();
-		String qualifierName = fieldName;
-		if(!_ed.isTag(entry.getKey())){
-			qualifierName = _ed.getDisplayNameMap().get(entry.getKey()).getQualifierName();
-		}
-
-// TODO: Try to use RegExp just work if possible
-// Because single SingleColumnValueFilter is much faster than multi SingleColumnValueFilters in OR list.
-//		Class qualifierType = EntityQualifierHelper.getType(_ed,fieldName);
-//		if( qualifierType == null || qualifierType == String.class){
-//			boolean first = true;
-//			StringBuilder filterRegex = new StringBuilder();
-//			filterRegex.append("^(");
-//			while(it.hasNext()) {
-//				String value = it.next();
-//				if(value == null) {
-//					logger.warn("ignore empty value in set qualifier filter: "+entry.toString());
-//					continue;
-//				}
-//				if(!first) filterRegex.append("|");
-//				filterRegex.append(value);
-//				first = false;
-//			}
-//			filterRegex.append(")$");
-//			RegexStringComparator regexStringComparator = new RegexStringComparator(filterRegex.toString());
-//			return new SingleColumnValueFilter(_ed.getColumnFamily().getBytes(), qualifierName.getBytes(),
-//					convertToHBaseCompareOp(entry.getOp()), regexStringComparator);
-//		}else{
-		FilterList setFilterList;
-		if(ComparisonOperator.IN.equals(entry.getOp())){
-			setFilterList = new FilterList(Operator.MUST_PASS_ONE);
-		}else if(ComparisonOperator.NOT_IN.equals(entry.getOp())) {
-			setFilterList = new FilterList(Operator.MUST_PASS_ALL);
-		}else{
-			throw new IllegalArgumentException(String.format("Don't support operation: %s on LIST type of value yet: %s, valid options: IN/NOT IN [LIST]",entry.getOp(),entry.toString()));
-		}
-
-		while(it.hasNext()) {
-			String value = it.next();
-			BinaryComparator comparator = new BinaryComparator(EntityQualifierUtils.toBytes(_ed, fieldName, value));
-			SingleColumnValueFilter filter =
-					new SingleColumnValueFilter(_ed.getColumnFamily().getBytes(), qualifierName.getBytes(), convertToHBaseCompareOp(entry.getOp()), comparator);
-			filter.setFilterIfMissing(_filterIfMissing);
-			setFilterList.addFilter(filter);
-		}
-
-		return setFilterList;
-//		}
-	}
-
-	/**
-	 * Just used for LIKE and NOT_LIKE
-	 *
-	 * @param qualifierValue
-	 * @return
-	 */
-	protected String buildQualifierRegex(String qualifierValue){
-		StringBuilder sb = new StringBuilder();
-//		sb.append("(?s)");
-		sb.append("^");
-		sb.append(qualifierValue);
-		sb.append("$");
-		return sb.toString();
-	}
-	
-	  /**
-	   * Appends the given ID to the given buffer, followed by "\\E".
-	   * [steal it from opentsdb, thanks opentsdb :) https://github.com/OpenTSDB/opentsdb/blob/master/src/core/TsdbQuery.java]
-	   */
-	  private static void addId(final StringBuilder buf, final byte[] id) {
-		buf.append("\\Q");
-	    boolean backslash = false;
-	    for (final byte b : id) {
-	      buf.append((char) (b & 0xFF));
-	      if (b == 'E' && backslash) {  // If we saw a `\' and now we have a `E'.
-	        // So we just terminated the quoted section because we just added \E
-	        // to `buf'.  So let's put a litteral \E now and start quoting again.
-	        buf.append("\\\\E\\Q");
-	      } else {
-	        backslash = b == '\\';
-	      }
-	    }
-	    buf.append("\\E");
-	  }
-	  
-	  @SuppressWarnings("unused")
-	  private static void addId(final StringBuilder buf, final String id) {
-		    buf.append("\\Q");
-		  	int len = id.length()-1;
-		    boolean backslash = false;
-		    for (int i =0; i < len; i++) {
-		      char c = id.charAt(i);
-		      buf.append(c);
-		      if (c == 'E' && backslash) {  // If we saw a `\' and now we have a `E'.
-		        // So we just terminated the quoted section because we just added \E
-		        // to `buf'.  So let's put a litteral \E now and start quoting again.
-		        buf.append("\\\\E\\Q");
-		      } else {
-		        backslash = c == '\\';
-		      }
-		    }
-		    buf.append("\\E");
-		  }
-	
-	/**
-	 * one search tag may have multiple values which have OR relationship, and relationship between
-	 * different search tags is AND
-	 * the query is like "(TAG1=value11 OR TAG1=value12) AND TAG2=value2"
-	 * @param tags
-	 * @return
-	 */
-	protected String buildTagFilterRegex(Map<String, List<String>> tags){
-		// TODO need consider that \E could be part of tag, refer to https://github.com/OpenTSDB/opentsdb/blob/master/src/core/TsdbQuery.java
-		final SortedMap<Integer, List<Integer>> tagHash = new TreeMap<Integer, List<Integer>>();
-		final int numOfPartitionFields = (_ed.getPartitions() == null) ? 0 : _ed.getPartitions().length;
-		for(Map.Entry<String, List<String>> entry : tags.entrySet()){
-			String tagName = entry.getKey();
-			// Ignore tag if the tag is one of partition fields
-			if (_ed.isPartitionTag(tagName)) {
-				continue;
-			}
-			List<String> stringValues = entry.getValue();
-			List<Integer> hashValues = new ArrayList<Integer>(stringValues.size());
-			for(String value : stringValues){
-				hashValues.add(value.hashCode());
-			}
-			tagHash.put(tagName.hashCode(), hashValues);
-		}
-		
-		// header = prefix(4 bytes) + partition_hashes(4*N bytes) + timestamp (8 bytes)
-		final int headerLength = 4 + numOfPartitionFields * 4 + 8;
-
-		// <tag1:4><value1:4> ... <tagn:4><valuen:4>
-		StringBuilder sb = new StringBuilder();
-		sb.append("(?s)");
-		sb.append("^(?:.{").append(headerLength).append("})");
-		sb.append("(?:.{").append(8).append("})*"); // for any number of tags
-		for (Map.Entry<Integer, List<Integer>> entry : tagHash.entrySet()) {
-			try {
-				addId(sb, ByteUtil.intToBytes(entry.getKey()));
-				List<Integer> hashValues = entry.getValue();
-				sb.append("(?:");
-				boolean first = true;
-				for(Integer value : hashValues){
-					if(!first){
-						sb.append('|');
-					}
-					addId(sb, ByteUtil.intToBytes(value));
-					first = false;
-				}
-				sb.append(")");
-				sb.append("(?:.{").append(8).append("})*"); // for any number of tags
-			} catch (Exception ex) {
-				LOG.error("constructing regex error", ex);
-			}
-		}
-		sb.append("$");
-		if(LOG.isDebugEnabled()) LOG.debug("Tag filter pattern is " + sb.toString());
-		return sb.toString();
-	}
-
-	/**
-	 * Convert ComparisonOperator to native HBase CompareOp
-	 *
-	 * Support:
-	 *      =, =~,CONTAINS,<,<=,>,>=,!=,!=~
-	 *
-	 * @param comp
-	 * @return
-	 */
-	protected static CompareOp convertToHBaseCompareOp(ComparisonOperator comp) {
-		if(comp == ComparisonOperator.EQUAL || comp == ComparisonOperator.LIKE
-				|| comp == ComparisonOperator.CONTAINS
-				|| comp == ComparisonOperator.IN
-				|| comp == ComparisonOperator.IS
-				) {
-			return CompareOp.EQUAL;
-		}else if(comp == ComparisonOperator.LESS) {
-			return CompareOp.LESS;
-		} else if(comp == ComparisonOperator.LESS_OR_EQUAL){
-			return CompareOp.LESS_OR_EQUAL;
-		}else if(comp == ComparisonOperator.GREATER) {
-			return CompareOp.GREATER;
-		} else if(comp == ComparisonOperator.GREATER_OR_EQUAL){
-			return CompareOp.GREATER_OR_EQUAL;
-		} else if(comp == ComparisonOperator.NOT_EQUAL
-				|| comp == ComparisonOperator.NOT_LIKE
-				|| comp == ComparisonOperator.NOT_CONTAINS
-				|| comp == ComparisonOperator.IS_NOT
-				|| comp == ComparisonOperator.NOT_IN)
-		{
-			return CompareOp.NOT_EQUAL;
-		} else {
-			LOG.error("{} operation is not supported now\n", comp);
-			throw new IllegalArgumentException("Illegal operation: "+comp+ ", avaliable options: "+ Arrays.toString(ComparisonOperator.values()));
-		}
-	}
-
-	protected static CompareOp getHBaseCompareOp(String comp) {
-		return convertToHBaseCompareOp(ComparisonOperator.locateOperator(comp));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/QualifierFilterEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/QualifierFilterEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/QualifierFilterEntity.java
deleted file mode 100755
index 6cdc77b..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/QualifierFilterEntity.java
+++ /dev/null
@@ -1,105 +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.log.entity.filter;
-
-import org.apache.eagle.query.parser.ComparisonOperator;
-import org.apache.eagle.query.parser.TokenType;
-import org.apache.hadoop.io.Writable;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-public class QualifierFilterEntity implements Writable{
-	public String key;
-	public String value;
-	public ComparisonOperator op;
-	public TokenType valueType;
-	public TokenType keyType;
-
-	public QualifierFilterEntity(){}
-	public QualifierFilterEntity(String key, String value, ComparisonOperator comp, TokenType keyType, TokenType valueType) {
-		super();
-		this.key = key;
-		this.value = value;
-		this.op = comp;
-		this.keyType = keyType;
-		this.valueType = valueType;
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public void setKey(String key) {
-		this.key = key;
-	}
-
-	public String getValue() {
-		return value;
-	}
-
-	public void setValue(String value) {
-		this.value = value;
-	}
-
-	public ComparisonOperator getOp() {
-		return op;
-	}
-
-	public void setOp(ComparisonOperator op) {
-		this.op = op;
-	}
-
-	public TokenType getValueType() {
-		return valueType;
-	}
-
-	public void setValueType(TokenType valueType) {
-		this.valueType = valueType;
-	}
-
-	public void setKeyType(TokenType keyType){
-		this.keyType = keyType;
-	}
-	public TokenType getKeyType(){
-		return this.keyType;
-	}
-
-	@Override
-	public String toString() {
-		return String.format("%s %s %s",this.key,this.op,this.value);
-	}
-
-	@Override
-	public void write(DataOutput out) throws IOException {
-		out.writeUTF(this.key);
-		out.writeUTF(this.getValue());
-		out.writeUTF(this.op.name());
-		out.writeUTF(this.keyType.name());
-		out.writeUTF(this.valueType.name());
-	}
-
-	@Override
-	public void readFields(DataInput in) throws IOException {
-		this.key = in.readUTF();
-		this.value = in.readUTF();
-		this.op = ComparisonOperator.valueOf(in.readUTF());
-		this.keyType = TokenType.valueOf(in.readUTF());
-		this.valueType = TokenType.valueOf(in.readUTF());
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/RowValueFilter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/RowValueFilter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/RowValueFilter.java
deleted file mode 100755
index a4b97ea..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/RowValueFilter.java
+++ /dev/null
@@ -1,144 +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.log.entity.filter;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.exceptions.DeserializationException;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FilterBase;
-import org.apache.hadoop.io.WritableComparable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * TODO: Critical performance problem!!!
- * TODO: Refactor to specified multi-column filter so that avoid return all qualifier columns from region server to client side
- *
- * @since 2014/11/17
- */
-public class RowValueFilter extends FilterBase {
-    private final static Logger LOG = LoggerFactory.getLogger(RowValueFilter.class);
-    private boolean filterOutRow = false;
-    private WritableComparable<List<KeyValue>> comparator;
-
-    // TODO: Use qualifiers to reduce network tranfer
-//    private List<byte[]> qualifiers;
-    public RowValueFilter(){}
-
-    /**
-     * Filter out row if WritableComparable.compareTo return 0
-     * @param comparator <code>WritableComparable[List[KeyValue]]</code>
-     */
-    public RowValueFilter(WritableComparable<List<KeyValue>> comparator){
-        this.comparator = comparator;
-    }
-
-//    public RowValueFilter(List<byte[]> qualifiers,WritableComparable<List<KeyValue>> comparator){
-//        this.qualifiers = qualifiers;
-//        this.comparator = comparator;
-//    }
-
-    /**
-     * Old interface in hbase-0.94
-     *
-     * @param out
-     * @throws IOException
-     */
-    @Deprecated
-    public void write(DataOutput out) throws IOException {
-        this.comparator.write(out);
-    }
-
-    /**
-     * Old interface in hbase-0.94
-     *
-     * @param in
-     * @throws IOException
-     */
-//    @Override
-    @Deprecated
-    public void readFields(DataInput in) throws IOException {
-        this.comparator = new BooleanExpressionComparator();
-        this.comparator.readFields(in);
-    }
-
-    /**
-     * TODO: Currently still use older serialization method from hbase-0.94, need to migrate into ProtoBuff based
-     *
-     * @return
-     * @throws IOException
-     */
-    @Override
-    public byte[] toByteArray() throws IOException {
-        ByteArrayDataOutput byteArrayDataOutput = ByteStreams.newDataOutput();
-        this.comparator.write(byteArrayDataOutput);
-        return byteArrayDataOutput.toByteArray();
-    }
-
-    /**
-     * TODO: Currently still use older serialization method from hbase-0.94, need to migrate into ProtoBuff based
-     */
-    // Override static method
-    public static Filter parseFrom(final byte [] pbBytes) throws DeserializationException {
-        ByteArrayDataInput byteArrayDataInput = ByteStreams.newDataInput(pbBytes);
-        RowValueFilter filter = new RowValueFilter();
-        try {
-            filter.readFields(byteArrayDataInput);
-        } catch (IOException e) {
-            LOG.error("Got error to deserialize RowValueFilter from PB bytes",e);
-            throw new DeserializationException(e);
-        }
-        return filter;
-    }
-
-    @Override
-    public boolean hasFilterRow(){
-        return true;
-    }
-
-    @Override
-    public void filterRow(List<KeyValue> row) {
-        filterOutRow = (this.comparator.compareTo(row) == 0);
-    }
-
-    @Override
-    public void reset() {
-        this.filterOutRow = false;
-    }
-
-    @Override
-    public boolean filterRow(){
-        return filterOutRow;
-    }
-
-    @Override
-    public String toString() {
-        return super.toString()+" ( "+this.comparator.toString()+" )";
-    }
-
-//    public List<byte[]> getQualifiers() {
-//        return qualifiers;
-//    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/TypedByteArrayComparator.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/TypedByteArrayComparator.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/TypedByteArrayComparator.java
deleted file mode 100755
index ecaf8cc..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/filter/TypedByteArrayComparator.java
+++ /dev/null
@@ -1,213 +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.log.entity.filter;
-
-import com.google.common.io.ByteArrayDataInput;
-import com.google.common.io.ByteArrayDataOutput;
-import com.google.common.io.ByteStreams;
-import org.apache.hadoop.hbase.exceptions.DeserializationException;
-import org.apache.hadoop.hbase.filter.ByteArrayComparable;
-import org.apache.hadoop.io.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * <h1>TypedByteArrayComparator</h1>
- *
- * Compare byte array: <code>byte[] value</code> with class type: <code>Class type</code>
- *
- * <br/>
- * <br/>
- * Built-in support:
- *
- *  <pre>
- *    Double
- *    double
- *    Integer
- *    int
- *    Long
- *    long
- *    Short
- *    short
- *    Boolean
- *    boolean
- *  </pre>
- *
- *  And can be extend by defining new {@link RawComparator} and register with  {@link #define(Class type, RawComparator comparator)}
- * <br/>
- * <br/>
- */
-public class TypedByteArrayComparator extends ByteArrayComparable {
-    private final static Logger LOG = LoggerFactory.getLogger(TypedByteArrayComparator.class);
-
-    private Class type;
-
-    // Not need to be writable
-    private RawComparator comparator;
-
-    /**
-     * Default constructor for writable
-     */
-    @SuppressWarnings("unused")
-    public TypedByteArrayComparator(){
-        super(null);
-    }
-
-    public TypedByteArrayComparator(byte[] value, Class type){
-        super(value);
-        this.type = type;
-        this.comparator = get(this.type);
-        if(this.comparator == null) throw new IllegalArgumentException("No comparator found for class: "+type);
-    }
-
-    /**
-     * @param in hbase-0.94 interface
-     * @throws IOException
-     */
-//    @Override
-    public void readFields(DataInput in) throws IOException {
-//        super.readFields(in);
-        try {
-            String _type = in.readUTF();
-            type = _primitiveTypeClassMap.get(_type);
-            if(type == null) {
-                type = Class.forName(_type);
-            }
-            comparator = get(type);
-            if(comparator == null) throw new IllegalArgumentException("No comparator found for class: "+type);
-        } catch (ClassNotFoundException e) {
-            throw new IOException(e.getMessage(),e);
-        }
-    }
-
-    /**
-     * @param out hbase-0.94 interface
-     * @throws IOException
-     */
-//    @Override
-    public void write(DataOutput out) throws IOException {
-//        super.write(out);
-        String typeName = type.getName();
-        out.writeUTF(typeName);
-    }
-
-    /**
-     * For hbase 0.98
-     *
-     * @return serialized byte array
-     */
-    @Override
-    public byte[] toByteArray() {
-        ByteArrayDataOutput byteArrayDataOutput = ByteStreams.newDataOutput();
-        try {
-            this.write(byteArrayDataOutput);
-            return byteArrayDataOutput.toByteArray();
-        } catch (IOException e) {
-            LOG.error("Failed to serialize due to: "+e.getMessage(),e);
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * For hbase 0.98
-     *
-     * @param bytes raw byte array
-     * @return Comparator instance
-     * @throws DeserializationException
-     */
-    public static TypedByteArrayComparator parseFrom(final byte [] bytes)
-            throws DeserializationException {
-        TypedByteArrayComparator comparator = new TypedByteArrayComparator();
-        ByteArrayDataInput byteArrayDataInput = ByteStreams.newDataInput(bytes);
-        try {
-            comparator.readFields(byteArrayDataInput);
-        } catch (IOException e) {
-            LOG.error("Got error to deserialize TypedByteArrayComparator from PB bytes",e);
-            throw new DeserializationException(e);
-        }
-        return comparator;
-    }
-
-    @Override
-    public int compareTo(byte[] value, int offset, int length) {
-        return this.comparator.compare(this.getValue(), 0, this.getValue().length, value, offset, length);
-    }
-
-    /**
-     * <ol>
-     * <li>Try registered comparator</li>
-     * <li>If not found, try all possible WritableComparator</li>
-     * </ol>
-     *
-     * If not found finally, throw new IllegalArgumentException("unable to get comparator for class: "+type);
-     *
-     * @param type value type class
-     * @return RawComparator
-     */
-    public static RawComparator get(Class type){
-        RawComparator comparator = null;
-        try {
-            comparator = _typedClassComparator.get(type);
-        }catch (ClassCastException ex){
-            // ignore
-        }
-        try {
-            if (comparator == null) comparator = WritableComparator.get(type);
-        }catch (ClassCastException ex){
-            // ignore
-        }
-        return comparator;
-    }
-
-    private final static Map<Class,RawComparator> _typedClassComparator = new HashMap<Class, RawComparator>();
-    public static void define(Class type, RawComparator comparator){
-        _typedClassComparator.put(type,comparator);
-    }
-
-    static{
-        define(Double.class, WritableComparator.get(DoubleWritable.class));
-        define(double.class, WritableComparator.get(DoubleWritable.class));
-        define(Integer.class, WritableComparator.get(IntWritable.class));
-        define(int.class, WritableComparator.get(IntWritable.class));
-        define(Long.class, WritableComparator.get(LongWritable.class));
-        define(long.class, WritableComparator.get(LongWritable.class));
-        define(Short.class, WritableComparator.get(ShortWritable.class));
-        define(short.class, WritableComparator.get(ShortWritable.class));
-        define(Boolean.class, WritableComparator.get(BooleanWritable.class));
-        define(boolean.class, WritableComparator.get(BooleanWritable.class));
-    }
-
-    /**
-     * Because {@link Class#forName } can't find class for primitive type
-     */
-    private final static Map<String,Class> _primitiveTypeClassMap = new HashMap<String, Class>();
-    static {
-        _primitiveTypeClassMap.put(int.class.getName(),int.class);
-        _primitiveTypeClassMap.put(double.class.getName(),double.class);
-        _primitiveTypeClassMap.put(long.class.getName(),long.class);
-        _primitiveTypeClassMap.put(short.class.getName(),short.class);
-        _primitiveTypeClassMap.put(boolean.class.getName(),boolean.class);
-        _primitiveTypeClassMap.put(char.class.getName(),char.class);
-        _primitiveTypeClassMap.put(byte.class.getName(),byte.class);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexLogReader.java
deleted file mode 100755
index 418ab33..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexLogReader.java
+++ /dev/null
@@ -1,45 +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.log.entity.index;
-
-import org.apache.eagle.log.entity.LogReader;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FilterList;
-import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
-
-public abstract class IndexLogReader implements LogReader {
-
-	// TODO: Work around https://issues.apache.org/jira/browse/HBASE-2198. More graceful implementation should use SingleColumnValueExcludeFilter, 
-	// but it's complicated in current implementation. 
-	protected static void workaroundHBASE2198(Get get, Filter filter,byte[][] qualifiers) {
-		if (filter instanceof SingleColumnValueFilter) {
-			if(qualifiers == null) {
-				get.addFamily(((SingleColumnValueFilter) filter).getFamily());
-			}else{
-				get.addColumn(((SingleColumnValueFilter) filter).getFamily(), ((SingleColumnValueFilter) filter).getQualifier());
-			}
-			return;
-		}
-		if (filter instanceof FilterList) {
-			for (Filter f : ((FilterList)filter).getFilters()) {
-				workaroundHBASE2198(get, f,qualifiers);
-			}
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexStreamReader.java
deleted file mode 100755
index 9e059f2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/IndexStreamReader.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity.index;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.*;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-
-public abstract class IndexStreamReader  extends StreamReader {
-	protected final IndexDefinition indexDef;
-	protected final SearchCondition condition;
-	protected final List<byte[]> indexRowkeys;
-	protected LogReader<InternalLog> reader;
-	protected long lastTimestamp = 0;
-	protected long firstTimestamp = 0;
-	
-	protected static final Logger LOG = LoggerFactory.getLogger(IndexStreamReader.class);
-
-	public IndexStreamReader(IndexDefinition indexDef, SearchCondition condition, List<byte[]> indexRowkeys) {
-		this.indexDef = indexDef;
-		this.condition = condition;
-		this.indexRowkeys = indexRowkeys;
-		this.reader = null;
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return this.firstTimestamp;
-	}
-
-	@Override
-	public void readAsStream() throws Exception {
-		if (reader == null) {
-			reader = createIndexReader();
-		}
-		final EntityDefinition entityDef = indexDef.getEntityDefinition();
-		try{
-			reader.open();
-			InternalLog log;
-			int count = 0;
-			while ((log = reader.read()) != null) {
-				TaggedLogAPIEntity entity = HBaseInternalLogHelper.buildEntity(log, entityDef);
-				entity.setSerializeAlias(condition.getOutputAlias());
-				entity.setSerializeVerbose(condition.isOutputVerbose());
-
-				if (lastTimestamp == 0 || lastTimestamp < entity.getTimestamp()) {
-					lastTimestamp = entity.getTimestamp();
-				}
-				if(firstTimestamp == 0 || firstTimestamp > entity.getTimestamp()){
-					firstTimestamp = entity.getTimestamp();
-				}
-				for(EntityCreationListener l : _listeners){
-					l.entityCreated(entity);
-				}
-				if(++count == condition.getPageSize()) {
-					break;
-				}
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail reading log", ioe);
-			throw ioe;
-		}finally{
-			reader.close();
-		}		
-	}
-
-	protected abstract LogReader createIndexReader();
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexLogReader.java
deleted file mode 100755
index e6a5c96..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexLogReader.java
+++ /dev/null
@@ -1,197 +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.log.entity.index;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.hadoop.hbase.client.*;
-import org.apache.hadoop.hbase.filter.Filter;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class NonClusteredIndexLogReader extends IndexLogReader {
-	private final IndexDefinition indexDef;
-	private final List<byte[]> indexRowkeys;
-	private final byte[][] qualifiers;
-	private final Filter filter;
-	private HTableInterface tbl;
-	private boolean isOpen = false;
-	private Result[] results;
-	private int index = -1;
-	private final List<Scan> scans;
-	private int currentScanIndex = 0;
-	private ResultScanner currentResultScanner;
-
-	// Max tag key/value. 
-	private static final byte[] MAX_TAG_VALUE_BYTES = {(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF,(byte) 0XFF};
-	private static final int BATCH_MULTIGET_SIZE = 1000;
-
-	public NonClusteredIndexLogReader(IndexDefinition indexDef, List<byte[]> indexRowkeys, byte[][] qualifiers, Filter filter) {
-		this.indexDef = indexDef;
-		this.indexRowkeys = indexRowkeys;
-		this.qualifiers = qualifiers;
-		this.filter = filter;
-		this.scans = buildScans();
-	}
-	
-
-	private List<Scan> buildScans() {
-		final ArrayList<Scan> result = new ArrayList<Scan>(indexRowkeys.size());
-		for (byte[] rowkey : indexRowkeys) {
-			Scan s = new Scan();
-			s.setStartRow(rowkey);
-			// In rowkey the tag key/value is sorted by the hash code of the key, so MAX_TAG_VALUE_BYTES is enough as the end key
-			final byte[] stopRowkey = ByteUtil.concat(rowkey, MAX_TAG_VALUE_BYTES);
-			s.setStopRow(stopRowkey);
-			// TODO the # of cached rows should be minimum of (pagesize and 100)
-			int cs = EagleConfigFactory.load().getHBaseClientScanCacheSize();
-			s.setCaching(cs);
-			// TODO not optimized for all applications
-			s.setCacheBlocks(true);
-			// scan specified columnfamily for all qualifiers
-			s.addFamily(indexDef.getEntityDefinition().getColumnFamily().getBytes());
-			result.add(s);
-		}
-		return result;
-	}
-
-	@Override
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(indexDef.getEntityDefinition().getTable());
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-		currentScanIndex = 0;
-		openNewScan();
-		fillResults();
-	}
-
-	private boolean openNewScan() throws IOException {
-		closeCurrentScanResult();
-		if (currentScanIndex >= scans.size()) {
-			return false;
-		}
-		final Scan scan = scans.get(currentScanIndex++);
-		currentResultScanner = tbl.getScanner(scan);
-		return true;
-	}
-
-	private void fillResults() throws IOException {
-		if (currentResultScanner == null) {
-			return;
-		}
-		index = 0;
-		int count = 0;
-		Result r = null;
-        final List<Get> gets = new ArrayList<Get>(BATCH_MULTIGET_SIZE);
-		final byte[] family = indexDef.getEntityDefinition().getColumnFamily().getBytes();
-		while (count < BATCH_MULTIGET_SIZE) {
-			r = currentResultScanner.next();
-			if (r == null) {
-				if (openNewScan()) {
-					continue;
-				} else {
-					break;
-				}
-			}
-			for (byte[] rowkey : r.getFamilyMap(family).keySet()) {
-				if (rowkey.length == 0) {	// invalid rowkey
-					continue;
-				}
-				final Get get = new Get(rowkey);
-                if (filter != null) {
-                	get.setFilter(filter);
-                }
-				if(qualifiers != null) {
-					for (int j = 0; j < qualifiers.length; ++j) {
-						// Return the specified qualifiers
-						get.addColumn(family, qualifiers[j]);
-					}
-				}else {
-					get.addFamily(family);
-				}
-        		workaroundHBASE2198(get, filter,qualifiers);
-				gets.add(get);
-				++count;
-			}
-		}
-		if (count == 0) {
-			results = null;
-			return;
-		}
-		results = tbl.get(gets);
-		if (results == null || results.length == 0) {
-			fillResults();
-		}
-	}
-
-
-	private void closeCurrentScanResult() {
-		if (currentResultScanner != null) {
-			currentResultScanner.close();
-			currentResultScanner = null;
-		}
-	}
-
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-		closeCurrentScanResult();
-	}
-
-	@Override
-	public InternalLog read() throws IOException {
-		if (tbl == null) {
-			throw new IllegalArgumentException("Haven't open before reading");
-		}
-		
-		Result r = null;
-		InternalLog t = null;
-		while ((r = getNextResult()) != null) {
-			if (r.getRow() == null) {
-				continue;
-			}
-			t = HBaseInternalLogHelper.parse(indexDef.getEntityDefinition(), r, qualifiers);
-			break;
-		}
-		return t;
-	}
-
-
-	private Result getNextResult() throws IOException {
-		if (results == null || results.length == 0 || index >= results.length) {
-			fillResults();
-		}
-		if (results == null || results.length == 0 || index >= results.length) {
-			return null;
-		}
-		return results[index++];
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexStreamReader.java
deleted file mode 100755
index ec5631a..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/NonClusteredIndexStreamReader.java
+++ /dev/null
@@ -1,51 +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.log.entity.index;
-
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.LogReader;
-import org.apache.eagle.log.entity.SearchCondition;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.log.entity.meta.IndexDefinition.IndexType;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class NonClusteredIndexStreamReader extends IndexStreamReader {
-	public NonClusteredIndexStreamReader(IndexDefinition indexDef, SearchCondition condition) {
-		super(indexDef, condition, new ArrayList<byte[]>());
-		final IndexType type = indexDef.canGoThroughIndex(condition.getQueryExpression(), indexRowkeys);
-		if (!IndexType.NON_CLUSTER_INDEX.equals(type)) {
-			throw new IllegalArgumentException("This query can't go through index: " + condition.getQueryExpression());
-		}
-	}
-
-	public NonClusteredIndexStreamReader(IndexDefinition indexDef, SearchCondition condition, List<byte[]> indexRowkeys) {
-		super(indexDef, condition, indexRowkeys);
-	}
-
-	@Override
-	protected LogReader createIndexReader() {
-		final EntityDefinition entityDef = indexDef.getEntityDefinition();
-		byte[][] outputQualifiers = null;
-		if(!condition.isOutputAll()) {
-			outputQualifiers = HBaseInternalLogHelper.getOutputQualifiers(entityDef, condition.getOutputFields());
-		}
-		return new NonClusteredIndexLogReader(indexDef, indexRowkeys, outputQualifiers, condition.getFilter());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/RowKeyLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/RowKeyLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/RowKeyLogReader.java
deleted file mode 100755
index 1c16dc8..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/index/RowKeyLogReader.java
+++ /dev/null
@@ -1,107 +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.log.entity.index;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.HBaseInternalLogHelper;
-import org.apache.eagle.log.entity.InternalLog;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-
-public class RowKeyLogReader extends IndexLogReader {
-	private final EntityDefinition ed;
-	private final List<byte[]> rowkeys;
-    private final byte[][] qualifiers;
-    private HTableInterface tbl;
-	private boolean isOpen = false;
-	private Result[] entityResult;
-    private int getIndex = -1;
-
-    public RowKeyLogReader(EntityDefinition ed, byte[] rowkey) {
-        this.ed = ed;
-        this.rowkeys = new ArrayList<>();
-        this.rowkeys.add(rowkey);
-        this.qualifiers = null;
-    }
-
-	public RowKeyLogReader(EntityDefinition ed, byte[] rowkey,byte[][] qualifiers) {
-		this.ed = ed;
-		this.rowkeys = new ArrayList<>();
-        this.rowkeys.add(rowkey);
-        this.qualifiers = qualifiers;
-	}
-
-	public RowKeyLogReader(EntityDefinition ed, List<byte[]> rowkeys,byte[][] qualifiers) {
-		this.ed = ed;
-		this.rowkeys = rowkeys;
-        this.qualifiers = qualifiers;
-	}
-
-	@Override
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(ed.getTable());
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-		final byte[] family = ed.getColumnFamily().getBytes();
-        List<Get> gets = new ArrayList<>(this.rowkeys.size());
-
-        for(byte[] rowkey:rowkeys) {
-            Get get = new Get(rowkey);
-            get.addFamily(family);
-
-            if(qualifiers != null) {
-                for(byte[] qualifier: qualifiers){
-                    get.addColumn(family,qualifier);
-                }
-            }
-
-            gets.add(get);
-        }
-
-        entityResult = tbl.get(gets);
-		isOpen = true;
-	}
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-
-	@Override
-	public InternalLog read() throws IOException {
-        if(entityResult == null || entityResult.length == 0 || this.getIndex >= entityResult.length - 1){
-            return null;
-        }
-        getIndex ++;
-		InternalLog t = HBaseInternalLogHelper.parse(ed, entityResult[getIndex], this.qualifiers);
-		return t;
-	}
-}
\ No newline at end of file



[27/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestEagleQueryParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestEagleQueryParser.java b/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestEagleQueryParser.java
deleted file mode 100755
index 5f52f39..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestEagleQueryParser.java
+++ /dev/null
@@ -1,832 +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.query.parser.test;
-
-import junit.framework.Assert;
-import org.apache.eagle.query.parser.*;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TestEagleQueryParser {
-	
-	private static final Logger LOG = LoggerFactory.getLogger(TestEagleQueryParser.class);
-	
-	@Test
-	public void testSingleExpression(){
-		String query = "@cluster=\"a\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@cluster", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("a", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"a\")", or.toString());
-	}
-
-	@Test
-	public void testLessThanExpression(){
-		String query = "@field1<\"1\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@field1", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("<", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@field1<\"1\")", or.toString());
-	}
-
-	@Test
-	public void testLessOrEqualExpression(){
-		String query = "@field1<=\"1\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@field1", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("<=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@field1<=\"1\")", or.toString());
-	}
-
-	@Test
-	public void testGreaterThanExpression(){
-		String query = "@field1>\"1\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@field1", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals(">", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@field1>\"1\")", or.toString());
-	}
-
-	@Test
-	public void testGreaterOrEqualExpression(){
-		String query = "@field1>=\"1\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@field1", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals(">=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		LOG.info(or.toString());
-		Assert.assertEquals("(@field1>=\"1\")", or.toString());
-	}
-
-	@Test
-	public void testMultipleANDExpression(){
-		String query = "@cluster=\"abc\" AND @host=\"dc123.xyz.com\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(2, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@cluster", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("abc", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("@host", or.getANDExprList().get(0).getAtomicExprList().get(1).getKey());
-		Assert.assertEquals("dc123.xyz.com", or.getANDExprList().get(0).getAtomicExprList().get(1).getValue());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(1).getValueType());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(1).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\" AND @host=\"dc123.xyz.com\")", or.toString());
-		
-		query = "@datacenter=\"dc1\" AND @cluster=\"abc\" AND @host=\"dc123.xyz.com\" ";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(3, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@datacenter", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("dc1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("@cluster", or.getANDExprList().get(0).getAtomicExprList().get(1).getKey());
-		Assert.assertEquals("abc", or.getANDExprList().get(0).getAtomicExprList().get(1).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(1).getOp().toString());
-		Assert.assertEquals("@host", or.getANDExprList().get(0).getAtomicExprList().get(2).getKey());
-		Assert.assertEquals("dc123.xyz.com", or.getANDExprList().get(0).getAtomicExprList().get(2).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(2).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@datacenter=\"dc1\" AND @cluster=\"abc\" AND @host=\"dc123.xyz.com\")", or.toString());
-	}
-	
-	@Test
-	public void testMultipleORExpression(){
-		String query = "@cluster=\"abc\" OR @host=\"dc123.xyz.com\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==2);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals(1, or.getANDExprList().get(1).getAtomicExprList().size());
-		Assert.assertEquals("@cluster", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("abc", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("@host", or.getANDExprList().get(1).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("dc123.xyz.com", or.getANDExprList().get(1).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(1).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("(@cluster=\"abc\") OR (@host=\"dc123.xyz.com\")", or.toString());
-		
-		query = "@datacenter=\"dc1\" OR @cluster=\"abc\" OR @host=\"dc123.xyz.com\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}		Assert.assertTrue(or.getANDExprList().size()==3);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals(1, or.getANDExprList().get(1).getAtomicExprList().size());
-		Assert.assertEquals(1, or.getANDExprList().get(2).getAtomicExprList().size());
-		Assert.assertEquals("@datacenter", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("dc1", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("@cluster", or.getANDExprList().get(1).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("abc", or.getANDExprList().get(1).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(1).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("@host", or.getANDExprList().get(2).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("dc123.xyz.com", or.getANDExprList().get(2).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(2).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("(@datacenter=\"dc1\") OR (@cluster=\"abc\") OR (@host=\"dc123.xyz.com\")", or.toString());
-	}
-	
-	@Test
-	public void testANDORCombination(){
-		String query = "@cluster=\"abc\" OR @host=\"dc123.xyz.com\" AND @datacenter=\"dc1\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\") OR (@host=\"dc123.xyz.com\" AND @datacenter=\"dc1\")", or.toString());
-		
-		query = "(@cluster=\"abc\" AND @host=\"dc123.xyz.com\") AND @datacenter=\"dc1\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\" AND @host=\"dc123.xyz.com\" AND @datacenter=\"dc1\")", or.toString());
-
-		query = "(@cluster=\"abc\" OR @host=\"dc123.xyz.com\") AND @datacenter=\"dc1\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\" AND @datacenter=\"dc1\") OR (@host=\"dc123.xyz.com\" AND @datacenter=\"dc1\")", or.toString());
-		
-		query = "(@cluster=\"abc\" OR @host=\"dc123.xyz.com\") AND (@datacenter=\"dc1\" OR @cluster=\"bcd\")";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\" AND @datacenter=\"dc1\") OR (@cluster=\"abc\" AND @cluster=\"bcd\") OR (@host=\"dc123.xyz.com\" AND @datacenter=\"dc1\") OR (@host=\"dc123.xyz.com\" AND @cluster=\"bcd\")", or.toString());
-		
-		query = "(@cluster=\"abc\" OR @host=\"dc123.xyz.com\") AND (@datacenter=\"dc1\" AND @cluster=\"bcd\")";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"abc\" AND @datacenter=\"dc1\" AND @cluster=\"bcd\") OR (@host=\"dc123.xyz.com\" AND @datacenter=\"dc1\" AND @cluster=\"bcd\")", or.toString());
-	}
-	
-	@Test
-	public void testNegativeCase(){
-		String query = "@cluster      = \"a\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		LOG.info(or.toString());
-		Assert.assertEquals("(@cluster=\"a\")", or.toString());
-		
-		query = "@cluster    = a\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(Exception ex){
-			LOG.error("Can not successfully parse the query:" + query, ex);
-		}
-		Assert.assertTrue(or == null);
-		
-		query = "@cluster    = \"\"a\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(Exception ex){
-			LOG.error("Can not successfully parse the query:" + query, ex);
-		}
-		Assert.assertNotNull(or);
-
-		query = "@cluster=\"cluster1\" AND @datacenter=\"dc1\" AND @remediationID=8888\" AND @remediationStatus=\"status\"";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(Exception ex){
-			LOG.error("Can not successfully parse the query:" + query, ex);
-		}
-		Assert.assertTrue(or == null);
-	}
-	
-	@Test
-	public void testSimpleWildcardMatchQuery(){
-		String expected = "-[]/{}()*+?.\\^$|";
-		String query = "@user=\"-[]/{}()*+?.\\\\^$|\"";
-		System.out.println(query);
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@user", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals(expected, or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("(@user=\""+expected+"\")", or.toString());
-	}
-
-	@Test
-	public void testNumberQuery() {
-		String query = "@field1 >= -1.234";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@field1", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals(-1.234, Double.parseDouble(or.getANDExprList().get(0).getAtomicExprList().get(0).getValue()));
-		Assert.assertEquals(">=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NUMBER, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testContainQuery() {
-		String query = "@name contains \"jame\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("jame", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("CONTAINS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testNotContainQuery() {
-		String query = "@name not contains \"jame\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("jame", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("NOT CONTAINS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name NOT CONTAINS \"jame\"";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("jame", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("NOT CONTAINS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name NOT                                          CONTAINS \"jame\"";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("jame", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("NOT CONTAINS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testNullQuery() {
-		String query = "@name is null";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("null", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name IS               NULL";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("NULL", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name is not null";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("null", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS NOT", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name is               not               NULL";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("NULL", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS NOT", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name =               NULL";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("NULL", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name !=               NULL";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("NULL", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("!=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NULL, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testIsOrIsNotQuery(){
-		String query = "@name is \"james\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("james", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name is   not \"james\"";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("james", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS NOT", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name is   1.234";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1.234", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NUMBER, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name is   not 1.234";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("1.234", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IS NOT", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.NUMBER, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testINListQuery() {
-		String query = "@name in (\"jame\",\"lebron\")";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("(\"jame\",\"lebron\")", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IN", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.LIST, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name NOT IN (1,\"lebron\")";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("(1,\"lebron\")", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("NOT IN", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.LIST, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@name not                      in (1,\"lebron\")";
-		parser = new EagleQueryParser(query);
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("(1,\"lebron\")", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("NOT IN", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.LIST, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testEmptyString() {
-		String query = "@name = \"\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertNotNull(or);
-		Assert.assertEquals("@name", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	/**
-	 * Will split tokens for escaped string
-	 *
-	 * "va\"lue" => "va\"lue"
-	 * ("va\"lue","va,lue") => ["va\\\"lue","va,lue"]
-	 *
-	 */
-	@Test
-	public void testEscapedQuotesString(){
-		String query = "@value = \"value\\\"content, and another content\"";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertNotNull(or);
-		Assert.assertEquals("@value", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("value\"content, and another content", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("=", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.STRING, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@value in (\"value\\\"content, and another content\",\"others item\")";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertNotNull(or);
-		Assert.assertEquals("@value", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("(\"value\\\"content, and another content\",\"others item\")", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IN", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.LIST, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-
-		query = "@value in (\"value\\\"content, and another content\",\"others item\",-1.2345)";
-		parser = new EagleQueryParser(query);
-		or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertNotNull(or);
-		Assert.assertEquals("@value", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("(\"value\\\"content, and another content\",\"others item\",-1.2345)", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("IN", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals(TokenType.LIST, or.getANDExprList().get(0).getAtomicExprList().get(0).getValueType());
-	}
-
-	@Test
-	public void testCompareAtomicExpression(){
-		String query = "EXP{@mapProgress} < EXP{@reduceProgress}";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("mapProgress", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("reduceProgress", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("<", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("(mapProgress<reduceProgress)", or.toString());
-	}
-
-	@Test
-	public void testCompareArithmeticExpressionWithNumeric(){
-		String query = "EXP{(@mapProgress + @reduceProgress) / (@endTime - @startTime)} < 0.005";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("(mapProgress + reduceProgress) / (endTime - startTime)", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("0.005", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("<", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		LOG.info(or.toString());
-		Assert.assertEquals("((mapProgress + reduceProgress) / (endTime - startTime)<0.005)", or.toString());
-	}
-
-	@Test
-	public void testComplexExpressionWithNestedBrace(){
-		String query = "EXP{((@a + @b) / @c) + @d}< 0.005";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		Assert.assertEquals(1, or.getANDExprList().get(0).getAtomicExprList().size());
-		Assert.assertEquals("((a + b) / c) + d", or.getANDExprList().get(0).getAtomicExprList().get(0).getKey());
-		Assert.assertEquals("0.005", or.getANDExprList().get(0).getAtomicExprList().get(0).getValue());
-		Assert.assertEquals("<", or.getANDExprList().get(0).getAtomicExprList().get(0).getOp().toString());
-		Assert.assertEquals("(((a + b) / c) + d<0.005)", or.toString());
-	}
-
-	@Test
-	public void testComplexExpressionWithAndCondition(){
-		String query = "(EXP{@a + @b} > 3) AND (@b >10)";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		ANDExpression and = or.getANDExprList().get(0);
-		Assert.assertEquals(2, and.getAtomicExprList().size());
-		Assert.assertEquals("a + b>3", and.getAtomicExprList().get(0).toString());
-		Assert.assertEquals("@b>10", and.getAtomicExprList().get(1).toString());
-		
-		AtomicExpression leftExpression = and.getAtomicExprList().get(0);
-		Assert.assertEquals("a + b", leftExpression.getKey());
-		Assert.assertEquals(TokenType.EXP, leftExpression.getKeyType());
-		Assert.assertEquals(">", leftExpression.getOp().toString());
-		Assert.assertEquals("3", leftExpression.getValue());
-		Assert.assertEquals(TokenType.NUMBER, leftExpression.getValueType());
-		AtomicExpression rightExpression = and.getAtomicExprList().get(1);
-		Assert.assertEquals("@b", rightExpression.getKey());
-		Assert.assertEquals(TokenType.ID, rightExpression.getKeyType());
-		Assert.assertEquals(">", rightExpression.getOp().toString());
-		Assert.assertEquals("10",rightExpression.getValue());
-		Assert.assertEquals(TokenType.NUMBER, rightExpression.getValueType());
-	}
-
-	@Test
-	public void testComplexExpressionWithConditionAndNestedBrace(){
-		String query = "(EXP{(@a + @b) / ((@c + @d)*(@e)/(@d))} > EXP{@c + @d}) AND (EXP{@e + @f} > EXP{@h + @i})";
-		EagleQueryParser parser = new EagleQueryParser(query);
-		ORExpression or = null;
-		try{
-			or = parser.parse();
-		}catch(EagleQueryParseException ex){
-			Assert.fail(ex.getMessage());
-		}
-		Assert.assertTrue(or.getANDExprList().size()==1);
-		ANDExpression and = or.getANDExprList().get(0);
-		Assert.assertEquals(2, and.getAtomicExprList().size());		
-		Assert.assertEquals("(a + b) / ((c + d)*(e)/(d))>c + d", and.getAtomicExprList().get(0).toString());
-		Assert.assertEquals("e + f>h + i", and.getAtomicExprList().get(1).toString());
-		
-		AtomicExpression leftExpression = and.getAtomicExprList().get(0);
-		Assert.assertEquals("(a + b) / ((c + d)*(e)/(d))", leftExpression.getKey());
-		Assert.assertEquals(">", leftExpression.getOp().toString());
-		Assert.assertEquals("c + d", leftExpression.getValue());
-				
-		AtomicExpression rightExpression = and.getAtomicExprList().get(1);
-		Assert.assertEquals("e + f", rightExpression.getKey());
-		Assert.assertEquals(">", rightExpression.getOp().toString());
-		Assert.assertEquals("h + i",rightExpression.getValue());
-	}
-
-	@Test
-	public void testNegativeExpressionCase(){
-		String query = "(EXP{(@a + @b) / ((@c + @d)*(@e)/(@d))}} > EXP{@c + @d}) AND (EXP{@e + @f} > EXP{@h + @i})";
-		EagleQueryParser parser = new EagleQueryParser(query);		
-		boolean parseFail = true;
-		try{
-			parser.parse();
-		}catch(EagleQueryParseException ex){
-			parseFail = false;			
-		}
-		Assert.assertFalse(parseFail);
-		
-		query = "(EXP{{(@a + @b) / ((@c + @d)*(@e)/(@d))}} > EXP{@c + @d}) AND (EXP{@e + @f} > EXP{@h + @i})";
-		parser = new EagleQueryParser(query);		
-		parseFail = true;
-		try{
-			parser.parse();
-		}catch(EagleQueryParseException ex){
-			parseFail = false;			
-		}
-		Assert.assertFalse(parseFail);
-
-		query = "(EXP{(@a + @b) / ((@c + @d)*(@e)/(@d))} > EXP{@c + @d}) AND EXP{})";
-		parser = new EagleQueryParser(query);		
-		parseFail = true;
-		try{
-			parser.parse();
-		}catch(EagleQueryParseException ex){
-			parseFail = false;			
-		}
-		Assert.assertFalse(parseFail);
-
-	}
-
-	@Test
-	public void testIsExpression(){
-		Assert.assertTrue(TokenConstant.isExpression("EXP{ count }"));
-		Assert.assertFalse(TokenConstant.isExpression("count"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestValueType.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestValueType.java b/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestValueType.java
deleted file mode 100755
index 3a168e9..0000000
--- a/eagle-core/eagle-query/eagle-antlr/src/test/java/org/apache/eagle/query/parser/test/TestValueType.java
+++ /dev/null
@@ -1,73 +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.query.parser.test;
-
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.eagle.query.parser.TokenType;
-import junit.framework.Assert;
-import org.junit.Test;
-
-public class TestValueType {
-	@Test
-	public void testLocateValueType(){
-		Assert.assertEquals(TokenType.EXP, TokenType.locate("EXP{ 1+1 = 2 }"));
-		Assert.assertEquals(TokenType.EXP, TokenType.locate("EXP{ sum(a + b) > 1 }"));
-
-		Assert.assertEquals(TokenType.STRING, TokenType.locate("\"\""));
-		Assert.assertEquals(TokenType.STRING, TokenType.locate("\"abc\""));
-
-		Assert.assertEquals(TokenType.LIST, TokenType.locate("(1,\"ab\")"));
-		Assert.assertEquals(TokenType.LIST, TokenType.locate("(\"\",\"ab\")"));
-
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("1"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("1.234"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("-1.234"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("+1.234"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("- 1.234"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("+ 1.234"));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("    + 1.234 "));
-		Assert.assertEquals(TokenType.NUMBER, TokenType.locate("    + 1.234     "));
-
-		Assert.assertEquals(TokenType.NULL, TokenType.locate("null"));
-		Assert.assertEquals(TokenType.NULL, TokenType.locate("NULL"));
-
-		Assert.assertEquals(TokenType.STRING,TokenType.locate("\"SELECT start.hr AS hr,\n" +
-				" ...details.inst_type(Stage-10)\""));
-
-		// Bad format
-		boolean gotEx = false;
-		try{
-			TokenType.locate("+ 1.234.567");
-		}catch (IllegalArgumentException ex){
-			gotEx = true;
-		}
-		Assert.assertTrue(gotEx);
-	}
-
-	@Test
-	public void testParseExpressionContent(){
-		String expression = "EXP{ @fieldName /2 } AS a";
-		Assert.assertEquals(" @fieldName /2 ", TokenConstant.parseExpressionContent(expression));
-
-
-		expression = "EXP{ @fieldName /2 } a";
-		Assert.assertEquals(" @fieldName /2 ", TokenConstant.parseExpressionContent(expression));
-
-		expression = "EXP{ @fieldName /2 }";
-		Assert.assertEquals(" @fieldName /2 ", TokenConstant.parseExpressionContent(expression));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/pom.xml b/eagle-core/eagle-query/eagle-audit-base/pom.xml
deleted file mode 100755
index 6efeaeb..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-audit-base</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-audit-base</name>
-
-	<dependencies>
-
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-client-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-
-	</dependencies>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditConstants.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditConstants.java
deleted file mode 100644
index d8143d9..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditConstants.java
+++ /dev/null
@@ -1,35 +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.audit.common;
-
-public class AuditConstants {
-
-	public static final String AUDIT_SERVICE_ENDPOINT = "AuditService";
-	
-	// HBase Operations
-	public static final String AUDIT_EVENT_CREATE = "CREATE";
-	public static final String AUDIT_EVENT_UPDATE = "UPDATE";
-	public static final String AUDIT_EVENT_DELETE = "DELETE";
-	
-	// Audit table details
-	public static final String AUDIT_TABLE = "serviceAudit";
-	public static final String AUDIT_COLUMN_SERVICE_NAME = "serviceName"; 
-	public static final String AUDIT_COLUMN_USER_ID = "userID";
-	public static final String AUDIT_COLUMN_OPERATION = "operation";
-	public static final String AUDIT_COLUMN_TIMESTAMP = "auditTimestamp";
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditEvent.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditEvent.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditEvent.java
deleted file mode 100644
index 8f34a91..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditEvent.java
+++ /dev/null
@@ -1,51 +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.audit.common;
-
-import java.util.List;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-public class AuditEvent extends java.util.EventObject {
-
-	public AuditEvent(Object source, String serviceName, List<? extends TaggedLogAPIEntity> auditEntities) {
-		super(source);
-		this.serviceName = serviceName;
-		this.auditEntities = auditEntities;
-	}
-	
-	private String serviceName;
-	private List<? extends TaggedLogAPIEntity> auditEntities;
-
-	public String getServiceName() {
-		return serviceName;
-	}
-
-	public List<? extends TaggedLogAPIEntity> getAuditEntities() {
-		return auditEntities;
-	}
-	
-	public String toString() {
-        StringBuilder returnString = new StringBuilder(getClass().getName());
-        returnString.append("[");
-        returnString.append("serviceName=").append(getServiceName());
-        returnString.append("; source=").append(getSource().getClass());
-        returnString.append("]");
-        return returnString.toString();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditListenerMap.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditListenerMap.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditListenerMap.java
deleted file mode 100644
index e433f53..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/AuditListenerMap.java
+++ /dev/null
@@ -1,43 +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.audit.common;
-
-import org.apache.eagle.audit.listener.AuditListener;
-import org.apache.eagle.audit.listener.AuditListenerProxy;
-
-public final class AuditListenerMap extends BaseAuditListenerMap<AuditListener> {
-	
-    private static final AuditListener[] EMPTY = {};
-
-    @Override
-    protected AuditListener[] newArray(int length) {
-        return (0 < length) ? new AuditListener[length] : EMPTY;
-    }
-
-    @Override
-    protected AuditListener newProxy(String name, AuditListener listener) {
-        return new AuditListenerProxy(name, listener);
-    }
-
-    public final AuditListener extract(AuditListener listener) {
-        while (listener instanceof AuditListener) {
-            listener = ((AuditListenerProxy) listener).getListener();
-        }
-        return listener;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/BaseAuditListenerMap.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/BaseAuditListenerMap.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/BaseAuditListenerMap.java
deleted file mode 100644
index a2c70a9..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/common/BaseAuditListenerMap.java
+++ /dev/null
@@ -1,149 +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.audit.common;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.EventListener;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-abstract class BaseAuditListenerMap <L extends EventListener> {
-
-    private Map<String, L[]> map;
-
-    protected abstract L[] newArray(int length);
-
-    protected abstract L newProxy(String name, L listener);
-
-    public final synchronized void add(String name, L listener) {
-        if (this.map == null) {
-            this.map = new HashMap<String, L[]>();
-        }
-        L[] array = this.map.get(name);
-        int size = (array != null)
-                ? array.length
-                : 0;
-
-        L[] clone = newArray(size + 1);
-        clone[size] = listener;
-        if (array != null) {
-            System.arraycopy(array, 0, clone, 0, size);
-        }
-        this.map.put(name, clone);
-    }
-
-    public final synchronized void remove(String name, L listener) {
-        if (this.map != null) {
-            L[] array = this.map.get(name);
-            if (array != null) {
-                for (int i = 0; i < array.length; i++) {
-                    if (listener.equals(array[i])) {
-                        int size = array.length - 1;
-                        if (size > 0) {
-                            L[] clone = newArray(size);
-                            System.arraycopy(array, 0, clone, 0, i);
-                            System.arraycopy(array, i + 1, clone, i, size - i);
-                            this.map.put(name, clone);
-                        }
-                        else {
-                            this.map.remove(name);
-                            if (this.map.isEmpty()) {
-                                this.map = null;
-                            }
-                        }
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    public final synchronized L[] get(String name) {
-        return (this.map != null)
-                ? this.map.get(name)
-                : null;
-    }
-
-    public final void set(String name, L[] listeners) {
-        if (listeners != null) {
-            if (this.map == null) {
-                this.map = new HashMap<String, L[]>();
-            }
-            this.map.put(name, listeners);
-        }
-        else if (this.map != null) {
-            this.map.remove(name);
-            if (this.map.isEmpty()) {
-                this.map = null;
-            }
-        }
-    }
-
-    public final synchronized L[] getListeners() {
-        if (this.map == null) {
-            return newArray(0);
-        }
-        List<L> list = new ArrayList<L>();
-
-        L[] listeners = this.map.get(null);
-        if (listeners != null) {
-            for (L listener : listeners) {
-                list.add(listener);
-            }
-        }
-        for (Entry<String, L[]> entry : this.map.entrySet()) {
-            String name = entry.getKey();
-            if (name != null) {
-                for (L listener : entry.getValue()) {
-                    list.add(newProxy(name, listener));
-                }
-            }
-        }
-        return list.toArray(newArray(list.size()));
-    }
-
-    public final L[] getListeners(String name) {
-        if (name != null) {
-            L[] listeners = get(name);
-            if (listeners != null) {
-                return listeners.clone();
-            }
-        }
-        return newArray(0);
-    }
-
-    public final synchronized boolean hasListeners(String name) {
-        if (this.map == null) {
-            return false;
-        }
-        L[] array = this.map.get(null);
-        return (array != null) || ((name != null) && (null != this.map.get(name)));
-    }
-
-    public final Set<Entry<String, L[]>> getEntries() {
-        return (this.map != null)
-                ? this.map.entrySet()
-                : Collections.<Entry<String, L[]>>emptySet();
-    }
-
-    public abstract L extract(L listener);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAO.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAO.java
deleted file mode 100644
index c76708e..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAO.java
+++ /dev/null
@@ -1,90 +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.audit.dao;
-
-import java.util.List;
-
-import org.apache.eagle.audit.entity.GenericAuditEntity;
-
-public interface ServiceAuditDAO {
-
-	/**
-	 * Retrieve all audits of alert definition for a specific site and data source.
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findPolicyAudit(String site, String dataSource) throws Exception;
-
-	/**
-	 * Retrieve all audits of site definition for the given site.
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findSiteAudit(String site) throws Exception;
-	
-	/**
-	 * Retrieve all audits of datasource definition for the given data source.
-	 * @param dataSource
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findDataSourceAudit(String dataSource) throws Exception;
-	
-	/**
-	 * Retrieve all audits specific to a service.
-	 * @param serviceName
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findServiceAudit(String serviceName) throws Exception;
-	
-	/**
-	 * Retrieve all audits specific to a service and specific to a userID.
-	 * @param serviceName
-	 * @param userID
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findServiceAuditByUser(String serviceName, String userID) throws Exception;
-	
-	/**
-	 * Retrieve all audits specific to a service and specific to an action.
-	 * @param serviceName
-	 * @param action
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findServiceAuditByAction(String serviceName, String action) throws Exception;
-	
-	/**
-	 * Retrieve all audits specific to a user.
-	 * @param userID
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findUserServiceAudit(String userID) throws Exception;
-	
-	/**
-	 * Retrieve all audits specific to a user and specific to an action.
-	 * @param userID
-	 * @param action
-	 * @return
-	 * @throws Exception
-	 */
-	List<GenericAuditEntity> findUserServiceAuditByAction(String userID, String action) throws Exception;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
deleted file mode 100644
index 41332ae..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/dao/ServiceAuditDAOImpl.java
+++ /dev/null
@@ -1,176 +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.audit.dao;
-
-import java.util.List;
-
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.eagle.audit.common.AuditConstants;
-import org.apache.eagle.audit.entity.GenericAuditEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ServiceAuditDAOImpl implements ServiceAuditDAO {
-	
-    private final Logger LOG = LoggerFactory.getLogger(ServiceAuditDAOImpl.class);
-    private final EagleServiceConnector connector;
-    
-    public ServiceAuditDAOImpl(EagleServiceConnector connector){
-        this.connector = connector;
-    }
-
-	@Override
-    public List<GenericAuditEntity> findPolicyAudit(String site, String application) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"AlertDefinitionService\" AND @site=\"" + site + "\" AND @application=\"" + application + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}    	
-    }
-
-	@Override
-    public List<GenericAuditEntity> findSiteAudit(String site) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"AlertDataSourceService\" AND @site=\"" + site + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}    	
-    }
-    
-	@Override
-    public List<GenericAuditEntity> findDataSourceAudit(String application) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"AlertDataSourceService\" AND @application=\"" + application + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}  	
-    }
-    
-	@Override
-	public List<GenericAuditEntity> findServiceAudit(String serviceName) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"" + serviceName + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}
-	}
-
-	@Override
-	public List<GenericAuditEntity> findServiceAuditByUser(String serviceName, String userID) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"" + serviceName + "\" AND @userID=\"" + userID + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}
-	}
-
-	@Override
-	public List<GenericAuditEntity> findServiceAuditByAction(String serviceName, String action) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@serviceName=\"" + serviceName + "\" AND @actionTaken=\"" + action + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}
-	}
-
-	@Override
-	public List<GenericAuditEntity> findUserServiceAudit(String userID) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@userID=\"" + userID + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}
-	}
-
-	@Override
-	public List<GenericAuditEntity> findUserServiceAuditByAction(String userID, String action) throws Exception {
-		try {
-			IEagleServiceClient client = new EagleServiceClientImpl(connector);
-			String query = AuditConstants.AUDIT_SERVICE_ENDPOINT + "[@userID=\"" + userID + "\" AND @actionTaken=\"" + action + "\"]{*}";
-            GenericServiceAPIResponseEntity<GenericAuditEntity> response =  client.search().startTime(0).endTime(10 * DateUtils.MILLIS_PER_DAY).pageSize(Integer.MAX_VALUE).query(query).send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Exception in querying eagle service: " + response.getException());
-            }
-            return response.getObj();
-		} catch (Exception exception) {
-			LOG.error("Exception in retrieving audit entry: " + exception);
-			throw new IllegalStateException(exception);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/GenericAuditEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/GenericAuditEntity.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/GenericAuditEntity.java
deleted file mode 100644
index 1a365ff..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/GenericAuditEntity.java
+++ /dev/null
@@ -1,80 +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.audit.entity;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.Tags;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_OPERATION;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_SERVICE_NAME;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_TIMESTAMP;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_COLUMN_USER_ID;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_SERVICE_ENDPOINT;
-import static org.apache.eagle.audit.common.AuditConstants.AUDIT_TABLE;
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table(AUDIT_TABLE)
-@ColumnFamily("f")
-@Prefix(AUDIT_TABLE)
-@Service(AUDIT_SERVICE_ENDPOINT)
-@JsonIgnoreProperties(ignoreUnknown = true)
-@TimeSeries(false)
-@Tags({AUDIT_COLUMN_SERVICE_NAME, AUDIT_COLUMN_USER_ID, AUDIT_COLUMN_OPERATION, AUDIT_COLUMN_TIMESTAMP})
-public class GenericAuditEntity extends TaggedLogAPIEntity {
-	
-	public boolean equals (Object obj) {
-		if(obj == this)
-			return true;
-		if(!(obj instanceof GenericAuditEntity))
-			return false;
-		GenericAuditEntity that = (GenericAuditEntity) obj;
-		if(compare(that.getTags().get(AUDIT_COLUMN_SERVICE_NAME), this.getTags().get(AUDIT_COLUMN_SERVICE_NAME)) &&
-				compare(that.getTags().get(AUDIT_COLUMN_USER_ID), this.getTags().get(AUDIT_COLUMN_USER_ID)) &&
-				compare(that.getTags().get(AUDIT_COLUMN_OPERATION), this.getTags().get(AUDIT_COLUMN_OPERATION)) &&
-				compare(that.getTags().get(AUDIT_COLUMN_TIMESTAMP), this.getTags().get(AUDIT_COLUMN_TIMESTAMP)))
-			return true;
-		return false;
-	}
-	
-	private boolean compare(String a, String b){
-		if(a == b)
-			return true;
-		if(a == null || b == null)
-			return false;
-		if(a.equals(b))
-			return true;
-		return false;
-	}
-
-	public int hashCode(){
-		HashCodeBuilder builder = new HashCodeBuilder();
-		builder.append(getTags().get(AUDIT_COLUMN_SERVICE_NAME));
-		builder.append(getTags().get(AUDIT_COLUMN_USER_ID));
-		builder.append(getTags().get(AUDIT_COLUMN_OPERATION));
-		builder.append(getTags().get(AUDIT_COLUMN_TIMESTAMP));
-		return builder.toHashCode();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/repo/AuditEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/repo/AuditEntityRepository.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/repo/AuditEntityRepository.java
deleted file mode 100755
index bfcc5f6..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/entity/repo/AuditEntityRepository.java
+++ /dev/null
@@ -1,28 +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.audit.entity.repo;
-
-import org.apache.eagle.audit.entity.GenericAuditEntity;
-import org.apache.eagle.log.entity.repo.EntityRepository;
-
-public class AuditEntityRepository extends EntityRepository {
-
-	public AuditEntityRepository() {
-		entitySet.add(GenericAuditEntity.class);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListener.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListener.java
deleted file mode 100644
index 422cc99..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListener.java
+++ /dev/null
@@ -1,25 +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.audit.listener;
-
-import org.apache.eagle.audit.common.AuditEvent;
-
-public interface AuditListener extends java.util.EventListener {
-	
-	void auditEvent(AuditEvent event);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListenerProxy.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListenerProxy.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListenerProxy.java
deleted file mode 100644
index a63ca38..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditListenerProxy.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eagle.audit.listener;
-
-import java.util.EventListenerProxy;
-
-import org.apache.eagle.audit.common.AuditEvent;
-
-public class AuditListenerProxy extends EventListenerProxy<AuditListener> implements AuditListener {
-
-	private final String propertyName;
-	
-	public String getPropertyName() {
-		return propertyName;
-	}
-
-	public AuditListenerProxy(String propertyName, AuditListener listener) {
-		super(listener);
-		this.propertyName = propertyName;
-	}
-
-	@Override
-	public void auditEvent(AuditEvent event) {
-		getListener().auditEvent(event);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditSupport.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditSupport.java b/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditSupport.java
deleted file mode 100644
index 39ac46f..0000000
--- a/eagle-core/eagle-query/eagle-audit-base/src/main/java/org/apache/eagle/audit/listener/AuditSupport.java
+++ /dev/null
@@ -1,111 +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.audit.listener;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.eagle.audit.common.AuditEvent;
-import org.apache.eagle.audit.common.AuditListenerMap;
-import org.apache.eagle.audit.entity.GenericAuditEntity;
-
-public class AuditSupport implements Serializable {
-	
-	private AuditListenerMap map = new AuditListenerMap();
-
-    public AuditSupport(Object sourceBean) {
-        if (sourceBean == null)
-            throw new NullPointerException();
-        source = sourceBean;
-    }
-        
-	public void addAuditListener(AuditListener listener) {
-		if (listener == null)
-			return;
-		if (listener instanceof AuditListenerProxy) {
-			AuditListenerProxy proxy = (AuditListenerProxy) listener;
-			addAuditListener(proxy.getPropertyName(), proxy.getListener());
-		} else {
-			this.map.add(null, listener);
-		}
-	}
-	
-    public void addAuditListener(String propertyName, AuditListener listener) {
-    if (listener == null || propertyName == null)
-        return;
-    listener = this.map.extract(listener);
-    if (listener != null)
-        this.map.add(propertyName, listener);
-    }
-	
-	public void removeAuditListener(AuditListener listener) {
-		if (listener == null)
-			return;
-		if (listener instanceof AuditListenerProxy) {
-			AuditListenerProxy proxy = (AuditListenerProxy) listener;
-			removeAuditListener(proxy.getPropertyName(), proxy.getListener());
-		} else {
-			this.map.remove(null, listener);
-		}
-	}
-	
-    public void removeAuditListener(String propertyName, AuditListener listener) {
-	    if (listener == null || propertyName == null)
-	        return;
-	    listener = this.map.extract(listener);
-	    if (listener != null)
-	        this.map.remove(propertyName, listener);
-    }
-	
-    public void fireAudit(String serviceName, List<GenericAuditEntity> auditEntities) {
-        if (null != serviceName && null != auditEntities && 0 != auditEntities.size()) {
-        	fireAudit(new AuditEvent(this.source, serviceName, auditEntities));
-        }
-    }
-    
-    public void fireAudit(AuditEvent event) {
-    	if (null != event.getAuditEntities() && 0 != event.getAuditEntities().size()) {
-    		AuditListener[] common = this.map.get(null);
-    		AuditListener[] named = (null != event.getServiceName()) ? this.map.get(event.getServiceName()) : null;
-    		fire(common, event);
-    		fire(named, event);
-    	}
-    }
-    
-    private static void fire(AuditListener[] listeners, AuditEvent event) {
-        if (listeners != null) {
-            for (AuditListener listener : listeners) {
-                listener.auditEvent(event);
-            }
-        }
-    }
-    
-    public AuditListener[] getAuditListeners() {
-        return this.map.getListeners();
-    }
-    
-    public AuditListener[] getAuditListeners(String propertyName) {
-        return this.map.getListeners(propertyName);
-    }
-    
-    public boolean hasListeners(String propertyName) {
-        return this.map.hasListeners(propertyName);
-    }
-    
-    private Object source;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-client-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-client-base/pom.xml b/eagle-core/eagle-query/eagle-client-base/pom.xml
deleted file mode 100644
index 4cd852a..0000000
--- a/eagle-core/eagle-query/eagle-client-base/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-client-base</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-client-base</name>
-
-	<dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-entity-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-embed-server</artifactId>
-            <version>${project.version}</version>
-			<scope>test</scope>
-		</dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-		<dependency>
-   			<groupId>org.codehaus.jackson</groupId>
-   			<artifactId>jackson-jaxrs</artifactId>
-		</dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-core-asl</artifactId>
-        </dependency>
-		<dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-xc</artifactId>
-        </dependency>
-		<dependency>
-			<groupId>com.sun.jersey</groupId>
-			<artifactId>jersey-client</artifactId>
-		</dependency>
-	</dependencies>
-</project>
-



[38/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/extension/ModuleManager.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/extension/ModuleManager.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/extension/ModuleManager.scala
deleted file mode 100644
index 2174560..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/extension/ModuleManager.scala
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.apache.eagle.stream.pipeline.extension
-
-import java.util.Properties
-import java.util.concurrent.atomic.AtomicBoolean
-
-import com.typesafe.config.ConfigFactory
-import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider
-import org.apache.eagle.datastream.core._
-import org.apache.eagle.partition.PartitionStrategy
-import org.apache.eagle.stream.pipeline.parser.Processor
-import org.apache.kafka.clients.producer.{Callback, KafkaProducer, ProducerRecord, RecordMetadata}
-//import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConverters._
-
-/**
-  * 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.
-  */
-
-
-object ModuleManager{
-  def getModuleMapperByType(moduleType:String):ModuleMapper = {
-    classOfProcessorMapping(moduleType)
-  }
-
-  def findModuleType(moduleType:String):Boolean = classOfProcessorMapping.contains(moduleType)
-
-  val classOfProcessorMapping = Map[String,ModuleMapper](
-    "KafkaSource" -> KafkaSourceStreamProducer,
-    "KafkaSink" -> KafkaSinkStreamProducer,
-    "Alert" -> AlertStreamProducer,
-    "Persistence" -> PersistProducer,
-    "Aggregator" -> AggregatorProducer,
-    "Console" -> ConsoleStreamProducer
-  )
-}
-
-trait ModuleMapper{
-  def getType:String
-  def map(module:Processor):StreamProducer[Any]
-}
-object KafkaSourceStreamProducer extends ModuleMapper{
-  def getType = "KafkaSource"
-  override def map(module:Processor): StreamProducer[Any] = {
-    val config = module.getConfig
-    new StormSourceProducer[Any](new KafkaSourcedSpoutProvider(null).getSpout(ConfigFactory.parseMap(config.asJava)))
-  }
-}
-object KafkaSinkStreamProducer extends ModuleMapper{
-  def getType = "KafkaSink"
-  override def map(module:Processor): StreamProducer[Any] = {
-    val config = module.getConfig
-    ForeachProducer[AnyRef](KafkaSinkExecutor(config))
-  }
-}
-object ConsoleStreamProducer extends ModuleMapper{
-  override def getType: String = "Stdout"
-  override def map(module:Processor): StreamProducer[Any] = ForeachProducer[Any](m=>print(s"$m\n"))
-}
-object AlertStreamProducer extends ModuleMapper{
-  def getType:String = "Alert"
-  override def map(module:Processor): StreamProducer[Any] = {
-    val config = module.getConfig
-    val moduleId = module.getId
-    // Support create functional AlertStreamProducer constructor
-    new AlertStreamProducer (
-      upStreamNames = config.getOrElse("upStreamNames",if(module.inputIds!=null) module.inputIds.asJava else null).asInstanceOf[java.util.List[String]],
-      alertExecutorId = config.getOrElse("alertExecutorId",moduleId).asInstanceOf[String],
-      consume = config.getOrElse("consume",true).asInstanceOf[Boolean],
-      strategy = config.get("strategy") match {case Some(strategy)=> Class.forName(strategy.asInstanceOf[String]).newInstance().asInstanceOf[PartitionStrategy] case None => null}
-    )
-  }
-}
-
-object PersistProducer extends ModuleMapper{
-  override def getType = "Persistence"
-  override def map(module:Processor): StreamProducer[Any] = {
-    val config = module.getConfig
-    new PersistProducer(config.getOrElse("executorId",module.getId).asInstanceOf[String],StorageType.withName(config.getOrElse("storageType",null).asInstanceOf[String]))
-  }
-}
-
-object AggregatorProducer extends ModuleMapper{
-  override def getType: String = "Aggregator"
-  override def map(module:Processor): StreamProducer[Any] = {
-    val config = module.getConfig
-    new AggregateProducer(
-      upStreamNames = config.getOrElse("upStreamNames",if(module.inputIds!=null) module.inputIds.asJava else null).asInstanceOf[java.util.List[String]],
-      config.getOrElse("analyzer",module.getId).asInstanceOf[String],
-      config.get("sql") match {case Some(sql) => sql.asInstanceOf[String] case None => null },
-      config.get("strategy") match {case Some(strategy)=> Class.forName(strategy.asInstanceOf[String]).newInstance().asInstanceOf[PartitionStrategy] case None => null}
-    )
-  }
-}
-
-object KafkaSinkExecutor{
-//  val LOG = LoggerFactory.getLogger(classOf[KafkaSinkExecutor])
-}
-
-/**
-  * @todo currently support single topic now, should support topic selector
-  * @param config
-  */
-case class KafkaSinkExecutor(config:Map[String,AnyRef]) extends ((AnyRef) => Unit) with Serializable{
-
-  val TOPIC_KEY = "topic"
-  def getDefaultProps = {
-    val props = new Properties()
-    props.putAll(Map[String,AnyRef](
-      "bootstrap.servers" -> "localhost:6667",
-      "acks" -> "all",
-      "retries" -> "3",
-      "batch.size" -> "16384",
-      "linger.ms" -> "1",
-      "buffer.memory" -> "33554432",
-      "key.serializer" -> "org.apache.kafka.common.serialization.StringSerializer",
-      "value.serializer" -> classOf[org.apache.eagle.dataproc.impl.storm.kafka.JsonSerializer].getCanonicalName
-    ).asJava)
-    props
-  }
-
-  @transient var initialized:AtomicBoolean = new AtomicBoolean(false)
-  @transient var producer:KafkaProducer[String,AnyRef] = null
-  @transient var topic:String = null
-  @transient var timeoutMs:Long = 3000
-
-  private def init():Unit = {
-    if(this.initialized != null && this.initialized.get()){
-//      LOG.info("Already initialized, skip")
-      return
-    }
-    this.initialized = new AtomicBoolean(false)
-    if (producer != null) {
-//      LOG.info(s"Closing $producer")
-      producer.close()
-    }
-//    LOG.info("Initializing and creating Kafka Producer")
-    if (config.contains(TOPIC_KEY)) {
-      this.topic = config.get(TOPIC_KEY).get.asInstanceOf[String]
-    } else {
-      throw new IllegalStateException("topic is not defined")
-    }
-    val props = getDefaultProps
-    props.putAll((config - TOPIC_KEY).asJava)
-    producer = new KafkaProducer[String, AnyRef](props)
-//    LOG.info(s"Created new KafkaProducer: $producer")
-    initialized.set(true)
-  }
-
-  override def apply(value: AnyRef): Unit = {
-    if(initialized == null || !initialized.get()) init()
-    if(topic == null) throw new IllegalStateException("topic is not defined")
-    val isList = value.isInstanceOf[java.util.List[AnyRef]]
-    val record: ProducerRecord[String, AnyRef] = if(isList){
-      val list = value.asInstanceOf[java.util.List[AnyRef]]
-      if(list.size() == 1) {
-        new ProducerRecord[String, AnyRef](topic, value.asInstanceOf[java.util.List[AnyRef]].get(0))
-      }else{
-        new ProducerRecord[String, AnyRef](topic, value)
-      }
-    }else{
-      new ProducerRecord[String, AnyRef](topic,value)
-    }
-    producer.send(record,new Callback(){
-      override def onCompletion(metadata: RecordMetadata, exception: Exception): Unit = {
-        if(exception!=null){
-//          LOG.error(s"Failed to send record $value to topic: $topic",exception)
-          throw new IllegalStateException(s"Failed to send record $value to topic: $topic",exception)
-        }
-      }
-    })
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/DataFlow.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/DataFlow.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/DataFlow.scala
deleted file mode 100644
index 7e1f4cf..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/DataFlow.scala
+++ /dev/null
@@ -1,235 +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.stream.pipeline.parser
-
-import com.typesafe.config.Config
-import org.apache.eagle.stream.pipeline.utils.ParseException
-
-import scala.collection.JavaConversions._
-import scala.collection.JavaConverters._
-
-import scala.collection.mutable
-
-
-class DataFlow {
-  def getInputs(id: String):Seq[Processor] = {
-    this.getConnectors.filter(_.to.equals(id)).map(c => getProcessor(c.from).get)
-  }
-
-  /**
-    * Connect if not, do nothing if already connected
-    *
-    * @param from
-    * @param to
-    */
-  def connect(from: String, to: String): Unit = {
-    val connector = Connector(from,to,null)
-    var exists = false
-    connectors.foreach(c => exists = (c.from.equals(from) && c.to.equals(to)) || exists)
-    if(!exists) addConnector(connector)
-  }
-
-  private var processors = mutable.Map[String,Processor]()
-  private var connectors = mutable.Seq[Connector]()
-  def setProcessors(processors:Seq[Processor]):Unit = {
-    processors.foreach{module =>
-      this.processors.put(module.getId,module)
-    }
-  }
-  def setProcessors(processors:mutable.Map[String,Processor]):Unit = {
-    this.processors = processors
-  }
-  def setConnectors(connectors:Seq[Connector]):Unit = {
-    connectors.foreach(connector =>{
-      this.connectors :+= connector
-    })
-  }
-  def addProcessor(module:Processor):Unit = {
-    if(contains(module)) throw new IllegalArgumentException(s"Duplicated processor id error, ${module.getId} has already been defined as ${getProcessor(module.getId)}")
-    processors.put(module.getId,module)
-  }
-
-  def contains(module:Processor):Boolean = processors.contains(module.getId)
-  def addConnector(connector:Connector):Unit = {
-    connectors :+= connector
-  }
-  def getProcessors:Seq[Processor] = processors.values.toSeq
-  def getProcessor(processorId:String):Option[Processor] = processors.get(processorId)
-  def getConnectors:Seq[Connector] = connectors
-}
-
-/**
-  * Stream Processor
-  *
-  * @param processorId
-  * @param processorType
-  * @param schema
-  * @param processorConfig
-  */
-case class Processor(var processorId:String = null,var processorType:String = null,var schema:Schema = null, var processorConfig:Map[String,AnyRef] = null) extends Serializable {
-  private[pipeline] var inputs:Seq[Processor] = null
-  private[pipeline] var inputIds:Seq[String] = null
-
-  def getId:String = processorId
-  def getType:String = processorType
-  def getConfig:Map[String,AnyRef] = processorConfig
-  def getSchema:Option[Schema] = if(schema == null) None else Some(schema)
-
-  /**
-    * @todo assume processorId as streamId
-    * @return
-    */
-  def streamId = processorId
-}
-
-case class Connector (from:String,to:String, config:Map[String,AnyRef]) extends Serializable{
-  import Connector._
-
-  def group:Option[String] = config.get(GROUP_FIELD).asInstanceOf[Option[String]]
-  def groupByFields:Option[Seq[String]] = config.get(GROUP_BY_FIELD_FIELD) match {
-    case Some(obj) => Some(obj.asInstanceOf[java.util.List[String]].asScala.toSeq)
-    case None => None
-  }
-  def groupByIndexes:Option[Seq[Int]] = config.get(GROUP_BY_INDEX_FIELD) match {
-    case Some(obj) => Some(obj.asInstanceOf[java.util.List[java.lang.Integer]].asScala.toSeq.map(Int.unbox(_)))
-    case None => None
-  }
-}
-
-object Connector{
-  val GROUP_FIELD = "grouping"
-  val GROUP_BY_FIELD_FIELD = "groupByField"
-  val GROUP_BY_INDEX_FIELD = "groupByIndex"
-}
-
-private [pipeline]
-object Processor {
-  val SCHEMA_FIELD:String = "schema"
-  val INPUTS_FIELD = "inputs"
-  def parse(processorId:String,processorType:String,context:Map[String,AnyRef], schemaSet:SchemaSet):Processor = {
-    val schema = context.get(SCHEMA_FIELD) match {
-      case Some(schemaDef) => schemaDef match {
-        case schemaId:String => schemaSet.get(schemaId).getOrElse {
-          throw new ParseException(s"Schema [$schemaId] is not found but referred by [$processorType:$processorId] in $context")
-        }
-        case schemaMap:java.util.HashMap[String,AnyRef] => Schema.parse(schemaMap.toMap)
-        case _ => throw new ParseException(s"Illegal value for schema: $schemaDef")
-      }
-      case None => null
-    }
-    val instance = new Processor(processorId,processorType,schema,context-SCHEMA_FIELD)
-    if(context.contains(INPUTS_FIELD)) instance.inputIds = context.get(INPUTS_FIELD).get.asInstanceOf[java.util.List[String]].asScala.toSeq
-    instance
-  }
-}
-
-
-trait DataFlowParser {
-  def parse(config:Config,schemaSet:SchemaSet = SchemaSet.empty()):DataFlow = {
-    val dataw = new DataFlow()
-    val map = config.root().unwrapped().toMap
-
-    // Parse processors and connectors
-    map.foreach(entry => {
-      parseSingle(entry._1,entry._2.asInstanceOf[java.util.HashMap[String,AnyRef]].toMap,dataw,schemaSet)
-    })
-    expand(dataw)
-    validate(dataw)
-    dataw
-  }
-
-  private def expand(datafw: DataFlow):Unit = {
-    datafw.getProcessors.foreach(proc =>{
-      if(proc.inputIds!=null) {
-        proc.inputIds.foreach(id => {
-          // connect if not
-          datafw.connect(id,proc.getId)
-        })
-      }
-      proc.inputs = datafw.getInputs(proc.getId)
-      proc.inputIds = proc.inputs.map(_.getId)
-    })
-  }
-
-  private def
-  validate(pipeline:DataFlow): Unit ={
-    def checkModuleExists(id:String): Unit ={
-      pipeline.getProcessor(id).orElse {
-        throw new ParseException(s"Stream [$id] is not defined before being referred")
-      }
-    }
-
-    pipeline.getConnectors.foreach {connector =>
-      checkModuleExists(connector.from)
-      checkModuleExists(connector.to)
-    }
-  }
-
-  private def
-  parseSingle(identifier:String,config:Map[String,AnyRef],dataflow:DataFlow, schemaSet: SchemaSet):Unit = {
-    Identifier.parse(identifier) match {
-      case DefinitionIdentifier(processorType) => {
-        config foreach {entry =>
-          dataflow.addProcessor(Processor.parse(entry._1, processorType,entry._2.asInstanceOf[java.util.HashMap[String, AnyRef]].toMap,schemaSet))
-        }
-      }
-      case ConnectionIdentifier(fromIds,toId) => fromIds.foreach { fromId =>
-        if(fromId.eq(toId)) throw new ParseException(s"Can't connect $fromId to $toId")
-        dataflow.addConnector(Connector(fromId,toId,config))
-      }
-      case _ => ???
-    }
-  }
-}
-
-
-private[pipeline] trait Identifier
-
-private[pipeline] case class DefinitionIdentifier(moduleType: String) extends Identifier
-private[pipeline] case class ConnectionIdentifier(fromIds: Seq[String], toId: String) extends Identifier
-
-private[pipeline] object Identifier {
-  val ConnectorFlag = "->"
-  val UnitFlagSplitPattern = "\\|"
-  val UnitFlagChar = "|"
-  val ConnectorPattern = s"([\\w-|\\s]+)\\s+$ConnectorFlag\\s+([\\w-_]+)".r
-  def parse(identifier: String): Identifier = {
-    // ${id} -> ${id}
-    ConnectorPattern.findFirstMatchIn(identifier) match {
-      case Some(matcher) => {
-        if(matcher.groupCount != 2){
-          throw new ParseException(s"Illegal connector definition: $identifier")
-        }else{
-          val source = matcher.group(1)
-          val destination = matcher.group(2)
-          if(source.contains(UnitFlagChar)) {
-            val sources = source.split(UnitFlagSplitPattern).toSeq
-            ConnectionIdentifier(sources.map{_.trim()},destination)
-          }else{
-            ConnectionIdentifier(Seq(source),destination)
-          }
-        }
-      }
-      case None => {
-        if(identifier.contains(ConnectorFlag)) throw new ParseException(s"Failed to parse $identifier")
-        DefinitionIdentifier(identifier)
-      }
-    }
-  }
-}
-
-object DataFlow extends DataFlowParser
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
deleted file mode 100644
index cc1e009..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Pipeline.scala
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.apache.eagle.stream.pipeline.parser
-
-import java.io.File
-
-import com.typesafe.config.{Config, ConfigFactory}
-
-/**
- * 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.
- */
-
-case class Pipeline(config:Config,dataflow:DataFlow)
-
-/**
- * Pipeline configuration parser
- *
- * For example:
- *
- * {{{
- * <code>
- * {
- *    config {
- *      execution.environment.config = someValue
- *    }
- *    schema {
- *      metricStreamSchema {
- *        metric: string
- *        value: double
- *        timestamp: long
- *      }
- *    }
- *    dataflow {
- *      kafkaSource.source1 {
- *        schema = "metricStreamSchema"
- *      }
- *      kafkaSource.source2 {
- *        schema = {
- *          metric: string
- *          value: double
- *          timestamp: long
- *        }
- *      }
- *    }
- * }
- * </code>
- * }}}
- */
-trait PipelineParser{
-  val CONFIG_FIELD = "config"
-  val SCHEMA_FIELD = "schema"
-  val DATAFLOW_FIELD = "dataflow"
-
-  def parse(config:Config):Pipeline = {
-    if(config.isEmpty) throw new IllegalArgumentException("Pipeline configuration is empty")
-    var pConfig:Config = ConfigFactory.empty()
-    var pSchemaSet:SchemaSet = SchemaSet.empty()
-    var pDataflow:DataFlow = null
-    if(config.hasPath(CONFIG_FIELD)) pConfig = config.getConfig(CONFIG_FIELD)
-    if(config.hasPath(SCHEMA_FIELD)) pSchemaSet = SchemaSet.parse(config.getConfig(SCHEMA_FIELD))
-    if(config.hasPath(DATAFLOW_FIELD)) pDataflow = DataFlow.parse(config.getConfig(DATAFLOW_FIELD),pSchemaSet)
-
-    // Merge pipeline config over base config
-    val baseConfig =ConfigFactory.load()
-    pConfig = if(pConfig!=null) pConfig.withFallback(baseConfig) else baseConfig
-    new Pipeline(pConfig,pDataflow)
-  }
-
-  def parseString(config:String):Pipeline = parse(ConfigFactory.parseString(config))
-  def parseResource(resource:String):Pipeline = {
-    // TODO: Load environment, currently hard-code with storm
-    if(resource.startsWith("/") || resource.startsWith("./")){
-      parse(ConfigFactory.parseFile(new File(resource)))
-    } else{
-      parse(ConfigFactory.parseResourcesAnySyntax(getClass.getClassLoader,resource))
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Schema.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Schema.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Schema.scala
deleted file mode 100644
index 7653f9e..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/parser/Schema.scala
+++ /dev/null
@@ -1,152 +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.stream.pipeline.parser
-
-import com.typesafe.config.Config
-
-import scala.collection.JavaConversions.mapAsScalaMap
-import scala.collection.mutable
-
-class Field(name:String) extends Serializable{
-  def getName:String = name
-}
-
-case class StringField(name:String) extends Field(name)
-case class LongField(name:String) extends Field(name)
-case class IntegerField(name:String) extends Field(name)
-case class BooleanField(name:String) extends Field(name)
-case class FloatField(name:String) extends Field(name)
-case class DoubleField(name:String) extends Field(name)
-case class DatetimeField(name:String,format:String) extends Field(name)
-
-object Field{
-  def string(name:String) = StringField(name)
-  def long(name:String) = LongField(name)
-  def integer(name:String) = IntegerField(name)
-  def boolean(name:String) = BooleanField(name)
-  def float(name:String) = FloatField(name)
-  def double(name:String) = DoubleField(name)
-  def datetime(name:String)(format:String) = DatetimeField(name,format)
-
-  def apply(name:String,typeName:String):Field = typeName match {
-    case "string" => string(name)
-    case "long" => long(name)
-    case "integer" => integer(name)
-    case "boolean" => boolean(name)
-    case "float" => float(name)
-    case "double" => double(name)
-    case _ => throw new UnsupportedOperationException(s"""Unknown attribute type $typeName for attribute "$name"""")
-  }
-}
-
-case class Schema(attributes:Seq[Field]) extends Serializable{
-  def getAttribute(attributeName:String):Option[Field]={
-    if(attributes != null){
-      attributes.find(_.getName.eq(attributeName))
-    }else None
-  }
-
-  def indexOfAttribute(attributeName:String):Int = {
-    if(attributes != null){
-      attributes.indexWhere(_.getName.eq(attributeName))
-    } else -1
-  }
-
-  @throws[IllegalArgumentException]
-  def indexOfAttributeOrException(attributeName:String):Int = {
-    if(attributes != null){
-      attributes.indexWhere(_.getName.eq(attributeName))
-    } else throw new IllegalArgumentException(s"Attribute [$attributeName] is not found in stream $this")
-  }
-}
-
-object Schema{
-  def parse(map:Map[String,AnyRef]):Schema = {
-    new Schema(map.keys.map {attributeName =>
-      map(attributeName) match{
-        case simpleType:String => Field(attributeName,simpleType)
-        case complexType:java.util.Map[String,AnyRef] => throw new IllegalStateException(s"ComplexType attribute definition is not supported yet [$attributeName : $complexType] ")
-        case otherType@_ => throw new IllegalStateException(s"Illegal attribute definition $attributeName : $otherType")
-      }
-    }.toSeq)
-  }
-
-  /**
-   * @param attributes support string, symbol, Attribute and so on.
-   * @return
-   */
-  def build(attributes:Seq[AnyRef]):Schema = {
-    new Schema(attributes.map{ a:AnyRef =>
-      a match {
-        case t:(String, AnyRef) => {
-          t._2 match {
-            case v:String => Field(t._1,v)
-            case v:Symbol => Field(t._1,v.name)
-            case _ => throw new UnsupportedOperationException(s"Illegal attribute definition $a")
-          }
-        }
-        case t:Field => t
-        case _ => throw new UnsupportedOperationException(s"Illegal attribute definition $a")
-      }
-    })
-  }
-}
-
-private[pipeline] class StreamUndefinedException(message:String = "stream is not defined",throwable: Throwable = null) extends Exception(message,throwable)
-
-private[pipeline] class SchemaSet {
-  private val processorSchemaCache = mutable.Map[String,Schema]()
-  def set(schemaId:String,schema:Schema):Unit = {
-    if(processorSchemaCache.contains(schemaId)) throw new IllegalArgumentException(
-      s"""
-         |Failed to define schema for $schemaId as $schema,
-         |because it has been defined as ${processorSchemaCache(schemaId)},
-         |please call updateSchema(processorId,schema) instead
-       """)
-    processorSchemaCache.put(schemaId,schema)
-  }
-  def get(schemaId:String):Option[Schema] = processorSchemaCache.get(schemaId)
-}
-
-private[pipeline] object SchemaSet{
-  def empty() = new SchemaSet()
-  /**
-   * For example:
-   *
-   * <code>
-   *    {
-   *      metricStream {
-   *        metric: string
-   *        value: double
-   *        timestamp: long
-   *      }
-   *    }
-   * </code>
-   * @param schemaConfig
-   * @return
-   */
-  def parse(schemaConfig:Map[String,AnyRef]):SchemaSet = {
-    val schemas = new SchemaSet()
-    schemaConfig.foreach(entry =>{
-      schemas.set(entry._1,Schema.parse(entry._2.asInstanceOf[java.util.HashMap[String,AnyRef]].toMap))
-    })
-    schemas
-  }
-
-  def parse(config:Config):SchemaSet = parse(config.root().unwrapped().asInstanceOf[java.util.HashMap[String,AnyRef]].toMap)
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/runner/PipelineRunner.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/runner/PipelineRunner.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/runner/PipelineRunner.scala
deleted file mode 100644
index 1c964e1..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/runner/PipelineRunner.scala
+++ /dev/null
@@ -1,115 +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.stream.pipeline.runner
-
-import java.util
-
-import com.typesafe.config.Config
-import org.apache.commons.cli.{CommandLine, Options}
-import org.apache.eagle.dataproc.util.ConfigOptionParser
-import org.apache.eagle.datastream.ExecutionEnvironments.storm
-import org.apache.eagle.datastream.core.ExecutionEnvironment
-import org.apache.eagle.stream.pipeline.compiler.PipelineCompiler
-import org.apache.eagle.stream.pipeline.parser.PipelineParser
-import org.slf4j.LoggerFactory
-
-import scala.reflect.runtime.{universe => ru}
-
-trait PipelineRunner extends PipelineParser with PipelineCompiler{
-  import PipelineCLIOptionParser._
-  private val LOG = LoggerFactory.getLogger("PipelineCLIOptionParser")
-  def submit[T <: ExecutionEnvironment](resource:String)(implicit typeTag:ru.TypeTag[T]) =
-    compile(parseResource(resource)).submit[T]
-  def submit(resource:String,clazz:Class[ExecutionEnvironment]) =
-    compile(parseResource(resource)).submit(clazz)
-  def submit(pipelineConfig:Config,clazz:Class[ExecutionEnvironment]) =
-    compile(parse(pipelineConfig)).submit(clazz)
-  def submit[T <: ExecutionEnvironment](pipelineConfig:Config)(implicit typeTag: ru.TypeTag[T]) =
-    compile(parse(pipelineConfig)).submit[T]
-
-  def apply(args:Array[String]):PipelineRunner = {
-    new ConfigOptionParser().load(args)
-    this
-  }
-
-  def main(args: Array[String]): Unit = {
-    val config = PipelineCLIOptionParser.load(args)
-    if(config.hasPath(PIPELINE_CONFIG_KEY)) {
-      submit[storm](config.getString(PIPELINE_CONFIG_KEY))
-    } else {
-      sys.error(
-        s"""
-           |Error: --$PIPELINE_OPT_KEY is required
-           |$USAGE
-         """.stripMargin)
-    }
-  }
-}
-
-private[runner] object PipelineCLIOptionParser extends ConfigOptionParser{
-  val LOG = LoggerFactory.getLogger("PipelineCLIOptionParser")
-  val PIPELINE_OPT_KEY="pipeline"
-
-  val PIPELINE_CONFIG_KEY="pipeline.config"
-
-  val CONFIG_OPT_KEY="conf"
-  val CONFIG_RESOURCE_KEY="config.resource"
-  val CONFIG_FILE_KEY="config.file"
-  val USAGE =
-    """
-      |Usage: java org.apache.eagle.stream.pipeline.Pipeline [options]
-      |
-      |Options:
-      |   --pipeline   pipeline configuration
-      |   --conf       common configuration
-      |   --env        storm (support spark, etc later)
-      |   --mode       local/remote/cluster
-    """.stripMargin
-  
-  override protected def options(): Options = {
-    val options = super.options()
-    options.addOption(PIPELINE_OPT_KEY, true, "Pipeline configuration file")
-    options.addOption(CONFIG_OPT_KEY, true, "Config properties file")
-    options
-  }
-
-  override protected def parseCommand(cmd: CommandLine): util.Map[String, String] = {
-    val map = super.parseCommand(cmd)
-
-    if (cmd.hasOption(PIPELINE_OPT_KEY)) {
-      val pipelineConf = cmd.getOptionValue(PIPELINE_OPT_KEY)
-      if(pipelineConf == null){
-        throw new IllegalArgumentException(s"--$PIPELINE_OPT_KEY should not be null")
-      } else {
-        LOG.info(s"Set $PIPELINE_CONFIG_KEY as $pipelineConf")
-        map.put(PIPELINE_CONFIG_KEY, pipelineConf)
-      }
-    }
-
-    if(cmd.hasOption(CONFIG_OPT_KEY)){
-      val commonConf = cmd.getOptionValue(CONFIG_OPT_KEY)
-      if(commonConf.contains("/")){
-        LOG.info(s"Set $CONFIG_FILE_KEY as $commonConf")
-        map.put(CONFIG_FILE_KEY, commonConf)
-      }else {
-        LOG.info(s"Set $CONFIG_RESOURCE_KEY $commonConf")
-        map.put(CONFIG_RESOURCE_KEY, commonConf)
-      }
-    }
-    map
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/utils/Exceptions.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/utils/Exceptions.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/utils/Exceptions.scala
deleted file mode 100644
index 1102a33..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/main/scala/org/apache/eagle/stream/pipeline/utils/Exceptions.scala
+++ /dev/null
@@ -1,20 +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.stream.pipeline.utils
-
-class ParseException(message:String) extends Exception(message)
-class CompileException(message:String) extends Exception(message)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/application.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/application.conf
deleted file mode 100644
index 3e8f69c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/application.conf
+++ /dev/null
@@ -1,34 +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.
-
-{
-	"eagleProps" : {
-		"dataJoinPollIntervalSec" : 30
-		"mailHost" : "smtp.server.host"
-		"mailSmtpPort":"25"
-		"mailDebug" : "true"
-		"eagleService": {
-			"host": "localhost"
-			"port": 9099
-			"username": "admin"
-			"password": "secret"
-		}
-	}
-	"dynamicConfigSource" : {
-		"enabled" : true
-		"initDelayMillis" : 0
-		"delayMillis" : 30000
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/eagle-pipeline.sh
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/eagle-pipeline.sh b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/eagle-pipeline.sh
deleted file mode 100644
index 4250681..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/eagle-pipeline.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-# 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.
-
-# ./eagle-pipeline.sh --pipeline [pipeline-definition-config] --config [base-configuration]
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/log4j.properties b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/log4j.properties
deleted file mode 100644
index c8a4f46..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,19 +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.
-
-log4j.rootLogger=INFO, stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_1.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_1.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_1.conf
deleted file mode 100644
index 6dddf7a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_1.conf
+++ /dev/null
@@ -1,131 +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.
-
-{
-	config {
-		alertExecutorConfigs {
-			defaultAlertExecutor  {
-				"parallelism" : 1
-				"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-				"needValidation" : "true"
-			}
-		}
-		eagleProps  {
-			"site" : "sandbox"
-			"application": "eventSource"
-			"dataJoinPollIntervalSec" : 30
-			"mailHost" : "mail.host.com"
-			"mailSmtpPort":"25"
-			"mailDebug" : "true"
-			"eagleService": {
-				"host": "localhost"
-				"port": 38080
-				"username": "admin"
-				"password": "secret"
-			}
-		}
-		dynamicConfigSource  {
-			"enabled" : true
-			"initDelayMillis" : 0
-			"delayMillis" : 30000
-		}
-	}
-
-	schema {
-		metricStreamSchema {
-			metric: string
-			value: double
-			timestamp: long
-		}
-	}
-
-	dataflow {
-		KafkaSource.metricStream_1 {
-			parallism = 1000
-			topic = "metric_event_1"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-			schema = "metricStreamSchema"
-		}
-
-		KafkaSource.metricStream_2 {
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.metricStream_3{
-			parallism = 1000
-			topic = "metric_event_3"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-			schema = "metricStreamSchema"
-		}
-
-		KafkaSink.metricStore {
-			schema = "metricStreamSchema"
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Alert.alert {
-//			upStreamNames = [metricStream_1,metricStream_2]
-			alertExecutorId = defaultAlertExecutor
-		}
-
-//		aggregator.aggreator {
-//			executor = "aggreationExecutor"
-//		}
-
-		metricStream_1|metricStream_2 -> alert {
-			group = shuffle
-		}
-
-		metricStream_1|metricStream_2 -> metricStore {
-			group = shuffle
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_2.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_2.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_2.conf
deleted file mode 100644
index 5e3561a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_2.conf
+++ /dev/null
@@ -1,93 +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.
-
-{
-	config {
-		envContextConfig {
-			"env" : "storm"
-			"mode" : "local"
-			"topologyName" : "dsl-based-topology"
-		}
-		eagleProps  {
-			"site" : "sandbox"
-			"application": "eventSource"
-			"dataJoinPollIntervalSec" : 30
-			"mailHost" : "mail.host.com"
-			"mailSmtpPort":"25"
-			"mailDebug" : "true"
-			"eagleService": {
-				"host": "localhost"
-				"port": 38080
-				"username": "admin"
-				"password": "secret"
-			}
-		}
-		dynamicConfigSource  {
-			"enabled" : true
-			"initDelayMillis" : 0
-			"delayMillis" : 30000
-		}
-	}
-
-	dataflow {
-		KafkaSource.metricStream_1 {
-			parallism = 1000
-			topic = "metric_event_1"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.metricStream_2 {
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.metricStream_3{
-			parallism = 1000
-			topic = "metric_event_3"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Console.printer {}
-
-		metricStream_1|metricStream_2|metricStream_3 -> printer {
-			grouping = shuffle
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf
deleted file mode 100644
index b1c1955..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_3.conf
+++ /dev/null
@@ -1,152 +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.
-
-{
-	config {
-		envContextConfig {
-			"env" : "storm"
-			"mode" : "local"
-			"topologyName" : "dsl-based-topology"
-			"parallelismConfig" : {
-				"kafkaMsgConsumer" : 1
-			}
-		}
-		alertExecutorConfigs {
-			defaultAlertExecutor  {
-				"parallelism" : 1
-				"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-				"needValidation" : "true"
-			}
-		}
-		eagleProps  {
-			"site" : "sandbox"
-			"application": "HADOOP"
-			"dataJoinPollIntervalSec" : 30
-			"mailHost" : "atom.corp.ebay.com"
-			"mailSmtpPort":"25"
-			"mailDebug" : "true"
-			"eagleService": {
-				"host": "localhost"
-				"port": 38080
-				"username": "admin"
-				"password": "secret"
-			}
-		}
-		dynamicConfigSource  {
-			"enabled" : true
-			"initDelayMillis" : 0
-			"delayMillis" : 30000
-		}
-	}
-
-	schema {
-//		JmxStreamOne {
-//			attributes {
-//				metric: string
-//				value: double
-//				timestamp: long
-//			}
-//			alertExecutorId = [defaultAlertExecutor,anotherAlertExecutor]
-//		}
-		JmxStreamOne {
-			metric: string
-			value: double
-			timestamp: long
-		}
-	}
-
-	dataflow {
-		KafkaSource.JmxStreamOne {
-			parallism = 1000
-			topic = "metric_event_1"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamTwo {
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamThree{
-			parallism = 1000
-			topic = "metric_event_3"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Console.printer {
-			format = "%s"
-		}
-
-		KafkaSink.metricStore {
-			topic = "metric_event_persist"
-		}
-
-//		KafkaSink.alertStore {
-//			"topic" = "alert_persist"
-//			"bootstrap.servers" = "localhost:6667"
-//		}
-
-		Alert.alert {
-			inputs = [JmxStreamOne,JmxStreamTwo,JmxStreamThree]
-
-			upStreamNames = [JmxStreamOne,JmxStreamTwo,JmxStreamThree]
-			alertExecutorId = defaultAlertExecutor
-		}
-
-//		Aggregator.aggreator {
-//			upStreamNames = []
-//			analyzerId = ""
-//			cepQl = ""
-//			strategy = ""
-//		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> alert {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> metricStore {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> printer {
-			grouping = shuffle
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_4.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_4.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_4.conf
deleted file mode 100644
index 9c35456..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_4.conf
+++ /dev/null
@@ -1,125 +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.
-
-{
-	config {
-		envContextConfig {
-			"env" : "storm"
-			"mode" : "local"
-			"topologyName" : "dsl-topology"
-			"parallelismConfig" : {
-				"kafkaMsgConsumer" : 1
-			},
-		}
-		alertExecutorConfigs {
-			defaultAlertExecutor  {
-				"parallelism" : 1
-				"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-				"needValidation" : "true"
-			}
-		}
-		eagleProps {
-			"site" : "sandbox"
-			"application": "HADOOP"
-		}
-	}
-	
-	dataflow {
-		KafkaSource.JmxStreamOne {
-			parallism = 1000
-			topic = "metric_event_1"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamTwo {
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamThree{
-			parallism = 1000
-			topic = "metric_event_3"
-			zkConnection = "localhost:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "localhost"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Console.printer {
-			format = "%s"
-		}
-
-		KafkaSink.metricStore {
-			topic = "metric_event_persist"
-		}
-
-//		KafkaSink.aggSink {
-//			topic = "metric_agg_persist"
-//		}
-
-		Alert.defaultAlertExecutor {
-			// upStreamNames = [JmxStreamOne,JmxStreamTwo,JmxStreamThree]
-			// alertExecutorId = defaultAlertExecutor
-		}
-
-		Aggregator.Aggregator{ sql = """
-				define stream JmxStreamOne(eagleAlertContext object, timestamp long, metric string, value double);
-				@info(name = "query")
-				from JmxStreamOne[value > 100.0] select * insert into outputStream;
-		"""}
-
-
-		JmxStreamOne -> Aggregator {}
-
-		Aggregator -> printer {}
-
-//		Aggregator -> aggregatedSink{
-//			grouping = shuffle
-//		}
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> defaultAlertExecutor {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> metricStore {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> printer {
-			grouping = shuffle
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_5.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_5.conf b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_5.conf
deleted file mode 100644
index 85b5334..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/resources/pipeline_5.conf
+++ /dev/null
@@ -1,110 +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.
-
-{
-	config {
-		envContextConfig {
-			"env" : "storm"
-			"mode" : "cluster"
-			"topologyName" : "dynamical-topology-5"
-			"parallelismConfig" : {
-				"kafkaMsgConsumer" : 1
-			},
-			"nimbusHost":"sandbox.hortonworks.com",
-			"nimbusThriftPort":6627
-		}
-		alertExecutorConfigs {
-			defaultAlertExecutor  {
-				"parallelism" : 1
-				"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-				"needValidation" : "true"
-			}
-		}
-		eagleProps {
-			"site" : "sandbox"
-			"application": "HADOOP"
-		}
-	}
-	
-	dataflow {
-		KafkaSource.JmxStreamOne {
-			parallism = 1000
-			topic = "metric_event_1"
-			zkConnection = "sandbox.hortonworks.com:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "sandbox.hortonworks.com"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamTwo {
-			parallism = 1000
-			topic = "metric_event_2"
-			zkConnection = "sandbox.hortonworks.com:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "sandbox.hortonworks.com"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		KafkaSource.JmxStreamThree{
-			parallism = 1000
-			topic = "metric_event_3"
-			zkConnection = "sandbox.hortonworks.com:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "sandbox.hortonworks.com"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Console.printer {
-			format = "%s"
-		}
-
-		KafkaSink.metricStore {
-			"topic" = "metric_event_persist"
-			"bootstrap.servers" = "sandbox.hortonworks.com:6667"
-		}
-
-		Alert.defaultAlertExecutor {
-			// upStreamNames = [JmxStreamOne,JmxStreamTwo,JmxStreamThree]
-			// alertExecutorId = defaultAlertExecutor
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> defaultAlertExecutor {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> metricStore {
-			grouping = shuffle
-		}
-
-		JmxStreamOne|JmxStreamTwo|JmxStreamThree -> printer {
-			grouping = shuffle
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/ConfigSpec.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/ConfigSpec.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/ConfigSpec.scala
deleted file mode 100644
index 7b552da..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/ConfigSpec.scala
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.apache.eagle.stream.pipeline
-
-import com.typesafe.config.ConfigFactory
-import org.scalatest.{FlatSpec, Matchers}
-
-/**
-  * 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.
-  */
-class ConfigSpec extends FlatSpec with Matchers{
-  "Config" should "be overrode correctly" in {
-    val conf1 = ConfigFactory.parseString(
-      """
-        |value=1
-      """.stripMargin)
-    val conf2 = ConfigFactory.parseString(
-      """
-        |value=2
-      """.stripMargin)
-    val conf3 = conf1.withFallback(conf2)
-    val conf4 = conf2.withFallback(conf1)
-    conf3.getInt("value") should be(1)
-    conf4.getInt("value") should be(2)
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/DataFlowSpec.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/DataFlowSpec.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/DataFlowSpec.scala
deleted file mode 100644
index e63280a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/DataFlowSpec.scala
+++ /dev/null
@@ -1,113 +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.stream.pipeline
-
-import com.typesafe.config.ConfigFactory
-import org.apache.eagle.stream.pipeline.parser.{ConnectionIdentifier, DataFlow, DefinitionIdentifier, Identifier}
-import org.scalatest.{FlatSpec, Matchers}
-
-class DataFlowSpec extends FlatSpec with Matchers {
-  val dataFlowConfig =
-    """
-       |{
-       |	kafkaSource.metric_event_1 {
-       |    schema {
-       |      metric: string
-       |      timestamp: long
-       |      value: double
-       |    }
-       |		parallism = 1000
-       |		topic = "metric_event_1"
-       |		zkConnection = "localhost:2181"
-       |		zkConnectionTimeoutMS = 15000
-       |		consumerGroupId = "Consumer"
-       |		fetchSize = 1048586
-       |		transactionZKServers = "localhost"
-       |		transactionZKPort = 2181
-       |		transactionZKRoot = "/consumers"
-       |		transactionStateUpdateMS = 2000
-       |		deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-       |	}
-       |
-       |	kafkaSource.metric_event_2 {
-       |		schema = {
-       |      metric: string
-       |      timestamp: long
-       |      value: double
-       |    }
-       |		parallism = 1000
-       |		topic = "metric_event_2"
-       |		zkConnection = "localhost:2181"
-       |		zkConnectionTimeoutMS = 15000
-       |		consumerGroupId = "Consumer"
-       |		fetchSize = 1048586
-       |		transactionZKServers = "localhost"
-       |		transactionZKPort = 2181
-       |		transactionZKRoot = "/consumers"
-       |		transactionStateUpdateMS = 2000
-       |		deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-       |	}
-       |
-       |	kafkaSink.metricStore {}
-       |
-       |	alert.alert {
-       |		executor = "alertExecutor"
-       |	}
-       |
-       |	aggregator.aggreator {
-       |		executor = "aggreationExecutor"
-       |	}
-       |
-       |	metric_event_1|metric_event_2 -> alert {}
-       |	metric_event_1|metric_event_2 -> metricStore {}
-       |}
-     """.stripMargin
-
-  DataFlow.getClass.toString should "parse dataflow end-to-end correctly" in {
-    val config = ConfigFactory.parseString(dataFlowConfig)
-    config should not be null
-    val dataflow = DataFlow.parse(config)
-    dataflow should not be null
-    dataflow.getConnectors.size should be(4)
-    dataflow.getProcessors.size should be(5)
-  }
-
-  Identifier.getClass.toString should "parse as definition" in {
-    val defId = Identifier.parse("kafka").asInstanceOf[DefinitionIdentifier]
-    defId.moduleType should be("kafka")
-  }
-
-  Identifier.getClass.toString should "parse node1 -> node2 as connection" in {
-    val id = Identifier.parse("node1 -> node2").asInstanceOf[ConnectionIdentifier]
-    id.fromIds.size should be(1)
-  }
-
-  Identifier.getClass.toString should "parse node1|node2 -> node3" in {
-    val id = Identifier.parse("node1|node2 -> node3").asInstanceOf[ConnectionIdentifier]
-    id.fromIds.size should be(2)
-  }
-
-  Identifier.getClass.toString should "parse node1|node2|node3 -> node4 as connection" in {
-    val id = Identifier.parse("node1|node2|node3 -> node4").asInstanceOf[ConnectionIdentifier]
-    id.fromIds.size should be(3)
-  }
-
-  Identifier.getClass.toString should "parse node1 | node2 | node3 -> node4 as connection" in {
-    val id = Identifier.parse("node1 | node2 | node3 -> node4").asInstanceOf[ConnectionIdentifier]
-    id.fromIds.size should be(3)
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/PipelineSpec.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/PipelineSpec.scala b/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/PipelineSpec.scala
deleted file mode 100644
index 5e2007d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-pipeline/src/test/scala/org/apache/eagle/stream/pipeline/PipelineSpec.scala
+++ /dev/null
@@ -1,61 +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.stream.pipeline
-
-import org.apache.eagle.datastream.ExecutionEnvironments.storm
-import org.scalatest.{FlatSpec, Matchers}
-
-class PipelineSpec extends FlatSpec with Matchers{
-  "Pipeline" should "parse successfully from pipeline_1.conf" in {
-    val pipeline = Pipeline.parseResource("pipeline_1.conf")
-    pipeline should not be null
-  }
-
-  "Pipeline" should "compile successfully from pipeline_2.conf" in {
-    val pipeline = Pipeline.parseResource("pipeline_2.conf")
-    pipeline should not be null
-    val stream = Pipeline.compile(pipeline)
-    stream should not be null
-    // Throw ClassNotFoundException when submit in unit test
-    // stream.submit[storm]
-  }
-}
-
-/**
- * Storm LocalCluster throws ClassNotFoundException when submit in unit test, so here submit in App
- */
-object PipelineSpec_2 extends App{
-  val pipeline = Pipeline(args).parseResource("pipeline_2.conf")
-  val stream = Pipeline.compile(pipeline)
-  stream.submit[storm]
-}
-
-object PipelineSpec_3 extends App {
-  Pipeline(args).submit[storm]("pipeline_3.conf")
-}
-
-object PipelineSpec_4 extends App {
-  Pipeline(args).submit[storm]("pipeline_4.conf")
-}
-
-object PipelineSpec_5 extends App {
-  Pipeline(args).submit[storm]("pipeline_5.conf")
-}
-
-object PipelineCLISpec extends App{
-  Pipeline.main(args)
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml b/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
deleted file mode 100644
index 38f55b8..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/pom.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.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.
-  -->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>eagle</groupId>
-    <artifactId>eagle-data-process-parent</artifactId>
-    <version>0.3.0</version>
-      <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>eagle-stream-process-api</artifactId>
-  <name>eagle-stream-process-api</name>
-
-  <dependencies>
-      <dependency>
-        <groupId>org.apache.storm</groupId>
-        <artifactId>storm-core</artifactId>
-        <exclusions>
-            <exclusion>
-                <groupId>ch.qos.logback</groupId>
-                <artifactId>logback-classic</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-            </exclusion>
-            <exclusion>
-                <groupId>org.slf4j</groupId>
-                <artifactId>log4j-over-slf4j</artifactId>
-            </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.storm</groupId>
-          <artifactId>storm-kafka</artifactId>
-          <exclusions>
-              <exclusion>
-                  <groupId>ch.qos.logback</groupId>
-                  <artifactId>logback-classic</artifactId>
-              </exclusion>
-              <exclusion>
-                  <groupId>log4j</groupId>
-                  <artifactId>log4j</artifactId>
-              </exclusion>
-              <exclusion>
-                  <groupId>org.slf4j</groupId>
-                  <artifactId>log4j-over-slf4j</artifactId>
-              </exclusion>
-          </exclusions>
-      </dependency>
-      <dependency>
-          <groupId>eagle</groupId>
-          <artifactId>eagle-alert-process</artifactId>
-          <version>${project.version}</version>
-      </dependency>
-      <dependency>
-          <groupId>eagle</groupId>
-          <artifactId>eagle-stream-process-base</artifactId>
-          <version>${project.version}</version>
-      </dependency>
-      <dependency>
-          <groupId>org.scala-lang</groupId>
-          <artifactId>scala-reflect</artifactId>
-      </dependency>
-      <dependency>
-          <groupId>org.scalatest</groupId>
-          <artifactId>scalatest_${scala.version}</artifactId>
-          <scope>test</scope>
-      </dependency>
-
-	<dependency>
-		<groupId>org.apache.kafka</groupId>
-		<artifactId>kafka-clients</artifactId>
-		<version>${kafka-clients.version}</version>
-	</dependency>
-  </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.scala-tools</groupId>
-                <artifactId>maven-scala-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>scala-compile-first</id>
-                        <phase>process-resources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>scala-test-compile</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <skipTests>true</skipTests>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.scalatest</groupId>
-                <artifactId>scalatest-maven-plugin</artifactId>
-                <configuration>
-                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
-                    <junitxml>.</junitxml>
-                    <filereports>TestSuite.txt</filereports>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>test</id>
-                        <goals>
-                            <goal>test</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutor.java
deleted file mode 100644
index b17c192..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutor.java
+++ /dev/null
@@ -1,46 +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.dataproc.impl.aggregate;
-
-import org.apache.eagle.policy.ResultRender;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.PolicyPartitioner;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateDefinitionAPIEntity;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.eagle.policy.executor.PolicyProcessExecutor;
-
-/**
- * @since Dec 16, 2015
- *
- */
-public class AggregateExecutor extends PolicyProcessExecutor<AggregateDefinitionAPIEntity, AggregateEntity> {
-
-	private static final long serialVersionUID = 1L;
-
-	private ResultRender<AggregateDefinitionAPIEntity, AggregateEntity> render = new AggregateResultRender();
-
-	public AggregateExecutor(String executorId, PolicyPartitioner partitioner, int numPartitions, int partitionSeq,
-			PolicyDefinitionDAO<AggregateDefinitionAPIEntity> alertDefinitionDao, String[] sourceStreams) {
-		super(executorId, partitioner, numPartitions, partitionSeq, alertDefinitionDao, sourceStreams,
-				AggregateDefinitionAPIEntity.class);
-	}
-
-	@Override
-	public ResultRender<AggregateDefinitionAPIEntity, AggregateEntity> getResultRender() {
-		return render;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutorFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutorFactory.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutorFactory.java
deleted file mode 100644
index 5093685..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateExecutorFactory.java
+++ /dev/null
@@ -1,117 +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.dataproc.impl.aggregate;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigValue;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateDefinitionAPIEntity;
-import org.apache.eagle.policy.DefaultPolicyPartitioner;
-import org.apache.eagle.policy.PolicyPartitioner;
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.policy.dao.PolicyDefinitionDAO;
-import org.apache.eagle.policy.dao.PolicyDefinitionEntityDAOImpl;
-import org.apache.eagle.policy.executor.IPolicyExecutor;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since Dec 16, 2015
- *
- */
-public class AggregateExecutorFactory {
-
-	private static final Logger LOG = LoggerFactory.getLogger(AggregateExecutorFactory.class);
-	
-	private AggregateExecutorFactory() {}
-	public static final AggregateExecutorFactory Instance = new AggregateExecutorFactory();
-
-
-	public IPolicyExecutor[] createExecutors(List<String> streamNames, String cql) throws Exception {
-		int numPartitions = 1; //loadExecutorConfig(config, executorId, partitionerCls);
-
-		IPolicyExecutor[] executors = new IPolicyExecutor[numPartitions];
-		String[] upStreams = streamNames.toArray(new String[0]);
-		for (int i = 0; i < numPartitions ; i++ ) {
-			executors[i] = new SimpleAggregateExecutor(upStreams, cql, "siddhiCEPEngine", i, numPartitions);
-		}
-
-		return executors;
-	}
-
-	public IPolicyExecutor[] createExecutors(Config config, List<String> streamNames, String executorId) throws Exception {
-		StringBuilder partitionerCls = new StringBuilder(DefaultPolicyPartitioner.class.getCanonicalName());
-        int numPartitions = loadExecutorConfig(config, executorId, partitionerCls);
-		PolicyDefinitionDAO<AggregateDefinitionAPIEntity> policyDefDao = new PolicyDefinitionEntityDAOImpl<>(
-				new EagleServiceConnector(config), Constants.AGGREGATE_DEFINITION_SERVICE_ENDPOINT_NAME);
-		return newAggregateExecutors(policyDefDao, streamNames, executorId, numPartitions, partitionerCls.toString());
-	}
-	
-	@SuppressWarnings("unchecked")
-	private int loadExecutorConfig(Config config, String executorId, StringBuilder partitionerCls) {
-		int numPartitions = 0;
-		String aggregateExecutorConfigsKey = "aggregateExecutorConfigs";
-        if(config.hasPath(aggregateExecutorConfigsKey)) {
-            Map<String, ConfigValue> analyzeExecutorConfigs = config.getObject(aggregateExecutorConfigsKey);
-            if(analyzeExecutorConfigs !=null && analyzeExecutorConfigs.containsKey(executorId)) {
-                Map<String, Object> alertExecutorConfig = (Map<String, Object>) analyzeExecutorConfigs.get(executorId).unwrapped();
-                int parts = 0;
-                if(alertExecutorConfig.containsKey("parallelism")) parts = (int) (alertExecutorConfig.get("parallelism"));
-                numPartitions = parts == 0 ? 1 : parts;
-                if(alertExecutorConfig.containsKey("partitioner")) {
-                	partitionerCls.setLength(0);
-                	partitionerCls.append((String) alertExecutorConfig.get("partitioner"));
-                }
-            }
-        }
-        return numPartitions;
-	}
-
-//	private List<String> findStreamNames(Config config, String executorId, String dataSource) throws Exception {
-//		// Get map from alertExecutorId to alert stream
-//		// (dataSource) => Map[alertExecutorId:String,streamName:List[String]]
-//		List<String> streamNames = new ArrayList<String>();
-//		// FIXME : here we reuse the executor definition. But the name alert is not ambiguous now.
-//		AlertExecutorDAOImpl alertExecutorDAO = new AlertExecutorDAOImpl(new EagleServiceConnector(config));
-//		List<AlertExecutorEntity> alertExecutorEntities = alertExecutorDAO.findAlertExecutor(dataSource,
-//				executorId);
-//		for (AlertExecutorEntity entity : alertExecutorEntities) {
-//			streamNames.add(entity.getTags().get(Constants.STREAM_NAME));
-//		}
-//		return streamNames;
-//	}
-	
-	private AggregateExecutor[] newAggregateExecutors(PolicyDefinitionDAO<AggregateDefinitionAPIEntity> alertDefDAO,
-			List<String> sourceStreams, String executorID, int numPartitions, String partitionerCls)
-					throws Exception {
-		LOG.info("Creating aggregator executors with executorID: " + executorID + ", numPartitions: "
-				+ numPartitions + ", Partition class is: " + partitionerCls);
-
-		PolicyPartitioner partitioner = (PolicyPartitioner) Class.forName(partitionerCls).newInstance();
-		AggregateExecutor[] alertExecutors = new AggregateExecutor[numPartitions];
-		String[] _sourceStreams = sourceStreams.toArray(new String[sourceStreams.size()]);
-
-		for (int i = 0; i < numPartitions; i++) {
-			alertExecutors[i] = new AggregateExecutor(executorID, partitioner, numPartitions, i, alertDefDAO,
-					_sourceStreams);
-		}
-		return alertExecutors;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateResultRender.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateResultRender.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateResultRender.java
deleted file mode 100644
index 986885a..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/java/org/apache/eagle/dataproc/impl/aggregate/AggregateResultRender.java
+++ /dev/null
@@ -1,45 +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.dataproc.impl.aggregate;
-
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateDefinitionAPIEntity;
-import org.apache.eagle.dataproc.impl.aggregate.entity.AggregateEntity;
-import org.apache.eagle.policy.PolicyEvaluationContext;
-import org.apache.eagle.policy.ResultRender;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * Created on 12/29/15.
- */
-public class AggregateResultRender implements ResultRender<AggregateDefinitionAPIEntity, AggregateEntity>, Serializable {
-
-
-    @Override
-    public AggregateEntity render(Config config,
-                                  List<Object> rets,
-                                  PolicyEvaluationContext<AggregateDefinitionAPIEntity, AggregateEntity> siddhiAlertContext,
-                                  long timestamp) {
-        AggregateEntity result = new AggregateEntity();
-        for (Object o : rets) {
-            result.add(o);
-        }
-        return result;
-    }
-}



[23/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayList.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayList.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayList.java
deleted file mode 100644
index 942111d..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayList.java
+++ /dev/null
@@ -1,75 +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.common;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestCircularArrayList {
-
-	@Test
-	public void testAddAndRemove() {
-		Long[] array = new Long[5];
-		CircularArrayList<Long> list = new CircularArrayList<Long>(array);
-		
-		for (long i = 0 ; i < 5; ++i) {
-			list.add(i);
-			Assert.assertEquals((Long)i, array[(int) i]);
-			Assert.assertTrue(list.contains(i));
-			Assert.assertEquals(i, list.find(i));
-		}
-		Assert.assertFalse(list.contains(6L));
-		Exception e = null;
-		try {
-			list.add((long)5);
-		} catch (Exception ex) {
-			e = ex;
-		}
-		Assert.assertNotNull(e);
-		Assert.assertEquals(0, list.tail());
-		Assert.assertEquals(0, list.head());
-		Assert.assertEquals(5, list.size());
-		Assert.assertTrue(list.isFull());
-		Long v = list.remove(1);
-		Assert.assertEquals((Long)1L, v);
-		Assert.assertEquals(4, list.size());
-		Assert.assertEquals(1, list.head());
-		Assert.assertEquals(0, list.tail());
-		list.add((long)5);
-		Assert.assertEquals(5, list.size());
-		Assert.assertEquals(1, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertEquals((Long)0L, list.remove(0));
-		Assert.assertEquals(2, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertEquals((Long)2L, list.remove(0));
-		Assert.assertEquals(3, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertEquals((Long)3L, list.remove(0));
-		Assert.assertEquals(4, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertEquals((Long)4L, list.remove(0));
-		Assert.assertEquals(0, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertEquals((Long)5L, list.remove(0));
-		Assert.assertEquals(1, list.head());
-		Assert.assertEquals(1, list.tail());
-		Assert.assertTrue(list.isEmpty());
-		Assert.assertFalse(list.isFull());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayListSortedSet.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayListSortedSet.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayListSortedSet.java
deleted file mode 100644
index 9422313..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestCircularArrayListSortedSet.java
+++ /dev/null
@@ -1,59 +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.common;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestCircularArrayListSortedSet {
-
-	@Test
-	public void testInsertAndRemove() {
-		Long[] array = new Long[5];
-		CircularArrayListSortedSet<Long> set = new CircularArrayListSortedSet<Long>(array);
-		
-		set.insert(3L);
-		set.insert(2L);
-		set.insert(1L);
-		set.insert(5L);
-		set.insert(4L);
-		
-		for (int i = 0; i < 5; ++i) {
-			Assert.assertEquals((Long)(long)(i + 1),set.get(i));
-			Assert.assertEquals(i, set.binarySearch((Long)(long)(i + 1)));
-		}
-		Assert.assertEquals(0, set.head());
-		Assert.assertEquals(0, set.tail());
-		Assert.assertTrue(set.isFull());
-		Assert.assertEquals(-(5 + 1), set.binarySearch(6L));
-		
-		Assert.assertEquals(2, set.remove(3L));
-		Assert.assertEquals(2, set.remove(4L));
-		Assert.assertEquals(-(2 + 1), set.binarySearch(3L));
-		set.insert(3L);
-		set.insert(4L);
-		
-		for (int i = 0; i < 5; ++i) {
-			Assert.assertEquals((Long)(long)(i + 1),set.get(i));
-			Assert.assertEquals(i, set.binarySearch((Long)(long)(i + 1)));
-		}
-		Assert.assertEquals(2, set.head());
-		Assert.assertEquals(2, set.tail());
-		Assert.assertTrue(set.isFull());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestDateTimeUtil.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestDateTimeUtil.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestDateTimeUtil.java
deleted file mode 100755
index 8b7c1cd..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestDateTimeUtil.java
+++ /dev/null
@@ -1,88 +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.common;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-
-public class TestDateTimeUtil {
-	@Test
-	public void testRound1(){
-		long tsInMS = 1397016731576L;
-		long tsInMin = DateTimeUtil.roundDown(Calendar.MINUTE, tsInMS);
-		Assert.assertEquals(1397016720000L, tsInMin);
-		
-		GregorianCalendar cal = new GregorianCalendar();
-		cal.setTimeInMillis(tsInMS);
-		cal.set(Calendar.SECOND, 0);
-		cal.set(Calendar.MILLISECOND, 0);
-		Assert.assertEquals(tsInMin, cal.getTimeInMillis());
-	}
-	
-	@Test
-	public void testRound2(){
-		long tsInMS = 1397016731576L;
-		long tsInHour = DateTimeUtil.roundDown(Calendar.HOUR, tsInMS);
-		Assert.assertEquals(1397016000000L, tsInHour);
-		
-		GregorianCalendar cal = new GregorianCalendar();
-		cal.setTimeInMillis(tsInMS);
-		cal.set(Calendar.MINUTE, 0);
-		cal.set(Calendar.SECOND, 0);
-		cal.set(Calendar.MILLISECOND, 0);
-		Assert.assertEquals(tsInHour, cal.getTimeInMillis());
-	}
-	
-	@Test
-	public void testRound3(){
-		long tsInMS = 1L;
-		long tsInDay = DateTimeUtil.roundDown(Calendar.DATE, tsInMS);
-		Assert.assertEquals(0L, tsInDay);
-//		Assert.assertEquals("1970-01-01 08:00:00", DateTimeUtil.millisecondsToHumanDateWithSeconds(tsInDay));
-	}
-	
-	@Test
-	public void testRound4(){
-		long tsInMS = 0L;
-		long tsInDay = DateTimeUtil.roundDown(Calendar.DATE, tsInMS);
-		Assert.assertEquals(0L, tsInDay);
-		String str = DateTimeUtil.millisecondsToHumanDateWithSeconds(tsInMS);
-		System.out.println(str);
-	}
-	
-	@Test
-	public void testRound5(){
-		long tsInMS = 8*3600*1000L;
-		long tsInDay = DateTimeUtil.roundDown(Calendar.DATE, tsInMS);
-		Assert.assertEquals(0L, tsInDay);
-		String str = DateTimeUtil.millisecondsToHumanDateWithSeconds(tsInDay);
-		System.out.println(str);
-	}
-	
-	@Test
-	public void testDayOfWeek() {
-		GregorianCalendar cal = new GregorianCalendar();
-		long tsInMS = 0L;
-		cal.setTimeInMillis(tsInMS);
-		//cal.setTimeInMillis(System.currentTimeMillis());
-		System.out.println(cal.get(Calendar.DAY_OF_WEEK));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestEagleBase64Wrapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestEagleBase64Wrapper.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestEagleBase64Wrapper.java
deleted file mode 100755
index 384c274..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/TestEagleBase64Wrapper.java
+++ /dev/null
@@ -1,38 +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.common;
-
-import org.junit.Test;
-
-public class TestEagleBase64Wrapper {
-	@Test
-	public void test(){
-		byte[] b = EagleBase64Wrapper.decode("BgVz-6vkdM8AAbGAf__-trtos5aqSGPod4Q1GwA268vF50iNBgmpmAxLXKkGbxkREWcmOzT3YIx3hDUb");
-		byte[] c = EagleBase64Wrapper.decode("BgVz-6vkdM8AAbGAf__-trtos5aqSGPod4Q1G6pLeJcAATVuADbry8XnSI0GCamYDEtcqQZvGRERZyY7NPdgjHeENRs");
-		
-		System.out.println(new String(b));
-		System.out.println(new String(c));
-		
-		int hash = "jobType".hashCode();
-		byte b1 = (byte)((hash >> 24) & 0xff);
-		byte b2 = (byte)(((hash << 8) >> 24) & 0xff);
-		byte b3 = (byte)(((hash << 16) >> 24) & 0xff);
-		byte b4 = (byte)(((hash << 24) >> 24) & 0xff);
-		
-		System.out.println(b1 + "," + b2 + "," + b3 + "," + b4);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/config/TestEagleConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/config/TestEagleConfig.java b/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/config/TestEagleConfig.java
deleted file mode 100644
index 6894b7d..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/java/org/apache/eagle/common/config/TestEagleConfig.java
+++ /dev/null
@@ -1,43 +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.common.config;
-
-import junit.framework.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * @since 9/22/15
- */
-public class TestEagleConfig {
-    private EagleConfig config;
-
-    @Before
-    public void setUp(){
-        System.setProperty("config.resource","test-service-config.conf");
-        config = EagleConfigFactory.load();
-    }
-
-    @Test
-    public void testInit(){
-        Assert.assertEquals("test",config.getEnv());
-        Assert.assertEquals("localhost",config.getServiceHost());
-        Assert.assertEquals(9090,config.getServicePort());
-        Assert.assertEquals("hbase",config.getStorageType());
-        Assert.assertEquals(false,config.isCoprocessorEnabled());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/footer.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/footer.vm b/eagle-core/eagle-query/eagle-common/src/test/resources/footer.vm
deleted file mode 100755
index 8df4b06..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/footer.vm
+++ /dev/null
@@ -1,25 +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.
- *
- * @version 0.3.0
- *#
-    </td>
-  </tr>
-  </tr>
-</table>
-<!-- End of wrapper table -->
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/header.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/header.vm b/eagle-core/eagle-query/eagle-common/src/test/resources/header.vm
deleted file mode 100755
index 8bd4388..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/header.vm
+++ /dev/null
@@ -1,299 +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.
- *
- * @version 0.3.0
- *#
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-  <title></title>
-  <style type="text/css">
-    /* Based on The MailChimp Reset INLINE: Yes. */
-    /* Client-specific Styles */
-    .outlook a {
-      color: #091D42;
-      padding: 0;
-      text-decoration: none;
-    }
-
-    /* Force Outlook to provide a "view in browser" menu link. */
-    body {
-      width: 100% !important;
-      -webkit-text-size-adjust: 100%;
-      -ms-text-size-adjust: 100%;
-      margin: 0;
-      padding: 0;
-    }
-
-    /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
-    .ExternalClass {
-      width: 100%;
-    }
-
-    /* Force Hotmail to display emails at full width */
-    .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
-      line-height: 100%;
-    }
-
-    /* Forces Hotmail to display normal line spacing.  More on that: http://www.emailonacid.com/forum/viewthread/43/ */
-    #backgroundTable {
-      margin: 0;
-      padding: 0;
-      width: 100% !important;
-      line-height: 100% !important;
-    }
-
-    /* End reset */
-
-    /* Some sensible defaults for images
-    Bring inline: Yes. */
-    img {
-      outline: none;
-      text-decoration: none;
-      -ms-interpolation-mode: bicubic;
-    }
-
-    a img {
-      border: none;
-    }
-
-    .image_fix {
-      display: block;
-    }
-
-    /* Yahoo paragraph fix
-    Bring inline: Yes. */
-    p {
-      margin: 1em 0;
-    }
-
-    /* Hotmail header color reset
-    Bring inline: Yes. */
-    h1, h2, h3, h4, h5, h6 {
-      color: black !important;
-    }
-
-    h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
-      color: blue !important;
-    }
-
-    h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
-      color: red !important; /* Preferably not the same color as the normal header link color.  There is limited support for psuedo classes in email clients, this was added just for good measure. */
-    }
-
-    h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
-      color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
-    }
-
-    /* Outlook 07, 10 Padding issue fix
-    Bring inline: No.*/
-    table td {
-      border-collapse: collapse;
-    }
-
-    table{
-        width: 100%;
-    }
-
-    /* Remove spacing around Outlook 07, 10 tables
-    Bring inline: Yes */
-    table {
-      border-collapse: collapse;
-      mso-table-lspace: 0pt;
-      mso-table-rspace: 0pt;
-    }
-
-    /* Styling your links has become much simpler with the new Yahoo.  In fact, it falls in line with the main credo of styling in email and make sure to bring your styles inline.  Your link colors will be uniform across clients when brought inline.
-    Bring inline: Yes. */
-    a {
-      color: orange;
-    }
-
-    /***************************************************
-    ****************************************************
-    MOBILE TARGETING
-    ****************************************************
-    ***************************************************/
-    @media only screen and (max-device-width: 480px) {
-      /* Part one of controlling phone number linking for mobile. */
-      a[href^="tel"], a[href^="sms"] {
-        text-decoration: none;
-        color: blue; /* or whatever your want */
-        pointer-events: none;
-        cursor: default;
-      }
-
-      .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
-        text-decoration: default;
-        color: orange !important;
-        pointer-events: auto;
-        cursor: default;
-      }
-
-    }
-
-    /* More Specific Targeting */
-
-    @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
-      /* You guessed it, ipad (tablets, smaller screens, etc) */
-      /* repeating for the ipad */
-      a[href^="tel"], a[href^="sms"] {
-        text-decoration: none;
-        color: blue; /* or whatever your want */
-        pointer-events: none;
-        cursor: default;
-      }
-
-      .mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
-        text-decoration: default;
-        color: orange !important;
-        pointer-events: auto;
-        cursor: default;
-      }
-    }
-
-    @media only screen and (-webkit-min-device-pixel-ratio: 2) {
-      /* Put your iPhone 4g styles in here */
-    }
-
-    /* Android targeting */
-    @media only screen and (-webkit-device-pixel-ratio: .75) {
-      /* Put CSS for low density (ldpi) Android layouts in here */
-    }
-
-    @media only screen and (-webkit-device-pixel-ratio: 1) {
-      /* Put CSS for medium density (mdpi) Android layouts in here */
-    }
-
-    @media only screen and (-webkit-device-pixel-ratio: 1.5) {
-      /* Put CSS for high density (hdpi) Android layouts in here */
-    }
-
-    /* end Android targeting */
-    .head{
-      font-family:Helvetica, Arial;
-      font-size:30px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 25px 0 15px 0;
-      valign:middle;
-      font-weight: 500;
-      border-bottom: 1px solid #cccccc;
-    }
-
-    .head2{
-      font-family:Helvetica, Arial;
-      font-size:24px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 20px 0 10px 0;
-      valign:middle;
-      font-weight: 500;
-    }
-
-    .text{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      color:#333;
-      align:left;
-      padding: 0.5em 0em 0.5em 0em;
-      valign:middle;
-    }
-
-    .info {
-      font-family:Helvetica, Arial;
-      font-size:16px;
-      text-decoration:none;
-      text-align:left;
-      padding-left:10px;
-      border-left: 3px solid #396A92;
-      background-color: #9AB4CB;
-      color:#091D42;
-      align:left;
-      padding: 1em 0em 1em 1em;
-      valign:middle;
-    }
-
-    .table-border{
-      border: 1px solid #ddd;
-      border-radius: 4px 4px 0 0;
-      box-shadow: none;
-    }
-
-    .table-border-th{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      border-top: 1px solid #cccccc;
-      border-right: 1px solid #cccccc;
-      padding: 8px;
-    }
-    .table-border-td{
-      font-family:Helvetica, Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      border-top: 1px solid #cccccc;
-      border-right: 1px solid #cccccc;
-      padding: 8px;
-      word-break: break-all;
-    }
-
-    .foot{
-      font-family:Arial;
-      font-size:14px;
-      text-decoration:none;
-      text-align:left;
-      padding: 0.5em 0em 0.5em 0.5em;
-      border-top: 1px solid #cccccc;
-      color:#777;
-    }
-
-  </style>
-
-  <!-- Targeting Windows Mobile -->
-  <!--[if IEMobile 7]>
-  <style type="text/css">
-
-  </style>
-  <![endif]-->
-
-  <!-- ***********************************************
-  ****************************************************
-  END MOBILE TARGETING
-  ****************************************************
-  ************************************************ -->
-
-  <!--[if gte mso 9]>
-  <style>
-    /* Target Outlook 2007 and 2010 */
-  </style>
-  <![endif]-->
-</head>
-<body>
-<!-- Wrapper/Container Table: Use a wrapper table to control the width and the background color consistently of your email. Use this approach instead of setting attributes on the body tag. -->
-<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable">
-  <tr>
-    <td valign="top" style="padding-left: 10px">

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-common/src/test/resources/log4j.properties
deleted file mode 100644
index 5a5709e..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,34 +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.
-
-log4j.rootLogger=INFO, DRFA, stdout
-eagle.log.dir=./logs
-eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
-log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
-log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-# 30-day backup
-#log4j.appender.DRFA.MaxBackupIndex=30
-log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/templates/tec_alert.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/templates/tec_alert.vm b/eagle-core/eagle-query/eagle-common/src/test/resources/templates/tec_alert.vm
deleted file mode 100755
index b2cf35b..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/templates/tec_alert.vm
+++ /dev/null
@@ -1,119 +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.
- *
- * @version 0.3.0
- *#
-#parse("header.vm")
-<table cellpadding="0" cellspacing="0" border="0" align="left" width="800" style="">
-  <tr>
-    <td class="head" width="800">
-      <span style="color: #091D42">Eagle Service <small style="color: #999999;">$startTime ~ $endTime</small></span>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Statistics
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-        <tr>
-          <th class="table-border-th" style="width: 25%">type</th>
-          <th class="table-border-th" style="width: 25%">count</th>
-          <th class="table-border-th" style="width: 25%">type</th>
-          <th class="table-border-th" style="width: 25%">count</th>
-        </tr>
-        </thead>
-        <tbody>
-        #foreach($key in $statistics.keySet())
-          #if( $foreach.count % 2 == 1 )
-          <tr>
-          #end
-            <td class="table-border-td">$key</td>
-            <td class="table-border-td">$statistics.get($key)</td>
-          #if( $foreach.count % 2 == 0)
-          </tr>
-          #end
-          #if( $foreach.count % 2 == 1 && !$foreach.hasNext )
-          	<td class="table-border-td"></td>
-            <td class="table-border-td"></td>
-          </tr>
-          #end
-       	#end
-        </tbody>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Detail Info
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td class="info" width="800">
-      <span>
-          These are the alerts that we can not find its hostname.
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-          <tr>
-            <th class="table-border-th">hostname</th>
-            <th class="table-border-th">date_reception</th>
-            <th class="table-border-th">type</th>
-            <th class="table-border-th">origin</th>
-            <th class="table-border-th">msg</th>
-          </tr>
-        </thead>
-        <tbody>
-        #foreach($entry in $noHostnameItems)
-          <tr>
-            <td class="table-border-td">$entry.hostname</td>
-            <td class="table-border-td">$entry.date_reception</td>
-            <td class="table-border-td">$entry.type</td>
-            <td class="table-border-td">$entry.origin</td>
-            <td class="table-border-td">$entry.msg</td>
-          </tr>
-       	#end
-        </tbody>
-      </table>
-    </td>
-  </tr>
-    <tr>
-        <td>
-            <img src="cid:$cid.get("chart.png")"/>
-        </td>
-    </tr>
-  <tr>
-    <td class="foot" width="800">
-      <span class="outlook">
-         Copyright &copy; 2013 <a href="http://123.dc1.xyz.com:9090/eagle-web/ui/eagle.html"
-                  target ="_blank" title="Hadoop Eagle">Hadoop Eagle</a>
-      </span>
-    </td>
-  </tr>
-</table>
-
-#parse("footer.vm")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/templates/test_anomaly_alert.vm
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/templates/test_anomaly_alert.vm b/eagle-core/eagle-query/eagle-common/src/test/resources/templates/test_anomaly_alert.vm
deleted file mode 100644
index 5db76b2..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/templates/test_anomaly_alert.vm
+++ /dev/null
@@ -1,137 +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.
- *
- * @version 0.3.0
- *#
-#parse("header.vm")
-<table cellpadding="0" cellspacing="0" border="0" align="left" width="800" style="">
-  <tr>
-    <td class="head" width="800">
-      <span style="color: #091D42">Eagle Job Anomaly Host Detection <small style="color: #999999;"><br>$startTime ~ $endTime</small></span>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Statistics
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-        <tr>
-          <th class="table-border-th" style="width: 25%">Cluster</th>
-          <th class="table-border-th" style="width: 25%">Datacener</th>
-          <th class="table-border-th" style="width: 25%">Count</th>
-        </tr>
-        </thead>
-        <tbody>
-          <tr>
-              <td class="table-border-td">$cluster</td>
-              <td class="table-border-td">$datacenter</td>
-              <td class="table-border-td">$count</td>
-          </tr>
-        </tbody>
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Anomaly detector configurations
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-        <tr>
-          <th class="table-border-th" style="width: 25%">Parameter Name</th>
-          <th class="table-border-th" style="width: 25%">Value</th>
-          <th class="table-border-th" style="width: 25%">Description</th>
-        </tr>
-        </thead>
-        <tbody>
-        #foreach($key in $configMap.keySet())
-        <tr>
-            <td class="table-border-td">$key</td>
-            <td class="table-border-td">$configMap.get($key)</td>
-            <td class="table-border-td">$configDescMap.get($key)</td>
-        </tr>
-       	#end
-         </tbody>
-        </table>
-      </td>
-  </tr>
-  <tr>
-    <td class="head2" width="800">
-      <span>
-        Detail Information
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td class="info" width="800">
-      <span>
-          These are the anomaly hosts detected by Hadoop Eagle:
-      </span>
-    </td>
-  </tr>
-  <tr>
-    <td valign="top" style="padding: 0.5em 0em 0.5em 0em;">
-      <table cellpadding="0" cellspacing="0" border="0" align="left" width="800" class="table-border">
-        <thead>
-          <tr>
-            <th class="table-border-th">Cluster</th>
-            <th class="table-border-th">Datacenter</th>
-            <th class="table-border-th">Hostname</th>
-            <th class="table-border-th">Description</th>
-            <th class="table-border-th">Job Types</th>
-            <th class="table-border-th">Errors</th>
-          </tr>
-        </thead>
-        <tbody>
-        #foreach($key in $anomalyHostMap.keySet())
-        <tr>
-            <td class="table-border-td">$cluster</td>
-            <td class="table-border-td">$datacenter</td>
-            <td class="table-border-td"><a href="http://123.dc1.xyz.com:9090/eagle-web/ui/AnomalyDetection.html?cluster=$cluster&datacenter=$datacenter&intervalmin=1&startTime=$startTime&endTime=$endTime&top=20">$key</a></td>
-            <td class="table-border-td">$anomalyHostMap.get($key)</td>
-            <td class="table-border-td">$jobNameMap.get($key)</td>
-            <td class="table-border-td"><a href="http://hadoop-eagle.vip.dc1.xyz.com/eagle-service/rest/list?query=TaskExecutionService[@cluster=%22$cluster%22%20AND%20@datacenter=%22$datacenter%22%20AND%20@hostname=%22$key%22%20AND%20@taskStatus=%22FAILED%22]{@error,@jobID,@taskID,@normJobName}&pageSize=1000&startTime=$startTime&endTime=$endTime">$errorMap.get($key)</a></td>
-        </tr>
-       	#end
-        </tbody>
-      </table>
-    </td>
-  </tr>
-  <br>
-  <tr>
-    <td class="foot" width="800">
-      <span class="outlook">
-         Copyright &copy; 2014 <a href="http://hadoop-eagle.vip.dc1.xyz.com"
-                  target ="_blank" title="Hadoop Eagle">Hadoop Eagle</a>
-      </span>
-    </td>
-  </tr>
-</table>
-<br>
-<br>
-
-#parse("footer.vm")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-common/src/test/resources/test-service-config.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-common/src/test/resources/test-service-config.conf b/eagle-core/eagle-query/eagle-common/src/test/resources/test-service-config.conf
deleted file mode 100644
index 848391d..0000000
--- a/eagle-core/eagle-query/eagle-common/src/test/resources/test-service-config.conf
+++ /dev/null
@@ -1,30 +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.
-
-eagle {
-	timezone = "UTC"
-
-	service {
-		env = "test"
-		host = "localhost"
-		port = 9090
-		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
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/pom.xml b/eagle-core/eagle-query/eagle-entity-base/pom.xml
deleted file mode 100755
index 351ad5e..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-query-parent</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-entity-base</artifactId>
-	<packaging>jar</packaging>
-	<name>eagle-entity-base</name>
-
-	<dependencies>
-		<!-- put extcos dependency at the top for using asm 4.0 jar !-->
-		<dependency>
-			<groupId>net.sf.extcos</groupId>
-			<artifactId>extcos</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-common</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>eagle</groupId>
-			<artifactId>eagle-antlr</artifactId>
-            <version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hbase</groupId>
-			<artifactId>hbase-client</artifactId>
-			<exclusions>
-				<exclusion>
-					<groupId>asm</groupId>
-					<artifactId>asm</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-embed-hbase</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-		<dependency>
-			<groupId>org.codehaus.groovy</groupId>
-			<artifactId>groovy-all</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.scireum</groupId>
-			<artifactId>parsii</artifactId>
-		</dependency>
-		<dependency>
-		  <groupId>org.mockito</groupId>
-		  <artifactId>mockito-all</artifactId>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/EntityContext.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/EntityContext.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/EntityContext.java
deleted file mode 100644
index 17b3fdb..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/EntityContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.base.taggedlog;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class EntityContext {
-	private Map<String, Object> context;
-
-	public Map<String, Object> getContext() {
-		return context;
-	}
-	
-	public EntityContext() {
-		this.context = new HashMap<>();
-	}
-	
-	protected EntityContext(EntityContext context) {
-		this.context = new HashMap<>(context.context);
-	}
-	
-	public EntityContext cloneEntity() {
-		return new EntityContext(this);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/NoSuchRowException.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/NoSuchRowException.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/NoSuchRowException.java
deleted file mode 100644
index 3304bea..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/NoSuchRowException.java
+++ /dev/null
@@ -1,29 +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.log.base.taggedlog;
-
-public class NoSuchRowException extends RuntimeException{
-	static final long serialVersionUID = -4538233994503905943L;
-
-	public NoSuchRowException(){
-		super();
-	}
-	
-	public NoSuchRowException(String s){
-		super(s);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/RowkeyAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/RowkeyAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/RowkeyAPIEntity.java
deleted file mode 100644
index d72c35a..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/RowkeyAPIEntity.java
+++ /dev/null
@@ -1,81 +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.log.base.taggedlog;
-
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success", "exception", "prefixHashCode", "timestamp", "humanTime", "tagNameHashValueHashMap", "fieldNameValueMap"})
-public class RowkeyAPIEntity {
-	boolean success;
-	String exception;
-	int prefixHashCode;
-	long timestamp;
-	String humanTime;
-	Map<Integer, Integer> tagNameHashValueHashMap;
-	Map<String, String> fieldNameValueMap;
-	
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public String getHumanTime() {
-		return humanTime;
-	}
-	public void setHumanTime(String humanTime) {
-		this.humanTime = humanTime;
-	}
-	public int getPrefixHashCode() {
-		return prefixHashCode;
-	}
-	public void setPrefixHashCode(int prefixHashcode) {
-		this.prefixHashCode = prefixHashcode;
-	}
-	public long getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-	public Map<Integer, Integer> getTagNameHashValueHashMap() {
-		return tagNameHashValueHashMap;
-	}
-	public void setTagNameHashValueHashMap(
-			Map<Integer, Integer> tagNameHashValueHashMap) {
-		this.tagNameHashValueHashMap = tagNameHashValueHashMap;
-	}
-	public Map<String, String> getFieldNameValueMap() {
-		return fieldNameValueMap;
-	}
-	public void setFieldNameValueMap(Map<String, String> fieldNameValueMap) {
-		this.fieldNameValueMap = fieldNameValueMap;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogAPIEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogAPIEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogAPIEntity.java
deleted file mode 100755
index b001955..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogAPIEntity.java
+++ /dev/null
@@ -1,238 +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.log.base.taggedlog;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializerProvider;
-import org.codehaus.jackson.map.annotate.JsonFilter;
-import org.codehaus.jackson.map.ser.BeanPropertyWriter;
-import org.codehaus.jackson.map.ser.FilterProvider;
-import org.codehaus.jackson.map.ser.impl.SimpleBeanPropertyFilter;
-import org.codehaus.jackson.map.ser.impl.SimpleFilterProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-/**
- * rowkey: prefix + timestamp + tagNameValues
- * as of now, all tags will be persisted as a column in hbase table
- * tag name is column qualifier name
- * tag value is column value
- */
-@JsonFilter(TaggedLogAPIEntity.PropertyBeanFilterName)
-public class TaggedLogAPIEntity implements PropertyChangeListener, Serializable{
-	private static final Logger LOG = LoggerFactory.getLogger(TaggedLogAPIEntity.class);
-	private String prefix;
-	private long timestamp;
-	private Map<String, String> tags;
-
-	public void setExp(Map<String, Object> exp) {
-		this.exp = exp;
-	}
-
-	public Map<String,Object> getExp() {
-		return this.exp;
-	}
-
-	/**
-	 * Extra dynamic attributes. 
-	 * TODO: can we move exp, _serializeAlias, _serializeVerbose to a wrapper class? 
-	 */
-	private Map<String,Object> exp;
-
-	private String encodedRowkey;
-	// track what qualifiers are changed
-	private Set<String> _modifiedProperties = new HashSet<String>();
-	protected PropertyChangeSupport _pcs = new PropertyChangeSupport(this);
-
-
-	public Map<String, String> getSerializeAlias() {
-		return _serializeAlias;
-	}
-
-	public void setSerializeAlias(Map<String, String> _serializeAlias) {
-		this._serializeAlias = _serializeAlias;
-	}
-
-	private Map<String,String> _serializeAlias = null;
-
-	public boolean isSerializeVerbose() {
-		return _serializeVerbose;
-	}
-
-	public void setSerializeVerbose(boolean _serializeVerbose) {
-		this._serializeVerbose = _serializeVerbose;
-	}
-
-	private boolean _serializeVerbose = true;
-
-	public TaggedLogAPIEntity(){
-		_pcs.addPropertyChangeListener(this);
-	}
-	
-	public String getPrefix() {
-		return prefix;
-	}
-	public void setPrefix(String prefix) {
-		this.prefix = prefix;
-	}
-	public long getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-	public Map<String, String> getTags() {
-		return tags;
-	}
-	public void setTags(Map<String, String> tags) {
-		this.tags = tags;
-	}
-	public String getEncodedRowkey() {
-		return encodedRowkey;
-	}
-	public void setEncodedRowkey(String encodedRowkey) {
-		this.encodedRowkey = encodedRowkey;
-	}
-	
-	protected void valueChanged(String fieldModified){
-		_pcs.firePropertyChange(fieldModified, null, null);
-	}
-	
-	public void propertyChange(PropertyChangeEvent evt) {
-		_modifiedProperties.add(evt.getPropertyName());
-	}
-	
-	public Set<String> modifiedQualifiers(){
-		return this._modifiedProperties;
-	}
-	
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		sb.append("prefix:");
-		sb.append(prefix);
-		sb.append(", timestamp:");
-		sb.append(timestamp);
-		sb.append(", humanReadableDate:");
-		sb.append(DateTimeUtil.millisecondsToHumanDateWithMilliseconds(timestamp));
-		sb.append(", tags: ");
-		if(tags != null){
-			for(Map.Entry<String, String> entry : tags.entrySet()){
-				sb.append(entry.toString());
-				sb.append(",");
-			}
-		}
-		sb.append(", encodedRowkey:");
-		sb.append(encodedRowkey);
-		return sb.toString();
-	}
-
-	private static Set<String> getPropertyNames(){
-		if(_propertyNames == null) {
-			Field[] fields = TaggedLogAPIEntity.class.getDeclaredFields();
-			Set<String> fieldName = new HashSet<String>();
-			for (Field f : fields) fieldName.add(f.getName());
-			_propertyNames = fieldName;
-		}
-		return _propertyNames;
-	}
-
-	private static class BeanPropertyFilter extends SimpleBeanPropertyFilter {
-		private final static String prefix = "prefix";
-		private final static String encodedRowkey = "encodedRowkey";
-		private final static String exp = "exp";
-		private final static String timestamp = "timestamp";
-		@SuppressWarnings("serial")
-		private final static Set<String> verboseFields = new HashSet<String>(){{
-			add(prefix);
-			add(encodedRowkey);
-		}};
-
-		@Override
-		public void serializeAsField(Object bean, JsonGenerator jgen, SerializerProvider provider, BeanPropertyWriter writer) throws Exception {
-			if(bean instanceof TaggedLogAPIEntity){
-				TaggedLogAPIEntity entity = (TaggedLogAPIEntity) bean;
-				Set<String> modified = entity.modifiedQualifiers();
-				Set<String> basePropertyNames = getPropertyNames();
-				String writerName = writer.getName();
-				if(modified.contains(writerName) || basePropertyNames.contains(writerName)){
-					if((!entity.isSerializeVerbose() && verboseFields.contains(writerName))||							// skip verbose fields
-							(timestamp.equals(writerName) && !EntityDefinitionManager.isTimeSeries(entity.getClass()))	// skip timestamp for non-timeseries entity
-					){
-						// log skip
-						if(LOG.isDebugEnabled()) LOG.debug("skip field");
-					}else{
-						// if serializeAlias is not null and exp is not null
-						if (exp.equals(writerName) && entity.getSerializeAlias()!=null && entity.getExp()!=null) {
-							Map<String, Object> _exp = new HashMap<String, Object>();
-							for (Map.Entry<String, Object> entry : entity.getExp().entrySet()) {
-								String alias = entity.getSerializeAlias().get(entry.getKey());
-								if (alias != null) {
-									_exp.put(alias, entry.getValue());
-								} else {
-									_exp.put(entry.getKey(), entry.getValue());
-								}
-							}
-							entity.setExp(_exp);
-						}
-						// write included field into serialized json output
-						writer.serializeAsField(bean, jgen, provider);
-					}
-				}
-			}else{
-				writer.serializeAsField(bean, jgen, provider);
-			}
-		}
-	}
-
-	public static FilterProvider getFilterProvider(){
-		if(_filterProvider == null){
-			SimpleFilterProvider _provider = new SimpleFilterProvider();
-			_provider.addFilter(PropertyBeanFilterName,new BeanPropertyFilter());
-			_filterProvider = _provider;
-		}
-		return _filterProvider;
-	}
-
-	//////////////////////////////////////
-	// Static fields
-	//////////////////////////////////////
-	private static Set<String> _propertyNames = null;
-	private static FilterProvider _filterProvider = null;
-	final static String PropertyBeanFilterName = "TaggedLogPropertyBeanFilter";
-
-    public static ObjectMapper buildObjectMapper(){
-        final JsonFactory factory = new JsonFactory();
-        final ObjectMapper mapper = new ObjectMapper(factory);
-        mapper.setFilters(TaggedLogAPIEntity.getFilterProvider());
-        return mapper;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogObjectMapper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogObjectMapper.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogObjectMapper.java
deleted file mode 100644
index 1df1c0d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/base/taggedlog/TaggedLogObjectMapper.java
+++ /dev/null
@@ -1,35 +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.log.base.taggedlog;
-
-import java.util.Map;
-
-public interface TaggedLogObjectMapper {
-	/**
-	 * when read, business logic should convert schema-less key/value into business object based on its own schema
-	 * @param entity
-	 * @param qualifierValues
-	 */
-	public void populateQualifierValues(TaggedLogAPIEntity entity, Map<String, byte[]> qualifierValues);
-	
-	/**
-	 * when write, business logic should convert business object to schema-less key value
-	 * @param entity
-	 * @return
-	 */
-	public Map<String, byte[]> createQualifierValues(TaggedLogAPIEntity entity);	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/AbstractHBaseLogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/AbstractHBaseLogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/AbstractHBaseLogReader.java
deleted file mode 100755
index 916706f..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/AbstractHBaseLogReader.java
+++ /dev/null
@@ -1,240 +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.log.entity;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.hadoop.hbase.client.*;
-import org.apache.hadoop.hbase.filter.Filter;
-import org.apache.hadoop.hbase.filter.FilterList;
-import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-/**
- * HBase Log Reader basic initialization:
- * <ol>
- *   <li>Open HBase connection to target HBase table</li>
- *   <li>Generate HBase filter,start and stop row key, output qualifier and Scan </li>
- *   <li><code>onOpen(HTableInterface,Scan)</code>: Callback abstract method </li>
- *   <li><code>close</code>: Close HBase connection</li>
- * </ol>
- *
- * @param <T> Reader entity class type
- *
- */
-public abstract class AbstractHBaseLogReader<T> implements LogReader<T> {
-	private static Logger LOG = LoggerFactory.getLogger(AbstractHBaseLogReader.class);
-
-	protected byte[][] qualifiers;
-	private HTableInterface tbl;
-	private byte[] startKey;
-	private byte[] stopKey;
-	protected Map<String, List<String>> searchTags;
-	private Filter filter;
-	private Date startTime;
-	private Date endTime;
-
-//	protected ResultScanner rs;
-	private boolean isOpen = false;
-
-	/**
-	 * TODO it's ugly that both _ed and prefix fields can hold prefix information,
-	 * prefix field should be in precedence over _ed
-	 */
-	private String _prefix;
-	protected EntityDefinition _ed;
-
-	public AbstractHBaseLogReader(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime,
-	                              Filter filter, String lastScanKey, byte[][] outputQualifiers){
-		this(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers, null);
-	}
-	/**
-	 * This constructor supports partition.
-	 *
-	 * @param ed entity definition
-	 * @param partitions partition values, which is sorted in partition definition order. TODO: in future we need to support
-	 * multiple values for one partition field
-	 * @param startTime start time of the query
-	 * @param endTime end time of the query
-	 * @param filter filter for the hbase scan
-	 * @param lastScanKey the key of last scan
-	 * @param outputQualifiers the bytes of output qualifier names
-	 * @param prefix can be populated from outside world specifically for generic metric reader
-	 */
-	public AbstractHBaseLogReader(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime,
-	                              Filter filter, String lastScanKey, byte[][] outputQualifiers, String prefix){
-		this.startTime = startTime;
-		this.endTime = endTime;
-		this._ed = ed;
-		if (_ed.getPartitions() != null) {
-			if (partitions == null || _ed.getPartitions().length != partitions.size()) {
-				throw new IllegalArgumentException("Invalid argument. Entity " + ed.getClass().getSimpleName() + " defined "
-						+ "partitions, but argument partitions is null or number of partition values are different!");
-			}
-		}
-		/**
-		 * decide prefix field value
-		 */
-		if(prefix == null || prefix.isEmpty()){
-			this._prefix = _ed.getPrefix();
-		}else{
-			this._prefix = prefix;
-		}
-		this.qualifiers = outputQualifiers;
-		this.filter = filter;
-
-		this.startKey = buildRowKey(this._prefix, partitions, startTime);
-		
-		
-		/**
-		 * startTime should be inclusive, -128 is max value for hbase Bytes comparison, see PureJavaComparer.compareTo
-		 * as an alternative, we can use startTime-1000 and endTime-1000 to make sure startTime is inclusive and endTime is exclusive
-		 */
-		this.startKey = ByteUtil.concat(this.startKey, new byte[] {-1, -1,-1,-1});
-		if (lastScanKey == null) {
-			this.stopKey = buildRowKey(this._prefix, partitions, endTime);
-			// endTime should be exclusive
-			this.stopKey = ByteUtil.concat(this.stopKey, new byte[] {-1,-1,-1,-1,-1});
-		} else {
-			// build stop key
-			this.stopKey = EagleBase64Wrapper.decode(lastScanKey);
-			// TODO to-be-fixed, probably it's an issue because contacting 1 is not
-			// enough for lexicographical sorting
-			this.stopKey = ByteUtil.concat(this.stopKey, new byte[] { 1 });
-		}
-	}
-	
-	/**
-	 * TODO If the required field is null for a row, then this row will not be fetched. That could be a problem for counting
-	 * Need another version of read to strictly get the number of rows which will return all the columns for a column family
-	 */
-	@Override
-	public void open() throws IOException {
-		if (isOpen)
-			return; // silently return
-		try {
-			tbl = EagleConfigFactory.load().getHTable(_ed.getTable());
-		} catch (RuntimeException ex) {
-			throw new IOException(ex);
-		}
-
-		Scan s1 = new Scan();
-		// reverse timestamp, startRow is stopKey, and stopRow is startKey
-		s1.setStartRow(stopKey);
-		s1.setStopRow(startKey);
-		s1.setFilter(filter);
-		// TODO the # of cached rows should be minimum of (pagesize and 100)
-		int cs = EagleConfigFactory.load().getHBaseClientScanCacheSize();
-		s1.setCaching(cs);
-		// TODO not optimized for all applications
-		s1.setCacheBlocks(true)
-		;
-		// scan specified columnfamily and qualifiers
-		if(this.qualifiers == null) {
-			// Filter all
-			s1.addFamily(_ed.getColumnFamily().getBytes());
-		}else{
-			for (byte[] qualifier : qualifiers) {
-				s1.addColumn(_ed.getColumnFamily().getBytes(), qualifier);
-			}
-		}
-		// TODO: Work around https://issues.apache.org/jira/browse/HBASE-2198. More graceful implementation should use SingleColumnValueExcludeFilter, 
-		// but it's complicated in current implementation. 
-		workaroundHBASE2198(s1, filter);
-		if (LOG.isDebugEnabled()) {
-			LOG.debug(s1.toString());
-		}
-//		rs = tbl.getScanner(s1);
-		this.onOpen(tbl,s1);
-		isOpen = true;
-	}
-
-	/**
-	 * HBase table connection callback function
-	 *
-	 * @param tbl   HBase table connection
-	 * @param scan  HBase scan
-	 * @throws IOException
-	 */
-	protected abstract void onOpen(HTableInterface tbl,Scan scan) throws IOException;
-
-	/**
-	 * <h2>History</h2>
-	 * <ul>
-	 * 	<li><b>Nov 19th, 2014</b>: Fix for out put all qualifiers</li>
-	 * </ul>
-	 * @param s1
-	 * @param filter
-	 */
-	protected void workaroundHBASE2198(Scan s1, Filter filter) {
-		if (filter instanceof SingleColumnValueFilter) {
-			if(this.qualifiers == null){
-				s1.addFamily(((SingleColumnValueFilter) filter).getFamily());
-			}else {
-				s1.addColumn(((SingleColumnValueFilter) filter).getFamily(), ((SingleColumnValueFilter) filter).getQualifier());
-			}
-			return;
-		}
-		if (filter instanceof FilterList) {
-			for (Filter f : ((FilterList)filter).getFilters()) {
-				workaroundHBASE2198(s1, f);
-			}
-		}
-	}
-
-	/**
-	 * <h2>Close:</h2>
-	 * 1. release current table connection
-	 *
-	 * @throws IOException
-	 */
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-//		if(rs != null){
-//			rs.close();
-//		}
-	}
-
-	private static byte[] buildRowKey(String prefix, List<String> partitions, Date t){
-		final int length = (partitions == null) ? (4 + 8) : (4 + 8 + partitions.size() * 4);
-		final byte[] key = new byte[length];
-		int offset = 0;
-		ByteUtil.intToBytes(prefix.hashCode(), key, offset);
-		offset += 4;
-		if (partitions != null) {
-			for (String partition : partitions) {
-				ByteUtil.intToBytes(partition.hashCode(), key, offset);
-				offset += 4;
-			}
-		}
-		// reverse timestamp
-		long ts = Long.MAX_VALUE - t.getTime();
-		ByteUtil.longToBytes(ts, key, offset);
-		return key;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/BaseEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/BaseEntityRepository.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/BaseEntityRepository.java
deleted file mode 100755
index 71253da..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/BaseEntityRepository.java
+++ /dev/null
@@ -1,26 +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.log.entity;
-
-import org.apache.eagle.log.entity.repo.EntityRepository;
-
-public class BaseEntityRepository  extends EntityRepository {
-
-	public BaseEntityRepository() {
-		entitySet.add(GenericMetricEntity.class);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityCreationListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityCreationListener.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityCreationListener.java
deleted file mode 100644
index 4ad8959..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityCreationListener.java
+++ /dev/null
@@ -1,26 +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.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-/**
- * Interface to notify creation event of an entity 
- */
-public interface EntityCreationListener {
-	public void entityCreated(TaggedLogAPIEntity entity) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityQualifierUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityQualifierUtils.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityQualifierUtils.java
deleted file mode 100755
index 6e5cb5c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityQualifierUtils.java
+++ /dev/null
@@ -1,281 +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.log.entity;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.hadoop.hbase.KeyValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class EntityQualifierUtils {
-	private final static Logger LOG = LoggerFactory.getLogger(EntityQualifierUtils.class);
-
-	public static Map<String,Object> keyValuesToMap(List<KeyValue> row,EntityDefinition ed){
-		Map<String,Object> result = new HashMap<String,Object>();
-		for(KeyValue kv:row){
-			String qualifierName = new String(kv.getQualifier());
-			if(!ed.isTag(qualifierName)){
-				Qualifier qualifier = ed.getDisplayNameMap().get(qualifierName);
-				if(qualifier == null){
-					qualifier = ed.getQualifierNameMap().get(qualifierName);
-				}
-				qualifierName = qualifier.getDisplayName();
-				Object value = qualifier.getSerDeser().deserialize(kv.getValue());
-				result.put(qualifierName,value);
-			}else{
-				result.put(qualifierName,new String(kv.getValue()));
-			}
-		}
-		return result;
-	}
-
-	public static Map<String,Double> keyValuesToDoubleMap(List<KeyValue> row,EntityDefinition ed){
-		Map<String,Double> result = new HashMap<String,Double>();
-		for(KeyValue kv:row){
-			String qualifierName = new String(kv.getQualifier());
-			if(!ed.isTag(qualifierName)){
-				Qualifier qualifier = ed.getDisplayNameMap().get(qualifierName);
-				if(qualifier == null){
-					qualifier = ed.getQualifierNameMap().get(qualifierName);
-				}
-				qualifierName = qualifier.getDisplayName();
-				Object value = qualifier.getSerDeser().deserialize(kv.getValue());
-				result.put(qualifierName,convertObjToDouble(value));
-			}else{
-				result.put(qualifierName,Double.NaN);
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Map[Display Name,Double Value]
-	 *
-	 * @param map
-	 * @param ed
-	 * @return
-	 */
-	public static Map<String,Double> bytesMapToDoubleMap(Map<String,byte[]> map,EntityDefinition ed){
-		Map<String,Double> result = new HashMap<String,Double>();
-		for(Map.Entry<String,byte[]> entry:map.entrySet()){
-			String qualifierName = entry.getKey();
-			Qualifier qualifier = ed.getDisplayNameMap().get(qualifierName);
-			if(qualifier == null) qualifier = ed.getQualifierNameMap().get(qualifierName);
-			if(qualifier!=null && entry.getValue()!=null) {
-				qualifierName = qualifier.getDisplayName();
-				Object value = qualifier.getSerDeser().deserialize(entry.getValue());
-				result.put(qualifierName, convertObjToDouble(value));
-			}else{
-				result.put(qualifierName,null);
-			}
-		}
-		return result;
-	}
-
-	public static byte[] toBytes(EntityDefinition ed, String qualifierName, String qualifierValueInStr){
-		// Get field type from entity class
-		// and skip for not-found fields query expression
-		Object typedValue = null;
-		EntitySerDeser serDeser = null;
-		if(ed.isTag(qualifierName)){
-			typedValue = qualifierValueInStr;
-			serDeser = EntityDefinitionManager.getSerDeser(String.class);
-		}else{
-			try{
-				Field field = ed.getEntityClass().getDeclaredField(qualifierName);
-				Class<?> fieldType = field.getType();
-				serDeser =  EntityDefinitionManager.getSerDeser(fieldType);
-				if(serDeser == null){
-					throw new IllegalArgumentException("Can't find EntitySerDeser for field: "+ qualifierName +"'s type: "+fieldType
-							+", so the field is not supported to be filtered yet");
-				}
-				typedValue = convertStringToObject(qualifierValueInStr, fieldType);
-			} catch (NoSuchFieldException ex) {
-				// Handle the field not found exception in caller
-				LOG.error("Field " + qualifierName + " not found in " + ed.getEntityClass());
-				throw new IllegalArgumentException("Field "+qualifierName+" not found in "+ed.getEntityClass(),ex);
-			}
-		}
-		return serDeser.serialize(typedValue);
-	}
-
-	public static Class<?> getType(EntityDefinition ed, String qualifierName) {
-		Field field;
-		try {
-			field = ed.getEntityClass().getDeclaredField(qualifierName);
-		} catch (NoSuchFieldException e) {
-			if(LOG.isDebugEnabled()) LOG.debug("Field "+qualifierName+" not found in "+ed.getEntityClass());
-			return null;
-		}
-		return field.getType();
-	}
-
-	/**
-	 * Not support negative numeric value:
-	 * - http://en.wikipedia.org/wiki/Double-precision_floating-point_format
-	 *
-	 * @param value
-	 * @param type
-	 * @return
-	 */
-	public static Object convertStringToObject(String value, Class<?> type){
-		Object obj = null;
-		try{
-			if(String.class.equals(type)){
-				obj =  value;
-			}if(Long.class.equals(type) || long.class.equals(type)){
-				obj = Long.parseLong(value);
-				// if((Long) obj < 0) throw new IllegalArgumentException("Don't support negative Long yet: "+obj);
-			}else if(Integer.class.equals(type) || int.class.equals(type)){
-				obj = Integer.parseInt(value);
-				// if((Integer) obj < 0) throw new IllegalArgumentException("Don't support negative Integer yet: "+obj);
-			}else if(Double.class.equals(type) || double.class.equals(type)){
-				obj = Double.parseDouble(value);
-				// if((Double) obj < 0) throw new IllegalArgumentException("Don't support negative Double yet: "+obj);
-			}else if(Float.class.equals(type) || float.class.equals(type)){
-				obj = Float.parseFloat(value);
-				// if((Double) obj < 0) throw new IllegalArgumentException("Don't support negative Float yet: "+obj);
-			}else if(Boolean.class.equals(type) || boolean.class.equals(type)) {
-				obj = Boolean.valueOf(value);
-			}
-			if(obj != null) return obj;
-		}catch (NumberFormatException ex){
-			throw new IllegalArgumentException("Fail to convert string: "+value +" into type of "+type,ex);
-		}
-
-		throw new IllegalArgumentException("Fail to convert string: "+value +" into type of "+type+", illegal type: "+type);
-	}
-
-	/**
-	 *
-	 * @param obj
-	 * @return double value, otherwise Double.NaN
-	 */
-	public static double convertObjToDouble(Object obj){
-		if(Long.class.equals(obj.getClass()) || long.class.equals(obj.getClass())){
-			Long _value = (Long) obj;
-			return _value.doubleValue();
-		}else if(Integer.class.equals(obj.getClass()) || int.class.equals(obj.getClass())){
-			Integer _value = (Integer) obj;
-			return _value.doubleValue();
-		}else if(Double.class.equals(obj.getClass()) || double.class.equals(obj.getClass())) {
-			return (Double) obj;
-		}else if(Float.class.equals(obj.getClass()) || float.class.equals(obj.getClass())) {
-			Float _value = (Float) obj;
-			return _value.doubleValue();
-		}else if(Short.class.equals(obj.getClass()) || short.class.equals(obj.getClass())) {
-			Float _value = (Float) obj;
-			return _value.doubleValue();
-		}else if(Byte.class.equals(obj.getClass()) || byte.class.equals(obj.getClass())) {
-			Byte _value = (Byte) obj;
-			return _value.doubleValue();
-		}
-		LOG.warn("Failed to convert object " + obj.toString() + " in type of " + obj.getClass() + " to double");
-		return Double.NaN;
-	}
-
-	/**
-	 * Parse List String as Set without duplicate items
-	 *
-	 * <br></br>
-	 * Support:
-	 * <ul>
-	 * <li>normal string: ("a","b") => ["a","b"] </li>
-	 * <li>number: (1.5,"b") => [1.5,"b"] </li>
-	 * <li>inner string comma: ("va,lue","value",",") => ["va,lue","value",","]</li>
-	 * <li>inner escaped chars: ("va\"lue","value") => ["va\"lue","value"]</li>
-	 * <li>some bad formats list: ("va"lue","value") => ["va\"lue","value"]</li>
-	 * </ul>
-	 *
-	 * <b>Warning:</b> it will not throw exception if the format is not strictly valid
-	 *
-	 * @param listValue in format (item1,item2,...)
-	 * @return
-	 */
-	public static List<String> parseList(String listValue){
-		Matcher matcher = SET_PATTERN.matcher(listValue);
-		if(matcher.find()){
-			String content = matcher.group(1);
-			List<String> result = new ArrayList<String>();
-			StringBuilder str = null;
-			STATE state = null;
-			char last = 0;
-			for(char c: content.toCharArray()){
-				if(str == null) str = new StringBuilder();
-				if(c == DOUBLE_QUOTE && last != SLASH){
-					// Open or Close String
-					if(state == STATE.STRING)
-						state = null;
-					else state = STATE.STRING;
-				}else if(c == COMMA && state != STATE.STRING){
-					result.add(unescape(str.toString()));
-					str = null;
-					last = c;
-					continue;
-				}
-				last = c;
-				str.append(c);
-			}
-			if(str!=null) result.add(unescape(str.toString()));
-			return result;
-		}else{
-			LOG.error("Invalid list value: " + listValue);
-			throw new IllegalArgumentException("Invalid format of list value: "+listValue+", must be in format: (item1,item2,...)");
-		}
-	}
-
-	private static String unescape(String str){
-		int start=0,end = str.length();
-		if(str.startsWith("\"")) start = start +1;
-		if(str.endsWith("\"")) end = end -1;
-		str = str.substring(start,end);
-		return StringEscapeUtils.unescapeJava(str);
-	}
-
-	private final static Pattern SET_PATTERN = Pattern.compile("^\\((.*)\\)$");
-	private final static char COMMA = ',';
-	private final static char DOUBLE_QUOTE = '"';
-	private final static char SLASH = '\\';
-	private static enum STATE{ STRING }
-
-
-
-//  TODO: NOT FINISHED
-//  private final static Map<String,String> ESCAPE_REGEXP=new HashMap<String,String>(){{
-//			this.put("\\.","\\\\.");
-//	}};
-//
-//	public static String escapeRegExp(String value) {
-//		String _value = value;
-//		for(Map.Entry<String,String> entry:ESCAPE_REGEXP.entrySet()){
-//			_value = _value.replace(entry.getKey(),entry.getValue());
-//		}
-//		return _value;
-//	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityUniq.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityUniq.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityUniq.java
deleted file mode 100755
index 36e1e0b..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/EntityUniq.java
+++ /dev/null
@@ -1,67 +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.log.entity;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-
-/**
- * @since Sep 12, 2014
- */
-public class EntityUniq {
-	
-	public Map<String, String> tags;
-	public Long timestamp;
-	public long createdTime; // for cache removal;
-	
-	public EntityUniq(Map<String, String> tags, long timestamp) {
-		this.tags = new HashMap<String, String>(tags);
-		this.timestamp = timestamp;
-		this.createdTime = System.currentTimeMillis();
-	}
-	
-	@Override	
-	public boolean equals(Object obj) {		
-		if (obj instanceof EntityUniq) {
-			EntityUniq au = (EntityUniq) obj;
-			if (tags.size() != au.tags.size()) return false;
-			for (Entry<String, String> keyValue : au.tags.entrySet()) {
-				boolean keyExist = tags.containsKey(keyValue.getKey());
-				if ( !keyExist || !tags.get(keyValue.getKey()).equals(keyValue.getValue())) {				
-					return false;
-				}
-			}
-			if (!timestamp.equals(au.timestamp)) return false;
-			return true;
-		}
-		return false;
-	}
-	
-	@Override
-	public int hashCode() {	
-		int hashCode = 0;
-		for (String value : tags.values()) {
-			hashCode ^= value.hashCode();	
-		}
-		return hashCode ^= timestamp.hashCode();
-	}
-}


[35/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IterableStreamSpout.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IterableStreamSpout.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IterableStreamSpout.scala
deleted file mode 100644
index c64ea83..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IterableStreamSpout.scala
+++ /dev/null
@@ -1,71 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.spout.SpoutOutputCollector
-import backtype.storm.task.TopologyContext
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichSpout
-import backtype.storm.tuple.Fields
-import backtype.storm.utils.Utils
-import org.apache.eagle.datastream.core.StreamInfo
-import org.apache.eagle.datastream.utils.NameConstants
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConverters._
-
-/**
- * @since  12/6/15
- */
-case class IterableStreamSpout(iterable: Iterable[Any],recycle:Boolean = true)(implicit info:StreamInfo) extends BaseRichSpout {
-  val LOG = LoggerFactory.getLogger(classOf[IterableStreamSpout])
-  var _collector:SpoutOutputCollector=null
-  var _iterator:Iterator[Any] = null
-
-  override def open(conf: util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector): Unit = {
-    this._collector = collector
-    this._iterator = iterable.iterator
-  }
-
-  override def nextTuple(): Unit = {
-    if(_iterator.hasNext){
-      val current = _iterator.next().asInstanceOf[AnyRef]
-      if(info.outKeyed) {
-        _collector.emit(List(info.keySelector.key(current),current).asJava.asInstanceOf[util.List[AnyRef]])
-      }else{
-        _collector.emit(List(current).asJava)
-      }
-    }else if(recycle){
-      if(LOG.isDebugEnabled) LOG.debug("Recycling the iterator")
-      _iterator = iterable.iterator
-    }else{
-      if(LOG.isDebugEnabled) LOG.debug("No tuple left, sleep forever")
-      this.deactivate()
-      Utils.sleep(Long.MaxValue)
-    }
-  }
-
-  override def declareOutputFields(declarer: OutputFieldsDeclarer): Unit = {
-    if(info.outKeyed) {
-      declarer.declare(new Fields(NameConstants.FIELD_KEY,NameConstants.FIELD_VALUE))
-    }else{
-      declarer.declare(new Fields(s"${NameConstants.FIELD_PREFIX}0"))
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IteratorStreamSpout.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IteratorStreamSpout.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IteratorStreamSpout.scala
deleted file mode 100644
index ea6d658..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/IteratorStreamSpout.scala
+++ /dev/null
@@ -1,65 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.spout.SpoutOutputCollector
-import backtype.storm.task.TopologyContext
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichSpout
-import backtype.storm.tuple.Fields
-import backtype.storm.utils.Utils
-import org.apache.eagle.datastream.core.StreamInfo
-import org.apache.eagle.datastream.utils.NameConstants
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConverters._
-
-case class IteratorStreamSpout(iterator: Iterator[Any])(implicit info:StreamInfo) extends BaseRichSpout {
-  val LOG = LoggerFactory.getLogger(classOf[IterableStreamSpout])
-  var _collector:SpoutOutputCollector=null
-  var _iterator:Iterator[Any] = null
-
-  override def open(conf: util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector): Unit = {
-    this._collector = collector
-    this._iterator = iterator
-  }
-
-  override def nextTuple(): Unit = {
-    if(_iterator.hasNext){
-      val current = _iterator.next().asInstanceOf[AnyRef]
-      if(info.outKeyed) {
-        _collector.emit(List(info.keySelector.key(current),current).asJava.asInstanceOf[util.List[AnyRef]])
-      }else{
-        _collector.emit(List(current).asJava)
-      }
-    }else{
-      LOG.info("No tuple left, sleep forever")
-      this.deactivate()
-      Utils.sleep(Long.MaxValue)
-    }
-  }
-
-  override def declareOutputFields(declarer: OutputFieldsDeclarer): Unit = {
-    if(info.outKeyed) {
-      declarer.declare(new Fields(NameConstants.FIELD_KEY,NameConstants.FIELD_VALUE))
-    }else{
-      declarer.declare(new Fields(s"${NameConstants.FIELD_PREFIX}0"))
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JavaStormBoltWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JavaStormBoltWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JavaStormBoltWrapper.scala
deleted file mode 100644
index 802c782..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JavaStormBoltWrapper.scala
+++ /dev/null
@@ -1,51 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.task.{OutputCollector, TopologyContext}
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichBolt
-import backtype.storm.tuple.{Fields, Tuple}
-import org.apache.eagle.datastream.{Collector, JavaStormStreamExecutor}
-import org.slf4j.LoggerFactory
-
-case class JavaStormBoltWrapper(worker : JavaStormStreamExecutor[AnyRef]) extends BaseRichBolt{
-  val LOG = LoggerFactory.getLogger(StormBoltWrapper.getClass)
-  var _collector : OutputCollector = null
-
-  override def prepare(stormConf: util.Map[_, _], context: TopologyContext, collector: OutputCollector): Unit = {
-    _collector = collector
-    worker.init
-  }
-
-  override def execute(input : Tuple): Unit ={
-    worker.flatMap(input.getValues, new Collector[AnyRef](){
-      def collect(t: AnyRef): Unit ={
-        _collector.emit(input, StormWrapperUtils.productAsJavaList(t.asInstanceOf[Product]))
-      }
-    })
-    _collector.ack(input)
-  }
-
-  override def declareOutputFields(declarer : OutputFieldsDeclarer): Unit ={
-    val fields = worker.fields
-    LOG.info("output fields for worker " + worker + " : " + fields.toList)
-    declarer.declare(new Fields(fields:_*))
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JsonMessageDeserializer.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JsonMessageDeserializer.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JsonMessageDeserializer.scala
deleted file mode 100644
index 19305fa..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/JsonMessageDeserializer.scala
+++ /dev/null
@@ -1,49 +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.datastream.storm
-
-import java.io.IOException
-import java.util
-import java.util.Properties
-
-import com.fasterxml.jackson.databind.ObjectMapper
-import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer
-import org.slf4j.{Logger, LoggerFactory}
-
-/**
- * @since  11/6/15
- */
-case class JsonMessageDeserializer(props:Properties) extends SpoutKafkaMessageDeserializer{
-  private val objectMapper: ObjectMapper = new ObjectMapper
-  private val LOG: Logger = LoggerFactory.getLogger(classOf[JsonMessageDeserializer])
-
-  override def deserialize(bytes: Array[Byte]): AnyRef = {
-    var map: util.Map[String, _] = null
-    if(bytes.length == 0 || bytes == null){
-     if(LOG.isDebugEnabled) LOG.warn("Skip empty message")
-    }else {
-      try {
-        map = objectMapper.readValue(bytes, classOf[util.TreeMap[String, _]])
-      } catch {
-        case e: IOException => {
-          LOG.error("Failed to deserialize json from: " + new String(bytes), e)
-        }
-      }
-    }
-    map
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/KafkaStreamMonitor.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/KafkaStreamMonitor.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/KafkaStreamMonitor.scala
deleted file mode 100644
index 8c92590..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/KafkaStreamMonitor.scala
+++ /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.
- */
-package org.apache.eagle.datastream.storm
-
-import org.apache.eagle.dataproc.impl.storm.kafka.KafkaSourcedSpoutProvider
-import org.apache.eagle.datastream.ExecutionEnvironments
-
-class KafkaStreamMonitorApp extends App {
-  val env = ExecutionEnvironments.get[StormExecutionEnvironment](args)
-  val streamName = env.config.get[String]("eagle.stream.name","eventStream")
-  val streamExecutorId = env.config.get[String]("eagle.stream.executor",s"${streamName}Executor")
-  env.config.set("dataSourceConfig.deserializerClass",classOf[JsonMessageDeserializer].getCanonicalName)
-  env.fromSpout(new KafkaSourcedSpoutProvider()).parallelism(1).nameAs(streamName) ! (Seq(streamName),streamExecutorId)
-  env.execute()
-}
-
-object KafkaStreamMonitor extends KafkaStreamMonitorApp
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/MapBoltWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/MapBoltWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/MapBoltWrapper.scala
deleted file mode 100644
index 1119e08..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/MapBoltWrapper.scala
+++ /dev/null
@@ -1,66 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.tuple.Tuple
-import org.apache.eagle.datastream.core.StreamInfo
-
-/**
- * @param num if num is zero, then means that it's using type-safe way, because to map operation, it must require at least one output field
- * @param fn
- * @param streamInfo
- */
-case class MapBoltWrapper(num: Int, fn: Any => Any)(implicit streamInfo: StreamInfo) extends AbstractStreamBolt[Any](fieldsNum = num){
-  /**
-   * Handle keyed stream value
-   */
-  override def onKeyValue(key: Any, value: Any)(implicit input:Tuple): Unit = {
-    emit(fn(value))
-  }
-
-  /**
-   * Handle general stream values list
-   *
-   * @param values
-   */
-  override def onValues(values: util.List[AnyRef])(implicit input:Tuple): Unit = {
-    val size = values.size()
-    if(size == 0) return
-    if(num == 0) {
-      emit(fn(values.get(0)))
-    } else {
-      var tuple: AnyRef = null
-      size match {
-        case 1 => tuple = scala.Tuple1[AnyRef](values.get(0))
-        case 2 => tuple = scala.Tuple2(values.get(0), values.get(1))
-        case 3 => tuple = scala.Tuple3(values.get(0), values.get(1), values.get(2))
-        case 4 => tuple = scala.Tuple4(values.get(0), values.get(1), values.get(2), values.get(3))
-        case _ => throw new IllegalArgumentException(s"Exceed max supported tuple size $size > 4")
-      }
-      val output = fn(tuple)
-      output match {
-        case scala.Tuple1(a) => emit(util.Arrays.asList(a.asInstanceOf[AnyRef]))
-        case scala.Tuple2(a, b) => emit(util.Arrays.asList(a.asInstanceOf[AnyRef], b.asInstanceOf[AnyRef]))
-        case scala.Tuple3(a, b, c) => emit(util.Arrays.asList(a.asInstanceOf[AnyRef], b.asInstanceOf[AnyRef], c.asInstanceOf[AnyRef]))
-        case scala.Tuple4(a, b, c, d) => emit(util.Arrays.asList(a.asInstanceOf[AnyRef], b.asInstanceOf[AnyRef], c.asInstanceOf[AnyRef], d.asInstanceOf[AnyRef]))
-        case a => emit(util.Arrays.asList(a.asInstanceOf[AnyRef]))
-      }
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/SpoutProxy.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/SpoutProxy.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/SpoutProxy.scala
deleted file mode 100644
index 37622e4..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/SpoutProxy.scala
+++ /dev/null
@@ -1,111 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.spout.{ISpoutOutputCollector, SpoutOutputCollector}
-import backtype.storm.task.TopologyContext
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichSpout
-import backtype.storm.tuple.Fields
-import org.apache.eagle.datastream.core.{KeySelector, StreamInfo}
-import org.apache.eagle.datastream.utils.NameConstants
-import java.util.{List => JList}
-
-/**
- * Declare delegated BaseRichSpout with given field names
- *
- * @param delegate delegated BaseRichSpout
- * @param outputFields given field names
- */
-case class SpoutProxy(delegate: BaseRichSpout, outputFields: java.util.List[String]) extends BaseRichSpout{
-  def open(conf: java.util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector) {
-    this.delegate.open(conf, context, collector)
-  }
-
-  def nextTuple {
-    this.delegate.nextTuple
-  }
-
-  override def ack(msgId: AnyRef) {
-    this.delegate.ack(msgId)
-  }
-
-  override def fail(msgId: AnyRef) {
-    this.delegate.fail(msgId)
-  }
-
-  override def deactivate {
-    this.delegate.deactivate
-  }
-
-  override def declareOutputFields(declarer: OutputFieldsDeclarer) {
-    declarer.declare(new Fields(outputFields))
-  }
-
-  override def close {
-    this.delegate.close
-  }
-}
-
-case class KeyedSpoutOutputCollector(delegate: ISpoutOutputCollector,keyer:KeySelector) extends SpoutOutputCollector(delegate) {
-  override def emitDirect (taskId: Int, streamId: String, tuple: JList[AnyRef], messageId: AnyRef):Unit = {
-    val kv = toKeyValue(tuple)
-    delegate.emitDirect(taskId, streamId,kv, messageId)
-  }
-
-  override def emit(streamId: String, tuple: JList[AnyRef], messageId: AnyRef):JList[Integer] = {
-    val kv = toKeyValue(tuple)
-    delegate.emit(streamId,kv, messageId)
-  }
-
-  def toKeyValue(tuple: JList[AnyRef]) = util.Arrays.asList(keyer.key(tuple.get(0)),tuple.get(0)).asInstanceOf[JList[AnyRef]]
-}
-
-case class KeyedSpoutProxy(delegate: BaseRichSpout)(implicit streamInfo:StreamInfo) extends BaseRichSpout{
-  override def open(conf: java.util.Map[_, _], context: TopologyContext, collector: SpoutOutputCollector) {
-    if(!streamInfo.outKeyed) throw new IllegalArgumentException(s"$streamInfo is not key-based")
-    if(streamInfo.keySelector == null) throw new NullPointerException(s"KeySelector $streamInfo is null")
-
-    this.delegate.open(conf, context, KeyedSpoutOutputCollector(collector,streamInfo.keySelector))
-  }
-
-  override def nextTuple {
-    this.delegate.nextTuple
-  }
-
-  override def ack(msgId: AnyRef) {
-    this.delegate.ack(msgId)
-  }
-
-  override def fail(msgId: AnyRef) {
-    this.delegate.fail(msgId)
-  }
-
-  override def deactivate {
-    this.delegate.deactivate
-  }
-
-  override def declareOutputFields(declarer: OutputFieldsDeclarer) {
-    declarer.declare(new Fields(NameConstants.FIELD_KEY,NameConstants.FIELD_VALUE))
-  }
-
-  override def close {
-    this.delegate.close
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltFactory.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltFactory.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltFactory.scala
deleted file mode 100644
index 21057e7..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltFactory.scala
+++ /dev/null
@@ -1,64 +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.datastream.storm
-
-import backtype.storm.topology.base.BaseRichBolt
-import com.typesafe.config.Config
-import org.apache.eagle.dataproc.impl.persist.PersistExecutor
-import org.apache.eagle.datastream._
-import org.apache.eagle.datastream.core._
-
-object StormBoltFactory {
-  def getBoltWrapper(graph: StreamProducerGraph, producer : StreamProducer[Any], config : Config) : BaseRichBolt = {
-    implicit val streamInfo = producer.getInfo
-    producer match{
-      case FlatMapProducer(worker) => {
-        if(worker.isInstanceOf[JavaStormStreamExecutor[AnyRef]]){
-          worker.asInstanceOf[JavaStormStreamExecutor[AnyRef]].prepareConfig(config)
-          JavaStormBoltWrapper(worker.asInstanceOf[JavaStormStreamExecutor[AnyRef]])
-        }else if(worker.isInstanceOf[StormStreamExecutor[AnyRef]]){
-          worker.asInstanceOf[StormStreamExecutor[AnyRef]].prepareConfig(config)
-          StormBoltWrapper(worker.asInstanceOf[StormStreamExecutor[AnyRef]])
-        }else if(worker.isInstanceOf[FlatMapperWrapper[Any]]){
-          StormFlatFunctionWrapper(worker.asInstanceOf[FlatMapperWrapper[Any]].func)
-        } else {
-          StormFlatMapperWrapper(worker)
-        }
-//        else {
-//          throw new UnsupportedOperationException(s"Unsupported FlatMapperProducer type: $producer")
-//        }
-      }
-      case filter:FilterProducer[Any] => {
-        FilterBoltWrapper(filter.fn)
-      }
-      case mapper:MapperProducer[Any,Any] => {
-        MapBoltWrapper(mapper.numOutputFields, mapper.fn)
-      }
-      case foreach:ForeachProducer[Any] => {
-        ForeachBoltWrapper(foreach.fn)
-      }
-      case persist : PersistProducer[Any] => {
-        val persisExecutor = new PersistExecutor(persist.executorId, persist.storageType.toString)
-        persisExecutor.prepareConfig(config)
-        JavaStormBoltWrapper(persisExecutor.asInstanceOf[JavaStormStreamExecutor[AnyRef]])
-      }
-      case _ => throw new UnsupportedOperationException(s"Unsupported producer: ${producer.toString}")
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltWrapper.scala
deleted file mode 100644
index 75f045e..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormBoltWrapper.scala
+++ /dev/null
@@ -1,61 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.task.{OutputCollector, TopologyContext}
-import backtype.storm.topology.OutputFieldsDeclarer
-import backtype.storm.topology.base.BaseRichBolt
-import backtype.storm.tuple.{Fields, Tuple}
-import org.apache.eagle.datastream.{Collector, StormStreamExecutor}
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConverters._
-
-case class StormBoltWrapper(worker : StormStreamExecutor[AnyRef]) extends BaseRichBolt{
-  val LOG = LoggerFactory.getLogger(StormBoltWrapper.getClass)
-  var _collector : OutputCollector = null
-
-  override def prepare(stormConf: util.Map[_, _], context: TopologyContext, collector: OutputCollector): Unit = {
-    _collector = collector
-    worker.init
-  }
-
-  override def execute(input : Tuple): Unit = {
-    try {
-      worker.flatMap(input.getValues.asScala, new Collector[AnyRef] {
-        override def collect(t: AnyRef): Unit = {
-          _collector.emit(input, StormWrapperUtils.productAsJavaList(t.asInstanceOf[Product]))
-        }
-      })
-    }catch{
-      case ex: Exception => {
-        LOG.error("fail executing", ex)
-        _collector.fail(input)
-        throw new RuntimeException(ex)
-      }
-    }
-    _collector.ack(input)
-  }
-
-  override def declareOutputFields(declarer : OutputFieldsDeclarer): Unit ={
-    val fields = worker.fields
-    LOG.info("Output fields for worker " + worker + " : " + fields.toList)
-    declarer.declare(new Fields(fields:_*))
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutionEnvironment.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutionEnvironment.scala
deleted file mode 100644
index 4165db4..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutionEnvironment.scala
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream.storm
-
-import backtype.storm.topology.base.BaseRichSpout
-import com.typesafe.config.Config
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider
-import org.apache.eagle.datastream.core.{ExecutionEnvironment, StormSourceProducer, StreamDAG}
-
-/**
- * @since  12/7/15
- */
-class StormExecutionEnvironment(private val conf:Config) extends ExecutionEnvironment(conf) {
-  override def execute(dag: StreamDAG) : Unit = {
-    StormTopologyCompiler(config.get, dag).buildTopology.execute
-  }
-
-  def fromSpout[T](source: BaseRichSpout): StormSourceProducer[T] = {
-    val ret = StormSourceProducer[T](source)
-    ret.initWith(dag,config.get)
-    ret
-  }
-
-  def fromSpout[T](sourceProvider: StormSpoutProvider):StormSourceProducer[T] = fromSpout(sourceProvider.getSpout(config.get))
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutorForAlertWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutorForAlertWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutorForAlertWrapper.scala
deleted file mode 100644
index f15e736..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormExecutorForAlertWrapper.scala
+++ /dev/null
@@ -1,44 +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.datastream.storm
-
-import java.util
-
-import org.apache.eagle.datastream.Collector
-import org.apache.eagle.datastream.StormStreamExecutor
-import org.apache.eagle.datastream.StormStreamExecutor3
-
-import com.typesafe.config.Config
-
-case class StormExecutorForAlertWrapper(delegate: StormStreamExecutor[Tuple2[String, util.SortedMap[AnyRef, AnyRef]]], streamName: String)
-  extends StormStreamExecutor3[String, String, util.SortedMap[Object, Object]]{
-  override def prepareConfig(config: Config): Unit = {
-    delegate.prepareConfig(config)
-  }
-
-  override def init: Unit = {
-    delegate.init
-  }
-
-  override def flatMap(input: Seq[AnyRef], collector: Collector[Tuple3[String, String, util.SortedMap[Object, Object]]]): Unit = {
-    delegate.flatMap(input, new Collector[Tuple2[String, util.SortedMap[AnyRef, AnyRef]]] {
-      override def collect(r: Tuple2[String, util.SortedMap[AnyRef, AnyRef]]): Unit = {
-        collector.collect(Tuple3(r._1, streamName, r._2))
-      }
-    })
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatFunctionWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatFunctionWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatFunctionWrapper.scala
deleted file mode 100644
index e5eea1f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatFunctionWrapper.scala
+++ /dev/null
@@ -1,45 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.tuple.Tuple
-import org.apache.eagle.datastream.Collector
-import org.apache.eagle.datastream.core.StreamInfo
-
-case class StormFlatFunctionWrapper(flatMapper:(Any,Collector[Any])=>Unit)(implicit info:StreamInfo) extends AbstractStreamBolt[Any]{
-  /**
-   * Handle keyed stream value
-   */
-  override def onKeyValue(key: Any, value: Any)(implicit input: Tuple): Unit = {
-    flatMapper(value,new Collector[Any] {
-      override def collect(r: Any): Unit = emit(r)(input)
-    })
-  }
-
-  /**
-   * Handle general stream values list
-   *
-   * @param values
-   */
-  override def onValues(values: util.List[AnyRef])(implicit input: Tuple): Unit = {
-    flatMapper(values,new Collector[Any] {
-      override def collect(r: Any): Unit = emit(r)(input)
-    })
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatMapperWrapper.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatMapperWrapper.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatMapperWrapper.scala
deleted file mode 100644
index e5fb86d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormFlatMapperWrapper.scala
+++ /dev/null
@@ -1,44 +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.datastream.storm
-
-import backtype.storm.tuple.Tuple
-import org.apache.eagle.datastream.{Collector, FlatMapper}
-import org.apache.eagle.datastream.core.StreamInfo
-import scala.collection.JavaConverters._
-
-case class StormFlatMapperWrapper(flatMapper:FlatMapper[Any])(implicit info:StreamInfo) extends AbstractStreamBolt[Any]{
-  /**
-   * Handle keyed stream value
-   */
-  override def onKeyValue(key: Any, value: Any)(implicit input: Tuple): Unit = {
-    flatMapper.flatMap(value.asInstanceOf[Seq[AnyRef]],new Collector[Any] {
-      override def collect(r: Any): Unit = emit(r)(input)
-    })
-  }
-
-  /**
-   * Handle general stream values list
-   *
-   * @param values
-   */
-  override def onValues(values: java.util.List[AnyRef])(implicit input: Tuple): Unit = {
-    flatMapper.flatMap(values.asScala,new Collector[Any] {
-      override def collect(r: Any): Unit = emit(r)(input)
-    })
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormSpoutFactory.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormSpoutFactory.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormSpoutFactory.scala
deleted file mode 100644
index 6a3b606..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormSpoutFactory.scala
+++ /dev/null
@@ -1,69 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.topology.base.BaseRichSpout
-import com.typesafe.config.Config
-import org.apache.eagle.datastream.core.{IteratorStreamProducer, IterableStreamProducer, StormSourceProducer, StreamProducer}
-import org.apache.eagle.datastream.utils.NameConstants
-
-object StormSpoutFactory {
-  def createSpout(config: Config, from: StreamProducer[Any]): BaseRichSpout = {
-    implicit val streamInfo = from.getInfo
-    from match {
-      case p@StormSourceProducer(source) =>
-        if(p.outKeyed) {
-          createKeyedProxySpout(p)
-        }else {
-          createProxySpout(p)
-        }
-      case p@IterableStreamProducer(iterable,recycle) =>
-        IterableStreamSpout(iterable,recycle)
-      case p@IteratorStreamProducer(iterator) =>
-        IteratorStreamSpout(iterator)
-      case _ =>
-        throw new IllegalArgumentException(s"Cannot compile unknown $from to a Storm Spout")
-    }
-  }
-
-  /**
-   * @param sourceProducer source producer
-   * @return
-   */
-  def createProxySpout(sourceProducer: StormSourceProducer[Any]): BaseRichSpout = {
-    val numFields = sourceProducer.numFields
-    if (numFields <= 0) {
-      sourceProducer.source
-    } else {
-      var i = 0
-      val ret = new util.ArrayList[String]
-      while (i < numFields) {
-        ret.add(NameConstants.FIELD_PREFIX + i)
-        i += 1
-      }
-      SpoutProxy(sourceProducer.source, ret)
-    }
-  }
-
-  def createKeyedProxySpout(sourceProducer: StormSourceProducer[Any]):BaseRichSpout = {
-    KeyedSpoutProxy(sourceProducer.source)(sourceProducer.getInfo)
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyCompiler.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyCompiler.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyCompiler.scala
deleted file mode 100644
index f572377..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyCompiler.scala
+++ /dev/null
@@ -1,118 +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.datastream.storm
-
-import java.util
-
-import backtype.storm.topology.base.BaseRichBolt
-import backtype.storm.topology.{BoltDeclarer, TopologyBuilder}
-import backtype.storm.tuple.Fields
-import com.typesafe.config.Config
-import org.apache.eagle.dataproc.impl.storm.partition.CustomPartitionGrouping
-import org.apache.eagle.datastream.core._
-import org.apache.eagle.datastream.utils.NameConstants
-import org.slf4j.LoggerFactory
-
-import scala.collection.mutable.ListBuffer
-
-case class StormTopologyCompiler(config: Config, graph: StreamProducerGraph) extends AbstractTopologyCompiler{
-  val LOG = LoggerFactory.getLogger(StormTopologyCompiler.getClass)
-  val boltCache = scala.collection.mutable.Map[StreamProducer[Any], StormBoltWrapper]()
-
-  override def buildTopology: AbstractTopologyExecutor ={
-    val builder = new TopologyBuilder()
-    val iter = graph.iterator()
-    val boltDeclarerCache = scala.collection.mutable.Map[String, BoltDeclarer]()
-    val stormTopologyGraph = ListBuffer[String]()
-    while(iter.hasNext){
-      val from = iter.next()
-      val fromName = from.name
-      if(graph.isSource(from)){
-        val spout = StormSpoutFactory.createSpout(config, from)
-        builder.setSpout(fromName, spout, from.parallelism)
-        LOG.info("Spout: " + fromName + " with parallelism " + from.parallelism)
-      } else {
-        LOG.debug("Bolt" + fromName)
-      }
-      val edges = graph.outgoingEdgesOf(from)
-      edges.foreach(sc => {
-        val toName = sc.to.name
-        var boltDeclarer: BoltDeclarer = null
-        val toBolt = createBoltIfAbsent(toName)
-        boltDeclarerCache.get(toName) match {
-          case None => {
-            var finalParallelism = 1
-            graph.getNodeByName(toName) match {
-              case Some(p) => finalParallelism = p.parallelism
-              case None => finalParallelism = 1
-            }
-            boltDeclarer = builder.setBolt(toName, toBolt, finalParallelism)
-            LOG.info("Bolt: " + toName + " with parallelism " + finalParallelism)
-            boltDeclarerCache.put(toName, boltDeclarer)
-          }
-          case Some(bt) => boltDeclarer = bt
-        }
-
-        sc match {
-          case GroupbyFieldsConnector(_, _, groupByFields) =>
-            boltDeclarer.fieldsGrouping(fromName, new Fields(fields(groupByFields)))
-          case GroupbyStrategyConnector(_, _, strategy) =>
-            boltDeclarer.customGrouping(fromName, new CustomPartitionGrouping(strategy));
-          case GroupbyKeyConnector(_, _, keySelector) =>
-            boltDeclarer.fieldsGrouping(fromName, new Fields(NameConstants.FIELD_KEY));
-          case ShuffleConnector(_, _) => {
-            boltDeclarer.shuffleGrouping(fromName)
-          }
-          case _ => throw new UnsupportedOperationException(s"Supported stream connector $sc")
-        }
-
-        if (graph.isSource(from)) {
-          stormTopologyGraph += s"Spout{$fromName}{${from.parallelism}) ~> Bolt{$toName}{${from.parallelism}} in $sc"
-        } else {
-          stormTopologyGraph += s"Bolt{$fromName}{${from.parallelism}) ~> Bolt{$toName}{${from.parallelism}} in $sc"
-        }
-      })
-    }
-    LOG.info(s"Storm topology DAG\n{\n \t${stormTopologyGraph.mkString("\n\t")} \n}")
-    new StormTopologyExecutorImpl(builder.createTopology, config)
-  }
-
-  def fields(fields : Seq[Int]): java.util.List[String] ={
-    val ret = new util.ArrayList[String]
-    fields.map(n => ret.add(NameConstants.FIELD_PREFIX + n))
-    ret
-  }
-
-  def createBoltIfAbsent(name : String) : BaseRichBolt = {
-    val producer = graph.getNodeByName(name)
-    producer match{
-      case Some(p) => createBoltIfAbsent(graph, p)
-      case None => throw new IllegalArgumentException("please check bolt name " + name)
-    }
-  }
-
-  def createBoltIfAbsent(graph: StreamProducerGraph, producer : StreamProducer[Any]): BaseRichBolt ={
-    boltCache.get(producer) match{
-      case Some(bolt) => bolt
-      case None => {
-        StormBoltFactory.getBoltWrapper(graph, producer, config)
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
deleted file mode 100644
index 5d64c4c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormTopologyExecutorImpl.scala
+++ /dev/null
@@ -1,103 +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.datastream.storm
-
-import java.io.{File, FileInputStream}
-
-import _root_.storm.trident.spout.RichSpoutBatchExecutor
-import backtype.storm.generated.StormTopology
-import backtype.storm.utils.Utils
-import backtype.storm.{Config, LocalCluster, StormSubmitter}
-import org.apache.eagle.datastream.core.AbstractTopologyExecutor
-import org.apache.thrift7.transport.TTransportException
-import org.slf4j.LoggerFactory
-import org.yaml.snakeyaml.Yaml
-
-case class StormTopologyExecutorImpl(topology: StormTopology, config: com.typesafe.config.Config) extends AbstractTopologyExecutor {
-  val LOG = LoggerFactory.getLogger(classOf[StormTopologyExecutorImpl])
-  @throws(classOf[Exception])
-  def execute {
-    val localMode: Boolean = config.getString("envContextConfig.mode").equalsIgnoreCase("local")
-    val conf: Config = new Config
-    conf.put(RichSpoutBatchExecutor.MAX_BATCH_SIZE_CONF, Int.box(64 * 1024))
-    conf.put(Config.TOPOLOGY_RECEIVER_BUFFER_SIZE, Int.box(8))
-    conf.put(Config.TOPOLOGY_TRANSFER_BUFFER_SIZE, Int.box(32))
-    conf.put(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE, Int.box(16384))
-    conf.put(Config.TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE, Int.box(16384))
-    conf.put(Config.NIMBUS_THRIFT_MAX_BUFFER_SIZE, Int.box(20480000))
-
-    if(config.hasPath("envContextConfig.stormConfigFile")) {
-      val file = new File(config.getString("envContextConfig.stormConfigFile"))
-      if(file.exists()) {
-        val inputFileStream = new FileInputStream(file)
-        val yaml = new Yaml()
-        try {
-          val stormConf = yaml.load(inputFileStream).asInstanceOf[java.util.LinkedHashMap[String, Object]]
-          if(stormConf != null) conf.putAll(stormConf)
-        } catch {
-          case t: Throwable => {
-            LOG.error(s"Got example $t",t)
-            throw t
-          }
-        } finally {
-          if(inputFileStream != null) inputFileStream.close()
-        }
-      }
-    }
-
-    val topologyName = config.getString("envContextConfig.topologyName")
-    if (!localMode) {
-      if(config.hasPath("envContextConfig.nimbusHost")) {
-        LOG.info(s"Setting ${backtype.storm.Config.NIMBUS_HOST} as ${config.getString("envContextConfig.nimbusHost")}")
-        conf.put(backtype.storm.Config.NIMBUS_HOST, config.getString("envContextConfig.nimbusHost"))
-      }
-
-      if(config.hasPath("envContextConfig.nimbusThriftPort")) {
-        LOG.info(s"Setting ${backtype.storm.Config.NIMBUS_THRIFT_PORT} as ${config.getString("envContextConfig.nimbusThriftPort")}")
-        conf.put(backtype.storm.Config.NIMBUS_THRIFT_PORT, config.getNumber("envContextConfig.nimbusThriftPort"))
-      }
-
-      if(config.hasPath("envContextConfig.jarFile")){
-        LOG.info(s"Setting storm.jar as ${config.getString("envContextConfig.jarFile")}")
-        System.setProperty("storm.jar",config.getString("envContextConfig.jarFile"))
-      }
-
-      LOG.info("Submitting as cluster mode")
-      try {
-        StormSubmitter.submitTopologyWithProgressBar(topologyName, conf, topology)
-      } catch {
-        case e:TTransportException =>
-          LOG.error(s"Got thrift exception, type: ${e.getType}")
-          throw e
-      }
-      finally {
-        System.clearProperty("storm.jar")
-      }
-    } else {
-      LOG.info("Submitting as local mode")
-      val cluster: LocalCluster = new LocalCluster
-      cluster.submitTopology(topologyName, conf, topology)
-      while(true) {
-        try {
-          Utils.sleep(Integer.MAX_VALUE)
-        } catch {
-          case _: Throwable => () // Do nothing
-        }
-      }
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormWrapperUtils.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormWrapperUtils.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormWrapperUtils.scala
deleted file mode 100644
index 95c6ac1..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/storm/StormWrapperUtils.scala
+++ /dev/null
@@ -1,28 +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.datastream.storm
-
-import java.util
-
-object StormWrapperUtils {
-  def productAsJavaList(product:Product):util.List[AnyRef]={
-    val list = new util.LinkedList[AnyRef]()
-    product.productIterator.foreach((p:Any) => list.add(p.asInstanceOf[AnyRef]))
-    list
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/AlertExecutorConsumerUtils.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/AlertExecutorConsumerUtils.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/AlertExecutorConsumerUtils.scala
deleted file mode 100644
index 76250e2..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/AlertExecutorConsumerUtils.scala
+++ /dev/null
@@ -1,76 +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.datastream.utils
-
-import java.util
-
-import org.apache.eagle.alert.dedup.{AlertEmailDeduplicationExecutor, AlertEntityDeduplicationExecutor}
-import org.apache.eagle.alert.executor.AlertExecutor
-import org.apache.eagle.alert.notification.AlertNotificationExecutor
-import org.apache.eagle.alert.persist.AlertPersistExecutor
-import org.apache.eagle.datastream.core.{StreamConnector, FlatMapProducer, StreamProducer}
-import org.slf4j.{Logger, LoggerFactory}
-
-import scala.collection.mutable.ListBuffer
-
-/**
- * Create alert executors and provide callback for programmer to link alert executor to immediate parent executors
- *
- * <br/><br/>
- * Explanations for programId, alertExecutorId and policy<br/><br/>
- * - programId - distributed or single-process program for example one storm topology<br/>
- * - alertExecutorId - one process/thread which executes multiple policies<br/>
- * - policy - some rules to be evaluated<br/>
- *
- * <br/>
- *
- * Normally the mapping is like following:
- * <pre>
- * programId (1:N) alertExecutorId
- * alertExecutorId (1:N) policy
- * </pre>
- */
-
-object AlertExecutorConsumerUtils {
-  private val LOG: Logger = LoggerFactory.getLogger(AlertExecutorConsumerUtils.getClass)
-
-  def setupAlertConsumers(toBeAddedEdges: ListBuffer[StreamConnector[Any,Any]], alertStreamProducers: List[StreamProducer[Any]]): Unit = {
-    val alertExecutorIdList: java.util.List[String] = new util.ArrayList[String]()
-    alertStreamProducers.map(x =>
-      alertExecutorIdList.add(x.asInstanceOf[FlatMapProducer[AnyRef, AnyRef]].mapper.asInstanceOf[AlertExecutor].getExecutorId));
-    val alertDefDao = alertStreamProducers.head.asInstanceOf[FlatMapProducer[AnyRef, AnyRef]].mapper.asInstanceOf[AlertExecutor].getPolicyDefinitionDao
-    val entityDedupExecutor: AlertEntityDeduplicationExecutor = new AlertEntityDeduplicationExecutor(alertExecutorIdList, alertDefDao)
-    val emailDedupExecutor: AlertEmailDeduplicationExecutor = new AlertEmailDeduplicationExecutor(alertExecutorIdList, alertDefDao)
-    val notificationExecutor: AlertNotificationExecutor = new AlertNotificationExecutor(alertExecutorIdList, alertDefDao)
-    val persistExecutor: AlertPersistExecutor = new AlertPersistExecutor
-
-    val entityDedupStreamProducer = FlatMapProducer(entityDedupExecutor)
-    val persistStreamProducer = FlatMapProducer(persistExecutor)
-    val emailDedupStreamProducer = FlatMapProducer(emailDedupExecutor)
-    val notificationStreamProducer = FlatMapProducer(notificationExecutor)
-    toBeAddedEdges += StreamConnector(entityDedupStreamProducer, persistStreamProducer)
-    toBeAddedEdges += StreamConnector(emailDedupStreamProducer, notificationStreamProducer)
-
-    alertStreamProducers.foreach(sp => {
-      toBeAddedEdges += StreamConnector(sp, entityDedupStreamProducer)
-      toBeAddedEdges += StreamConnector(sp, emailDedupStreamProducer)
-    })
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/GraphPrinter.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/GraphPrinter.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/GraphPrinter.scala
deleted file mode 100644
index 33a805c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/GraphPrinter.scala
+++ /dev/null
@@ -1,59 +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.datastream.utils
-
-import org.apache.eagle.datastream.core.{StreamConnector, StreamProducer}
-import org.jgrapht.experimental.dag.DirectedAcyclicGraph
-import org.slf4j.LoggerFactory
-
-import scala.collection.JavaConversions._
-import scala.collection.mutable.ListBuffer
-
-/**
- * @see scala.tools.nsc.DotDiagramGenerator
- */
-object GraphPrinter {
-  private val LOG = LoggerFactory.getLogger(GraphPrinter.getClass)
-  def print(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any, Any]], message:String = "Print stream DAG graph"): Unit = {
-    val graphStr = ListBuffer[String]()
-    val iter = dag.iterator()
-    while (iter.hasNext) {
-      val current = iter.next()
-      dag.outgoingEdgesOf(current).foreach(edge => {
-        graphStr += s"${edge.from.name}{${edge.from.parallelism}} ~> ${edge.to.name}{${edge.to.parallelism}} in ${edge.toString}"
-      })
-    }
-    LOG.info(message+"\n{ \n\t" + graphStr.mkString("\n\t") + "\n}")
-  }
-  
-  def printDotDigraph(dag: DirectedAcyclicGraph[StreamProducer[Any], StreamConnector[Any, Any]], title:String = "dag", message:String = "Print DOT digraph (copy and visualize with http://www.webgraphviz.com/)"): String = {
-    val graphStr = ListBuffer[String]()
-    val iter = dag.iterator()
-    while (iter.hasNext) {
-      val current = iter.next()
-      dag.outgoingEdgesOf(current).foreach(edge => {
-        graphStr += s""""${edge.from.name} x ${edge.from.parallelismNum}" -> "${edge.to.name} x ${edge.from.parallelismNum}" [label = "$edge"];"""
-      })
-    }
-    val dotDigraph = s"""digraph $title { \n\t${graphStr.mkString("\n\t")} \n}"""
-    LOG.info(s"""$message\n\n$dotDigraph\n""")
-    dotDigraph
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NameConstants.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NameConstants.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NameConstants.scala
deleted file mode 100644
index d4836e4..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NameConstants.scala
+++ /dev/null
@@ -1,24 +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.datastream.utils
-
-object NameConstants {
-  val FIELD_PREFIX = "f"
-  val FIELD_KEY = "key"
-  val FIELD_VALUE = "value"
-  val FIELD_SEPARATOR = "_"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NodeNameSelector.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NodeNameSelector.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NodeNameSelector.scala
deleted file mode 100644
index 331cf7c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/NodeNameSelector.scala
+++ /dev/null
@@ -1,28 +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.datastream.utils
-
-import org.apache.eagle.datastream.core.StreamInfo
-
-case class NodeNameSelector(producer : StreamInfo) {
-  def getName : String = {
-    producer.name match {
-      case null => producer.toString+NameConstants.FIELD_SEPARATOR+producer.id
-      case _ => producer.name
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/ReflectionS.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/ReflectionS.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/ReflectionS.scala
deleted file mode 100644
index 1d48752..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/ReflectionS.scala
+++ /dev/null
@@ -1,55 +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.datastream.utils
-
-import scala.reflect.api
-import scala.reflect.runtime.{universe => ru}
-
-/**
- * @since  12/7/15
- */
-object Reflections{
-  private val UNIT_CLASS = classOf[Unit]
-  private val UNIT_TYPE_TAG = ru.typeTag[Unit]
-
-  /**
-   * Class to TypeTag
-   * @param clazz class
-   * @tparam T Type T
-   * @return
-   */
-  def typeTag[T](clazz:Class[T]):ru.TypeTag[T]={
-    if(clazz == null){
-      null
-    }else if(clazz == UNIT_CLASS) {
-      UNIT_TYPE_TAG.asInstanceOf[ru.TypeTag[T]]
-    } else {
-      val mirror = ru.runtimeMirror(clazz.getClassLoader)
-      val sym = mirror.staticClass(clazz.getCanonicalName)
-      val tpe = sym.selfType
-      ru.TypeTag(mirror, new api.TypeCreator {
-        def apply[U <: api.Universe with Singleton](m: api.Mirror[U]) =
-          if (m eq mirror) tpe.asInstanceOf[U#Type]
-          else throw new IllegalArgumentException(s"Type tag defined in $mirror cannot be migrated to other mirrors.")
-      })
-    }
-  }
-
-  def javaTypeClass[T](obj: AnyRef, index: Int = 0):Class[T] = JavaReflections.getGenericTypeClass(obj,index).asInstanceOf[Class[T]]
-  def javaTypeTag[T](obj: AnyRef, index: Int = 0):ru.TypeTag[T] = typeTag(JavaReflections.getGenericTypeClass(obj,index)).asInstanceOf[ru.TypeTag[T]]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/UnionUtils.scala
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/UnionUtils.scala b/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/UnionUtils.scala
deleted file mode 100644
index 4ac0cdc..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/utils/UnionUtils.scala
+++ /dev/null
@@ -1,43 +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.datastream.utils
-
-import java.util
-
-import org.apache.eagle.datastream.core.StreamProducer
-
-import scala.collection.JavaConverters._
-
-object UnionUtils {
-  def join[T1,T2](producers : StreamProducer[T1]*) : StreamProducer[T2] = {
-    producers.head.streamUnion(producers.drop(1))
-  }
-
-  def join[T1,T2](producers : java.util.List[StreamProducer[T1]]) : StreamProducer[T2] = {
-    val newList = new util.ArrayList(producers)
-    val head = newList.get(0)
-    newList.remove(0)
-    head.streamUnion(newList.asScala);
-  }
-
-  def join[T1,T2](producers : List[StreamProducer[T1]]) : StreamProducer[T2] = {
-    val head = producers.head
-    head.streamUnion(producers.tail);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/dataproc/util/TestConfigOptionParser.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/dataproc/util/TestConfigOptionParser.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/dataproc/util/TestConfigOptionParser.java
deleted file mode 100644
index efcb0e7..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/dataproc/util/TestConfigOptionParser.java
+++ /dev/null
@@ -1,105 +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.dataproc.util;
-
-import junit.framework.Assert;
-import org.apache.commons.cli.ParseException;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-
-/**
- * @since 8/23/15
- */
-public class TestConfigOptionParser {
-    private final static Logger LOG = LoggerFactory.getLogger(TestConfigOptionParser.class);
-
-    @Test
-    public void testValidCommandArguments() throws ParseException {
-        String[] arguments = new String[]{
-                "-D","key1=value1",
-                "-D","key2=value2",
-                "-D","key3=value3=something",
-                "-D","key4=",
-                "-D","key5=\"--param having whitespace\""
-        };
-
-        Map<String,String> config = new ConfigOptionParser().parseConfig(arguments);
-
-        Assert.assertTrue(config.containsKey("key1"));
-        Assert.assertTrue(config.containsKey("key2"));
-        Assert.assertTrue(config.containsKey("key3"));
-        Assert.assertTrue(config.containsKey("key4"));
-        Assert.assertEquals("value1", config.get("key1"));
-        Assert.assertEquals("value2", config.get("key2"));
-        Assert.assertEquals("value3=something",config.get("key3"));
-        Assert.assertEquals("",config.get("key4"));
-        Assert.assertEquals("\"--param having whitespace",config.get("key5"));
-    }
-
-    @Test
-    public void testValidCommandArgumentsAsSystem() throws ParseException {
-        String[] arguments = new String[]{
-                "-D","key1=value1",
-                "-D","key2=value2",
-                "-D","key3=value3=something",
-                "-D","key4=",
-        };
-
-        new ConfigOptionParser().load(arguments);
-
-        Assert.assertTrue(System.getProperties().containsKey("key1"));
-        Assert.assertTrue(System.getProperties().containsKey("key2"));
-        Assert.assertTrue(System.getProperties().containsKey("key3"));
-        Assert.assertTrue(System.getProperties().containsKey("key4"));
-
-        Assert.assertEquals("value1", System.getProperty("key1"));
-        Assert.assertEquals("value2", System.getProperty("key2"));
-        Assert.assertEquals("value3=something",System.getProperty("key3"));
-        Assert.assertEquals("",System.getProperty("key4"));
-    }
-
-    @Test
-    public void testInvalidCommandArgument1()  {
-        String[] arguments = new String[]{
-                "-D","key1"
-        };
-
-        try {
-            new ConfigOptionParser().parseConfig(arguments);
-            Assert.fail("Should throw ParseException");
-        } catch (ParseException e) {
-            LOG.info("Expected exception: " +e.getMessage());
-        }
-    }
-
-    @Test
-    public void testInvalidCommandArgument2()  {
-        String[] arguments = new String[]{
-                "-D","=value"
-        };
-
-        try {
-            new ConfigOptionParser().parseConfig(arguments);
-            Assert.fail("Should throw ParseException");
-        } catch (ParseException e) {
-            LOG.info("Expected exception: " + e.getMessage());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/JavaEchoExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/JavaEchoExecutor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/JavaEchoExecutor.java
deleted file mode 100644
index 511db38..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/JavaEchoExecutor.java
+++ /dev/null
@@ -1,45 +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.datastream;
-
-import com.typesafe.config.Config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import scala.Tuple1;
-
-public class JavaEchoExecutor extends JavaStormStreamExecutor1<String>{
-    private static Logger LOG = LoggerFactory.getLogger(JavaEchoExecutor.class);
-    private Config config;
-    @Override
-    public void prepareConfig(Config config){
-        this.config = config;
-    }
-
-    /**
-     * give business code a chance to do initialization for example daemon thread
-     * this method is executed in remote machine
-     */
-    @Override
-    public void init(){
-    }
-
-    @Override
-    public void flatMap(java.util.List<Object> input, Collector<Tuple1<String>> collector){
-        collector.collect(new Tuple1(input.get(0)));
-        LOG.info("echo " + input);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestExecutionEnvironmentJava.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestExecutionEnvironmentJava.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestExecutionEnvironmentJava.java
deleted file mode 100644
index c5f9045..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestExecutionEnvironmentJava.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import junit.framework.Assert;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.junit.Test;
-
-/**
- * @since 12/5/15
- */
-public class TestExecutionEnvironmentJava {
-
-    @Test
-    public void testGetEnvInJava() {
-        StormExecutionEnvironment env0 = ExecutionEnvironments.get(StormExecutionEnvironment.class);
-        Assert.assertNotNull(env0);
-
-        StormExecutionEnvironment env1 = ExecutionEnvironments.get(new String[]{}, StormExecutionEnvironment.class);
-        Assert.assertNotNull(env1);
-        Config config = ConfigFactory.load();
-        StormExecutionEnvironment env2 = ExecutionEnvironments.get(config, StormExecutionEnvironment.class);
-        Assert.assertNotNull(env2);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaMain.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaMain.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaMain.java
deleted file mode 100644
index 979b09d..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaMain.java
+++ /dev/null
@@ -1,57 +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.datastream;
-
-import com.typesafe.config.Config;
-import com.typesafe.config.ConfigFactory;
-import org.junit.Test;
-import scala.runtime.AbstractFunction1;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-public class TestJavaMain {
-    public static class SerializableFunction1<T1,R> extends AbstractFunction1<T1, R> implements Serializable {
-        @Override
-        public Object apply(Object v1) {
-            return null;
-        }
-    }
-
-    //@Test
-//    public void testGeneral(){
-//        Config config = ConfigFactory.load();
-//        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
-//        env.fromSpout(new TestKeyValueSpout()).withOutputFields(2).groupBy(Arrays.asList(0)).flatMap(new GroupedEchoExecutor()).parallelism(2);
-//        env.execute();
-//    }
-
-//    //@Test
-//    public void testMap(){
-//        Config config = ConfigFactory.load();
-//        StormExecutionEnvironment env = ExecutionEnvironments.getStorm(config);
-//        SerializableFunction1 f1 = new SerializableFunction1<Object, Object>();
-//        env.fromSpout(new TestKeyValueSpout()).withOutputFields(2).
-//                map1(f1);
-//        env.execute();
-//    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaReflectionUtils.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaReflectionUtils.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaReflectionUtils.java
deleted file mode 100644
index 6d2d36f..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestJavaReflectionUtils.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.datastream;
-
-import junit.framework.Assert;
-import org.apache.eagle.datastream.utils.Reflections;
-import org.junit.Test;
-import scala.reflect.api.TypeTags;
-
-/**
- * @since 12/8/15
- */
-public class TestJavaReflectionUtils {
-    @Test
-    public void testJavaFlatMapper(){
-        Class<String> clazz = Reflections.javaTypeClass(new JavaEchoExecutor(), 0);
-        Assert.assertEquals(String.class,clazz);
-        TypeTags.TypeTag typeTag = Reflections.typeTag(clazz);
-        Assert.assertNotNull(typeTag);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestKafkaStreamMonitor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestKafkaStreamMonitor.java b/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestKafkaStreamMonitor.java
deleted file mode 100644
index 2a5043c..0000000
--- a/eagle-core/eagle-data-process/eagle-stream-process-api/src/test/java/org/apache/eagle/datastream/TestKafkaStreamMonitor.java
+++ /dev/null
@@ -1,28 +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.datastream;
-
-import org.apache.eagle.datastream.storm.KafkaStreamMonitorApp;
-
-/**
- * @since 11/7/15
- */
-public class TestKafkaStreamMonitor {
-    public static void main(String[] args){
-        new KafkaStreamMonitorApp().main(args);
-    }
-}
\ No newline at end of file



[49/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch

Posted by ha...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/hadoop-metric-monitor.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/hadoop-metric-monitor.sh b/eagle-assembly/src/main/bin/hadoop-metric-monitor.sh
deleted file mode 100644
index 327bec1..0000000
--- a/eagle-assembly/src/main/bin/hadoop-metric-monitor.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-##!/bin/bash
-#
-## 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.
-#
-source $(dirname $0)/eagle-env.sh
-
-######################################################################
-##            Import stream metadata for HADOOP METRIC
-######################################################################
-${EAGLE_HOME}/bin/hadoop-metric-init.sh
-
-######################################################################
-##            Run topology for HADOOP METRIC
-######################################################################
-### if topology exists, we should shutdown it
-echo "check topology status ..."
-active=$(${EAGLE_HOME}/bin/eagle-topology.sh --topology sandbox-hadoopjmx-topology status | grep ACTIVE)
-echo "topology status $active"
-if [ "$active" ]; then
- echo "stop topology ..."
- ${EAGLE_HOME}/bin/eagle-topology.sh --topology sandbox-hadoopjmx-topology stop
-fi
-echo "start Eagle Hadoop Metric Monitoring topology"
-${EAGLE_HOME}/bin/eagle-topology.sh --main org.apache.eagle.hadoop.metric.HadoopJmxMetricMonitor --topology sandbox-hadoopjmx-topology --config ${EAGLE_HOME}/conf/sandbox-hadoopjmx-topology.conf start
-
-######################################################################
-##            Setup minutely crontab job for HADOOP METRIC
-######################################################################
-echo "set up crontab script"
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-cp $DIR/../tools/hadoop_jmx_collector/config-sample.json $DIR/../tools/hadoop_jmx_collector/config.json
-command="python $DIR/../tools/hadoop_jmx_collector/hadoop_jmx_kafka.py"
-job="* * * * * $command >> $DIR/../logs/hadoop_metric.log"
-echo "$job"
-cat <(fgrep -i -v "$command" <(crontab -l)) <(echo "$job") | crontab -
-
-echo "$(crontab -l)"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/hdfs-securitylog-metadata-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/hdfs-securitylog-metadata-create.sh b/eagle-assembly/src/main/bin/hdfs-securitylog-metadata-create.sh
deleted file mode 100755
index 0d50376..0000000
--- a/eagle-assembly/src/main/bin/hdfs-securitylog-metadata-create.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-echo "Importing metadata for HDFS security log... "
-
-#### AlertStreamService: alert streams generated from data source
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"application":"hdfsSecurityLog","streamName":"hdfsSecurityLogEventStream"},"desc":"alert event stream from HDFS security audit log"}]'
-
-
-#### AlertExecutorService: what alert streams are consumed by alert executor
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"application":"hdfsSecurityLog","alertExecutorId":"hdfsSecurityLogAlertExecutor","streamName":"hdfsSecurityLogEventStream"},"desc":"alert executor for HDFS security log event stream"}]'
-
-
-#### AlertStreamSchemaService: schema for event from alert stream
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"application":"hdfsSecurityLog","streamName":"hdfsSecurityLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsSecurityLog","streamName":"hdfsSecurityLogEventStream","attrName":"user"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"application":"hdfsSecurityLog","streamName":"hdfsSecurityLogEventStream","attrName":"allowed"},"attrDescription":"true, false or none","attrType":"bool","category":"","attrValueResolver":""}]'
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site":"sandbox","application":"hdfsSecurityLog"},"enabled":"true","desc":"HDFS Security"}]'
-
-
-echo ""
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/kafka-stream-monitor.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/kafka-stream-monitor.sh b/eagle-assembly/src/main/bin/kafka-stream-monitor.sh
deleted file mode 100644
index bf9181b..0000000
--- a/eagle-assembly/src/main/bin/kafka-stream-monitor.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-if [ -e ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar ];then
-	export jar_name=$(ls ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar)
-else
-	echo "ERROR: ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar not found"
-	exit 1
-fi
-
-export main_class=org.apache.eagle.datastream.storm.KafkaStreamMonitor
-
-export alert_stream=$1
-export alert_executor=$2
-export config_file=$3
-
-if [ "$#" -lt "2" ];then
-	echo "ERROR: parameter required"
-	echo "Usage: kafka-stream-monitor.sh [alert_stream alert_executor config_file] or [alert_stream config_file]"
-	echo ""
-	exit 1
-fi
-if [ "$#" == "2" ];then
-	config_file=$2
-	alert_executor="${alert_stream}Executor"
-fi
-
-which storm >/dev/null 2>&1
-if [ $? != 0 ];then
-    echo "ERROR: storm not found"
-    exit 1
-else
-	export EAGLE_CLASSPATH=$EAGLE_CLASSPATH:$jar_name:`storm classpath`
-fi
-
-cmd="java -cp $EAGLE_CLASSPATH $main_class -D eagle.stream.name=$alert_stream -D eagle.stream.executor=$alert_executor -D config.file=$config_file -D envContextConfig.jarFile=$jar_name"
-
-echo "=========="
-echo "Alert Stream: $alert_stream"
-echo "Alert Executor: $alert_executor"
-echo "Alert Config: $config_file"
-echo "=========="
-echo "Run Cmd: $cmd"
-echo $cmd
-$cmd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/bin/pipeline-runner.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/pipeline-runner.sh b/eagle-assembly/src/main/bin/pipeline-runner.sh
deleted file mode 100755
index 65bf3f3..0000000
--- a/eagle-assembly/src/main/bin/pipeline-runner.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-if [ -e ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar ];then
-	export jar_name=$(ls ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar)
-else
-	echo "ERROR: ${EAGLE_HOME}/lib/topology/eagle-topology-*-assembly.jar not found"
-	exit 1
-fi
-if [ -e ${EAGLE_HOME}/conf/pipeline.conf ];then
-	export common_conf=$(ls ${EAGLE_HOME}/conf/pipeline.conf)
-else
-	echo "WARN: ${EAGLE_HOME}/conf/pipeline.conf not found"
-fi
-
-main_class=org.apache.eagle.stream.pipeline.Pipeline
-
-if [ "$#" == "0" ];then
-	echo "ERROR: parameter required"
-	echo "Usage: $0 [pipeline-config]"
-
-	echo ""
-	exit 1
-fi
-
-which storm >/dev/null 2>&1
-if [ $? != 0 ];then
-    echo "ERROR: storm not found"
-    exit 1
-else
-	export EAGLE_CLASSPATH=$EAGLE_CLASSPATH:$jar_name:`storm classpath`
-fi
-
-cmd="java -cp $EAGLE_CLASSPATH $main_class --conf $common_conf --pipeline $1 -D envContextConfig.jarFile=$jar_name"
-echo $cmd
-$cmd
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/eagle-service.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/eagle-service.conf b/eagle-assembly/src/main/conf/eagle-service.conf
deleted file mode 100644
index 229458c..0000000
--- a/eagle-assembly/src/main/conf/eagle-service.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# eagle configuration
-eagle{
-	# eagle web service configuration
-	service{
-		# storage type: ["hbase","jdbc"]
-		# default is "hbase"
-		storage-type="hbase"
-
-		# hbase configuration: hbase.zookeeper.quorum
-		# default is "localhost"
-		hbase-zookeeper-quorum="localhost"
-
-		# hbase configuration: hbase.zookeeper.property.clientPort
-		# default is 2181
-		hbase-zookeeper-property-clientPort=2181
-
-		# hbase configuration: zookeeper.znode.parent
-		# default is "/hbase"
-		zookeeper-znode-parent="/hbase-unsecure"
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/log4j.properties b/eagle-assembly/src/main/conf/log4j.properties
deleted file mode 100644
index 25331ab..0000000
--- a/eagle-assembly/src/main/conf/log4j.properties
+++ /dev/null
@@ -1,35 +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.
-
-log4j.rootLogger=INFO, stdout
-
- eagle.log.dir=../logs
- eagle.log.file=eagle.log
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
-
-# Daily Rolling File Appender
- log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.DRFA.File=${eagle.log.dir}/${eagle.log.file}
- log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
-## 30-day backup
-# log4j.appender.DRFA.MaxBackupIndex=30
- log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
-
-# Pattern format: Date LogLevel LoggerName LogMessage
-log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/pipeline.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/pipeline.conf b/eagle-assembly/src/main/conf/pipeline.conf
deleted file mode 100644
index c1c7758..0000000
--- a/eagle-assembly/src/main/conf/pipeline.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing software
-# distributed under the License is distributed on an "AS IS" BASIS
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{
-	"envContextConfig": {
-		"env" : "storm"
-		"mode" : "cluster"
-		"nimbusHost":"sandbox.hortonworks.com",
-		"nimbusThriftPort":6627
-	}
-	"eagleProps" : {
-		"dataJoinPollIntervalSec" : 30
-		"mailHost" : "smtp.server.host"
-		"mailSmtpPort":"25"
-		"mailDebug" : "true"
-		"eagleService": {
-			"host": "localhost"
-			"port": 9099
-			"username": "admin"
-			"password": "secret"
-		}
-	}
-	"dynamicConfigSource" : {
-		"enabled" : true
-		"initDelayMillis" : 0
-		"delayMillis" : 30000
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf b/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf
deleted file mode 100644
index 3f14c47..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hadoopjmx-pipeline.conf
+++ /dev/null
@@ -1,49 +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.
-
-{
-	config {
-		envContextConfig {
-			"topologyName" : "sandbox-hadoopjmx-pipeline"
-		}
-		eagleProps {
-			"site" : "sandbox"
-			"application": "HADOOP"
-		}
-	}
-
-	dataflow {
-		KafkaSource.hadoopNNJmxStream {
-			parallism = 1000
-			topic = "nn_jmx_metric_sandbox"
-			zkConnection = "sandbox.hortonworks.com:2181"
-			zkConnectionTimeoutMS = 15000
-			consumerGroupId = "Consumer"
-			fetchSize = 1048586
-			transactionZKServers = "sandbox.hortonworks.com"
-			transactionZKPort = 2181
-			transactionZKRoot = "/consumers"
-			transactionStateUpdateMS = 2000
-			deserializerClass = "org.apache.eagle.datastream.storm.JsonMessageDeserializer"
-		}
-
-		Alert.hadoopNNJmxStreamAlertExecutor {
-			upStreamNames = [hadoopNNJmxStream]
-			alertExecutorId = hadoopNNJmxStreamAlertExecutor
-		}
-
-		hadoopNNJmxStream -> hadoopNNJmxStreamAlertExecutor{}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hadoopjmx-topology.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hadoopjmx-topology.conf b/eagle-assembly/src/main/conf/sandbox-hadoopjmx-topology.conf
deleted file mode 100644
index d91ef9f..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hadoopjmx-topology.conf
+++ /dev/null
@@ -1,69 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "hadoopJmxMetricTopology",
-    "stormConfigFile" : "hadoopjmx.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hadoopJmxMetricAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "nn_jmx_metric_sandbox",
-    "zkConnection" : "sandbox.hortonworks.com:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.datastream.storm.JsonMessageDeserializer",
-    "transactionZKServers" : "sandbox.hortonworks.com",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-    "hadoopJmxMetricAlertExecutor" : {
-      "parallelism" : 1,
-      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-      "needValidation" : "true"
-    }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "hadoopJmxMetricDataSource",
-    "dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "balancePartitionEnabled" : true,
-    #"partitionRefreshIntervalInMin" : 60,
-    #"kafkaStatisticRangeInMin" : 60,
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-    "readHdfsUserCommandPatternFrom" : "file"
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf b/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
deleted file mode 100644
index 58468ea..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hbaseSecurityLog-application.conf
+++ /dev/null
@@ -1,66 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hbaseSecurityLog-topology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hbaseSecurityLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "sandbox_hbase_security_log",
-    "zkConnection" : "127.0.0.1:2181",
-    "zkConnectionTimeoutMS" : 15000,
-    "consumerGroupId" : "EagleConsumer",
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.hbase.parse.HbaseAuditLogKafkaDeserializer",
-    "transactionZKServers" : "127.0.0.1",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "consumerGroupId" : "eagle.hbasesecurity.consumer",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hbaseSecurityLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner"
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "hbaseSecurityLog",
-    "dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hdfsAuditLog-application.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hdfsAuditLog-application.conf b/eagle-assembly/src/main/conf/sandbox-hdfsAuditLog-application.conf
deleted file mode 100644
index 4634749..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hdfsAuditLog-application.conf
+++ /dev/null
@@ -1,66 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hdfsAuditLog-topology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsAuditLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "sandbox_hdfs_audit_log",
-    "zkConnection" : "127.0.0.1:2181",
-    "brokerZkPath" : "/brokers",
-    "zkConnectionTimeoutMS" : 15000,
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-    "transactionZKServers" : "127.0.0.1",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "consumerGroupId" : "eagle.hdfsaudit.consumer",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-     "hdfsAuditLogAlertExecutor" : {
-       "parallelism" : 1,
-       "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner",
-       "needValidation" : "true"
-     }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "hdfsAuditLog",
-  	"dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-  	"enabled" : true,
-  	"initDelayMillis" : 0,
-  	"delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hdfsSecurityLog-application.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hdfsSecurityLog-application.conf b/eagle-assembly/src/main/conf/sandbox-hdfsSecurityLog-application.conf
deleted file mode 100644
index d54e123..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hdfsSecurityLog-application.conf
+++ /dev/null
@@ -1,66 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hdfsSecurityLog-topology",
-    "stormConfigFile" : "security-auditlog-storm.yaml",
-    "parallelismConfig" : {
-      "kafkaMsgConsumer" : 1,
-      "hdfsSecurityLogAlertExecutor*" : 1
-    }
-  },
-  "dataSourceConfig": {
-    "topic" : "sandbox_hdfs_security_log",
-    "zkConnection" : "127.0.0.1:2181",
-    "brokerZkPath" : "/brokers",
-    "zkConnectionTimeoutMS" : 15000,
-    "fetchSize" : 1048586,
-    "deserializerClass" : "org.apache.eagle.security.securitylog.HDFSSecurityLogKafkaDeserializer",
-    "transactionZKServers" : "127.0.0.1",
-    "transactionZKPort" : 2181,
-    "transactionZKRoot" : "/consumers",
-    "consumerGroupId" : "eagle.hdfssecurity.consumer",
-    "transactionStateUpdateMS" : 2000
-  },
-  "alertExecutorConfigs" : {
-    "hdfsSecurityLogAlertExecutor" : {
-      "parallelism" : 1,
-      "partitioner" : "eagle.alert.policy.DefaultPolicyPartitioner",
-      "needValidation" : "true"
-    }
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application": "hdfsSecurityLog",
-    "dataJoinPollIntervalSec" : 30,
-    "mailHost" : "mailHost.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-hiveQueryLog-application.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-hiveQueryLog-application.conf b/eagle-assembly/src/main/conf/sandbox-hiveQueryLog-application.conf
deleted file mode 100644
index 6601aff..0000000
--- a/eagle-assembly/src/main/conf/sandbox-hiveQueryLog-application.conf
+++ /dev/null
@@ -1,63 +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.
-
-{
-  "envContextConfig" : {
-    "env" : "storm",
-    "mode" : "cluster",
-    "topologyName" : "sandbox-hiveQueryRunning-topology",
-    "stormConfigFile" : "hive.storm.yaml",
-    "parallelismConfig" : {
-      "msgConsumer" : 2
-    }
-  },
-  "dataSourceConfig": {
-    "flavor" : "stormrunning",
-    "zkQuorum" : "localhost:2181",
-    "zkRoot" : "/jobrunning",
-    "zkSessionTimeoutMs" : 15000,
-    "zkRetryTimes" : 3,
-    "zkRetryInterval" : 2000,
-    "RMEndPoints" : "http://localhost:8088/",
-    "HSEndPoint" : "http://localhost:19888/",
-    "partitionerCls" : "org.apache.eagle.job.DefaultJobPartitionerImpl"
-  },
-  "eagleProps" : {
-    "site" : "sandbox",
-    "application" : "hiveQueryLog",
-    "mailHost" : "atom.xyz.com",
-    "mailSmtpPort":"25",
-    "mailDebug" : "true",
-    "eagleService": {
-      "host": "localhost",
-      "port": 9099,
-      "username": "admin",
-      "password": "secret"
-    }
-  },
-  "alertExecutorConfigs" : {
-    "hiveAccessAlertByRunningJob" : {
-      "parallelism" : 1,
-      "partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner",
-      "needValidation" : "true"
-    }
-  },
-  "dynamicConfigSource" : {
-    "enabled" : true,
-    "initDelayMillis" : 0,
-    "delayMillis" : 30000,
-    "ignoreDeleteFromSource" : true
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-userprofile-scheduler.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-userprofile-scheduler.conf b/eagle-assembly/src/main/conf/sandbox-userprofile-scheduler.conf
deleted file mode 100644
index fd8dd56..0000000
--- a/eagle-assembly/src/main/conf/sandbox-userprofile-scheduler.conf
+++ /dev/null
@@ -1,66 +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.
-
-# eagle configuration
-eagle{
-	# eagle site id
-	site = "sandbox"
-
-	# eagle service configuration
-	service {
-		# eagle service host, default: "localhost"
-		host = "localhost"
-		# eagle service port, default: 8080
-		port = 9099
-    username = "admin"
-    password = "secret"
-	}
-
-	# eagle userprofile configuration
-	userprofile {
-		# training audit log input path
-		training-audit-path = "file:///usr/hdp/2.3.0.0-2130/eagle/lib/userprofile/data/*.txt"
-
-		# detection audit log input path
-		detection-audit-path = "file:///usr/hdp/2.3.0.0-2130/eagle/lib/userprofile/data/validate"
-
-		# detection output kafka brokers
-		# default: localhost:9200
-		detection-kafka-brokers = "sandbox.hortonworks.com:6667"
-
-		# detection output kafka topic
-		detection-kafka-topic = "sandbox_hdfs_audit_log"
-	}
-}
-
-akka {
-	# Loggers to register at boot time (akka.event.Logging$DefaultLogger logs
-	# to STDOUT)
-	loggers = ["akka.event.slf4j.Slf4jLogger"]
-
-	# Log level used by the configured loggers (see "loggers") as soon
-	# as they have been started; before that, see "stdout-loglevel"
-	# Options: OFF, ERROR, WARNING, INFO, DEBUG
-	loglevel = "INFO"
-
-	# Log level for the very basic logger activated during ActorSystem startup.
-	# This logger prints the log messages to stdout (System.out).
-	# Options: OFF, ERROR, WARNING, INFO, DEBUG
-	stdout-loglevel = "INFO"
-
-	# Filter of log events that is used by the LoggingAdapter before
-	# publishing log events to the eventStream.
-	logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/conf/sandbox-userprofile-topology.conf
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/conf/sandbox-userprofile-topology.conf b/eagle-assembly/src/main/conf/sandbox-userprofile-topology.conf
deleted file mode 100644
index abe8cb8..0000000
--- a/eagle-assembly/src/main/conf/sandbox-userprofile-topology.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-	"deployInstanceIdentifier" : {
-		"programId" : "mlProgramId"
-	},
-	"envContextConfig" : {
-		"env" : "storm",
-		"topologyName" : "sandbox-userprofile-topology",
-		"mode" : "cluster",
-		"parallelismConfig" : {
-			"kafkaMsgConsumer" : 1,
-			"userProfileAnomalyDetectionExecutor*" : 1
-		},
-		"stormConfigFile":"userprofile.storm.yaml"
-	},
-	"dataSourceConfig": {
-		"topic" : "sandbox_hdfs_audit_log",
-		"zkConnection" : "localhost:2181",
-		"zkConnectionTimeoutMS" : 15000,
-		"consumerGroupId" : "eagle.userprofile.consumer",
-		"fetchSize" : 1048586,
-		"deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-		"transactionZKServers" : "localhost",
-		"transactionZKPort" : 2181,
-		"transactionZKRoot" : "/brokers/topics",
-		"transactionStateUpdateMS" : 2000
-	},
-	"eagleProps" : {
-		"site":"sandbox",
-		"application":"userProfile",
-		"eagleService": {
-			"host": "localhost",
-			"port": "9099",
-			"username": "admin",
-			"password": "secret"
-		}
-	},
-	"alertExecutorConfigs" : {
-		"userProfileAnomalyDetectionExecutor" : {
-			"parallelism" : 1,
-			"partitioner" : "org.apache.eagle.policy.DefaultPolicyPartitioner",
-			"needValidation":true
-		}
-	},
-	"dynamicConfigSource" : {
-		"enabled"          : true,
-		"initDelayMillis"  : 0,
-		"delayMillis"      : 5000
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/docs/kafka.rb
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/docs/kafka.rb b/eagle-assembly/src/main/docs/kafka.rb
deleted file mode 100644
index 4c5f9b3..0000000
--- a/eagle-assembly/src/main/docs/kafka.rb
+++ /dev/null
@@ -1,191 +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.
-
-require 'logstash/namespace'
-require 'logstash/outputs/base'
-require 'jruby-kafka'
-
-# Write events to a Kafka topic. This uses the Kafka Producer API to write messages to a topic on
-# the broker.
-#
-# The only required configuration is the topic name. The default codec is json,
-# so events will be persisted on the broker in json format. If you select a codec of plain,
-# Logstash will encode your messages with not only the message but also with a timestamp and
-# hostname. If you do not want anything but your message passing through, you should make the output
-# configuration something like:
-# [source,ruby]
-#     output {
-#       kafka {
-#         codec => plain {
-#            format => "%{message}"
-#         }
-#       }
-#     }
-# For more information see http://kafka.apache.org/documentation.html#theproducer
-#
-# Kafka producer configuration: http://kafka.apache.org/documentation.html#producerconfigs
-class LogStash::Outputs::Kafka < LogStash::Outputs::Base
-  config_name 'kafka'
-  milestone 2
-
-  default :codec, 'json'
-  # This is for bootstrapping and the producer will only use it for getting metadata (topics,
-  # partitions and replicas). The socket connections for sending the actual data will be
-  # established based on the broker information returned in the metadata. The format is
-  # `host1:port1,host2:port2`, and the list can be a subset of brokers or a VIP pointing to a
-  # subset of brokers.
-  config :broker_list, :validate => :string, :default => 'localhost:9092'
-  # The topic to produce the messages to
-  config :topic_id, :validate => :string, :required => true
-  # This parameter allows you to specify the compression codec for all data generated by this
-  # producer. Valid values are `none`, `gzip` and `snappy`.
-  config :compression_codec, :validate => %w( none gzip snappy ), :default => 'none'
-  # This parameter allows you to set whether compression should be turned on for particular
-  # topics. If the compression codec is anything other than `NoCompressionCodec`,
-  # enable compression only for specified topics if any. If the list of compressed topics is
-  # empty, then enable the specified compression codec for all topics. If the compression codec
-  # is `NoCompressionCodec`, compression is disabled for all topics
-  config :compressed_topics, :validate => :string, :default => ''
-  # This value controls when a produce request is considered completed. Specifically,
-  # how many other brokers must have committed the data to their log and acknowledged this to the
-  # leader. For more info, see -- http://kafka.apache.org/documentation.html#producerconfigs
-  config :request_required_acks, :validate => [-1,0,1], :default => 0
-  # The serializer class for messages. The default encoder takes a byte[] and returns the same byte[]
-  config :serializer_class, :validate => :string, :default => 'kafka.serializer.StringEncoder'
-  # The partitioner class for partitioning messages amongst partitions in the topic. The default
-  # partitioner is based on the hash of the key. If the key is null,
-  # the message is sent to a random partition in the broker.
-  # NOTE: `topic_metadata_refresh_interval_ms` controls how long the producer will distribute to a
-  # partition in the topic. This defaults to 10 mins, so the producer will continue to write to a
-  # single partition for 10 mins before it switches
-  config :partitioner_class, :validate => :string, :default => 'kafka.producer.DefaultPartitioner'
-  # The amount of time the broker will wait trying to meet the `request.required.acks` requirement
-  # before sending back an error to the client.
-  config :request_timeout_ms, :validate => :number, :default => 10000
-  # This parameter specifies whether the messages are sent asynchronously in a background thread.
-  # Valid values are (1) async for asynchronous send and (2) sync for synchronous send. By
-  # setting the producer to async we allow batching together of requests (which is great for
-  # throughput) but open the possibility of a failure of the client machine dropping unsent data.
-  config :producer_type, :validate => %w( sync async ), :default => 'sync'
-  # The serializer class for keys (defaults to the same as for messages if nothing is given)
-  config :key_serializer_class, :validate => :string, :default => 'kafka.serializer.StringEncoder'
-  # This property will cause the producer to automatically retry a failed send request. This
-  # property specifies the number of retries when such failures occur. Note that setting a
-  # non-zero value here can lead to duplicates in the case of network errors that cause a message
-  # to be sent but the acknowledgement to be lost.
-  config :message_send_max_retries, :validate => :number, :default => 3
-  # Before each retry, the producer refreshes the metadata of relevant topics to see if a new
-  # leader has been elected. Since leader election takes a bit of time,
-  # this property specifies the amount of time that the producer waits before refreshing the
-  # metadata.
-  config :retry_backoff_ms, :validate => :number, :default => 100
-  # The producer generally refreshes the topic metadata from brokers when there is a failure
-  # (partition missing, leader not available...). It will also poll regularly (default: every
-  # 10min so 600000ms). If you set this to a negative value, metadata will only get refreshed on
-  # failure. If you set this to zero, the metadata will get refreshed after each message sent
-  # (not recommended). Important note: the refresh happen only AFTER the message is sent,
-  # so if the producer never sends a message the metadata is never refreshed
-  config :topic_metadata_refresh_interval_ms, :validate => :number, :default => 600 * 1000
-  # Maximum time to buffer data when using async mode. For example a setting of 100 will try to
-  # batch together 100ms of messages to send at once. This will improve throughput but adds
-  # message delivery latency due to the buffering.
-  config :queue_buffering_max_ms, :validate => :number, :default => 5000
-  # The maximum number of unsent messages that can be queued up the producer when using async
-  # mode before either the producer must be blocked or data must be dropped.
-  config :queue_buffering_max_messages, :validate => :number, :default => 10000
-  # The amount of time to block before dropping messages when running in async mode and the
-  # buffer has reached `queue.buffering.max.messages`. If set to 0 events will be enqueued
-  # immediately or dropped if the queue is full (the producer send call will never block). If set
-  # to -1 the producer will block indefinitely and never willingly drop a send.
-  config :queue_enqueue_timeout_ms, :validate => :number, :default => -1
-  # The number of messages to send in one batch when using async mode. The producer will wait
-  # until either this number of messages are ready to send or `queue.buffer.max.ms` is reached.
-  config :batch_num_messages, :validate => :number, :default => 200
-  # Socket write buffer size
-  config :send_buffer_bytes, :validate => :number, :default => 100 * 1024
-  # The client id is a user-specified string sent in each request to help trace calls. It should
-  # logically identify the application making the request.
-  config :client_id, :validate => :string, :default => ''
-  # Provides a way to specify a partition key as a string. To specify a partition key for
-  # Kafka, configure a format that will produce the key as a string. Defaults
-  # `key_serializer_class` to `kafka.serializer.StringEncoder` to match. For example, to partition
-  # by host:
-  # [source,ruby]
-  #     output {
-  #       kafka {
-  #           partition_key_format => "%{host}"
-  #       }
-  #     }
-  config :partition_key_format, :validate => :string, :default => nil
-
-  public
-  def register
-    LogStash::Logger.setup_log4j(@logger)
-
-    options = {
-        :broker_list => @broker_list,
-        :compression_codec => @compression_codec,
-        :compressed_topics => @compressed_topics,
-        :request_required_acks => @request_required_acks,
-        :serializer_class => @serializer_class,
-        :partitioner_class => @partitioner_class,
-        :request_timeout_ms => @request_timeout_ms,
-        :producer_type => @producer_type,
-        :key_serializer_class => @key_serializer_class,
-        :message_send_max_retries => @message_send_max_retries,
-        :retry_backoff_ms => @retry_backoff_ms,
-        :topic_metadata_refresh_interval_ms => @topic_metadata_refresh_interval_ms,
-        :queue_buffering_max_ms => @queue_buffering_max_ms,
-        :queue_buffering_max_messages => @queue_buffering_max_messages,
-        :queue_enqueue_timeout_ms => @queue_enqueue_timeout_ms,
-        :batch_num_messages => @batch_num_messages,
-        :send_buffer_bytes => @send_buffer_bytes,
-        :client_id => @client_id
-    }
-    @producer = Kafka::Producer.new(options)
-    @producer.connect
-
-    @logger.info('Registering kafka producer', :topic_id => @topic_id, :broker_list => @broker_list)
-
-    @codec.on_event do |data|
-      begin
-        @producer.send_msg(@current_topic_id,@partition_key,data)
-      rescue LogStash::ShutdownSignal
-        @logger.info('Kafka producer got shutdown signal')
-      rescue => e
-        @logger.warn('kafka producer threw exception, restarting',
-                     :exception => e)
-      end
-    end
-  end # def register
-
-  def receive(event)
-    return unless output?(event)
-    if event == LogStash::SHUTDOWN
-      finished
-      return
-    end
-    @partition_key = if @partition_key_format.nil? then nil else event.sprintf(@partition_key_format) end
-    @current_topic_id = if @topic_id.nil? then nil else event.sprintf(@topic_id) end
-    @codec.encode(event)
-    @partition_key = nil
-    @current_topic_id = nil
-  end
-
-  def teardown
-    @producer.close
-  end
-end #class LogStash::Outputs::Kafka
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/docs/logstash-kafka-conf.md
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/docs/logstash-kafka-conf.md b/eagle-assembly/src/main/docs/logstash-kafka-conf.md
deleted file mode 100644
index 84952e0..0000000
--- a/eagle-assembly/src/main/docs/logstash-kafka-conf.md
+++ /dev/null
@@ -1,164 +0,0 @@
-<!--
-{% comment %}
-# 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.
-{% endcomment %}
--->
-
-# Logstash-kafka 
-
-### Install logstash-kafka plugin
-
-
-#### For Logstash 1.5.x
-
-
-logstash-kafka has been intergrated into [logstash-input-kafka][logstash-input-kafka] and [logstash-output-kafka][logstash-output-kafka], you can directly use it.
-
-[logstash-input-kafka]: https://github.com/logstash-plugins/logstash-input-kafka
-[logstash-output-kafka]: https://github.com/logstash-plugins/logstash-output-kafka
-
-#### For Logstash 1.4.x
-
-In logstash 1.4.x, the online version does not support specifying partition\_key for Kafka producer, and data will be produced into each partitions in turn. For eagle, we need to use the src in hdfs\_audit\_log as the partition key, so some hacking work have been done. If you have the same requirment, you can follow it. 
-
-1. Install logstash-kafka
-
-        cd /path/to/logstash
-        GEM_HOME=vendor/bundle/jruby/1.9 GEM_PATH= java -jar vendor/jar/jruby-complete-1.7.11.jar -S gem install logstash-kafka
-        cp -R vendor/bundle/jruby/1.9/gems/logstash-kafka-*-java/{lib/logstash/*,spec/*} {lib/logstash/,spec/}
-        # test install
-        USE_JRUBY=1 bin/logstash rspec spec/**/kafka*.rb
-
-    or
-
-        cd /path/to/logstash-kafka
-        make tarball
-        <!-- a tarball package will be generated under build, including logstash -->
-
-2. Hacking the kafka.rb
-
-   We have added partition\_key\_format, which is used to specify the partition_key and supported by logstash 1.5.x, into  lib/logstash/outputs/kafka.rb. More details are shown [here](https://github.xyz.com/eagle/eagle/blob/master/eagle-assembly/src/main/docs/kafka.rb).
-       
-          config :partition_key_format, :validate => :string, :default => nil
-        
-          public
-          def register
-            LogStash::Logger.setup_log4j(@logger)
-        
-            options = {
-                :broker_list => @broker_list,
-                :compression_codec => @compression_codec,
-                :compressed_topics => @compressed_topics,
-                :request_required_acks => @request_required_acks,
-                :serializer_class => @serializer_class,
-                :partitioner_class => @partitioner_class,
-                :request_timeout_ms => @request_timeout_ms,
-                :producer_type => @producer_type,
-                :key_serializer_class => @key_serializer_class,
-                :message_send_max_retries => @message_send_max_retries,
-                :retry_backoff_ms => @retry_backoff_ms,
-                :topic_metadata_refresh_interval_ms => @topic_metadata_refresh_interval_ms,
-                :queue_buffering_max_ms => @queue_buffering_max_ms,
-                :queue_buffering_max_messages => @queue_buffering_max_messages,
-                :queue_enqueue_timeout_ms => @queue_enqueue_timeout_ms,
-                :batch_num_messages => @batch_num_messages,
-                :send_buffer_bytes => @send_buffer_bytes,
-                :client_id => @client_id
-            }
-            @producer = Kafka::Producer.new(options)
-            @producer.connect
-        
-            @logger.info('Registering kafka producer', :topic_id => @topic_id, :broker_list => @broker_list)
-        
-            @codec.on_event do |data|
-              begin
-                @producer.send_msg(@current_topic_id,@partition_key,data)
-              rescue LogStash::ShutdownSignal
-                @logger.info('Kafka producer got shutdown signal')
-              rescue => e
-                @logger.warn('kafka producer threw exception, restarting',
-                             :exception => e)
-              end
-            end
-          end # def register
-        
-          def receive(event)
-            return unless output?(event)
-            if event == LogStash::SHUTDOWN
-              finished
-              return
-            end
-            @partition_key = if @partition_key_format.nil? then nil else event.sprintf(@partition_key_format) end
-            @current_topic_id = if @topic_id.nil? then nil else event.sprintf(@topic_id) end
-            @codec.encode(event)
-            @partition_key = nil
-            @current_topic_id = nil
-          end
-
-
-### Create logstash configuration file
-Go to the logstash root dir, and create a configure file
-
-        input {
-            file {
-                type => "hdp-nn-audit"
-                path => "/path/to/audit.log"
-                start_position => end
-                sincedb_path => "/var/log/logstash/"
-             }
-        }
-
-        filter{
-            if [type] == "hdp-nn-audit" {
-        	   grok {
-        	       match => ["message", "ugi=(?<user>([\w\d\-]+))@|ugi=(?<user>([\w\d\-]+))/[\w\d\-.]+@|ugi=(?<user>([\w\d.\-_]+))[\s(]+"]
-        	   }
-            }
-        }
-
-        output {
-            if [type] == "hdp-nn-audit" {
-                kafka {
-                    codec => plain {
-                        format => "%{message}"
-                    }
-                    broker_list => "localhost:9092"
-                    topic_id => "hdfs_audit_log"
-                    request_required_acks => 0
-                    request_timeout_ms => 10000
-                    producer_type => "async"
-                    message_send_max_retries => 3
-                    retry_backoff_ms => 100
-                    queue_buffering_max_ms => 5000
-                    queue_enqueue_timeout_ms => 5000
-                    batch_num_messages => 200
-                    send_buffer_bytes => 102400
-                    client_id => "hdp-nn-audit"
-                    partition_key_format => "%{user}"
-                }
-                # stdout { codec => rubydebug }
-            }
-        }
-
-#### grok pattern testing
-We have 3 typical patterns for ugi field as follows
-2015-02-11 15:00:00,000 INFO FSNamesystem.audit: allowed=true	ugi=user1@xyz.com (auth:TOKEN)	ip=/10.115.44.55	cmd=open	src=/apps/hdmi-technology/b_pulsar_coe/schema/avroschema/Session.avsc	dst=null	perm=null
-2015-02-11 15:00:00,000 INFO FSNamesystem.audit: allowed=true	ugi=hdc_uc4_platform (auth:TOKEN) via sg_adm@xyz.com (auth:TOKEN)	ip=/10.115.11.54	cmd=open	src=/sys/soj/event/2015/02/08/same_day/00000000000772509716119204458864#3632400774990000-949461-r-01459.avro	dst=null	perm=null
-
-### Reference Links
-1. [logstash-kafka](https://github.com/joekiller/logstash-kafka)
-2. [logstash](https://github.com/elastic/logstash)
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh b/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
deleted file mode 100644
index 286bc87..0000000
--- a/eagle-assembly/src/main/examples/eagle-sandbox-starter.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/../bin/eagle-env.sh
-eagle_bin=$EAGLE_HOME/bin
-
-
-###################################################################
-#             STEP 1: Check Installation
-###################################################################
-
-echo "STEP [1/3]: checking environment"
-$eagle_bin/eagle-check-env.sh
-[ $? != 0 ] && exit 1
-
-pid_dir=/var/run
-
-# Check HBase if it has been started
-hbase_master_pid=${pid_dir}/hbase/hbase-hbase-master.pid
-hbase_regionserver_pid=${pid_dir}/hbase/hbase-hbase-regionserver.pid
-echo "Checking if hbase is running ..."
-
-if [ -f $hbase_master_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_master_pid) > /dev/null
-then
-	echo "HBase Master is running as process `cat $hbase_master_pid`."
-else
-	echo "Error: HBase Master is not running. Please start it via Ambari."
-	exit 1
-fi
-
-if [ -f $hbase_regionserver_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_regionserver_pid) > /dev/null
-then
-	echo "HBase RegionServer is running as process `cat $hbase_regionserver_pid`."
-else
-	echo "Error: HBase RegionServer is not running. Please start it via Ambari."
-	exit 1
-fi
-
-# Check kafka if it has been started
-kafka_pid=$pid_dir/kafka/kafka.pid
-echo "Checking if kafka is running ..."
-
-if [ -f $kafka_pid ] && ps aux | grep -v grep | grep $(cat $kafka_pid) > /dev/null
-then
-	echo "Kafka is running as process `cat $kafka_pid`."
-else
-	echo "Error: Kafka is not running. Please start it via Ambari."
-	exit 1
-fi
-
-# Check storm if it has been started
-nimbus_pid=$pid_dir/storm/nimbus.pid
-supervisor_pid=$pid_dir/storm/supervisor.pid
-ui_pid=$pid_dir/storm/ui.pid
-echo "Checking if storm is running ..."
-
-if ! ([ -f $nimbus_pid ] && ps aux | grep -v grep | grep $(cat $nimbus_pid) > /dev/null)
-then
-    echo "Error: Storm Nimbus is not running"
-    exit 1
-fi
-
-if ! ([ -f $supervisor_pid ] && ps aux | grep -v grep | grep $(cat $supervisor_pid) > /dev/null)
-then
-    echo "Error: Storm Supervisor is not running"
-    exit 1
-fi
-
-if ! ([ -f $ui_pid ] && ps aux | grep -v grep | grep $(cat $ui_pid) > /dev/null)
-then
-    echo "Error: Storm UI is not running"
-    exit 1
-fi
-
-echo "Storm is running"
-
-
-###################################################################
-#              STEP 2: Starting Eagle Service
-###################################################################
-
-echo "STEP [2/3]: start eagle service"
-$eagle_bin/eagle-service.sh start
-
-
-###################################################################
-#              STEP 3: Starting Eagle Topology
-###################################################################
-
-echo "STEP [3/3]: start eagle topology"
-$eagle_bin/eagle-service-init.sh
-[ $? != 0 ] && exit 1
-
-echo "Creating kafka topics for eagle ... "
-KAFKA_HOME=/usr/hdp/current/kafka-broker
-EAGLE_ZOOKEEPER_QUORUM=localhost:2181
-topic=`${KAFKA_HOME}/bin/kafka-topics.sh --list --zookeeper $EAGLE_ZOOKEEPER_QUORUM --topic sandbox_hdfs_audit_log`
-if [ -z $topic ]; then
-	$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $EAGLE_ZOOKEEPER_QUORUM --replication-factor 1 --partitions 1 --topic sandbox_hdfs_audit_log
-fi
-
-if [ $? = 0 ]; then
-echo "==> Create kafka topic successfully for eagle"
-else
-echo "==> Failed, exiting"
-exit 1
-fi
-$eagle_bin/eagle-topology-init.sh
-[ $? != 0 ] && exit 1
-${EAGLE_HOME}/examples/sample-sensitivity-resource-create.sh
-[ $? != 0 ] && exit 1
-${EAGLE_HOME}/examples/sample-policy-create.sh
-[ $? != 0 ] && exit 1
-$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.auditlog.HdfsAuditLogProcessorMain --config ${EAGLE_HOME}/conf/sandbox-hdfsAuditLog-application.conf start
-[ $? != 0 ] && exit 1
-$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.hive.jobrunning.HiveJobRunningMonitoringMain --config ${EAGLE_HOME}/conf/sandbox-hiveQueryLog-application.conf start
-[ $? != 0 ] && exit 1
-$eagle_bin/eagle-topology.sh --main org.apache.eagle.security.userprofile.UserProfileDetectionMain --config ${EAGLE_HOME}/conf/sandbox-userprofile-topology.conf start
-[ $? != 0 ] && exit 1
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/examples/hadoop-metric-policy-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/hadoop-metric-policy-create.sh b/eagle-assembly/src/main/examples/hadoop-metric-policy-create.sh
deleted file mode 100644
index 9e9e861..0000000
--- a/eagle-assembly/src/main/examples/hadoop-metric-policy-create.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/../bin/eagle-env.sh
-
-##### add policies ##########
-echo ""
-echo "Importing policy: safeModePolicy "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" \
- -d '
- [
-     {
-       "prefix": "alertdef",
-       "tags": {
-         "site": "sandbox",
-         "application": "hadoopJmxMetricDataSource",
-         "policyId": "safeModePolicy",
-         "alertExecutorId": "hadoopJmxMetricAlertExecutor",
-         "policyType": "siddhiCEPEngine"
-       },
-       "description": "jmx metric ",
-       "policyDef": "{\"expression\":\"from hadoopJmxMetricEventStream[component==\\\"namenode\\\" and metric == \\\"hadoop.namenode.fsnamesystemstate.fsstate\\\" and convert(value, \\\"long\\\") > 0]#window.externalTime(timestamp ,10 min) select metric, host, value, timestamp, component, site insert into tmp; \",\"type\":\"siddhiCEPEngine\"}",
-       "enabled": true,
-       "dedupeDef": "{\"alertDedupIntervalMin\":10,\"emailDedupIntervalMin\":10}",
-       "notificationDef": "[{\"sender\":\"eagle@apache.org\",\"recipients\":\"eagle@apache.org\",\"subject\":\"missing block found.\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]"
-     }
- ]
- '
-
-exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/examples/hadoop-metric-sandbox-starter.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/hadoop-metric-sandbox-starter.sh b/eagle-assembly/src/main/examples/hadoop-metric-sandbox-starter.sh
deleted file mode 100644
index 8f227b0..0000000
--- a/eagle-assembly/src/main/examples/hadoop-metric-sandbox-starter.sh
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/../bin/eagle-env.sh
-eagle_bin=$EAGLE_HOME/bin
-
-
-###################################################################
-#             STEP 1: Check Installation
-###################################################################
-
-echo "STEP [1/3]: checking environment"
-$eagle_bin/eagle-check-env.sh
-[ $? != 0 ] && exit 1
-
-pid_dir=/var/run
-
-# Check HBase if it has been started
-hbase_master_pid=${pid_dir}/hbase/hbase-hbase-master.pid
-hbase_regionserver_pid=${pid_dir}/hbase/hbase-hbase-regionserver.pid
-echo "Checking if hbase is running ..."
-
-if [ -f $hbase_master_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_master_pid) > /dev/null
-then
-	echo "HBase Master is running as process `cat $hbase_master_pid`."
-else
-	echo "Error: HBase Master is not running. Please start it via Ambari."
-	exit 1
-fi
-
-if [ -f $hbase_regionserver_pid ] && \
-	ps aux | grep -v grep | grep $(cat $hbase_regionserver_pid) > /dev/null
-then
-	echo "HBase RegionServer is running as process `cat $hbase_regionserver_pid`."
-else
-	echo "Error: HBase RegionServer is not running. Please start it via Ambari."
-	exit 1
-fi
-
-# Check kafka if it has been started
-kafka_pid=$pid_dir/kafka/kafka.pid
-echo "Checking if kafka is running ..."
-
-if [ -f $kafka_pid ] && ps aux | grep -v grep | grep $(cat $kafka_pid) > /dev/null
-then
-	echo "Kafka is running as process `cat $kafka_pid`."
-else
-	echo "Error: Kafka is not running. Please start it via Ambari."
-	exit 1
-fi
-
-# Check storm if it has been started
-nimbus_pid=$pid_dir/storm/nimbus.pid
-supervisor_pid=$pid_dir/storm/supervisor.pid
-ui_pid=$pid_dir/storm/ui.pid
-echo "Checking if storm is running ..."
-
-if ! ([ -f $nimbus_pid ] && ps aux | grep -v grep | grep $(cat $nimbus_pid) > /dev/null)
-then
-    echo "Error: Storm Nimbus is not running"
-    exit 1
-fi
-
-if ! ([ -f $supervisor_pid ] && ps aux | grep -v grep | grep $(cat $supervisor_pid) > /dev/null)
-then
-    echo "Error: Storm Supervisor is not running"
-    exit 1
-fi
-
-if ! ([ -f $ui_pid ] && ps aux | grep -v grep | grep $(cat $ui_pid) > /dev/null)
-then
-    echo "Error: Storm UI is not running"
-    exit 1
-fi
-
-echo "Storm is running"
-
-
-###################################################################
-#              STEP 2: Starting Eagle Service
-###################################################################
-
-echo "STEP [2/3]: Start Eagle Service"
-$eagle_bin/eagle-service.sh start
-
-
-###################################################################
-#              STEP 3: Starting Eagle Topology
-###################################################################
-
-echo "STEP [3/3]: Init Eagle Service"
-$eagle_bin/eagle-service-init.sh
-[ $? != 0 ] && exit 1
-
-echo "Creating kafka topics for eagle ... "
-KAFKA_HOME=/usr/hdp/current/kafka-broker
-EAGLE_ZOOKEEPER_QUORUM=localhost:2181
-topic=`${KAFKA_HOME}/bin/kafka-topics.sh --list --zookeeper $EAGLE_ZOOKEEPER_QUORUM --topic nn_jmx_metric_sandbox`
-if [ -z $topic ]; then
-	$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper $EAGLE_ZOOKEEPER_QUORUM --replication-factor 1 --partitions 1 --topic nn_jmx_metric_sandbox
-fi
-
-if [ $? = 0 ]; then
-echo "==> Create kafka topic successfully for Hadoop Metric Monitoring"
-else
-echo "==> Failed, exiting"
-exit 1
-fi
-$eagle_bin/hadoop-metric-monitor.sh
-[ $? != 0 ] && exit 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/examples/sample-policy-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/sample-policy-create.sh b/eagle-assembly/src/main/examples/sample-policy-create.sh
deleted file mode 100644
index 71e099e..0000000
--- a/eagle-assembly/src/main/examples/sample-policy-create.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/../bin/eagle-env.sh
-
-su hdfs -c "hdfs dfs -touchz /tmp/private"
-#su hdfs -c "hdfs dfs -touchz /tmp/sensitive"
-
-#### create hdfs policy sample in sandbox
-echo "create hdfs policy sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d \
-'[{"tags":{"site":"sandbox","application":"hdfsAuditLog","alertExecutorId":"hdfsAuditLogAlertExecutor","policyId":"viewPrivate","policyType":"siddhiCEPEngine"},"desc":"view private file","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from hdfsAuditLogEventStream[(cmd=='\'open\'') and (src=='\'/tmp/private\'')] select * insert into outputStream\"}","dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}","notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]","remediationDef":"","enabled":true}]'
-
-#### create hive policy sample in sandbox
-echo "create hive policy sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDefinitionService" -d \
-'[{"tags":{"site":"sandbox","application":"hiveQueryLog","alertExecutorId":"hiveAccessAlertByRunningJob","policyId":"queryPhoneNumber","policyType":"siddhiCEPEngine"},"desc":"query sensitive hive data","policyDef":"{\"type\":\"siddhiCEPEngine\",\"expression\":\"from hiveAccessLogStream[(sensitivityType=='\'PHONE_NUMBER\'')] select * insert into outputStream;\"}","dedupeDef": "{\"alertDedupIntervalMin\":0,\"emailDedupIntervalMin\":1440}","notificationDef": "[{\"subject\":\"just for test\",\"sender\":\"nobody@test.com\",\"recipients\":\"nobody@test.com\",\"flavor\":\"email\",\"id\":\"email_1\",\"tplFileName\":\"\"}]","remediationDef":"","enabled":"true"}]'

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh b/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
deleted file mode 100644
index 4a8f06f..0000000
--- a/eagle-assembly/src/main/examples/sample-sensitivity-resource-create.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/../bin/eagle-env.sh
-
-#### create hive sensitivity sample in sandbox
-echo "create hive sensitivity sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=HiveResourceSensitivityService" -d '[{"tags":{"site" : "sandbox", "hiveResource":"/xademo/customer_details/phone_number"}, "sensitivityType": "PHONE_NUMBER"}]'
-
-
-#### create hdfs sensitivity sample in sandbox
-echo "create hdfs sensitivity sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FileSensitivityService" -d '[{"tags":{"site" : "sandbox", "filedir":"/tmp/private"}, "sensitivityType": "PRIVATE"}]'
-
-#### create hbase sensitivity sample in sandbox
-echo "create hdfs sensitivity sample in sandbox... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=HbaseResourceSensitivityService" -d '[{"tags":{"site":"sandbox","hbaseResource":"default:alertStreamSchema"},"sensitivityType":"PrivateTable"}]'
-

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-assembly/src/main/lib/share/.placeholder
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/lib/share/.placeholder b/eagle-assembly/src/main/lib/share/.placeholder
deleted file mode 100644
index 823c394..0000000
--- a/eagle-assembly/src/main/lib/share/.placeholder
+++ /dev/null
@@ -1,14 +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.
\ No newline at end of file