From yarn-issues-return-166172-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Fri Apr 5 11:44:02 2019 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 D5B0E18060F for ; Fri, 5 Apr 2019 13:44:01 +0200 (CEST) Received: (qmail 79378 invoked by uid 500); 5 Apr 2019 11:44:01 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 79355 invoked by uid 99); 5 Apr 2019 11:44:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2019 11:44:00 +0000 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 7C532E28DA for ; Fri, 5 Apr 2019 11:44: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 270A22459B for ; Fri, 5 Apr 2019 11:44:00 +0000 (UTC) Date: Fri, 5 Apr 2019 11:44:00 +0000 (UTC) From: "Szilard Nemeth (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-9098) Separate mtab file reader code and cgroups file system hierarchy parser code from CGroupsHandlerImpl and ResourceHandlerModule 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/YARN-9098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Szilard Nemeth updated YARN-9098: --------------------------------- Attachment: YARN-9098.008.patch > Separate mtab file reader code and cgroups file system hierarchy parser code from CGroupsHandlerImpl and ResourceHandlerModule > ------------------------------------------------------------------------------------------------------------------------------ > > Key: YARN-9098 > URL: https://issues.apache.org/jira/browse/YARN-9098 > Project: Hadoop YARN > Issue Type: Improvement > Reporter: Szilard Nemeth > Assignee: Szilard Nemeth > Priority: Major > Attachments: YARN-9098.002.patch, YARN-9098.003.patch, YARN-9098.004.patch, YARN-9098.005.patch, YARN-9098.006.patch, YARN-9098.007.patch, YARN-9098.008.patch > > > Separate mtab file reader code and cgroups file system hierarchy parser code from CGroupsHandlerImpl and ResourceHandlerModule > CGroupsHandlerImpl has a method parseMtab that parses an mtab file and stores cgroups data. > CGroupsLCEResourcesHandler also has a method with the same name, with identical code. > The parser code should be extracted from these places and be added in a new class as this is a separate responsibility. > As the output of the file parser is a Map>, it's better to encapsulate it in a domain object, named 'CGroupsMountConfig' for instance. > ResourceHandlerModule has a method named parseConfiguredCGroupPath, that is responsible for producing the same results (Map>) to store cgroups data, it does not operate on mtab file, but looking at the filesystem for cgroup settings. As the output is the same, CGroupsMountConfig should be used here, too. > Again, this could should not be part of ResourceHandlerModule as it is a different responsibility. > One more thing which is strongly related to the methods above is CGroupsHandlerImpl.initializeFromMountConfig: This method processes the result of a parsed mtab file or a parsed cgroups filesystem data and stores file system paths for all available controllers. This method invokes findControllerPathInMountConfig, which is a duplicated in CGroupsHandlerImpl and CGroupsLCEResourcesHandler, so it should be moved to a single place. To store filesystem path and controller mappings, a new domain object could be introduced. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org