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

Yongjun Zhang commented on HADOOP-11293:
----------------------------------------

HI [~ste...@apache.org],

Thanks a lot for your comments, I learned quite a bit just by reading it!

Along the line you proposed earlier,

# the new OSType classes is added as proposed, marked as public , evolving
# the existing Shell.WINDOWS, Shell.LINUX properties are retained, and driven 
off OSType.
# they could be tagged as deprectated

One possible change we can do so we can allow new code to not have to couple 
with Shell for checking OS, and minimizing the impact (assume we introduce new 
class CurrentOS):

# the new CurrentOS class is added as proposed, marked as public , evolving
# CurrentOS uses "IS_WINDOWS" etc as an improvement
#  the existing Shell.WINDOWS, Shell.LINUX etc properties are retained, but 
driven off CurrentOS.
#  don't tag Shell's WINDOWS etc deprecated
#  leave Shell's {{@InterfaceAudience etc}} as is
#  Optional: whether to change the current Hadoop code base to use the new API 
(I've done it in the initial patch), up to whether you all agree.

This allows new code to not to couple with Shell. And no impact to downstream 
projects, but give them a choice to use the new API. It also allows new code in 
Hadoop not to couple with Shell.

Does this change make sense?

Thanks.


> Factor OSType out from Shell
> ----------------------------
>
>                 Key: HADOOP-11293
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11293
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>         Attachments: HADOOP-11293.001.patch
>
>
> Currently the code that detects the OS type is located in Shell.java. Code 
> that need to check OS type refers to Shell, even if no other stuff of Shell 
> is needed. 
> I am proposing to refactor OSType out to  its own class, so to make the 
> OSType easier to access and the dependency cleaner.
>  



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

Reply via email to