Skip to content

Commit

Permalink
Revert "Remove task.max-memory config parameter"
Browse files Browse the repository at this point in the history
This reverts commit 41b771e,
since Presto removed that config parameter in 0.116 and this
release is designed to support Presto 0.103 to 0.115.
  • Loading branch information
cawallin committed Sep 23, 2015
1 parent fe8663a commit ed22635
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/presto-admin-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ For workers: ::
http-server.http.port=8080
query.max-memory-per-node=1GB
query.max-memory=50GB
task.max-memory=1GB

For coordinator: ::

Expand All @@ -142,6 +143,7 @@ For coordinator: ::
node.scheduler.include-coordinator=false
query.max-memory-per-node=1GB
query.max-memory=50GB
task.max-memory=1GB

# if the coordinator is also a worker, it will have the following property instead
node-scheduler.include-coordinator=true
Expand Down
1 change: 1 addition & 0 deletions prestoadmin/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'coordinator': 'true',
'discovery-server.enabled': 'true',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'node-scheduler.include-coordinator': 'false',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
Expand Down
1 change: 1 addition & 0 deletions prestoadmin/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'-DHADOOP_USER_NAME=hive'],
'config.properties': {'coordinator': 'false',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
}
Expand Down
12 changes: 8 additions & 4 deletions tests/product/base_product_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ class BaseProductTestCase(BaseTestCase):
discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=1GB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_workers_test_config_ = """coordinator=false
discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_node_properties_ = """node.data-dir=/var/lib/presto/data
node.environment=presto
Expand All @@ -76,15 +78,17 @@ class BaseProductTestCase(BaseTestCase):
http-server.http.port=8080
node-scheduler.include-coordinator=false
query.max-memory-per-node=1GB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_coordinator_test_config_ = """coordinator=true
discovery-server.enabled=true
discovery.uri=http://master:8080
http-server.http.port=8080
node-scheduler.include-coordinator=false
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

down_node_connection_string = r'(\nWarning: (\[%(host)s\] )?Low level socket ' \
r'error connecting to host %(host)s on ' \
Expand Down
4 changes: 4 additions & 0 deletions tests/product/resources/configuration_show_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ http-server.http.port=8080
node-scheduler.include-coordinator=false
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave1: Configuration file at /etc/presto/config.properties:
Expand All @@ -15,6 +16,7 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave2: Configuration file at /etc/presto/config.properties:
Expand All @@ -23,6 +25,7 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave3: Configuration file at /etc/presto/config.properties:
Expand All @@ -31,4 +34,5 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB

4 changes: 4 additions & 0 deletions tests/product/resources/configuration_show_default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ http-server.http.port=8080
node.scheduler.include-coordinator=false
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave1: Configuration file at /etc/presto/node.properties:
Expand Down Expand Up @@ -54,6 +55,7 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave2: Configuration file at /etc/presto/node.properties:
Expand Down Expand Up @@ -82,6 +84,7 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave3: Configuration file at /etc/presto/node.properties:
Expand Down Expand Up @@ -110,3 +113,4 @@ discovery.uri=http://master:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB
3 changes: 3 additions & 0 deletions tests/product/resources/configuration_show_down_node.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ discovery.uri=http://.*:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave2: Configuration file at /etc/presto/config.properties:
Expand All @@ -13,6 +14,7 @@ discovery.uri=http://.*:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB


slave3: Configuration file at /etc/presto/config.properties:
Expand All @@ -21,3 +23,4 @@ discovery.uri=http://.*:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB
task.max-memory=1GB
12 changes: 8 additions & 4 deletions tests/product/test_server_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,29 +110,33 @@ class TestServerInstall(BaseProductTestCase):
discovery.uri=http://slave1:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_coord_config_with_slave1_ = """coordinator=true
discovery-server.enabled=true
discovery.uri=http://slave1:8080
http-server.http.port=8080
node-scheduler.include-coordinator=false
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_workers_config_regex_ = """coordinator=false
discovery.uri=http:.*:8080
http-server.http.port=8080
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

default_coord_config_regex_ = """coordinator=true
discovery-server.enabled=true
discovery.uri=http:.*:8080
http-server.http.port=8080
node-scheduler.include-coordinator=false
query.max-memory-per-node=512MB
query.max-memory=50GB\n"""
query.max-memory=50GB
task.max-memory=1GB\n"""

def setUp(self):
super(TestServerInstall, self).setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_build_defaults(self):
'discovery-server.enabled': 'true',
'discovery.uri': 'http://a:8080',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'node-scheduler.include-coordinator': 'false',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
Expand Down Expand Up @@ -77,6 +78,7 @@ def test_defaults_coord_is_worker(self):
'discovery-server.enabled': 'true',
'discovery.uri': 'http://a:8080',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'node-scheduler.include-coordinator': 'true',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
Expand Down Expand Up @@ -165,6 +167,7 @@ def test_get_conf(self, get_conf_from_file_mock):
'discovery-server.enabled': 'true',
'discovery.uri': 'http://j:8080',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'node-scheduler.include-coordinator': 'false',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def test_build_defaults(self):
'config.properties': {'coordinator': 'false',
'discovery.uri': 'http://a:8080',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
}
Expand Down Expand Up @@ -113,6 +114,7 @@ def test_get_conf(self, get_presto_conf_mock):
'config.properties': {'coordinator': 'false',
'discovery.uri': 'http://j:8080',
'http-server.http.port': '8080',
'task.max-memory': '1GB',
'query.max-memory': '50GB',
'query.max-memory-per-node': '1GB'}
}
Expand Down

0 comments on commit ed22635

Please sign in to comment.