You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by su...@apache.org on 2012/10/12 01:10:48 UTC
svn commit: r1397362 - in
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt pom.xml
src/contrib/bkjournal/pom.xml
Author: suresh
Date: Thu Oct 11 23:10:47 2012
New Revision: 1397362
URL: http://svn.apache.org/viewvc?rev=1397362&view=rev
Log:
HDFS-4041. Hadoop HDFS Maven protoc calls must not depend on external sh script. Contributed by Chris Nauroth.
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1397362&r1=1397361&r2=1397362&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Oct 11 23:10:47 2012
@@ -373,7 +373,11 @@ Release 2.0.3-alpha - Unreleased
HDFS-4008. TestBalancerWithEncryptedTransfer needs a timeout. (eli)
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
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml?rev=1397362&r1=1397361&r2=1397362&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml Thu Oct 11 23:10:47 2012
@@ -323,37 +323,14 @@ http://maven.apache.org/xsd/maven-4.0.0.
</configuration>
<executions>
<execution>
- <id>compile-proto</id>
- <phase>generate-sources</phase>
+ <id>create-protobuf-generated-sources-directory</id>
+ <phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
- <echo file="target/compile-proto.sh">
- PROTO_DIR=src/main/proto
- JAVA_DIR=target/generated-sources/java
- which cygpath 2> /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> /dev/null
- for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /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>
+ <mkdir dir="target/generated-sources/java" />
</target>
</configuration>
</execution>
@@ -431,6 +408,81 @@ http://maven.apache.org/xsd/maven-4.0.0.
</executions>
</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>
+ <execution>
+ <id>compile-proto-qjournal</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/QJournalProtocol.proto</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml?rev=1397362&r1=1397361&r2=1397362&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/pom.xml Thu Oct 11 23:10:47 2012
@@ -117,39 +117,14 @@ http://maven.apache.org/xsd/maven-4.0.0.
</configuration>
<executions>
<execution>
- <id>compile-proto</id>
- <phase>generate-sources</phase>
+ <id>create-protobuf-generated-sources-directory</id>
+ <phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
- <echo file="target/compile-proto.sh">
- PROTO_DIR=src/main/proto
- INCLUDE_DIR=../../main/proto
- JAVA_DIR=target/generated-sources/java
- which cygpath 2> /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`
- WIN_INCLUDE_DIR=`cygpath --windows $INCLUDE_DIR`
- fi
- mkdir -p $JAVA_DIR 2> /dev/null
- for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /dev/null`
- do
- if [ "$IS_WIN" = "true" ]; then
- protoc -I$WIN_PROTO_DIR -I$WIN_INCLUDE_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
- else
- protoc -I$PROTO_DIR -I$INCLUDE_DIR --java_out=$JAVA_DIR $PROTO_FILE
- fi
- done
- </echo>
- <exec executable="sh" dir="${basedir}" failonerror="true">
- <arg line="target/compile-proto.sh"/>
- </exec>
+ <mkdir dir="target/generated-sources/java" />
</target>
</configuration>
</execution>
@@ -157,6 +132,28 @@ http://maven.apache.org/xsd/maven-4.0.0.
</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>-I../../main/proto</argument>
+ <argument>--java_out=target/generated-sources/java</argument>
+ <argument>src/main/proto/bkjournal.proto</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>