Skip to content
Snippets Groups Projects
Commit 264533b5 authored by huangzhaowei's avatar huangzhaowei Committed by Reynold Xin
Browse files

[SPARK-13482][MINOR][CONFIGURATION] Make consistency of the configuraiton named in TransportConf.

`spark.storage.memoryMapThreshold` has two kind of the value, one is 2*1024*1024 as integer and the other one is '2m' as string.
"2m" is recommanded in document but it will go wrong if the code goes into `TransportConf#memoryMapBytes`.

[Jira](https://issues.apache.org/jira/browse/SPARK-13482)

Author: huangzhaowei <carlmartinmax@gmail.com>

Closes #11360 from SaintBacchus/SPARK-13482.
parent 4d2864b2
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,8 @@ public class TransportConf {
* memory mapping has high overhead for blocks close to or below the page size of the OS.
*/
public int memoryMapBytes() {
return conf.getInt("spark.storage.memoryMapThreshold", 2 * 1024 * 1024);
return Ints.checkedCast(JavaUtils.byteStringAsBytes(
conf.get("spark.storage.memoryMapThreshold", "2m")));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment