hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1212609 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: ./ src/main/java/org/apache/hadoop/hdfs/protocol/proto/ src/main/proto/ src/proto/
Date Fri, 09 Dec 2011 20:21:19 GMT
Author: tucu
Date: Fri Dec  9 20:21:19 2011
New Revision: 1212609

URL: http://svn.apache.org/viewvc?rev=1212609&view=rev
Log:
HDFS-2511. Add dev script to generate HDFS protobufs. (tucu)

Added:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/
      - copied from r1212608, hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/
Removed:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/ClientDatanodeProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/ClientNamenodeProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/DataTransferProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/DatanodeProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/HdfsProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/InterDatanodeProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/JournalProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/proto/NamenodeProtocolProtos.java
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/
Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/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=1212609&r1=1212608&r2=1212609&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Dec  9 20:21:19 2011
@@ -93,6 +93,8 @@ Trunk (unreleased changes)
 
     HDFS-2597 ClientNameNodeProtocol in Protocol Buffers (sanjay)
 
+    HDFS-2511. Add dev script to generate HDFS protobufs. (tucu)
+
   OPTIMIZATIONS
     HDFS-2477. Optimize computing the diff between a block report and the
                namenode state. (Tomasz Nykiel via hairong)

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=1212609&r1=1212608&r2=1212609&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/pom.xml Fri Dec  9 20:21:19 2011
@@ -205,6 +205,7 @@
             </goals>
             <configuration>
               <sources>
+                <source>${project.build.directory}/generated-sources/java</source>
                 <source>${project.build.directory}/generated-src/main/jsp</source>
               </sources>
             </configuration>
@@ -216,6 +217,29 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
+            <id>compile-proto</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <echo file="${project.build.directory}/compile-proto.sh">
+                  PROTO_DIR=${basedir}/src/main/proto
+                  ls $PROTO_DIR &amp;> /dev/null
+                  if [ $? = 0 ]; then
+                    JAVA_DIR=${project.build.directory}/generated-sources/java
+                    mkdir -p $JAVA_DIR
+                    ls $PROTO_DIR/*.proto | xargs -n 1 protoc -I$PROTO_DIR --java_out=$JAVA_DIR
+                  fi
+                </echo>
+                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                  <arg line="./compile-proto.sh"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
             <id>create-web-xmls</id>
             <phase>compile</phase>
             <goals>



Mime
View raw message