eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [07/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:40 GMT
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
deleted file mode 100755
index 5835738..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateClientImpl.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.query.coprocessor.impl;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.eagle.storage.hbase.query.coprocessor.*;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.client.coprocessor.Batch;
-import org.apache.hadoop.hbase.ipc.BlockingRpcCallback;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Not thread safe
- *
- * @since : 11/2/14,2014
- */
-public class AggregateClientImpl implements AggregateClient {
-	private final static Logger LOG = LoggerFactory.getLogger(AggregateClient.class);
-	private AggregateResultCallback callback;
-
-	private void checkNotNull(Object obj,String name) {
-		if(obj==null) throw new NullPointerException(name+" is null");
-	}
-
-	@Override
-	public AggregateResult aggregate(final HTableInterface table,
-	                                       final EntityDefinition entityDefinition,
-	                                       final Scan scan,
-	                                       final List<String> groupbyFields,
-	                                       final List<AggregateFunctionType> aggregateFuncTypes,
-	                                       final List<String> aggregatedFields,
-	                                       final boolean timeSeries,
-	                                       final long startTime,
-	                                       final long endTime,
-	                                       final long intervalMin) throws IOException {
-		checkNotNull(entityDefinition,"entityDefinition");
-		final List<AggregateFunctionType> _aggregateFuncTypes = convertToCoprocessorAggregateFunc(aggregateFuncTypes);
-		final List<byte[]> _aggregateFuncTypesBytes = AggregateFunctionType.toBytesList(_aggregateFuncTypes);
-//		if(timeSeries) TimeSeriesAggregator.validateTimeRange(startTime,endTime,intervalMin);
-		callback = new AggregateResultCallbackImpl(aggregateFuncTypes);
-		try{
-			if(!LOG.isDebugEnabled()){
-				LOG.info("Going to exec coprocessor: "+AggregateProtocol.class.getSimpleName());
-			}else{
-				LOG.debug("Going to exec coprocessor: "+AggregateProtocol.class.getName());
-			}
-
-//			table.coprocessorExec(AggregateProtocol.class,scan.getStartRow(),scan.getStopRow(),new Batch.Call<AggregateProtocol, AggregateResult>(){
-//				@Override
-//				public AggregateResult call(AggregateProtocol instance) throws IOException {
-//					if(timeSeries){
-//						return instance.aggregate(entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields,startTime,endTime,intervalMin);
-//					}else{
-//						return instance.aggregate(entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields);
-//					}
-//				}
-//			},callback);
-
-          table.coprocessorService(AggregateProtos.AggregateProtocol.class, scan.getStartRow(), scan.getStopRow(), new Batch.Call<AggregateProtos.AggregateProtocol, AggregateProtos.AggregateResult>() {
-              @Override
-              public AggregateProtos.AggregateResult call(AggregateProtos.AggregateProtocol instance) throws IOException {
-                  BlockingRpcCallback<AggregateProtos.AggregateResult> rpcCallback = new BlockingRpcCallback<AggregateProtos.AggregateResult>();
-                  if(timeSeries){
-                      AggregateProtos.TimeSeriesAggregateRequest timeSeriesAggregateRequest = ProtoBufConverter
-                              .toPBTimeSeriesRequest(
-                                      entityDefinition,
-                                      scan,
-                                      groupbyFields,
-                                      _aggregateFuncTypesBytes,
-                                      aggregatedFields,
-                                      startTime,
-                                      endTime,
-                                      intervalMin);
-                      instance.timeseriesAggregate(null, timeSeriesAggregateRequest, rpcCallback);
-                      return rpcCallback.get();
-					}else{
-                      AggregateProtos.AggregateRequest aggregateRequest = ProtoBufConverter.toPBRequest(
-                                      entityDefinition, scan, groupbyFields, _aggregateFuncTypesBytes, aggregatedFields);
-                      instance.aggregate(null, aggregateRequest, rpcCallback);
-                      return rpcCallback.get();
-					}
-              }
-          }, callback);
-		} catch (Throwable t){
-			LOG.error(t.getMessage(),t);
-			throw new IOException(t);
-		}
-		return callback.result();
-	}
-	
-//	@Override
-//	public void result(final GroupbyKeyValueCreationListener[] listeners) {
-//		callback.asyncRead(Arrays.asList(listeners));
-//	}
-
-	@Override
-	public AggregateResult  aggregate(HTableInterface table, EntityDefinition entityDefinition, Scan scan, List<String> groupbyFields, List<AggregateFunctionType> aggregateFuncTypes, List<String> aggregatedFields) throws IOException {
-		return this.aggregate(table,entityDefinition,scan,groupbyFields,aggregateFuncTypes,aggregatedFields,false,0,0,0);
-	}
-
-	/**
-	 *
-	 * <h4>
-	 *   Convert client side funcs to server side funcs, especially for <b>avg</b>
-	 * </h4>
-	 * <ul>
-	 *  <li><b>avg</b>:
-	 *    Coprocessor[ <b>&lt;sum,count&gt;</b>] => Callback[(sum<SUB>1</SUB>+sum<SUB>2</SUB>+...+sum<SUB>n</SUB>)/(count<SUB>1</SUB>+count<SUB>2</SUB>+...+count<SUB>n</SUB>)]
-	 * </li>
-	 * </ul>
-	 * @param funcs List&lt;AggregateFunctionType&gt;
-	 * @return
-	 */
-	private List<AggregateFunctionType> convertToCoprocessorAggregateFunc(List<AggregateFunctionType> funcs){
-		List<AggregateFunctionType> copy = new ArrayList<AggregateFunctionType>(funcs);
-		for(int i=0;i<funcs.size();i++){
-			AggregateFunctionType func = copy.get(i);
-			if(AggregateFunctionType.avg.equals(func)){
-				copy.set(i,AggregateFunctionType.sum);
-			}
-		}
-		return copy;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
deleted file mode 100755
index 2e0248f..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/impl/AggregateResultCallbackImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.query.coprocessor.impl;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResultCallback;
-import org.apache.eagle.storage.hbase.query.coprocessor.ProtoBufConverter;
-import org.apache.eagle.storage.hbase.query.coprocessor.generated.AggregateProtos;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.query.aggregate.raw.*;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since : 11/3/14,2014
- */
-public class AggregateResultCallbackImpl implements AggregateResultCallback {
-	private final static Logger LOG = LoggerFactory.getLogger(AggregateResultCallback.class);
-	private Map<GroupbyKey,List<Function>> groupedFuncs = new HashMap<GroupbyKey, List<Function>>();
-	private List<FunctionFactory> functionFactories = new ArrayList<FunctionFactory>();
-	private int numFuncs = 0;
-	private long kvCounter = 0;
-	private int regionCounter = 0;
-	private long startTimestamp;
-	private long stopTimestamp;
-	
-	// Start RPC call time (i.e constructor initialized time)
-	private final long _start;
-	
-	public AggregateResultCallbackImpl(List<AggregateFunctionType> aggregateFunctionTypes){
-		this.numFuncs = aggregateFunctionTypes.size();
-		for(AggregateFunctionType type: aggregateFunctionTypes){
-			 functionFactories.add(FunctionFactory.locateFunctionFactory(type));
-		}
-		this._start = System.currentTimeMillis();
-	}
-
-//	@Override
-	public void update(byte[] region, byte[] row, AggregateResult result) {
-		AggregateResult _result = result;
-		regionCounter ++;
-		kvCounter += _result.getKeyValues().size();
-		if(this.startTimestamp == 0 || this.startTimestamp > _result.getStartTimestamp()){
-			this.startTimestamp = _result.getStartTimestamp();
-		}
-		if(this.stopTimestamp == 0 || this.stopTimestamp < _result.getStopTimestamp()){
-			this.stopTimestamp = _result.getStopTimestamp();
-		}
-		for(GroupbyKeyValue keyValue:_result.getKeyValues()){
-			update(keyValue);
-		}
-	}
-
-	public void update(GroupbyKeyValue keyValue) {
-		// Incr kvCounter if call #update(GroupbyKeyValue) directly
-		// instead of #update(byte[] region, byte[] row, AggregateResult result)
-		if(this.getKVCounter() == 0) this.kvCounter ++;
-		// Accumulate key value for GroubyKey mapped Functions
-		GroupbyKey groupedKey = keyValue.getKey();
-		List<Function> funcs = groupedFuncs.get(groupedKey);
-		if(funcs==null){
-			funcs = new ArrayList<Function>();
-			for(FunctionFactory functionFactory:this.functionFactories){
-				funcs.add(functionFactory.createFunction());
-			}
-			groupedFuncs.put(groupedKey, funcs);
-		}
-		for(int i=0;i<this.numFuncs;i++){
-			int intCount = 1;
-			byte[] count = keyValue.getValue().getMeta(i).getBytes();
-			if(count != null){
-				intCount = ByteUtil.bytesToInt(count);
-			}
-			funcs.get(i).run(keyValue.getValue().get(i).get(), intCount);
-		}
-	}
-
-	public long getKVCounter(){
-		return this.kvCounter;
-	}
-
-	public long getRegionCounter(){
-		return this.regionCounter;
-	}
-
-	public AggregateResult result(){
-		List<GroupbyKeyValue> mergedKeyValues = new ArrayList<GroupbyKeyValue>();
-		for(Map.Entry<GroupbyKey,List<Function>> entry:this.groupedFuncs.entrySet()){
-			GroupbyValue value = new GroupbyValue(this.numFuncs);
-			for(Function func:entry.getValue()){
-				double _result = func.result();
-				int _count = func.count();
-				value.add(_result);
-				value.addMeta(_count);
-			}
-			mergedKeyValues.add(new GroupbyKeyValue(entry.getKey(),value));
-		}
-		
-		final long _stop = System.currentTimeMillis();
-		if(this.getRegionCounter() > 0) {
-			LOG.info(String.format("result = %d rows, startTime = %d, endTime = %d, source = %d rows, regions = %d, , spend = %d ms", mergedKeyValues.size(),this.startTimestamp,this.stopTimestamp, this.getKVCounter(), this.getRegionCounter(),(_stop - _start)));
-		}else{
-			LOG.info(String.format("result = %d rows, startTime = %d, endTime = %d, source = %d rows, spend = %d ms", mergedKeyValues.size(),this.startTimestamp,this.stopTimestamp,this.getKVCounter(), (_stop - _start)));
-		}
-		AggregateResult result = new AggregateResult();
-		result.setKeyValues(mergedKeyValues);
-		result.setStartTimestamp(this.startTimestamp);
-		result.setStopTimestamp(this.stopTimestamp);
-		return result;
-	}
-
-    @Override
-    public void update(byte[] region, byte[] row, AggregateProtos.AggregateResult result) {
-        try {
-            if(result == null) throw new IllegalStateException(new CoprocessorException("result is null"));
-            this.update(region,row, ProtoBufConverter.fromPBResult(result));
-        } catch (IOException e) {
-            LOG.error("Failed to convert PB-Based message",e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java b/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
deleted file mode 100755
index 7d81872..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/java/org/apache/eagle/storage/hbase/query/coprocessor/package-info.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- *
- * <h1>Eagle Aggregation Coprocessor</h1>
- *
- * <h2>Deployment and Usage</h2>
- * <ol>
- * 	<li>
- *  Firstly deploy jar files to cluster on local file system or HDFS.<br/>
- * 	</li>
- * 	<li>
- * 	Secondly configure in <code>hbase-site.xml</code> as following:
- * 	<pre>&lt;property&gt;
- *   &lt;name>hbase.coprocessor.region.classes&lt;/name&gt;
- *   &lt;value>AggregateProtocolEndPoint&lt;/value&gt;
- * &lt;/property&gt;
- * 	</pre>
- * 	Or register on related hbase tables
- * 	<pre> hbase(main):005:0>  alter 't1', METHOD => 'table_att', 'coprocessor'=>'hdfs:///foo.jar|AggregateProtocolEndPoint|1001|'</pre>
- * 	</li>
- * 	<li>
- * <code>
- * AggregateClient client = new AggregateClientImpl();
- * client.aggregate
- * AggregateResult result = client.result
- * 
- * </code>
- * </li>
- * </ol>
- * 
- * <h2>Performance</h2>
- *
- * <b>NOTE:</b>
- * For single node of HBase, aggregation with coprocessor will be at least double faster than that on single client server,
- * and as HBase scale to more nodes, the aggregation performance will be linear scaled too, while aggregation on
- * client side will be more and more slow limit by computing and memory resource as well as network transmission on single
- * hot server machine.
- *
- * <br />
- * <br />
- * <b>A simple benchmark report for reference</b>
- * <br/>
- * <table border="1">
- *     <thead>
- *         <tr>
- *             <th>Region Servers</th> <th>Record Count</th>
- *             <th>Coprocessor</th><th>No-Coprocessor</th><th>Aggregation</th>
- *         </tr>
- *     </thead>
- *     <tbody>
- *         <tr>
- *             <td rowspan="10">1</td><td rowspan="10">1000,000</td>
- *             <td>10193 ms</td><td>21988 ms</td><td><@cluster,@datacenter>{count}</td>
- *         </tr>
- *         <tr>
- *             <td>10010 ms</td><td>22547 ms</td><td><@cluster,@datacenter>{sum(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10334 ms</td><td>23433 ms</td><td><@cluster,@datacenter>{avg(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10045 ms</td><td>22690 ms</td><td><@cluster,@datacenter>{max(numTotalMaps)}</td>
- *         </tr>
- *         <tr>
- *             <td>10190 ms</td><td>21902 ms</td><td><@cluster,@datacenter>{min(numTotalMaps)}</td>
- *         </tr>
- *     </tbody>
- * </table>
- * <h2>Reference</h2>
- * <a href="https://blogs.apache.org/hbase/entry/coprocessor_introduction">
- * 	Coprocessor Introduction 
- * </a>
- * (Trend Micro Hadoop Group: Mingjie Lai, Eugene Koontz, Andrew Purtell)
- * 
- * <h2>TO-DO</h2>
- * <ol>
- * <li>
- *   TODO: Pass writable self-described entity definition into HBase coprocessor instead of serviceName in String
- *
- *   Because using serviceName to get entity definition will reply on entity API code under eagle-app, so that
- *   when modifying or creating new entities, we have to update coprocessor jar in HBase side
- *   (hchen9@xyz.com)
- * </li>
- * <li>
- * 	 TODO: Using String.format instead substrings addition for long log to avoid recreating string objects
- * </li>
- * </ol>
- *
- * </table>
- * @see eagle.query.aggregate.coprocessor.AggregateClient
- * @see eagle.query.aggregate.coprocessor.AggregateResult
- * @see eagle.query.aggregate.coprocessor.AggregateProtocol
- * 
- * @since   : 11/10/14,2014
- */
-package org.apache.eagle.storage.hbase.query.coprocessor;
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto b/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
deleted file mode 100644
index c3385a1..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/main/protobuf/AggregateProtocol.proto
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Compile: protoc -I ~/Workspace/hbase/hbase-protocol/src/main/protobuf/ -I src/main/protobuf --java_out=src/main/java src/main/protobuf/AggregateProtocol.proto
- */
-option java_package = "org.apache.eagle.storage.hbase.query.coprocessor.generated";
-option java_outer_classname = "AggregateProtos";
-option java_generic_services = true;
-option java_generate_equals_and_hash = true;
-option optimize_for = SPEED;
-
-/**
- * HBase Client.proto
- */
-import "Client.proto";
-
-//
-//message ScanWrapper{
-//    required bytes byte_array = 1;
-//}
-
-message EntityDefinition {
-    required bytes byte_array = 1;
-}
-
-message AggregateResult {
-    required bytes byte_array = 1;
-}
-
-message AggregateRequest {
-    required EntityDefinition entity_definition = 1;
-    required Scan scan = 2;
-    repeated string groupby_fields= 3;
-    repeated bytes aggregate_func_types = 4;
-    repeated string aggregated_fields = 5;
-}
-
-message TimeSeriesAggregateRequest {
-    required EntityDefinition entity_definition = 1;
-    required Scan scan = 2;
-    repeated string groupby_fields= 3;
-    repeated bytes aggregate_func_types = 4;
-    repeated string aggregated_fields = 5;
-    required int64 start_time = 6;
-    required int64 end_time = 7;
-    required int64 interval_min = 8;
-}
-
-service AggregateProtocol {
-    rpc aggregate(AggregateRequest) returns (AggregateResult);
-    rpc timeseriesAggregate(TimeSeriesAggregateRequest) returns (AggregateResult);
-}
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
deleted file mode 100644
index 5572724..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/TestHBaseStatement.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.storage.operation.CreateStatement;
-import junit.framework.Assert;
-
-import org.apache.eagle.storage.operation.QueryStatement;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.service.hbase.TestHBaseBase;
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.operation.RawQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.apache.eagle.common.DateTimeUtil;
-
-/**
- * @since 3/23/15
- */
-public class TestHBaseStatement extends TestHBaseBase {
-
-    EntityDefinition entityDefinition;
-
-    @Before
-    public void setUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        hbase.createTable(entityDefinition.getTable(), entityDefinition.getColumnFamily());
-    }
-
-    @After
-    public void cleanUp() throws IOException, IllegalAccessException, InstantiationException, IllegalDataStorageTypeException {
-        entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-        hbase.deleteTable(entityDefinition.getTable());
-    }
-
-    @Test
-    public void testCreate() throws IllegalDataStorageTypeException, IOException {
-        List<TestTimeSeriesAPIEntity> entities = new ArrayList<TestTimeSeriesAPIEntity>();
-        TestTimeSeriesAPIEntity entity = new TestTimeSeriesAPIEntity();
-        entity.setField1(1);
-        entity.setField2(2);
-        entity.setField3(10000000l);
-        entity.setField4(10000000l);
-        entity.setField5(0.12345678);
-        entity.setTags(new HashMap<String, String>() {{
-            put("cluster", "test");
-            put("datacenter", "test");
-            put("name","unit.test.name");
-        }});
-
-        entities.add(entity);
-
-        CreateStatement createStatement = new CreateStatement(entities,"TestTimeSeriesAPIEntity");
-        ModifyResult resultSet = createStatement.execute(DataStorageManager.newDataStorage("hbase"));
-
-        Assert.assertEquals(1, resultSet.getIdentifiers().size());
-
-        createStatement = new CreateStatement(entities,"TestTimeSeriesAPIEntity");
-        resultSet = createStatement.execute(DataStorageManager.newDataStorage("hbase"));
-
-        Assert.assertEquals(1, resultSet.getIdentifiers().size());
-    }
-
-    @Test
-    public void testQuery() throws IllegalDataStorageTypeException, IOException {
-        testCreate();
-        RawQuery query = new RawQuery();
-        query.setQuery("TestTimeSeriesAPIEntity[@cluster=\"test\" AND @datacenter = \"test\"]{*}");
-        query.setPageSize(Integer.MAX_VALUE);
-        query.setFilterIfMissing(false);
-        query.setStartTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(0));
-        query.setEndTime(DateTimeUtil.millisecondsToHumanDateWithSeconds(System.currentTimeMillis()+25 * 3600 * 1000));
-        QueryStatement queryStatement = new QueryStatement(query);
-        QueryResult<?> entityResult = queryStatement.execute(DataStorageManager.newDataStorage("hbase"));
-        assert entityResult != null;
-    }
-}
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
deleted file mode 100755
index 4e7254e..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestAggregateResultCallback.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.aggregate.coprocessor;
-
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResultCallback;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateResultCallbackImpl;
-import org.apache.eagle.query.aggregate.raw.GroupbyKey;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
-import org.apache.eagle.query.aggregate.raw.GroupbyValue;
-import org.apache.eagle.common.ByteUtil;
-import junit.framework.Assert;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class TestAggregateResultCallback {
-    @Test
-    public void testUpdate(){
-        // -----------------------------------------------------------------------------
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b      |       1.0      2.0        3.0         4.0         5.0      | 3
-        // a,b      |       2        3          6           5           6        | 6
-        // a,b,c    |       3        3          5           5           6        | 5
-        // a,b,c    |       4        5          5           5           7        | 5
-        // -----------------------------------------------------------------------------
-        // a,b      |       2        2          9           1           11       | 9
-        // a,b,c    |       4        3          10          1           13       | 10
-        // -----------------------------------------------------------------------------
-
-        AggregateResultCallback callback = new AggregateResultCallbackImpl(Arrays.asList(
-                        AggregateFunctionType.max,
-                        AggregateFunctionType.min,
-                        AggregateFunctionType.count,
-                        AggregateFunctionType.avg,
-                        AggregateFunctionType.sum));
-        AggregateResult result1 = AggregateResult.build(
-                Arrays.asList(
-                    new String[]{"a","b"},
-                    new String[]{"a","b"},
-                    new String[]{"a","b","c"},
-                    new String[]{"a","b","c"}
-                ),
-                Arrays.asList(
-                    new double[]{1.0,2.0,3.0,4.0,5.0},
-                    new double[]{2.0,3.0,6.0,5.0,6.0},
-                    new double[]{3.0,3.0,5.0,5.0,6.0},
-                    new double[]{4.0,5.0,5.0,5.0,7.0}
-                ),
-                Arrays.asList(3,6,5,5),
-                System.currentTimeMillis(),
-                System.currentTimeMillis()
-        );
-        callback.update(null,null,result1);
-        AggregateResult callbackResult = callback.result();
-        Assert.assertEquals(2,callbackResult.getKeyValues().size());
-
-        // == ROW-#0 ==
-        // Should be:
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b,c    |       4        3          10          1           13       | 10
-        GroupbyKeyValue row0 = callbackResult.getKeyValues().get(0);
-//        Assert.assertEquals("a",new String(row0.getKey().getValue().get(0).copyBytes()));
-//        Assert.assertEquals("b",new String(row0.getKey().getValue().get(1).copyBytes()));
-        Assert.assertEquals(new GroupbyKey(Arrays.asList("a".getBytes(),"b".getBytes(),"c".getBytes())),row0.getKey());
-        Assert.assertEquals(4.0,row0.getValue().get(0).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(0).getBytes()));
-        Assert.assertEquals(3.0, row0.getValue().get(1).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(1).getBytes()));
-        Assert.assertEquals(10.0,row0.getValue().get(2).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(2).getBytes()));
-        Assert.assertEquals(1.0,row0.getValue().get(3).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(3).getBytes()));
-        Assert.assertEquals(13.0,row0.getValue().get(4).get());
-        Assert.assertEquals(10, ByteUtil.bytesToInt(row0.getValue().getMeta(4).getBytes()));
-
-        // == ROW-#1 ==
-        // Should be:
-        // key      |       max      min        count       avg         sum      | count
-        // -----------------------------------------------------------------------------
-        // a,b      |       2        2          9           1           11       | 9
-        GroupbyKeyValue row1 = callbackResult.getKeyValues().get(1);
-        Assert.assertEquals(new GroupbyKey(Arrays.asList("a".getBytes(),"b".getBytes())),row1.getKey());
-        Assert.assertEquals(2.0,row1.getValue().get(0).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(2.0, row1.getValue().get(1).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(9.0,row1.getValue().get(2).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(1.0,row1.getValue().get(3).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-        Assert.assertEquals(11.0,row1.getValue().get(4).get());
-        Assert.assertEquals(9, ByteUtil.bytesToInt(row1.getValue().getMeta(4).getBytes()));
-    }
-
-    @Test
-    public void testAggregateResultTimestamp(){
-        AggregateResult result1 = new AggregateResult();
-        result1.setStartTimestamp(2l);
-        result1.setStopTimestamp(4l);
-        AggregateResult result2 = new AggregateResult();
-        result2.setStartTimestamp(1l);
-        result2.setStopTimestamp(3l);
-        AggregateResultCallback  callback = new AggregateResultCallbackImpl(new ArrayList<AggregateFunctionType>());
-        callback.update(null,null,result1);
-        callback.update(null,null,result2);
-        AggregateResult result3 = callback.result();
-        Assert.assertEquals(1l,result3.getStartTimestamp());
-        Assert.assertEquals(4l,result3.getStopTimestamp());
-    }
-
-    @Test
-    public void testUpdatePerformance(){
-        AggregateResultCallback callback = new AggregateResultCallbackImpl(
-                Arrays.asList(
-                        AggregateFunctionType.max,
-                        AggregateFunctionType.min,
-                        AggregateFunctionType.count,
-                        AggregateFunctionType.avg));
-
-        for(int i=0;i<1000000;i++) {
-            AggregateResult result1 = new AggregateResult();
-            result1.setStartTimestamp(System.currentTimeMillis());
-            List<GroupbyKeyValue> keyValues = new ArrayList<GroupbyKeyValue>();
-
-            // <a,b> - <1*3, 2*3, 3*3, 4*3>
-            GroupbyKey key = new GroupbyKey();
-            key.addValue("a".getBytes());
-            key.addValue("b".getBytes());
-            GroupbyValue value = new GroupbyValue();
-            value.add(1.0);
-            value.add(2.0);
-            value.add(3.0);
-            value.add(4.0);
-            value.addMeta(3);
-            value.addMeta(3);
-            value.addMeta(3);
-            value.addMeta(3);
-            keyValues.add(new GroupbyKeyValue(key, value));
-
-            // <a,b> - <1*3, 2*3, 3*3, 4*3>
-            GroupbyKey key2 = new GroupbyKey();
-            key2.addValue("a".getBytes());
-            key2.addValue("b".getBytes());
-            GroupbyValue value2 = new GroupbyValue();
-            value2.add(2.0);
-            value2.add(3.0);
-            value2.add(4.0);
-            value2.add(5.0);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            value2.addMeta(2);
-            keyValues.add(new GroupbyKeyValue(key2, value2));
-            result1.setKeyValues(keyValues);
-            result1.setStopTimestamp(System.currentTimeMillis());
-            callback.update(null, null, result1);
-        }
-        AggregateResult result2 = callback.result();
-        Assert.assertNotNull(result2);
-        Assert.assertTrue(result2.getStopTimestamp() > result2.getStartTimestamp());
-        Assert.assertTrue(result2.getStartTimestamp() > 0);
-        Assert.assertTrue(result2.getStopTimestamp() > 0);
-    }
-}

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
deleted file mode 100755
index d0197fb..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/aggregate/coprocessor/TestGroupAggregateTimeSeriesClient.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.aggregate.coprocessor;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import junit.framework.Assert;
-
-import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.junit.Before;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.log.entity.GenericEntityWriter;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.test.TestTimeSeriesAPIEntity;
-import org.apache.eagle.query.ListQueryCompiler;
-import org.apache.eagle.query.aggregate.AggregateFunctionType;
-import org.apache.eagle.query.aggregate.raw.GroupbyKey;
-import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
-import org.apache.eagle.query.aggregate.raw.GroupbyValue;
-import org.apache.eagle.service.hbase.TestHBaseBase;
-import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
-
-/**
- * @since : 11/10/14,2014
- */
-public class TestGroupAggregateTimeSeriesClient extends TestHBaseBase {
-
-	private final static Logger LOG = LoggerFactory.getLogger(TestGroupAggregateTimeSeriesClient.class);
-
-	HTableInterface table;
-	long startTime;
-	long endTime;
-	List<String> rowkeys;
-	AggregateClient client;
-	Scan scan;
-	EntityDefinition ed;
-
-	@Before
-	public void setUp() throws IllegalAccessException, InstantiationException {
-		ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-		hbase.createTable("unittest", "f");
-		table = EagleConfigFactory.load().getHTable("unittest");
-		startTime = System.currentTimeMillis();
-		try {
-			rowkeys = prepareData(1000);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-		endTime = System.currentTimeMillis();
-
-		client = new AggregateClientImpl();
-		scan = new Scan();
-		ListQueryCompiler compiler = null;
-		try {
-			compiler = new ListQueryCompiler("TestTimeSeriesAPIEntity[@cluster=\"test4UT\" and @datacenter = \"dc1\"]{@field1,@field2}");
-		} catch (Exception e) {
-			Assert.fail(e.getMessage());
-		}
-		scan.setFilter(compiler.filter());
-//		scan.setStartRow(EagleBase64Wrapper.decode(rowkeys.get(0)));
-//		scan.setStopRow(EagleBase64Wrapper.decode(rowkeys.get(rowkeys.size()-1)));
-	}
-
-	private List<String> prepareData(int count) throws Exception {
-		List<TestTimeSeriesAPIEntity> list = new ArrayList<TestTimeSeriesAPIEntity>();
-
-		if (ed == null) {
-			EntityDefinitionManager.registerEntity(TestTimeSeriesAPIEntity.class);
-			ed = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class);
-		}
-
-		for(int i=0;i<count;i++){
-			TestTimeSeriesAPIEntity e = new TestTimeSeriesAPIEntity();
-			e.setTimestamp(System.currentTimeMillis());
-			e.setField1(1);
-			e.setField2(2);
-			e.setField3(3);
-			e.setField4(4L);
-			e.setField5(5.0);
-			e.setField6(5.0);
-			e.setField7("7");
-			e.setTags(new HashMap<String, String>());
-			e.getTags().put("cluster", "test4UT");
-			e.getTags().put("datacenter", "dc1");
-			e.getTags().put("index", ""+i);
-			e.getTags().put("jobId", "job_"+System.currentTimeMillis());
-			list.add(e);
-		}
-
-		GenericEntityWriter writer = new GenericEntityWriter(ed.getService());
-		List<String> result = writer.write(list);
-		return result;
-	}
-
-
-	//@Test
-	public void testGroupTimeSeriesAggCountClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.count),Arrays.asList("count"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("COUNT");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMaxClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.max),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MAX");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMinClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.min),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MIN");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggAvgClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.min),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MIN");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggSumClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan, Arrays.asList("cluster","datacenter"),Arrays.asList(AggregateFunctionType.sum),Arrays.asList("field2"),true,startTime,System.currentTimeMillis(),10).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("SUM");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	//@Test
-	public void testGroupTimeSeriesAggMultipleClient(){
-		try {
-			List<GroupbyKeyValue> result = client.aggregate(table,ed,scan,
-					Arrays.asList("cluster","datacenter"),
-					Arrays.asList(AggregateFunctionType.max,AggregateFunctionType.min,AggregateFunctionType.avg,AggregateFunctionType.sum,AggregateFunctionType.count),
-					Arrays.asList("field2","field2","field2","field2","field2"),true,startTime,System.currentTimeMillis(),16).getKeyValues();
-			if(LOG.isDebugEnabled()) LOG.debug("MUTILPLE");
-			logGroupbyKeyValue(result);
-			Assert.assertNotNull(result);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		}
-	}
-
-	private void logGroupbyKeyValue(List<GroupbyKeyValue> keyValues){
-		for(GroupbyKeyValue keyValue:keyValues){
-			GroupbyKey key = keyValue.getKey();
-			List<String> keys = new ArrayList<String>();
-			for(BytesWritable bytes:key.getValue()){
-				keys.add(new String(bytes.copyBytes()));
-			}
-			List<Double> vals = new ArrayList<Double>();
-			GroupbyValue val = keyValue.getValue();
-			for(DoubleWritable dw:val.getValue()){
-				vals.add(dw.get());
-			}
-			if(LOG.isDebugEnabled()) LOG.debug("KEY: " + keys + ", VALUE: " + vals);
-		}
-	}
-}

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java b/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
deleted file mode 100644
index bd54c1c..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/java/org/apache/eagle/storage/hbase/spi/TestHBaseStorageLoader.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.hbase.spi;
-
-import org.apache.eagle.storage.DataStorageManager;
-import org.apache.eagle.storage.exception.IllegalDataStorageTypeException;
-import org.apache.eagle.storage.hbase.HBaseStorage;
-import junit.framework.Assert;
-import org.junit.Test;
-
-/**
- * @since 3/20/15
- */
-public class TestHBaseStorageLoader {
-    @Test
-    public void testHBaseStorageLoader() {
-        try {
-            assert DataStorageManager.getDataStorageByEagleConfig() instanceof HBaseStorage;
-        } catch (IllegalDataStorageTypeException e) {
-            Assert.fail(e.getMessage());
-        }
-
-        try {
-            assert DataStorageManager.newDataStorage("hbase") instanceof HBaseStorage;
-        } catch (IllegalDataStorageTypeException e) {
-            Assert.fail(e.getMessage());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf b/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
deleted file mode 100644
index 25257c5..0000000
--- a/eagle-core/eagle-query/eagle-storage-hbase/src/test/resources/application.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-eagle{
-	service{
-		env="dev"
-		host="localhost"
-		port=8080
-		storage-type="hbase"
-		table-name-prefixed-with-environment=false
-		coprocessor-enabled=false
-		hbase-zookeeper-quorum="localhost"
-		hbase-zookeeper-property-clientPort=2181
-		zookeeper-znode-parent="/hbase-unsecure"
-	}
-}
\ No newline at end of file

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

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml b/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
deleted file mode 100644
index c3b48be..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>eagle-query-parent</artifactId>
-        <groupId>eagle</groupId>
-        <version>0.3.0</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>eagle-storage-jdbc</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>eagle</groupId>
-            <artifactId>eagle-storage-base</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.ddlutils</groupId>
-            <artifactId>ddlutils</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.torque</groupId>
-            <artifactId>torque-runtime</artifactId>
-        </dependency>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
deleted file mode 100644
index 7fb4dbd..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc;
-
-/**
- * Jdbc Storage Constants
- */
-public class JdbcConstants {
-    // Eagle JDBC Schema
-    public static final String TIMESTAMP_COLUMN_NAME = "timestamp";
-    public static final String METRIC_NAME_COLUMN_NAME = "metric";
-    public static final String ROW_KEY_COLUMN_NAME = "uuid";
-
-    // Eagle JDBC Storage Configuration
-    public final static String EAGLE_DB_USERNAME = "eagle.service.storage-username";
-    public final static String EAGLE_DB_PASSWORD = "eagle.service.storage-password";
-    public final static String EAGLE_CONN_URL= "eagle.service.storage-connection-url";
-    public final static String EAGLE_CONN_PROPS= "eagle.service.storage-connection-props";
-    public final static String EAGLE_ADAPTER= "eagle.service.storage-adapter";
-    public final static String EAGLE_DATABASE= "eagle.service.storage-database";
-    public final static String EAGLE_DRIVER_CLASS= "eagle.service.storage-driver-class";
-    public final static String EAGLE_CONN_MAX_SIZE= "eagle.service.storage-connection-max";
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
deleted file mode 100644
index 66b3c5a..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/JdbcStorage.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.storage.DataStorageBase;
-import org.apache.eagle.storage.jdbc.conn.ConnectionManagerFactory;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityDeleter;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityReader;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityDeleterImpl;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityReaderImpl;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityUpdater;
-import org.apache.eagle.storage.jdbc.entity.JdbcEntityWriter;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityUpdaterImpl;
-import org.apache.eagle.storage.jdbc.entity.impl.JdbcEntityWriterImpl;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinition;
-import org.apache.eagle.storage.jdbc.schema.JdbcEntityDefinitionManager;
-import org.apache.eagle.storage.operation.CompiledQuery;
-import org.apache.eagle.storage.result.ModifyResult;
-import org.apache.eagle.storage.result.QueryResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @since 3/18/15
- */
-@SuppressWarnings("unchecked")
-public class JdbcStorage extends DataStorageBase {
-    private final static Logger LOG = LoggerFactory.getLogger(JdbcStorage.class);
-
-    @Override
-    public void init() throws IOException {
-        try {
-            JdbcEntityDefinitionManager.load();
-            ConnectionManagerFactory.getInstance();
-        } catch (Exception e) {
-            LOG.error("Failed to initialize connection manager",e);
-            throw new IOException(e);
-        }
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> update(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityUpdater updater = new JdbcEntityUpdaterImpl(jdbcEntityDefinition);
-            int updated = updater.update(entities);
-            result.setSize(updated);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> create(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityWriter writer = new JdbcEntityWriterImpl(jdbcEntityDefinition);
-            List<String> keys = writer.write(entities);
-            result.setIdentifiers(keys);
-            result.setSize(keys.size());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E extends TaggedLogAPIEntity> ModifyResult<String> delete(List<E> entities, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.delete(entities);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public ModifyResult<String> deleteByID(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.deleteByIds(ids);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public ModifyResult<String> delete(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        ModifyResult<String> result = new ModifyResult<String>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityDeleter writer = new JdbcEntityDeleterImpl(jdbcEntityDefinition);
-            int num = writer.deleteByQuery(query);
-            result.setSize(num);
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public <E extends Object> QueryResult<E> query(CompiledQuery query, EntityDefinition entityDefinition) throws IOException {
-        QueryResult<E> result = new QueryResult<E>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityReader reader = new JdbcEntityReaderImpl(jdbcEntityDefinition);
-            List<E> entities = reader.query(query);
-            result.setData(entities);
-            if(entities!=null) {
-                result.setSize(entities.size());
-            }else{
-                result.setSize(0);
-            }
-            if(query.isHasAgg()){
-                result.setEntityType((Class<E>) Map.class);
-            }else {
-                result.setEntityType((Class<E>) entityDefinition.getEntityClass());
-            }
-            result.setFirstTimestamp(reader.getResultFirstTimestamp());
-            result.setLastTimestamp(reader.getResultLastTimestamp());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public <E> QueryResult<E> queryById(List<String> ids, EntityDefinition entityDefinition) throws IOException {
-        QueryResult<E> result = new QueryResult<E>();
-        try {
-            JdbcEntityDefinition jdbcEntityDefinition =  JdbcEntityDefinitionManager.getJdbcEntityDefinition(entityDefinition);
-            JdbcEntityReader reader = new JdbcEntityReaderImpl(jdbcEntityDefinition);
-            List<E> entities = reader.query(ids);
-            result.setData(entities);
-            if(entities!=null) {
-                result.setSize(entities.size());
-            }else{
-                result.setSize(0);
-            }
-            result.setEntityType((Class<E>) entityDefinition.getEntityClass());
-            result.setFirstTimestamp(reader.getResultFirstTimestamp());
-            result.setLastTimestamp(reader.getResultLastTimestamp());
-            result.setSuccess(true);
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            result.setSuccess(false);
-            throw new IOException(e);
-        }
-        return result;
-    }
-
-    @Override
-    public void close() throws IOException {
-        try {
-            ConnectionManagerFactory.getInstance().shutdown();
-        } catch (Exception e) {
-            throw new IOException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java b/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
deleted file mode 100644
index d1f7dbf..0000000
--- a/eagle-core/eagle-query/eagle-storage-jdbc/src/main/java/org/apache/eagle/storage/jdbc/conn/ConnectionConfig.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.storage.jdbc.conn;
-
-/**
- * @since 3/26/15
- */
-public class ConnectionConfig {
-    public String getAdapter() {
-        return adapter;
-    }
-
-    public void setAdapter(String adapter) {
-        this.adapter = adapter;
-    }
-
-    private String adapter;
-
-    public String getDatabaseName() {
-        return databaseName;
-    }
-
-    public void setDatabaseName(String databaseName) {
-        this.databaseName = databaseName;
-    }
-
-    private String databaseName;
-    private String driverClassName;
-    private String connectionUrl;
-    private String userName;
-    private String password;
-    private String connectionProperties;
-
-    /**
-     * Max active connections number
-     */
-    private int connectionMaxActive = 8;
-
-    public int getConnectionMaxActive() {
-        return connectionMaxActive;
-    }
-
-    public void setConnectionMaxActive(int connectionMaxActive) {
-        this.connectionMaxActive = connectionMaxActive;
-    }
-
-    public String getConnectionProperties() {
-        return connectionProperties;
-    }
-
-    public void setConnectionProperties(String connectionProperties) {
-        this.connectionProperties = connectionProperties;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public String getDriverClassName() {
-        return driverClassName;
-    }
-
-    public void setDriverClassName(String driverClassName) {
-        this.driverClassName = driverClassName;
-    }
-
-    public String getConnectionUrl() {
-        return connectionUrl;
-    }
-
-    public void setConnectionUrl(String connectionUrl) {
-        this.connectionUrl = connectionUrl;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-    public void setUserName(String userName) {
-        this.userName = userName;
-    }
-}



Mime
View raw message