He had been doing aikido for seven years.

Literal

He [topic-は] 7 years, aikido [object-を] doing was.

合気道 (あいきどう, 'aikido') is the Japanese martial art. 7年間 uses 間 as the duration marker. やっていた is the past progressive of やる — indicating he was doing it but has since stopped or the timeframe is complete. A straightforward duration sentence.