Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C277118992 for ; Fri, 8 May 2015 10:43:55 +0000 (UTC) Received: (qmail 55732 invoked by uid 500); 8 May 2015 10:43:55 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 55662 invoked by uid 500); 8 May 2015 10:43:55 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 55652 invoked by uid 99); 8 May 2015 10:43:55 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 10:43:55 +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 8F22D1827D4 for ; Fri, 8 May 2015 10:43:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.881 X-Spam-Level: ** X-Spam-Status: No, score=2.881 tagged_above=-999 required=6.31 tests=[AC_DIV_BONANZA=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 7iBRSj48AkZV for ; Fri, 8 May 2015 10:43:47 +0000 (UTC) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 54379212CE for ; Fri, 8 May 2015 10:43:46 +0000 (UTC) Received: by labbd9 with SMTP id bd9so49814030lab.2 for ; Fri, 08 May 2015 03:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xf2/d6fP1P382x2H1+l27bgoG83T9GJFYVLvJAKyt9s=; b=LL3MkUXgoQ51PRyZ/j5Zh+24R6xb7i9iULfsP1YkvO2LZZCiB+u9NsT6/wSmUTAxGE GCUT7puP2boDxaVETpv7jrKG2K5l+jGieX4hLXUMzukr1MN8vrBCVhTxJc0zhAfqji2S BEs5TGd9jhMJUxkD2uDuQYdUfXpQVczNFhndl5b3samG8dkeBfe59svoTf6Hokb/nzpl 8LEU66X0eoQt6Ww8wA0b26lEfXB00Chsqd7EH44U4bKl+HwK0ob0AeyMIMtDms7YCCxx cKhFmsYmJfsLuiuG5JVO7e2mXL4EOJNMUnizpnfdei+hl8k6AMV82FRsWjNv1J+VHBPm KFiQ== MIME-Version: 1.0 X-Received: by 10.152.37.228 with SMTP id b4mr2344979lak.117.1431081735434; Fri, 08 May 2015 03:42:15 -0700 (PDT) Received: by 10.152.225.171 with HTTP; Fri, 8 May 2015 03:42:15 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 May 2015 12:42:15 +0200 Message-ID: Subject: Re: Package multiple jobs in a single jar From: Fabian Hueske To: user@flink.apache.org Content-Type: multipart/alternative; boundary=089e014939fc7c362105158faefa --089e014939fc7c362105158faefa Content-Type: text/plain; charset=UTF-8 You easily have multiple Flink programs in a single JAR file. A program is defined using an ExecutionEnvironment and executed when you call ExecutionEnvironment.exeucte(). Where and how you do that does not matter. You can for example implement a main function such as: public static void main(String... args) { if (today == Monday) { ExecutionEnvironment env = ... // define Monday prog env.execute() } else { ExecutionEnvironment env = ... // define other prog env.execute() } } 2015-05-08 11:41 GMT+02:00 Flavio Pompermaier : > Hi to all, > is there any way to keep multiple jobs in a jar and then choose at runtime > the one to execute (like what ProgramDriver does in Hadoop)? > > Best, > Flavio > > --089e014939fc7c362105158faefa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You easi= ly have multiple Flink programs in a single JAR file.
A program is= defined using an ExecutionEnvironment and executed when you call Execution= Environment.exeucte().
Where and how you do that does not matter.=

You can for example implement a main function such as:
public static void main(String... args) {

=C2=A0 if (to= day =3D=3D Monday) {
=C2=A0=C2=A0=C2=A0 ExecutionEnvironment env = =3D ...
=C2=A0=C2=A0=C2=A0 // define Monday prog
=C2=A0= =C2=A0=C2=A0 env.execute()
=C2=A0 }
=C2=A0 else {
=C2= =A0=C2=A0=C2=A0 ExecutionEnvironment env =3D ...
=C2=A0=C2=A0=C2=A0 // d= efine other prog
=C2=A0=C2=A0=C2=A0 env.execute()
=C2=A0 }
<= div>
}

2015-05-08 11:4= 1 GMT+02:00 Flavio Pompermaier <pompermaier@okkam.it>:
Hi to all,<= br>
is there any way to keep multiple jobs in a jar and then choose at= runtime the one to execute (like what ProgramDriver does in Hadoop)?
Best,
Flavio


--089e014939fc7c362105158faefa--