onestop icon indicating copy to clipboard operation
onestop copied to clipboard

OneStop kafka typecast ParsedRecord to ParsedRecordWithId fails

Open erinreeves opened this issue 3 years ago • 0 comments

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.

erinreeves avatar Jul 14 '21 23:07 erinreeves