[
https://issues.apache.org/jira/browse/HADOOP-7521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080723#comment-13080723
]
Milind Bhandarkar commented on HADOOP-7521:
-------------------------------------------
E4,
I think @aw made it very clear that tar should not be treated as rpm. But in
any case, I will make it explicit by suggesting a "workaround" for
*inconsiderate packaging* (whatever that means :-).
Every project should untar into <project-name>-<version-number> directory.
(Since tar is a short form of "tape archive", and tapes historically had a
write-once-read-many property, a tar has exactly the same layout when expanded.
So, if a tar is named xyz.tar, it has the same bits as any other xyz.tar,
irrespective of the media it was stored on. If the name is the same, I feel
comfortable expanding it again and again, because I am sure of that untarring
is idempotent.)
User (in this case, untarrer) sets an environment variable
"PROJECTNAME_HOME=/full/path/to/<project-name>-<version-number>". For example,
HADOOP_COMMON_HOME=/opt/local/hadoop-common-0.22.0, and
PIG_HOME=/opt/local/pig-0.9, etc. Then, as long as the binaries are found in
$XYZ_HOME/bin, and jars are found in $XYZ_HOME/libexec, and dependencies are
found in $XYZ_HOME/lib, and configs are found in $XYZ_HOME/config, one can
write scripts that check for the presence of $XYZ_HOME and adjust locations
accordingly.
If $XYZ_HOME is not set, path is checked for the presence of the primary
executable, such as "hadoop" for HADOOP, HDFS, and MAPREDUCE, and "pig" for
PIG. If it is symlinked, the origin is discovered, and $XYZ_HOME is discovered
based on that. For example, if the shell script "hadoop" is in /opt/local/bin,
which is in path, and it is a symlink from
/opt/hstack/hadoop-0.22.0/bin/hadoop, then /opt/hstack/hadoop-0.22.0 is taken
to be $HADOOP_HOME, and rest of the links are resolved accordingly.
The point is, for the last 40 years, people are accustomed to certain
conventions. So let's not try to trash those conventions, unless we have to,
and this case does not demand trashing conventions.
Right ?
(I think I have spent more time on this than it deserves. So this is my last
comment on this issue.)
> bintar created tarball should use a common directory for prefix
> ---------------------------------------------------------------
>
> Key: HADOOP-7521
> URL: https://issues.apache.org/jira/browse/HADOOP-7521
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Affects Versions: 0.23.0
> Environment: Java 6, Maven, Linux/Mac
> Reporter: Eric Yang
> Assignee: Eric Yang
> Attachments: HADOOP-7521.patch
>
>
> The binary tarball contains the directory structure like:
> {noformat}
> hadoop-common-0.23.0-SNAPSHOT-bin/bin
> /etc/hadoop
> /libexec
> /sbin
> /share/hadoop/common
> {noformat}
> It would be nice to rename the prefix directory to a common directory where
> it is common to all Hadoop stack software. Therefore, user can untar hbase,
> hadoop, zookeeper, pig, hive all into the same location and run from the top
> level directory without manually renaming them to the same directory again.
> By default the prefix directory can be /usr. Hence, it could merge with the
> base OS.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira