The gunman who killed nine people at a San Jose light rail yard was detained by US Customs and Border Protection officers in 2016, who found he had a hatred for his workplace where the mass shooting occurred, the Wall Street Journal reported, citing a Department of Homeland Security memo.