A major tsunami warning has been issued on Japan's western coast after a 7.6 earthquake rocked the country.