From issues-return-185664-archive-asf-public=cust-asf.ponee.io@spark.apache.org Fri Feb 23 15:47:11 2018 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 0836718067E for ; Fri, 23 Feb 2018 15:47:10 +0100 (CET) Received: (qmail 93857 invoked by uid 500); 23 Feb 2018 14:47:10 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 93847 invoked by uid 99); 23 Feb 2018 14:47:10 -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, 23 Feb 2018 14:47:10 +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 811EBC04A0 for ; Fri, 23 Feb 2018 14:47:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id DObj23xs12dB for ; Fri, 23 Feb 2018 14:47:08 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E8FE25F369 for ; Fri, 23 Feb 2018 14:47:07 +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 18CAEE0225 for ; Fri, 23 Feb 2018 14:47:06 +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 6D85C218F8 for ; Fri, 23 Feb 2018 14:47:03 +0000 (UTC) Date: Fri, 23 Feb 2018 14:47:03 +0000 (UTC) From: "Apache Spark (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (SPARK-23496) Locality of coalesced partitions can be severely skewed by the order of input partitions 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/SPARK-23496?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-23496: ------------------------------------ Assignee: Apache Spark > Locality of coalesced partitions can be severely skewed by the order of i= nput partitions > -------------------------------------------------------------------------= --------------- > > Key: SPARK-23496 > URL: https://issues.apache.org/jira/browse/SPARK-23496 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 3.0.0 > Reporter: Ala Luszczak > Assignee: Apache Spark > Priority: Major > > Example: > Consider=C2=A0RDD "R" with 100 partitions, half of which=C2=A0have locali= ty preference "hostA" and=C2=A0half=C2=A0have "hostB". > * Assume=C2=A0odd-numbered input partitions of R prefer "hostA" and even= -numbered prefer "hostB".=C2=A0Then R.coalesce(50) will have 25 partitions = with preference "hostA" and 25 with "hostB" (even distribution). > * Assume partitions with index 0-49 of R prefer "hostA" and partitions w= ith index 50-99 prefer "hostB". Then R.coalesce(50) will have 49 partitions= with "hostA" and 1 with "hostB" (extremely skewed distribution). > =C2=A0 > The algorithm in=C2=A0{{DefaultPartitionCoalescer.setupGroups}}=C2=A0is r= esponsible for picking preferred locations for coalesced partitions. It ana= lyzes the preferred locations of input partitions. It starts by trying to c= reate one partition for each unique location in the input. However, if the = the requested number of coalesced partitions is higher that the number of u= nique locations, it has to pick duplicate locations. > Currently, the duplicate locations=C2=A0are picked by iterating over the = input partitions in order, and copying their preferred locations to coalesc= ed partitions. If the input partitions=C2=A0are clustered by location, this= can result in severe skew. > Instead of iterating over the list of input partitions in order, we shoul= d pick them at random. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org