Class StubDurationTracker
java.lang.Object
org.apache.hadoop.fs.statistics.impl.StubDurationTracker
- All Implemented Interfaces:
AutoCloseable,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
-
-
Method Details
-
failed
public void failed()Description copied from interface:DurationTrackerThe operation failed. Failure statistics will be updated.- Specified by:
failedin interfaceDurationTracker
-
close
public void close()Description copied from interface:DurationTrackerFinish tracking: update the statistics with the timings.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDurationTracker
-
asDuration
Description copied from interface:DurationTrackerGet 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:
asDurationin interfaceDurationTracker- Returns:
- a duration, value of ZERO until close().
-