Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9337

org.apache.hadoop.fs.DF.getMount() does not work on Mac OS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.7, 2.1.0-beta, 3.0.0-alpha1
    • 2.1.0-beta
    • None
    • None
    • Mac OS 10.8

    • Reviewed

    Description

      test org.apache.hadoop.fs.TestLocalFileSystem.testReportChecksumFailure() (added in HADOOP-9067) appears to fail on MacOS because
      method org.apache.hadoop.fs.DF.getMount() does not work correctly.
      The problem is that "df -k <path>" command returns on MacOS output like the following:
      -------
      Filesystem   1024-blocks      Used Available Capacity  iused    ifree %iused  Mounted on
      /dev/disk0s4   194879828 100327120  94552708    52% 25081778 23638177   51%   /Volumes/Data
      -------
      while the following is expected:
      -------
      Filesystem 1024-blocks Used Available Capacity Mounted on
      /dev/mapper/vg_iveselovskyws-lv_home 420545160 15978372 383204308 5% /home
      -------
      So, we see that Mac's output has 3 additional tokens.

      I can suggest 2 ways to fix the problem.
      (a) use "-P" (POSIX) option when invoking df command. This will probably ensure unifirm output on all Unix systems;
      (b) move Mac branch to specific "case" branch and treat it specifically (like we currently have for AIX, DF.java, line 214)

      Attachments

        1. HADOOP-9337--a.patch
          4 kB
          Ivan A. Veselovsky
        2. HADOOP-9337--b.patch
          4 kB
          Ivan A. Veselovsky
        3. HADOOP-9337-branch-0.23--a.patch
          5 kB
          Ivan A. Veselovsky

        Activity

          People

            iveselovsky Ivan A. Veselovsky
            iveselovsky Ivan A. Veselovsky
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: