presto-admin
presto-admin copied to clipboard
Make remote directories configurable
Presto allows you to configure where your catalog directory and the plugin directory are via configuration properties in node.properties. However, when adding a connector, presto-admin will always place the configuration files in a default catalog configuration directory. We should make this configurable.
Similarly, plugin add_jar allows the user to specify the remote_plugin_directory as a command line argument if it is different from presto-admin's default, but it would be better if the command were smart enough to figure it out on its own.
We could instead read the directory from the configuration files (so they are always in sync).
There are also some configuration properties (e.g. the main presto config directory) that get set directly in the call to the launcher script. We should allow setting those in the config.json file for presto-admin.
Amazon's EMR distribution of Presto currently places configuration files in /etc/presto/conf/
instead of the hardcoded default value of /etc/presto/
as specified at https://github.com/prestodb/presto-admin/blob/master/prestoadmin/util/constants.py#L41.
When running presto-admin -i /path/to.pem configuration show
on EMR I get
Warning: [ip-xxx-xx-xx-xxx.ec2.internal] No configuration file found for ip-xxx-xx-xx-xxx.ec2.internal at /etc/presto/node.properties
Warning: [ip-xxx-xx-xx-xxx.ec2.internal] No configuration file found for ip-xxx-xx-xx-xxx.ec2.internal at /etc/presto/jvm.config
Warning: [ip-xxx-xx-xx-xxx.ec2.internal] No configuration file found for ip-xxx-xx-xx-xxx.ec2.internal at /etc/presto/config.properties
It looks like @satheeshravir's fork did contain changes to make many of the values in constants.py configurable through environment variables or config.json in this commit.