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

Colm O hEigeartaigh commented on SENTRY-2015:
---------------------------------------------

Hi [~manokovacs],

The main motivation behind this change was to re-use the Command functionality 
in the sentry-cli branch. In particular, I need the output (converted into 
Strings) of some of the commands (such as to list the roles for example). The 
old Command interface just had a single void execute method that didn't return 
anything, and dumped the output to System.out. It was too unwieldy to change 
the execute method to return an Object which might contain a String, or a list 
of Strings etc, hence refactoring the interface so that it encapsulated all of 
the relevant commands.

If your proposed changes can accommadate this use-case easily, then it's fine 
with me.

Colm.



> Refactor Command implementations
> --------------------------------
>
>                 Key: SENTRY-2015
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2015
>             Project: Sentry
>          Issue Type: Improvement
>            Reporter: Colm O hEigeartaigh
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.0.0
>
>         Attachments: SENTRY-2015.patch
>
>
> Right now, we have different Command implementations for each possible Shell 
> command for both the Hive and Generic versions. Instead, we should have a 
> single interface which encapsulates all of the different Commands, and then 
> two implementations for Hive + Generic. Apart from having a lot less simple 
> classes, this means that I can re-use this interface for the Sentry CLI work.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to