eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [22/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:55 GMT
http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
deleted file mode 100644
index 6ffa621..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericCreateAPIResponseEntity.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success", "exception", "encodedRowkeys"})
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class GenericCreateAPIResponseEntity{
-	private boolean success;
-	private String exception;
-	private List<String> encodedRowkeys;
-	
-	public List<String> getEncodedRowkeys() {
-		return encodedRowkeys;
-	}
-	public void setEncodedRowkeys(List<String> encodedRowkeys) {
-		this.encodedRowkeys = encodedRowkeys;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
deleted file mode 100755
index 9c42ab2..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityBatchReader.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityBatchReader implements EntityCreationListener{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityBatchReader.class);
-	
-	private List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-	private StreamReader reader;
-	
-	public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		reader = new GenericEntityStreamReader(serviceName, condition);
-		reader.register(this);
-	}
-	
-	public GenericEntityBatchReader(StreamReader reader) throws InstantiationException, IllegalAccessException{
-		this.reader = reader;
-		reader.register(this);
-	}
-	
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-	public long getFirstTimestamp(){ return reader.getFirstTimestamp();}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity){
-		entities.add(entity);
-	}
-	
-	@SuppressWarnings("unchecked")
-	public <T> List<T> read() throws Exception{
-		if(LOG.isDebugEnabled()) LOG.debug("Start reading as batch mode");
-		reader.readAsStream();
-		return (List<T>)entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
deleted file mode 100755
index 3f97e78..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityScanStreamReader.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityConstants;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.Date;
-
-public class GenericEntityScanStreamReader extends StreamReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityScanStreamReader.class);
-	
-	private EntityDefinition entityDef;
-	private SearchCondition condition;
-	private String prefix;
-	private long lastTimestamp = 0;
-	private long firstTimestamp = 0;
-	
-	public GenericEntityScanStreamReader(String serviceName, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(serviceName, "serviceName");
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-	}
-
-	public GenericEntityScanStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(entityDef, "entityDef");
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-	}
-	
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-	
-	private void checkNotNull(Object o, String message){
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-
-	public EntityDefinition getEntityDefinition() {
-		return entityDef;
-	}
-
-	public SearchCondition getSearchCondition() {
-		return condition;
-	}
-
-	@Override
-	public void readAsStream() throws Exception{
-		Date start = null;
-		Date end = null;
-		// shortcut to avoid read when pageSize=0
-		if(condition.getPageSize() <= 0){
-			return; // return nothing
-		}
-		// Process the time range if needed
-		if(entityDef.isTimeSeries()){
-			start = DateTimeUtil.humanDateToDate(condition.getStartTime());
-			end = DateTimeUtil.humanDateToDate(condition.getEndTime());
-		}else{
-			start = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_START_HUMANTIME);
-			end = DateTimeUtil.humanDateToDate(EntityConstants.FIXED_READ_END_HUMANTIME);
-		}
-		byte[][] outputQualifiers = null;
-		if(!condition.isOutputAll()) {
-			// Generate the output qualifiers
-			outputQualifiers = HBaseInternalLogHelper.getOutputQualifiers(entityDef, condition.getOutputFields());
-		}
-		HBaseLogReader2 reader = new HBaseLogReader2(entityDef, condition.getPartitionValues(), start, end, condition.getFilter(), condition.getStartRowkey(), outputQualifiers, this.prefix);
-		try{
-			reader.open();
-			InternalLog log;
-			int count = 0;
-			while ((log = reader.read()) != null) {
-				TaggedLogAPIEntity entity = HBaseInternalLogHelper.buildEntity(log, entityDef);
-				if (lastTimestamp < entity.getTimestamp()) {
-					lastTimestamp = entity.getTimestamp();
-				}
-				if(firstTimestamp > entity.getTimestamp() || firstTimestamp == 0){
-					firstTimestamp = entity.getTimestamp();
-				}
-
-				entity.setSerializeVerbose(condition.isOutputVerbose());
-				entity.setSerializeAlias(condition.getOutputAlias());
-
-				for(EntityCreationListener l : _listeners){
-					l.entityCreated(entity);
-				}
-				if(++count == condition.getPageSize())
-					break;
-			}
-		}catch(IOException ioe){
-			LOG.error("Fail reading log", ioe);
-			throw ioe;
-		}finally{
-			reader.close();
-		}		
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return this.firstTimestamp;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
deleted file mode 100755
index c3d916e..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReader.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.entity.index.NonClusteredIndexStreamReader;
-import org.apache.eagle.log.entity.index.UniqueIndexStreamReader;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.log.entity.meta.IndexDefinition;
-import org.apache.eagle.query.parser.ORExpression;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityStreamReader extends StreamReader {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityStreamReader.class);
-	
-	private EntityDefinition entityDef;
-	private SearchCondition condition;
-	private String prefix;
-	private StreamReader readerAfterPlan;
-
-	public GenericEntityStreamReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		this(serviceName, condition, null);
-	}
-
-	public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition) throws InstantiationException, IllegalAccessException{
-		this(entityDef, condition, entityDef.getPrefix());
-	}
-	
-	public GenericEntityStreamReader(String serviceName, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(serviceName, "serviceName");
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-		this.readerAfterPlan = selectQueryReader();
-	}
-
-	public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{
-		this.prefix = prefix;
-		checkNotNull(entityDef, "entityDef");
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "EntityDefinition");
-		this.condition = condition;
-		this.readerAfterPlan = selectQueryReader();
-	}
-
-	private void checkNotNull(Object o, String message){
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-	
-	public EntityDefinition getEntityDefinition() {
-		return entityDef;
-	}
-	
-	public SearchCondition getSearchCondition() {
-		return condition;
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		readerAfterPlan._listeners.addAll(this._listeners);
-		readerAfterPlan.readAsStream();
-	}
-	
-	private StreamReader selectQueryReader() throws InstantiationException, IllegalAccessException {
-		final ORExpression query = condition.getQueryExpression();
-		IndexDefinition[] indexDefs = entityDef.getIndexes();
-
-        // Index just works with query condition
-		if (indexDefs != null && condition.getQueryExpression()!=null) {
-			List<byte[]> rowkeys = new ArrayList<>();
-			for (IndexDefinition index : indexDefs) {
-				// Check unique index first
-				if (index.isUnique()) {
-					final IndexDefinition.IndexType type = index.canGoThroughIndex(query, rowkeys);
-					if (!IndexDefinition.IndexType.NON_INDEX.equals(type)) {
-						LOG.info("Selectd query unique index " + index.getIndexName() + " for query: " + condition.getQueryExpression());
-						return new UniqueIndexStreamReader(index, condition, rowkeys);
-					}
-				}
-			}
-			for (IndexDefinition index : indexDefs) {
-				// Check non-clustered index
-				if (!index.isUnique()) {
-					final IndexDefinition.IndexType type = index.canGoThroughIndex(query, rowkeys);
-					if (!IndexDefinition.IndexType.NON_INDEX.equals(type)) {
-						LOG.info("Selectd query non clustered index " + index.getIndexName() + " for query: " + condition.getQueryExpression().toString());
-						return new NonClusteredIndexStreamReader(index, condition, rowkeys);
-					}
-				}
-			}
-		}
-		return new GenericEntityScanStreamReader(entityDef, condition, this.prefix);
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return readerAfterPlan.getLastTimestamp();
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return readerAfterPlan.getFirstTimestamp();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
deleted file mode 100755
index 1946d6c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityStreamReaderMT.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-/**
- * multi-threading stream readers which only applies to time-series entity where we split the query into
- * different time range
- * 
- * When this class is used together with list query or aggregate query, be aware that the query's behavior could
- * be changed for example pageSize does not work well, output sequence is not determined
- */
-public class GenericEntityStreamReaderMT extends StreamReader{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityStreamReaderMT.class);
-	private List<GenericEntityStreamReader> readers = new ArrayList<GenericEntityStreamReader>(); 
-	
-	public GenericEntityStreamReaderMT(String serviceName, SearchCondition condition, int numThreads) throws Exception{
-		checkIsTimeSeries(serviceName);
-		checkNumThreads(numThreads);
-		long queryStartTime = DateTimeUtil.humanDateToSeconds(condition.getStartTime())*1000;
-		long queryEndTime = DateTimeUtil.humanDateToSeconds(condition.getEndTime())*1000;
-		long subStartTime = queryStartTime;
-		long subEndTime = 0;
-		long interval = (queryEndTime-queryStartTime) / numThreads;
-		for(int i=0; i<numThreads; i++){
-			// split search condition by time range
-			subStartTime = queryStartTime + i*interval;
-			if(i == numThreads-1){
-				subEndTime = queryEndTime;
-			}else{
-				subEndTime = subStartTime + interval;
-			}
-			String strStartTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(subStartTime);
-			String strEndTime = DateTimeUtil.millisecondsToHumanDateWithSeconds(subEndTime);
-			SearchCondition sc = new SearchCondition(condition);
-			sc.setStartTime(strStartTime);
-			sc.setEndTime(strEndTime);
-			GenericEntityStreamReader reader = new GenericEntityStreamReader(serviceName, sc);
-			readers.add(reader);
-		}
-	}
-	
-	private void checkIsTimeSeries(String serviceName) throws Exception{
-		EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		if(!ed.isTimeSeries()){
-			throw new IllegalArgumentException("Multi-threading stream reader must be applied to time series table");
-		}
-	}
-	
-	private void checkNumThreads(int numThreads){
-		if(numThreads <= 0){
-			throw new IllegalArgumentException("Multi-threading stream reader must have numThreads >= 1");
-		}
-	}
-	
-	/**
-	 * default to 2 threads
-	 * @param serviceName
-	 * @param condition
-	 */
-	public GenericEntityStreamReaderMT(String serviceName, SearchCondition condition) throws Exception{
-		this(serviceName, condition, 2);
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		// populate listeners to all readers
-		for(EntityCreationListener l : _listeners){
-			for(GenericEntityStreamReader r : readers){
-				r.register(l);
-			}
-		}
-
-		List<Future<Void>> futures = new ArrayList<Future<Void>>();
-		for(GenericEntityStreamReader r : readers){
-			SingleReader reader = new SingleReader(r);
-			Future<Void> readFuture = EagleConfigFactory.load().getExecutor().submit(reader);
-			futures.add(readFuture);
-		}
-		
-		// join threads and check exceptions
-		for(Future<Void> future : futures){
-			try{
-				future.get();
-			}catch(Exception ex){
-				LOG.error("Error in read", ex);
-				throw ex;
-			}
-		}
-	}
-	
-	private static class SingleReader implements Callable<Void>{
-		private GenericEntityStreamReader reader;
-		public SingleReader(GenericEntityStreamReader reader){
-			this.reader = reader;
-		}
-		@Override
-		public Void call() throws Exception{
-			reader.readAsStream();
-			return null;
-		}
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		long lastTimestamp = 0;
-		for (GenericEntityStreamReader reader : readers) {
-			if (lastTimestamp < reader.getLastTimestamp()) {
-				lastTimestamp = reader.getLastTimestamp();
-			}
-		}
-		return lastTimestamp;
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		long firstTimestamp = 0;
-		for (GenericEntityStreamReader reader : readers) {
-			if (firstTimestamp > reader.getLastTimestamp() || firstTimestamp == 0) {
-				firstTimestamp = reader.getLastTimestamp();
-			}
-		}
-		return firstTimestamp;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
deleted file mode 100755
index 5c8b12d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericEntityWriter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericEntityWriter {
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityWriter.class);
-	private EntityDefinition entityDef;
-
-	public GenericEntityWriter(String serviceName) throws InstantiationException, IllegalAccessException{
-		this.entityDef = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkNotNull(entityDef, "serviceName");
-	}
-
-	public GenericEntityWriter(EntityDefinition entityDef) throws InstantiationException, IllegalAccessException{
-		this.entityDef = entityDef;
-		checkNotNull(entityDef, "serviceName");
-	}
-	
-	private void checkNotNull(Object o, String message) {
-		if(o == null){
-			throw new IllegalArgumentException(message + " should not be null");
-		}
-	}
-
-	/**
-	 * @param entities
-	 * @return row keys
-	 * @throws Exception
-	 */
-	public List<String> write(List<? extends TaggedLogAPIEntity> entities) throws Exception{
-		HBaseLogWriter writer = new HBaseLogWriter(entityDef.getTable(), entityDef.getColumnFamily());
-		List<String> rowkeys = new ArrayList<String>(entities.size());
-		List<InternalLog> logs = new ArrayList<InternalLog>(entities.size());
-		
-		try{
-			writer.open();
-			for(TaggedLogAPIEntity entity : entities){
-				final InternalLog entityLog = HBaseInternalLogHelper.convertToInternalLog(entity, entityDef);
-				logs.add(entityLog);
-			}
-			List<byte[]> bRowkeys  = writer.write(logs);
-			for (byte[] rowkey : bRowkeys) {
-				rowkeys.add(EagleBase64Wrapper.encodeByteArray2URLSafeString(rowkey));
-			}
-
-		}catch(Exception ex){
-			LOG.error("fail writing tagged log", ex);
-			throw ex;
-		}finally{
-			writer.close();
-	 	}
-		return rowkeys;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
deleted file mode 100755
index a9a8c75..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntity.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.ServicePath;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.entity.meta.Metric;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-/**
- * GenericMetricEntity should use prefix field which is extended from TaggedLogAPIEntity as metric name
- * metric name is used to partition the metric tables
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagle_metric")
-@ColumnFamily("f")
-@Prefix(GenericMetricEntity.GENERIC_METRIC_PREFIX_PLACE_HOLDER)
-@Service(GenericMetricEntity.GENERIC_METRIC_SERVICE)
-@TimeSeries(true)
-@Metric(interval=60000)
-@ServicePath(path = "/metric")
-public class GenericMetricEntity extends TaggedLogAPIEntity {
-	public static final String GENERIC_METRIC_SERVICE = "GenericMetricService";
-	public static final String GENERIC_METRIC_PREFIX_PLACE_HOLDER = "GENERIC_METRIC_PREFIX_PLACEHODLER";
-	public static final String VALUE_FIELD ="value";
-
-	@Column("a")
-	private double[] value;
-
-	public double[] getValue() {
-		return value;
-	}
-
-	public void setValue(double[] value) {
-		this.value = value;
-		_pcs.firePropertyChange("value", null, null);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
deleted file mode 100755
index 84b02ae..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityBatchReader.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GenericMetricEntityBatchReader  implements EntityCreationListener{
-	private static final Logger LOG = LoggerFactory.getLogger(GenericEntityBatchReader.class);
-	
-	private List<TaggedLogAPIEntity> entities = new ArrayList<TaggedLogAPIEntity>();
-	private GenericEntityStreamReader reader;
-	
-	public GenericMetricEntityBatchReader(String metricName, SearchCondition condition) throws Exception{
-		reader = new GenericEntityStreamReader(GenericMetricEntity.GENERIC_METRIC_SERVICE, condition, metricName);
-	}
-	
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-	public long getFirstTimestamp() {
-		return reader.getFirstTimestamp();
-	}
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity){
-		entities.add(entity);
-	}
-	
-	@SuppressWarnings("unchecked")
-	public <T> List<T> read() throws Exception{
-		if(LOG.isDebugEnabled()) LOG.debug("Start reading as batch mode");
-		reader.register(this);
-		reader.readAsStream();
-		return (List<T>)entities;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
deleted file mode 100755
index b1dd64c..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricEntityDecompactionStreamReader.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.eagle.log.entity.meta.EntityDefinitionManager;
-import org.apache.eagle.common.DateTimeUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.text.ParseException;
-
-public class GenericMetricEntityDecompactionStreamReader extends StreamReader implements EntityCreationListener{
-	@SuppressWarnings("unused")
-	private static final Logger LOG = LoggerFactory.getLogger(GenericMetricEntityDecompactionStreamReader.class);
-	private GenericEntityStreamReader reader;
-	private EntityDefinition ed;
-	private String serviceName = GenericMetricEntity.GENERIC_METRIC_SERVICE;
-	private long start;
-	private long end;
-	private GenericMetricShadowEntity single = new GenericMetricShadowEntity();
-	
-	/**
-	 * it makes sense that serviceName should not be provided while metric name should be provided as prefix
-	 * @param metricName
-	 * @param condition
-	 * @throws InstantiationException
-	 * @throws IllegalAccessException
-	 * @throws ParseException
-	 */
-	public GenericMetricEntityDecompactionStreamReader(String metricName, SearchCondition condition) throws InstantiationException, IllegalAccessException, ParseException{
-		ed = EntityDefinitionManager.getEntityByServiceName(serviceName);
-		checkIsMetric(ed);
-		reader = new GenericEntityStreamReader(serviceName, condition, metricName);
-		start = DateTimeUtil.humanDateToSeconds(condition.getStartTime())*1000;
-		end = DateTimeUtil.humanDateToSeconds(condition.getEndTime())*1000;
-	}
-	
-	private void checkIsMetric(EntityDefinition ed){
-		if(ed.getMetricDefinition() == null)
-			throw new IllegalArgumentException("Only metric entity comes here");
-	}
-	
-	@Override
-	public void entityCreated(TaggedLogAPIEntity entity) throws Exception{
-		GenericMetricEntity e = (GenericMetricEntity)entity;
-		double[] value = e.getValue();
-		if(value != null) {
-			int count =value.length;
-			@SuppressWarnings("unused")
-			Class<?> cls = ed.getMetricDefinition().getSingleTimestampEntityClass();
-			for (int i = 0; i < count; i++) {
-				long ts = entity.getTimestamp() + i * ed.getMetricDefinition().getInterval();
-				// exclude those entity which is not within the time range in search condition. [start, end)
-				if (ts < start || ts >= end) {
-					continue;
-				}
-				single.setTimestamp(ts);
-				single.setTags(entity.getTags());
-				single.setValue(e.getValue()[i]);
-				for (EntityCreationListener l : _listeners) {
-					l.entityCreated(single);
-				}
-			}
-		}
-	}
-	
-	@Override
-	public void readAsStream() throws Exception{
-		reader.register(this);
-		reader.readAsStream();
-	}
-
-	@Override
-	public long getLastTimestamp() {
-		return reader.getLastTimestamp();
-	}
-
-	@Override
-	public long getFirstTimestamp() {
-		return reader.getFirstTimestamp();
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
deleted file mode 100644
index acd1290..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericMetricShadowEntity.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-
-/**
- * just a shadow class to avoid dynamically create the class and instantiate using reflection
- */
-public class GenericMetricShadowEntity extends TaggedLogAPIEntity {
-	private double value;
-
-	public double getValue() {
-		return value;
-	}
-
-	public void setValue(double value) {
-		this.value = value;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
deleted file mode 100644
index edb9fc0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntity.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.common.EagleExceptionWrapper;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonDeserialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The only GenericServiceAPIResponseEntity for both client and server side
- *
- * @see GenericServiceAPIResponseEntityDeserializer
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(propOrder = {"success","exception","meta","type","obj"})
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonDeserialize(using = GenericServiceAPIResponseEntityDeserializer.class)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class GenericServiceAPIResponseEntity<T>{
-    /**
-     * Please use primitive type of value in meta as possible
-     */
-    private Map<String,Object> meta;
-	private boolean success;
-	private String exception;
-    private List<T> obj;
-    private Class<T> type;
-
-    public GenericServiceAPIResponseEntity(){
-        // default constructor
-    }
-    public GenericServiceAPIResponseEntity(Class<T> type){
-        this.setType(type);
-    }
-
-    public Map<String, Object> getMeta() {
-        return meta;
-    }
-
-    public void setMeta(Map<String, Object> meta) {
-        this.meta = meta;
-    }
-
-    public List<T> getObj() {
-        return obj;
-    }
-
-    public void setObj(List<T> obj) {
-        this.obj = obj;
-    }
-
-    public void setObj(List<T> obj,Class<T> type) {
-        this.setObj(obj);
-        this.setType(type);
-    }
-
-    public Class<T> getType() {
-        return type;
-    }
-
-    /**
-     * Set the first object's class as type
-     */
-    @SuppressWarnings("unused")
-    public void setTypeByObj(){
-        for(T t:this.obj){
-            if(this.type == null && t!=null){
-                this.type = (Class<T>) t.getClass();
-            }
-        }
-    }
-
-    /**
-     * can explicitly change type class
-     *
-     * @param type
-     */
-    public void setType(Class<T> type) {
-        this.type = type;
-    }
-
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-
-    public void setException(Exception exception){
-        if(exception!=null) this.exception = EagleExceptionWrapper.wrap(exception);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
deleted file mode 100644
index 85b875d..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/GenericServiceAPIResponseEntityDeserializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.ObjectCodec;
-import org.codehaus.jackson.map.DeserializationContext;
-import org.codehaus.jackson.map.JsonDeserializer;
-import org.codehaus.jackson.map.type.TypeFactory;
-import org.codehaus.jackson.type.JavaType;
-
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @since 3/18/15
- */
-public class GenericServiceAPIResponseEntityDeserializer extends JsonDeserializer<GenericServiceAPIResponseEntity> {
-    private final static String META_FIELD="meta";
-    private final static String SUCCESS_FIELD="success";
-    private final static String EXCEPTION_FIELD="exception";
-    private final static String OBJ_FIELD="obj";
-    private final static String TYPE_FIELD="type";
-
-    @Override
-    public GenericServiceAPIResponseEntity deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
-        GenericServiceAPIResponseEntity entity = new GenericServiceAPIResponseEntity();
-        ObjectCodec objectCodec = jp.getCodec();
-
-        JsonNode rootNode = jp.getCodec().readTree(jp);
-        if(rootNode.isObject()){
-            Iterator<Map.Entry<String,JsonNode>> fields = rootNode.getFields();
-            JsonNode objNode = null;
-            while(fields.hasNext()){
-                Map.Entry<String,JsonNode> field = fields.next();
-                if (META_FIELD.equals(field.getKey()) && field.getValue() != null)
-                    entity.setMeta(objectCodec.readValue(field.getValue().traverse(), Map.class));
-                else if(SUCCESS_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    entity.setSuccess(field.getValue().getValueAsBoolean(false));
-                }else if(EXCEPTION_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    entity.setException(field.getValue().getTextValue());
-                }else if(TYPE_FIELD.endsWith(field.getKey())  && field.getValue() != null){
-                    try {
-                        entity.setType(Class.forName(field.getValue().getTextValue()));
-                    } catch (ClassNotFoundException e) {
-                        throw new IOException(e);
-                    }
-                }else if(OBJ_FIELD.equals(field.getKey()) && field.getValue() != null){
-                    objNode = field.getValue();
-                }
-            }
-
-            if(objNode!=null) {
-                JavaType collectionType=null;
-                if (entity.getType() != null) {
-                    collectionType = TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, entity.getType());
-                }else{
-                    collectionType = TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, Map.class);
-                }
-                List obj = objectCodec.readValue(objNode.traverse(), collectionType);
-                entity.setObj(obj);
-            }
-        }else{
-            throw new IOException("root node is not object");
-        }
-        return entity;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
deleted file mode 100755
index 7a38033..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseInternalLogHelper.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.expression.ExpressionParser;
-import org.apache.eagle.log.entity.meta.*;
-import org.apache.eagle.query.parser.TokenConstant;
-import org.apache.eagle.common.ByteUtil;
-import org.apache.eagle.common.EagleBase64Wrapper;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.client.Result;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.*;
-
-public class HBaseInternalLogHelper {
-	private final static Logger LOG  = LoggerFactory.getLogger(HBaseInternalLogHelper.class);
-
-	private static final EntitySerDeserializer ENTITY_SERDESER = new EntitySerDeserializer();
-
-	/**
-	 *
-	 * @param ed
-	 * @param r
-	 * @param qualifiers if null, return all qualifiers defined in ed
-	 * @return
-	 */
-	public static InternalLog parse(EntityDefinition ed, Result r, byte[][] qualifiers) {
-		final byte[] row = r.getRow();
-		// skip the first 4 bytes : prefix
-		final int offset = (ed.getPartitions() == null) ? (4) : (4 + ed.getPartitions().length * 4);
-		long timestamp = ByteUtil.bytesToLong(row, offset);
-		// reverse timestamp
-		timestamp = Long.MAX_VALUE - timestamp;
-		final byte[] family = ed.getColumnFamily().getBytes();
-		final Map<String, byte[]> allQualifierValues = new HashMap<String, byte[]>();
-
-		if (qualifiers != null) {
-			int count = qualifiers.length;
-			final byte[][] values = new byte[count][];
-			for (int i = 0; i < count; i++) {
-				// TODO if returned value is null, it means no this column for this row, so why set null to the object?
-				values[i] = r.getValue(family, qualifiers[i]);
-				allQualifierValues.put(new String(qualifiers[i]), values[i]);
-			}
-		}else{
-			// return all qualifiers
-			for(KeyValue kv:r.list()){
-				byte[] qualifier = kv.getQualifier();
-				byte[] value = kv.getValue();
-				allQualifierValues.put(new String(qualifier),value);
-			}
-		}
-		final InternalLog log = buildObject(ed, row, timestamp, allQualifierValues);
-		return log;
-	}
-
-	/**
-	 *
-	 * @param ed
-	 * @param row
-	 * @param timestamp
-	 * @param allQualifierValues <code>Map &lt; Qualifier name (not display name),Value in bytes array &gt;</code>
-	 * @return
-	 */
-	public static InternalLog buildObject(EntityDefinition ed, byte[] row, long timestamp, Map<String, byte[]> allQualifierValues) {
-		InternalLog log = new InternalLog();
-		String myRow = EagleBase64Wrapper.encodeByteArray2URLSafeString(row);
-		log.setEncodedRowkey(myRow);
-		log.setPrefix(ed.getPrefix());
-		log.setTimestamp(timestamp);
-
-		Map<String, byte[]> logQualifierValues = new HashMap<String, byte[]>();
-		Map<String, String> logTags = new HashMap<String, String>();
-		Map<String, Object> extra = null;
-
-		Map<String,Double> doubleMap = null;
-		// handle with metric
-		boolean isMetricEntity = GenericMetricEntity.GENERIC_METRIC_SERVICE.equals(ed.getService());
-		double[] metricValueArray = null;
-
-		for (Map.Entry<String, byte[]> entry : allQualifierValues.entrySet()) {
-			if (ed.isTag(entry.getKey())) {
-				if (entry.getValue() != null) {
-					logTags.put(entry.getKey(), new String(entry.getValue()));
-				}else if (TokenConstant.isExpression(entry.getKey())){
-					if(doubleMap == null) doubleMap = EntityQualifierUtils.bytesMapToDoubleMap(allQualifierValues, ed);
-					// Caculate expression based fields
-					String expression = TokenConstant.parseExpressionContent(entry.getKey());
-					if (extra == null) extra = new HashMap<String, Object>();
-
-					// Evaluation expression as output based on entity
-					// -----------------------------------------------
-					// 1) Firstly, check whether is metric entity and expression requires value and also value is not number (i.e. double[])
-					// 2) Treat all required fields as double, if not number, then set result as NaN
-
-					try {
-						ExpressionParser parser = ExpressionParser.parse(expression);
-						boolean isRequiringValue = parser.getDependentFields().contains(GenericMetricEntity.VALUE_FIELD);
-
-						if(isMetricEntity && isRequiringValue && doubleMap.get(GenericMetricEntity.VALUE_FIELD)!=null
-								&& Double.isNaN(doubleMap.get(GenericMetricEntity.VALUE_FIELD))) // EntityQualifierUtils will convert non-number field into Double.NaN
-						{
-							// if dependent fields require "value"
-							// and value exists but value's type is double[] instead of double
-
-							// handle with metric value array based expression
-							// lazily extract metric value as double array if required
-							if(metricValueArray == null){
-								// if(allQualifierValues.containsKey(GenericMetricEntity.VALUE_FIELD)){
-								Qualifier qualifier = ed.getDisplayNameMap().get(GenericMetricEntity.VALUE_FIELD);
-								EntitySerDeser serDeser = qualifier.getSerDeser();
-								if(serDeser instanceof DoubleArraySerDeser){
-									byte[] value = allQualifierValues.get(qualifier.getQualifierName());
-									if(value !=null ) metricValueArray = (double[]) serDeser.deserialize(value);
-								}
-								// }
-							}
-
-							if(metricValueArray!=null){
-								double[] resultBucket = new double[metricValueArray.length];
-								Map<String, Double> _doubleMap = new HashMap<String,Double>(doubleMap);
-								_doubleMap.remove(entry.getKey());
-								for(int i=0;i< resultBucket.length;i++) {
-									_doubleMap.put(GenericMetricEntity.VALUE_FIELD, metricValueArray[i]);
-									resultBucket[i]=  parser.eval(_doubleMap);
-								}
-								extra.put(expression,resultBucket);
-							}else{
-								LOG.warn("Failed convert metric value into double[] type which is required by expression: "+expression);
-								// if require value in double[] is NaN
-								double value = parser.eval(doubleMap);
-								extra.put(expression, value);
-							}
-						}else {
-							double value = parser.eval(doubleMap);
-							extra.put(expression, value);
-							// LOG.info("DEBUG: "+entry.getKey()+" = "+ value);
-						}
-					} catch (Exception e) {
-						LOG.error("Failed to eval expression "+expression+", exception: "+e.getMessage(),e);
-					}
-				}
-			} else {
-				logQualifierValues.put(entry.getKey(),entry.getValue());
-			}
-		}
-		log.setQualifierValues(logQualifierValues);
-		log.setTags(logTags);
-		log.setExtraValues(extra);
-		return log;
-	}
-	
-	public static TaggedLogAPIEntity buildEntity(InternalLog log, EntityDefinition entityDef) throws Exception {
-		Map<String, byte[]> qualifierValues = log.getQualifierValues();
-		TaggedLogAPIEntity entity = ENTITY_SERDESER.readValue(qualifierValues, entityDef);
-		if (entity.getTags() == null && log.getTags() != null) {
-			entity.setTags(log.getTags());
-		}
-		entity.setExp(log.getExtraValues());
-		entity.setTimestamp(log.getTimestamp());
-		entity.setEncodedRowkey(log.getEncodedRowkey());
-		entity.setPrefix(log.getPrefix());
-		return entity;
-	}
-	
-	public static List<TaggedLogAPIEntity> buildEntities(List<InternalLog> logs, EntityDefinition entityDef) throws Exception {
-		final List<TaggedLogAPIEntity> result = new ArrayList<TaggedLogAPIEntity>(logs.size());
-		for (InternalLog log : logs) {
-			result.add(buildEntity(log, entityDef));
-		}
-		return result;
-	}
-	
-	public static byte[][] getOutputQualifiers(EntityDefinition entityDef, List<String> outputFields) {
-		final byte[][] result = new byte[outputFields.size()][];
-		int index = 0;
-		for(String field : outputFields){
-			// convert displayName to qualifierName
-			Qualifier q = entityDef.getDisplayNameMap().get(field);
-			if(q == null){ // for tag case
-				result[index++] = field.getBytes();
-			}else{ // for qualifier case
-				result[index++] = q.getQualifierName().getBytes();
-			}
-		}
-		return result;
-	}
-
-	public static InternalLog convertToInternalLog(TaggedLogAPIEntity entity, EntityDefinition entityDef) throws Exception {
-		final InternalLog log = new InternalLog();
-		final Map<String, String> inputTags = entity.getTags();
-		final Map<String, String> tags = new TreeMap<String, String>();
-		if(inputTags!=null) {
-			for (Map.Entry<String, String> entry : inputTags.entrySet()) {
-				tags.put(entry.getKey(), entry.getValue());
-			}
-		}
-		log.setTags(tags);
-		if(entityDef.isTimeSeries()){
-			log.setTimestamp(entity.getTimestamp());
-		}else{
-			log.setTimestamp(EntityConstants.FIXED_WRITE_TIMESTAMP); // set timestamp to MAX, then actually stored 0
-		}
-		
-		// For Metric entity, prefix is populated along with entity instead of EntityDefinition
-		if(entity.getPrefix() != null && !entity.getPrefix().isEmpty()){
-			log.setPrefix(entity.getPrefix());
-		}else{
-			log.setPrefix(entityDef.getPrefix());
-		}
-		
-		log.setPartitions(entityDef.getPartitions());
-		EntitySerDeserializer des = new EntitySerDeserializer();
-		log.setQualifierValues(des.writeValue(entity, entityDef));
-		
-		final IndexDefinition[] indexDefs = entityDef.getIndexes();
-		if (indexDefs != null) {
-			final List<byte[]> indexRowkeys = new ArrayList<byte[]>();
-			for (int i = 0; i < indexDefs.length; ++i) {
-				final IndexDefinition indexDef = indexDefs[i];
-				final byte[] indexRowkey = indexDef.generateIndexRowkey(entity);
-				indexRowkeys.add(indexRowkey);
-			}
-			log.setIndexRowkeys(indexRowkeys);
-		}
-		return log;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
deleted file mode 100755
index c8b9a33..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogReader2.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.entity.meta.EntityDefinition;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.client.ResultScanner;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.filter.Filter;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-
-public class HBaseLogReader2 extends AbstractHBaseLogReader<InternalLog> {
-	protected ResultScanner rs;
-
-	public HBaseLogReader2(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime, Filter filter, String lastScanKey, byte[][] outputQualifiers) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers);
-	}
-
-	/**
-	 * This constructor supports partition.
-	 *
-	 * @param ed               entity definition
-	 * @param partitions       partition values, which is sorted in partition definition order. TODO: in future we need to support
-	 *                         multiple values for one partition field
-	 * @param startTime        start time of the query
-	 * @param endTime          end time of the query
-	 * @param filter           filter for the hbase scan
-	 * @param lastScanKey      the key of last scan
-	 * @param outputQualifiers the bytes of output qualifier names
-	 * @param prefix           can be populated from outside world specifically for generic metric reader
-	 */
-	public HBaseLogReader2(EntityDefinition ed, List<String> partitions, Date startTime, Date endTime, Filter filter, String lastScanKey, byte[][] outputQualifiers, String prefix) {
-		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers, prefix);
-	}
-
-	@Override
-	protected void onOpen(HTableInterface tbl, Scan scan) throws IOException {
-		rs = tbl.getScanner(scan);
-	}
-
-	/**
-	 * <h2>Close:</h2>
-	 * 1. Call super.close(): release current table connection <br></br>
-	 * 2. Close Scanner<br></br>
-	 *
-	 * @throws IOException
-	 */
-	@Override
-	public void close() throws IOException {
-		super.close();
-		if(rs != null){
-			rs.close();
-		}
-	}
-
-	@Override
-	public InternalLog read() throws IOException {
-		if (rs == null)
-			throw new IllegalArgumentException(
-					"ResultScanner must be initialized before reading");
-		InternalLog t = null;
-		Result r = rs.next();
-		if (r != null) {
-			t = HBaseInternalLogHelper.parse(_ed, r, qualifiers);
-		}
-		return t;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
deleted file mode 100644
index 059ee7f..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/HBaseLogWriter.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.eagle.common.config.EagleConfigFactory;
-import org.apache.hadoop.hbase.client.HTableFactory;
-import org.apache.hadoop.hbase.client.HTableInterface;
-import org.apache.hadoop.hbase.client.Put;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class HBaseLogWriter implements LogWriter {
-	private static Logger LOG = LoggerFactory.getLogger(HBaseLogWriter.class);
-	private static byte[] EMPTY_INDEX_QUALIFER_VALUE = "".getBytes();
-	
-	private HTableInterface tbl;
-	private String table;
-	private String columnFamily;
-	
-	public HBaseLogWriter(String table, String columnFamily) {
-		// TODO assert for non-null of table and columnFamily
-		this.table = table;
-		this.columnFamily = columnFamily;
-	}
-	
-	@Override
-	public void open() throws IOException {
-		try{
-			tbl = EagleConfigFactory.load().getHTable(this.table);
-//			LOGGER.info("HBase table " + table + " audo reflush is " + (tbl.isAutoFlush() ? "enabled" : "disabled"));
-		}catch(Exception ex){
-			LOG.error("Cannot create htable", ex);
-			throw new IOException(ex);
-		}
-	}
-
-	@Override
-	public void close() throws IOException {
-		if(tbl != null){
-			new HTableFactory().releaseHTableInterface(tbl);
-		}
-	}
-
-	@Override
-	public void flush() throws IOException {
-		tbl.flushCommits();
-	}
-	
-	protected void populateColumnValues(Put p, InternalLog log){
-		Map<String, byte[]> qualifierValues = log.getQualifierValues();
-		// iterate all qualifierValues
-		for(Map.Entry<String, byte[]> entry : qualifierValues.entrySet()){
-			p.add(columnFamily.getBytes(), entry.getKey().getBytes(), entry.getValue());
-		}
-		
-		Map<String, String> tags = log.getTags();
-		// iterate all tags, each tag will be stored as a column qualifier
-		if(tags != null){
-			for(Map.Entry<String, String> entry : tags.entrySet()){
-				// TODO need a consistent handling of null values
-				if(entry.getValue() != null)
-					p.add(columnFamily.getBytes(), entry.getKey().getBytes(), entry.getValue().getBytes());
-			}
-		}
-	}
-
-	/**
-	 * TODO need think about if multi-PUT is necessary, by checking if autoFlush works
-	 */
-	@Override
-	public byte[] write(InternalLog log) throws IOException{
-		final byte[] rowkey = RowkeyBuilder.buildRowkey(log);
-		final Put p = new Put(rowkey);
-		populateColumnValues(p, log);
-		tbl.put(p);
-		final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-		if (indexRowkeys != null) {
-			writeIndexes(rowkey, indexRowkeys);
-		}
-		return rowkey;
-	}
-
-	/**
-	 * TODO need think about if multi-PUT is necessary, by checking if autoFlush works
-	 */
-	public List<byte[]> write(List<InternalLog> logs) throws IOException{
-		final List<Put> puts = new ArrayList<Put>(logs.size());
-		final List<byte[]> result = new ArrayList<byte[]>(logs.size());
-		for (InternalLog log : logs) {
-			final byte[] rowkey = RowkeyBuilder.buildRowkey(log);
-			final Put p = new Put(rowkey);
-			populateColumnValues(p, log);
-			puts.add(p);
-			final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-			if (indexRowkeys != null) {
-				writeIndexes(rowkey, indexRowkeys, puts);
-			}
-			result.add(rowkey);
-		}
-		tbl.put(puts);
-		return result;
-	}
-	
-	@Override
-	public void updateByRowkey(byte[] rowkey, InternalLog log) throws IOException{
-		Put p = new Put(rowkey);
-		populateColumnValues(p, log);
-		tbl.put(p);
-		final List<byte[]> indexRowkeys = log.getIndexRowkeys();
-		if (indexRowkeys != null) {
-			writeIndexes(rowkey, indexRowkeys);
-		}
-	}
-
-	private void writeIndexes(byte[] rowkey, List<byte[]> indexRowkeys) throws IOException {
-		for (byte[] indexRowkey : indexRowkeys) {
-			Put p = new Put(indexRowkey);
-			p.add(columnFamily.getBytes(), rowkey, EMPTY_INDEX_QUALIFER_VALUE);
-			tbl.put(p);
-		}
-	}
-
-	private void writeIndexes(byte[] rowkey, List<byte[]> indexRowkeys, List<Put> puts) throws IOException {
-		for (byte[] indexRowkey : indexRowkeys) {
-			Put p = new Put(indexRowkey);
-			p.add(columnFamily.getBytes(), rowkey, EMPTY_INDEX_QUALIFER_VALUE);
-			puts.add(p);
-//			tbl.put(p);
-		}
-	}
-
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
deleted file mode 100755
index 8276640..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/InternalLog.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.common.DateTimeUtil;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO we should decouple BaseLog during write time and BaseLog during read time
- */
-public class InternalLog {
-	private String encodedRowkey;
-	private String prefix;
-	private String[] partitions;
-	private long timestamp;
-	private Map<String, byte[]> qualifierValues;
-
-	private Map<String,Object> extraValues;
-	private Map<String, String> tags;
-	private Map<String, List<String>> searchTags;
-	private List<byte[]> indexRowkeys;
-
-	public String getEncodedRowkey() {
-		return encodedRowkey;
-	}
-
-	public void setEncodedRowkey(String encodedRowkey) {
-		this.encodedRowkey = encodedRowkey;
-	}
-	
-	public Map<String, byte[]> getQualifierValues() {
-		return qualifierValues;
-	}
-	public void setQualifierValues(Map<String, byte[]> qualifierValues) {
-		this.qualifierValues = qualifierValues;
-	}
-
-	public Map<String, List<String>> getSearchTags() {
-		return searchTags;
-	}
-	public void setSearchTags(Map<String, List<String>> searchTags) {
-		this.searchTags = searchTags;
-	}
-	public String getPrefix() {
-		return prefix;
-	}
-	public void setPrefix(String prefix) {
-		this.prefix = prefix;
-	}
-	public String[] getPartitions() {
-		return partitions;
-	}
-	public void setPartitions(String[] partitions) {
-		this.partitions = partitions;
-	}
-	public long getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-	public Map<String, String> getTags() {
-		return tags;
-	}
-	public void setTags(Map<String, String> tags) {
-		this.tags = tags;
-	}
-	public List<byte[]> getIndexRowkeys() {
-		return indexRowkeys;
-	}
-	public void setIndexRowkeys(List<byte[]> indexRowkeys) {
-		this.indexRowkeys = indexRowkeys;
-	}
-	public Map<String, Object> getExtraValues() { return extraValues; }
-	public void setExtraValues(Map<String, Object> extraValues) { this.extraValues = extraValues; }
-
-	public String toString(){
-		StringBuffer sb = new StringBuffer();
-		sb.append(prefix);
-		sb.append("|");
-		sb.append(DateTimeUtil.millisecondsToHumanDateWithMilliseconds(timestamp));
-		sb.append("(");
-		sb.append(timestamp);
-		sb.append(")");
-		sb.append("|searchTags:");
-		if(searchTags != null){
-			for(String tagkey : searchTags.keySet()){
-				sb.append(tagkey);
-				sb.append('=');
-				List<String> tagValues = searchTags.get(tagkey);
-				sb.append("(");
-				for(String tagValue : tagValues){
-					sb.append(tagValue);
-					sb.append(",");
-				}
-				sb.append(")");
-				sb.append(",");
-			}
-		}
-		sb.append("|tags:");
-		if(tags != null){
-			for(Map.Entry<String, String> entry : tags.entrySet()){
-				sb.append(entry.getKey());
-				sb.append("=");
-				sb.append(entry.getValue());
-				sb.append(",");
-			}
-		}
-		sb.append("|columns:");
-		if(qualifierValues != null){
-			for(String qualifier : qualifierValues.keySet()){
-				byte[] value = qualifierValues.get(qualifier);
-				sb.append(qualifier);
-				sb.append("=");
-				if(value != null){
-					sb.append(new String(value));
-				}
-				sb.append(",");
-			}
-		}
-		return sb.toString();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
deleted file mode 100755
index 15de946..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/ListQueryAPIResponseEntity.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * TODO: (hchen9) currently we disable firstTimestamp in response avoid breaking older client implementation, but we may need to remove "firstTimestamp" from @JsonIgnoreProperties(ignoreUnknown = true,value={"firstTimestamp"}) to enable the feature later
- */
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true,value={"firstTimestamp"})
-public class ListQueryAPIResponseEntity {
-	private boolean success;
-	private String exception;
-	private int totalResults;
-	private long elapsedms;
-	private long lastTimestamp;
-	private long firstTimestamp;
-	public long getFirstTimestamp() {
-		return firstTimestamp;
-	}
-	public void setFirstTimestamp(long firstTimestamp) {
-		this.firstTimestamp = firstTimestamp;
-	}
-	private Object obj;
-
-	public long getElapsedms() {
-		return elapsedms;
-	}
-	public void setElapsedms(long elapsedms) {
-		this.elapsedms = elapsedms;
-	}
-	public boolean isSuccess() {
-		return success;
-	}
-	public void setSuccess(boolean success) {
-		this.success = success;
-	}
-	public String getException() {
-		return exception;
-	}
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-	public int getTotalResults() {
-		return totalResults;
-	}
-	public void setTotalResults(int totalResults) {
-		this.totalResults = totalResults;
-	}
-	public long getLastTimestamp() {
-		return lastTimestamp;
-	}
-	public void setLastTimestamp(long lastTimestamp) {
-		this.lastTimestamp = lastTimestamp;
-	}
-	public Object getObj() {
-		return obj;
-	}
-	public void setObj(Object obj) {
-		this.obj = obj;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
deleted file mode 100755
index da1e1ab..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogReader.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-public interface LogReader<T> extends Closeable{
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-	
-	public T read() throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
deleted file mode 100644
index 6ef4ee3..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/LogWriter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.io.Closeable;
-import java.io.IOException;
-
-public interface LogWriter extends Closeable{
-	public void flush() throws IOException;
-
-	public void open() throws IOException;
-
-	public void close() throws IOException;
-
-	public byte[] write(InternalLog log) throws IOException;
-	
-	public void updateByRowkey(byte[] rowkey, InternalLog log) throws IOException;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
deleted file mode 100755
index f655ba0..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/MetricMetadataEntity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import org.apache.eagle.log.entity.meta.Column;
-import org.apache.eagle.log.entity.meta.ColumnFamily;
-import org.apache.eagle.log.entity.meta.Indexes;
-import org.apache.eagle.log.entity.meta.Service;
-import org.apache.eagle.log.entity.meta.Index;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
-import org.apache.eagle.log.entity.meta.Prefix;
-import org.apache.eagle.log.entity.meta.Table;
-import org.apache.eagle.log.entity.meta.TimeSeries;
-
-
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@Table("eagle_metric")
-@ColumnFamily("f")
-@Prefix("dmeta")
-@Service("MetricMetadataService")
-@TimeSeries(false)
-@Indexes({
-	@Index(name="Index_1_name", columns = { "name" }, unique = true)
-	})
-public class MetricMetadataEntity extends TaggedLogAPIEntity {
-	
-	@Column("a")
-	private String storeType;
-	@Column("b")
-	private String displayName;
-	@Column("c")
-	private String defaultDownSamplingFunction;
-	@Column("d")
-	private String defaultAggregateFunction;
-	@Column("e")
-	private String aggFunctions;
-	@Column("f")
-	private String downSamplingFunctions;
-	@Column("g")
-	private String resolutions;
-	@Column("h")
-	private String drillDownPaths;
-	
-	public String getStoreType() {
-		return storeType;
-	}
-	public void setStoreType(String storeType) {
-		this.storeType = storeType;
-		_pcs.firePropertyChange("storeType", null, null);
-	}
-	public String getDisplayName() {
-		return displayName;
-	}
-	public void setDisplayName(String displayName) {
-		this.displayName = displayName;
-		_pcs.firePropertyChange("displayName", null, null);
-	}
-	public String getDefaultDownSamplingFunction() {
-		return defaultDownSamplingFunction;
-	}
-	public void setDefaultDownSamplingFunction(String defaultDownSamplingFunction) {
-		this.defaultDownSamplingFunction = defaultDownSamplingFunction;
-		_pcs.firePropertyChange("defaultDownSamplingFunction", null, null);
-	}
-	public String getDefaultAggregateFunction() {
-		return defaultAggregateFunction;
-	}
-	public void setDefaultAggregateFunction(String defaultAggregateFunction) {
-		this.defaultAggregateFunction = defaultAggregateFunction;
-		_pcs.firePropertyChange("defaultAggregateFunction", null, null);
-	}
-	public String getAggFunctions() {
-		return aggFunctions;
-	}
-	public void setAggFunctions(String aggFunctions) {
-		this.aggFunctions = aggFunctions;
-		_pcs.firePropertyChange("aggFunctions", null, null);
-	}
-	public String getDownSamplingFunctions() {
-		return downSamplingFunctions;
-	}
-	public void setDownSamplingFunctions(String downSamplingFunctions) {
-		this.downSamplingFunctions = downSamplingFunctions;
-		_pcs.firePropertyChange("downSamplingFunctions", null, null);
-	}
-	public String getResolutions() {
-		return resolutions;
-	}
-	public void setResolutions(String resolutions) {
-		this.resolutions = resolutions;
-		_pcs.firePropertyChange("resolutions", null, null);
-	}
-	public String getDrillDownPaths() {
-		return drillDownPaths;
-	}
-	public void setDrillDownPaths(String drillDownPaths) {
-		this.drillDownPaths = drillDownPaths;
-		_pcs.firePropertyChange("drillDownPaths", null, null);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/0ea130ef/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java b/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
deleted file mode 100755
index b0eeaed..0000000
--- a/eagle-core/eagle-query/eagle-entity-base/src/main/java/org/apache/eagle/log/entity/QualifierCreationListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.eagle.log.entity;
-
-import java.util.Map;
-
-public interface QualifierCreationListener {
-	/**
-	 * Qualifier <b>display name</b> mapped to qualifier value in bytes[]
-	 *
-	 * @param qualifiers
-	 */
-	public void qualifierCreated(Map<String, byte[]> qualifiers);
-}

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



Mime
View raw message