in core/src/main/scala/org/apache/spark/sql/eventhubs/EventHubsSource.scala [435:444]
override def stop(): Unit = synchronized {
// if slowPartitionAdjustment is on, clean up Partition Status Tracker before closing
if (slowPartitionAdjustment) {
logDebug(
s"Slow partition adjustment is on, cleaning up the partition performance tracker before stopping.")
partitionsStatusTracker.cleanUp
localBatchId = -1
}
ehClient.close()
}