The Diamondbacks have agreed to terms with David Hernandez on a two-year contract. The 27-year-old right-hander has been one of the most effective relievers in baseball since joining the Diamondbacks. He would have been eligible for arbitration after the season. Hernandez is 0-1 with two saves and a 2.90 ERA this season, with 45 strikeouts in 31 innings over 33 games.