Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E72AA957E for ; Wed, 17 Dec 2014 09:43:14 +0000 (UTC) Received: (qmail 55939 invoked by uid 500); 17 Dec 2014 09:43:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 55896 invoked by uid 500); 17 Dec 2014 09:43:14 -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 55883 invoked by uid 99); 17 Dec 2014 09:43:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 09:43:14 +0000 Date: Wed, 17 Dec 2014 09:43:14 +0000 (UTC) From: "Weichen Ye (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12590) A solution for data skew in HBase-Mapreduce Job MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12590?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Weichen Ye updated HBASE-12590: ------------------------------- Attachment: HBASE-12590-v4.patch > A solution for data skew in HBase-Mapreduce Job > ----------------------------------------------- > > Key: HBASE-12590 > URL: https://issues.apache.org/jira/browse/HBASE-12590 > Project: HBase > Issue Type: Improvement > Components: mapreduce > Reporter: Weichen Ye > Attachments: A Solution for Data Skew in HBase-MapReduce Job (Ver= sion2).pdf, A Solution for Data Skew in HBase-MapReduce Job (Version3).pdf,= HBASE-12590-v3.patch, HBASE-12590-v4.patch, HBase-12590-v1.patch, HBase-12= 590-v2.patch > > > 1, Motivation > In production environment, data skew is a very common case. A HBase table= may contains a lot of small regions and several large regions. Small regio= ns waste a lot of computing resources. If we use a job to scan a table with= 3000 small regions, we need a job with 3000 mappers. Large regions always = block the job. If in a 100-region table, one region is far large then the o= ther 99 regions. When we run a job with the table as input, 99 mappers will= be completed very quickly, and then we need to wait for the last mapper fo= r a long time. > 2, Configuration > Add three new configuration=20 > hbase.mapreduce.input.autobalance =3D true means enabling the =E2=80=9Cau= to balance=E2=80=9D in HBase-MapReduce jobs. The default value is false.=20 > hbase.mapreduce.input.autobalance.maxskewratio=3D 3 (default is 3). If a = region size is larger than 3x average region size, treat the region as =E2= =80=9Cproportionately too large=E2=80=9D. > hbase.table.row.textkey =3D true means the row key is text. False means = binary row key. It is used to find the mid row key in large region. The def= ault value is true.=20 > If (region size >=3D average size*ratio) : cut the region into two MR in= put splits > If (average size <=3D region size < average size*ratio) : one region as o= ne MR input split > If (sum of several continuous regions size < average size): combine these= regions into one MR input split. > Example: > In attachment > Welcome to the Review Board. > https://reviews.apache.org/r/28494/diff/# -- This message was sent by Atlassian JIRA (v6.3.4#6332)