A magnitude-2.7 earthquake hit Shunyi District in Beijing at a depth of 17 kilometers on Friday, according to the China Earthquake Networks Center (CENC).