We retry several times here.
On the first nCachedConnRetry times, we try to fetch a socket from
the socketCache and use it.  This may fail, since the old socket may
have been closed by the peer.
After that, we try to create a new socket using newPeer().
This may create either a TCP socket or a UNIX domain socket, depending
on the configuration and whether the peer is remote.
If we try to create a UNIX domain socket and fail, we will not try that
again.  Instead, we'll try to create a TCP socket.  Only after we've
failed to create a TCP-based BlockReader will we throw an IOException
from this function.  Throwing an IOException from here is basically
equivalent to declaring the DataNode bad.