@@ -122,11 +122,11 @@ def open(self):
122
122
# Configure Zookeeper child process
123
123
args = self .kafka_run_class_args ("org.apache.zookeeper.server.quorum.QuorumPeerMain" , properties )
124
124
env = self .kafka_run_class_env ()
125
- self .child = SpawnedService (args , env )
126
125
127
126
# Party!
128
127
self .out ("Starting..." )
129
128
while True :
129
+ self .child = SpawnedService (args , env )
130
130
self .child .start ()
131
131
if self .child .wait_for (r"binding to port" , timeout = 5 ):
132
132
break
@@ -202,11 +202,6 @@ def open(self):
202
202
properties = os .path .join (self .tmp_dir , "kafka.properties" )
203
203
self .render_template (template , properties , vars (self ))
204
204
205
- # Configure Kafka child process
206
- args = self .kafka_run_class_args ("kafka.Kafka" , properties )
207
- env = self .kafka_run_class_env ()
208
- self .child = SpawnedService (args , env )
209
-
210
205
# Party!
211
206
self .out ("Creating Zookeeper chroot node..." )
212
207
args = self .kafka_run_class_args ("org.apache.zookeeper.ZooKeeperMain" ,
@@ -225,7 +220,13 @@ def open(self):
225
220
self .out ("Done!" )
226
221
227
222
self .out ("Starting..." )
223
+
224
+ # Configure Kafka child process
225
+ args = self .kafka_run_class_args ("kafka.Kafka" , properties )
226
+ env = self .kafka_run_class_env ()
227
+
228
228
while True :
229
+ self .child = SpawnedService (args , env )
229
230
self .child .start ()
230
231
if self .child .wait_for (r"\[Kafka Server %d\], Started" % self .broker_id , timeout = 5 ):
231
232
break
0 commit comments