Details
-
Improvement
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
2.10.0, 3.2.0
-
None
-
None
-
Patch
Description
FSDataOutputStream finalOut = rfs.create(finalOutputFile, true, 4096);
Remove magic number of '4096'. Use default constructor so that the configurable buffer size is used instead...
/** * Create an FSDataOutputStream at the indicated Path. * @param f the file to create * @param overwrite if a file with this name already exists, then if true, * the file will be overwritten, and if false an exception will be thrown. * @throws IOException IO failure */ public FSDataOutputStream create(Path f, boolean overwrite) throws IOException { return create(f, overwrite, getConf().getInt(IO_FILE_BUFFER_SIZE_KEY, IO_FILE_BUFFER_SIZE_DEFAULT), getDefaultReplication(f), getDefaultBlockSize(f)); }