> On April 13, 2013, 7:01 p.m., Jarek Cecho wrote: > > client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java, > > lines 46-49 > > <https://reviews.apache.org/r/10100/diff/3/?file=279012#file279012line46> > > > > I would argue that this might be quite confusing for end user as "show > > connection --jid 1 help" will show the help but "show connection help --jid > > 1" won't. I think that using just the "help" command for getting help will > > be enough, what do you think? > > vasanthkumar wrote: > Hi Jarek, > Thank you for your review comments. I am fine with your suggestion. > Current patch we append word "help" while using help for functions and again > execute command. Now to avoid help at the end of command, we have to use a > internal help flag to display help. Such that help flag will be appended in > help command and check for the flag in SqoopFunction. This way make simple > and we have to hard code the help flag. > > Otherwise, if(args.contains(Constants.CMD_HELP)) will work for both the > way. > > Kindly suggest > > Jarek Cecho wrote: > Hi Vasanth, > my proposal is not to change the execute() method of each function at > all. Instead we can just create smart enough help command that will inspect > other commands/functions and display the help accordingly. > > vasanthkumar wrote: > Hi Jarek, > Ok. Can you provide small example? It will help to understand how help > inspect command/function. > > current patch solves > >help command function > Additionally: > >command function help args > >command function args help -(Requires patch update) > In this patch modified in abstract SqoopFunction.java. So no need to > modify each function. > > Please give example of your suggestion. > > Thanks, > Vasanth
Hi Vasanth, please accept my apologies for this late reply. I think that it would be nice to have help command that would behave such as: * "help command" would display available functions * "help command function" would display all available arguments * Would be great if the implementation would not be too intrusive (e.g. I would prefer if we can leave execute() method intact by adding proper help). Jarcec - Jarek ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10100/#review19127 ----------------------------------------------------------- On April 8, 2013, 8:28 p.m., vasanthkumar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10100/ > ----------------------------------------------------------- > > (Updated April 8, 2013, 8:28 p.m.) > > > Review request for Sqoop. > > > Bugs: sqoop-965 > https://issues.apache.org/jira/browse/sqoop-965 > > > Repository: sqoop-sqoop2 > > > Description > ------- > > There is no help option for shell command's functions. Introducing the help > argument for functions. > > > Diffs > ----- > > client/src/main/java/org/apache/sqoop/client/shell/HelpCommand.java c6f831d > client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java > bf26761 > > Diff: https://reviews.apache.org/r/10100/diff/ > > > Testing > ------- > > Done > > > Thanks, > > vasanthkumar > >
