hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1516230 - in /hadoop/common/branches/HDFS-2832: ./ hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/ hadoop-project/
Date Wed, 21 Aug 2013 17:47:15 GMT
Author: arp
Date: Wed Aug 21 17:47:10 2013
New Revision: 1516230

URL: http://svn.apache.org/r1516230
Log:
Merge all changes from trunk to branch HDFS-2832

Modified:
    hadoop/common/branches/HDFS-2832/   (props changed)
    hadoop/common/branches/HDFS-2832/BUILDING.txt
    hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
    hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/Exec.java
    hadoop/common/branches/HDFS-2832/hadoop-project/pom.xml

Propchange: hadoop/common/branches/HDFS-2832/
------------------------------------------------------------------------------
  Merged /hadoop/common/trunk:r1513717-1516228

Modified: hadoop/common/branches/HDFS-2832/BUILDING.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/BUILDING.txt?rev=1516230&r1=1516229&r2=1516230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/BUILDING.txt (original)
+++ hadoop/common/branches/HDFS-2832/BUILDING.txt Wed Aug 21 17:47:10 2013
@@ -7,7 +7,7 @@ Requirements:
 * JDK 1.6
 * Maven 3.0
 * Findbugs 1.3.9 (if running findbugs)
-* ProtocolBuffer 2.4.1+ (for MapReduce and HDFS)
+* ProtocolBuffer 2.5.0
 * CMake 2.6 or newer (if compiling native code)
 * Internet connection for first build (to fetch all Maven and Hadoop dependencies)
 
@@ -100,6 +100,16 @@ time out after a while, using the Maven 
 to update SNAPSHOTs from external repos.
 
 ----------------------------------------------------------------------------------
+Protocol Buffer compiler
+
+The version of Protocol Buffer compiler, protoc, must match the version of the
+protobuf JAR.
+
+If you have multiple versions of protoc in your system, you can set in your 
+build shell the HADOOP_PROTOC_PATH environment variable to point to the one you 
+want to use for the Hadoop build. If you don't define this environment variable,
+protoc is looked up in the PATH.
+----------------------------------------------------------------------------------
 Importing projects to eclipse
 
 When you import the project to eclipse, install hadoop-maven-plugins at first.

Modified: hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java?rev=1516230&r1=1516229&r2=1516230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
(original)
+++ hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
Wed Aug 21 17:47:10 2013
@@ -45,7 +45,7 @@ public class ProtocMojo extends Abstract
   @Parameter(required=true)
   private FileSet source;
 
-  @Parameter(defaultValue="protoc")
+  @Parameter
   private String protocCommand;
 
   @Parameter(required=true)
@@ -53,21 +53,22 @@ public class ProtocMojo extends Abstract
 
   public void execute() throws MojoExecutionException {
     try {
+      if (protocCommand == null || protocCommand.trim().isEmpty()) {
+        protocCommand = "protoc";
+      }
       List<String> command = new ArrayList<String>();
       command.add(protocCommand);
       command.add("--version");
       Exec exec = new Exec(this);
       List<String> out = new ArrayList<String>();
-      if (exec.run(command, out) != 0) {
-        getLog().error("protoc, could not get version");
-        for (String s : out) {
-          getLog().error(s);
-        }
+      if (exec.run(command, out) == 127) {
+        getLog().error("protoc, not found at: " + protocCommand);
         throw new MojoExecutionException("protoc failure");        
       } else {
-        if (out.size() == 0) {
+        if (out.isEmpty()) {
+          getLog().error("stdout: " + out);
           throw new MojoExecutionException(
-              "'protoc -version' did not return a version");
+              "'protoc --version' did not return a version");
         } else {
           if (!out.get(0).endsWith(protocVersion)) {
             throw new MojoExecutionException(

Modified: hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/Exec.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/Exec.java?rev=1516230&r1=1516229&r2=1516230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/Exec.java
(original)
+++ hadoop/common/branches/HDFS-2832/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/Exec.java
Wed Aug 21 17:47:10 2013
@@ -63,11 +63,10 @@ public class Exec {
         for (String s : stdErr.getOutput()) {
           mojo.getLog().debug(s);
         }
-      } else {
-        stdOut.join();
-        stdErr.join();
-        output.addAll(stdOut.getOutput());
       }
+      stdOut.join();
+      stdErr.join();
+      output.addAll(stdOut.getOutput());
     } catch (Exception ex) {
       mojo.getLog().warn(command + " failed: " + ex.toString());
     }

Modified: hadoop/common/branches/HDFS-2832/hadoop-project/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-2832/hadoop-project/pom.xml?rev=1516230&r1=1516229&r2=1516230&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-2832/hadoop-project/pom.xml (original)
+++ hadoop/common/branches/HDFS-2832/hadoop-project/pom.xml Wed Aug 21 17:47:10 2013
@@ -62,6 +62,7 @@
     <!-- ProtocolBuffer version, used to verify the protoc version and -->
     <!-- define the protobuf JAR version                               -->
     <protobuf.version>2.5.0</protobuf.version>
+    <protoc.path>${env.HADOOP_PROTOC_PATH}</protoc.path>
   </properties>
 
   <dependencyManagement>
@@ -663,6 +664,13 @@
         </exclusions>
       </dependency>
       <dependency>
+        <groupId>org.apache.zookeeper</groupId>
+        <artifactId>zookeeper</artifactId>
+        <version>3.4.2</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
         <groupId>org.apache.bookkeeper</groupId>
         <artifactId>bookkeeper-server</artifactId>
         <version>4.0.0</version>



Mime
View raw message