Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 002DC17C14 for ; Mon, 6 Apr 2015 21:01:12 +0000 (UTC) Received: (qmail 90133 invoked by uid 500); 6 Apr 2015 21:01:12 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 90070 invoked by uid 500); 6 Apr 2015 21:01:12 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 90058 invoked by uid 99); 6 Apr 2015 21:01:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 21:01:12 +0000 Date: Mon, 6 Apr 2015 21:01:12 +0000 (UTC) From: "Kihwal Lee (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8068) Do not retry rpc calls If the proxy contains unresolved address MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-8068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481923#comment-14481923 ] Kihwal Lee commented on HDFS-8068: ---------------------------------- The patch adds a check in {{NameNodeProxies#createNonHAProxy()}}. If the address is unresolved (i.e. cannot be resolved), it throws. This makes the rpc proxy creation fail for both HA and non-HA case. In HA, failover proxy providers get this exception and thow a {{RunTimeException}} in {{getProxy()}}, which is called by {{RetryInvocationHandler}} in its ctor or {{invoke()}} during failover. If {{ConfiguredFailoverProxyProvider}} is used and the initial proxy object was okay, the second {{getProxy()}} call from {{invoke()}} will throw. In this case, the particular call will fail instead of the proxy creation. The (ha)proxy in the {{DFSClient}} instance is still intact, so creation of underlying non-HA proxy will be retried in the next call. > Do not retry rpc calls If the proxy contains unresolved address > --------------------------------------------------------------- > > Key: HDFS-8068 > URL: https://issues.apache.org/jira/browse/HDFS-8068 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Kihwal Lee > Assignee: Kihwal Lee > Attachments: HDFS-8068.v1.patch > > > When the InetSocketAddress object happens to be unresolvable (e.g. due to transient DNS issue), the rpc proxy object will not be usable since the client will throw UnknownHostException when a Connection object is created. If FailoverOnNetworkExceptionRetry is used as in the standard HA failover proxy, the call will be retried, but this will never recover. Instead, the validity of address must be checked on pxoy creation and throw if it is invalid. -- This message was sent by Atlassian JIRA (v6.3.4#6332)