Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B1A45200CD3 for ; Fri, 28 Jul 2017 20:24:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B00E216D523; Fri, 28 Jul 2017 18:24:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0205E16D522 for ; Fri, 28 Jul 2017 20:24:04 +0200 (CEST) Received: (qmail 49257 invoked by uid 500); 28 Jul 2017 18:24:04 -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 49246 invoked by uid 99); 28 Jul 2017 18:24:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2017 18:24:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6DFBDC00A6 for ; Fri, 28 Jul 2017 18:24:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oi4UT7wdfzAc for ; Fri, 28 Jul 2017 18:24: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 34A4C5FD38 for ; Fri, 28 Jul 2017 18:24:01 +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 BD1FEE0999 for ; Fri, 28 Jul 2017 18:24: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 164432464C for ; Fri, 28 Jul 2017 18:24:00 +0000 (UTC) Date: Fri, 28 Jul 2017 18:24:00 +0000 (UTC) From: "Chris Douglas (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10880) Federation Mount Table State Store internal API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 28 Jul 2017 18:24:05 -0000 [ https://issues.apache.org/jira/browse/HDFS-10880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16105436#comment-16105436 ] Chris Douglas commented on HDFS-10880: -------------------------------------- * {{MountTableResolver}} doesn't have a consistent locking model. Most operations use the {{treeLock}} (e.g., when cleared) and {{cacheLock}} is only used in {{getDestinationForPath}}. Similarly, results from the {{PathTree}} are resolved against the {{cache}} without holding any locks, though both may be modified concurrently. Would a r/w lock be sufficient? * In {{InvalidateLocationCache}}: {noformat} + // TODO Determine next lexographic entry after source path + String nextSrc = path + "ZZZZ"; + ConcurrentNavigableMap subMap = + locationCache.subMap(path, nextSrc); {noformat} Instead of appending "ZZZZ" (which may not work for other locales), this can use a different version of [subMap|https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentNavigableMap.html#subMap-K-boolean-K-boolean-] * Duplicate methods in {{PathLocation}}: {{getDestOrder}} and {{getDestinationOrder}}. Is either necessary? This attribute is also persisted. * {{PathLocation#prioritizeNamespace}} modifies the destination list under a lock, but the list is accessed without locks within the class and through references that escape. ** This overrides the declared destination order for the record? It may simplify the design to make each {{PathLocation}} immutable, and reorder them by replacing entries (unless they're shared). * This includes some classes (e.g., {{CachedRecordStore}}) also in HDFS-10687 * How are the comparators in {{MountTable}} used? Are these vestigial? * The {{PathTree}} and {{PathTreeNode}} classes implement a quasi-Visitor pattern for maintaining mount points. Are the traversal/query semantics used elsewhere? In this patch, it looks like all the required operations could (exact-match, longest-match, etc.) could be implemented less expensively in a [NavigableMap|https://docs.oracle.com/javase/8/docs/api/java/util/NavigableMap.html] > Federation Mount Table State Store internal API > ----------------------------------------------- > > Key: HDFS-10880 > URL: https://issues.apache.org/jira/browse/HDFS-10880 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: fs > Reporter: Jason Kace > Assignee: Inigo Goiri > Attachments: HDFS-10880-HDFS-10467-000.patch, HDFS-10880-HDFS-10467-001.patch, HDFS-10880-HDFS-10467-002.patch > > > The Federation Mount Table State encapsulates the mapping of file paths in the global namespace to a specific NN(nameservice) and local NN path. The mount table is shared by all router instances and represents a unified view of the global namespace. The state store API for the mount table allows the related records to be queried, updated and deleted. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org