You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/04/12 11:58:27 UTC
[GitHub] [iotdb] CRZbulabula opened a new pull request, #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
CRZbulabula opened a new pull request, #5493:
URL: https://github.com/apache/iotdb/pull/5493
changes:
- Support PatternTree in ConfigNode
- Normalize thrift interfaces. See [ConfigNode for DataNode RPC 接口定义](https://y8dp9fjm8f.feishu.cn/docs/doccnCp13O7QDU7O6GMvagUwEDc#), [common.thrift 定义](https://y8dp9fjm8f.feishu.cn/docs/doccnwYEhSIw2a1Qo1F2KXsfLIb#zSavsx) for more details.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] wangchao316 merged pull request #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
Posted by GitBox <gi...@apache.org>.
wangchao316 merged PR #5493:
URL: https://github.com/apache/iotdb/pull/5493
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] CRZbulabula commented on a diff in pull request #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
Posted by GitBox <gi...@apache.org>.
CRZbulabula commented on code in PR #5493:
URL: https://github.com/apache/iotdb/pull/5493#discussion_r849013353
##########
confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java:
##########
@@ -108,7 +108,7 @@ public static PhysicalPlan create(ByteBuffer buffer) throws IOException {
plan = new GetOrCreateSchemaPartitionPlan(PhysicalPlanType.GetSchemaPartition);
break;
case CreateSchemaPartition:
- plan = new CreateSchemaPartitionPlan(PhysicalPlanType.CreateSchemaPartition);
+ plan = new CreateSchemaPartitionPlan();
Review Comment:
I distinguish the operations between query and write about PartitionTable in ConfigNode. When DataNode send a getOrCreate request, ConfigNode first check if there exists Partitions that haven't been assigned. And ConfigNode will use create plan to allocate these non-assigned Partitions.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] CRZbulabula commented on a diff in pull request #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
Posted by GitBox <gi...@apache.org>.
CRZbulabula commented on code in PR #5493:
URL: https://github.com/apache/iotdb/pull/5493#discussion_r849014545
##########
confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/DataPartitionDataSet.java:
##########
@@ -97,14 +98,12 @@ public void convertToRpcDataPartitionResp(TDataPartitionResp resp) {
regionReplicaSets.forEach(
regionReplicaSet -> {
TRegionReplicaSet tRegionReplicaSet = new TRegionReplicaSet();
-
// Set TRegionReplicaSet's RegionId
- tRegionReplicaSet.setRegionId(
- regionReplicaSet.getConsensusGroupId().getId());
-
- // Set TRegionReplicaSet's GroupType
- tRegionReplicaSet.setGroupType("DataRegion");
-
+ ByteBuffer buffer =
+ ByteBuffer.allocate(Byte.BYTES + Integer.BYTES);
+ regionReplicaSet.getConsensusGroupId().serializeImpl(buffer);
+ buffer.flip();
+ tRegionReplicaSet.setRegionId(buffer);
Review Comment:
We redefine the regionId in TRegionReplicaSet. You can see [commmon.thrift](https://y8dp9fjm8f.feishu.cn/docs/doccnwYEhSIw2a1Qo1F2KXsfLIb#zSavsx) for more details~
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] CRZbulabula commented on a diff in pull request #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
Posted by GitBox <gi...@apache.org>.
CRZbulabula commented on code in PR #5493:
URL: https://github.com/apache/iotdb/pull/5493#discussion_r849013884
##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java:
##########
@@ -123,26 +132,94 @@ public TSStatus setStorageGroup(PhysicalPlan physicalPlan) {
}
@Override
- public DataSet getSchemaPartition(PhysicalPlan physicalPlan) {
+ public DataSet getSchemaPartition(PathPatternTree patternTree) {
+ TSStatus status = confirmLeader();
Review Comment:
For now, we first give all read and write requests to the leader for execution, and then further optimize with the consensus layer.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [iotdb] wangchao316 commented on a diff in pull request #5493: [IOTDB-2866] Support get or create SchemaPartition with PatternTree in config node
Posted by GitBox <gi...@apache.org>.
wangchao316 commented on code in PR #5493:
URL: https://github.com/apache/iotdb/pull/5493#discussion_r848984286
##########
confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/DataPartitionDataSet.java:
##########
@@ -97,14 +98,12 @@ public void convertToRpcDataPartitionResp(TDataPartitionResp resp) {
regionReplicaSets.forEach(
regionReplicaSet -> {
TRegionReplicaSet tRegionReplicaSet = new TRegionReplicaSet();
-
// Set TRegionReplicaSet's RegionId
- tRegionReplicaSet.setRegionId(
- regionReplicaSet.getConsensusGroupId().getId());
-
- // Set TRegionReplicaSet's GroupType
- tRegionReplicaSet.setGroupType("DataRegion");
-
+ ByteBuffer buffer =
+ ByteBuffer.allocate(Byte.BYTES + Integer.BYTES);
+ regionReplicaSet.getConsensusGroupId().serializeImpl(buffer);
+ buffer.flip();
+ tRegionReplicaSet.setRegionId(buffer);
Review Comment:
why?
##########
confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java:
##########
@@ -108,7 +108,7 @@ public static PhysicalPlan create(ByteBuffer buffer) throws IOException {
plan = new GetOrCreateSchemaPartitionPlan(PhysicalPlanType.GetSchemaPartition);
break;
case CreateSchemaPartition:
- plan = new CreateSchemaPartitionPlan(PhysicalPlanType.CreateSchemaPartition);
+ plan = new CreateSchemaPartitionPlan();
Review Comment:
should be GetSchemaPartitionPlan?
##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java:
##########
@@ -123,26 +132,94 @@ public TSStatus setStorageGroup(PhysicalPlan physicalPlan) {
}
@Override
- public DataSet getSchemaPartition(PhysicalPlan physicalPlan) {
+ public DataSet getSchemaPartition(PathPatternTree patternTree) {
+ TSStatus status = confirmLeader();
Review Comment:
getSchemaPartition should connect all node ,include follwer node. follwer node return result.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org