hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1518313 - in /hbase/branches/0.95: hbase-protocol/README.txt hbase-protocol/pom.xml hbase-protocol/src/main/protobuf/README.txt src/main/docbkx/developer.xml
Date Wed, 28 Aug 2013 18:17:02 GMT
Author: stack
Date: Wed Aug 28 18:17:01 2013
New Revision: 1518313

URL: http://svn.apache.org/r1518313
Log:
HBASE-9299 Generate the protobuf classes with hadoop-maven-plugin

Added:
    hbase/branches/0.95/hbase-protocol/README.txt
Removed:
    hbase/branches/0.95/hbase-protocol/src/main/protobuf/README.txt
Modified:
    hbase/branches/0.95/hbase-protocol/pom.xml
    hbase/branches/0.95/src/main/docbkx/developer.xml

Added: hbase/branches/0.95/hbase-protocol/README.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-protocol/README.txt?rev=1518313&view=auto
==============================================================================
--- hbase/branches/0.95/hbase-protocol/README.txt (added)
+++ hbase/branches/0.95/hbase-protocol/README.txt Wed Aug 28 18:17:01 2013
@@ -0,0 +1,35 @@
+These are the protobuf definition files used by hbase. The produced java
+classes are generated into src/main/java/org/apache/hadoop/hbase/protobuf/generated
+and then checked in.  The reasoning is that they change infrequently.
+
+To regenerate the classes after making definition file changes, ensure first that
+the protobuf protoc tool is in your $PATH (You may need to download it and build
+it first; its part of the protobuf package obtainable from here: 
+http://code.google.com/p/protobuf/downloads/list).
+
+Then run the following (You should be able to just copy and paste the below into a
+terminal and hit return -- the protoc compiler runs fast):
+
+  UNIX_PROTO_DIR=src/main/protobuf
+  JAVA_DIR=src/main/java/
+  mkdir -p $JAVA_DIR 2> /dev/null
+  if which cygpath 2> /dev/null; then
+    PROTO_DIR=`cygpath --windows $UNIX_PROTO_DIR`
+    JAVA_DIR=`cygpath --windows $JAVA_DIR`
+  else
+    PROTO_DIR=$UNIX_PROTO_DIR
+  fi
+  # uncomment the next line if you want to remove before generating
+  # rm -fr $JAVA_DIR/org/apache/hadoop/hbase/protobuf/generated
+  for PROTO_FILE in $UNIX_PROTO_DIR/*.proto
+  do
+    protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
+  done
+  ll $JAVA_DIR/org/apache/hadoop/hbase/protobuf/generated
+
+After you've done the above, check it in and then check it in (or post a patch
+on a JIRA with your definition file changes and the generated files).
+
+Optionally, you can uncomment the hadoop-maven-plugins plugin in hbase-protocol/pom.xml.
+This plugin will generate for the classes during the build. Once again, you will need protocol
buffers
+to be installed on your build machine (https://developers.google.com/protocol-buffers)

Modified: hbase/branches/0.95/hbase-protocol/pom.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-protocol/pom.xml?rev=1518313&r1=1518312&r2=1518313&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-protocol/pom.xml (original)
+++ hbase/branches/0.95/hbase-protocol/pom.xml Wed Aug 28 18:17:01 2013
@@ -32,7 +32,7 @@
     <description>Protobuf protocol classes used by HBase to communicate.</description>
 
     <build>
-        <plugins>
+      <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-site-plugin</artifactId>
@@ -53,24 +53,109 @@
           <skipAssembly>true</skipAssembly>
         </configuration>
       </plugin>
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <!-- Always skip the second part executions, since we only run
-          simple unit tests in this module -->
-                <executions>
-                    <execution>
-                        <id>secondPartTestsExecution</id>
-                        <phase>test</phase>
-                        <goals>
-                            <goal>test</goal>
-                        </goals>
-                        <configuration>
-                            <skip>true</skip>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
+        <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <!-- Always skip the second part executions, since we only run simple unit
tests in this module -->
+            <executions>
+                <execution>
+                    <id>secondPartTestsExecution</id>
+                    <phase>test</phase>
+                    <goals>
+                        <goal>test</goal>
+                    </goals>
+                    <configuration>
+                        <skip>true</skip>
+                    </configuration>
+                </execution>
+            </executions>
+        </plugin>
+<!-- 
+        <plugin>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-maven-plugins</artifactId>
+          <version>2.0.5-alpha</version>
+          <executions>
+            <execution>
+              <id>compile-protoc</id>
+              <phase>generate-sources</phase>
+              <goals>
+                <goal>protoc</goal>
+              </goals>
+              <configuration>
+                <protocVersion>${protobuf.version}</protocVersion>
+                <protocCommand>${protoc.path}</protocCommand>
+                <imports>
+                  <param>${basedir}/src/main/protobuf</param>
+                </imports>
+                <source>
+                  <directory>${basedir}/src/main/protobuf</directory>
+                  <includes>
+                    <include>AccessControl.proto</include>
+                    <include>Admin.proto</include>
+                    <include>Aggregate.proto</include>
+                    <include>Authentication.proto</include>
+                    <include>Cell.proto</include>
+                    <include>Client.proto</include>
+                    <include>ClusterId.proto</include>
+                    <include>ClusterStatus.proto</include>
+                    <include>Comparator.proto</include>
+                    <include>ErrorHandling.proto</include>
+                    <include>Filter.proto</include>
+                    <include>FS.proto</include>
+                    <include>hbase.proto</include>
+                    <include>HFile.proto</include>
+                    <include>LoadBalancer.proto</include>
+                    <include>MapReduce.proto</include>
+                    <include>MasterAdmin.proto</include>
+                    <include>MasterMonitor.proto</include>
+                    <include>Master.proto</include>
+                    <include>MultiRowMutationProcessorMessages.proto</include>
+                    <include>MultiRowMutation.proto</include>
+                    <include>RegionServerStatus.proto</include>
+                    <include>RowProcessor.proto</include>
+                    <include>RPC.proto</include>
+                    <include>SecureBulkLoad.proto</include>
+                    <include>Tracing.proto</include>
+                    <include>WAL.proto</include>
+                    <include>ZooKeeper.proto</include>
+                  </includes>
+                </source>
+                <output>${project.build.directory}/generated-sources/java</output>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+-->
+       </plugins>
+      <pluginManagement>
+        <plugins>
+          <!--This plugin's configuration is used to store Eclipse m2e settings only.
It has no influence on the Maven build itself.-->
+          <plugin>
+            <groupId>org.eclipse.m2e</groupId>
+            <artifactId>lifecycle-mapping</artifactId>
+            <version>1.0.0</version>
+            <configuration>
+              <lifecycleMappingMetadata>
+                <pluginExecutions>
+                  <pluginExecution>
+                    <pluginExecutionFilter>
+                      <groupId>org.apache.hadoop</groupId>
+                      <artifactId>hadoop-maven-plugins</artifactId>
+                      <versionRange>[2.0.5-alpha,)</versionRange>
+                      <goals>
+                        <goal>protoc</goal>
+                      </goals>
+                    </pluginExecutionFilter>
+                    <action>
+                      <ignore></ignore>
+                    </action>
+                  </pluginExecution>
+                </pluginExecutions>
+              </lifecycleMappingMetadata>
+            </configuration>
+          </plugin>
+         </plugins>
+      </pluginManagement>
     </build>
 
     <dependencies>
@@ -100,4 +185,5 @@
             </properties>
         </profile>
     </profiles>
+    
 </project>

Modified: hbase/branches/0.95/src/main/docbkx/developer.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/src/main/docbkx/developer.xml?rev=1518313&r1=1518312&r2=1518313&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message