Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-711

hdfsUtime does not handle atime = 0 or mtime = 0 correctly

    Details

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

      Description

      in HADOOP/src/c++/libhdfs/hdfs.h

      The following function document is incorrect:
      /* @param mtime new modification time or 0 for only set access time in seconds
      @param atime new access time or 0 for only set modification time in seconds
      */
      int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime);

      Currently, setting mtime or atime to 0 has no special meaning. That is, file last modified time will change to 0 if the mtime argument is 0.

      libhdfs should translate mtime = 0 or atime = 0 to the special value -1, which in HDFS means "don't change this time."

      1. HDFS-711.003.patch
        1 kB
        Colin Patrick McCabe
      2. HDFS-711.002.patch
        2 kB
        Colin Patrick McCabe
      3. HDFS-711.001.patch
        0.6 kB
        Colin Patrick McCabe

        Activity

        freestyler created issue -
        Colin Patrick McCabe made changes -
        Field Original Value New Value
        Assignee Colin Patrick McCabe [ cmccabe ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-711.001.patch [ 12535400 ]
        Colin Patrick McCabe made changes -
        Summary incorrect document in libhdfs api (hdfs.h) hdfsUtime does not handle atime = 0 or mtime = 0 correctly
        Description in HADOOP/src/c++/libhdfs/hdfs.h

        The following function document is incorrect:
        /* @param mtime new modification time or 0 for only set access time in seconds
              @param atime new access time or 0 for only set modification time in seconds
        */
            int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime);

        Setting mtime or atime to 0 has no special meaning. That is, file last modified time will change to 0 if the mtime argument is 0.
        in HADOOP/src/c++/libhdfs/hdfs.h

        The following function document is incorrect:
        /* @param mtime new modification time or 0 for only set access time in seconds
              @param atime new access time or 0 for only set modification time in seconds
        */
            int hdfsUtime(hdfsFS fs, const char* path, tTime mtime, tTime atime);

        Currently, setting mtime or atime to 0 has no special meaning. That is, file last modified time will change to 0 if the mtime argument is 0.

        libhdfs should translate mtime = 0 or atime = 0 to the special value -1, which in HDFS means "don't change this time."
        Colin Patrick McCabe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-711.002.patch [ 12535487 ]
        Colin Patrick McCabe made changes -
        Attachment HDFS-711.003.patch [ 12535488 ]
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 2.0.1-alpha [ 12321440 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.2-alpha [ 12322472 ]
        Fix Version/s 2.1.0-alpha [ 12321440 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            freestyler
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development