[
https://issues.apache.org/jira/browse/SAMZA-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vishal Kuo updated SAMZA-935:
-----------------------------
Description:
When working with a modified bin/grid script found in
https://github.com/theduderog/hello-samza-confluent we found that attempting to
start confluent's schemaregistry service immediately after starting the other
services resulted in failure since schemaregistry is dependent on kafka which
takes a couple seconds to start up.
Would it make sense to add a wait option for kafka like we have added here:
https://github.com/theduderog/hello-samza-confluent/blob/master/bin/grid#L118-L132
?
{code}
wait_kafka() {
echo "Waiting for kafka broker to start..."
until $(nc -w 2 localhost 9092); do
printf '.'
sleep 1
done
printf '\n'
echo "Kafka broker is listening";
}
{code}
This way, dependent services started right after ./bin/grid bootsrap won't fail
intermittently.
I don't mind adding this if it can be considered useful.
was:
When working with a modified bin/grid script found in
https://github.com/theduderog/hello-samza-confluent we found that attempting to
start confluent's schemaregistry service immediately after starting the other
services resulted in failure since schemaregistry is dependent on kafka which
takes a couple seconds to start up.
Would it make sense to add a wait option for kafka like we have added here:
https://github.com/theduderog/hello-samza-confluent/blob/master/bin/grid#L118-L132
?
```
wait_kafka() {
echo "Waiting for kafka broker to start..."
until $(nc -w 2 localhost 9092); do
printf '.'
sleep 1
done
printf '\n'
echo "Kafka broker is listening";
}
```
This way, dependent services started right after ./bin/grid bootsrap won't fail
intermittently.
I don't mind adding this if it can be considered useful.
> hello-samza add kafka wait for dependent services
> -------------------------------------------------
>
> Key: SAMZA-935
> URL: https://issues.apache.org/jira/browse/SAMZA-935
> Project: Samza
> Issue Type: Improvement
> Components: hello-samza
> Reporter: Vishal Kuo
> Priority: Minor
>
> When working with a modified bin/grid script found in
> https://github.com/theduderog/hello-samza-confluent we found that attempting
> to start confluent's schemaregistry service immediately after starting the
> other services resulted in failure since schemaregistry is dependent on kafka
> which takes a couple seconds to start up.
> Would it make sense to add a wait option for kafka like we have added here:
> https://github.com/theduderog/hello-samza-confluent/blob/master/bin/grid#L118-L132
> ?
> {code}
> wait_kafka() {
> echo "Waiting for kafka broker to start..."
> until $(nc -w 2 localhost 9092); do
> printf '.'
> sleep 1
> done
> printf '\n'
> echo "Kafka broker is listening";
> }
> {code}
> This way, dependent services started right after ./bin/grid bootsrap won't
> fail intermittently.
> I don't mind adding this if it can be considered useful.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)