I read your comment and largely agreed with you. Then I watched the video. It happened so fast, everyone was basically running during the attack (including the attacker and cops). It looks highly unlikely that the cop who shot could have grabbed the attacker before his partner got bludgeoned. And I don't know what prior information they had, but with a guy moving that quickly it'd be hard to distinguish a hammer from a knife.
My point is, this was a very fast-developing dangerous situation and I believe the cops responded well. Yes, cops are trained to handle dangerous situations but I don't think we can expect them to disregard other people's safety and lives to protect a very violent attacker.