public boolean checkDeviceNodeExists(PartialPath deviceId) {
    ICachedMNode deviceMNode = null;
    try {
      deviceMNode = getNodeByPath(deviceId);
      return deviceMNode.isDevice();
    } catch (MetadataException e) {
      return false;
    } finally {
      if (deviceMNode != null) {
        unPinMNode(deviceMNode);
      }
    }
  }
Check if the device node exists

@param deviceId full path of device
@return true if the device node exists
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java