Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15072

HDFS MiniCluster fails to start when run in directory path with a %

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.5, 3.3.0
    • Fix Version/s: 3.3.0, 3.1.4, 3.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      I encountered this on a Mac while running an HBase minicluster that was using Hadoop 2.7.5. However, the code looks the same in trunk so it likely affects most or all current versions.

    • Hadoop Flags:
      Reviewed

      Description

      FSVolumeImpl.initializeCacheExecutor calls Guava's ThreadPoolExecutorBuilder. setNameFormat, passing in the String representation of the parent File. Guava will take the String whole and pass it to String.format, which uses % as a special character. That means that if parent.toString() contains a percentage sign, followed by a character that's illegal to use as a formatter in String.format(), you'll get an exception that stops the MiniCluster from starting up.

      I did not check to see if this would also happen on a normal DataNode daemon.

      initializeCacheExecutor should escape the parent file name before passing it in.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iwasakims Masatake Iwasaki
                Reporter:
                gjacoby Geoffrey Jacoby
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: