Hadoop Common
  1. Hadoop Common
  2. HADOOP-8168

empty-string owners or groups causes {{MissingFormatWidthException}} in o.a.h.fs.shell.Ls.ProcessPath()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.1, 0.24.0
    • Fix Version/s: 2.0.2-alpha
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In adjustColumnWidths(), we set the member variable lineFormat, which is used by ProcessPath() to print directory entries. Owners and groups are formatted using the formatting conversion %-Xs, where X is the max length of the owner or group. However, when trying this with an S3 URL, I found that the owner and group were empty (""). This caused X to be 0, which means that the formatting conversion is set to %-0s. This caused a MissingFormatWidthException to be thrown when the formatting string was used in ProcessPath().

      Formatting conversions are described here:

      http://docs.oracle.com/javase/1.6.0/docs/api/java/util/Formatter.html#intFlags

      The specific exception thrown (a subtype of IllegalFormatException) is described here:

      http://docs.oracle.com/javase/1.6.0/docs/api/java/util/MissingFormatWidthException.html

      1. HADOOP-8168.patch
        1 kB
        Eugene Koontz
      2. HADOOP-8496.patch
        1 kB
        Alejandro Abdelnur

        Issue Links

          Activity

          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Arun C Murthy made changes -
          Fix Version/s 2.0.2-alpha [ 12322473 ]
          Fix Version/s 2.1.0-alpha [ 12321441 ]
          Alejandro Abdelnur made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Fix Version/s 2.0.1-alpha [ 12321441 ]
          Resolution Fixed [ 1 ]
          Alejandro Abdelnur made changes -
          Assignee Eugene Koontz [ ekoontz ]
          Alejandro Abdelnur made changes -
          Attachment HADOOP-8496.patch [ 12533850 ]
          Alejandro Abdelnur made changes -
          Link This issue is duplicated by HADOOP-8496 [ HADOOP-8496 ]
          Eugene Koontz made changes -
          Description In {{adjustColumnWidths()}}, we set the member variable {{lineFormat}}, which is used by {{ProcessPath()}} to print directory entries. Owners and groups are formatted using the formatting conversion {{%-Xs}}, where X is the max length of the owner or group. However, when trying this with an S3 URL, I found that the owner and group were empty (""). This caused X to be 0, which means that the formatting conversion is set to {{%-0s}}. This caused a {{MissingFormatWidthException}} to be thrown when the formatting string was used in {{ProcessPath()}}.

          Formatting conversions are described here:

          http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#intFlags

          The specific exception thrown (a subtype of {{IllegalFormatException}}) is described here:

          http://docs.oracle.com/javase/1.5.0/docs/api/java/util/MissingFormatWidthException.html
          In {{adjustColumnWidths()}}, we set the member variable {{lineFormat}}, which is used by {{ProcessPath()}} to print directory entries. Owners and groups are formatted using the formatting conversion {{%-Xs}}, where X is the max length of the owner or group. However, when trying this with an S3 URL, I found that the owner and group were empty (""). This caused X to be 0, which means that the formatting conversion is set to {{%-0s}}. This caused a {{MissingFormatWidthException}} to be thrown when the formatting string was used in {{ProcessPath()}}.

          Formatting conversions are described here:

          http://docs.oracle.com/javase/1.6.0/docs/api/java/util/Formatter.html#intFlags

          The specific exception thrown (a subtype of {{IllegalFormatException}}) is described here:

          http://docs.oracle.com/javase/1.6.0/docs/api/java/util/MissingFormatWidthException.html
          Eugene Koontz made changes -
          Link This issue relates to HADOOP-4335 [ HADOOP-4335 ]
          Eugene Koontz made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Eugene Koontz made changes -
          Attachment HADOOP-8168.patch [ 12518214 ]
          Eugene Koontz made changes -
          Field Original Value New Value
          Summary empty-string owners or groups causes {{MissingFormatWidthExeption}} in o.a.h.fs.shell.Ls.ProcessPath() empty-string owners or groups causes {{MissingFormatWidthException}} in o.a.h.fs.shell.Ls.ProcessPath()
          Eugene Koontz created issue -

            People

            • Assignee:
              Eugene Koontz
              Reporter:
              Eugene Koontz
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development