Rajat Khandelwal created LENS-299:
-------------------------------------
Summary: Clean up argument taking in lens-cli
Key: LENS-299
URL: https://issues.apache.org/jira/browse/LENS-299
Project: Apache Lens
Issue Type: Improvement
Components: client
Reporter: Rajat Khandelwal
Current approach:
{noformat}
@CliOption(key = {"", "table"}, mandatory = true, help
= "<tablename> <storageName> [optional <partition query filter> to
drop]") String specPair
.
.
.
Iterable<String> parts = Splitter.on('
').trimResults().omitEmptyStrings().split(specPair);
String[] pair = Iterables.toArray(parts, String.class);
String tableName = pair[0]
String storageName = pair[1]
String partition = null;
if(pair.length > 2) {
partition = pair[2]
}
.
.
.
{noformat}
Proposed approach:
bq. multiple, separate CliOptions.
Benefit:
1. Clean to understand
2. Better documentation
3. Better help to the cli user.
4. from cli, every argument can be keyword argument, making commands easy to
understand and learn.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)