I'd say early in your career 1 year is fine but no more than 3. In fact, I think moving is essential to learning as I have met many people who had 10 years of experience but since they stayed with the same company, they really just had 10 x 1 year of experience.
As you grow in seniority, frequent jumps start hurting you.