Cpaulyz opened a new pull request, #8721:
URL: https://github.com/apache/iotdb/pull/8721
## Description
1. Separate filtering and business logic in AbstractTreeVisitor.
```
/**
* Internal-match means the node matches an internal node name of the
given path pattern. root.sg
* internal match root.sg.**(pattern). This method should be implemented
according to concrete
* tasks.
*
* <p>Return whether the subtree of given node should be processed. If
return true, the traversing
* process will keep traversing the subtree. If return false, the
traversing process will skip the
* subtree of given node.
*/
protected abstract boolean processInternalMatchedNode(N node) throws
Exception;
/**
* Full-match means the node matches the last node name of the given path
pattern. root.sg.d full
* match root.sg.**(pattern) This method should be implemented according
to concrete tasks.
*
* <p>Return whether the subtree of given node should be processed. If
return true, the traversing
* process will keep traversing the subtree. If return false, the
traversing process will skip the
* subtree of given node.
*/
protected abstract boolean processFullMatchedNode(N node) throws Exception;
/** Only accepted nodes will be considered for hasNext() and next() */
protected abstract boolean acceptNode(N node) throws Exception;
```
2. Injecting logic for releasing node resources in the AbstractTreeVistor
framework. In ClusterSchemaTreeTest, a Mock test class
`MockSchemaTreeMeasurementVisitor` is used to simulate the pin and unpin
process to test this releasing logic.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]