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

Trash initialization generates "deprecated filesystem name" warning even if the name is correct.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.17.0
    • 0.17.0
    • conf, fs
    • None

    Description

      HADOOP-1967 made it mandatory to prefix the value of "fs.default.name" with "hdfs://".

      1. During name-node initialization the value of the "fs.default.name" is set to <host>:<port> without the prefix even if the original name was prefixed with "hdfs://". This makes the Trash constructor, which is called with the modified configuration print the following warning:
        08/03/03 17:29:36 WARN fs.FileSystem: "<host>:<port>" is a deprecated filesystem name. Use "hdfs://<host>:<port>/" instead.
        08/03/03 17:29:36 WARN fs.FileSystem: "<host>:<port>" is a deprecated filesystem name. Use "hdfs://<host>:<port>/" instead.
        

        The warning is printed twice because FileSystem.getDefaultUri() is called twice during new Trash() and then inside Trash.getEmptier().

      2. Other than that the name-node never checks the correctness of the "fs.default.name", which it should.

      As a side note the Trash class should be rearranged IMO.

      • The Trash.getEmtier() should be replaced by
          static public Runnable getEmptier(Configuration conf) throws IOException
        
      • Trash should have only one private constructor, the one that is called in Emtier.run().
      • Then we can replace
         new Trash(conf).getEmptier() 

        with

         Trash.getEmptier(conf) 

        in order to avoid unnecessary creation of the Trash object on the stack.

      Attachments

        Activity

          People

            mahadev Mahadev Konar
            shv Konstantin Shvachko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: