[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] removed a comment on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-689295398


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [153 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] commented on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-689316795


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [153 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] zhanglingzhe0820 opened a new pull request #1712: Add merge limiting

2020-09-08 Thread GitBox


zhanglingzhe0820 opened a new pull request #1712:
URL: https://github.com/apache/incubator-iotdb/pull/1712


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] jixuan1989 commented on a change in pull request #1657: Fix for Codesmell check step1

2020-09-08 Thread GitBox


jixuan1989 commented on a change in pull request #1657:
URL: https://github.com/apache/incubator-iotdb/pull/1657#discussion_r485339692



##
File path: flink-iotdb-connector/src/main/java/org/apache/iotdb/flink/Event.java
##
@@ -32,8 +32,8 @@
   private List types;
   private List values;
 
-  public Event(String device, Long timestamp, List measurements, 
List types,
-  List values) {
+  public Event(String device, final Long timestamp, final List 
measurements, final List types,

Review comment:
   but adding a "final" keyword take nothing effect..





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] commented on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-689295398


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [153 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] removed a comment on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-689274125


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [153 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] haimeiguo commented on a change in pull request #1698: 850 - check list user privilege

2020-09-08 Thread GitBox


haimeiguo commented on a change in pull request #1698:
URL: https://github.com/apache/incubator-iotdb/pull/1698#discussion_r485327011



##
File path: 
server/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java
##
@@ -48,6 +48,7 @@
 
   private static final String SERIALIZATION_UNIMPLEMENTED = "serialization 
unimplemented";
 
+  protected String userName;

Review comment:
   Yes, I will change it to AuthorPlan only. Thank you for your comment!





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sunjincheng121 opened a new pull request #1711: [IOTDB-878][connector] Bump Flink to Flink 1.11.1

2020-09-08 Thread GitBox


sunjincheng121 opened a new pull request #1711:
URL: https://github.com/apache/incubator-iotdb/pull/1711


   Bump Flink to Flink 1.11.1.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] commented on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-689274125


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [3 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [2 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [153 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster

2020-09-08 Thread GitBox


sonarcloud[bot] removed a comment on pull request #460:
URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-687044303


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
 [1 
Bug](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 [4 Security Hotspots](https://sonarcloud.io/project/issue
 
s?id=apache_incubator-iotdb=460=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
 [139 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=460=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
 [1.2% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_252) you 
have used to run this analysis is deprecated and we will stop accepting it from 
October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1710: Supplement the document

2020-09-08 Thread GitBox


neuyilan commented on a change in pull request #1710:
URL: https://github.com/apache/incubator-iotdb/pull/1710#discussion_r485307004



##
File path: docs/zh/UserGuide/Operation Manual/DDL Data Definition Language.md
##
@@ -45,10 +45,11 @@ Msg: org.apache.iotdb.exception.MetadataErrorException: 
org.apache.iotdb.excepti
 
 ```
 IoTDB> show storage group
+IoTDB> show storage group root.ln

Review comment:
   Please indicate that the prefix path  can be specified when executing 
'show storage group' command  

##
File path: docs/UserGuide/Operation Manual/DDL Data Definition Language.md
##
@@ -309,6 +310,20 @@ IoTDB> unset ttl to root.ln
 
 After unset TTL, all data will be accepted in `root.ln`
 
+## Show TTL

Review comment:
   The Chinese document should be modified at the same time.

##
File path: docs/zh/UserGuide/Operation Manual/SQL Reference.md
##
@@ -179,6 +179,7 @@ Eg: show timeseries root.ln where unit='c' limit 10 offset 
10
 ```
 SHOW STORAGE GROUP
 Eg: IoTDB > SHOW STORAGE GROUP
+Eg: IoTDB > SHOW STORAGE GROUP root.ln

Review comment:
   same as the above.

##
File path: docs/UserGuide/Operation Manual/DDL Data Definition Language.md
##
@@ -45,10 +45,11 @@ After the storage group is created, we can use the [SHOW 
STORAGE GROUP](../Opera
 
 ```
 IoTDB> show storage group
+IoTDB> show storage group root.ln

Review comment:
   Please indicate that the prefix path can be specified when executing 
'show storage group' command





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] mychaow merged pull request #1667: [IOTDB-859] list all files generated or used by IoTDB

2020-09-08 Thread GitBox


mychaow merged pull request #1667:
URL: https://github.com/apache/incubator-iotdb/pull/1667


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1698: 850 - check list user privilege

2020-09-08 Thread GitBox


neuyilan commented on a change in pull request #1698:
URL: https://github.com/apache/incubator-iotdb/pull/1698#discussion_r485299335



##
File path: 
server/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java
##
@@ -48,6 +48,7 @@
 
   private static final String SERIALIZATION_UNIMPLEMENTED = "serialization 
unimplemented";
 
+  protected String userName;

Review comment:
   Does every physical plan have to have a userName?
   for OOP, I do not think its a good design.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl commented on pull request #1705: [IOTDB-873] Add count devices DDL

2020-09-08 Thread GitBox


yhwang-hbl commented on pull request #1705:
URL: https://github.com/apache/incubator-iotdb/pull/1705#issuecomment-689260459


   > Hi, everything LGTM except code format ; )
   
   Thank you. I adjusted it



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl commented on a change in pull request #1705: [IOTDB-873] Add count devices DDL

2020-09-08 Thread GitBox


yhwang-hbl commented on a change in pull request #1705:
URL: https://github.com/apache/incubator-iotdb/pull/1705#discussion_r48530



##
File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
##
@@ -695,6 +708,38 @@ private int getCount(MNode node, String[] nodes, int idx) 
throws MetadataExcepti
 }
   }
 
+  /**
+   * Traverse the MTree to get the count of devices.
+   */
+  private int getDevicesCount(MNode node, String[] nodes, int idx) throws 
MetadataException {
+String nodeReg = MetaUtils.getNodeRegByIdx(idx, nodes);
+int cnt = 0;
+if (!(PATH_WILDCARD).equals(nodeReg)) {
+  if (node.hasChild(nodeReg)) {
+if (node.getChild(nodeReg) instanceof MeasurementMNode && idx >= 
nodes.length) {
+  cnt++;
+} else {
+  cnt += getDevicesCount(node.getChild(nodeReg), nodes, idx + 1);
+}
+  }
+} else {
+  boolean deviceAdded = false;
+  for (MNode child : node.getChildren().values()) {
+if (child instanceof MeasurementMNode ) {
+  if( !deviceAdded){
+cnt++;
+deviceAdded = true;
+  }else{

Review comment:
   i got this





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl opened a new pull request #1710: Supplement the document

2020-09-08 Thread GitBox


yhwang-hbl opened a new pull request #1710:
URL: https://github.com/apache/incubator-iotdb/pull/1710


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1705: [IOTDB-873] Add count devices DDL

2020-09-08 Thread GitBox


neuyilan commented on a change in pull request #1705:
URL: https://github.com/apache/incubator-iotdb/pull/1705#discussion_r485296558



##
File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
##
@@ -695,6 +708,38 @@ private int getCount(MNode node, String[] nodes, int idx) 
throws MetadataExcepti
 }
   }
 
+  /**
+   * Traverse the MTree to get the count of devices.
+   */
+  private int getDevicesCount(MNode node, String[] nodes, int idx) throws 
MetadataException {
+String nodeReg = MetaUtils.getNodeRegByIdx(idx, nodes);
+int cnt = 0;
+if (!(PATH_WILDCARD).equals(nodeReg)) {
+  if (node.hasChild(nodeReg)) {
+if (node.getChild(nodeReg) instanceof MeasurementMNode && idx >= 
nodes.length) {
+  cnt++;
+} else {
+  cnt += getDevicesCount(node.getChild(nodeReg), nodes, idx + 1);
+}
+  }
+} else {
+  boolean deviceAdded = false;
+  for (MNode child : node.getChildren().values()) {
+if (child instanceof MeasurementMNode ) {
+  if( !deviceAdded){
+cnt++;
+deviceAdded = true;
+  }else{

Review comment:
   code format
   }else{   ->  } else {
   if( !deviceAdded){->   if (!deviceAdded) {
   
   please use google style format: 
http://iotdb.apache.org/zh/Development/ContributeGuide.html





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1705: [IOTDB-873] Add count devices DDL

2020-09-08 Thread GitBox


neuyilan commented on a change in pull request #1705:
URL: https://github.com/apache/incubator-iotdb/pull/1705#discussion_r485296558



##
File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java
##
@@ -695,6 +708,38 @@ private int getCount(MNode node, String[] nodes, int idx) 
throws MetadataExcepti
 }
   }
 
+  /**
+   * Traverse the MTree to get the count of devices.
+   */
+  private int getDevicesCount(MNode node, String[] nodes, int idx) throws 
MetadataException {
+String nodeReg = MetaUtils.getNodeRegByIdx(idx, nodes);
+int cnt = 0;
+if (!(PATH_WILDCARD).equals(nodeReg)) {
+  if (node.hasChild(nodeReg)) {
+if (node.getChild(nodeReg) instanceof MeasurementMNode && idx >= 
nodes.length) {
+  cnt++;
+} else {
+  cnt += getDevicesCount(node.getChild(nodeReg), nodes, idx + 1);
+}
+  }
+} else {
+  boolean deviceAdded = false;
+  for (MNode child : node.getChildren().values()) {
+if (child instanceof MeasurementMNode ) {
+  if( !deviceAdded){
+cnt++;
+deviceAdded = true;
+  }else{

Review comment:
   code format
   }else{- > } else {
   if( !deviceAdded){. -> if( !deviceAdded) {
   
   please use google style format: 
http://iotdb.apache.org/zh/Development/ContributeGuide.html





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] qiaojialin merged pull request #1706: [Documentation] Move Session API updates docs into Native_API.md

2020-09-08 Thread GitBox


qiaojialin merged pull request #1706:
URL: https://github.com/apache/incubator-iotdb/pull/1706


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl commented on pull request #1708: [IOTDB-877] fix prefix bug on show storage group and show devices

2020-09-08 Thread GitBox


yhwang-hbl commented on pull request #1708:
URL: https://github.com/apache/incubator-iotdb/pull/1708#issuecomment-689244461


   > Good work
   
   That's because of your good guidance



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] qiaojialin merged pull request #1704: iotdb-670: raw data query interface

2020-09-08 Thread GitBox


qiaojialin merged pull request #1704:
URL: https://github.com/apache/incubator-iotdb/pull/1704


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sunjincheng121 merged pull request #1709: Add PPMC info for Jincheng Sun

2020-09-08 Thread GitBox


sunjincheng121 merged pull request #1709:
URL: https://github.com/apache/incubator-iotdb/pull/1709


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] sunjincheng121 opened a new pull request #1709: Add PPMC info for Jincheng Sun

2020-09-08 Thread GitBox


sunjincheng121 opened a new pull request #1709:
URL: https://github.com/apache/incubator-iotdb/pull/1709


   Add PPMC info for Jincheng Sun.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl opened a new pull request #1708: [IOTDB-877] fix prefix bug on show storage group and show devices

2020-09-08 Thread GitBox


yhwang-hbl opened a new pull request #1708:
URL: https://github.com/apache/incubator-iotdb/pull/1708


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] zhanglingzhe0820 opened a new pull request #1707: Update upgrade

2020-09-08 Thread GitBox


zhanglingzhe0820 opened a new pull request #1707:
URL: https://github.com/apache/incubator-iotdb/pull/1707


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] wshao08 opened a new pull request #1706: Move Session API updates docs into Native_API.md

2020-09-08 Thread GitBox


wshao08 opened a new pull request #1706:
URL: https://github.com/apache/incubator-iotdb/pull/1706


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] yhwang-hbl opened a new pull request #1705: [IOTDB-873] Add count devices DDL

2020-09-08 Thread GitBox


yhwang-hbl opened a new pull request #1705:
URL: https://github.com/apache/incubator-iotdb/pull/1705


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1652: add device time index interface

2020-09-08 Thread GitBox


mychaow commented on a change in pull request #1652:
URL: https://github.com/apache/incubator-iotdb/pull/1652#discussion_r484756324



##
File path: 
server/src/main/java/org/apache/iotdb/db/timeIndex/IndexerManager.java
##
@@ -0,0 +1,144 @@
+/*
+ * 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.iotdb.db.timeIndex;
+
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.exception.metadata.IllegalPathException;
+import org.apache.iotdb.db.metadata.PartialPath;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+public class IndexerManager {
+  private String indexerFilePath;
+  private Map seqIndexers;
+  private Map unseqIndexers;
+  private ReentrantReadWriteLock lock;
+  private static final Logger logger = 
LoggerFactory.getLogger(IndexerManager.class);
+
+  private static class IndexerManagerHolder {
+
+private IndexerManagerHolder() {
+  // allowed to do nothing
+}
+
+private static final IndexerManager INSTANCE = new IndexerManager();
+  }
+
+  public static IndexerManager getInstance() {
+return IndexerManagerHolder.INSTANCE;
+  }
+
+  private IndexerManager() {
+indexerFilePath = IoTDBDescriptor.getInstance().getConfig().getSchemaDir()
+  + File.pathSeparator + IndexConstants.IndexerFile;
+seqIndexers = new ConcurrentHashMap<>();
+unseqIndexers = new ConcurrentHashMap<>();
+lock = new ReentrantReadWriteLock();
+  }
+
+  /**
+   * init all indexer
+   * @return whether success
+   */
+  public boolean init() {
+//TODO
+// 1. get all storage group from file
+// 2. init indexer for the storage group
+return true;
+  }
+
+  public void addSeqIndexer(PartialPath storageGroup, DeviceTimeIndexer 
deviceTimeIndexer) {
+lock.writeLock().lock();
+seqIndexers.put(storageGroup, deviceTimeIndexer);
+lock.writeLock().unlock();

Review comment:
   Got it!

##
File path: server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
##
@@ -645,6 +645,10 @@
   // time in nanosecond precision when starting up
   private long startUpNanosecond = System.nanoTime();
 
+  // enable new indexer
+  private boolean enableDeviceIndexer = false;
+  private int deviceIndexerType = 0;

Review comment:
   Thank you for you advise! 





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] haimeiguo opened a new pull request #1704: iotdb-670: raw data query interface

2020-09-08 Thread GitBox


haimeiguo opened a new pull request #1704:
URL: https://github.com/apache/incubator-iotdb/pull/1704


   Added raw data query interface in session. When user specifies the query as 
raw data query, the system will process it directly and skip the sql parser.
   
   jira: https://issues.apache.org/jira/browse/IOTDB-670



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] haimeiguo closed pull request #1656: Add raw data query Interface in Session

2020-09-08 Thread GitBox


haimeiguo closed pull request #1656:
URL: https://github.com/apache/incubator-iotdb/pull/1656


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #1656: Add raw data query Interface in Session

2020-09-08 Thread GitBox


qiaojialin commented on a change in pull request #1656:
URL: https://github.com/apache/incubator-iotdb/pull/1656#discussion_r484674664



##
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##
@@ -913,6 +914,37 @@ public SessionDataSet executeQueryStatement(String sql)
 execResp.isIgnoreTimeStamp());
   }
 
+  /**
+   * query eg. select * from paths where time >= startTime and time < endTime
+   * time interval include startTime and exclude endTime
+   * @param paths
+   * @param startTime included
+   * @param endTime excluded
+   * @return
+   * @throws StatementExecutionException
+   * @throws IoTDBConnectionException
+   */
+
+  public SessionDataSet executeRawDataQuery(List paths, long 
startTime, long endTime)
+  throws StatementExecutionException, IoTDBConnectionException {
+
+TSRawDataQueryReq execReq = new TSRawDataQueryReq(sessionId, paths, 
startTime, endTime);
+execReq.setFetchSize(fetchSize);
+
+TSExecuteStatementResp execResp;
+try {
+  execResp = client.executeRawDataQuery(execReq);
+} catch (TException e) {
+  throw new IoTDBConnectionException(e);
+}
+
+RpcUtils.verifySuccess(execResp.getStatus());
+return new SessionDataSet("", execResp.getColumns(), 
execResp.getDataTypeList(),

Review comment:
   It's ok, but it seems that the client-0.10 can not connect to 
server-0.11 already...





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org