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 D5674200B9F for ; Tue, 11 Oct 2016 18:35:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D419C160AC3; Tue, 11 Oct 2016 16:35:22 +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 C5CD4160AE6 for ; Tue, 11 Oct 2016 18:35:21 +0200 (CEST) Received: (qmail 30801 invoked by uid 500); 11 Oct 2016 16:35:15 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 30773 invoked by uid 99); 11 Oct 2016 16:35:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2016 16:35:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 347601A0670 for ; Tue, 11 Oct 2016 16:35:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.698 X-Spam-Level: * X-Spam-Status: No, score=1.698 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id j6jOpDkEbpCA for ; Tue, 11 Oct 2016 16:35:13 +0000 (UTC) Received: from mail-yb0-f176.google.com (mail-yb0-f176.google.com [209.85.213.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DE3A55FB32 for ; Tue, 11 Oct 2016 16:35:12 +0000 (UTC) Received: by mail-yb0-f176.google.com with SMTP id e20so9995944ybb.0 for ; Tue, 11 Oct 2016 09:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cvLxRWa+AZq5lKzrio0q32pf/xf3dLwkxDM0gW4hG04=; b=oUmH3hONL71NUDHP8iTnNKocTpnJ1lg12zTOwlTANywc11bU+lpjMmmUeztoevUF8r HifVzgqx1hx//WC4lJqY0SPHVAIuFoOMuxQROHUceWNWLVJkHfumUlEyWoC8iBxTVRD3 61mK6Cx/AKm5leu4B0tYIfvh4UpcjHQOMIrEYDLJH1WsSX/bmD1Q0FN5dVO/HMkfUqX2 p5930tjdcLlNlzG5hMjDnXbKhFkSanX5+S671wApuB/51GGSH2HtlW6hFZHhMeQBu2lL R5JBkQOnQm6Q6ScB7b3tRYxUGLnIMGG6nc/SrDxZ/ljgeMUFhMctDczb0ZVNqmmcA19/ 1lDQ== 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; bh=cvLxRWa+AZq5lKzrio0q32pf/xf3dLwkxDM0gW4hG04=; b=mW6445cHhZNbX+9rVYGnQFO5kbsixjqaP6tJtziPbgpzHMsIrkrUtWhcsM8NLPeIb9 6pbM0FDWM3N3/7YD/fg19j82ieeFFxRUXpa91W3ZbeKsXg68OoCDFmG22M+Zj3m92TeX XJdDAw/IvK8wWu79e0SVEYzVD6KQ2zdQbk21uGGLbN+38LmnVZkFUCFWeoaHjImN2Qtf rHGuyFbDLcqQz0Jr/3mRPVE+iZc73snV71i9KtB7/malSUKiFZz6+aOEsGmi9Buw6jTj 0933PNiL9X+sAPcVmviX9WC07mrPLZ/vnoW3t52GHLhY9vl6X9si3mKRnXuYOBa3g+ri p+qw== X-Gm-Message-State: AA6/9RlXT8f2kM9XcghIdwcgsV3hCjmjms5Icvukn8SN2tllhWf2j/ddmzudSUASD3CMAA+xFdjU3mDelbyvWg== X-Received: by 10.37.39.65 with SMTP id n62mr4051830ybn.86.1476203711145; Tue, 11 Oct 2016 09:35:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.3.146 with HTTP; Tue, 11 Oct 2016 09:35:10 -0700 (PDT) In-Reply-To: <635815fd-e25d-4ea5-3d05-950dfdb0f113@gmail.com> References: <46e2f9df-ea12-a880-ff83-052d3c8d4656@gmail.com> <7f9463d7.2a0a2.157b2eaf35a.Coremail.lwh@whu.edu.cn> <635815fd-e25d-4ea5-3d05-950dfdb0f113@gmail.com> From: Yingyi Bu Date: Tue, 11 Oct 2016 09:35:10 -0700 Message-ID: Subject: Re: Let one Operator finished the job before another one begin in Hyracks To: dev@asterixdb.apache.org Content-Type: multipart/alternative; boundary=94eb2c134fd6d1d1a9053e997522 archived-at: Tue, 11 Oct 2016 16:35:23 -0000 --94eb2c134fd6d1d1a9053e997522 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable +1! Best, Yingyi On Tue, Oct 11, 2016 at 9:32 AM, Mike Carey wrote: > BUT AGAIN: I think the preferred solution in this case is to do it in on= e > job. Mingda, I would suggest sync'ing up with Wenhai for a Skype meeting > on how he/Preston have done essentially the very same thing in their use > cases for parallel sorts and interval joins. Hyracks has everything need= ed > for this, as it turns out, without a multi-job need. > > > > On 10/11/16 9:26 AM, Yingyi Bu wrote: > >> You can search the usage of waitForCompletion in the code base, e.g.: >> >> APIFramework.java: >> >> public void executeJobArray(IHyracksClientConnection hcc, >> JobSpecification[] specs, PrintWriter out) >> throws Exception { >> for (JobSpecification spec : specs) { >> spec.setMaxReattempts(0); >> JobId jobId =3D hcc.startJob(spec); >> long startTime =3D System.currentTimeMillis(); >> hcc.waitForCompletion(jobId); >> long endTime =3D System.currentTimeMillis(); >> double duration =3D (endTime - startTime) / 1000.00; >> out.println("
Duration: " + duration + " sec
"); >> } >> >> } >> >> >> You start a job and get the job Id, and then you can wait on the job id. >> >> >> Best, >> >> Yingyi >> >> >> On Tue, Oct 11, 2016 at 1:45 AM, =E6=9D=8E=E6=96=87=E6=B5=B7 wrote: >> >> Hi, Mingda. >>> What you need is quite familiar with what I and Presten have done. >>> Actually, I think we just need a shared >>> object accommodated by joblet or task which should be also driven by a >>> broadcast connector inbetween its input >>> and output operators. We can talk about this by skype if needed. >>> Best, Wenhai >>> >>> >>> -----=E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6----- >>>> =E5=8F=91=E4=BB=B6=E4=BA=BA: "Mike Carey" >>>> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2016=E5=B9=B410=E6=9C=8811=E6=97= =A5 =E6=98=9F=E6=9C=9F=E4=BA=8C >>>> =E6=94=B6=E4=BB=B6=E4=BA=BA: dev@asterixdb.apache.org >>>> =E6=8A=84=E9=80=81: >>>> =E4=B8=BB=E9=A2=98: Re: Let one Operator finished the job before anoth= er one begin in >>>> >>> Hyracks >>> >>>> And both Wenhai and Preston have examples of doing the >>>> fan-in-and-compute/fan-back-out pattern with blocking until the latter >>>> part is done - Wenhai for finding range split points for parallel >>>> sorting and Preston for similar things that arise in interval joins. >>>> Can you guys chime in when you have a chance? (Preston may be busy fr= om >>>> what I saw on Skype on Friday :-), with congrats being due!) >>>> >>>> >>>> On 10/11/16 12:22 AM, Jianfeng Jia wrote: >>>> >>>>> Based on the described example, it seems possible to implement it in >>>>> >>>> one job by using MToNPartitioningConnectorDescriptor. >>> >>>> You can force that merge-BF-operator only runs in one partition by >>>>> >>>> using PartitionConstraintHelper.addAbsoluteLocationConstraint() >>> function. >>> >>>> On Oct 10, 2016, at 11:43 PM, mingda li >>>>>> >>>>> wrote: >>> >>>> Yeah, that will be easier. But for example, we have N nodes and in >>>>>> >>>>> each >>> >>>> node, it will generate a Bloom Filter(BF) for its own data. We need >>>>>> >>>>> to send >>> >>>> these BFs to one node for constructing a complete BF and then send >>>>>> >>>>> the BF >>> >>>> back to each node. I am not sure we can use multiple stage job for >>>>>> >>>>> this, >>> >>>> because there should be a 1->N and a N->1 connecter among nodes. If >>>>>> >>>>> in one >>> >>>> job, there may be no way to transfer data among nodes. >>>>>> This is my idea. If this can be implemented by one multiple stage >>>>>> >>>>> job, that >>> >>>> will decrease a lot of my work :-) >>>>>> >>>>>> Bests, >>>>>> Mingda >>>>>> >>>>>> On Mon, Oct 10, 2016 at 8:59 PM, Mike Carey >>>>>> >>>>> wrote: >>> >>>> Is there a reason for wanting two jobs? I would think that one >>>>>>> >>>>>> multiple >>> >>>> stage job would be preferable. >>>>>>> >>>>>>> On Oct 10, 2016 1:21 PM, "mingda li" wrote= : >>>>>>> >>>>>>> Oh, thanks Kim~ >>>>>>>> >>>>>>>> On Mon, Oct 10, 2016 at 12:55 PM, Taewoo Kim >>>>>>>> >>>>>>> wrote: >>> >>>> Forwarded to dev. >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> Taewoo >>>>>>>>> >>>>>>>>> ---------- Forwarded message ---------- >>>>>>>>> From: mingda li >>>>>>>>> Date: Mon, Oct 10, 2016 at 11:21 AM >>>>>>>>> Subject: Let one Operator finished the job before another one >>>>>>>>> >>>>>>>> begin in >>> >>>> Hyracks >>>>>>>>> To: users@asterixdb.apache.org >>>>>>>>> >>>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Now,I am trying to build a Bloom Filter(BF) before join. The BF i= s >>>>>>>>> >>>>>>>> build >>>>>>> >>>>>>>> in >>>>>>>> >>>>>>>>> each node and sent to one node to combine. I want to set a stop >>>>>>>>> >>>>>>>> sign >>> >>>> there >>>>>>>> >>>>>>>>> before sending the BF in each node. The stop sign means it can on= ly >>>>>>>>> >>>>>>>> send >>>>>>> >>>>>>>> the BF after it is build. >>>>>>>>> The class HyracksConnection.waitForCompletion may help this. But >>>>>>>>> >>>>>>>> I am >>> >>>> not >>>>>>>> >>>>>>>>> sure how to use it. >>>>>>>>> Should I build two jobs: hcc.waitForCompletion(jobBuildBF); >>>>>>>>> jobidSendBF=3Dhcc.startJob(); ? >>>>>>>>> Has anyone ever used the HyracksConnection.waitForCompletion? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Mingda >>>>>>>>> >>>>>>>>> >>> > --94eb2c134fd6d1d1a9053e997522--