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

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

BELUGA BEHR created MAPREDUCE-7143:
--------------------------------------

             Summary: 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


{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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-dev-help@hadoop.apache.org