Package org.apache.hadoop.fs.impl
Class LeakReporter
java.lang.Object
org.apache.hadoop.fs.impl.LeakReporter
- All Implemented Interfaces:
Closeable,AutoCloseable
A class to report leaks of streams.
It is created during object creation, and closed during finalization.
Predicates should be supplied for the isOpen probe check if the
resource is still open, and an operation to actually close the
target.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of logger used to report leaks: "org.apache.hadoop.fs.resource.leaks". -
Constructor Summary
ConstructorsConstructorDescriptionLeakReporter(String message, BooleanSupplier isOpen, RunnableRaisingIOE closeAction) Constructor. -
Method Summary
-
Field Details
-
RESOURCE_LEAKS_LOG_NAME
Name of logger used to report leaks: "org.apache.hadoop.fs.resource.leaks".- See Also:
-
-
Constructor Details
-
LeakReporter
Constructor.Validates the parameters and builds the stack; append "; thread: " + thread name.
- Parameters:
message- error messageisOpen- open predicatecloseAction- action to close
-
-
Method Details