Uploaded image for project: 'Hadoop Distributed Data Store'
  1. Hadoop Distributed Data Store
  2. HDDS-1373

KeyOutputStream, close after write request fails after retries, runs into IllegalArgumentException

    XMLWordPrintableJSON

    Details

    • Target Version/s:
    • Sprint:
      HDDS Biscayne

      Description

      In this code, the stream is closed via try with resource.

            try (OzoneOutputStream stream = ozoneBucket.createKey(keyName,
                bufferCapacity, ReplicationType.RATIS, ReplicationFactor.THREE,
                new HashMap<>())) {
              stream.write(buffer.array());
            } catch (Exception e) {
              LOG.error("LOADGEN: Create key:{} failed with exception", keyName, e);
              break;
            }
      

      Here, the write call fails correctly as expected, However the close doesn't fail with the same exception.

      The exception stack stack is as following

      2019-04-03 00:52:54,116 ERROR ozone.MiniOzoneLoadGenerator (MiniOzoneLoadGenerator.java:load(101)) - LOADGEN: Create key:pool-431-thread-9-81262222 failed with exception
      java.io.IOException: Retry request failed. retries get failed due to exceeded maximum allowed retries number: 5
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:492)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
              at org.apache.hadoop.ozone.client.io.KeyOutputStream.write(KeyOutputStream.java:287)
              at org.apache.hadoop.ozone.client.io.OzoneOutputStream.write(OzoneOutputStream.java:49)
              at java.io.OutputStream.write(OutputStream.java:75)
              at org.apache.hadoop.ozone.MiniOzoneLoadGenerator.load(MiniOzoneLoadGenerator.java:99)
              at org.apache.hadoop.ozone.MiniOzoneLoadGenerator.lambda$startIO$0(MiniOzoneLoadGenerator.java:137)
              at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
              Suppressed: java.lang.IllegalArgumentException
                      at com.google.common.base.Preconditions.checkArgument(Preconditions.java:72)
                      at org.apache.hadoop.ozone.client.io.KeyOutputStream.close(KeyOutputStream.java:643)
                      at org.apache.hadoop.ozone.client.io.OzoneOutputStream.close(OzoneOutputStream.java:60)
                      at org.apache.hadoop.ozone.MiniOzoneLoadGenerator.load(MiniOzoneLoadGenerator.java:100)
                      ... 5 more
      

        Attachments

        1. HDDS-1373.000.patch
          14 kB
          Shashikant Banerjee
        2. HDDS-1373.001.patch
          29 kB
          Shashikant Banerjee

          Issue Links

            Activity

              People

              • Assignee:
                shashikant Shashikant Banerjee
                Reporter:
                msingh Mukul Kumar Singh
              • Votes:
                0 Vote for this issue
                Watchers:
                5 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 - 40m
                  40m