Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2274 Avoid buffer copying in Codec
  3. HDDS-8750

In ContainerKeyPrefixCodec, toPersistedFormat(..) and fromPersistedFormat(..) are not consistent.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Ozone Recon

    Description

      The following change to the test will cause failure.

      +++ b/hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconCodecs.java
      @@ -35,7 +35,7 @@ public class TestReconCodecs {
         @Test
         public void testContainerKeyPrefixCodec() throws IOException {
           ContainerKeyPrefix containerKeyPrefix = ContainerKeyPrefix.get(
      -        System.currentTimeMillis(), "TestKeyPrefix", 0);
      +        System.currentTimeMillis(), "TestKeyPrefix", -1);
       
           Codec<ContainerKeyPrefix> codec = ContainerKeyPrefixCodec.get();
           byte[] persistedFormat = codec.toPersistedFormat(containerKeyPrefix);
      

      KeyPrefixContainerCodec will also fail with a similar test.

      Attachments

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: