Former judge who told friend of drug investigation sentenced