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

Steve Loughran commented on HADOOP-11293:
-----------------------------------------

-1 to anything which stops {{Shell.WINDOWS}} linking or working.

It may be tagged {{@LimitedPrivate}}  but it is the defacto way that Hadoop 
apps check OS versions, including YARN apps that choose which CLI to build up 
based on OS version. Remove the method and a lot of code breaks. And as we 
can't switch to the new method without stopping compiling/running against 
Hadoop 2.6 or earlier, this stops us being able to have 

I would propose
 # 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

This strategy removes the need to do a mass change of every source file that 
calls shell.windows too, reducing the changes of a patch which will currently 
make moving code across hadoop versions very hard.

Finally; why? It may seem inelegant for the windows probe to be in Shell, but 
there are lot of bits of hadoop that are inelegant. Inelegance does not justify 
making backwards-incompatible changes across a wide swathe of the codebase.

> 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