[
https://issues.apache.org/jira/browse/HDFS-8807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026195#comment-15026195
]
Hudson commented on HDFS-8807:
------------------------------
FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #640 (See
[https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/640/])
HDFS-8807. dfs.datanode.data.dir does not handle spaces between (szetszwo: rev
78ec38b2ede8bdf3874b2ae051af9580007a9ba1)
*
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataDirs.java
* hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
*
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java
> dfs.datanode.data.dir does not handle spaces between storageType and URI
> correctly
> ----------------------------------------------------------------------------------
>
> Key: HDFS-8807
> URL: https://issues.apache.org/jira/browse/HDFS-8807
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: datanode
> Affects Versions: 2.8.0
> Reporter: Anu Engineer
> Assignee: Anu Engineer
> Fix For: 2.8.0
>
> Attachments: HDFS-8807.001.patch, HDFS-8807.002.patch
>
>
> if you add a space between the storage type and file URI then datanodes fail
> during startup.
> Here is an example of "mis-configration" that leads to datanode failure.
> {code}
> <property>
> <name>dfs.datanode.data.dir</name>
> <value>
> [DISK] file://tmp/hadoop-aengineer/disk1/dfs/data
> </value>
> </property>
> {code}
> Here is the "fixed" version. Please *note* the lack of space between \[DISK\]
> and file URI
> {code}
> <property>
> <name>dfs.datanode.data.dir</name>
> <value>
> [DISK]file://tmp/hadoop-aengineer/disk1/dfs/data
> </value>
> </property>
> {code}
> we fail with a parsing error, here is the info from the datanode logs.
> {code}
> 2015-07-22 13:34:36,812 FATAL
> org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
> java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal
> character in scheme name at index 0:
> file://tmp/hadoop-aengineer/disk1/dfs/data
> at org.apache.hadoop.fs.Path.initialize(Path.java:204)
> at org.apache.hadoop.fs.Path.<init>(Path.java:170)
> at
> org.apache.hadoop.hdfs.server.datanode.StorageLocation.parse(StorageLocation.java:97)
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.getStorageLocations(DataNode.java:2314)
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:2298)
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:2349)
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:2529)
> at
> org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2553)
> Caused by: java.net.URISyntaxException: Illegal character in scheme name at
> index 0: file://tmp/hadoop-aengineer/disk1/dfs/data
> at java.net.URI$Parser.fail(URI.java:2829)
> at java.net.URI$Parser.checkChars(URI.java:3002)
> at java.net.URI$Parser.checkChar(URI.java:3012)
> at java.net.URI$Parser.parse(URI.java:3028)
> at java.net.URI.<init>(URI.java:753)
> at org.apache.hadoop.fs.Path.initialize(Path.java:201)
> ... 7 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)