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

Steve Loughran commented on HADOOP-4014:
----------------------------------------

The quoted OS in in a JVM comes from the JRE; different JVMs detect different 
values, and tend to lag OS releases. OpenJDK even reports different things from 
a closed JDK. Which makes it very hard to do OS family detection reliably. Its 
probalby only java6+ that detects Vista, for example. 

The most broadly tested code for this in apache is Ant's OS condition

http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/Os.java?view=markup

This 
-lowercases in the US locale the jvm properties
-assumes the presence of "windows" in the OS => windows, assumes further than 
only a few limited versions are win9x; the rest is NT-based
-looks for various strings for macos
-guesses that systems with / and : as seperators are unix-like
-looks for various obscure operating systems
-or bails out

I'd recommend taking this code and adapting it; strip out netware and OS/360 
support if need be. This routine is the first one to get bugreps when a new OS 
or JDK  ships, so is maintained. 

> DFS upgrade fails on Windows
> ----------------------------
>
>                 Key: HADOOP-4014
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4014
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.18.0
>         Environment: Windows XP, Windows 2003 Server
>            Reporter: NOMURA Yoshihide
>         Attachments: HADOOP-4014.patch
>
>
> FileUtil.HardLink#createHardLink() didn't work on Windows, and DFS upgrade of 
> Datanode fails.
> The windows command 'fsutil' requires the arguments link name first as 
> follows,
> > fsutil hardlink create <link name> <target>
> But the current FileUtil passes the target first.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to