flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chen Bekor <chen.be...@gmail.com>
Subject [No Subject]
Date Sun, 17 Jul 2016 16:22:01 GMT
Hi,

I Need some assistance -

I’m trying to globally register arguments from my main function for further
extraction on stream processing nodes. My code base is Scala:

val env = StreamExecutionEnvironment.getExecutionEnvironment

val parameterTool = ParameterTool.fromArgs(args)

env.getConfig.setGlobalJobParameters(parameterTool)

but when I'm trying to retrieve them I get null pointer exception.

private lazy val parameters: GlobalJobParameters =
ExecutionEnvironment.getExecutionEnvironment.getConfig.getGlobalJobParameters

Have read this article
https://ci.apache.org/projects/flink/flink-docs-release-1.0/apis/best_practices.html
and I’m curious if it is possible.

This is required in order to read from a configuration file holding DB
Connection String (Bootstrapping DB connections on each processing node on
the bootstrapping phase.

Regards,
Chen.

Mime
View raw message