You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2019/04/19 02:41:59 UTC

[incubator-iotdb] branch fix_test_exception created (now 07d1dcc)

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

qiaojialin pushed a change to branch fix_test_exception
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 07d1dcc  fix log level and stack print in test

This branch includes the following new commits:

     new 07d1dcc  fix log level and stack print in test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: fix log level and stack print in test

Posted by qi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch fix_test_exception
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 07d1dcc8be66e4855ed9077e4a80777b9de63898
Author: qiaojialin <64...@qq.com>
AuthorDate: Fri Apr 19 10:41:54 2019 +0800

    fix log level and stack print in test
---
 .../apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java  | 6 +++---
 iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java  | 2 +-
 iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java  | 2 +-
 .../src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
index 0693991..5626923 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java
@@ -335,7 +335,7 @@ public class ConcatPathOptimizer implements ILogicalOptimizer {
         retPaths.add(new Path(pathStr));
       }
     } catch (PathErrorException e) {
-      LOG.error("meet error while removing star." + e);
+      LOG.error("meet error while removing star.", e);
       throw new LogicalOptimizeException("error when remove star: " + e.getMessage());
     }
     return retPaths;
@@ -355,12 +355,12 @@ public class ConcatPathOptimizer implements ILogicalOptimizer {
           }
         }
       } catch (PathErrorException e) {
-        LOG.error("meet error while removing star." + e);
+        LOG.error("meet error while removing star.", e);
         throw new LogicalOptimizeException("error when remove star: " + e.getMessage());
       }
     }
     if (retPaths.isEmpty()) {
-      throw new LogicalOptimizeException("do not select any existing seriesPath");
+      throw new LogicalOptimizeException("do not select any existing series");
     }
     selectOperator.setSuffixPathList(retPaths);
     selectOperator.setAggregations(newAggregations);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index a68f586..ef76583 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -482,7 +482,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
         return executeUpdateStatement(physicalPlan);
       }
     } catch (Exception e) {
-      LOGGER.error("meet error while executing statement.", e);
+      LOGGER.warn("meet error: {}  while executing statement: {}", e.getMessage(), req.getStatement());
       return getTSExecuteStatementResp(TS_StatusCode.ERROR_STATUS, e.getMessage());
     }
   }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java
index 72fb845..8f3343e 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java
@@ -97,7 +97,7 @@ public class ParseDriver {
 
       r = parser.statement();
     } catch (RecognitionException e) {
-      LOG.error("meet error while parsing statement.", e);
+      LOG.warn("meet error: {} while parsing statement: {}", e.getMessage(), command);
     }
 
     if (lexer.getErrors().isEmpty() && parser.errors.isEmpty()) {
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
index 1643915..5cbc14b 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java
@@ -185,7 +185,7 @@ public class PhysicalPlanTest {
   }
 
   @Test
-  public void testFill3() throws QueryProcessorException, ArgsErrorException {
+  public void testFill3() {
     String sqlStr = "SELECT s1 FROM root.vehicle.d1 WHERE time = 5000 Fill(int32[linear, 5m], boolean[previous])";
     try {
       PhysicalPlan plan = processor.parseSQLToPhysicalPlan(sqlStr);