Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11945

ORC with non-local reads may not be reusing connection to DN

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0, 2.0.0
    • 1.3.0, 2.0.0
    • None
    • None

    Description

      When “seek + readFully(buffer, offset, length)” is used, DFSInputStream ends up going via “readWithStrategy()”. This sets up BlockReader with length equivalent to that of the block size. So until this position is reached, RemoteBlockReader2.peer would not be added to the PeerCache (Plz refer RemoteBlockReader2.close() in HDFS). So eventually the next call to the same DN would end opening a new socket. In ORC, when it is not a data local read, this has a the possibility of opening/closing lots of connections with DN.

      In random reads, it would be good to set this length to the amount of data that is to be read (e.g pread call in DFSInputStream which sets up the BlockReader’s length correctly & the code path returns the Peer back to peer cache properly). “readFully(position, buffer, offset, length)” follows this code path and ends up reusing the connections properly. Creating this JIRA to fix this issue.

      Attachments

        1. HIVE-11945.1.patch
          4 kB
          Rajesh Balamohan
        2. HIVE-11945.2.patch
          7 kB
          Rajesh Balamohan
        3. HIVE-11945.3.branch-1.patch
          5 kB
          Rajesh Balamohan
        4. HIVE-11945.3.patch
          5 kB
          Rajesh Balamohan

        Issue Links

          Activity

            People

              rajesh.balamohan Rajesh Balamohan
              rajesh.balamohan Rajesh Balamohan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: