Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
Currently in hadoop.common.conf.Configuration, when you specify a XML like this:
<configuration> <property> <name>conf.name</name> <value></value> </property> </configuration>
When you trying to get the conf.name, the returned value is null instead of an empty string.
Test code for this,
import java.io.ByteArrayInputStream; import org.apache.hadoop.conf.Configuration; public class HadoopConfigurationEmptyTest { public static void main(String[] args) { Configuration conf = new Configuration(false); ByteArrayInputStream bais = new ByteArrayInputStream(("<configuration><property>" + "<name>conf.name</name>" + "<value></value>" + "</property></configuration>").getBytes()); conf.addResource(bais); System.out.println(conf.get("conf.name")); } }
Does this intentionally or a behavior should be fixed?
Attachments
Attachments
Issue Links
- is duplicated by
-
HADOOP-6228 Configuration should allow storage of null values.
- Reopened