cedardevs / onestop

OneStop is a data discovery system being built by CIRES researchers on a grant from the NOAA National Centers for Environmental Information. We welcome contributions from the community!
GNU General Public License v2.0
42 stars 20 forks source link

OneStop kafka typecast ParsedRecord to ParsedRecordWithId fails #1511

Open erinreeves opened 3 years ago

erinreeves commented 3 years ago

Bug Description Upon executing onestop-clients script launch_kafka_publisher.py on cedar-devs the Registry on cedar-devs crashes and restarts infinitely until kafka messages are deleted from pod 'pc-cp-kafka-0' by doing these steps:

STEPS to FIX Registry: Note: the offset needs to be one more than what is in the exception in the Registry pod logs. json='{"partitions":[{"topic":"psi-granules-by-collection","partition":3,"offset":11}],"version":1}' echo $json > kafka_delete_records.json kafka-delete-records --bootstrap-server localhost:9092 --offset-json-file kafka_delete_records.json

Platform/Environment cedar-devs

Severity Severity: HIGH (High/Medium/Low) Priority: MEDIUM (High/Medium/Low)

To Reproduce Steps to reproduce the behavior:

  1. ssh cedar-devs
  2. exec into sme pod (helm install if it isn't running, pull down onestop-clients and cd into it, if repo not on that user account)
  3. python scripts/launch_kafka_publisher.py -conf config.yml

Expected Result While the script completes and doesn't thrown an error Registry crashes, which shouldn't.

Actual Result Registry crashes. If you view its logs it has this in there: Caused by: java.lang.ClassCastException: class org.cedar.schemas.avro.psi.ParsedRecord cannot be cast to class org.cedar.schemas.avro.psi.ParsedRecordWithId (org.cedar.schemas.avro.psi.ParsedRecord and org.cedar.schemas.avro.psi.ParsedRecordWithId are in unnamed module of loader 'app')

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.