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

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

Open amrutagokhale opened this issue 8 years ago • 0 comments

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.

amrutagokhale avatar Mar 17 '16 21:03 amrutagokhale