You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by Esa HekmatiZadeh <es...@gmail.com> on 2020/03/16 22:09:48 UTC

Suggestion about default Configuration object

Hi All,

I'm new to Hadoop and HDFS, currently, I'm reading source code and do some
experimentation and I would like to contribute to the project.
As I reading the source code I understood there are several cases of
instantiation of Configuration class without any special parameters, for
instance:

org.apache.hadoop.fs.DU line 98
org.apache.hadoop.metrics2.source.JvmMetrics line 120
org.apache.hadoop.io.WritableComparator line 128
org.apache.hadoop.conf.ReconfigurationServlet line 90

Do you think it's a good idea to keep a singleton instance of it as a
static field for the usage which doesn't intend to change it (because it's
a mutable class and some of these client class may change their instance)