Hastings man sentenced for marijuana charge