Class StubDurationTracker

java.lang.Object
org.apache.hadoop.fs.statistics.impl.StubDurationTracker
All Implemented Interfaces:
AutoCloseable, DurationTracker

public final class StubDurationTracker extends Object implements DurationTracker
A simple stub duration tracker which can be issued in interfaces and other places where full duration tracking is not implemented.
  • Field Details

    • STUB_DURATION_TRACKER

      public static final DurationTracker STUB_DURATION_TRACKER
  • Method Details

    • failed

      public void failed()
      Description copied from interface: DurationTracker
      The operation failed. Failure statistics will be updated.
      Specified by:
      failed in interface DurationTracker
    • close

      public void close()
      Description copied from interface: DurationTracker
      Finish tracking: update the statistics with the timings.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface DurationTracker
    • asDuration

      public Duration asDuration()
      Description copied from interface: DurationTracker
      Get the duration of an operation as a java Duration instance. If the duration tracker hasn't completed, or its duration tracking doesn't actually measure duration, returns Duration.ZERO.
      Specified by:
      asDuration in interface DurationTracker
      Returns:
      a duration, value of ZERO until close().