-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pipe: Double-living Semantic Correction to Forward Events from Cluster A to B by Default Unless They Originate from B #15112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
cf53a0f
clusterId
XNX02 1b0ad1e
update
XNX02 9af0445
update
XNX02 03bbeb4
Merge branch 'master' of https://github.com/apache/iotdb into double-…
XNX02 690caa0
schema
XNX02 23029c9
config
XNX02 8fdca08
config procudure
XNX02 897d41a
update originclusteid
XNX02 1a1cb5e
update configregionxtratctor
XNX02 998f491
fix clusterId
XNX02 3d828a3
update
XNX02 1efd28e
update
XNX02 3584efd
Merge branch 'master' of https://github.com/apache/iotdb into double-…
XNX02 37aaba1
deletedata
XNX02 edee9e8
table model
XNX02 1f0c9b5
tsfile simple
XNX02 02fbfe9
update
XNX02 ec94f2f
Merge branch 'master' of https://github.com/apache/iotdb into double-…
XNX02 4df0f9d
improve
XNX02 13eff8b
update
XNX02 7b7abbb
add UT for PipeEnrichedProcedureTest
XNX02 4d00afa
Merge branch 'master' of https://github.com/apache/iotdb into double-…
XNX02 6a3284f
update
XNX02 f735818
serialize&deserialize
XNX02 0c0d90e
update
XNX02 3b4e37e
Merge branch 'master' of https://github.com/apache/iotdb into double-…
XNX02 af22cab
fix
XNX02 0c4b22c
update
XNX02 62b00d4
update
XNX02 4779f7c
pipeenrichedplanV2
XNX02 2e3feb7
update
XNX02 2b1df48
update
XNX02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
.../org/apache/iotdb/confignode/consensus/request/write/pipe/payload/PipeEnrichedPlanV2.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| /* | ||
| * 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.confignode.consensus.request.write.pipe.payload; | ||
|
|
||
| import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlan; | ||
| import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlanType; | ||
|
|
||
| import org.apache.tsfile.utils.ReadWriteIOUtils; | ||
|
|
||
| import java.io.DataOutputStream; | ||
| import java.io.IOException; | ||
| import java.nio.ByteBuffer; | ||
| import java.util.Objects; | ||
|
|
||
| public class PipeEnrichedPlanV2 extends PipeEnrichedPlanV1 { | ||
|
|
||
| private String originClusterId; | ||
|
|
||
| public PipeEnrichedPlanV2() { | ||
| super(ConfigPhysicalPlanType.PipeEnrichedV2); | ||
| } | ||
|
|
||
| public PipeEnrichedPlanV2(ConfigPhysicalPlan innerPlan, String originClusterId) { | ||
| super(ConfigPhysicalPlanType.PipeEnrichedV2); | ||
| this.innerPlan = innerPlan; | ||
| this.originClusterId = originClusterId; | ||
| } | ||
|
|
||
| public String getOriginClusterId() { | ||
| return originClusterId; | ||
| } | ||
|
|
||
| @Override | ||
| protected void serializeImpl(DataOutputStream stream) throws IOException { | ||
| super.serializeImpl(stream); | ||
| ReadWriteIOUtils.write(originClusterId, stream); | ||
| } | ||
|
|
||
| @Override | ||
| protected void deserializeImpl(ByteBuffer buffer) throws IOException { | ||
| super.deserializeImpl(buffer); | ||
| originClusterId = ReadWriteIOUtils.readString(buffer); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object obj) { | ||
| if (this == obj) { | ||
| return true; | ||
| } | ||
| if (obj == null || getClass() != obj.getClass()) { | ||
| return false; | ||
| } | ||
| PipeEnrichedPlanV2 that = (PipeEnrichedPlanV2) obj; | ||
| return innerPlan.equals(that.innerPlan) | ||
| && Objects.equals(originClusterId, that.originClusterId); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(innerPlan, originClusterId); | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "PipeEnrichedPlanV2{" + "innerPlan='" + innerPlan + "'}"; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better add "originClusterId" here