@@ -81,7 +81,7 @@ public class NativeExecutionSystemConfig
8181 private static final String MEMORY_ARBITRATOR_CAPACITY_GB = "query-memory-gb" ;
8282 // Set memory arbitrator reserved capacity. Since there is only one query
8383 // running at Presto-on-Spark at a time, then we shall set this to zero.
84- private static final String MEMORY_ARBITRATOR_RESERVED_CAPACITY_GB = "query- reserved-memory-gb " ;
84+ private static final String SHARED_ARBITRATOR_RESERVED_CAPACITY = "shared-arbitrator. reserved-capacity " ;
8585 // Set the initial memory capacity when we create a query memory pool. For
8686 // Presto-on-Spark, we set it to 'query-memory-gb' to allocate all the
8787 // memory arbitrator capacity to the query memory pool on its creation as
@@ -137,7 +137,7 @@ public class NativeExecutionSystemConfig
137137 private boolean useMmapAllocator = true ;
138138 private String memoryArbitratorKind = "SHARED" ;
139139 private int memoryArbitratorCapacityGb = 8 ;
140- private int memoryArbitratorReservedCapacityGb ;
140+ private DataSize sharedArbitratorReservedCapacity = new DataSize ( 0 , DataSize . Unit . GIGABYTE ) ;
141141 private long memoryPoolInitCapacity = 8L << 30 ;
142142 private long memoryPoolReservedCapacity ;
143143 private long memoryPoolTransferCapacity = 2L << 30 ;
@@ -180,7 +180,7 @@ public Map<String, String> getAllProperties()
180180 .put (USE_MMAP_ALLOCATOR , String .valueOf (getUseMmapAllocator ()))
181181 .put (MEMORY_ARBITRATOR_KIND , String .valueOf (getMemoryArbitratorKind ()))
182182 .put (MEMORY_ARBITRATOR_CAPACITY_GB , String .valueOf (getMemoryArbitratorCapacityGb ()))
183- .put (MEMORY_ARBITRATOR_RESERVED_CAPACITY_GB , String .valueOf (getMemoryArbitratorReservedCapacityGb ()))
183+ .put (SHARED_ARBITRATOR_RESERVED_CAPACITY , String .valueOf (getSharedArbitratorReservedCapacity ()))
184184 .put (MEMORY_POOL_INIT_CAPACITY , String .valueOf (getMemoryPoolInitCapacity ()))
185185 .put (MEMORY_POOL_RESERVED_CAPACITY , String .valueOf (getMemoryPoolReservedCapacity ()))
186186 .put (MEMORY_POOL_TRANSFER_CAPACITY , String .valueOf (getMemoryPoolTransferCapacity ()))
@@ -482,16 +482,16 @@ public int getMemoryArbitratorCapacityGb()
482482 return memoryArbitratorCapacityGb ;
483483 }
484484
485- @ Config (MEMORY_ARBITRATOR_RESERVED_CAPACITY_GB )
486- public NativeExecutionSystemConfig setMemoryArbitratorReservedCapacityGb ( int memoryArbitratorReservedCapacityGb )
485+ @ Config (SHARED_ARBITRATOR_RESERVED_CAPACITY )
486+ public NativeExecutionSystemConfig setSharedArbitratorReservedCapacity ( DataSize sharedArbitratorReservedCapacity )
487487 {
488- this .memoryArbitratorReservedCapacityGb = memoryArbitratorReservedCapacityGb ;
488+ this .sharedArbitratorReservedCapacity = sharedArbitratorReservedCapacity ;
489489 return this ;
490490 }
491491
492- public int getMemoryArbitratorReservedCapacityGb ()
492+ public DataSize getSharedArbitratorReservedCapacity ()
493493 {
494- return memoryArbitratorReservedCapacityGb ;
494+ return sharedArbitratorReservedCapacity ;
495495 }
496496
497497 @ Config (MEMORY_POOL_INIT_CAPACITY )
0 commit comments