You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2015/02/11 09:21:12 UTC

[jira] [Commented] (LENS-256) lens-cli should not use single parameter for two values

    [ https://issues.apache.org/jira/browse/LENS-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14315772#comment-14315772 ] 

Rajat Khandelwal commented on LENS-256:
---------------------------------------

I made a lot of changes to achieve this. And now I found that spring framework doesn't logically assign whitespace separated words to arguments. 

{noformat}
lens-shell>fact list partitions --table fact1 --storage local --filter dt>'1'
filter: dt>'1'
{noformat}

But
{noformat}
lens-shell>fact list partitions fact1 local dt>'1'
filter: fact1 local dt>'1'
Command failed javax.ws.rs.NotFoundException: HTTP 404 Not Found
lens-shell>
{noformat}

So if we separate the arguments, we'll have to provide them as keyword arguments, providing list arguments will not work. 

Review request: https://reviews.apache.org/r/30870/

> lens-cli should not use single parameter for two values
> -------------------------------------------------------
>
>                 Key: LENS-256
>                 URL: https://issues.apache.org/jira/browse/LENS-256
>             Project: Apache Lens
>          Issue Type: Improvement
>          Components: client
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Rajat Khandelwal
>             Fix For: 2.1
>
>
> We have code like the following in many places in cli :
> {noformat}
>   @CliCommand(value = "update storage", help = "update storage")
>   public String updateStorage(
>       @CliOption(key = { "", "storage" }, mandatory = true, help = "<storage-name> <path to storage-spec>") String specPair) {
>     Iterable<String> parts = Splitter.on(' ').trimResults().omitEmptyStrings().split(specPair);
> {noformat}
> It should take separate parameters for each value than doing split on space



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)