From hdfs-dev-return-33120-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Jul 4 14:49:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 97C41180608 for ; Wed, 4 Jul 2018 14:49:03 +0200 (CEST) Received: (qmail 64976 invoked by uid 500); 4 Jul 2018 12:49:02 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 64965 invoked by uid 99); 4 Jul 2018 12:49:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2018 12:49:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E81D21A3C34 for ; Wed, 4 Jul 2018 12:49:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Gi1c-Mtfaxjc for ; Wed, 4 Jul 2018 12:49:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C768D5F238 for ; Wed, 4 Jul 2018 12:49:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5D385E00A7 for ; Wed, 4 Jul 2018 12:49:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1665327504 for ; Wed, 4 Jul 2018 12:49:00 +0000 (UTC) Date: Wed, 4 Jul 2018 12:49:00 +0000 (UTC) From: "Kitti Nanasi (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-13719) Docs around dfs.image.transfer.timeout are misleading MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Kitti Nanasi created HDFS-13719: ----------------------------------- Summary: Docs around dfs.image.transfer.timeout are misleading Key: HDFS-13719 URL: https://issues.apache.org/jira/browse/HDFS-13719 Project: Hadoop HDFS Issue Type: Improvement Affects Versions: 3.1.0 Reporter: Kitti Nanasi Assignee: Kitti Nanasi The Jira=C2=A0https://issues.apache.org/jira/browse/HDFS-1490=C2=A0added th= e parameter dfs.image.transfer.timeout to HDFS. From the patch (and checkin= g the current code), we can see this parameter governs a socket timeout on = the a java.net.HttpURLConnection object: {code:java} + if (timeout <=3D 0) { + // Set the ping interval as timeout + Configuration conf =3D new HdfsConfiguration(); + timeout =3D conf.getInt(DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_KEY= , + DFSConfigKeys.DFS_IMAGE_TRANSFER_TIMEOUT_DEFAULT); + } + + if (timeout > 0) { + connection.setConnectTimeout(timeout); + connection.setReadTimeout(timeout); + } + {code} In the above 'connection' is a java.net.HttpURLConnection. There is a general disbelief in the community that dfs.image.transfer.timeo= ut is the time the entire image must transfer within, however that does not= appear to be the case. The timeout is actually the max time the client wil= l block on the socket before giving up if it cannot get data to read. I gue= ss the idea here is to protect the client from hanging forever if the serve= r hangs. The docs in hdfs-site.xml are partly what causes this confusion, as they ar= e very misleading: {code:xml} dfs.image.transfer.timeout 60000 Socket timeout for image transfer in milliseconds. This timeout and= the related dfs.image.transfer.bandwidthPerSec parameter should be configured s= uch that normal image transfer can complete successfully. This timeout prevents client hangs when the sender fails during image transfer. This is socket timeout during image tranfer. {code} The start and end of the statement is accurate, but the part "This timeout = and the related dfs.image.transfer.bandwidthPerSec parameter should be conf= igured such that normal image transfer can complete successfully." is misle= ading. There is almost never a reason to change the above in conjunction wi= th the bandwidth setting. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org