Hadoop Common
  1. Hadoop Common
  2. HADOOP-2366

Space in the value for dfs.data.dir can cause great problems

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: conf
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The following configuration causes problems:

      <property>
      <name>dfs.data.dir</name>
      <value>/mnt/hstore2/hdfs, /home/foo/dfs</value>
      <description>
      Determines where on the local filesystem an DFS data node should store its bl
      ocks. If this is a comma-delimited list of directories, then data will be stor
      ed in all named directories, typically on different devices. Directories that
      do not exist are ignored.
      </description>
      </property>

      The problem is that the space after the comma causes the second directory for storage to be " /home/foo/dfs" which is in a directory named <SPACE> which contains a sub-dir named "home" in the hadoop datanodes default directory. This will typically cause the user's home partition to fill, but will be very hard for the user to understand since a directory with a whitespace name is hard to understand.

      My proposed solution would be to trimLeft all path names from this and similar property after splitting on comma. This still allows spaces in file and directory names but avoids this problem.

      1. HADOOP-2366.patch
        6 kB
        Michele Catasta

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Michele Catasta
              Reporter:
              Ted Dunning
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development