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

Truncate should not be success when Truncate Size and Current Size are equal.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • None
    • None

    Description

      Truncate should not be success when Truncate Size and Current Size are equal.

      $ ./hdfs dfs -cat /file
      abcdefgh

      $ ./hdfs dfs -truncate -w 2 /file
      Waiting for /file ...
      Truncated /file to length: 2

      $ ./hdfs dfs -cat /file
      ab


      $ ./hdfs dfs -truncate -w 2 /file
      Truncated /file to length: 2

      $ ./hdfs dfs -cat /file
      ab

      Expecting to throw Truncate Error:
      -truncate: Cannot truncate to a larger file size. Current size: 2, truncate size: 2

      Attachments

        1. HDFS-8505.patch
          1 kB
          Brahma Reddy Battula

        Activity

          People

            brahmareddy Brahma Reddy Battula
            archanat Archana T
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: