[
https://issues.apache.org/jira/browse/HADOOP-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522609 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-1772:
------------------------------------------------
Correct me if I am wrong: $HOSTNAME is a standard environment variable like $USER, so we can safely use it.
If we don't want to assume $HOSTNAME is set properly, we probably should not assume some commands like hostname are always there.
On the other hand, if $HOSTNAME is not set (say, is "") then the script still works in both Linux and Cygwin. However, it won't work in Cygwin if we use `hostname`.
The problem actually is that `hostname` in Cygwin has an extra <eol>. Is there any standard method to remove it? I tried sed but cannot fix it.
Of course, we can write a Java program to return information like username, hostname, etc. . Then, we don't have to assume anything.
Hadoop does not run in Cygwin in Windows
-----------------------------------------
Key: HADOOP-1772
URL:
https://issues.apache.org/jira/browse/HADOOP-1772Project: Hadoop
Issue Type: Bug
Components: scripts
Reporter: Tsz Wo (Nicholas), SZE
Assignee: Tsz Wo (Nicholas), SZE
Priority: Critical
Attachments: 1772-20070823.patch
the hostname commands are slightly different in linux and cygwin. Will work if use $HOSTNAME
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.