Impacts of spontaneous hot flow anomalies on the magnetosheath and magnetopause