[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1360: Dev merge strategy

2020-06-12 Thread GitBox


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


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=BUG)
 [11 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=VULNERABILITY)
 [14 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=CODE_SMELL)
 [78 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1360=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1360)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1360=new_duplicated_lines_density=list)
 [5.5% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1360=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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] EJTTianYu closed pull request #1351: Dev new merge strategy

2020-06-12 Thread GitBox


EJTTianYu closed pull request #1351:
URL: https://github.com/apache/incubator-iotdb/pull/1351


   



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] EJTTianYu opened a new pull request #1360: Dev merge stra

2020-06-12 Thread GitBox


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


   



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 #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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] jixuan1989 commented on pull request #1348: [IOTDB-677]add live-demo

2020-06-12 Thread GitBox


jixuan1989 commented on pull request #1348:
URL: https://github.com/apache/incubator-iotdb/pull/1348#issuecomment-643553892


   No timestamp column...
   
   ![23081592013992_ 
pic](https://user-images.githubusercontent.com/1021782/84557476-2a834b00-ad5e-11ea-9c0b-6b91cf02b4b9.jpg)
   
   



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 #1357: [IOTDB-765] Fix failed to get upgrade.txt file when using HDFS storage

2020-06-12 Thread GitBox


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


   



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 #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


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



##
File path: 
server/src/main/java/org/apache/iotdb/db/engine/cache/ChunkMetadataCache.java
##
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;

Review comment:
   fixed

##
File path: server/src/main/java/org/apache/iotdb/db/engine/cache/ChunkCache.java
##
@@ -93,40 +93,33 @@ public Chunk get(ChunkMetadata chunkMetaData, 
TsFileSequenceReader reader) throw
 
 try {
   lock.readLock().lock();
-  if (lruCache.containsKey(chunkMetaData)) {
+  Chunk chunk = lruCache.get(chunkMetaData);
+  if (chunk != null) {
 cacheHitNum.incrementAndGet();
 printCacheLog(true);
-Chunk chunk = lruCache.get(chunkMetaData);
 return new Chunk(chunk.getHeader(), chunk.getData().duplicate(), 
chunk.getDeletedAt());
   }
 } finally {
   lock.readLock().unlock();
 }
 
-Lock cacheLock = lock.writeLock();

Review comment:
   fixed





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 merged pull request #1353: [IOTDB-591]disable auto deploy the website because of vuepress OOM

2020-06-12 Thread GitBox


jixuan1989 merged pull request #1353:
URL: https://github.com/apache/incubator-iotdb/pull/1353


   



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 closed pull request #1359: cherry-pick Use the same String in MManager and TsFileResource

2020-06-12 Thread GitBox


jixuan1989 closed pull request #1359:
URL: https://github.com/apache/incubator-iotdb/pull/1359


   



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 pull request #1359: cherry-pick Use the same String in MManager and TsFileResource

2020-06-12 Thread GitBox


jixuan1989 commented on pull request #1359:
URL: https://github.com/apache/incubator-iotdb/pull/1359#issuecomment-643380896


   I will close it as according to the discussion on the mailing list, it will 
be released in v.11



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 opened a new pull request #1359: cherry-pick Use the same String in MManager and TsFileResource

2020-06-12 Thread GitBox


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


   cherry-pick #1332 to v0.10. 
   



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 pull request #1358: [IOTDB-763] Updating the python client to ver-0.10

2020-06-12 Thread GitBox


jixuan1989 commented on pull request #1358:
URL: https://github.com/apache/incubator-iotdb/pull/1358#issuecomment-643234852


   How to to that: 
   1. in your local repo, run `git checkout master`
   2. suppose you are the apache repo is called apache, then run `git fetch 
apache` and  `git rebase apache/master`
   3. `git checkout -b py-cli2`
   4. `git cherry-pick d3d79a75a266e9463511120480f31a58bbca0c40 `
   5. commit your modifications and push to remote repo and open a new PR.



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 pull request #1358: [IOTDB-763] Updating the python client to ver-0.10

2020-06-12 Thread GitBox


jixuan1989 commented on pull request #1358:
URL: https://github.com/apache/incubator-iotdb/pull/1358#issuecomment-643233885


   Hi, please re submit a PR, which only contains commit 
d3d79a75a266e9463511120480f31a58bbca0c40



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-06-12 Thread GitBox


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


   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)
 [5 
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)
 [1 
Vulnerability](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)
 [6 Security 
Hotspots](https://sonarcloud.io/project/issues?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)
 [121 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.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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-06-12 Thread GitBox


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


   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)
 [5 
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)
 [1 
Vulnerability](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)
 [6 Security 
Hotspots](https://sonarcloud.io/project/issues?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)
 [129 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.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=460=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1357: [IOTDB-765] Fix failed to get upgrade.txt file when using HDFS storage

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1357=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1357)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1357=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1357=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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] samperson1997 commented on a change in pull request #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


samperson1997 commented on a change in pull request #1356:
URL: https://github.com/apache/incubator-iotdb/pull/1356#discussion_r439350970



##
File path: 
server/src/main/java/org/apache/iotdb/db/engine/cache/ChunkMetadataCache.java
##
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;

Review comment:
   useless import

##
File path: server/src/main/java/org/apache/iotdb/db/engine/cache/ChunkCache.java
##
@@ -93,40 +93,33 @@ public Chunk get(ChunkMetadata chunkMetaData, 
TsFileSequenceReader reader) throw
 
 try {
   lock.readLock().lock();
-  if (lruCache.containsKey(chunkMetaData)) {
+  Chunk chunk = lruCache.get(chunkMetaData);
+  if (chunk != null) {
 cacheHitNum.incrementAndGet();
 printCacheLog(true);
-Chunk chunk = lruCache.get(chunkMetaData);
 return new Chunk(chunk.getHeader(), chunk.getData().duplicate(), 
chunk.getDeletedAt());
   }
 } finally {
   lock.readLock().unlock();
 }
 
-Lock cacheLock = lock.writeLock();

Review comment:
   useless import: `java.util.concurrent.locks.Lock`





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] noneedname opened a new pull request #1358: [IOTDB-763] Updating the python client to ver-0.10

2020-06-12 Thread GitBox


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


   



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] samperson1997 opened a new pull request #1357: [IOTDB-765] Fixed failed to get upgrade.txt file when using HDFS storage

2020-06-12 Thread GitBox


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


   When using HDFS storage, users may occurs to `Failed to get upgrade.txt 
file` error when first starting server.
   Besides, when restarting server, the upgrade file path is also in 
`java.io.File` way.



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 #1289: Force stop storage engine

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1289: Force stop storage engine

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1289=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1289=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
 [2 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1356=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1356=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1326: premerge for the distributed version

2020-06-12 Thread GitBox


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


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
 [18 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list)
 [15.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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 #1326: premerge for the distributed version

2020-06-12 Thread GitBox


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


   SonarCloud Quality Gate failed.
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 [1 
Vulnerability](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
 [13 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1326=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list)
 [15.1% 
Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1326=new_duplicated_lines_density=list)
   
The version of Java (1.8.0_242) 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] JackieTien97 commented on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 commented on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643170291


   你用的具体是哪个版本啊,是rel/0.10分支么,可以给一个具体的复现步骤吗?



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] JackieTien97 edited a comment on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 edited a comment on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643170291


   你用的具体是哪个版本啊,是rel/0.10分支么,可以给一个具体的复现步骤吗? 



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] JackieTien97 edited a comment on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 edited a comment on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643167820


   
在master版本,我们支持了timeseries下再次创建timeseries,即允许root.sg1.d0.s1.s2的出现,我测试了一下,master版本并未出现同级timeseries覆盖的现象。
   https://user-images.githubusercontent.com/16079446/84486640-45a77980-acd0-11ea-9689-754b28b0e884.png;>
   
   
   在rel/0.10版本下,我们不支持timeseries下再次创建timeseries,我也做了相同的测试,但是创建时会有报错提示,并不会创建成功
   https://user-images.githubusercontent.com/16079446/84486494-0f69fa00-acd0-11ea-9dbf-160436cb7109.png;>
   
   



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] JackieTien97 commented on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 commented on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643167820


   
在master版本,我们支持了timeseries下再次创建timeseries,即允许root.sg1.d0.s1.s2的出现,我测试了一下,master版本并未出现同级timeseries覆盖的现象。
   https://user-images.githubusercontent.com/16079446/84486410-f6614900-accf-11ea-9b64-f0ba7872547d.png;>
   在rel/0.10版本下,我们不支持timeseries下再次创建timeseries,我也做了相同的测试,但是创建时会有报错提示,并不会创建成功
   https://user-images.githubusercontent.com/16079446/84486494-0f69fa00-acd0-11ea-9dbf-160436cb7109.png;>
   
   



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] JackieTien97 removed a comment on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 removed a comment on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643141321


   是的,应该是不允许在timeseries下再次创建timeseries,我看一下,感谢反馈!



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 opened a new pull request #1356: Accelerate cache usage: combine get and contains

2020-06-12 Thread GitBox


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


   



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] JackieTien97 commented on issue #1354: 在timeries下再创建子节点bug

2020-06-12 Thread GitBox


JackieTien97 commented on issue #1354:
URL: 
https://github.com/apache/incubator-iotdb/issues/1354#issuecomment-643141321


   是的,应该是不允许在timeseries下再次创建timeseries,我看一下,感谢反馈!



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 #1353: [IOTDB-591]disable auto deploy the website because of vuepress OOM

2020-06-12 Thread GitBox


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


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1353=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1353)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1353=duplicated_lines_density=list)
 No Duplication information
   
The version of Java (1.8.0_242) 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] qiaojialin commented on a change in pull request #1337: [IOTDB-746] Add async insertion interfaces in Session and SessionPool

2020-06-12 Thread GitBox


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



##
File path: session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
##
@@ -420,6 +555,43 @@ public void insertRecord(String deviceId, long time, 
List measurements,
 }
   }
 
+  /**
+   * insert data in one row asynchronously, if you want improve your 
performance,
+   * please use insertRecords method or insertTablet method
+   *
+   * @see Session#insertRecords(List, List, List, List, List)
+   * @see Session#insertTablet(Tablet)
+   */
+  public void asyncInsertRecord(String deviceId, long time, List 
measurements,
+  List values) {
+CompletableFuture timeout = 
failAfter(Duration.ofSeconds(ASYNC_TIMEOUT));
+CompletableFuture asyncRun = CompletableFuture.supplyAsync(() -> {
+  try {
+insertRecord(deviceId, time, measurements, values);
+  } catch (IoTDBConnectionException | StatementExecutionException e) {
+logger.error("Error occurred when inserting tablets: ", e);
+  }
+  return null;
+}, threadPool.getThreadPool());
+
+asyncRun.acceptEither(timeout, this::asyncHandler);
+  }
+
+  private static  CompletableFuture failAfter(Duration duration) {
+ScheduledExecutorService scheduler = 
Executors.newSingleThreadScheduledExecutor();
+
+CompletableFuture promise = new CompletableFuture<>();
+scheduler.schedule(() -> {
+  final TimeoutException ex = new TimeoutException("Timeout after " + 
duration);
+  return promise.completeExceptionally(ex);
+}, duration.toMillis(), TimeUnit.MILLISECONDS);
+return promise;
+  }
+
+  private void asyncHandler(Void aVoid) {
+logger.info("Insertion executed successfully.");

Review comment:
   change to debug level and print the device + time





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 #1350: Add more remove tag inverted tag log

2020-06-12 Thread GitBox


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


   



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 #1349: Add more debug log in tag remove

2020-06-12 Thread GitBox


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


   



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] EJTTianYu merged pull request #1355: rebase merge

2020-06-12 Thread GitBox


EJTTianYu merged pull request #1355:
URL: https://github.com/apache/incubator-iotdb/pull/1355


   



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 #1337: [IOTDB-746] Add async insertion interfaces in Session and SessionPool

2020-06-12 Thread GitBox


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



##
File path: 
session/src/main/java/org/apache/iotdb/session/pool/SessionThreadPool.java
##
@@ -0,0 +1,76 @@
+/*
+ * 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.session.pool;
+
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import org.apache.iotdb.session.Config;
+
+public class SessionThreadPool {
+
+  private ExecutorService pool;
+  private BlockingQueue threadQueue;
+  private static final int WAIT_TIMEOUT = 1;
+
+  public SessionThreadPool() {
+threadQueue = new 
LinkedBlockingQueue(Config.DEFAULT_BLOCKING_QUEUE_SIZE);
+pool = new ThreadPoolExecutor(Config.DEFAULT_THREAD_POOL_SIZE, 
Config.DEFAULT_THREAD_POOL_SIZE,
+0L, TimeUnit.MILLISECONDS, threadQueue, new CustomPolicy());
+  }
+
+  public SessionThreadPool(int poolSize, int blockingQueueSize) {
+threadQueue = new LinkedBlockingQueue(blockingQueueSize);
+pool = new ThreadPoolExecutor(poolSize, poolSize,
+0L, TimeUnit.MILLISECONDS, threadQueue, new CustomPolicy());
+  }
+
+  public synchronized Future submit(Runnable task) {
+return pool.submit(task);
+  }
+
+  public synchronized  Future submit(Callable task) {
+return pool.submit(task);
+  }
+
+  public Executor getThreadPool() {
+return pool;
+  }
+
+  private static class CustomPolicy implements RejectedExecutionHandler {
+public CustomPolicy() {}
+
+@Override
+public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
+  try {
+synchronized (r) {
+  r.wait(WAIT_TIMEOUT);
+}
+  } catch (InterruptedException e) {
+e.printStackTrace();

Review comment:
   use logger





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 #1337: [IOTDB-746] Add async insertion interfaces in Session and SessionPool

2020-06-12 Thread GitBox


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



##
File path: 
session/src/main/java/org/apache/iotdb/session/pool/SessionThreadPool.java
##
@@ -0,0 +1,76 @@
+/*
+ * 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.session.pool;
+
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import org.apache.iotdb.session.Config;
+
+public class SessionThreadPool {
+
+  private ExecutorService pool;
+  private BlockingQueue threadQueue;
+  private static final int WAIT_TIMEOUT = 1;

Review comment:
   add a config for 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