[GitHub] [incubator-iotdb] qiaojialin commented on issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题?
qiaojialin commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654054037 这个应该没维护了 现在获取结果集列名的方法,JDBC 和 Session 不太一样,可以参考 https://raw.githubusercontent.com/apache/incubator-iotdb/master/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java 推荐使用 Session 的 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] liubofeng commented on issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题?
liubofeng commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654061984 收到,感谢您的回复,我现在的需求是要提前获取列的类型,然后再插入数据的时候用preparedStatement指定类型,请问有这块的指导资料吗? 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 issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题? (How to get series data type using Java API)
jixuan1989 commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654065948 Not maintained?? don't we have UT to cover it? 我们这个接口没有再维护了?JDBC的接口还是应该维护吧。。 > 这个应该没维护了 > > 现在获取结果集列名的方法,JDBC 和 Session 不太一样,可以参考 > > https://raw.githubusercontent.com/apache/incubator-iotdb/master/example/jdbc/src/main/java/org/apache/iotdb/JDBCExample.java > > https://github.com/apache/incubator-iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SessionExample.java > > 推荐使用 Session 的 > 我现在的需求是要提前获取列的类型,然后再插入数据的时候用preparedStatement指定类型,请问有这块的指导资料吗? 看下这个文档的show timeseries语法: https://iotdb.apache.org/UserGuide/Master/Operation%20Manual/SQL%20Reference.html 此外session有个API是fetchMetadata 应该也可以。 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 issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题? (How to get series data type using Java API)
qiaojialin commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654066277 preparedStatement 最近没维护,不确定能不能正常工作。。如果每次写入都要查一下元数据会比较慢,可以用 Session 的 insertRecords 接口。String values 这个接口会在服务器端自动推断类型,只要提前注册好序列就可以了。 如果想写入的时候指定类型,可以查出来类型在客户端缓存,这个查询可以用 show 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] liubofeng commented on issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题? (How to get series data type using Java API)
liubofeng commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654069306 收到, @jixuan1989 @qiaojialin 感谢回复!感觉咱们现在主要维护session这块了,我看一下,能提供一下交流群吗,这样方便交流 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 issue #1461: 您好,请问一下我操作java API获取表字段类型的时候有问题? (How to get series data type using Java API)
qiaojialin commented on issue #1461: URL: https://github.com/apache/incubator-iotdb/issues/1461#issuecomment-654070828 > Not maintained?? don't we have UT to cover it? > > 我们这个接口没有再维护了?JDBC的接口还是应该维护吧。。 ResultSetMetaData metaData = resultSet.getMetaData(); metaData.getColumnLabel(); 这个是有的,那个 catalog 什么的没了 ![image](https://user-images.githubusercontent.com/7240743/86568183-11596d00-bf9f-11ea-829a-0ab206c922e0.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] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-653361804 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [167 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654093166 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [167 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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] jt2594838 commented on a change in pull request #1457: delete timeseries when path is not found
jt2594838 commented on a change in pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#discussion_r450056346 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java ## @@ -707,5 +709,24 @@ public void delete(Path path, long timestamp) throws QueryProcessException { } } + @Override + public void delete(DeletePlan deletePlan) throws QueryProcessException { +try { + Set existingPaths = new HashSet<>(); + for (Path p : deletePlan.getPaths()) { +existingPaths.addAll(getPathsName(p.getFullPath())); + } + if (existingPaths.isEmpty()) { +logger.info("TimeSeries does not exist and its data cannot be deleted"); +return; Review comment: Agreed, information returned to the user should be consistent with the stand-alone version as much as possible. ## File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java ## @@ -707,5 +709,24 @@ public void delete(Path path, long timestamp) throws QueryProcessException { } } + @Override + public void delete(DeletePlan deletePlan) throws QueryProcessException { +try { + Set existingPaths = new HashSet<>(); + for (Path p : deletePlan.getPaths()) { +existingPaths.addAll(getPathsName(p.getFullPath())); Review comment: `getFullPath()` here will still perform a metadata query on other nodes, so I doubt whether your changes work. ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1522,6 +1532,44 @@ private TSStatus processNonPartitionedDataPlan(PhysicalPlan plan) { } } + DeleteTimeSeriesPlan getDeleteTimeseriesPlanWithFullPaths(DeleteTimeSeriesPlan plan) + throws PathNotExistException { +List originalPaths = plan.getPaths(); +ConcurrentSkipListSet fullPaths = new ConcurrentSkipListSet<>(); +ConcurrentSkipListSet nonExistPaths = new ConcurrentSkipListSet<>(); +ExecutorService getAllPathsService = Executors Review comment: Suggestion: change the method signature to `List getMatchedPaths(List originalPaths)` so that this method can be applied in other situations. 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] SailVR opened a new pull request #1462: lower the sidebar width
SailVR opened a new pull request #1462: URL: https://github.com/apache/incubator-iotdb/pull/1462 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] SailVR closed pull request #1462: lower the sidebar width
SailVR closed pull request #1462: URL: https://github.com/apache/incubator-iotdb/pull/1462 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
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654111934 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [167 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654093166 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [167 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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] SailVR opened a new pull request #1463: modify table width in site
SailVR opened a new pull request #1463: URL: https://github.com/apache/incubator-iotdb/pull/1463 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
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654111934 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [167 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654130549 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [157 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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] mychaow opened a new pull request #1464: add cluster version mmanager
mychaow opened a new pull request #1464: URL: https://github.com/apache/incubator-iotdb/pull/1464 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] Ring-k commented on a change in pull request #1457: delete timeseries when path is not found
Ring-k commented on a change in pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#discussion_r450110527 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -1522,6 +1532,44 @@ private TSStatus processNonPartitionedDataPlan(PhysicalPlan plan) { } } + DeleteTimeSeriesPlan getDeleteTimeseriesPlanWithFullPaths(DeleteTimeSeriesPlan plan) + throws PathNotExistException { +List originalPaths = plan.getPaths(); +ConcurrentSkipListSet fullPaths = new ConcurrentSkipListSet<>(); +ConcurrentSkipListSet nonExistPaths = new ConcurrentSkipListSet<>(); +ExecutorService getAllPathsService = Executors Review comment: Good idea! I will extract the method. 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] Ring-k commented on a change in pull request #1457: delete timeseries when path is not found
Ring-k commented on a change in pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#discussion_r450111437 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java ## @@ -707,5 +709,24 @@ public void delete(Path path, long timestamp) throws QueryProcessException { } } + @Override + public void delete(DeletePlan deletePlan) throws QueryProcessException { +try { + Set existingPaths = new HashSet<>(); + for (Path p : deletePlan.getPaths()) { +existingPaths.addAll(getPathsName(p.getFullPath())); Review comment: These codes seems redundent now, because the DeletePlan to be executed contains full paths. I will remove these codes. 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 #1457: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-654164384 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [17 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [24.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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 #1457: delete timeseries when path is not found
sonarcloud[bot] removed a comment on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-653822862 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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 #1457: delete timeseries when path is not found
sonarcloud[bot] removed a comment on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-654164384 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [17 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [24.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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 #1457: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-654171812 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [16 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [27.1% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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 #1457: delete timeseries when path is not found
sonarcloud[bot] removed a comment on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-654171812 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [16 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [27.1% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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 #1457: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457#issuecomment-654176697 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [15 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1457&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=list) [27.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1457&metric=new_duplicated_lines_density&view=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] Ring-k opened a new pull request #1465: delete timeseries when path is not found
Ring-k opened a new pull request #1465: URL: https://github.com/apache/incubator-iotdb/pull/1465 Problem >>> If the DeleteTimeseriesPlan is routed globally and the metadata is removed, and the other node needs to retrieve the full paths, then the metadata is nowhere to be found. Solution >>> In this implementation, the full paths will be retrieved before plan routing. 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] Ring-k closed pull request #1465: delete timeseries when path is not found
Ring-k closed pull request #1465: URL: https://github.com/apache/incubator-iotdb/pull/1465 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] Ring-k closed pull request #1457: delete timeseries when path is not found
Ring-k closed pull request #1457: URL: https://github.com/apache/incubator-iotdb/pull/1457 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
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654130549 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [157 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-654216239 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [6 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [156 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=460&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=list) [1.2% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=460&metric=new_duplicated_lines_density&view=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] Ring-k opened a new pull request #1466: delete timeseries when path is not found
Ring-k opened a new pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466 Problem >>> If the DeleteTimeseriesPlan is routed globally and the metadata is removed, and the other node needs to retrieve the full paths, then the metadata is nowhere to be found. Solution >>> In this implementation, the full paths will be retrieved before plan routing. 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 #1466: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#issuecomment-654266357 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=list) [26.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=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] yx-zhang opened a new pull request #1467: [IOTDB-970] change base_dir to system_dir
yx-zhang opened a new pull request #1467: URL: https://github.com/apache/incubator-iotdb/pull/1467 Now you can set system_dir directly 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 #1468: split vm with flush
zhanglingzhe0820 opened a new pull request #1468: URL: https://github.com/apache/incubator-iotdb/pull/1468 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 #1326: premerge for the distributed version
qiaojialin merged pull request #1326: URL: https://github.com/apache/incubator-iotdb/pull/1326 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 commented on a change in pull request #1400: [IOTDB-627]Support range deletion for timeseries
wshao08 commented on a change in pull request #1400: URL: https://github.com/apache/incubator-iotdb/pull/1400#discussion_r450587930 ## File path: server/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java ## @@ -531,6 +530,17 @@ public boolean hasNextTimeValuePair() { return hasCachedPair; } +private boolean isPointDeleted(long timestamp) { + if (deletionList != null) { +for (Pair del : deletionList) { + if (del.left <= timestamp && timestamp <= del.right) { +return true; + } +} Review comment: Fixed ## File path: server/src/test/java/org/apache/iotdb/db/engine/merge/MergeTaskTest.java ## @@ -218,7 +218,7 @@ public void testPartialMerge3() throws Exception { public void mergeWithDeletionTest() throws Exception { try { seqResources.get(0).getModFile().write(new Deletion(new Path(deviceIds[0], - measurementSchemas[0].getMeasurementId()), 1, 49)); + measurementSchemas[0].getMeasurementId()), 1, 0,49)); 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] wshao08 commented on a change in pull request #1400: [IOTDB-627]Support range deletion for timeseries
wshao08 commented on a change in pull request #1400: URL: https://github.com/apache/incubator-iotdb/pull/1400#discussion_r450587979 ## File path: session/src/main/java/org/apache/iotdb/session/Session.java ## @@ -747,14 +747,37 @@ public void deleteData(String path, long time) * delete data <= time in multiple timeseries * * @param paths data in which time series to delete - * @param time data with time stamp less than or equal to time will be deleted + * @param endTime data with time stamp less than or equal to time will be deleted */ - public void deleteData(List paths, long time) + public void deleteData(List paths, long endTime) throws IoTDBConnectionException, StatementExecutionException { TSDeleteDataReq request = new TSDeleteDataReq(); request.setSessionId(sessionId); request.setPaths(paths); -request.setTimestamp(time); +request.setStartTime(Long.MIN_VALUE); +request.setEndTime(endTime); + 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] jt2594838 commented on a change in pull request #1464: add cluster version mmanager
jt2594838 commented on a change in pull request #1464: URL: https://github.com/apache/incubator-iotdb/pull/1464#discussion_r450587628 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/CMManager.java ## @@ -0,0 +1,233 @@ +/* + * 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.cluster.metadata; + +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.metadata.MetadataException; +import org.apache.iotdb.db.exception.metadata.PathNotExistException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MeasurementMeta; +import org.apache.iotdb.db.metadata.mnode.MNode; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.TimeValuePair; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +public class CMManager extends MManager { + + private static final Logger logger = LoggerFactory.getLogger(CMManager.class); + + // currently, if a key is not existed in the mRemoteMetaCache, an IOException will be thrown + private ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock();; + private LRUCache mRemoteMetaCache; + private MetaPuller metaPuller; + + protected CMManager() { +super(); +metaPuller = MetaPuller.getInstance(); +int remoteCacheSize = config.getmRemoteSchemaCacheSize(); +mRemoteMetaCache = new LRUCache(remoteCacheSize) { + @Override + protected MeasurementMeta loadObjectByKey(String key) throws IOException { +throw new IOException(key + " not found!"); + } + + @Override + public synchronized void removeItem(String key) { +cache.keySet().removeIf(s -> s.startsWith(key)); + } +}; + } + + private static class MManagerHolder { + +private MManagerHolder() { + // allowed to do nothing +} + +private static final CMManager INSTANCE = new CMManager(); + } + + /** + * we should not use this function in other place, but only in IoTDB class + * @return + */ + public static MManager getInstance() { +return CMManager.MManagerHolder.INSTANCE; + } + + @Override + public String deleteTimeseries(String prefixPath) throws MetadataException { +cacheLock.writeLock().lock(); +mRemoteMetaCache.removeItem(prefixPath); +cacheLock.writeLock().unlock(); +return super.deleteTimeseries(prefixPath); + } + + @Override + public void deleteStorageGroups(List storageGroups) throws MetadataException { +cacheLock.writeLock().lock(); +for (String storageGroup : storageGroups) { + mRemoteMetaCache.removeItem(storageGroup); +} +cacheLock.writeLock().unlock(); +super.deleteStorageGroups(storageGroups); + } + + @Override + public TSDataType getSeriesType(String path) throws MetadataException { +try { + cacheLock.readLock().lock(); + MeasurementMeta measurementMeta = mRemoteMetaCache.get(path); + return measurementMeta.getMeasurementSchema().getType(); +} catch (IOException e) { + //do nothing Review comment: When is the schema pulled in this case? ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/handlers/caller/AppendNodeEntryHandler.java ## @@ -66,7 +67,7 @@ public void onComplete(Long response) { logger.debug("{}: Received an agreement from {} for {}, remaining votes to succeed: {}", member.getName(), receiver, log, remaining); if (remaining == 0) { - logger.debug("{}: Log {} is accepted by the quorum", member.getName(), log); + logger.debug("{}: Log {} is accepted by the quorum {}", member.getName(), log, log.getCurrLogIndex()); Review comment: Adding the parameter after "quorum" is a bit confusing, maybe we can use: `"{}: Log[{}] {} is accepted by the
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1463: modify table width in site
qiaojialin merged pull request #1463: URL: https://github.com/apache/incubator-iotdb/pull/1463 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] jt2594838 commented on a change in pull request #1466: delete timeseries when path is not found
jt2594838 commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450593733 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/ClearCachePlan.java ## @@ -34,4 +34,9 @@ public ClearCachePlan() { public List getPaths() { return new ArrayList<>(); } + + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: Use Collections.emptyList(). ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -2614,6 +2641,43 @@ private AsyncClientPool getDataAsyncClientPool() { return ret; } + /** + * Get all paths after removing wildcards in the path + * + * @param originalPaths, a list of paths, potentially with wildcard + * @return a pair of path lists, the first are the existing full paths, the second are invalid + * original paths + */ + public Pair, List> getMatchedPaths(List originalPaths) { +ConcurrentSkipListSet fullPaths = new ConcurrentSkipListSet<>(); +ConcurrentSkipListSet nonExistPaths = new ConcurrentSkipListSet<>(); +ExecutorService getAllPathsService = Executors +.newFixedThreadPool(partitionTable.getGlobalGroups().size()); +for (String pathStr : originalPaths) { + getAllPathsService.submit(() -> { +try { + List fullPathStrs = getMatchedPaths(pathStr); + if (fullPathStrs.isEmpty()) { +nonExistPaths.add(pathStr); +logger.error("Path {} is not found.", pathStr); + } + fullPaths.addAll(fullPathStrs); Review comment: `fullPaths.addAll(fullPathStrs);` may be put into the else branch to reduce unnecessary method calls. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/AlterTimeSeriesPlan.java ## @@ -102,6 +103,15 @@ public String getAlias() { return Collections.singletonList(path); } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (Path curPath : Collections.singletonList(path)) { + ret.add(curPath.getFullPath()); +} +return ret; Review comment: Just `Return Collections.singletonList(path.getFullPath());` and check other places, please. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertRowPlan.java ## @@ -196,13 +196,21 @@ public void markFailedMeasurementInsertion(int index, Exception e) { @Override public List getPaths() { List ret = new ArrayList<>(); - for (String m : measurements) { ret.add(new Path(deviceId, m)); } return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (String m : measurements) { + ret.add(new Path(deviceId, m).getFullPath()); Review comment: Just use `ret.add(deviceId + IoTDBConstant.PATH_SEPARATOR + m)`. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/DataAuthPlan.java ## @@ -49,6 +49,11 @@ public DataAuthPlan(OperatorType operatorType, List users) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: `Collections.emptyList()` ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/CreateTimeSeriesPlan.java ## @@ -133,12 +134,21 @@ public String toString() { return String.format("seriesPath: %s, resultDataType: %s, encoding: %s, compression: %s", path, dataType, encoding, compressor); } - + @Override public List getPaths() { return Collections.singletonList(path); } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (Path curPath : Collections.singletonList(path)) { + ret.add(curPath.getFullPath()); +} +return ret; Review comment: `Collections.singletonList(path.getFullPath())` ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/MergePlan.java ## @@ -38,4 +38,9 @@ public MergePlan() { public List getPaths() { return new ArrayList<>(); } + + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: And here. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/SetStorageGroupPlan.java ## @@ -57,6 +58,15 @@ public void setPath(Path path) { return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +if (path != null) { + ret.add(path.getFullPath()); +} +return ret; Review comment: And here. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/SetTTLPlan.java ## @@ -54,6 +54,11 @@ public SetTTLPlan(String storageGroup) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment:
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1466: delete timeseries when path is not found
sonarcloud[bot] removed a comment on pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#issuecomment-654266357 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [11 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=list) [26.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=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 #1466: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#issuecomment-654591368 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [13 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=list) [13.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=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] Ring-k commented on a change in pull request #1466: delete timeseries when path is not found
Ring-k commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450619149 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/ClearCachePlan.java ## @@ -34,4 +34,9 @@ public ClearCachePlan() { public List getPaths() { return new ArrayList<>(); } + + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/AlterTimeSeriesPlan.java ## @@ -102,6 +103,15 @@ public String getAlias() { return Collections.singletonList(path); } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (Path curPath : Collections.singletonList(path)) { + ret.add(curPath.getFullPath()); +} +return ret; Review comment: I'll change it. Thanks for your suggestion. 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] Ring-k commented on a change in pull request #1466: delete timeseries when path is not found
Ring-k commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450619066 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java ## @@ -2614,6 +2641,43 @@ private AsyncClientPool getDataAsyncClientPool() { return ret; } + /** + * Get all paths after removing wildcards in the path + * + * @param originalPaths, a list of paths, potentially with wildcard + * @return a pair of path lists, the first are the existing full paths, the second are invalid + * original paths + */ + public Pair, List> getMatchedPaths(List originalPaths) { +ConcurrentSkipListSet fullPaths = new ConcurrentSkipListSet<>(); +ConcurrentSkipListSet nonExistPaths = new ConcurrentSkipListSet<>(); +ExecutorService getAllPathsService = Executors +.newFixedThreadPool(partitionTable.getGlobalGroups().size()); +for (String pathStr : originalPaths) { + getAllPathsService.submit(() -> { +try { + List fullPathStrs = getMatchedPaths(pathStr); + if (fullPathStrs.isEmpty()) { +nonExistPaths.add(pathStr); +logger.error("Path {} is not found.", pathStr); + } + fullPaths.addAll(fullPathStrs); Review comment: You're right. Thanks for your suggestion :) 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] Ring-k commented on a change in pull request #1466: delete timeseries when path is not found
Ring-k commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450619206 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/DeletePartitionPlan.java ## @@ -41,6 +41,11 @@ public DeletePartitionPlan(String storageGroupName, Set partitionId) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertRowPlan.java ## @@ -196,13 +196,21 @@ public void markFailedMeasurementInsertion(int index, Exception e) { @Override public List getPaths() { List ret = new ArrayList<>(); - for (String m : measurements) { ret.add(new Path(deviceId, m)); } return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (String m : measurements) { + ret.add(new Path(deviceId, m).getFullPath()); Review comment: I'll change it. Thanks for your suggestion. 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] Ring-k commented on a change in pull request #1466: delete timeseries when path is not found
Ring-k commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450619292 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertTabletPlan.java ## @@ -125,6 +125,23 @@ public void setRange(List range) { return ret; } + @Override + public List getPathsStrings() { +if (paths != null) { + List ret = new ArrayList<>(); + for (Path path : paths) { +ret.add(path.getFullPath()); + } + return ret; +} +List ret = new ArrayList<>(); +for (String m : measurements) { + ret.add(new Path(deviceId, m)); Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/AuthorPlan.java ## @@ -254,6 +254,15 @@ public String toString() { return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +if (nodeName != null) { + ret.add(nodeName.getFullPath()); +} +return ret; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/CreateSnapshotPlan.java ## @@ -35,4 +35,9 @@ public CreateSnapshotPlan() { public List getPaths() { return new ArrayList<>(); } + + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/CreateTimeSeriesPlan.java ## @@ -133,12 +134,21 @@ public String toString() { return String.format("seriesPath: %s, resultDataType: %s, encoding: %s, compression: %s", path, dataType, encoding, compressor); } - + @Override public List getPaths() { return Collections.singletonList(path); } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +for (Path curPath : Collections.singletonList(path)) { + ret.add(curPath.getFullPath()); +} +return ret; Review comment: I'll change it. Thanks for your suggestion. 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] Ring-k commented on a change in pull request #1466: delete timeseries when path is not found
Ring-k commented on a change in pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#discussion_r450619390 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/DataAuthPlan.java ## @@ -49,6 +49,11 @@ public DataAuthPlan(OperatorType operatorType, List users) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/LoadConfigurationPlan.java ## @@ -115,6 +115,11 @@ public void deserialize(ByteBuffer buffer) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/LoadDataPlan.java ## @@ -48,6 +48,15 @@ public LoadDataPlan(String inputFilePath, String measureType) { return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +if (measureType != null) { + ret.add(measureType); +} +return ret; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/MergePlan.java ## @@ -38,4 +38,9 @@ public MergePlan() { public List getPaths() { return new ArrayList<>(); } + + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/OperateFilePlan.java ## @@ -54,6 +54,11 @@ public OperateFilePlan(File file, File targetDir, OperatorType operatorType) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/SetStorageGroupPlan.java ## @@ -57,6 +58,15 @@ public void setPath(Path path) { return ret; } + @Override + public List getPathsStrings() { +List ret = new ArrayList<>(); +if (path != null) { + ret.add(path.getFullPath()); +} +return ret; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/SetTTLPlan.java ## @@ -54,6 +54,11 @@ public SetTTLPlan(String storageGroup) { return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/ShowPlan.java ## @@ -39,6 +39,11 @@ public ShowPlan(ShowContentType showContentType){ return null; } + @Override + public List getPathsStrings() { +return null; Review comment: I'll change it. Thanks for your suggestion. ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/sys/TracingPlan.java ## @@ -38,6 +38,11 @@ public TracingPlan(boolean isTracingOn) { return new ArrayList<>(); } + @Override + public List getPathsStrings() { +return new ArrayList<>(); Review comment: I'll change it. Thanks for your suggestion. 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 #1469: Fix sonar problems in hot_compaction branch
samperson1997 opened a new pull request #1469: URL: https://github.com/apache/incubator-iotdb/pull/1469 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 #1466: delete timeseries when path is not found
sonarcloud[bot] commented on pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#issuecomment-654618523 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [13 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=list) [16.8% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=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 #1466: delete timeseries when path is not found
sonarcloud[bot] removed a comment on pull request #1466: URL: https://github.com/apache/incubator-iotdb/pull/1466#issuecomment-654591368 SonarCloud Quality Gate failed. [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [13 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=1466&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=list) [13.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=1466&metric=new_duplicated_lines_density&view=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] samperson1997 commented on a change in pull request #1411: [IOTDB-706] Introduce virtual memtable for larger Chunk
samperson1997 commented on a change in pull request #1411: URL: https://github.com/apache/incubator-iotdb/pull/1411#discussion_r450586855 ## File path: server/src/main/java/org/apache/iotdb/db/writelog/recover/TsFileRecoverPerformer.java ## @@ -80,17 +104,33 @@ public TsFileRecoverPerformer(String logNodePrefix, VersionController versionCon * @return a RestorableTsFileIOWriter if the file is not closed before crush, so this writer can Review comment: Update the comment according to new return type ## File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java ## @@ -540,6 +574,80 @@ private void releaseFlushedMemTable(IMemTable memTable) { } } + /** + * Construct the a new or get an existing TsFileSequenceReader of a TsFile. + * + * @return a TsFileSequenceReader + */ + private TsFileSequenceReader getFileReader(TsFileResource tsFileResource) throws IOException { Review comment: Will this unused method be used later? 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 opened a new pull request #1470: [IOTDB-774]Fix "show timeseries" OOM problem
JackieTien97 opened a new pull request #1470: URL: https://github.com/apache/incubator-iotdb/pull/1470 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 #1464: add cluster version mmanager
mychaow commented on a change in pull request #1464: URL: https://github.com/apache/incubator-iotdb/pull/1464#discussion_r450645944 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/CMManager.java ## @@ -0,0 +1,233 @@ +/* + * 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.cluster.metadata; + +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.metadata.MetadataException; +import org.apache.iotdb.db.exception.metadata.PathNotExistException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MeasurementMeta; +import org.apache.iotdb.db.metadata.mnode.MNode; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.TimeValuePair; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +public class CMManager extends MManager { + + private static final Logger logger = LoggerFactory.getLogger(CMManager.class); + + // currently, if a key is not existed in the mRemoteMetaCache, an IOException will be thrown + private ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock();; + private LRUCache mRemoteMetaCache; + private MetaPuller metaPuller; + + protected CMManager() { +super(); +metaPuller = MetaPuller.getInstance(); +int remoteCacheSize = config.getmRemoteSchemaCacheSize(); +mRemoteMetaCache = new LRUCache(remoteCacheSize) { + @Override + protected MeasurementMeta loadObjectByKey(String key) throws IOException { +throw new IOException(key + " not found!"); Review comment: ok ## File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/CMManager.java ## @@ -0,0 +1,233 @@ +/* + * 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.cluster.metadata; + +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.metadata.MetadataException; +import org.apache.iotdb.db.exception.metadata.PathNotExistException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MeasurementMeta; +import org.apache.iotdb.db.metadata.mnode.MNode; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.TimeValuePair; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +public class CMManager extends MManager { + + private static final Logger logger = LoggerFactory.getLogger(CMManager.class); + + // currently, if a key is not existed in the mRemoteMetaCache, an IOException will be thrown + private ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock();; + private LRUCache mRemoteMetaCache; + private
[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1464: add cluster version mmanager
mychaow commented on a change in pull request #1464: URL: https://github.com/apache/incubator-iotdb/pull/1464#discussion_r450646111 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/CMManager.java ## @@ -0,0 +1,233 @@ +/* + * 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.cluster.metadata; + +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.metadata.MetadataException; +import org.apache.iotdb.db.exception.metadata.PathNotExistException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MeasurementMeta; +import org.apache.iotdb.db.metadata.mnode.MNode; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.TimeValuePair; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +public class CMManager extends MManager { + + private static final Logger logger = LoggerFactory.getLogger(CMManager.class); + + // currently, if a key is not existed in the mRemoteMetaCache, an IOException will be thrown + private ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock();; + private LRUCache mRemoteMetaCache; + private MetaPuller metaPuller; + + protected CMManager() { +super(); +metaPuller = MetaPuller.getInstance(); +int remoteCacheSize = config.getmRemoteSchemaCacheSize(); +mRemoteMetaCache = new LRUCache(remoteCacheSize) { + @Override + protected MeasurementMeta loadObjectByKey(String key) throws IOException { +throw new IOException(key + " not found!"); + } + + @Override + public synchronized void removeItem(String key) { +cache.keySet().removeIf(s -> s.startsWith(key)); + } +}; + } + + private static class MManagerHolder { + +private MManagerHolder() { + // allowed to do nothing +} + +private static final CMManager INSTANCE = new CMManager(); + } + + /** + * we should not use this function in other place, but only in IoTDB class + * @return + */ + public static MManager getInstance() { +return CMManager.MManagerHolder.INSTANCE; + } + + @Override + public String deleteTimeseries(String prefixPath) throws MetadataException { +cacheLock.writeLock().lock(); +mRemoteMetaCache.removeItem(prefixPath); +cacheLock.writeLock().unlock(); +return super.deleteTimeseries(prefixPath); + } + + @Override + public void deleteStorageGroups(List storageGroups) throws MetadataException { +cacheLock.writeLock().lock(); +for (String storageGroup : storageGroups) { + mRemoteMetaCache.removeItem(storageGroup); +} +cacheLock.writeLock().unlock(); +super.deleteStorageGroups(storageGroups); + } + + @Override + public TSDataType getSeriesType(String path) throws MetadataException { +try { + cacheLock.readLock().lock(); + MeasurementMeta measurementMeta = mRemoteMetaCache.get(path); + return measurementMeta.getMeasurementSchema().getType(); +} catch (IOException e) { + //do nothing +} finally { + cacheLock.readLock().unlock(); +} +return super.getSeriesType(path); + } + + @Override + public MeasurementSchema[] getSchemas(String deviceId, String[] measurements) throws MetadataException { +try { + return super.getSchemas(deviceId, measurements); +} catch (MetadataException e) { + // some measurements not exist in local + // try cache + MeasurementSchema[] measurementSchemas = new MeasurementSchema[measurements.length]; + boolean allSeriesExists = true; + cacheLock.readLock().lock(); + for (int i = 0; i < measurements.length; i++) { +try { + MeasurementMeta measurementMeta = mRemoteMetaCache.get(deviceId + measurements[i]); + measurementSchemas[i] = measurementMeta
[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1464: add cluster version mmanager
mychaow commented on a change in pull request #1464: URL: https://github.com/apache/incubator-iotdb/pull/1464#discussion_r450647146 ## File path: cluster/src/main/java/org/apache/iotdb/cluster/metadata/MetaPuller.java ## @@ -0,0 +1,182 @@ +/* + * 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.cluster.metadata; + +import org.apache.iotdb.cluster.client.async.AsyncDataClient; +import org.apache.iotdb.cluster.client.sync.SyncClientAdaptor; +import org.apache.iotdb.cluster.exception.CheckConsistencyException; +import org.apache.iotdb.cluster.partition.PartitionGroup; +import org.apache.iotdb.cluster.rpc.thrift.Node; +import org.apache.iotdb.cluster.rpc.thrift.PullSchemaRequest; +import org.apache.iotdb.cluster.server.member.MetaGroupMember; +import org.apache.iotdb.db.exception.metadata.MetadataException; +import org.apache.iotdb.db.exception.metadata.StorageGroupNotSetException; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.thrift.TException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class MetaPuller { + private static final Logger logger = LoggerFactory.getLogger(MetaPuller.class); + private MetaGroupMember metaGroupMember; + + private MetaPuller() { + } + + private static class MetaPullerHolder { + +private static final MetaPuller INSTANCE = new MetaPuller(); + } + + public void init(MetaGroupMember metaGroupMember) { +this.metaGroupMember = metaGroupMember; + } + + /** + * we should not use this function in other place, but only in IoTDB class + * @return + */ + public static MetaPuller getInstance() { +return MetaPullerHolder.INSTANCE; + } + + /** + * Pull the all timeseries schemas of given prefixPaths from remote nodes. All prefixPaths must + * contain the storage group. + */ + public List pullTimeSeriesSchemas(List prefixPaths) +throws MetadataException { +logger.debug("{}: Pulling timeseries schemas of {}", metaGroupMember.getName(), prefixPaths); +// split the paths by the data groups that will hold them +Map> partitionGroupPathMap = new HashMap<>(); +for (String prefixPath : prefixPaths) { + PartitionGroup partitionGroup; + try { +partitionGroup = metaGroupMember.getPartitionTable().partitionByPathTime(prefixPath, 0); + } catch (StorageGroupNotSetException e) { +// the storage group is not found locally, but may be found in the leader, retry after +// synchronizing with the leader + +try { + metaGroupMember.syncLeaderWithConsistencyCheck(); +} catch (CheckConsistencyException checkConsistencyException) { + throw new MetadataException(checkConsistencyException.getMessage()); +} +partitionGroup = metaGroupMember.getPartitionTable().partitionByPathTime(prefixPath, 0); + + } + partitionGroupPathMap.computeIfAbsent(partitionGroup, g -> new ArrayList<>()).add(prefixPath); +} + +List schemas = new ArrayList<>(); +// pull timeseries schema from every group involved +if (logger.isDebugEnabled()) { + logger.debug("{}: pulling schemas of {} and other {} paths from {} groups", metaGroupMember.getName(), +prefixPaths.get(0), prefixPaths.size() - 1, +partitionGroupPathMap.size()); +} +for (Map.Entry> partitionGroupListEntry : partitionGroupPathMap + .entrySet()) { + PartitionGroup partitionGroup = partitionGroupListEntry.getKey(); + List paths = partitionGroupListEntry.getValue(); + pullTimeSeriesSchemas(partitionGroup, paths, schemas); +} Review comment: It will be complicated, I will do it later 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