Details
Description
The following methods in IOUtils close the streams that are passed in as parameters. Calling these methods can easily trigger findbug OBL: Method may fail to clean up stream or resource (OBL_UNSATISFIED_OBLIGATION). A good practice should be to close a stream in the same method where the stream is opened.
public static void copyBytes(InputStream in, OutputStream out, int buffSize, boolean close)
public static void copyBytes(InputStream in, OutputStream out, Configuration conf, boolean close)
These methods should be deprecated.
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-14691 Shell command "hadoop fs -put" multiple close problem
- Patch Available