From hdfs-issues-return-231846-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Sep 3 10:28: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 83FE1180663 for ; Mon, 3 Sep 2018 10:28:03 +0200 (CEST) Received: (qmail 58128 invoked by uid 500); 3 Sep 2018 08:28:02 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 57417 invoked by uid 99); 3 Sep 2018 08:28:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2018 08:28:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DCD64180943 for ; Mon, 3 Sep 2018 08:28:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, 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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uEn2n1LofLEH for ; Mon, 3 Sep 2018 08:28: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 D2B925F1B3 for ; Mon, 3 Sep 2018 08:28: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 765A9E0177 for ; Mon, 3 Sep 2018 08:28: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 343242183D for ; Mon, 3 Sep 2018 08:28:00 +0000 (UTC) Date: Mon, 3 Sep 2018 08:28:00 +0000 (UTC) From: "yanghuafeng (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13845) RBF: The default MountTableResolver should fail resolving multi-destination paths 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-13845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601882#comment-16601882 ] yanghuafeng commented on HDFS-13845: ------------------------------------ Improve checkstyle issue. > RBF: The default MountTableResolver should fail resolving multi-destination paths > --------------------------------------------------------------------------------- > > Key: HDFS-13845 > URL: https://issues.apache.org/jira/browse/HDFS-13845 > Project: Hadoop HDFS > Issue Type: Bug > Components: federation, hdfs > Affects Versions: 3.0.0, 3.1.0, 2.9.1 > Reporter: yanghuafeng > Assignee: yanghuafeng > Priority: Major > Attachments: HDFS-13845.001.patch, HDFS-13845.002.patch, HDFS-13845.003.patch > > > When we use the default MountTableResolver to resolve the path, we cannot get the destination paths for the default DestinationOrder.HASH. > {code:java} > // Some comments here > private static PathLocation buildLocation( > ...... > List locations = new LinkedList<>(); > for (RemoteLocation oneDst : entry.getDestinations()) { > String nsId = oneDst.getNameserviceId(); > String dest = oneDst.getDest(); > String newPath = dest; > if (!newPath.endsWith(Path.SEPARATOR) && !remainingPath.isEmpty()) { > newPath += Path.SEPARATOR; > } > newPath += remainingPath; > RemoteLocation remoteLocation = new RemoteLocation(nsId, newPath, path); > locations.add(remoteLocation); > } > DestinationOrder order = entry.getDestOrder(); > return new PathLocation(srcPath, locations, order); > } > {code} > The default order will be hash, but the HashFirstResolver will not be invoked to order the location. > It is ambiguous for the MountTableResolver that we will see the HASH order in the web ui for multi-destinations path but we cannot get the result. > In my opinion, the MountTableResolver will be a simple resolver to implement 1 to 1 not including the 1 to n destinations. So we should check the buildLocation. If the entry has multi destinations, we should reject it. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org