flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philipp Goetze <philipp.goe...@tu-ilmenau.de>
Subject Submitting jobs from within Scala code
Date Thu, 16 Jul 2015 09:01:59 GMT
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

Mime
View raw message