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 837B518498 for ; Thu, 16 Jul 2015 09:02:19 +0000 (UTC) Received: (qmail 38894 invoked by uid 500); 16 Jul 2015 09:02:19 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 38815 invoked by uid 500); 16 Jul 2015 09:02:19 -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 38805 invoked by uid 99); 16 Jul 2015 09:02:19 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 09:02:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D4A7DD5082 for ; Thu, 16 Jul 2015 09:02:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.997 X-Spam-Level: *** X-Spam-Status: No, score=3.997 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.317, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vDml36YGR5sP for ; Thu, 16 Jul 2015 09:02:08 +0000 (UTC) Received: from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.4.149]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 8DE6F20DD0 for ; Thu, 16 Jul 2015 09:02:07 +0000 (UTC) Received: from [192.168.110.148] (port-92-200-13-55.dynamic.qsc.de [92.200.13.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smail.rz.tu-ilmenau.de (Postfix) with ESMTPSA id DB2BB5EFA2 for ; Thu, 16 Jul 2015 11:02:00 +0200 (CEST) Message-ID: <55A77307.5020105@tu-ilmenau.de> Date: Thu, 16 Jul 2015 11:01:59 +0200 From: Philipp Goetze User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: user@flink.apache.org Subject: Submitting jobs from within Scala code Content-Type: multipart/alternative; boundary="------------020603050005040905030004" This is a multi-part message in MIME format. --------------020603050005040905030004 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi community, in our project we try to submit built Flink programs to the jobmanager from within Scala code. The test program is executed correctly when submitted via the wrapper script "bin/flink run ..." and also with the webclient. But when executed from within the Scala code nothing seems to happen, but the following warning is found in the log: 10:47:18,153 WARN akka.remote.ReliableDeliverySupervisor - Association with remote system [akka.tcp://flink@127.0.0.1:34074] has failed, address is now gated for [5000] ms. Reason is: [org.apache.flink.runtime.jobgraph.AbstractJobVertex] Our submit method looks like that: def submitJar(master: String, path: String, className: String, args: String*) = { val file = new File(path) val parallelism = 1 val wait = true try { val program = new PackagedProgram(file, className, args:_*) val jobManagerAddress = getInetFromHostport(master) val client = new Client(jobManagerAddress, new Configuration(), program.getUserCodeClassLoader(), 1) println("Executing " + path); client.run(program, parallelism, wait); } catch { case e: ProgramInvocationException => e.printStackTrace() } } I took this as a reference: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/How-to-submit-flink-jars-from-plain-Java-programs-td656.html I hope you can help. Best Regards, Philipp Götze --------------020603050005040905030004 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hi community,

in our project we try to submit built Flink programs to the jobmanager from within Scala code. The test program is executed correctly when submitted via the wrapper script "bin/flink run ..." and also with the webclient. But when executed from within the Scala code nothing seems to happen, but the following warning is found in the log:
10:47:18,153 WARN  akka.remote.ReliableDeliverySupervisor                        - Association with remote system [akka.tcp://flink@127.0.0.1:34074] has failed, address is now gated for [5000] ms. Reason is: [org.apache.flink.runtime.jobgraph.AbstractJobVertex]

Our submit method looks like that:
 def submitJar(master: String, path: String, className: String, args: String*) = { 
    val file = new File(path)
    val parallelism = 1 
    val wait = true
    try { 
      val program = new PackagedProgram(file, className, args:_*)
      val jobManagerAddress = getInetFromHostport(master)
      val client = new Client(jobManagerAddress, new Configuration(), program.getUserCodeClassLoader(), 1)  
      println("Executing " + path); 
      client.run(program, parallelism, wait); 
    } catch {
      case e: ProgramInvocationException => e.printStackTrace()
    }   
  }   

I took this as a reference: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/How-to-submit-flink-jars-from-plain-Java-programs-td656.html

I hope you can help.

Best Regards,
Philipp Götze
--------------020603050005040905030004--