Hi all, I am reading HDFS source code and got one question about FsDatasetImpl. In FsDatasetImpl#FsDatasetImpl(), we use the statement to create global ReplicaMap object,
volumeMap = new ReplicaMap(this); “this” is passed as input and is assigned to volumeMap.mutex for synchronization. In private FsDatasetImpl#addVolume(), "this" object is used for synchronization as well. ReplicaMap tempVolumeMap = new ReplicaMap(this); but in public addVolume(), “fsVolume” is passed as input. final ReplicaMap tempVolumeMap = new ReplicaMap(fsVolume); I am wondering if we can replace “this” with a smaller object, just like fsVolume in the third case, so that we can improve performance. Any comments? Regards, Fenghua --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org