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

mkdir by file system shell fails on an empty bucket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.7.0
    • None
    • fs/s3
    • None
    • CentOS 7

    Description

      I have built the latest 2.7, and tried S3AFileSystem.

      Then found that mkdir fails on an empty bucket, named s3a here, as follows:

      # hadoop-2.7.0-SNAPSHOT/bin/hdfs dfs -mkdir s3a://s3a/foo
      15/03/24 03:49:35 DEBUG s3a.S3AFileSystem: Getting path status for s3a://s3a/foo (foo)
      15/03/24 03:49:36 DEBUG s3a.S3AFileSystem: Not Found: s3a://s3a/foo
      15/03/24 03:49:36 DEBUG s3a.S3AFileSystem: Getting path status for s3a://s3a/ ()
      15/03/24 03:49:36 DEBUG s3a.S3AFileSystem: Not Found: s3a://s3a/
      mkdir: `s3a://s3a/foo': No such file or directory
      

      So does ls.

      # hadoop-2.7.0-SNAPSHOT/bin/hdfs dfs -ls s3a://s3a/
      15/03/24 03:47:48 DEBUG s3a.S3AFileSystem: Getting path status for s3a://s3a/ ()
      15/03/24 03:47:48 DEBUG s3a.S3AFileSystem: Not Found: s3a://s3a/
      ls: `s3a://s3a/': No such file or directory
      

      This is how it works via s3n.

      # hadoop-2.7.0-SNAPSHOT/bin/hdfs dfs -ls s3n://s3n/
      # hadoop-2.7.0-SNAPSHOT/bin/hdfs dfs -mkdir s3n://s3n/foo
      # hadoop-2.7.0-SNAPSHOT/bin/hdfs dfs -ls s3n://s3n/
      Found 1 items
      drwxrwxrwx   -          0 1970-01-01 00:00 s3n://s3n/foo
      

      The snapshot is the following:

      # git branch
      * branch-2.7
      trunk
      # git log
      commit 929b04ce3a4fe419dece49ed68d4f6228be214c1
      Author: Harsh J <harsh@cloudera.com>
      Date: Sun Mar 22 10:18:32 2015 +0530

      Attachments

        1. HADOOP-11742-branch-2.7.001.patch
          1 kB
          Tadayoshi Sato
        2. HADOOP-11742-branch-2.7.002.patch
          2 kB
          Tadayoshi Sato
        3. HADOOP-11742-branch-2.7.003-1.patch
          1 kB
          Tadayoshi Sato
        4. HADOOP-11742-branch-2.7.003-2.patch
          1 kB
          Tadayoshi Sato

        Issue Links

          Activity

            People

              tsato Tadayoshi Sato
              tsato Tadayoshi Sato
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: