Remove sinks or sources

Post Reply
Alizee
Posts: 11
Joined: Thu Mar 19, 2015 2:16 pm

Remove sinks or sources

Post by Alizee » Thu Apr 16, 2015 5:17 pm

I can install sinks or sources like common stream queries using addQuery2(..), but I can only find stream queries using getLogicalQueryIds(..) followed by a removeQuery(..) loop.

So far I've noticed that I could remove sinks using their name, but how do I get those names (considering I wasn't the one who pushed the sink into the server)?

I don't have the slightest clue when it comes to sources cause those actually have no removeSource-like function at all.

Thanks in advance, your support has been outstanding so far!

Alizee

User avatar
Marco Grawunder
Posts: 269
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Remove sinks or sources

Post by Marco Grawunder » Mon Apr 20, 2015 9:41 am

Hi Alizee,

you can retrieve all sinks (that you are allowed to see) with getSinks() and and all information about sources with getStreamsAndViewsInformation() (I think there could be a better name ;-)).

Sources are created when you use := or ::= in PQL. If you do not need explicit sources/sinks you can just use access/sender operators in queries. In this case the sources and sink are removed automatically if all queries that use these sources/sinks are removed.

Hope that answers your question?

Marco

Alizee
Posts: 11
Joined: Thu Mar 19, 2015 2:16 pm

Re: Remove sinks or sources

Post by Alizee » Mon Apr 20, 2015 12:16 pm

I'm using CQL cause I'm not going to be the one who pushes queries in the final application and want it to be as intuitive as possible. Therefore I use "CREATE STREAM" and "STREAM TO" in my source and sink queries. How would I implicitly use them in CQL?

User avatar
Marco Grawunder
Posts: 269
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Remove sinks or sources

Post by Marco Grawunder » Mon Apr 20, 2015 1:23 pm

Unfortunetly, this is currently only in PQL possible.

Alizee
Posts: 11
Joined: Thu Mar 19, 2015 2:16 pm

Re: Remove sinks or sources

Post by Alizee » Mon Apr 20, 2015 2:21 pm

So basically there's no way to remove a source during runtime if I use CQL?

User avatar
Marco Grawunder
Posts: 269
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Remove sinks or sources

Post by Marco Grawunder » Mon Apr 20, 2015 2:56 pm

Of course you can. You can use a DROP statement to remove sources and sinks if you know the name.

Alizee
Posts: 11
Joined: Thu Mar 19, 2015 2:16 pm

Re: Remove sinks or sources

Post by Alizee » Mon Apr 20, 2015 3:18 pm

I meant internally.. But yes, that's exactly what I'm gonna do now. Thank you for the clarification, Marco! :)

Alizee
Posts: 11
Joined: Thu Mar 19, 2015 2:16 pm

Re: Remove sinks or sources

Post by Alizee » Mon Apr 20, 2015 4:58 pm

PS: removeSinkByName(name, token) throws an XML-exception for some reason. Any idea why?

User avatar
Marco Grawunder
Posts: 269
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Remove sinks or sources

Post by Marco Grawunder » Tue Apr 21, 2015 11:50 am

Hmm. Maybe the name of the sink is not correct? Can you post a bug report? Ich will create a Jira account for you.

http://wiki.odysseus.offis.uni-oldenbur ... port+a+bug

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest