Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle the error better when all the hosts are excluded using '-x' command #249

Open
mattsfuller opened this issue Sep 8, 2016 · 0 comments

Comments

@mattsfuller
Copy link

On a four node cluster with master, slave1, slave2 and slave3, if I run a presto-admin command with '-x' and mention all the hosts, the error message shown to the user is not helpful at all from the user's perspective. For example:
$./prestoadmin/presto-admin connector add -x master,slave1,slave2,slave3
Deploying hive.properties connector configurations on: None
Fatal error: Needed to prompt for the target host connection string (host: None), but input would be ambiguous in parallel mode
Aborting.
$./prestoadmin/presto-admin configuration show -x master,slave1,slave2,slave3
Fatal error: Needed to prompt for the target host connection string (host: None), but input would be ambiguous in parallel mode
Aborting.
A better error message should be along the lines of: "You have chosen to exclude all the nodes for running this command, hence this operation is essentially a no-op"
I suspect that this is true for all presto-admin commands that support '-x' option, though I haven't tested it for all the commands.
The fix may not be as simple as modifying an existing error message. You may have to dig deeper to fix it.
Also opened a PR: #158
Add a negative test for presto admin commands for this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant