You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by omaralvarez <xx...@gmail.com> on 2016/06/21 17:10:13 UTC

TaskManager information during runtime

Hi,

I have a program that creates one StreamingSource for each port in which I
want to receive data.

I'm trying to know the hostname of all the created sources, so I can send
data to them from external processes. 

Is there any other way during runtime other than using the REST API for
obtaining the hostname in which the sources are executed? I cannot see in
the documentation on how to do this with the Java API.

I tried to do it manually in the StreamingSource constructor, but I only get
the hostname of the master thread.

Cheers,

Omar.



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/TaskManager-information-during-runtime-tp7655.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Re: TaskManager information during runtime

Posted by omaralvarez <xx...@gmail.com>.
Thanks, this is exactly what I was looking for.

Cheers,

Omar.



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/TaskManager-information-during-runtime-tp7655p7665.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Re: TaskManager information during runtime

Posted by Aljoscha Krettek <al...@apache.org>.
Hi,
you can implement a RichSourceFunction. With this you can also implement
open() and close() methods that get called when your source is started on
the worker node and closed respectively. In there, you could determine the
hostname and send it to some centralized service so that it knows the
hostnames of all the running sources.

Cheers,
Aljoscha

On Tue, 21 Jun 2016 at 19:50 omaralvarez <xx...@gmail.com> wrote:

> Hi,
>
> I have a program that creates one StreamingSource for each port in which I
> want to receive data.
>
> I'm trying to know the hostname of all the created sources, so I can send
> data to them from external processes.
>
> Is there any other way during runtime other than using the REST API for
> obtaining the hostname in which the sources are executed? I cannot see in
> the documentation on how to do this with the Java API.
>
> I tried to do it manually in the StreamingSource constructor, but I only
> get
> the hostname of the master thread.
>
> Cheers,
>
> Omar.
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/TaskManager-information-during-runtime-tp7655.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>