Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2270

Avoid buffer copying in ContainerStateMachine.loadSnapshot/persistContainerSet

    XMLWordPrintableJSON

Details

    Description

      ContainerStateMachine:

      • In loadSnapshot(..), it first reads the snapshotFile to a byte[] and then parses it to ContainerProtos.Container2BCSIDMapProto. The buffer copying can be avoided.
            try (FileInputStream fin = new FileInputStream(snapshotFile)) {
              byte[] container2BCSIDData = IOUtils.toByteArray(fin);
              ContainerProtos.Container2BCSIDMapProto proto =
                  ContainerProtos.Container2BCSIDMapProto
                      .parseFrom(container2BCSIDData);
              ...
            }
        
      • persistContainerSet(..) has similar problem.

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m