You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ZalaCheung <gz...@corp.netease.com> on 2017/07/13 11:43:14 UTC
Read configuration instead of hard code
Hi all,
I use Kafka as the source of my data stream. Instead of specifying the host and topic of Kafka directly in code, is that possible to read the configuration including Kakfa info from somewhere else like file or database?
Desheng Zhang
E-mail: gzzhangdesheng@corp.netease.com;
Re: Read configuration instead of hard code
Posted by Timo Walther <tw...@apache.org>.
Hi Desheng,
Flink programs are defined in a regular Java main() method. They are
executed on the Flink Client (usually the JobManeger) when submitted,
you can add arbirary additional logic (like reading a file from an NFS)
to the code. After retrieving the Kafka Info you can pass it to the
Flink connector constructor.
Regards,
Timo
Am 13.07.17 um 13:43 schrieb ZalaCheung:
> Hi all,
>
> I use Kafka as the source of my data stream. Instead of specifying the
> host and topic of Kafka directly in code, is that possible to read the
> configuration including Kakfa info from somewhere else like file or
> database?
>
> Desheng Zhang
>
> E-mail: gzzhangdesheng@corp.netease.com
> <ma...@corp.netease.com>;
>