Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7240 Scaling HDFS
  3. HDFS-12238

Ozone: Add valid trace ID check in sendCommandAsync

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • HDFS-7240
    • HDFS-7240
    • ozone
    • Reviewed

    Description

      In the function XceiverClientHandler#sendCommandAsync we should add a check

         if(StringUtils.isEmpty(request.getTraceID())) {
            throw new IllegalArgumentException("Invalid trace ID");
          }
      

      To ensure that ozone clients always send a valid trace ID. However, when you do that a set of current tests that do add a valid trace ID will fail. So we need to fix these tests too.

        TestContainerMetrics.testContainerMetrics
        TestOzoneContainer.testBothGetandPutSmallFile
        TestOzoneContainer.testCloseContainer
        TestOzoneContainer.testOzoneContainerViaDataNode
        TestOzoneContainer.testXcieverClientAsync
        TestOzoneContainer.testCreateOzoneContainer
        TestOzoneContainer.testDeleteContainer
        TestContainerServer.testClientServer
        TestContainerServer.testClientServerWithContainerDispatcher
        TestKeys.testPutAndGetKeyWithDnRestart
      

      This is based on a comment from vagarychen in HDFS-11580.

      Attachments

        1. HDFS-12238-HDFS-7240.01.patch
          12 kB
          Ajay Kumar
        2. HDFS-12238-HDFS-7240.02.patch
          11 kB
          Ajay Kumar
        3. HDFS-12238-HDFS-7240.03.patch
          11 kB
          Ajay Kumar

        Activity

          People

            ajayydv Ajay Kumar
            aengineer Anu Engineer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: