查看api:http://hadoop.apache.org/docs/stable/api/ 若能獲取相應的name屬性,返回name值,若無法獲得,返回null. 若能獲取相應的name屬性,返回name值,若無法獲得,返回nulldefaultValue. ...
查看api:http://hadoop.apache.org/docs/stable/api/
public String get(String name) Get the value of the name property, null if no such property exists. If the key is deprecated, it returns the value of the first key which replaces the deprecated key and is not null. Values are processed for variable expansion before being returned. Parameters: name - the property name, will be trimmed before get value. Returns: the value of the name or its replacing property, or null if no such property exists.
若能獲取相應的name屬性,返回name值,若無法獲得,返回null.
public String get(String name, String defaultValue) Get the value of the name. If the key is deprecated, it returns the value of the first key which replaces the deprecated key and is not null. If no such property exists, then defaultValue is returned. Parameters: name - property name, will be trimmed before get value. defaultValue - default value. Returns: property value, or defaultValue if the property doesn't exist.
若能獲取相應的name屬性,返回name值,若無法獲得,返回nulldefaultValue.