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 40E19200C22 for ; Tue, 7 Feb 2017 05:23:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3F87B160B62; Tue, 7 Feb 2017 04:23:46 +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 648FE160B56 for ; Tue, 7 Feb 2017 05:23:45 +0100 (CET) Received: (qmail 75281 invoked by uid 500); 7 Feb 2017 04:23:44 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 75270 invoked by uid 99); 7 Feb 2017 04:23:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2017 04:23:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C8933C0110 for ; Tue, 7 Feb 2017 04:23:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bSBc0bekxIFj for ; Tue, 7 Feb 2017 04:23:43 +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 C18225F570 for ; Tue, 7 Feb 2017 04:23:42 +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 1F5B1E027E for ; Tue, 7 Feb 2017 04:23:42 +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 9EB2A2528B for ; Tue, 7 Feb 2017 04:23:41 +0000 (UTC) Date: Tue, 7 Feb 2017 04:23:41 +0000 (UTC) From: "Appy (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-17605) Refactor procedure framework code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 07 Feb 2017 04:23:46 -0000 [ https://issues.apache.org/jira/browse/HBASE-17605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17605: ------------------------- Description: - Moved locks out of MasterProcedureScheduler#Queue. One Queue object is used for each namespace/table, which aren't more than 100. So we don't complexity arising from all functionalities being in one place. MasterProcedureLocking#Lock is the new locking class. - Removed NamespaceQueue because it wasn't being used as Queue (add,peek,poll,etc functions threw UnsupportedOperationException). It's was only used for locks on namespaces. Now that locks have been moved out of Queue class, it's not needed anymore. - Remoed RegionEvent which was there only for locking on regions. Tables/namespaces used locking from Queue class and regions couldn't (there are no separate proc queue at region level), hence the redundance. Now that locking is separate, we can use the same for regions too. - Removed QueueInterface class. No declarations, except one implementaion, which makes the point of having an interface moot. - Removed QueueImpl, which was the only concrete implementation of abstract Queue class. Moved functions to Queue class itself to avoid unnecessary level in inheritance hierarchy. - Removed ProcedureEventQueue class which was just a wrapper around ArrayDeque class. - Encapsulated table priority related stuff in a single class. - Removed some unused functions. *Perf using MasterProcedureSchedulerPerformanceEvaluation* 10 threads, 10M ops, 5 tables Without patch: 10 regions/table : #yield 584980, addBack time 4.1s, poll time 10s 1M regions/table: #yield 16, addBack time 5.9s, poll time 12.9s With patch: 10 regions/table : #yield 86413, addBack time 4.1s, poll time 8.2s 1M regions/table: #yield 9, addBack time 6s, poll time 13s was: - Moved locks out of MasterProcedureScheduler#Queue. One Queue object is used for each namespace/table, which aren't more than 100. So we don't complexity arising from all functionalities being in one place. MasterProcedureLocking#Lock is the new locking class. - Removed NamespaceQueue because it wasn't being used as Queue (add,peek,poll,etc functions threw UnsupportedOperationException). It's was only used for locks on namespaces. Now that locks have been moved out of Queue class, it's not needed anymore. - Remoed RegionEvent which was there only for locking on regions. Tables/namespaces used locking from Queue class and regions couldn't (there are no separate proc queue at region level), hence the redundance. Now that locking is separate, we can use the same for regions too. - Removed QueueInterface class. No declarations, except one implementaion, which makes the point of having an interface moot. - Removed QueueImpl, which was the only concrete implementation of abstract Queue class. Moved functions to Queue class itself to avoid unnecessary level in inheritance hierarchy. - Removed ProcedureEventQueue class which was just a wrapper around ArrayDeque class. - Encapsulated table priority related stuff in a single class. - Removed some unused functions. > Refactor procedure framework code > --------------------------------- > > Key: HBASE-17605 > URL: https://issues.apache.org/jira/browse/HBASE-17605 > Project: HBase > Issue Type: Improvement > Components: proc-v2 > Reporter: Appy > Assignee: Appy > Attachments: HBASE-17605.master.001.patch > > > - Moved locks out of MasterProcedureScheduler#Queue. One Queue object is used for each namespace/table, which aren't more than 100. So we don't complexity arising from all functionalities being in one place. MasterProcedureLocking#Lock is the new locking class. > - Removed NamespaceQueue because it wasn't being used as Queue (add,peek,poll,etc functions threw UnsupportedOperationException). It's was only used for locks on namespaces. Now that locks have been moved out of Queue class, it's not needed anymore. > - Remoed RegionEvent which was there only for locking on regions. Tables/namespaces used locking from Queue class and regions couldn't (there are no separate proc queue at region level), hence the redundance. Now that locking is separate, we can use the same for regions too. > - Removed QueueInterface class. No declarations, except one implementaion, which makes the point of having an interface moot. > - Removed QueueImpl, which was the only concrete implementation of abstract Queue class. Moved functions to Queue class itself to avoid unnecessary level in inheritance hierarchy. > - Removed ProcedureEventQueue class which was just a wrapper around ArrayDeque class. > - Encapsulated table priority related stuff in a single class. > - Removed some unused functions. > *Perf using MasterProcedureSchedulerPerformanceEvaluation* > 10 threads, 10M ops, 5 tables > Without patch: > 10 regions/table : #yield 584980, addBack time 4.1s, poll time 10s > 1M regions/table: #yield 16, addBack time 5.9s, poll time 12.9s > With patch: > 10 regions/table : #yield 86413, addBack time 4.1s, poll time 8.2s > 1M regions/table: #yield 9, addBack time 6s, poll time 13s -- This message was sent by Atlassian JIRA (v6.3.15#6346)