Merge -r 1183067:1183068 from trunk to branch. FIXES: HADOOP-7737

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1190632 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2011-10-28 22:22:23 +00:00
parent 367a2b8bf6
commit 277c83f2fa
4 changed files with 112 additions and 43 deletions

View File

@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>hadoop-mapreduce-dist</id> <id>hadoop-mapreduce-dist</id>
<formats> <formats>
<format>tar.gz</format> <format>dir</format>
</formats> </formats>
<includeBaseDirectory>true</includeBaseDirectory> <includeBaseDirectory>false</includeBaseDirectory>
<!-- TODO: this layout is wrong. We need module specific bin files in module specific dirs --> <!-- TODO: this layout is wrong. We need module specific bin files in module specific dirs -->
<fileSets> <fileSets>
<fileSet> <fileSet>

View File

@ -423,6 +423,14 @@ Release 0.23.0 - Unreleased
HADOOP-7360. Preserve relative paths that do not contain globs in FsShell. HADOOP-7360. Preserve relative paths that do not contain globs in FsShell.
(Daryn Sharp and Kihwal Lee via szetszwo) (Daryn Sharp and Kihwal Lee via szetszwo)
HADOOP-7624. Set things up for a top level hadoop-tools module. (tucu)
HADOOP-7642. create hadoop-dist module where TAR stitching would happen.
(Thomas White via tucu)
HADOOP-7737. normalize hadoop-mapreduce & hadoop-dist dist/tar build with
common/hdfs. (tucu)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole
@ -954,11 +962,6 @@ Release 0.22.0 - Unreleased
HADOOP-7772. javadoc the topology classes (stevel) HADOOP-7772. javadoc the topology classes (stevel)
HADOOP-7624. Set things up for a top level hadoop-tools module. (tucu)
HADOOP-7642. create hadoop-dist module where TAR stitching would happen.
(Thomas White via tucu)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..). HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

View File

@ -85,13 +85,13 @@
<executions> <executions>
<execution> <execution>
<id>dist</id> <id>dist</id>
<phase>package</phase> <phase>prepare-package</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<target if="tar"> <target>
<echo file="${project.build.directory}/dist-tar-stitching.sh"> <echo file="${project.build.directory}/dist-layout-stitching.sh">
run() { run() {
echo "\$ ${@}" echo "\$ ${@}"
"${@}" "${@}"
@ -110,9 +110,9 @@
run rm -rf hadoop-${project.version} run rm -rf hadoop-${project.version}
run mkdir hadoop-${project.version} run mkdir hadoop-${project.version}
run cd hadoop-${project.version} run cd hadoop-${project.version}
run tar xzf $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}.tar.gz --strip-components 1 run cp -r $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}/* .
run tar xzf $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}.tar.gz --strip-components 1 run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}/* .
run tar xzf $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}.tar.gz --strip-components 1 run cp -r $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}/* .
COMMON_LIB=share/hadoop/common/lib COMMON_LIB=share/hadoop/common/lib
MODULES=../../../../modules MODULES=../../../../modules
run ln -s $MODULES/hadoop-mapreduce-client-app-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-mapreduce-client-app-${project.version}.jar $COMMON_LIB
@ -122,7 +122,36 @@
run ln -s $MODULES/hadoop-mapreduce-client-core-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-mapreduce-client-core-${project.version}.jar $COMMON_LIB
run ln -s $MODULES/hadoop-yarn-server-common-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-yarn-server-common-${project.version}.jar $COMMON_LIB
run ln -s $MODULES/hadoop-mapreduce-client-jobclient-${project.version}.jar $COMMON_LIB run ln -s $MODULES/hadoop-mapreduce-client-jobclient-${project.version}.jar $COMMON_LIB
run cd - echo
echo "Hadoop dist layout available at: ${project.build.directory}/hadoop-${project.version}"
echo
</echo>
<exec executable="sh" dir="${project.build.directory}" failonerror="true">
<arg line="./dist-layout-stitching.sh"/>
</exec>
</target>
</configuration>
</execution>
<execution>
<id>tar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target if="tar">
<echo file="${project.build.directory}/dist-tar-stitching.sh">
run() {
echo "\$ ${@}"
"${@}"
if [ $? != 0 ]; then
echo
echo "Failed!"
echo
exit $?
fi
}
run tar czf hadoop-${project.version}.tar.gz hadoop-${project.version} run tar czf hadoop-${project.version}.tar.gz hadoop-${project.version}
echo echo
echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz" echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz"

View File

@ -307,6 +307,33 @@
<goal>run</goal> <goal>run</goal>
</goals> </goals>
</execution> </execution>
<execution>
<id>tar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<!-- this is identical from hadoop-project-dist, eventually they must be unified -->
<target if="tar">
<!-- Using Unix script to preserve symlinks -->
<echo file="${project.build.directory}/dist-maketar.sh">
which cygpath 2> /dev/null
if [ $? = 1 ]; then
BUILD_DIR="${project.build.directory}"
else
BUILD_DIR=`cygpath --unix '${project.build.directory}'`
fi
cd $BUILD_DIR
tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
</echo>
<exec executable="sh" dir="${project.build.directory}" failonerror="true">
<arg line="./dist-maketar.sh"/>
</exec>
</target>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
@ -325,35 +352,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-assemblies</artifactId>
<version>${hadoop.assemblies.version}</version>
</dependency>
</dependencies>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
<finalName>${project.artifactId}-${project.version}</finalName>
<descriptorRefs>
<descriptorRef>hadoop-mapreduce-dist</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>tar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>com.atlassian.maven.plugins</groupId> <groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId> <artifactId>maven-clover2-plugin</artifactId>
@ -408,6 +406,45 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>dist</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-assemblies</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<configuration>
<tarLongFileMode>gnu</tarLongFileMode>
<appendAssemblyId>false</appendAssemblyId>
<attach>false</attach>
<finalName>${project.artifactId}-${project.version}</finalName>
<descriptorRefs>
<descriptorRef>hadoop-mapreduce-dist</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>dist</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
<modules> <modules>