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]);
-               }
-       }
-}


Reply via email to