deadly force is only acceptable when it is the minimum force required to prevent harm to ones self. essentially, it is only acceptable as a last resort measure. if someone is attacking you with the intent and means to kill you, deadly force is acceptable. if they don't have either the intent or the means to accomplish such, deadly force as self defense is a violation of law.
as an extreme example, you can't shoot someone dead because they spit in your face. while spitting in someone's face is considered assault, it is not reasonable to believe that they have the intent of killing you. conversely, if one is attacked with a deadly weapon, be it an ax, knife, gun, etc., it is reasonable to assume that their intent is to kill you in which case a shooting is justified. you don't attack someone with a deadly weapon without the intent of using it to kill.
in this case, the officers attempted to subdue the criminal with two forms of non-lethal force which proved to be ineffective. the perpetrator continued his assault on the officers and initiated a swing at the head of one of the officers. it is reasonable to assume in that split second that his intent was to kill the officer and shooting the assailant was the minimum force required to protect themselves from death.
i certainly don't give officers the green light to shoot first and ask questions later, but by no means do I think that they should be prosecuted for protecting themselves and others from imminent death.