From issues-return-28336-archive-asf-public=cust-asf.ponee.io@geode.apache.org Fri Jan 5 03:18:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 9C30C180657 for ; Fri, 5 Jan 2018 03:18:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8C6C8160C3C; Fri, 5 Jan 2018 02:18: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 A99C8160C2B for ; Fri, 5 Jan 2018 03:18:04 +0100 (CET) Received: (qmail 25936 invoked by uid 500); 5 Jan 2018 02:18:03 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 25927 invoked by uid 99); 5 Jan 2018 02:18:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2018 02:18:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6480C1A0155 for ; Fri, 5 Jan 2018 02:18:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id k_ZiKQlKvF3d for ; Fri, 5 Jan 2018 02:18: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 414985F21E for ; Fri, 5 Jan 2018 02:18: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 B6C66E0C18 for ; Fri, 5 Jan 2018 02:18: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 71404212F7 for ; Fri, 5 Jan 2018 02:18:00 +0000 (UTC) Date: Fri, 5 Jan 2018 02:18:00 +0000 (UTC) From: "Cyrille Artho (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (GEODE-3584) Refactor ServerLauncher and LocatorLauncher to eliminate code duplication 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/GEODE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304279#comment-16304279 ] Cyrille Artho edited comment on GEODE-3584 at 1/5/18 2:17 AM: -------------------------------------------------------------- Another view of the table, with the leftmost column simplified, so it fits more easily without horizontal scrolling: ||AbstractLauncher.java||LocatorLauncher.java||ServerLauncher.java|| | |static final Boolean DEFAULT_LOAD_SHARED_CONFIG_FROM_DIR|static final ServerLauncherCacheProvider DEFAULT_CACHE_PROVIDER| | |*static final Map helpMap = new HashMap<>()*|*static final Map helpMap = new HashMap<>()*| | |*static final Map usageMap = new TreeMap<>()*|*static final Map usageMap = new TreeMap<>()*| | |*_static final String DEFAULT_LOCATOR_LOG_EXT = ".log"_*|*_static final String DEFAULT_SERVER_LOG_EXT = ".log"_*| | |*_static final String DEFAULT_LOCATOR_LOG_NAME = "locator"_*|*_static final String DEFAULT_SERVER_LOG_NAME = "gemfire"_*| | |*_static final String LOCATOR_SERVICE_NAME = "Locator"_*|*_static final String SERVER_SERVICE_NAME = "Server"_*| | |*_static final AtomicReference INSTANCE = new AtomicReference<>()_*|*_static final AtomicReference INSTANCE = new AtomicReference<>()_*| |*volatile boolean debug*| |*volatile boolean debug*| | |*_final transient ControlNotificationHandler controlHandler_*|*_final ControlNotificationHandler controlHandler_*| |final transient AtomicBoolean running| | | | |*final AtomicBoolean starting = new AtomicBoolean(false)*|*final AtomicBoolean starting = new AtomicBoolean(false)*| |Logger logger| |final boolean assignBuckets| | |*final boolean deletePidFileOnStop*|*final boolean deletePidFileOnStop*| | | |final boolean disableDefaultServer| | |*final boolean force*|*final boolean force*| | |*final boolean help*|*final boolean help*| | | |final boolean rebalance| | |*final boolean redirectOutput*|*final boolean redirectOutput*| | | |volatile Cache cache| | | |final CacheConfig cacheConfig| | |*final Command command*|*final Command command*| | |*_final InetAddress bindAddress_*|*_final InetAddress serverBindAddress_*| | |*final Integer pid*|*final Integer pid*| | |*_final Integer port_*|*_final Integer serverPort_*| | |*final Properties distributedSystemProperties*|*final Properties distributedSystemProperties*| | |*final String memberName*|*final String memberName*| | |final boolean portSpecified|final String springXmlLocation| | |*final String workingDirectory*|*final String workingDirectory*| | |*_transient volatile String statusMessage_*|*_volatile String statusMessage_*| | | |final Float criticalHeapPercentage| | | |final Float evictionHeapPercentage| | | |final Float criticalOffHeapPercentage| | | |final Float evictionOffHeapPercentage| | |*final String hostnameForClients*|*final String hostNameForClients*| | | |final Integer maxConnections| | | |final Integer maxMessageCount| | | |final Integer messageTimeToLive| | | |final Integer socketBufferSize| | | |final Integer maxThreads| | |*_transient volatile ControllableProcess process_*|*_volatile ControllableProcess process_*| | |*_final transient LocatorControllerParameters controllerParameters_*|*_final ServerControllerParameters controllerParameters_*| | |transient volatile InternalLocator locator| | | |final boolean workingDirectorySpecified| | | |final boolean bindAddressSpecified| | was (Author: telcontar): Another view of the table, with the leftmost column simplified, so it fits more easily without horizontal scrolling: ||AbstractLauncher.java||LocatorLauncher.java||ServerLauncher.java|| | |static final Boolean DEFAULT_LOAD_SHARED_CONFIG_FROM_DIR|static final ServerLauncherCacheProvider DEFAULT_CACHE_PROVIDER| | |*static final Map helpMap = new HashMap<>()*|*static final Map helpMap = new HashMap<>()*| | |*static final Map usageMap = new TreeMap<>()*|*static final Map usageMap = new TreeMap<>()*| | |*_static final String DEFAULT_LOCATOR_LOG_EXT = ".log"_*|*_static final String DEFAULT_SERVER_LOG_EXT = ".log"_*| | |*_static final String DEFAULT_LOCATOR_LOG_NAME = "locator"_*|*_static final String DEFAULT_SERVER_LOG_NAME = "gemfire"_*| | |*_static final String LOCATOR_SERVICE_NAME = "Locator"_*|*_static final String SERVER_SERVICE_NAME = "Server"_*| | |*_static final AtomicReference INSTANCE = new AtomicReference<>()_*|*_static final AtomicReference INSTANCE = new AtomicReference<>()_*| |*volatile boolean debug*| |*volatile boolean debug*| | |*_final transient ControlNotificationHandler controlHandler_*|*_final ControlNotificationHandler controlHandler_*| |final transient AtomicBoolean running| | | | |*final AtomicBoolean starting = new AtomicBoolean(false)*|*final AtomicBoolean starting = new AtomicBoolean(false)*| |Logger logger| |final boolean assignBuckets| | |*final boolean deletePidFileOnStop*|*final boolean deletePidFileOnStop*| | | |final boolean disableDefaultServer| | |*final boolean force*|*final boolean force*| | |*final boolean help*|*final boolean help*| | | |final boolean rebalance| | |*final boolean redirectOutput*|*final boolean redirectOutput*| | | |volatile Cache cache| | | |final CacheConfig cacheConfig| | |*final Command command*|*final Command command*| | |*_final InetAddress bindAddress_*|*_final InetAddress serverBindAddress_*| | |*final Integer pid*|*final Integer pid*| | |*_final boolean portSpecified_*|*_final Integer serverPort_*| | |*final Properties distributedSystemProperties*|*final Properties distributedSystemProperties*| | |*final String memberName*|*final String memberName*| | |final Integer port|final String springXmlLocation| | |*final String workingDirectory*|*final String workingDirectory*| | |*_transient volatile String statusMessage_*|*_volatile String statusMessage_*| | | |final Float criticalHeapPercentage| | | |final Float evictionHeapPercentage| | | |final Float criticalOffHeapPercentage| | | |final Float evictionOffHeapPercentage| | |*final String hostnameForClients*|*final String hostNameForClients*| | | |final Integer maxConnections| | | |final Integer maxMessageCount| | | |final Integer messageTimeToLive| | | |final Integer socketBufferSize| | | |final Integer maxThreads| | |*_transient volatile ControllableProcess process_*|*_volatile ControllableProcess process_*| | |*_final transient LocatorControllerParameters controllerParameters_*|*_final ServerControllerParameters controllerParameters_*| | |transient volatile InternalLocator locator| | | |final boolean workingDirectorySpecified| | | |final boolean bindAddressSpecified| | > Refactor ServerLauncher and LocatorLauncher to eliminate code duplication > ------------------------------------------------------------------------- > > Key: GEODE-3584 > URL: https://issues.apache.org/jira/browse/GEODE-3584 > Project: Geode > Issue Type: Improvement > Components: gfsh > Affects Versions: 1.2.0 > Reporter: Kenneth Howe > Attachments: GEODE-3584-WIP > > > There is some duplication of code in the Launcher classes that can be eliminated. Both classes have methods such as getBindAddress (called getServerBindAddress in ServerLauncher) that could be hoisted into AbstractLauncher class that they both extend. The same goes for the inner State classes of the Launchers; they have methods that could be moved to AbstractLauncher.ServiceState. -- This message was sent by Atlassian JIRA (v6.4.14#64029)