Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-8691 Ozone Streaming Write Pipeline Phase 2
  3. HDDS-9392

Streaming write pipeline should pick the nearest datanode as primary node

    XMLWordPrintableJSON

Details

    Description

      In `BlockDataStreamOutput#setupStream`, if pipeline mode is enabled, we pass the Pipeline object to the `RatisHelper#getRoutingTable`.

      In `RatisHelper#getRoutingTable`, we pick the first datanode in the pipeline as the primary, which from my understanding should be the Datanode closest to the client. However, I'm unable to find the logic that sort the datanodes in the pipeline.

      From what I understand, when we open the stream key and request SCM to allocate the block (`OMKeyRequest#allocateBlock`), we need to also pass the clientMachineString so that so that nearest datanodes will be used instead. This should improve the performance of the stream pipeline mode.

      Attachments

        Issue Links

          Activity

            People

              ivanandika Ivan Andika
              ivanandika Ivan Andika
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: