Warrior elite class appears Shilla prior to samurai of Japan and called Hwa-Rang and acted under strict code named Hwa-rang-do. During the three kingdom period of Korea, Yamato had no specilised warrior elite class. Also some suggest the ancient Korean word "Saulabi" is the origin of Samurai. "Saul" in ancient Korean mean "fighting" and "abi" means father or man so the word meant "fighting father" or "fighting man". This theory becomes more probable because to Japanese the word "Samurai" has to be used as a whole otherwise it means nothing which strongly suggest the foreign origin of the word. Even in modern Korean, "Samu" means "fighting" but Japanese use "Kenka" or Tatakai" as a word for fighting. "Bushi" is a word from China.
This earlier existance of warrior class in Korea and the word Saulabi and Samurai all helps to us to reach the conclusion Samurai class in Japan actually came from Korea and when this class was replaced by scholar class in Korea, Japan consolidated more for this warrior class.