A magnitude-4.2 earthquake hit off the coast of the Noto Peninsula at a depth of 10 kilometers on Wednesday, according to the Japan Meteorological Agency.