public NodeStatus getNodeStatus(int nodeId) {
    return Optional.ofNullable(nodeCacheMap.get(nodeId))
        .map(BaseNodeCache::getNodeStatus)
        .orElse(NodeStatus.Unknown);
  }
Safely get NodeStatus by NodeId.

@param nodeId The specified NodeId
@return NodeStatus of the specified Node. Unknown if cache doesn't exist.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/LoadCache.java