Skip to content

Commit 3239b3d

Browse files
committed
useroot
1 parent 68944b4 commit 3239b3d

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/manual/IoTDBPipeInclusionIT.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,24 +193,26 @@ public void testPureSchemaInclusionWithExclusionPattern() throws Exception {
193193

194194
try (final SyncConfigNodeIServiceClient client =
195195
(SyncConfigNodeIServiceClient) senderEnv.getLeaderConfigNodeConnection()) {
196-
final Map<String, String> extractorAttributes = new HashMap<>();
196+
final Map<String, String> sourceAttributes = new HashMap<>();
197197
final Map<String, String> processorAttributes = new HashMap<>();
198-
final Map<String, String> connectorAttributes = new HashMap<>();
198+
final Map<String, String> sinkAttributes = new HashMap<>();
199+
200+
sourceAttributes.put("extractor.inclusion", "schema");
201+
sourceAttributes.put("user", "root");
199202

200-
extractorAttributes.put("extractor.inclusion", "schema");
201203
// Include root.ln.**
202-
extractorAttributes.put("path", "root.ln.**");
204+
sourceAttributes.put("path", "root.ln.**");
203205
// Exclude root.ln.wf02.* and root.ln.wf03.wt01.status
204-
extractorAttributes.put("path.exclusion", "root.ln.wf02.**, root.ln.wf03.wt01.status");
206+
sourceAttributes.put("path.exclusion", "root.ln.wf02.**, root.ln.wf03.wt01.status");
205207

206-
connectorAttributes.put("connector", "iotdb-thrift-connector");
207-
connectorAttributes.put("connector.ip", receiverIp);
208-
connectorAttributes.put("connector.port", Integer.toString(receiverPort));
208+
sinkAttributes.put("connector", "iotdb-thrift-connector");
209+
sinkAttributes.put("connector.ip", receiverIp);
210+
sinkAttributes.put("connector.port", Integer.toString(receiverPort));
209211

210212
final TSStatus status =
211213
client.createPipe(
212-
new TCreatePipeReq("testPipe", connectorAttributes)
213-
.setExtractorAttributes(extractorAttributes)
214+
new TCreatePipeReq("testPipe", sinkAttributes)
215+
.setExtractorAttributes(sourceAttributes)
214216
.setProcessorAttributes(processorAttributes));
215217

216218
Assert.assertEquals(TSStatusCode.SUCCESS_STATUS.getStatusCode(), status.getCode());

iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBNonDataRegionSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public EnrichedEvent supply() throws Exception {
244244
pipeName,
245245
creationTime,
246246
pipeTaskMeta,
247-
(TreePattern) treePattern,
247+
treePattern,
248248
tablePattern,
249249
userId,
250250
userName,

0 commit comments

Comments
 (0)