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 04AF511F22 for ; Tue, 13 May 2014 20:45:56 +0000 (UTC) Received: (qmail 96089 invoked by uid 500); 13 May 2014 13:39:16 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 96047 invoked by uid 500); 13 May 2014 13:39:16 -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 96036 invoked by uid 99); 13 May 2014 13:39:16 -0000 Received: from Unknown (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2014 13:39:16 +0000 Date: Tue, 13 May 2014 13:39:16 +0000 (UTC) From: "Daryn Sharp (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6371) In HA setup, the standby NN should redirect WebHDFS write requests to the active NN 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-6371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13996394#comment-13996394 ] Daryn Sharp commented on HDFS-6371: ----------------------------------- Agreed on client side retries. With IP-based failover, a standby NN that attempts to redirect to the other NN will create a redirect loop to itself until the IP failover to the active occurs. > In HA setup, the standby NN should redirect WebHDFS write requests to the active NN > ----------------------------------------------------------------------------------- > > Key: HDFS-6371 > URL: https://issues.apache.org/jira/browse/HDFS-6371 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode, webhdfs > Reporter: Tsz Wo Nicholas Sze > Assignee: Tsz Wo Nicholas Sze > > The current WebHDFS implementation in namenode does not check its HA state -- it does the same thing no matter it is active or standby. > Suppose a http client talk to the standby NN via WebHDFS. For the read operations, there is no problem. For the write operations, if the operation requires http redirect (e.g. creating a file), it will work since the standby NN will also redirect the client to a DN. When the client connect to the DN, the DN will fulfill the request with the active NN. However, for the write operations not requiring http redirect (e.g. mkdir), the operation will fail with StandbyException since it will be executed with the standby NN. > There are two solutions: > # The http client could catch StandbyException and then retries with the other NN in this case. > # The standby NN redirects the request to the active NN. > The second solution seems better since the client does not need to know both active NN and standby NN. > Note that WebHdfsFileSystem is already able to handle HA failover. The JIRA is for other http clients. -- This message was sent by Atlassian JIRA (v6.2#6252)