private static void setTimeout(HttpURLConnection connection) { if (timeout <= 0) { Configuration conf = new HdfsConfiguration(); timeout = conf.getInt(DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_KEY, DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT); LOG.info("Image Transfer timeout configured to " + timeout + " milliseconds"); } Util.setTimeout(connection, timeout); } }
setTimeout(connection, timeout);