How to create an empty test stream

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create an empty test stream

Dmitry Minaev
Hi everyone,

I have a pipeline where I union several streams. I want to test it and don't
want to populate one of the streams. I'm usually creating streams with:

DataStreamTestBase.createTestStreamWith(event).close();

The above statement creates a stream and puts the `event` inside. But in my
case I want to create an empty stream.

How do I do it?

--
Thanks, Dmitry




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to create an empty test stream

vino yang
Hi Dmitry,

Perhaps an easy way is to customize a source function. Then in the run method, start an empty loop? But I don't understand the meaning of starting a stream pipeline without generating data.

Best,
Vino

Dmitry Minaev <[hidden email]> 于2019年10月24日周四 上午6:16写道:
Hi everyone,

I have a pipeline where I union several streams. I want to test it and don't
want to populate one of the streams. I'm usually creating streams with:

DataStreamTestBase.createTestStreamWith(event).close();

The above statement creates a stream and puts the `event` inside. But in my
case I want to create an empty stream.

How do I do it?

--
Thanks, Dmitry




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to create an empty test stream

Dmitry Minaev
Thanks, I'll check it out.
Actually I realized I can always put a filter operator that'll effectively remove everything from the stream.

-- Dmitry

On Thu, Oct 24, 2019 at 2:29 AM vino yang <[hidden email]> wrote:
Hi Dmitry,

Perhaps an easy way is to customize a source function. Then in the run method, start an empty loop? But I don't understand the meaning of starting a stream pipeline without generating data.

Best,
Vino

Dmitry Minaev <[hidden email]> 于2019年10月24日周四 上午6:16写道:
Hi everyone,

I have a pipeline where I union several streams. I want to test it and don't
want to populate one of the streams. I'm usually creating streams with:

DataStreamTestBase.createTestStreamWith(event).close();

The above statement creates a stream and puts the `event` inside. But in my
case I want to create an empty stream.

How do I do it?

--
Thanks, Dmitry




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to create an empty test stream

vino yang
Yes, this is also a good idea if you don't ask for this stream to be empty from the source.

Best,
Dmitry

Dmitry Minaev <[hidden email]> 于2019年10月25日周五 下午12:21写道:
Thanks, I'll check it out.
Actually I realized I can always put a filter operator that'll effectively remove everything from the stream.

-- Dmitry

On Thu, Oct 24, 2019 at 2:29 AM vino yang <[hidden email]> wrote:
Hi Dmitry,

Perhaps an easy way is to customize a source function. Then in the run method, start an empty loop? But I don't understand the meaning of starting a stream pipeline without generating data.

Best,
Vino

Dmitry Minaev <[hidden email]> 于2019年10月24日周四 上午6:16写道:
Hi everyone,

I have a pipeline where I union several streams. I want to test it and don't
want to populate one of the streams. I'm usually creating streams with:

DataStreamTestBase.createTestStreamWith(event).close();

The above statement creates a stream and puts the `event` inside. But in my
case I want to create an empty stream.

How do I do it?

--
Thanks, Dmitry




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/