HDFS-16257. Set initialCapacity for guava cache to solve performance issue (#3524)
* HDFS-16257. Set initialCapacity for guava cache to solve performance issue * HDFS-16257. Add comments Co-authored-by: Symious <yiyang0203@gmail.com>
This commit is contained in:
parent
2565ec5804
commit
b7bb43f6db
|
@ -138,6 +138,9 @@ public class MountTableResolver
|
|||
FEDERATION_MOUNT_TABLE_MAX_CACHE_SIZE,
|
||||
FEDERATION_MOUNT_TABLE_MAX_CACHE_SIZE_DEFAULT);
|
||||
this.locationCache = CacheBuilder.newBuilder()
|
||||
// To workaround guava bug https://github.com/google/guava/issues/1055
|
||||
// Fixed since guava 13.0
|
||||
.initialCapacity(maxCacheSize)
|
||||
.maximumSize(maxCacheSize)
|
||||
.build();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue