[
https://issues.apache.org/jira/browse/SENTRY-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16218512#comment-16218512
]
Mano Kovacs commented on SENTRY-2015:
-------------------------------------
[~coheigea], I think we would miss some of the extensibility this commit
removed. Having a command interface and different implementations for each
command is good example substitution and open/closeness. In general, it is more
extensible. The new implementation of commands require handling one class doing
all the work which is a little procedural approach to me. I miss separation of
concerns. It would be very hard to add a component specific command.
I would rather have them separated and allow the component shells to map
strings to command classes and have the commands picking out the preferred
parameters. That way the SentryShellGeneric would not know about the commands
at all and Hive would need to overwrite two of the commands.
I am already working on a patch in SENTRY-2012 to make the base classes more
generic. I am doing now a rebase on this change. Would you like to discuss the
future changes so we can organize our efforts?
> 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)