An earthquake of magnitude 7.4 was felt in the Maluku Islands in eastern Indonesia.