"I don't really try to look at it too much, but once the seventh inning rolls around you kind of know what's going on," Anderson said. "So I was just trying to focus on one pitch at a time, get an out and next thing you know I got hit in the calf."
Anderson (2-1) was relieved by Daniel Hudson in the eighth despite having thrown only 96 pitches. He walked one and struck out two while snapping the D-backs' four-game losing streak and handing the Giants their sixth straight loss at home, their longest such losing streak since dropping seven straight from May 14-31, 2008.
Second baseman Joe Panik came up empty in four at-bats, ending his hitting streak at 15 games. The Giants' two hits were the fewest they recorded at AT&T Park since June 5, 2013.
Bumgarner (7-3) allowed one run on nine hits in eight innings, striking out seven.
"He battled for us tonight," Panik said. "He made some good adjustments it looked like after the first couple of innings. They weren't hitting the ball hard through the middle innings. ... Unfortunately we couldn't get him a run."
MOMENTS THAT MATTERED Bringing the leather: The D-backs helped Anderson with a couple of nice defensive plays. In the third inning, third baseman Aaron Hill made a leaping grab of Nori Aoki's liner and threw to second to double off Matt Duffy. Then, with two outs and a runner on second in the fifth, left fielder Ender Inciarte ranged into center to snare a fly ball that A.J. Pollock lost in the lights.
"There were a number of good plays," D-backs manager Chip Hale said. "Think about Ender coming over from left field when Pollock couldn't see the ball. Could you imagine if that had been the first hit to knock out the no-hitter? When you have games where you only give up a couple hits. you're going to see great defense all around."
Aoki prevents a run: With two outs and runners on first and second in the top of the third inning, D-backs catcher Welington Castillo ripped a single to Aoki in left field. As Paul Goldschmidt rounded third base, Aoki fired a strike to Posey at the plate to get the runner with ease.
Cashing in: The D-backs left the bases loaded against the Bumgarner in the first inning, but they didn't let him off the hook in the second when Inciarte came through with a two-out RBI single to center.
"We could have had a couple more runs," Hale said. "We didn't execute a couple of things."
Missed opportunity: San Francisco posed few real threats to tie the game, but the best chance they had came in the eighth, when Duffy lead off the bottom half of the inning with a single. The Giants third baseman advanced to second on Hudson's wild pitch, but Justin Maxwell struck out. Pinch-hitter Casey McGehee followed it up with a soft grounder to second baseman Chris Owings, who caught Duffy stranded in between second and third to quash the Giants' rally.
SOUND SMART WITH YOUR FRIENDS
For the first time in his career, Bumgarner completed eight innings, gave up one run and lost.
WHAT'S NEXT D-backs: Arizona will call up Allen Webster to start Saturday's game. Webster, who was acquired from Boston this offseason, makes his first start for the D-backs. The right-hander owns a career 6.25 ERA in 89 1/3 innings pitched in the Majors.
Giants:Ryan Vogelsong takes the hill for the Giants, looking to improve on his performance this month. As the weather has heated up, the right-hander has cooled off. Vogelsong went 4-0 with a 1.14 ERA in five starts in May, but is 0-2 with a 5.68 ERA in June.