A former judge was sentenced to 27 months in federal prison on Tuesday for possession of child pornography that was initially found by a Canadian hacker vigilante who tipped off authorities six years ago.