HDFS-4041. Merging partial of change r1397362 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1397420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2012-10-12 02:29:54 +00:00
parent c4bfcf4478
commit 5fa60ed91f
2 changed files with 68 additions and 27 deletions

View File

@ -42,7 +42,11 @@ Release 2.0.3-alpha - Unreleased
HDFS-4008. TestBalancerWithEncryptedTransfer needs a timeout. (eli) HDFS-4008. TestBalancerWithEncryptedTransfer needs a timeout. (eli)
HDFS-4007. Rehabilitate bit-rotted unit tests under HDFS-4007. Rehabilitate bit-rotted unit tests under
hadoop-hdfs-project/hadoop-hdfs/src/test/unit/ (Colin Patrick McCabe via todd) hadoop-hdfs-project/hadoop-hdfs/src/test/unit/
(Colin Patrick McCabe via todd)
HDFS-4041. Hadoop HDFS Maven protoc calls must not depend on external
sh script. (Chris Nauroth via suresh)
OPTIMIZATIONS OPTIMIZATIONS

View File

@ -299,37 +299,14 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>compile-proto</id> <id>create-protobuf-generated-sources-directory</id>
<phase>generate-sources</phase> <phase>initialize</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<target> <target>
<echo file="target/compile-proto.sh"> <mkdir dir="target/generated-sources/java" />
PROTO_DIR=src/main/proto
JAVA_DIR=target/generated-sources/java
which cygpath 2&gt; /dev/null
if [ $? = 1 ]; then
IS_WIN=false
else
IS_WIN=true
WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
fi
mkdir -p $JAVA_DIR 2&gt; /dev/null
for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
do
if [ "$IS_WIN" = "true" ]; then
protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
else
protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
fi
done
</echo>
<exec executable="sh" dir="${basedir}" failonerror="true">
<arg line="target/compile-proto.sh"/>
</exec>
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -402,6 +379,66 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>compile-proto</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>protoc</executable>
<arguments>
<argument>-Isrc/main/proto/</argument>
<argument>--java_out=target/generated-sources/java</argument>
<argument>src/main/proto/GetUserMappingsProtocol.proto</argument>
<argument>src/main/proto/HAZKInfo.proto</argument>
<argument>src/main/proto/InterDatanodeProtocol.proto</argument>
<argument>src/main/proto/JournalProtocol.proto</argument>
<argument>src/main/proto/RefreshAuthorizationPolicyProtocol.proto</argument>
<argument>src/main/proto/RefreshUserMappingsProtocol.proto</argument>
<argument>src/main/proto/datatransfer.proto</argument>
<argument>src/main/proto/hdfs.proto</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>compile-proto-datanode</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>protoc</executable>
<arguments>
<argument>-Isrc/main/proto/</argument>
<argument>--java_out=target/generated-sources/java</argument>
<argument>src/main/proto/ClientDatanodeProtocol.proto</argument>
<argument>src/main/proto/DatanodeProtocol.proto</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>compile-proto-namenode</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>protoc</executable>
<arguments>
<argument>-Isrc/main/proto/</argument>
<argument>--java_out=target/generated-sources/java</argument>
<argument>src/main/proto/ClientNamenodeProtocol.proto</argument>
<argument>src/main/proto/NamenodeProtocol.proto</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>