The U.S. Geological Survey gave the magnitude as 7.4. The earthquake collapsed buildings and created a tsunami that washed ashore on southern Japanese islands.