The Hadoop source code resides in the Apache git repository, and available from here: https://gitbox.apache.org/repos/asf?p=hadoop.git
The changes are also mirrored to the github repository https://github.com/apache/hadoop
Hdfs, Yarn, Mapreduce and other components all are parts of this one repository.