A magnitude 6.2 earthquake hit off the coast of Japan.