get_xname_from_nid_hostlist

Function get_xname_from_nid_hostlist 

Source
pub fn get_xname_from_nid_hostlist(
    node_vec: &[String],
    node_metadata_available_vec: &[Component],
) -> Result<Vec<String>, Error>
Expand description

Resolve a NID hostlist expression to xnames by cross-referencing available node metadata.

node_vec is the already-expanded NID list (every entry must be the 9-character nidNNNNNN form). The lookup builds a single HashSet<usize> of short NIDs and scans node_metadata_available_vec once, so the cost is O(N + M) rather than O(N·M).

§Errors

[Error::InvalidNodeId] when an entry is the wrong length, lacks the nid prefix, or has non-numeric digits after the prefix.