public DomainSocket createSocket(PathInfo info, int socketTimeout) { Preconditions.checkArgument(info.getPathState() != PathState.UNUSABLE); boolean success = false; DomainSocket sock = null; try { sock = DomainSocket.connect(info.getPath()); sock.setAttribute(DomainSocket.RECEIVE_TIMEOUT, socketTimeout); success = true; } catch (IOException e) { LOG.warn("error creating DomainSocket", e); // fall through } finally { if (!success) { if (sock != null) { IOUtils.closeQuietly(sock); } pathMap.put(info.getPath(), PathState.UNUSABLE); sock = null; } } return sock; }
public DomainSocket createSocket(PathInfo info, int socketTimeout) { Preconditions.checkArgument(info.getPathState() != PathState.UNUSABLE); boolean success = false; DomainSocket sock = null; try { sock = DomainSocket.connect(info.getPath()); sock.setAttribute(DomainSocket.RECEIVE_TIMEOUT, socketTimeout); success = true; } catch (IOException e) { LOG.warn("error creating DomainSocket", e); // fall through } finally { if (!success) { if (sock != null) { IOUtils.closeQuietly(sock); } pathMap.put(info.getPath(), PathState.UNUSABLE); sock = null; } } return sock; }
getPathInfo(inetSocketAddress, conf); if (!pathInfo.getPathState().getUsableForDataTransfer()) { PerformanceAdvisory.LOG.debug(this + ": not trying to create a " + "remote block reader because the UNIX domain socket at " +
getPathInfo(inetSocketAddress, conf); if (!pathInfo.getPathState().getUsableForDataTransfer()) { PerformanceAdvisory.LOG.debug(this + ": not trying to create a " + "remote block reader because the UNIX domain socket at " +
.getPathInfo(inetSocketAddress, conf.getShortCircuitConf()); if (!pathInfo.getPathState().getUsableForDataTransfer()) { PerformanceAdvisory.LOG.debug("{}: not trying to create a " + "remote block reader because the UNIX domain socket at {}" +
getPathInfo(inetSocketAddress, conf); if (!pathInfo.getPathState().getUsableForShortCircuit()) { PerformanceAdvisory.LOG.debug(this + ": " + pathInfo + " is not " + "usable for short circuit; giving up on BlockReaderLocal.");
getPathInfo(inetSocketAddress, conf); if (!pathInfo.getPathState().getUsableForShortCircuit()) { PerformanceAdvisory.LOG.debug(this + ": " + pathInfo + " is not " + "usable for short circuit; giving up on BlockReaderLocal.");
.getPathInfo(inetSocketAddress, conf.getShortCircuitConf()); if (!pathInfo.getPathState().getUsableForShortCircuit()) { PerformanceAdvisory.LOG.debug("{}: {} is not usable for short circuit; " + "giving up on BlockReaderLocal.", this, pathInfo);
public DomainSocket createSocket(PathInfo info, int socketTimeout) { Preconditions.checkArgument(info.getPathState() != PathState.UNUSABLE); boolean success = false; DomainSocket sock = null; try { sock = DomainSocket.connect(info.getPath()); sock.setAttribute(DomainSocket.RECEIVE_TIMEOUT, socketTimeout); success = true; } catch (IOException e) { LOG.warn("error creating DomainSocket", e); // fall through } finally { if (!success) { if (sock != null) { IOUtils.closeQuietly(sock); } pathMap.put(info.getPath(), PathState.UNUSABLE); sock = null; } } return sock; }