Judge Arun Subramanian sentenced the rap mogul to four years and two months in prison and fined him $500,000, the maximum allowed.