Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-1458

reduce namenode getFileinfo rpc

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Java, Reader
    • None

    Description

      In the ReaderImpl.java code, there is the following logic:

      if (maxFileLength == Long. MAX_VALUE) { 
      FileStatus fileStatus = fs.getFileStatus(path);          
      size = fileStatus. getLen();          
      modificationTime = fileStatus. getModificationTime(); 
      }
      

      The above logic is to obtain the length of the file so as to read the footer of orc. But because of this, when we read the orc file on hdfs, an open operation will cause an additional getFileinfo rpc operation by default (unless we set the file length through ReaderOptions.set before the orc open).
      Because we have opened the file in ReaderImpl, can we optimize the rpc call of NN in the following way (in a high-load cluster, the pressure on the namenode can be significantly reduced):

      if (maxFileLength == Long. MAX_VALUE) {           
      size = (DFSInputStream)file.getWrappedStream.getFileLength();          
      modificationTime = -1; 
      }
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mamingchen Mingchen_Ma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: