async fn create_datanode_client(
datanode: &Datanode,
addr: &str,
rpc_stats: Option<Arc<DatanodeRpcStats>>,
) -> (String, Client)Expand description
Serves the region server of datanode and returns the address and the client of the address.
The returned client is always an in-process duplex client, keeping its traffic out of
rpc_stats. The frontend can instead use separate TCP clients when opted in.
test_util::PEER_PLACEHOLDER_ADDR is not a real address, so it cannot be served over the
network at all. Any other address is a real one: the region server is additionally served on
its local TCP port, and rpc_stats counts requests reaching that port.