You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2018/10/01 13:54:00 UTC

[jira] [Updated] (MAPREDUCE-7143) Remove Magic Number From MapTask.java

     [ https://issues.apache.org/jira/browse/MAPREDUCE-7143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

BELUGA BEHR updated MAPREDUCE-7143:
-----------------------------------
    Status: Patch Available  (was: Open)

> Remove Magic Number From MapTask.java
> -------------------------------------
>
>                 Key: MAPREDUCE-7143
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7143
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: mrv2
>    Affects Versions: 2.10.0, 3.2.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: MAPREDUCE-7143.1.patch
>
>
> {code}
> FSDataOutputStream finalOut = rfs.create(finalOutputFile, true, 4096);
> {code}
> Remove magic number of '4096'.  Use default constructor so that the configurable buffer size is used instead...
> {code}
>   /**
>    * 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));
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org