What do you mean the line is a duplicate? Its only used once in this file. the spark.historyserver.address isn't used anywhere else in spark.  There are 2 different ApplicationMaster files. One for yarn-alpha and one for yarn-stable but currently they have no shared base class.    We could move it up but since its only being used here and this function is only called once I don't see the need.