Using Monte Carlo simulation, we study a fluid of two-dimensional hard rods inside a small circular cavity bounded by a hard wall, from the dilute regime to the high-density, layering regime. Both planar and homeotropic anchoring of the nematic director can be induced at the walls through a free-energy penalty. The circular geometry creates frustration in the nematic phase and a polarsymmetry configuration with a distorted director field plus two +1/2 disclinations is created. At higher densities, a quasi-uniform structure is observed with a (minimal) director distortion which is relaxed via the formation of orientational domain walls. This novel structure is not predicted by elasticity theory and is similar to the step-like structures observed in three-dimensional hybrid slit pores. We speculate that the formation of domain walls is a general mechanism to relax elastic stresses in conditions of strong surface anchoring and severe spatial confinement.