Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-3816 Erasure Coding
  3. HDDS-6012

EC: Fix TestOzoneShellHA failures post master merge with EC branch

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • EC-Branch
    • None
    • None
    • None

    Description

      TestOzoneShellHA failing as the SCMClientProtocolServer#listContainer API is not filtering properly EC containers.

       

      if (factor != null) {
      return scm.getContainerManager().getContainers(state).stream()
      .filter(info -> info.containerID().getId() >= startContainerID)
      .filter(info -> (info.getReplicationFactor() == factor))
      .sorted().limit(count).collect(Collectors.toList());
      }

       

      Here for EC containers, we will not have factor, so test will fail with the following exception.

      2021-11-18 11:29:12,567 [Time-limited test] INFO  retry.RetryInvocationHandler (RetryInvocationHandler.java:log(411)) - com.google.protobuf.ServiceException: org.apache.hadoop.ipc.RemoteException(java.lang.UnsupportedOperationException): factor is not valid property of replication EC
          at org.apache.hadoop.hdds.client.ReplicationConfig.getLegacyFactor(ReplicationConfig.java:110)
          at org.apache.hadoop.hdds.scm.container.ContainerInfo.getReplicationFactor(ContainerInfo.java:162)
          at org.apache.hadoop.hdds.scm.server.SCMClientProtocolServer.lambda$listContainer$4(SCMClientProtocolServer.java:432)
          at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
          at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
          at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359)
          at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
          at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
          at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
          at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
          at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
          at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
          at org.apache.hadoop.hdds.scm.server.SCMClientProtocolServer.listContainer(SCMClientProtocolServer.java:433)
          at org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocolServerSideTranslatorPB.listContainer(StorageContainerLocationProtocolServerSideTranslatorPB.java:501)
          at org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocolServerSideTranslatorPB.processRequest(StorageContainerLocationProtocolServerSideTranslatorPB.java:229)
          at org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:87)
          at org.apache.hadoop.hdds.scm.protocol.StorageContainerLocationProtocolServerSideTranslatorPB.submitRequest

      Attachments

        Activity

          People

            umamaheswararao Uma Maheswara Rao G
            umamaheswararao Uma Maheswara Rao G
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: