hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tiger Hu <hufh2...@gmail.com>
Subject Question about ReplicaMap's mutex.
Date Thu, 25 Aug 2016 15:54:07 GMT
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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org


Mime
View raw message