Return-Path: X-Original-To: apmail-apex-dev-archive@minotaur.apache.org Delivered-To: apmail-apex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0AC6918357 for ; Tue, 26 Jan 2016 17:42:06 +0000 (UTC) Received: (qmail 78587 invoked by uid 500); 26 Jan 2016 17:42:05 -0000 Delivered-To: apmail-apex-dev-archive@apex.apache.org Received: (qmail 78520 invoked by uid 500); 26 Jan 2016 17:42:05 -0000 Mailing-List: contact dev-help@apex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.incubator.apache.org Delivered-To: mailing list dev@apex.incubator.apache.org Received: (qmail 78508 invoked by uid 99); 26 Jan 2016 17:42:05 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 17:42:05 +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 3D63CC0D80 for ; Tue, 26 Jan 2016 17:42:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=datatorrent-com.20150623.gappssmtp.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KksDObUD-zJU for ; Tue, 26 Jan 2016 17:41:59 +0000 (UTC) Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 38C39439AC for ; Tue, 26 Jan 2016 17:41:59 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id o11so144664902qge.2 for ; Tue, 26 Jan 2016 09:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datatorrent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=FGzuhkgrPOfcF5r1eRjBhNMFB2ORIUXMAnCDTSpXnOk=; b=o7lE0yIBXZFRag13GvSMW2DeI2+z9XTIMjM1wJXxqx76xOUTHq90LsYLYiMj/DbzQp rPynUTiyvWx2Y1/Eb2IMDB4WVPHEJQeDSonLQ9eF85CfazACY1xQ6N+JePfVf9SFRQ+I tn/qdIwUb8zDQOiz82lT1ZY/RzQ5ccW1ar6PLHoECXNXPqhFOsgeCIJ8/GhEWUcq2VSO qkxa4BUg46baNsnpMa5yfqUOfCH65MSDOqUIH15Prg19SE69uUsu6JiwW6QGiLzFUyFN XA8/38Ba5OIaZ6ACxoV3P0xYN/E7xsv4tp9be5Zv/XAv320qAJKfBowbRyxIhka1lZN1 rzvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=FGzuhkgrPOfcF5r1eRjBhNMFB2ORIUXMAnCDTSpXnOk=; b=LfXzZczvtemcbMnJT4XvfHIqIMA7zFCJxeN7MCndjNG3qk+bzLIPVIcPqJhDLYJT6K IMGj/WlFrCVHZA6OZXxrUNZivUMABsxKw8VndSOxRD9gumHkOP5WXo5no4DNIlvQ6Odr 8eploU03KE2oVxNgDqPGohNYnwjrfYXMbwkxB4HssMRG0HJ3CwtvZzhPeUKCpua6aqOO ebqjoisnwct2rnkkl0PME5/6ax2vVsNRJ7nADDk+BKr5MVDmLEJH/EFjOsch/Cb4AKzJ 8xm9XhF7+FhAuzVcKBogBFCwdh64e5690BmX9cLIBJdsAaLXePT2eHB+XbKoz1qA72GE FzHA== X-Gm-Message-State: AG10YORkm7dyrmTZiQ7L1ongiznjGkaF165drRRwHWjTkQm0YAehtlHe5xhJPmsXhZ7qD8tzNxO3lO9sklK8AYUW X-Received: by 10.140.92.215 with SMTP id b81mr30285880qge.44.1453830118932; Tue, 26 Jan 2016 09:41:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.18.227 with HTTP; Tue, 26 Jan 2016 09:41:29 -0800 (PST) In-Reply-To: References: From: Pramod Immaneni Date: Tue, 26 Jan 2016 09:41:29 -0800 Message-ID: Subject: Re: Kryo misuse in definePartitions method To: dev@apex.incubator.apache.org Content-Type: multipart/alternative; boundary=001a1139126ccdc4e8052a40332d --001a1139126ccdc4e8052a40332d Content-Type: text/plain; charset=UTF-8 That is a good explanation, can you add it to the JIRA as well. Thanks On Tue, Jan 26, 2016 at 9:39 AM, Siyuan Hua wrote: > @Pramod > > My understanding of local mode is the application is run in the same > process as dtcli, so the default classloader can only load the classes in > dtcli classpath. > When it tries to launch the application that has other dependencies, in > StramAppLauncher.loadDependencies() method, it tries to create a new > ClassLoader to include those libs and set it as context classloader. > So if the operator needs to load classes in it's own dependencies, it needs > to get that context classloader. > > On Tue, Jan 26, 2016 at 8:46 AM, Pramod Immaneni > wrote: > > > The JIRA does not explain why it happens. Can you add the explanation. It > > might be useful if similar situations arise in future in other scenarios. > > > > On Tue, Jan 26, 2016 at 7:17 AM, Sandesh Hegde > > wrote: > > > > > Here is the jira for the issue > > > https://issues.apache.org/jira/browse/APEXMALHAR-1984 > > > > > > It affects only local mode not on the cluster. I was trying it on > > > DataTorrent Sandbox, in that machine local mode failed and passed on > > yarn. > > > > > > On Tue, Jan 26, 2016 at 7:13 AM Shubham Pathak < > shubham@datatorrent.com> > > > wrote: > > > > > > > Could we have some more details as to what exactly is the issue and > > why > > > is > > > > it failing in local mode ? > > > > Also, i couldn't get why only local mode is mentioned specifically ? > > Does > > > > it not affect when operator runs on the cluster ? > > > > > > > > Thanks, > > > > Shubham > > > > > > > > On Tue, Jan 26, 2016 at 7:40 PM, Pramod Immaneni < > > pramod@datatorrent.com > > > > > > > > wrote: > > > > > > > > > Siyuan can you explain the statement some more "It would fail in > > local > > > > mode > > > > > if it tries to load class that only in app package classpath." > > > > > > > > > > Thanks > > > > > > > > > > On Mon, Jan 25, 2016 at 4:52 PM, Siyuan Hua < > siyuan@datatorrent.com> > > > > > wrote: > > > > > > > > > > > Sandesh and I found an issue in almost all the operators that use > > > Kryo > > > > to > > > > > > clone operator itself in definePartition method. They all use > > > default > > > > > > Kryo instance without setting context classloader from the thread > > > that > > > > > > execute the code. It would fail in local mode if it tries to load > > > class > > > > > > that only in app package classpath. > > > > > > > > > > > > When I'm trying to fix it in all the places, I found repeated > > pattern > > > > in > > > > > > definePartitions. And it's very error-prone since no one actually > > did > > > > it > > > > > in > > > > > > right way until we found the issue. I'm thinking to make a Util > > > > functin > > > > > to > > > > > > create instance from operator itself and also hide the Kryo > > > dependency > > > > > from > > > > > > the operator. Do you have any better suggestions to do this? > > > > > > > > > > > > Thanks! > > > > > > > > > > > > Siyuan > > > > > > > > > > > > > > > > > > > > > --001a1139126ccdc4e8052a40332d--