Yes you can.  But you are going to have to launch your own in process zookeeper 
instance to do it.  One of the constructors to LocalCluster takes a String host 
and Long port as parameters to tell it where zookeeper is.
So you could launch your own ZK, get the host and port (if the port is 
ephemeral) and pass them into storms LocalCluster, and kafka separately.



- Bobby


On Thursday, July 20, 2017, 2:03:14 AM CDT, Alexandre Vermeerbergen 
<[email protected]> wrote:

Hello Bobby,

Thanks for this clarification.

Can the single node ZK instance spawned by Storm local mode be used by a single 
node Kafka broker instance which would be used by a unit test "harness" 
allowing to test topologies depending on storm-kafka-client?

Are there any samples of such tests relying on Storm local mode and a single 
node Kafka broker?

Best regards,
Alexandre Vermeerbergen


2017-07-19 18:30 GMT+02:00 Bobby Evans <[email protected]>:

The only ports that it eats in local mode is for zookeeper (it spins up a 
single node ZK instance to talk to).  The communication between workers is all 
done through https://github.com/apache/ storm/blob/master/storm- 
client/src/jvm/org/apache/ storm/messaging/local/Context. java unless you 
explicitly turn it off through some special incantations intended only for 
internal testing of storm. 

- Bobby


On Wednesday, July 19, 2017, 11:17:23 AM CDT, Alexandre Vermeerbergen 
<[email protected]> wrote:

Hi Bobby,

I'd like to limit ports usage for our unit tests. But yeah, even Storm's Local 
mode eats some ports, isn't it ?

Best regards,
Alexandre


2017-07-19 18:02 GMT+02:00 Bobby Evans <[email protected]>:

Are you doing an integration test?  If so why not setup a KafkaBroker it would 
be a more correct test?  You could alternatively replace them with test bolts 
and test spouts so you can verify what it happening, but then it is not as much 
of an integration test.


- Bobby


On Wednesday, July 19, 2017, 10:58:02 AM CDT, Alexandre Vermeerbergen 
<[email protected]> wrote:

Hello,

Is there a recommended way for testing topologies relying on storm-kafka-client 
spouts & bolts? 

Ideally, I'like to do it without setting up a KafkaBroker server, if possible.

Best regards,
Alexandre Vermeerbergen




Reply via email to