@Test public void testExplicitPropertyMappings() { Map<String, String> properties = new ImmutableMap.Builder<String, String>() .put("query.max-memory-per-node", "1GB") .put("query.max-total-memory-per-node", "3GB") .put("memory.heap-headroom-per-node", "1GB") .put("deprecated.legacy-system-pool-enabled", "true") .put("experimental.reserved-pool-enabled", "false") .build(); NodeMemoryConfig expected = new NodeMemoryConfig() .setLegacySystemPoolEnabled(true) .setMaxQueryMemoryPerNode(new DataSize(1, GIGABYTE)) .setMaxQueryTotalMemoryPerNode(new DataSize(3, GIGABYTE)) .setHeapHeadroom(new DataSize(1, GIGABYTE)) .setReservedPoolEnabled(false); assertFullMapping(properties, expected); }
public TestSqlTaskManager() { localMemoryManager = new LocalMemoryManager(new NodeMemoryConfig(), new ReservedSystemMemoryConfig()); localSpillManager = new LocalSpillManager(new NodeSpillConfig()); taskExecutor = new TaskExecutor(8, 16, 3, 4, Ticker.systemTicker()); taskExecutor.start(); taskManagementExecutor = new TaskManagementExecutor(); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testInvalidValues() { NodeMemoryConfig config = new NodeMemoryConfig(); config.setMaxQueryTotalMemoryPerNode(new DataSize(1, GIGABYTE)); config.setHeapHeadroom(new DataSize(3.1, GIGABYTE)); // In this case we have 4GB - 1GB = 3GB available memory for the general pool // and the heap headroom and the config is more than that. validateHeapHeadroom(config, new DataSize(4, GIGABYTE).toBytes()); } }
public SqlTaskManager createSqlTaskManager(TaskManagerConfig config) { return new SqlTaskManager( createTestingPlanner(), new MockLocationFactory(), taskExecutor, createTestSplitMonitor(), new NodeInfo("test"), localMemoryManager, taskManagementExecutor, config, new NodeMemoryConfig(), localSpillManager, new NodeSpillConfig(), new TestingGcMonitor()); }