This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 663d910  [ISSUE-2419] Server test logs contains lots of useless 
content (#2420)
663d910 is described below

commit 663d910ab903af986d899f99aab2ae291032059f
Author: Xiangwei Wei <[email protected]>
AuthorDate: Wed Jan 13 15:19:19 2021 +0800

    [ISSUE-2419] Server test logs contains lots of useless content (#2420)
    
    Server test logs contains lots of useless content
---
 .../apache/iotdb/cluster/query/BaseQueryTest.java  | 10 ++++++++--
 .../apache/iotdb/jdbc/IoTDBPreparedStatement.java  |  8 ++++++--
 .../org/apache/iotdb/db/engine/StorageEngine.java  |  7 ++++---
 .../db/engine/merge/task/MergeMultiChunkTask.java  |  2 +-
 .../apache/iotdb/db/exception/IoTDBException.java  | 21 +++++++++++++++++++++
 .../iotdb/db/exception/StorageEngineException.java |  2 +-
 .../iotdb/db/exception/WriteProcessException.java  |  4 ++++
 .../metadata/AliasAlreadyExistException.java       |  1 +
 .../exception/metadata/IllegalPathException.java   |  1 +
 .../db/exception/metadata/MetadataException.java   |  8 ++++++++
 .../metadata/PathAlreadyExistException.java        |  1 +
 .../exception/metadata/PathNotExistException.java  | 20 +++++++++++++-------
 .../metadata/StorageGroupNotSetException.java      |  5 +++++
 .../db/exception/query/OutOfTTLException.java      |  2 +-
 .../db/exception/query/QueryProcessException.java  |  6 +++++-
 .../org/apache/iotdb/db/metadata/MManager.java     | 10 +++++-----
 .../java/org/apache/iotdb/db/metadata/MTree.java   | 19 +++++++++++--------
 .../apache/iotdb/db/qp/executor/PlanExecutor.java  |  6 +++---
 .../db/query/aggregation/AggregateResult.java      |  3 ++-
 .../db/query/aggregation/impl/AvgAggrResult.java   | 10 +++++-----
 .../db/query/aggregation/impl/SumAggrResult.java   | 10 +++++-----
 .../dataset/groupby/GroupByEngineDataSet.java      |  8 +++++---
 .../groupby/GroupByWithValueFilterDataSet.java     |  3 ++-
 .../db/query/executor/AggregationExecutor.java     |  4 ++--
 .../org/apache/iotdb/db/service/TSServiceImpl.java | 10 ++++++++--
 .../org/apache/iotdb/db/utils/SchemaUtils.java     |  5 +++--
 .../apache/iotdb/db/integration/IoTDBLastIT.java   |  1 -
 .../iotdb/db/integration/IoTDBMultiSeriesIT.java   |  4 ----
 .../aggregation/IoTDBAggregationIT.java            | 10 +++++-----
 .../db/utils/datastructure/PrecisionTest.java      | 22 ++++++++++++++++++----
 .../iotdb/session/IoTDBSessionComplexIT.java       |  3 +--
 .../write/UnSupportedDataTypeException.java        |  4 +++-
 .../org/apache/iotdb/tsfile/read/ReadTest.java     | 22 ++++++----------------
 .../iotdb/tsfile/read/TimePlainEncodeReadTest.java |  5 -----
 .../read/query/executor/QueryExecutorTest.java     |  1 -
 35 files changed, 164 insertions(+), 94 deletions(-)

diff --git 
a/cluster/src/test/java/org/apache/iotdb/cluster/query/BaseQueryTest.java 
b/cluster/src/test/java/org/apache/iotdb/cluster/query/BaseQueryTest.java
index 70bef80..f27fbe1 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/query/BaseQueryTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/query/BaseQueryTest.java
@@ -28,9 +28,10 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.iotdb.cluster.common.TestUtils;
-import org.apache.iotdb.cluster.query.manage.QueryCoordinator;
 import org.apache.iotdb.cluster.server.member.MemberTest;
 import org.apache.iotdb.cluster.server.monitor.NodeStatusManager;
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.engine.compaction.CompactionStrategy;
 import org.apache.iotdb.db.metadata.PartialPath;
 import org.apache.iotdb.db.query.aggregation.AggregateResult;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
@@ -68,6 +69,8 @@ public class BaseQueryTest extends MemberTest {
 
   @Before
   public void setUp() throws Exception {
+    IoTDBDescriptor.getInstance().getConfig()
+        .setCompactionStrategy(CompactionStrategy.NO_COMPACTION);
     super.setUp();
     pathList = new ArrayList<>();
     dataTypes = new ArrayList<>();
@@ -84,6 +87,8 @@ public class BaseQueryTest extends MemberTest {
   public void tearDown() throws Exception {
     super.tearDown();
     NodeStatusManager.getINSTANCE().setMetaGroupMember(null);
+    IoTDBDescriptor.getInstance().getConfig()
+        .setCompactionStrategy(CompactionStrategy.LEVEL_COMPACTION);
   }
 
   void checkSequentialDataset(QueryDataSet dataSet, int offset, int size) 
throws IOException {
@@ -99,7 +104,8 @@ public class BaseQueryTest extends MemberTest {
     assertFalse(dataSet.hasNext());
   }
 
-  protected void checkDoubleDataset(QueryDataSet queryDataSet, Object[] 
answers) throws IOException {
+  protected void checkDoubleDataset(QueryDataSet queryDataSet, Object[] 
answers)
+      throws IOException {
     Assert.assertTrue(queryDataSet.hasNext());
     RowRecord record = queryDataSet.next();
     List<Field> fields = record.getFields();
diff --git 
a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java 
b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
index d934bc4..646440a 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java
@@ -44,12 +44,14 @@ import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 import org.apache.iotdb.service.rpc.thrift.TSIService.Iface;
+import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class IoTDBPreparedStatement extends IoTDBStatement implements 
PreparedStatement {
 
   private String sql;
   private static final String METHOD_NOT_SUPPORTED_STRING = "Method not 
supported";
+  private static final Logger logger = 
LoggerFactory.getLogger(IoTDBPreparedStatement.class);
 
   /**
    * save the SQL parameters as (paramLoc,paramValue) pairs.
@@ -448,8 +450,10 @@ public class IoTDBPreparedStatement extends IoTDBStatement 
implements PreparedSt
 
     StringBuilder newSql = new StringBuilder(parts.get(0));
     for (int i = 1; i < parts.size(); i++) {
-      LoggerFactory.getLogger(IoTDBPreparedStatement.class).debug("SQL 
{}",sql);
-      LoggerFactory.getLogger(IoTDBPreparedStatement.class).debug("parameters 
{}",parameters.size());
+      if (logger.isDebugEnabled()) {
+        logger.debug("SQL {}",sql);
+        logger.debug("parameters {}",parameters.size());
+      }
       if (!parameters.containsKey(i)) {
         throw new SQLException("Parameter #" + i + " is unset");
       }
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java 
b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
index fe13dbf..6349e21 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngine.java
@@ -518,7 +518,7 @@ public class StorageEngine implements IService {
       throws StorageGroupNotSetException {
     StorageGroupProcessor processor = processorMap.get(storageGroupPath);
     if (processor == null) {
-      throw new StorageGroupNotSetException(storageGroupPath.getFullPath());
+      throw new StorageGroupNotSetException(storageGroupPath.getFullPath(), 
true);
     }
 
     logger.info("async closing sg processor is called for closing {}, seq = 
{}, partitionId = {}",
@@ -884,8 +884,9 @@ public class StorageEngine implements IService {
       try {
         TimeUnit.MILLISECONDS.sleep(config.getCheckPeriodWhenInsertBlocked());
         if (System.currentTimeMillis() - startTime > 
config.getMaxWaitingTimeWhenInsertBlocked()) {
-          throw new WriteProcessRejectException("System rejected over " + 
config.getMaxWaitingTimeWhenInsertBlocked() +
-              "ms");
+          throw new WriteProcessRejectException(
+              "System rejected over " + 
config.getMaxWaitingTimeWhenInsertBlocked() +
+                  "ms");
         }
       } catch (InterruptedException e) {
         Thread.currentThread().interrupt();
diff --git 
a/server/src/main/java/org/apache/iotdb/db/engine/merge/task/MergeMultiChunkTask.java
 
b/server/src/main/java/org/apache/iotdb/db/engine/merge/task/MergeMultiChunkTask.java
index 7227ea1..82ec837 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/engine/merge/task/MergeMultiChunkTask.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/engine/merge/task/MergeMultiChunkTask.java
@@ -133,7 +133,7 @@ public class MergeMultiChunkTask {
   private void logMergeProgress() {
     if (logger.isInfoEnabled()) {
       double newProgress = 100 * mergedSeriesCnt / (double) 
(unmergedSeries.size());
-      if (newProgress - progress >= 1.0) {
+      if (newProgress - progress >= 10.0) {
         progress = newProgress;
         logger.info("{} has merged {}% series", taskName, progress);
       }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/IoTDBException.java 
b/server/src/main/java/org/apache/iotdb/db/exception/IoTDBException.java
index 5169d3c..1692d78 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/IoTDBException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/IoTDBException.java
@@ -24,12 +24,23 @@ public class IoTDBException extends Exception {
 
   private static final long serialVersionUID = 8480450962311247736L;
   protected int errorCode;
+  /**
+   * This kind of exception is caused by users' wrong sql, and there is no 
need for server
+   * to print the full stack of the exception
+   */
+  protected boolean isUserException = false;
 
   public IoTDBException(String message, int errorCode) {
     super(message);
     this.errorCode = errorCode;
   }
 
+  public IoTDBException(String message, int errorCode, boolean 
isUserException) {
+    super(message);
+    this.errorCode = errorCode;
+    this.isUserException = isUserException;
+  }
+
   public IoTDBException(String message, Throwable cause, int errorCode) {
     super(message, cause);
     this.errorCode = errorCode;
@@ -40,6 +51,16 @@ public class IoTDBException extends Exception {
     this.errorCode = errorCode;
   }
 
+  public IoTDBException(Throwable cause, int errorCode, boolean 
isUserException) {
+    super(cause);
+    this.errorCode = errorCode;
+    this.isUserException = isUserException;
+  }
+
+  public boolean isUserException() {
+    return isUserException;
+  }
+
   public int getErrorCode() {
     return errorCode;
   }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineException.java
index 5e5b6fa..19bdf7d 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineException.java
@@ -41,6 +41,6 @@ public class StorageEngineException extends IoTDBException {
   }
 
   public StorageEngineException(IoTDBException e) {
-    super(e, e.getErrorCode());
+    super(e, e.getErrorCode(), e.isUserException());
   }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/WriteProcessException.java 
b/server/src/main/java/org/apache/iotdb/db/exception/WriteProcessException.java
index 02aaad9..bbdb5a2 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/WriteProcessException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/WriteProcessException.java
@@ -33,6 +33,10 @@ public class WriteProcessException extends IoTDBException {
     super(message, errorCode);
   }
 
+  public WriteProcessException(String message, int errorCode, boolean 
isUserException) {
+    super(message, errorCode, isUserException);
+  }
+
   public WriteProcessException(String message, Throwable cause) {
     super(message, cause, TSStatusCode.WRITE_PROCESS_ERROR.getStatusCode());
   }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java
index a95c037..7fe557b 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java
@@ -29,5 +29,6 @@ public class AliasAlreadyExistException extends 
MetadataException {
   public AliasAlreadyExistException(String path, String alias) {
     super(String.format("Alias [%s] for Path [%s] already exist", alias, path),
             TSStatusCode.ALIAS_ALREADY_EXIST_ERROR.getStatusCode());
+    this.isUserException = true;
   }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalPathException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalPathException.java
index da40603..4b7ddfb 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalPathException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalPathException.java
@@ -27,5 +27,6 @@ public class IllegalPathException extends MetadataException {
   public IllegalPathException(String path) {
     super(String.format("%s is not a legal path", path));
     errorCode = TSStatusCode.PATH_ILLEGAL.getStatusCode();
+    this.isUserException = true;
   }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/MetadataException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/MetadataException.java
index 4f220ff..c2b74a8 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/MetadataException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/MetadataException.java
@@ -41,6 +41,10 @@ public class MetadataException extends IoTDBException {
     super(msg, TSStatusCode.METADATA_ERROR.getStatusCode());
   }
 
+  public MetadataException(String msg, boolean isUserException) {
+    super(msg, TSStatusCode.METADATA_ERROR.getStatusCode(), isUserException);
+  }
+
   public MetadataException(String message, Throwable cause) {
     super(message + cause.getMessage(), 
TSStatusCode.METADATA_ERROR.getStatusCode());
   }
@@ -52,4 +56,8 @@ public class MetadataException extends IoTDBException {
   public MetadataException(String message, int errorCode) {
     super(message, errorCode);
   }
+
+  public MetadataException(String message, int errorCode, boolean 
isUserException) {
+    super(message, errorCode, isUserException);
+  }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java
index 5b2406f..e736054 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java
@@ -29,5 +29,6 @@ public class PathAlreadyExistException extends 
MetadataException {
   public PathAlreadyExistException(String path) {
     super(String.format("Path [%s] already exist", path),
         TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode());
+    this.isUserException = true;
   }
 }
\ No newline at end of file
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java
index 30a5431..8b9656e 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java
@@ -19,21 +19,27 @@
 
 package org.apache.iotdb.db.exception.metadata;
 
-import org.apache.iotdb.rpc.TSStatusCode;
-
 import java.util.List;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 public class PathNotExistException extends MetadataException {
 
+  private static final String PATH_NOT_EXIST_WRONG_MESSAGE = "Path [%s] does 
not exist";
+
   public PathNotExistException(String path) {
-    super(String.format("Path [%s] does not exist", path),
-            TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode());
+    super(String.format(PATH_NOT_EXIST_WRONG_MESSAGE, path),
+        TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode());
+  }
+
+  public PathNotExistException(String path, boolean isUserException) {
+    super(String.format(PATH_NOT_EXIST_WRONG_MESSAGE, path),
+        TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode(), isUserException);
   }
 
   public PathNotExistException(List<String> paths) {
-    super(String.format("Path [%s] does not exist",
-            paths.size() == 1 ? paths.get(0) : paths.get(0) + " ... " + 
paths.get(paths.size() - 1)),
-            TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode());
+    super(String.format(PATH_NOT_EXIST_WRONG_MESSAGE,
+        paths.size() == 1 ? paths.get(0) : paths.get(0) + " ... " + 
paths.get(paths.size() - 1)),
+        TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode());
   }
 
 }
\ No newline at end of file
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/StorageGroupNotSetException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/StorageGroupNotSetException.java
index 62d6a5f..fb1b79b 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/metadata/StorageGroupNotSetException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/metadata/StorageGroupNotSetException.java
@@ -26,4 +26,9 @@ public class StorageGroupNotSetException extends 
MetadataException {
   public StorageGroupNotSetException(String path) {
     super(String.format("Storage group is not set for current seriesPath: 
[%s]", path));
   }
+
+  public StorageGroupNotSetException(String path, boolean isUserException) {
+    super(String.format("Storage group is not set for current seriesPath: 
[%s]", path));
+    this.isUserException = isUserException;
+  }
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java
index 746fc69..012b807 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java
@@ -31,6 +31,6 @@ public class OutOfTTLException extends WriteProcessException {
   public OutOfTTLException(long insertionTime, long timeLowerBound) {
     super(String.format("Insertion time [%s] is less than ttl time bound [%s]",
         new Date(insertionTime), new Date(timeLowerBound)),
-        TSStatusCode.OUT_OF_TTL_ERROR.getStatusCode());
+        TSStatusCode.OUT_OF_TTL_ERROR.getStatusCode(), true);
   }
 }
\ No newline at end of file
diff --git 
a/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
 
b/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
index 6784634..e36b67f 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/exception/query/QueryProcessException.java
@@ -30,12 +30,16 @@ public class QueryProcessException extends IoTDBException {
     super(message, TSStatusCode.QUERY_PROCESS_ERROR.getStatusCode());
   }
 
+  public QueryProcessException(String message, boolean isUserException) {
+    super(message, TSStatusCode.QUERY_PROCESS_ERROR.getStatusCode(), 
isUserException);
+  }
+
   public QueryProcessException(String message, int errorCode) {
     super(message, errorCode);
   }
 
   public QueryProcessException(IoTDBException e) {
-    super(e, e.getErrorCode());
+    super(e, e.getErrorCode(), e.isUserException());
   }
 
   public QueryProcessException(Throwable cause, int errorCode) {
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java 
b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
index aa342d3..4683c80 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
@@ -816,7 +816,7 @@ public class MManager {
   private List<ShowTimeSeriesResult> 
showTimeseriesWithIndex(ShowTimeSeriesPlan plan,
                                                              QueryContext 
context) throws MetadataException {
     if (!tagIndex.containsKey(plan.getKey())) {
-      throw new MetadataException("The key " + plan.getKey() + " is not a 
tag.");
+      throw new MetadataException("The key " + plan.getKey() + " is not a 
tag.", true);
     }
     Map<String, Set<MeasurementMNode>> value2Node = 
tagIndex.get(plan.getKey());
     if (value2Node.isEmpty()) {
@@ -1448,7 +1448,7 @@ public class MManager {
         pair.right.put(key, value);
       } else {
         throw new MetadataException(
-            String.format("TimeSeries [%s] does not have tag/attribute [%s].", 
fullPath, key));
+            String.format("TimeSeries [%s] does not have tag/attribute [%s].", 
fullPath, key), true);
       }
     }
 
@@ -1498,7 +1498,7 @@ public class MManager {
     MeasurementMNode leafMNode = (MeasurementMNode) mNode;
     if (leafMNode.getOffset() < 0) {
       throw new MetadataException(
-          String.format("TimeSeries [%s] does not have [%s] tag/attribute.", 
fullPath, oldKey));
+          String.format("TimeSeries [%s] does not have [%s] tag/attribute.", 
fullPath, oldKey), true);
     }
     // tags, attributes
     Pair<Map<String, String>, Map<String, String>> pair =
@@ -1508,7 +1508,7 @@ public class MManager {
     if (pair.left.containsKey(newKey) || pair.right.containsKey(newKey)) {
       throw new MetadataException(
           String.format(
-              "TimeSeries [%s] already has a tag/attribute named [%s].", 
fullPath, newKey));
+              "TimeSeries [%s] already has a tag/attribute named [%s].", 
fullPath, newKey), true);
     }
 
     // check tag map
@@ -1544,7 +1544,7 @@ public class MManager {
       tagLogFile.write(pair.left, pair.right, leafMNode.getOffset());
     } else {
       throw new MetadataException(
-          String.format("TimeSeries [%s] does not have tag/attribute [%s].", 
fullPath, oldKey));
+          String.format("TimeSeries [%s] does not have tag/attribute [%s].", 
fullPath, oldKey), true);
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java 
b/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
index 2e5a4c8..c204459 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
@@ -111,12 +111,12 @@ public class MTree implements Serializable {
     } else {
       try {
         QueryDataSource dataSource = QueryResourceManager.getInstance().
-                getQueryDataSource(node.getPartialPath(), queryContext, null);
+            getQueryDataSource(node.getPartialPath(), queryContext, null);
         Set<String> measurementSet = new HashSet<>();
         measurementSet.add(node.getPartialPath().getFullPath());
         LastPointReader lastReader = new LastPointReader(node.getPartialPath(),
-                node.getSchema().getType(), measurementSet, queryContext,
-                dataSource, Long.MAX_VALUE, null);
+            node.getSchema().getType(), measurementSet, queryContext,
+            dataSource, Long.MAX_VALUE, null);
         last = lastReader.readLastPoint();
         return (last != null ? last.getTimestamp() : Long.MIN_VALUE);
       } catch (Exception e) {
@@ -477,7 +477,7 @@ public class MTree implements Serializable {
     if (node instanceof StorageGroupMNode) {
       return (StorageGroupMNode) node;
     } else {
-      throw new StorageGroupNotSetException(path.getFullPath());
+      throw new StorageGroupNotSetException(path.getFullPath(), true);
     }
   }
 
@@ -515,7 +515,7 @@ public class MTree implements Serializable {
     for (int i = 1; i < nodes.length; i++) {
       cur = cur.getChild(nodes[i]);
       if (cur == null) {
-        throw new PathNotExistException(path.getFullPath());
+        throw new PathNotExistException(path.getFullPath(), true);
       }
     }
     return cur;
@@ -739,7 +739,8 @@ public class MTree implements Serializable {
    * @return Pair.left  contains all the satisfied paths
    *         Pair.right means the current offset or zero if we don't set 
offset.
    */
-  Pair<List<PartialPath>, Integer> getAllTimeseriesPathWithAlias(PartialPath 
prefixPath, int limit, int offset) throws MetadataException {
+  Pair<List<PartialPath>, Integer> getAllTimeseriesPathWithAlias(PartialPath 
prefixPath, int limit,
+      int offset) throws MetadataException {
     PartialPath prePath = new PartialPath(prefixPath.getNodes());
     ShowTimeSeriesPlan plan = new ShowTimeSeriesPlan(prefixPath);
     plan.setLimit(limit);
@@ -964,7 +965,8 @@ public class MTree implements Serializable {
   }
 
 
-  List<Pair<PartialPath, String[]>> getAllMeasurementSchema(ShowTimeSeriesPlan 
plan, boolean removeCurrentOffset)
+  List<Pair<PartialPath, String[]>> getAllMeasurementSchema(ShowTimeSeriesPlan 
plan,
+      boolean removeCurrentOffset)
       throws MetadataException {
     List<Pair<PartialPath, String[]>> res = new LinkedList<>();
     String[] nodes = plan.getPath().getNodes();
@@ -1306,7 +1308,8 @@ public class MTree implements Serializable {
         }
         nodeStack.push(node);
       } catch (Exception e) {
-        logger.error("Can not operate cmd {} for err:", plan == null ? "" : 
plan.getOperatorType(), e);
+        logger.error("Can not operate cmd {} for err:", plan == null ? "" : 
plan.getOperatorType(),
+            e);
       }
     }
 
diff --git 
a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java 
b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
index 3119555..2a0d7cb 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
@@ -349,7 +349,7 @@ public class PlanExecutor implements IPlanExecutor {
         StringBuilder sb = new StringBuilder();
         noExistSg.forEach(storageGroup -> 
sb.append(storageGroup.getFullPath()).append(","));
         throw new StorageGroupNotSetException(
-            sb.subSequence(0, sb.length() - 1).toString());
+            sb.subSequence(0, sb.length() - 1).toString(), true);
       }
     }
   }
@@ -1148,7 +1148,7 @@ public class PlanExecutor implements IPlanExecutor {
           throw new QueryProcessException("Unsupported operation " + 
authorType);
       }
     } catch (AuthException e) {
-      throw new QueryProcessException(e.getMessage());
+      throw new QueryProcessException(e.getMessage(), true);
     }
     return true;
   }
@@ -1298,7 +1298,7 @@ public class PlanExecutor implements IPlanExecutor {
         List<PartialPath> allRelatedStorageGroupPath = IoTDB.metaManager
             .getStorageGroupPaths(storageGroupPath);
         if (allRelatedStorageGroupPath.isEmpty()) {
-          throw new PathNotExistException(storageGroupPath.getFullPath());
+          throw new PathNotExistException(storageGroupPath.getFullPath(), 
true);
         }
         for (PartialPath path : allRelatedStorageGroupPath) {
           StorageEngine.getInstance().deleteStorageGroup(path);
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/AggregateResult.java
 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/AggregateResult.java
index fefa68d..ef01070 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/AggregateResult.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/AggregateResult.java
@@ -72,7 +72,8 @@ public abstract class AggregateResult {
    *
    * @param dataInThisPage the data in Page
    */
-  public abstract void updateResultFromPageData(BatchData dataInThisPage) 
throws IOException;
+  public abstract void updateResultFromPageData(BatchData dataInThisPage)
+      throws IOException, QueryProcessException;
 
   /**
    * Aggregate results cannot be calculated using Statistics directly, using 
the data in each page
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/AvgAggrResult.java
 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/AvgAggrResult.java
index 526e41c..fea3095 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/AvgAggrResult.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/AvgAggrResult.java
@@ -26,6 +26,7 @@ import org.apache.iotdb.db.query.aggregation.AggregateResult;
 import org.apache.iotdb.db.query.aggregation.AggregationType;
 import org.apache.iotdb.db.query.reader.series.IReaderByTimestamp;
 import org.apache.iotdb.tsfile.exception.filter.StatisticsClassException;
+import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics;
 import org.apache.iotdb.tsfile.read.common.BatchData;
@@ -73,13 +74,12 @@ public class AvgAggrResult extends AggregateResult {
   }
 
   @Override
-  public void updateResultFromPageData(BatchData dataInThisPage) throws 
IOException {
+  public void updateResultFromPageData(BatchData dataInThisPage) {
     updateResultFromPageData(dataInThisPage, Long.MIN_VALUE, Long.MAX_VALUE);
   }
 
   @Override
-  public void updateResultFromPageData(BatchData dataInThisPage, long 
minBound, long maxBound)
-      throws IOException {
+  public void updateResultFromPageData(BatchData dataInThisPage, long 
minBound, long maxBound) {
     while (dataInThisPage.hasCurrent()) {
       if (dataInThisPage.currentTime() >= maxBound || 
dataInThisPage.currentTime() < minBound) {
         break;
@@ -100,7 +100,7 @@ public class AvgAggrResult extends AggregateResult {
     }
   }
 
-  private void updateAvg(TSDataType type, Object sumVal) throws IOException {
+  private void updateAvg(TSDataType type, Object sumVal) throws 
UnSupportedDataTypeException {
     double val;
     switch (type) {
       case INT32:
@@ -118,7 +118,7 @@ public class AvgAggrResult extends AggregateResult {
       case TEXT:
       case BOOLEAN:
       default:
-        throw new IOException(
+        throw new UnSupportedDataTypeException(
             String.format("Unsupported data type in aggregation AVG : %s", 
type));
     }
     avg = avg * ((double) cnt / (cnt + 1)) + val * (1.0 / (cnt + 1));
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/SumAggrResult.java
 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/SumAggrResult.java
index 78e8ad4..099a016 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/SumAggrResult.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/aggregation/impl/SumAggrResult.java
@@ -25,6 +25,7 @@ import java.nio.ByteBuffer;
 import org.apache.iotdb.db.query.aggregation.AggregateResult;
 import org.apache.iotdb.db.query.aggregation.AggregationType;
 import org.apache.iotdb.db.query.reader.series.IReaderByTimestamp;
+import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics;
 import org.apache.iotdb.tsfile.read.common.BatchData;
@@ -54,13 +55,12 @@ public class SumAggrResult extends AggregateResult {
   }
 
   @Override
-  public void updateResultFromPageData(BatchData dataInThisPage) throws 
IOException {
+  public void updateResultFromPageData(BatchData dataInThisPage) {
     updateResultFromPageData(dataInThisPage, Long.MIN_VALUE, Long.MAX_VALUE);
   }
 
   @Override
-  public void updateResultFromPageData(BatchData dataInThisPage, long 
minBound, long maxBound)
-      throws IOException {
+  public void updateResultFromPageData(BatchData dataInThisPage, long 
minBound, long maxBound) {
     while (dataInThisPage.hasCurrent()) {
       if (dataInThisPage.currentTime() >= maxBound || 
dataInThisPage.currentTime() < minBound) {
         break;
@@ -81,7 +81,7 @@ public class SumAggrResult extends AggregateResult {
     }
   }
 
-  private void updateSum(Object sumVal) throws IOException {
+  private void updateSum(Object sumVal) throws UnSupportedDataTypeException {
     double preValue = getDoubleValue();
     switch (seriesDataType) {
       case INT32:
@@ -99,7 +99,7 @@ public class SumAggrResult extends AggregateResult {
       case TEXT:
       case BOOLEAN:
       default:
-        throw new IOException(
+        throw new UnSupportedDataTypeException(
             String.format("Unsupported data type in aggregation SUM : %s", 
seriesDataType));
     }
     setDoubleValue(preValue);
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByEngineDataSet.java
 
b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByEngineDataSet.java
index dcce684..823c970 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByEngineDataSet.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByEngineDataSet.java
@@ -64,7 +64,8 @@ public abstract class GroupByEngineDataSet extends 
QueryDataSet {
     initGroupByEngineDataSetFields(context, groupByTimePlan);
   }
 
-  protected void initGroupByEngineDataSetFields(QueryContext context, 
GroupByTimePlan groupByTimePlan) {
+  protected void initGroupByEngineDataSetFields(QueryContext context,
+      GroupByTimePlan groupByTimePlan) {
     this.queryId = context.getQueryId();
     this.interval = groupByTimePlan.getInterval();
     this.slidingStep = groupByTimePlan.getSlidingStep();
@@ -117,7 +118,7 @@ public abstract class GroupByEngineDataSet extends 
QueryDataSet {
     if (hasCachedTimeInterval) {
       return true;
     }
-    
+
     // for group by natural months addition
     intervalTimes += ascending ? 1 : -1;
 
@@ -176,5 +177,6 @@ public abstract class GroupByEngineDataSet extends 
QueryDataSet {
     return new Pair<>(curStartTime, curEndTime);
   }
 
-  public abstract Pair<Long, Object> peekNextNotNullValue(Path path, int i) 
throws IOException;
+  public abstract Pair<Long, Object> peekNextNotNullValue(Path path, int i)
+      throws IOException;
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
 
b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
index 88f09b8..97fd9f8 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByWithValueFilterDataSet.java
@@ -187,7 +187,8 @@ public class GroupByWithValueFilterDataSet extends 
GroupByEngineDataSet {
 
   @Override
   @SuppressWarnings("squid:S3776")
-  public Pair<Long, Object> peekNextNotNullValue(Path path, int i) throws 
IOException {
+  public Pair<Long, Object> peekNextNotNullValue(Path path, int i)
+      throws IOException {
     if ((!timestampGenerator.hasNext() && cachedTimestamps.isEmpty())
         || allDataReaderList.get(i).readerIsEmpty()) {
       return null;
diff --git 
a/server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
 
b/server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
index e0fed04..1032ff5 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/query/executor/AggregationExecutor.java
@@ -389,10 +389,10 @@ public class AggregationExecutor {
     if (((AggregationPlan) plan).getLevel() >= 0) {
       Map<Integer, String> pathIndex = new HashMap<>();
       Map<String, AggregateResult> finalPaths = FilePathUtils.getPathByLevel(
-              (AggregationPlan) plan, pathIndex);
+          (AggregationPlan) plan, pathIndex);
 
       List<AggregateResult> mergedAggResults = FilePathUtils.mergeRecordByPath(
-              aggregateResultList, finalPaths, pathIndex);
+          aggregateResultList, finalPaths, pathIndex);
 
       List<PartialPath> paths = new ArrayList<>();
       List<TSDataType> dataTypes = new ArrayList<>();
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java 
b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index 556649d..0ad6020 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -78,9 +78,9 @@ import 
org.apache.iotdb.db.qp.physical.crud.InsertRowsOfOneDevicePlan;
 import org.apache.iotdb.db.qp.physical.crud.InsertTabletPlan;
 import org.apache.iotdb.db.qp.physical.crud.LastQueryPlan;
 import org.apache.iotdb.db.qp.physical.crud.QueryPlan;
+import org.apache.iotdb.db.qp.physical.crud.RawDataQueryPlan;
 import org.apache.iotdb.db.qp.physical.crud.UDFPlan;
 import org.apache.iotdb.db.qp.physical.crud.UDTFPlan;
-import org.apache.iotdb.db.qp.physical.crud.RawDataQueryPlan;
 import org.apache.iotdb.db.qp.physical.sys.AuthorPlan;
 import org.apache.iotdb.db.qp.physical.sys.CreateMultiTimeSeriesPlan;
 import org.apache.iotdb.db.qp.physical.sys.CreateTimeSeriesPlan;
@@ -1608,7 +1608,11 @@ public class TSServiceImpl implements TSIService.Iface, 
ServerContext {
       LOGGER.warn(message, e);
       return RpcUtils.getStatus(Arrays.asList(((BatchProcessException) 
e).getFailingStatus()));
     } else if (e instanceof IoTDBException) {
-      LOGGER.warn(message, e);
+      if (((IoTDBException) e).isUserException()) {
+        LOGGER.warn(message + e.getMessage());
+      } else {
+        LOGGER.warn(message, e);
+      }
       return RpcUtils.getStatus(((IoTDBException) e).getErrorCode(), 
getRootCause(e));
     }
     return null;
@@ -1620,6 +1624,8 @@ public class TSServiceImpl implements TSIService.Iface, 
ServerContext {
         .format("[%s] Exception occurred while %s. ", statusCode.name(), 
operation);
     if (e instanceof NullPointerException) {
       LOGGER.error(message, e);
+    } else if (e instanceof UnSupportedDataTypeException) {
+      LOGGER.warn(e.getMessage());
     } else {
       LOGGER.warn(message, e);
     }
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java 
b/server/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
index 1abe7b5..c93bd98 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
@@ -175,7 +175,7 @@ public class SchemaUtils {
       List<String> aggregations) throws MetadataException {
     List<TSDataType> tsDataTypes = new ArrayList<>();
     for (int i = 0; i < paths.size(); i++) {
-      String aggrStr = aggregations != null ? aggregations.get(i) : null ;
+      String aggrStr = aggregations != null ? aggregations.get(i) : null;
       TSDataType dataType = getAggregationType(aggrStr);
       if (dataType != null) {
         tsDataTypes.add(dataType);
@@ -237,7 +237,8 @@ public class SchemaUtils {
       throws MetadataException {
     if (!schemaChecker.get(dataType).contains(encoding)) {
       throw new MetadataException(String
-          .format("encoding %s does not support %s", encoding.toString(), 
dataType.toString()));
+          .format("encoding %s does not support %s", encoding.toString(), 
dataType.toString()),
+          true);
     }
   }
 }
diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBLastIT.java 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBLastIT.java
index 37949a7..15e16e8 100644
--- a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBLastIT.java
+++ b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBLastIT.java
@@ -329,7 +329,6 @@ public class IoTDBLastIT {
           String ans = resultSet.getString(TIMESTAMP_STR) + ","
               + resultSet.getString(TIMESEIRES_STR) + ","
               + resultSet.getString(VALUE_STR);
-          System.out.println(ans);
           Assert.assertEquals(retArray3[cnt], ans);
           cnt++;
         }
diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesIT.java 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesIT.java
index 927fa8f..6851124 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesIT.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesIT.java
@@ -137,7 +137,6 @@ public class IoTDBMultiSeriesIT {
 
       // insert large amount of data time range : 3000 ~ 13600
       for (int time = 3000; time < 13600; time++) {
-        // System.out.println("===" + time);
         String sql = String
             .format("insert into root.vehicle.d0(timestamp,s0) values(%s,%s)", 
time, time % 100);
         statement.execute(sql);
@@ -304,7 +303,6 @@ public class IoTDBMultiSeriesIT {
           String ans =
               resultSet.getString(TestConstant.TIMESTAMP_STR) + "," + resultSet
                   .getString(TestConstant.d0 + IoTDBConstant.PATH_SEPARATOR + 
TestConstant.s0);
-          // System.out.println("===" + ans);
           cnt++;
         }
         assertEquals(16440, cnt);
@@ -335,7 +333,6 @@ public class IoTDBMultiSeriesIT {
           String ans =
               resultSet.getString(TestConstant.TIMESTAMP_STR) + "," + resultSet
                   .getString(TestConstant.d0 + IoTDBConstant.PATH_SEPARATOR + 
TestConstant.s0);
-          // System.out.println(ans);
           cnt++;
         }
 
@@ -430,7 +427,6 @@ public class IoTDBMultiSeriesIT {
           "select s1 from root.vehicle.d0 where root.vehicle.d0.s0 < 111 and 
root.vehicle.d0.s10 < 111");
       fail("not throw exception when unknown time series in where clause");
     } catch (SQLException e) {
-      e.printStackTrace();
       assertEquals(
           "411: Error occurred in query process: Path [root.vehicle.d0.s10] 
does not exist",
           e.getMessage());
diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/aggregation/IoTDBAggregationIT.java
 
b/server/src/test/java/org/apache/iotdb/db/integration/aggregation/IoTDBAggregationIT.java
index 095c2c6..229dbd4 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/integration/aggregation/IoTDBAggregationIT.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/integration/aggregation/IoTDBAggregationIT.java
@@ -660,7 +660,7 @@ public class IoTDBAggregationIT {
         }
       } catch (Exception e) {
         Assert.assertTrue(e.getMessage().contains(
-            "500: [INTERNAL_SERVER_ERROR] Exception occurred while executing 
executeStatement. Unsupported data type in aggregation AVG : TEXT"));
+            "Unsupported data type in aggregation AVG : TEXT"));
       }
       try {
         statement.execute("SELECT sum(s3)" +
@@ -671,7 +671,7 @@ public class IoTDBAggregationIT {
         }
       } catch (Exception e) {
         Assert.assertTrue(e.getMessage().contains(
-            "500: [INTERNAL_SERVER_ERROR] Exception occurred while executing 
executeStatement. Unsupported data type in aggregation SUM : TEXT"));
+            "Unsupported data type in aggregation SUM : TEXT"));
       }
       try {
         statement.execute("SELECT avg(s4)" +
@@ -682,7 +682,7 @@ public class IoTDBAggregationIT {
         }
       } catch (Exception e) {
         Assert.assertTrue(e.getMessage().contains(
-            "500: [INTERNAL_SERVER_ERROR] Exception occurred while executing 
executeStatement. Unsupported data type in aggregation AVG : BOOLEAN"));
+            "Unsupported data type in aggregation AVG : BOOLEAN"));
       }
       try {
         statement.execute("SELECT sum(s4)" +
@@ -693,7 +693,7 @@ public class IoTDBAggregationIT {
         }
       } catch (Exception e) {
         Assert.assertTrue(e.getMessage().contains(
-            "500: [INTERNAL_SERVER_ERROR] Exception occurred while executing 
executeStatement. Unsupported data type in aggregation SUM : BOOLEAN"));
+            "Unsupported data type in aggregation SUM : BOOLEAN"));
       }
       try {
         statement.execute("SELECT avg(status) FROM root.ln.wf01.wt01");
@@ -703,7 +703,7 @@ public class IoTDBAggregationIT {
         }
       } catch (Exception e) {
         Assert.assertTrue(e.getMessage().contains(
-            "500: [INTERNAL_SERVER_ERROR] Exception occurred while executing 
executeStatement. Boolean statistics does not support: avg"));
+            "Boolean statistics does not support: avg"));
       }
     } catch (Exception e) {
       e.printStackTrace();
diff --git 
a/server/src/test/java/org/apache/iotdb/db/utils/datastructure/PrecisionTest.java
 
b/server/src/test/java/org/apache/iotdb/db/utils/datastructure/PrecisionTest.java
index 95db864..162bada 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/utils/datastructure/PrecisionTest.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/utils/datastructure/PrecisionTest.java
@@ -26,10 +26,24 @@ import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
+import org.apache.iotdb.db.utils.EnvironmentUtils;
 import org.apache.iotdb.jdbc.Config;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 public class PrecisionTest {
+
+  @Before
+  public void setUp() {
+    EnvironmentUtils.envSetUp();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    EnvironmentUtils.cleanEnv();
+  }
+
   @Test
   public void testDoublePrecision1() throws IOException, 
ClassNotFoundException {
     Class.forName(Config.JDBC_DRIVER_NAME);
@@ -40,7 +54,7 @@ public class PrecisionTest {
       statement.execute("SET STORAGE GROUP TO root.turbine1");
       statement.execute("create timeseries root.turbine1.d1.s1 with 
datatype=DOUBLE, encoding=PLAIN, compression=SNAPPY");
 
-      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678);");
+      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678)");
 
       ResultSet resultSet = statement.executeQuery("select * from 
root.turbine1");
 
@@ -63,7 +77,7 @@ public class PrecisionTest {
       statement.execute("SET STORAGE GROUP TO root.turbine1");
       statement.execute("create timeseries root.turbine1.d1.s1 with 
datatype=DOUBLE, encoding=RLE, compression=SNAPPY");
 
-      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678);");
+      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678)");
 
       ResultSet resultSet = statement.executeQuery("select * from 
root.turbine1");
 
@@ -86,7 +100,7 @@ public class PrecisionTest {
       statement.execute("SET STORAGE GROUP TO root.turbine1");
       statement.execute("create timeseries root.turbine1.d1.s1 with 
datatype=FLOAT, encoding=PLAIN, compression=SNAPPY");
 
-      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678);");
+      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678)");
 
       ResultSet resultSet = statement.executeQuery("select * from 
root.turbine1");
 
@@ -109,7 +123,7 @@ public class PrecisionTest {
       statement.execute("SET STORAGE GROUP TO root.turbine1");
       statement.execute("create timeseries root.turbine1.d1.s1 with 
datatype=FLOAT, encoding=RLE, compression=SNAPPY");
 
-      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678);");
+      statement.execute("insert into root.turbine1.d1(timestamp,s1) 
values(1,1.2345678)");
 
       ResultSet resultSet = statement.executeQuery("select * from 
root.turbine1");
 
diff --git 
a/session/src/test/java/org/apache/iotdb/session/IoTDBSessionComplexIT.java 
b/session/src/test/java/org/apache/iotdb/session/IoTDBSessionComplexIT.java
index 47954b2..7307bb2 100644
--- a/session/src/test/java/org/apache/iotdb/session/IoTDBSessionComplexIT.java
+++ b/session/src/test/java/org/apache/iotdb/session/IoTDBSessionComplexIT.java
@@ -566,7 +566,6 @@ public class IoTDBSessionComplexIT {
     sessionDataSet.setFetchSize(1024);
 
     int count = 0;
-    System.out.println(sessionDataSet.getColumnNames());
     while (sessionDataSet.hasNext()) {
       count++;
       StringBuilder sb = new StringBuilder();
@@ -574,7 +573,7 @@ public class IoTDBSessionComplexIT {
       for (Field f : fields) {
         sb.append(f.getStringValue()).append(",");
       }
-      System.out.println(sb.toString());
+      Assert.assertEquals("3,1,2,1,2,", sb.toString());
     }
     Assert.assertEquals(50, count);
     sessionDataSet.closeOperationHandle();
diff --git 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java
 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java
index a1610cb..3e77e83 100644
--- 
a/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java
+++ 
b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java
@@ -18,7 +18,9 @@
  */
 package org.apache.iotdb.tsfile.exception.write;
 
-public class UnSupportedDataTypeException extends RuntimeException {
+import org.apache.iotdb.tsfile.exception.TsFileRuntimeException;
+
+public class UnSupportedDataTypeException extends TsFileRuntimeException {
 
   private static final long serialVersionUID = 6399248887091915203L;
 
diff --git a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java
index e5f0ac2..e5afd0d 100755
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java
@@ -18,8 +18,12 @@
  */
 package org.apache.iotdb.tsfile.read;
 
-import org.apache.iotdb.tsfile.read.ReadOnlyTsFile;
-import org.apache.iotdb.tsfile.read.TsFileSequenceReader;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.iotdb.tsfile.constant.TestConstant;
 import org.apache.iotdb.tsfile.read.common.Field;
 import org.apache.iotdb.tsfile.read.common.Path;
@@ -32,22 +36,12 @@ import 
org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression;
 import org.apache.iotdb.tsfile.read.filter.TimeFilter;
 import org.apache.iotdb.tsfile.read.filter.ValueFilter;
 import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet;
-
 import org.apache.iotdb.tsfile.utils.FileGenerator;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
 public class ReadTest {
 
   private static String fileName = 
TestConstant.BASE_OUTPUT_PATH.concat("perTestOutputData.tsfile");
@@ -152,7 +146,6 @@ public class ReadTest {
       }
 
       cnt++;
-      // System.out.println(record.toString());
     }
   }
 
@@ -180,7 +173,6 @@ public class ReadTest {
       } else if (cnt == 3) {
         assertEquals(1480562618973L, r.getTimestamp());
       }
-      // System.out.println(r);
       cnt++;
     }
     assertEquals(7, cnt);
@@ -216,7 +208,6 @@ public class ReadTest {
       } else if (cnt == 4) {
         assertEquals(1480562618974L, r.getTimestamp());
       }
-      // System.out.println(r);
       cnt++;
     }
     assertEquals(5, cnt);
@@ -289,7 +280,6 @@ public class ReadTest {
         Field f1 = r.getFields().get(0);
         assertEquals("dog976", f1.toString());
       }
-      System.out.println(r);
       cnt++;
     }
     Assert.assertEquals(1, cnt);
diff --git 
a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java
 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java
index 31fe6fa..401a2f1 100755
--- 
a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java
+++ 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java
@@ -184,7 +184,6 @@ public class TimePlainEncodeReadTest {
       } else if (cnt == 4) {
         assertEquals(1480562618976L, r.getTimestamp());
       }
-      // System.out.println(r);
       cnt++;
     }
     assertEquals(5, cnt);
@@ -214,7 +213,6 @@ public class TimePlainEncodeReadTest {
     cnt = 1;
     while (dataSet.hasNext()) {
       RowRecord r = dataSet.next();
-      // System.out.println(r);
       if (cnt == 4) {
         assertEquals(1480562618913L, r.getTimestamp());
       } else if (cnt == 7) {
@@ -239,7 +237,6 @@ public class TimePlainEncodeReadTest {
     int cnt = 1;
     while (dataSet.hasNext()) {
       RowRecord r = dataSet.next();
-      System.out.println(r);
       if (cnt == 1) {
         assertEquals(1480562618972L, r.getTimestamp());
         Field f1 = r.getFields().get(0);
@@ -273,7 +270,6 @@ public class TimePlainEncodeReadTest {
         Field f1 = r.getFields().get(0);
         assertEquals("dog976", f1.toString());
       }
-      System.out.println(r);
       cnt++;
     }
     Assert.assertEquals(1, cnt);
@@ -294,7 +290,6 @@ public class TimePlainEncodeReadTest {
         Field f1 = r.getFields().get(0);
         assertEquals("dog976", f1.getBinaryV().toString());
       }
-      // System.out.println(r);
       cnt++;
     }
     Assert.assertEquals(0, cnt);
diff --git 
a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java
 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java
index 6c9207d..6d9b7b7 100644
--- 
a/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java
+++ 
b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java
@@ -90,7 +90,6 @@ public class QueryExecutorTest {
     while (queryDataSet.hasNext()) {
       RowRecord rowRecord = queryDataSet.next();
       Assert.assertEquals(aimedTimestamp, rowRecord.getTimestamp());
-      System.out.println(rowRecord);
       aimedTimestamp += 8;
     }
     long endTimestamp = System.currentTimeMillis();

Reply via email to