Package org.apache.spark.storage
Class TimeTrackingOutputStream
Object
java.io.OutputStream
org.apache.spark.storage.TimeTrackingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Intercepts write calls and tracks total time spent writing in order to update shuffle write
metrics. Not thread safe.
-
Constructor Summary
ConstructorsConstructorDescriptionTimeTrackingOutputStream(org.apache.spark.shuffle.ShuffleWriteMetricsReporter writeMetrics, OutputStream outputStream) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
TimeTrackingOutputStream
public TimeTrackingOutputStream(org.apache.spark.shuffle.ShuffleWriteMetricsReporter writeMetrics, OutputStream outputStream)
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-