he attended sacramento city college. riley was drafted by the baltimore orioles in the third round of the draft. he dominated for the delmarva shorebirds of the south atlantic league at age 18, having an earned run average of 1.19 and 136 strikeouts in 83 innings pitched. it was there that his curveball started becoming known as one of the best in the orioles' organization at the time. he had similar success with the frederick keys of the carolina league and the bowie baysox of the double-a eastern league in . he earned a callup to the orioles in 1999, and though his era in three starts there was 7.36, he was still highly regarded by the orioles due to his minor-league achievements that year. "baseball america" listed him as the orioles' top prospect in both 1999 and . however, in 2000, he made only two starts for the rochester red wings (then the orioles' triple-a affiliate), giving up 11 earned runs in 7 innings. he spent the rest of that season and the season recovering from his first tommy john surgery.