Cpaulyz commented on code in PR #9243:
URL: https://github.com/apache/iotdb/pull/9243#discussion_r1134921588
##########
server/src/main/java/org/apache/iotdb/db/metadata/mtree/IMTreeBelowSG.java:
##########
@@ -33,7 +33,7 @@
import java.util.Map;
import java.util.Set;
-public interface IMTreeBelowSG {
+public interface IMTreeBelowSG<N extends IMNode<N>> {
Review Comment:
Add todo. Lets eliminate it in another PR.
##########
server/src/main/java/org/apache/iotdb/db/metadata/mtree/store/IMTreeStore.java:
##########
@@ -61,33 +61,33 @@ public interface IMTreeStore {
* @param name name or alias
* @return child node
*/
- IMNode getChild(IMNode parent, String name) throws MetadataException;
+ N getChild(N parent, String name) throws MetadataException;
- IMNodeIterator getChildrenIterator(IMNode parent) throws MetadataException;
+ IMNodeIterator<N> getChildrenIterator(N parent) throws MetadataException;
- IMNodeIterator getTraverserIterator(
- IMNode parent, Map<Integer, Template> templateMap, boolean
skipPreDeletedSchema)
+ IMNodeIterator<N> getTraverserIterator(
+ N parent, Map<Integer, Template> templateMap, boolean
skipPreDeletedSchema)
throws MetadataException;
- IMNode addChild(IMNode parent, String childName, IMNode child);
+ N addChild(N parent, String childName, N child);
- void deleteChild(IMNode parent, String childName) throws MetadataException;
+ void deleteChild(N parent, String childName) throws MetadataException;
- void updateMNode(IMNode node) throws MetadataException;
+ void updateMNode(N node) throws MetadataException;
- IEntityMNode setToEntity(IMNode node) throws MetadataException;
+ IDeviceMNode<N> setToEntity(N node) throws MetadataException;
- IMNode setToInternal(IEntityMNode entityMNode) throws MetadataException;
+ N setToInternal(IDeviceMNode<N> entityMNode) throws MetadataException;
- void setAlias(IMeasurementMNode measurementMNode, String alias) throws
MetadataException;
+ void setAlias(IMeasurementMNode<N> measurementMNode, String alias) throws
MetadataException;
- void pin(IMNode node) throws MetadataException;
+ void pin(N node) throws MetadataException;
- void unPin(IMNode node);
+ void unPin(N node);
- void unPinPath(IMNode node);
+ void unPinPath(N node);
Review Comment:
Yes.. but it's still be used in SchemaRegionSchemaFileImpl. I added these
todo's about a month ago..
```
// TODO: This interface should not be exposed to SchemaRegion
public void pinMNode(ICacheMNode node) throws MetadataException {
store.pin(node);
}
// TODO: This interface should not be exposed to SchemaRegion
public void unPinMNode(ICacheMNode node) {
store.unPin(node);
}
private void unPinPath(ICacheMNode node) {
store.unPinPath(node);
}
// TODO: This interface should not be exposed to SchemaRegion
public void updateMNode(ICacheMNode node) throws MetadataException {
store.updateMNode(node);
}
```
##########
server/src/main/java/org/apache/iotdb/db/metadata/mnode/schemafile/ICacheMNode.java:
##########
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.iotdb.db.metadata.mtree.multimode;
+package org.apache.iotdb.db.metadata.mnode.schemafile;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.commons.schema.node.IMNode;
+import org.apache.iotdb.db.metadata.mtree.store.disk.cache.CacheEntry;
-public class MTreeFullMemoryTest extends MTreeDiskModeTest {
- @Override
- protected void setMemSize() {
-
IoTDBDescriptor.getInstance().getConfig().setCachedMNodeSizeInSchemaFileMode(10000);
- }
+public interface ICacheMNode extends IMNode<ICacheMNode> {
Review Comment:
done
--
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]