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 4DB4B200BE8 for ; Fri, 23 Dec 2016 15:13:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4C921160B1E; Fri, 23 Dec 2016 14:13:48 +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 983E7160B1D for ; Fri, 23 Dec 2016 15:13:47 +0100 (CET) Received: (qmail 21505 invoked by uid 500); 23 Dec 2016 14:13:46 -0000 Mailing-List: contact dev-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@spark.apache.org Received: (qmail 21495 invoked by uid 99); 23 Dec 2016 14:13:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2016 14:13:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7C7F71812A2 for ; Fri, 23 Dec 2016 14:13:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3B1bHNY4rmYq for ; Fri, 23 Dec 2016 14:13:43 +0000 (UTC) Received: from alu112.rev.netart.pl (alu112.rev.netart.pl [85.128.177.112]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E9F395FBCE for ; Fri, 23 Dec 2016 14:13:42 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by laskowski.nazwa.pl (Postfix) with ESMTP id 5D5F138B78A for ; Fri, 23 Dec 2016 15:13:36 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id k184so17664805wme.1 for ; Fri, 23 Dec 2016 06:13:36 -0800 (PST) X-Gm-Message-State: AIkVDXIlPr+yim0VmhMPQp4AXSdBf3Ucx+buErIDyOhAR9ksoYMzyO4PznsJ33+knxzrKB17OXDQpjL7KrbCnQ== X-Received: by 10.28.157.200 with SMTP id g191mr15409113wme.33.1482502415903; Fri, 23 Dec 2016 06:13:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.170.116 with HTTP; Fri, 23 Dec 2016 06:13:35 -0800 (PST) From: Jacek Laskowski Date: Fri, 23 Dec 2016 15:13:35 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: MapOutputTracker.getMapSizesByExecutorId and mutation on the driver? To: dev Content-Type: text/plain; charset=UTF-8 archived-at: Fri, 23 Dec 2016 14:13:48 -0000 Hi, I've been reviewing how MapOutputTracker works and can't understand the comment [1]: // Synchronize on the returned array because, on the driver, it gets mutated in place How is this possible since "the returned array" is a local value? I'm stuck and would appreciate help. Thanks! (It also says "Called from executors" [2] so how could the driver be involved?!) [1] https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/MapOutputTracker.scala#L145 [2] https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/MapOutputTracker.scala#L133 Pozdrawiam, Jacek Laskowski ---- https://medium.com/@jaceklaskowski/ Mastering Apache Spark 2.0 https://bit.ly/mastering-apache-spark Follow me at https://twitter.com/jaceklaskowski --------------------------------------------------------------------- To unsubscribe e-mail: dev-unsubscribe@spark.apache.org