If xd shell is launched with hadoop v1 libs, hadoop yarn libs are not present thus resulting ClassNotFoundException if any yarn commands are used. It was the whole point of this function.