presto-admin icon indicating copy to clipboard operation
presto-admin copied to clipboard

Make worker configuration be different on each node

Open kokosing opened this issue 7 years ago • 5 comments

There are things in presto configuration which can be set differently on each node.

For example node.id in node.properties or node.internal-adress in config.properites.

The idea is to support template configuration where user could use some variables which will be resolved on target node. Let say we would have a defined set of variables like:

  • uuid - generates new uuid
  • current_node - a hostname (or ip address) used topology file for current node
  • coordinator - a hostname of coordinator node defined in topology file

then in configuration files user could have:

  • for config.properties:
http-server.http.port=28384
query.max-memory=50GB
query.max-memory-per-node=512MB
discovery.uri=http://${coordinator}:28384
coordinator=false
node.internal-address=${current_node}
  • for node.properties
node.id=${uuid}
catalog.config-dir=/etc/presto/catalog
node.data-dir=/var/lib/presto/data
node.environment=presto
node.launcher-log-file=/var/log/presto/launcher.log
node.server-log-file=/var/log/presto/server.log
plugin.dir=/usr/lib/presto/lib/plugin

@cawallin @rschlussel What do you think?

kokosing avatar Mar 08 '17 07:03 kokosing

I think this is a duplicate of https://github.com/prestodb/presto-admin/issues/35 It seems like s a valuable addition and the syntax you proposed is good.

Right now we special case the node.id. Because we generate a uuid on the node side if there's no node.id yet in the config file, but then for future deploys we specifically don't overwrite it so that the node names stay the same.

rschlussel-zz avatar Mar 08 '17 14:03 rschlussel-zz

I closed the old one as this one is more detailed

kokosing avatar Mar 08 '17 21:03 kokosing

Hello, I would like to work on this issue. Can you assign it to me? It seems to me that allowing environment variable expansion in configuration files will solve the problem.

gorkemmulayim avatar Feb 18 '19 12:02 gorkemmulayim

Please go ahead. Nobody else is working on this right now.

kokosing avatar Feb 18 '19 13:02 kokosing

hai how to set the node.id in node.properties

prasannakumar109 avatar Jan 25 '21 05:01 prasannakumar109