eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [05/51] [partial] incubator-eagle git commit: EAGLE-184 Migrate eagle website from https://github.com/eaglemonitoring/eaglemonitoring.github.io to document branch
Date Thu, 03 Mar 2016 18:09:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
deleted file mode 100644
index 88e6187..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/entity/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * <h2>Consistency Guarantee</h2>
- * <ul>
- *     <li> Rollback all changes if any single entity throws exception to make sure consistency guarantee </li>
- * </ul>
- *
- * @since 3/31/15
- */
-package org.apache.eagle.storage.jdbc.entity;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
deleted file mode 100644
index 79e1b94..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/package-info.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * <h1>Eagle Storage Extension - JDBC</h1>
- *
- * <h2>Configuration</h2>
- * <ul>
- *  <li>
- *     eagle.storage.type: <code>jdbc</code>
- *  </li>
- *  <li>
- *     eagle.storage.adapter:
- *      <code>mysql</code>
- *      <code>mysql</code>
- *      <code>oracle</code>
- *      <code>postgres</code>
- *      <code>mssql</code>
- *      <code>hsqldb</code>
- *      <code>derby</code>
- *  </li>
- *  <li>eagle.storage.username</li>
- *  <li>eagle.storage.password</li>
- *  <li>eagle.storage.database</li>
- *  <li>eagle.storage.connection.url</li>
- *  <li>eagle.storage.connection.props</li>
- *  <li>eagle.storage.driver.class</li>
- *  <li>eagle.storage.connection.max</li>
- * </ul>
- *
- * Sample:
- * <pre>
- *   eagle.storage.type=jdbc
- *   eagle.storage.adapter=mysql
- *   eagle.storage.username=eagle
- *   eagle.storage.password=eagle
- *   eagle.storage.database=eagle
- *   eagle.storage.connection.url=jdbc:mysql://localhost:3306/eagle
- *   eagle.storage.connection.props=encoding=UTF-8
- *   eagle.storage.driver.class=com.mysql.jdbc.Driver
- *   eagle.storage.connection.max=8
- * </pre>
- *
- * <h2>Rowkey</h2>
- *
- * We simply use UUID as row key of entities and use the key as the primary key named "uuid" in RDBMS table schema
- *
- * <h2>Features</h2>
- * <ul>
- *  <li>Support basic entity operation like  CREATE, READ, UPDATE and DELETE</li>
- *  <li>Support flatten aggregation query</li>
- *  <li>Support customized entity field type (JdbcEntityDefinitionManager#registerJdbcSerDeser) </li>
- * </ul>
- *
- * <h2>Dependencies</h2>
- * <ul>
- *     <li>Apache DB - Torque: http://db.apache.org/torque/torque-4.0/index.html</li>
- *     <li>Apache DB - DdlUtils: https://db.apache.org/ddlutils/</li>
- * </ul>
- *
- * <h2>TO-DO</h2>
- * <ul>
- *     <li>Support time-series based aggregation</li>
- *     <li>Investigate why writing performance becomes slower as records count in table increases</li>
- *     <li>Implement batch insert in JdbcEntityWriterImpl</li>
- *     <li>Implement DDL Management to generate default table schema DDL according entity definition</li>
- * </ul>
- *
- * @since 3/26/15
- */
-package org.apache.eagle.storage.jdbc;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
deleted file mode 100644
index 16cee99..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinition.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.schema;
-
-import org.apache.eagle.log.entity.GenericMetricEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.Qualifier;
-import org.apache.eagle.storage.jdbc.schema.serializer.JdbcSerDeser;
-
-/**
- * @since 3/26/15
- */
-public class JdbcEntityDefinition {
-    private final EntityDefinition internal;
-    public JdbcEntityDefinition(EntityDefinition internal){
-        this.internal = internal;
-    }
-
-    /**
-     *
-     * @return internal entity definition
-     */
-    public EntityDefinition getInternal(){
-        return this.internal;
-    }
-
-    /**
-     * As to GenericMetricEntity, return "${tableName}", else return "${tableName}_${prefix}"
-     *
-     * @return jdbc table name in lowercase
-     */
-    public String getJdbcTableName(){
-        if(this.internal.getService().equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){
-            return this.internal.getTable().toLowerCase();
-        }else {
-            return String.format("%s_%s", this.internal.getTable(),this.internal.getPrefix()).toLowerCase();
-        }
-    }
-
-    public Class<?> getColumnType(String fieldName) throws NoSuchFieldException {
-        return internal.getEntityClass().getField(fieldName).getType();
-    }
-
-    /**
-     *
-     * TODO: Generate table schema DDL according entity definition
-     *
-     * @link https://db.apache.org/ddlutils/
-     *
-     * CREATE TABLE ${prefix}${tableName}{
-     *      prefix prefix;
-     *      encodedRowkey varchar;
-     *      intField1 int;
-     *      longField bitint;
-     *      tag varchar;
-     * } PRIMARY KEY(encodedRowkey);
-     *
-     * CREATE TABLE ${metricTable}{
-     *      encodedRowkey varchar;
-     *      prefix varchar;
-     *      intField1 int;
-     *      longField bitint;
-     *      tag varchar;
-     * } PRIMARY KEY(rowkey,prefix);
-     *
-     * @param tagsFields
-     * @return
-     */
-    @SuppressWarnings("unused")
-    public String getJdbcSchemaDDL(String[] tagsFields){
-        throw new RuntimeException("TODO: not implemented yet");
-    }
-
-    @SuppressWarnings("unchecked")
-    public JdbcSerDeser getJdbcSerDeser(String columnName) {
-        Qualifier qualifier = this.internal.getQualifierNameMap().get(columnName);
-        if(qualifier == null){
-            return JdbcEntityDefinitionManager.DEFAULT_JDBC_SERDESER;
-        }else {
-            return JdbcEntityDefinitionManager.getJdbcSerDeser(qualifier.getSerDeser().getClass());
-        }
-    }
-
-    public boolean isGenericMetric(){
-        return this.internal.getEntityClass().equals(GenericMetricEntity.class);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
deleted file mode 100644
index cfad442..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/JdbcEntityDefinitionManager.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.schema;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntitySerDeser;
-import org.apache.eagle.storage.jdbc.schema.serializer.JdbcSerDeser;
-import org.apache.eagle.storage.jdbc.schema.serializer.DefaultJdbcSerDeser;
-
-import java.sql.Types;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * Manage the basic repository of all entity definitions and JDBC specific metadata
- *
- * @since 3/27/15
- */
-public class JdbcEntityDefinitionManager {
-    private final static Map<Class<? extends TaggedLogAPIEntity>,JdbcEntityDefinition> sqlEntityDefinitionCache = new HashMap<Class<? extends TaggedLogAPIEntity>,JdbcEntityDefinition>();
-
-    public static JdbcEntityDefinition getJdbcEntityDefinition(EntityDefinition entityDefinition){
-        Class<? extends TaggedLogAPIEntity> entityClass = entityDefinition.getEntityClass();
-        JdbcEntityDefinition jdbcEntityDefinition = sqlEntityDefinitionCache.get(entityClass);
-        if(jdbcEntityDefinition == null){
-            jdbcEntityDefinition = new JdbcEntityDefinition(entityDefinition);
-            sqlEntityDefinitionCache.put(entityClass, jdbcEntityDefinition);
-        }
-        return jdbcEntityDefinition;
-    }
-
-    public static void load(){
-        // TODO: 1. load all SQLEntityDefinition on init
-        // TODO: 2. do more initializing works
-    }
-
-    public static DefaultJdbcSerDeser DEFAULT_JDBC_SERDESER = new DefaultJdbcSerDeser();
-    private final static Map<Class<?>,JdbcSerDeser> _columnTypeSerDeserMapping = new HashMap<Class<?>, JdbcSerDeser>();
-
-    /**
-     *
-     * @param serDeser
-     */
-    public static void registerJdbcSerDeser(Class<? extends EntitySerDeser> entitySerDeser,JdbcSerDeser serDeser){
-        if(entitySerDeser == null || serDeser == null){
-            throw new IllegalArgumentException("should not be null");
-        }
-        _columnTypeSerDeserMapping.put(entitySerDeser, serDeser);
-    }
-
-    @SuppressWarnings("unchecked")
-    public static <T> JdbcSerDeser<T> getJdbcSerDeser(Class<?> type){
-        JdbcSerDeser serDeser = _columnTypeSerDeserMapping.get(type);
-        if(serDeser == null) {
-            return DEFAULT_JDBC_SERDESER;
-        }else{
-            return serDeser;
-        }
-    }
-
-
-    private final static Map<Class<?>,Integer> _classJdbcType = new HashMap<Class<?>, Integer>();
-
-    /**
-     * Get corresponding SQL types for certain entity field class type
-     *
-     * @see java.sql.Types
-     *
-     * @param fieldType entity field type class
-     * @return java.sql.Types
-     */
-    public static Integer getJdbcType(Class<?> fieldType) {
-        if(!_classJdbcType.containsKey(fieldType)){
-            throw new IllegalArgumentException("Unable to locate jdbc type for: "+fieldType);
-        }
-        return _classJdbcType.get(fieldType);
-    }
-
-    /**
-     * Register fieldType with SQL types
-     *
-     * @see java.sql.Types
-     *
-     * @param fieldType entity field type class
-     * @param jdbcType java.sql.Types
-     */
-    public static void registerJdbcType(Class<?> fieldType, Integer jdbcType){
-        _classJdbcType.put(fieldType,jdbcType);
-    }
-
-    //================================================
-    // Intially bind basic java types with SQL types
-    //================================================
-    static {
-        registerJdbcType(String.class, Types.VARCHAR);
-        registerJdbcType(Integer.class, Types.INTEGER);
-        registerJdbcType(Double.class, Types.DOUBLE);
-        registerJdbcType(Float.class, Types.FLOAT);
-        registerJdbcType(Long.class, Types.BIGINT);
-
-        registerJdbcType(int.class, Types.INTEGER);
-        registerJdbcType(float.class, Types.FLOAT);
-        registerJdbcType(double.class, Types.DOUBLE);
-        registerJdbcType(long.class, Types.BIGINT);
-        registerJdbcType(short.class, Types.INTEGER);
-        registerJdbcType(char[].class, Types.VARCHAR);
-        registerJdbcType(char.class, Types.CHAR);
-    }
-}
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
deleted file mode 100644
index b732b31..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/schema/ddl/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Manage RDBMS schemas according java entity definition
- *
- * TODO: not implemented yet
- *
- * @since 3/31/15
- */
-package org.apache.eagle.storage.jdbc.schema.ddl;
\ No newline at end of file

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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
deleted file mode 100644
index fffc7b0..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/spi/JdbcStorageServiceProvider.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.spi;
-
-import org.apache.eagle.storage.jdbc.JdbcStorage;
-import org.apache.eagle.storage.spi.DataStorageServiceProvider;
-
-/**
- * @since 3/20/15
- */
-@SuppressWarnings("unused")
-public class JdbcStorageServiceProvider implements DataStorageServiceProvider<JdbcStorage> {
-    private final static String JDBC = "jdbc";
-
-    @Override
-    public String getType() {
-        return JDBC;
-    }
-
-    @Override
-    public JdbcStorage getStorage() {
-        return new JdbcStorage();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
deleted file mode 100644
index 61601a2..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/resources/META-INF/services/org.apache.eagle.storage.spi.DataStorageServiceProvider
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-org.apache.eagle.storage.jdbc.spi.JdbcStorageServiceProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
deleted file mode 100644
index c0ba13c..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/TestJdbcStorage.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc;
-
-import junit.framework.Assert;
-import org.apache.commons.lang.time.StopWatch;
-import org.apache.eagle.common.DateTimeUtil;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.operation.RawQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.UUID;
-
-public class TestJdbcStorage {
-
-    JdbcStorage storage;
-    EntityDefinition entityDefinition;
-    final static Logger LOG = LoggerFactory.getLogger(TestJdbcStorage.class);
-
-    @Before
-    public void setUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
-        storage = (JdbcStorage) DataStorageManager.getDataStorageByEagleConfig();
-        storage.init();
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-    }
-
-    //@Test
-    public void testReadBySimpleQuery() throws QueryCompileException, IOException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime("2014-01-06 01:40:02");
-        rawQuery.setEndTime("2016-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult<TestTimeSeriesAPIEntity> result = storage.query(query, entityDefinition);
-        Assert.assertNotNull(result);
-    }
-
-//    @Test
-    public void testReadByComplexQuery() throws QueryCompileException, IOException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"cluster\" AND @field4 > 1000 AND @field7 CONTAINS \"subtext\" OR @jobID =\"jobID\" ]{@field1,@field2}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2016-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        storage.query(query,entityDefinition);
-    }
-
-    //@Test
-    public void testWrite() throws IOException {
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() > 0);
-    }
-
-    //@Test
-    public void testWriteAndRead() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-            // init read in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime+1));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult queryResult = storage.query(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    //@Test
-    public void testWriteAndAggregation() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-        // init read in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]<@cluster,@datacenter>{count,max(@field1),min(@field2),sum(@field3)}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        QueryResult queryResult = storage.query(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1);
-    }
-
-    //@Test
-    public void testWriteAndDelete() throws IOException, QueryCompileException {
-        // record insert init time
-        long startTime = System.currentTimeMillis();
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-        // record insertion finish time
-        long endTime = System.currentTimeMillis();
-
-        // delete in time range [startTime, endTime)
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[]{*}");
-        rawQuery.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(startTime));
-        rawQuery.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(endTime));
-        rawQuery.setPageSize(1000000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-        ModifyResult<String> queryResult = storage.delete(query, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    //@Test
-    public void testWriteAndUpdate() throws IOException, QueryCompileException {
-        // Write 1000 entities
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 1000){
-            entityList.add(newInstance());
-        }
-        ModifyResult<String> result = storage.create(entityList, entityDefinition);
-        Assert.assertTrue(result.getSize() >= 1000);
-
-        // record insertion finish time
-        ModifyResult<String> queryResult = storage.update(entityList, entityDefinition);
-        Assert.assertTrue(queryResult.getSize() >= 1000);
-    }
-
-    /**
-     * TODO: Investigate why writing performance becomes slower as records count increases
-     *
-     * 1) Wrote 100000 records in about 18820 ms for empty table
-     * 2) Wrote 100000 records in about 35056 ms when 1M records in table
-     *
-     * @throws IOException
-     */
-    //@Test
-    public void testWriterPerformance() throws IOException {
-        StopWatch stopWatch = new StopWatch();
-        stopWatch.start();
-        List<TestTimeSeriesAPIEntity> entityList = new ArrayList<TestTimeSeriesAPIEntity>();
-        int i= 0;
-        while( i++ < 100000){
-            entityList.add(newInstance());
-            if(entityList.size()>=1000) {
-                ModifyResult<String> result = storage.create(entityList, entityDefinition);
-                Assert.assertNotNull(result);
-                entityList.clear();
-            }
-        }
-        stopWatch.stop();
-        LOG.info("Wrote 100000 records in "+stopWatch.getTime()+" ms");
-    }
-
-
-    private TestTimeSeriesAPIEntity newInstance(){
-        TestTimeSeriesAPIEntity instance = new TestTimeSeriesAPIEntity();
-        instance.setField1(123);
-        instance.setField2(234);
-        instance.setField3(1231312312l);
-        instance.setField4(12312312312l);
-        instance.setField5(123123.12312);
-        instance.setField6(-12312312.012);
-        instance.setField7(UUID.randomUUID().toString());
-        instance.setTags(new HashMap<String, String>() {{
-            put("cluster", "c4ut");
-            put("datacenter", "d4ut");
-        }});
-        instance.setTimestamp(System.currentTimeMillis());
-        return instance;
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
deleted file mode 100644
index 78b0210..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/conn/TestConnectionFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.conn;
-
-import junit.framework.Assert;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-/**
- * @since 3/27/15
- */
-public class TestConnectionFactory {
-    final static Logger LOG = LoggerFactory.getLogger(TestConnectionFactory.class);
-
-//    @Test
-    public void testConnection(){
-        try {
-            Connection connection = ConnectionManagerFactory.getInstance().getConnection();
-            Statement statement = connection.createStatement();
-            ResultSet resultSet = statement.executeQuery("select 1");
-            Assert.assertTrue(resultSet.next());
-            Assert.assertEquals(1, resultSet.getInt(1));
-        } catch (SQLException e) {
-            LOG.error(e.getMessage(),e);
-            Assert.fail(e.getMessage());
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
deleted file mode 100644
index a5cb399..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestQueryCriteriaBuilder.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.criteria;
-
-import org.apache.eagle.storage.exception.QueryCompileException;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.criteria.impl.QueryCriteriaBuilder;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.operation.RawQuery;
-import org.apache.torque.criteria.Criteria;
-import org.junit.Before;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @since 3/27/15
- */
-public class TestQueryCriteriaBuilder {
-    private final static Logger LOG = LoggerFactory.getLogger(TestQueryCriteriaBuilder.class);
-
-    @Before
-    public void setUp() throws Exception {
-        ConnectionManagerFactory.getInstance();
-    }
-
-    //@Test
-    public void testSimpleQueryBuilder() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"thecluster\" AND @field4 > 1000 ]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    //@Test
-    public void testSimpleQueryBuilder2() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("TestTimeSeriesAPIEntity[@cluster=\"thecluster\" AND @field4 > 1000 OR @field5 < 10000 ]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    //@Test
-    public void testSimpleMetricQueryBuilder() throws QueryCompileException {
-        RawQuery rawQuery = new RawQuery();
-        rawQuery.setQuery("GenericMetricService[@cluster=\"thecluster\"]{@field1,@field2, EXP{@field3/2}}");
-        rawQuery.setStartTime("2015-01-06 01:40:02");
-        rawQuery.setEndTime("2015-01-06 01:40:02");
-        rawQuery.setMetricName("metric.name.value");
-        rawQuery.setPageSize(1000);
-        CompiledQuery query = new CompiledQuery(rawQuery);
-
-        QueryCriteriaBuilder criteriaBuilder = new QueryCriteriaBuilder(query,"test");
-        Criteria criteria = criteriaBuilder.build();
-        LOG.info(criteria.toString());
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
deleted file mode 100644
index a708aee..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/java/org/apache/eagle/storage/jdbc/criteria/TestTorque.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.criteria;
-
-import org.apache.commons.configuration.BaseConfiguration;
-import org.apache.commons.configuration.Configuration;
-import org.apache.torque.ColumnImpl;
-import org.apache.torque.Torque;
-import org.apache.torque.TorqueException;
-import org.apache.torque.criteria.Criteria;
-import org.apache.torque.criteria.SqlEnum;
-import org.apache.torque.sql.Query;
-import org.apache.torque.sql.SqlBuilder;
-import org.apache.torque.util.BasePeerImpl;
-import org.apache.torque.util.ColumnValues;
-import org.apache.torque.util.JdbcTypedValue;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.sql.*;
-import java.util.UUID;
-
-/**
- * @since 3/27/15
- */
-public class TestTorque {
-    final static Logger LOG = LoggerFactory.getLogger(TestTorque.class);
-
-    //@Before
-    public void setUp() throws TorqueException {
-        Configuration configuration = new BaseConfiguration();
-        configuration.addProperty("torque.database.default","eagle");
-        configuration.addProperty("torque.database.eagle.adapter","mysql");
-        configuration.addProperty("torque.dsfactory.eagle.factory","org.apache.torque.dsfactory.SharedPoolDataSourceFactory");
-
-        configuration.addProperty("torque.dsfactory.eagle.connection.driver","org.gjt.mm.mysql.Driver");
-        configuration.addProperty("torque.dsfactory.eagle.connection.url","jdbc:mysql://localhost:3306/eagle");
-        configuration.addProperty("torque.dsfactory.eagle.connection.user","eagle");
-        configuration.addProperty("torque.dsfactory.eagle.connection.password","eagle");
-
-        Torque.init(configuration);
-    }
-
-    //@Test
-    public void testSelect() throws TorqueException, SQLException {
-        Criteria crit = new Criteria();
-        crit.setDbName("eagle");
-        crit.addSelectColumn(new ColumnImpl("column1"));
-        crit.addSelectColumn(new ColumnImpl("column2"));
-        crit.addSelectColumn(new ColumnImpl("column2/100"));
-
-        crit.where(new ColumnImpl("column1"),SqlEnum.GREATER_EQUAL);
-
-        crit.addFrom("tableName");
-        crit.addAlias("column1", "c1");
-        crit.addGroupByColumn(new ColumnImpl("column1"));
-        crit.addAscendingOrderByColumn(new ColumnImpl("column3"));
-        crit.setLimit(1000);
-
-        Query query = SqlBuilder.buildQuery(crit);
-
-        String sql = query.toString();
-        System.out.println(sql);
-
-        Connection connection = Torque.getConnection();
-        PreparedStatement statement = connection.prepareStatement(sql);
-        statement.setInt(1,1000);
-
-        try {
-            ResultSet result = statement.executeQuery();
-        }catch (SQLException ex){
-            LOG.warn(ex.getMessage(),ex);
-        } finally {
-            connection.close();
-        }
-    }
-
-    //@Test
-    public void testDelete() throws TorqueException, SQLException {
-        Criteria crit = new Criteria();
-        crit.where(new ColumnImpl("unittest_testtsentity", "field1"), 2.0);
-        System.out.println(crit.toString());
-
-        BasePeerImpl basePeer = new BasePeerImpl();
-        basePeer.setDatabaseName("eagle");
-        basePeer.doDelete(crit);
-    }
-
-
-    //@Test
-    public void testInsert() throws TorqueException {
-        BasePeerImpl basePeer = new BasePeerImpl();
-        basePeer.setDatabaseName("eagle");
-        ColumnValues columnValues = new ColumnValues();
-        columnValues.put(new ColumnImpl("unittest_testtsentity","uuid"),new JdbcTypedValue(UUID.randomUUID().toString(),Types.VARCHAR));
-        columnValues.put(new ColumnImpl("unittest_testtsentity","field1"),new JdbcTypedValue(34,Types.INTEGER));
-        basePeer.doInsert(columnValues);
-    }
-
-    @Test
-    public void test() {
-
-    }
-}

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
deleted file mode 100644
index 61a899f..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-eagle {
-	service {
-		storage-type="jdbc"
-		storage-adapter="mysql"
-		storage-username="eagle"
-		storage-password=eagle
-		storage-database=eagle
-		storage-connection-url="jdbc:mysql://localhost:3306/eagle"
-		storage-connection-props="encoding=UTF-8"
-		storage-driver-class="com.mysql.jdbc.Driver"
-		storage-connection-max=8
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
deleted file mode 100644
index 48bc367..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/ddl/unittest_testtsentity.sql
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-SET NAMES utf8;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
---  Table structure for `unittest_testtsentity`
--- ----------------------------
-DROP TABLE IF EXISTS `unittest_testtsentity`;
-CREATE TABLE `unittest_testtsentity` (
-  `uuid` varchar(255) NOT NULL,
-  `field1` int(11) DEFAULT NULL,
-  `field2` int(11) DEFAULT NULL,
-  `field3` bigint(20) DEFAULT NULL,
-  `field4` bigint(20) DEFAULT NULL,
-  `field5` double DEFAULT NULL,
-  `field6` double DEFAULT NULL,
-  `field7` varchar(255) DEFAULT NULL,
-  `cluster` varchar(255) DEFAULT NULL,
-  `datacenter` varchar(255) DEFAULT NULL,
-  `timestamp` bigint(20) DEFAULT NULL,
-  `jobid` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`uuid`),
-  KEY `partition` (`cluster`,`datacenter`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
-SET FOREIGN_KEY_CHECKS = 1;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties b/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
deleted file mode 100644
index d59ded6..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-log4j.rootLogger=INFO, stdout
-
-# standard output
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p [%t] %c{2}[%L]: %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/pom.xml b/eagle-core/eagle-query/pom.xml
deleted file mode 100644
index b6068ee..0000000
--- a/eagle-core/eagle-query/pom.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-core</artifactId>
-		<version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-	<artifactId>eagle-query-parent</artifactId>
-	<packaging>pom</packaging>
-
-	<name>eagle-query-parent</name>
-
-	<modules>
-		<module>eagle-common</module>
-		<module>eagle-antlr</module>
-		<module>eagle-entity-base</module>
-		<module>eagle-audit-base</module>
-		<module>eagle-client-base</module>
-		<module>eagle-service-base</module>
-        <module>eagle-query-base</module>
-        <module>eagle-storage-base</module>
-        <module>eagle-storage-hbase</module>
-        <module>eagle-storage-jdbc</module>
-    </modules>
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-	</properties>
-
-	<dependencies>
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>log4j-over-slf4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.carrotsearch</groupId>
-			<artifactId>junit-benchmarks</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.h2database</groupId>
-			<artifactId>h2</artifactId>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-	<profiles>
-		<profile>
-			<id>dev</id>
-			<properties>
-				<env>dev</env>
-			</properties>
-			<activation>
-				<activeByDefault>true</activeByDefault>
-			</activation>
-		</profile>
-		<profile>
-			<id>test</id>
-			<properties>
-				<env>test</env>
-			</properties>
-		</profile>
-		<profile>
-			<id>prod</id>
-			<properties>
-				<env>prod</env>
-			</properties>
-		</profile>
-	</profiles>
-
-	<build>
-		<finalName>${project.name}-${project.version}</finalName>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>test-jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-		<resources>
-			<resource>
-				<directory>${basedir}/src/main/config/${env}</directory>
-			</resource>
-			<resource>
-				<directory>${basedir}/src/main/resources</directory>
-			</resource>
-		</resources>
-		<testResources>
-			<testResource>
-				<directory>${basedir}/src/test/config/${env}</directory>
-			</testResource>
-			<testResource>
-				<directory>${basedir}/src/test/resources</directory>
-			</testResource>
-		</testResources>
-	</build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/pom.xml b/eagle-core/pom.xml
deleted file mode 100644
index 10b1dfb..0000000
--- a/eagle-core/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-		<groupId>eagle</groupId>
-		<artifactId>eagle-parent</artifactId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-
-    <artifactId>eagle-core</artifactId>
-    <packaging>pom</packaging>
-    <name>eagle core</name>
-    <description>Distributed Real-time Monitoring and Alerting Framework Core</description>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
-    <modules>
-        <module>eagle-data-process</module>
-        <module>eagle-policy</module>
-        <module>eagle-alert</module>
-        <module>eagle-query</module>
-   		<module>eagle-machinelearning</module>
-        <module>eagle-embed</module>
-        <module>eagle-metric</module>
-    </modules>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-docker
----------------------------------------------------------------------
diff --git a/eagle-docker b/eagle-docker
deleted file mode 100755
index f581845..0000000
--- a/eagle-docker
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# NOTICE: This script is developed and maintained by Apache Eagle community under Apache Softwarw Foundation but not from official Docker product or community.
-
-$(dirname $0)/eagle-external/eagle-docker/bin/eagle-docker.sh $@

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/pom.xml b/eagle-examples/eagle-topology-example/pom.xml
deleted file mode 100644
index 8b75d72..0000000
--- a/eagle-examples/eagle-topology-example/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-examples</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-topology-example</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-stream-process-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-query-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <directory>src/resources</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/assembly/eagle-topology-example-assembly.xml</descriptor>
-                    <finalName>eagle-topology-example-${project.version}</finalName>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml b/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
deleted file mode 100644
index 0acf619..0000000
--- a/eagle-examples/eagle-topology-example/src/assembly/eagle-topology-example-assembly.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>assembly</id>
-    <formats>
-        <format>jar</format>
-    </formats>
-    <includeBaseDirectory>false</includeBaseDirectory>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/</outputDirectory>
-            <useProjectArtifact>false</useProjectArtifact>
-            <unpack>true</unpack>
-            <scope>runtime</scope>
-            <unpackOptions>
-                <excludes>
-                    <exclude>**/application.conf</exclude>
-                    <exclude>**/defaults.yaml</exclude>
-                    <exclude>**/storm.yaml</exclude>
-                    <exclude>**/storm.yaml.1</exclude>
-                    <exclude>**/log4j.properties</exclude>
-                </excludes>
-            </unpackOptions>
-            <excludes>
-                <exclude>org.apache.storm:storm-core</exclude>
-                <exclude>org.slf4j:slf4j-api</exclude>
-                <exclude>org.slf4j:log4j-over-slf4j</exclude>
-                <exclude>org.slf4j:slf4j-log4j12</exclude>
-                <exclude>log4j:log4j</exclude>
-                <exclude>asm:asm</exclude>
-                <exclude>org.apache.log4j.wso2:log4j</exclude>
-            </excludes>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>${project.build.outputDirectory}</directory>
-            <outputDirectory>/</outputDirectory>
-            <excludes>
-            	<exclude>application.conf</exclude>
-            	<exclude>log4j.properties</exclude>
-            	<exclude>**/storm.yaml.1</exclude>
-            </excludes>
-        </fileSet>
-    </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
deleted file mode 100644
index a5e39a5..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/notificationplugin/NotificationPluginTestMain.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.eagle.example.notificationplugin;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * Created on 2/16/16.
- */
-public class NotificationPluginTestMain {
-    public static void main(String[] args){
-        System.setProperty("config.resource", "/application-plugintest.conf");
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        env.fromSpout(createProvider(env.getConfig())).withOutputFields(2).nameAs("testSpout").alertWithConsumer("testStream", "testExecutor");
-        env.execute();
-    }
-
-    public static StormSpoutProvider createProvider(Config config) {
-        return new StormSpoutProvider(){
-
-            @Override
-            public BaseRichSpout getSpout(Config context) {
-                return new TestSpout();
-            }
-        };
-    }
-
-    public static class TestSpout extends BaseRichSpout {
-        private static final Logger LOG = LoggerFactory.getLogger(TestSpout.class);
-        private SpoutOutputCollector collector;
-        public TestSpout() {
-        }
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-        }
-
-        @Override
-        public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-            this.collector = collector;
-        }
-
-        @Override
-        public void nextTuple() {
-            Utils.sleep(5000);
-            LOG.info("emitted tuple ...");
-            Map<String, Object> map = new TreeMap<>();
-            map.put("testAttribute", "testValue");
-            collector.emit(new Values("testStream", map));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
deleted file mode 100644
index 58dfe48..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/MetricSerializer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.example.persist;
-
-import org.apache.eagle.dataproc.impl.storm.kafka.SpoutKafkaMessageDeserializer;
-
-/**
- * Created on 1/4/16.
- */
-public class MetricSerializer implements SpoutKafkaMessageDeserializer {
-    @Override
-    public Object deserialize(byte[] arg0) {
-        String logLine = new String(arg0);
-
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
----------------------------------------------------------------------
diff --git a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java b/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
deleted file mode 100644
index 8f105fc..0000000
--- a/eagle-examples/eagle-topology-example/src/main/java/org/apache/eagle/example/persist/PersistTopoTestMain.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.example.persist;
-
-import backtype.storm.spout.SpoutOutputCollector;
-import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.OutputFieldsDeclarer;
-import backtype.storm.topology.base.BaseRichSpout;
-import backtype.storm.tuple.Fields;
-import backtype.storm.tuple.Values;
-import backtype.storm.utils.Utils;
-import com.typesafe.config.Config;
-import org.apache.eagle.dataproc.impl.storm.StormSpoutProvider;
-import org.apache.eagle.datastream.ExecutionEnvironments;
-import org.apache.eagle.datastream.core.StorageType;
-import org.apache.eagle.datastream.core.StreamProducer;
-import org.apache.eagle.datastream.storm.StormExecutionEnvironment;
-import org.apache.eagle.partition.PartitionStrategy;
-
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * Created on 1/4/16.
- *
- * This test demonstrates how user could use the new aggregate and persist feature for case like metrics processing&storage.
- *
- */
-public class PersistTopoTestMain {
-
-    public static void main(String[] args) {
-//        System.setProperty("config.resource", "application.conf");
-        StormExecutionEnvironment env = ExecutionEnvironments.getStorm();
-        StormSpoutProvider provider = createProvider(env.getConfig());
-        execWithDefaultPartition(env, provider);
-    }
-
-    @SuppressWarnings("unchecked")
-    public static void execWithDefaultPartition(StormExecutionEnvironment env, StormSpoutProvider provider) {
-        StreamProducer source = env.fromSpout(provider).withOutputFields(2).nameAs("kafkaMsgConsumer");
-        StreamProducer filter = source;
-
-        // required : persistTestEventStream schema be created in metadata manager
-        // required : policy for aggregateExecutor1 be created in metadata manager
-        StreamProducer aggregate = filter.aggregate(Arrays.asList("persistTestEventStream"), "aggregateExecutor1", new PartitionStrategy() {
-            @Override
-            public int balance(String key, int buckNum) {
-                return 0;
-            }
-        });
-
-        StreamProducer persist = aggregate.persist("persistExecutor1", StorageType.KAFKA());
-
-        env.execute();
-    }
-
-    public static StormSpoutProvider createProvider(Config config) {
-
-        return new StormSpoutProvider(){
-
-            @Override
-            public BaseRichSpout getSpout(Config context) {
-                return new StaticMetricSpout();
-            }
-        };
-    }
-
-    public static class StaticMetricSpout extends BaseRichSpout {
-
-        private long base;
-        private SpoutOutputCollector collector;
-
-        public StaticMetricSpout() {
-            base = System.currentTimeMillis();
-        }
-
-        private Random cpuRandom = new Random();
-        private Random memRandom = new Random();
-        private static final long FULL_MEM_SIZE_BYTES = 512  * 1024 * 1024 * 1024;// 16g memory upbound limit
-
-        @Override
-        public void declareOutputFields(OutputFieldsDeclarer declarer) {
-            declarer.declare(new Fields("timestamp", "host", "cpu", "mem"));
-        }
-
-        @Override
-        public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
-            this.collector = collector;
-        }
-
-        @Override
-        public void nextTuple() {
-            Utils.sleep(100);
-            base = base + 100;// with fix steps..
-            long mem = Double.valueOf(memRandom.nextGaussian() * FULL_MEM_SIZE_BYTES).longValue();
-            collector.emit(new Values(base, "host", cpuRandom.nextInt(100), mem));
-        }
-    }
-
-}


Mime
View raw message