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

Change SCM ContainerDB key to proto structure to support backward compatibility.

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      Currently, the 'key' type of the SCM container DB is org.apache.hadoop.hdds.scm.container.ContainerID which is not backed up by a proto equivalent. Hence, we use a long codec to serialize and deserialize the key from long to byte[ ] and back.

        public static final DBColumnFamilyDefinition<ContainerID, ContainerInfo>
            CONTAINERS =
            new DBColumnFamilyDefinition<ContainerID, ContainerInfo>(
                "containers",
                ContainerID.class,
                new ContainerIDCodec(),
                ContainerInfo.class,
                new ContainerInfoCodec());
      

      In the future if we have to support a container id type that is more than just a long, then changing the ContainerID class will break backward compatibility. To handle this incompatibility in the future, we have to either migrate old data or provide fallback conversion codecs for the old data type. Hence, it is good to wrap this long into a proto structure.

      cc nanda619 / arp.

      Attachments

        Issue Links

          Activity

            People

              pifta István Fajth
              avijayan Aravindan Vijayan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: