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
ConstructorDescriptionTimeTrackingOutputStream
(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:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-