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

fs -put command doesn't work if selecting certain files from a local folder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • 1.1.2
    • None
    • fs
    • None

    Description

      The following four commands (a) - (d) were run sequentially. From (a) - (c) HDFS folder "inputABC" does not yet exist.

      (a) and (b) are improperly refusing to put the files from conf/.xml into inputABC because folder inputABC doesn't yet exist. However, in (c) when I make the same request except with just "conf" (and not "conf/.xml") HDFS will correctly create inputABC and copy the folders over. We see that inputABC now exists in (d) when I subsequently try to copy the conf/*.xml folders, it correctly complains that the files already exist there.

      IOW, I can put "conf" into a nonexisting HDFS folder and fs will create the folder for me, but I can't do the same with "conf/.xml" – but the latter should work equally as well. The problem appears to be in org.apache.hadoop.fs.FileUtil, line 176, which properly routes "conf" to have its files copied but will have "conf/.xml" subsequently return a "nonexisting folder" error.

      a) gmazza@gmazza-work:/media/work1/hadoop-1.1.2$ bin/hadoop fs -put conf/*.xml inputABC
      put: `inputABC': specified destination directory doest not exist
      b) gmazza@gmazza-work:/media/work1/hadoop-1.1.2$ bin/hadoop fs -put conf/*.xml inputABC
      put: `inputABC': specified destination directory doest not exist
      c) gmazza@gmazza-work:/media/work1/hadoop-1.1.2$ bin/hadoop fs -put conf inputABC
      d) gmazza@gmazza-work:/media/work1/hadoop-1.1.2$ bin/hadoop fs -put conf/*.xml inputABC
      put: Target inputABC/capacity-scheduler.xml already exists
      Target inputABC/core-site.xml already exists
      Target inputABC/fair-scheduler.xml already exists
      Target inputABC/hadoop-policy.xml already exists
      Target inputABC/hdfs-site.xml already exists
      Target inputABC/mapred-queue-acls.xml already exists
      Target inputABC/mapred-site.xml already exists
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            gmazza Glen Mazza
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: