XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • None
    • HDFS-8707
    • hdfs-client
    • None

    Description

      Reproducer:

      char *buf2 = new char[file_info->mSize];
      memset(buf2, 0, (size_t)file_info->mSize);
      int ret = hdfsRead(fs, file, buf2, file_info->mSize);
      delete [] buf2;
      if(ret != file_info->mSize)

      { std::stringstream ss; ss << "tried to read " << file_info->mSize << " bytes. but read " << ret << " bytes"; ReportError(ss.str()); hdfsCloseFile(fs, file); continue; }

      When it runs with a file ~1.4GB large, it will return an error like "tried to read 1468888890 bytes. but read 134217728 bytes". The HDFS cluster it runs against has a block size of 134217728 bytes. So it seems hdfsRead will stop at a block boundary. Looks like a regression. We should add retry to continue reading cross blocks in case of files w/ multiple blocks.

      Attachments

        1. HDFS-10543.HDFS-8707.000.patch
          1 kB
          Xiaowei Zhu
        2. HDFS-10543.HDFS-8707.001.patch
          3 kB
          Xiaowei Zhu
        3. HDFS-10543.HDFS-8707.002.patch
          2 kB
          Xiaowei Zhu
        4. HDFS-10543.HDFS-8707.003.patch
          2 kB
          Xiaowei Zhu
        5. HDFS-10543.HDFS-8707.004.patch
          2 kB
          Xiaowei Zhu

        Activity

          People

            James C James Clampffer
            xiaowei.zhu Xiaowei Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: