Caused by: java.lang.IllegalArgumentException: Invalid timestamp: '1658925060N'
MosheBlumbergX opened this issue · comments
https://github.com/startreedata/pinot-recipes/tree/main/recipes/kafka-sasl
Using a mac there are 2 issues with the command outlined in the demo:
while true; do
ts=`date +%s%N | cut -b1-13`;
uuid=`cat /proc/sys/kernel/random/uuid | sed 's/[-]//g'`
count=$[ $RANDOM % 1000 + 0 ]
echo "{\"ts\": \"${ts}\", \"uuid\": \"${uuid}\", \"count\": $count}"
done | docker exec -i kafka-sasl /opt/kafka/bin/kafka-console-producer.sh \
--bootstrap-server localhost:9092 \
--topic events \
--producer.config /etc/kafka/kafka_client.conf
Caused by: java.lang.IllegalArgumentException: Invalid timestamp: '1658925060N'
cat /proc/sys/kernel/random/uuid
cat: /proc/sys/kernel/random/uuid: No such file or directory
I've used this command to resolve it:
while true; do
ts=`date +%s | cut -b1-13`;
uuid=`openssl rand -base64 6`
count=$[ $RANDOM % 1000 + 0 ]
echo "{\"ts\": \"${ts}\", \"uuid\": \"${uuid}\", \"count\": $count}"
done | docker exec -i kafka-sasl /opt/kafka/bin/kafka-console-producer.sh \
--bootstrap-server localhost:9092 \
--producer.config /etc/kafka/kafka_client.conf \
--topic events;
Closing due to age. However, we are just starting a review of all of these recipes with the intent to update them. I'll keep this in mind when we get to that recipe, thank you!