giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r1411957 - in /giraph/trunk: .gitignore dev-support/for-each-profile.sh giraph-formats-contrib/pom.xml giraph/pom.xml lib/facebook-hadoop-0.20-core.jar lib/facebook-hadoop-0.20-test.jar lib/hadoop-0.20-core.jar pom.xml
Date Wed, 21 Nov 2012 00:30:07 GMT
Author: nitay
Date: Wed Nov 21 00:30:00 2012
New Revision: 1411957

URL: http://svn.apache.org/viewvc?rev=1411957&view=rev
Log:
GIRAPH-420: build formats in profiles where it works.

Added:
    giraph/trunk/lib/facebook-hadoop-0.20-core.jar
      - copied, changed from r1411763, giraph/trunk/lib/hadoop-0.20-core.jar
    giraph/trunk/lib/facebook-hadoop-0.20-test.jar
Removed:
    giraph/trunk/lib/hadoop-0.20-core.jar
Modified:
    giraph/trunk/.gitignore
    giraph/trunk/dev-support/for-each-profile.sh
    giraph/trunk/giraph-formats-contrib/pom.xml
    giraph/trunk/giraph/pom.xml
    giraph/trunk/pom.xml

Modified: giraph/trunk/.gitignore
URL: http://svn.apache.org/viewvc/giraph/trunk/.gitignore?rev=1411957&r1=1411956&r2=1411957&view=diff
==============================================================================
--- giraph/trunk/.gitignore (original)
+++ giraph/trunk/.gitignore Wed Nov 21 00:30:00 2012
@@ -8,6 +8,7 @@
 *.class
 target
 Unknown Job*
+failed-profile.txt
 
 # IntelliJ IDEA files:
 *.iml
@@ -21,10 +22,6 @@ Unknown Job*
 .project
 .settings
 
-# Failed patch files:
-*.rej
-*.orig
-
 # Emacs auto-save files:
 *~
 \#*

Modified: giraph/trunk/dev-support/for-each-profile.sh
URL: http://svn.apache.org/viewvc/giraph/trunk/dev-support/for-each-profile.sh?rev=1411957&r1=1411956&r2=1411957&view=diff
==============================================================================
--- giraph/trunk/dev-support/for-each-profile.sh (original)
+++ giraph/trunk/dev-support/for-each-profile.sh Wed Nov 21 00:30:00 2012
@@ -1,13 +1,20 @@
 #!/bin/bash
 
 if [[ -z `which xpath 2> /dev/null` ]]; then
-  echo "ERROR: xpath not found in path"
+  echo "ERROR: xpath not found in path, install xpath first"
   exit
 fi
 
+DIR=$(cd "$(dirname "$0")" && pwd)
+TOP_DIR=$DIR/..
+
+function echo_separator {
+  echo "======================"
+}
+
 function parse_profiles {
   all_profiles=""
-  poms=$(find . -name pom.xml)
+  poms=$(find $TOP_DIR -name pom.xml)
   for pom in $poms; do
     # Returns something like:
     #   <id>hadoop_0.20.203</id><id>hadoop_1.0</id><id>hadoop_non_secure</id>
...
@@ -30,19 +37,41 @@ parse_profiles
 
 echo "Running on profiles: $all_profiles"
 
-for profile in $all_profiles; do
-  echo "======================"
-  echo "=== $profile ==="
-  echo "======================"
-
-  mvn -P$profile $@
-  result=$?
+failed_profile_file=$TOP_DIR/failed-profile.txt
+if [[ -r "$failed_profile_file" ]]; then
+  echo "Reading $failed_profile_file to restart from last run state."
+  echo "Remove that file if you want a fresh run"
+  failed_profile=$(cat $failed_profile_file)
+  run_profile=false
+else
+  run_profile=true
+fi
 
-  if [[ $result -ne 0 ]]; then
-    echo "======================"
-    echo "=== Failed on profile: $profile"
-    echo "=== Failed command: mvn -P$profile $@"
-    echo "======================"
-    exit $result
+for profile in $all_profiles; do
+  if ! $run_profile; then
+    if [[ "${profile}" == "${failed_profile}" ]]; then
+      run_profile=true
+    fi
+  fi
+  if $run_profile; then
+    echo_separator
+    echo "=== $profile ==="
+    echo_separator
+
+    mvn -P$profile $@
+    result=$?
+
+    if [[ $result -ne 0 ]]; then
+      echo_separator
+      echo "=== Failed on profile: $profile"
+      echo "=== Failed command: mvn -P$profile $@"
+      echo_separator
+      echo $profile > $failed_profile_file
+      exit $result
+    fi
+  else
+    echo_separator
+    echo "=== Skipping profile $profile"
+    echo_separator
   fi
 done

Modified: giraph/trunk/giraph-formats-contrib/pom.xml
URL: http://svn.apache.org/viewvc/giraph/trunk/giraph-formats-contrib/pom.xml?rev=1411957&r1=1411956&r2=1411957&view=diff
==============================================================================
--- giraph/trunk/giraph-formats-contrib/pom.xml (original)
+++ giraph/trunk/giraph-formats-contrib/pom.xml Wed Nov 21 00:30:00 2012
@@ -33,6 +33,7 @@ under the License.
 
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
+    <lib.dir>${top.dir}/lib</lib.dir>
   </properties>
 
   <build>
@@ -129,41 +130,51 @@ under the License.
   <profiles>
     <profile>
       <id>hadoop_0.20.203</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-test</artifactId>
+          <version>${hadoop.version}</version>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
     </profile>
 
     <profile>
       <id>hadoop_1.0</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-test</artifactId>
+          <version>${hadoop.version}</version>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
     </profile>
 
     <profile>
       <id>hadoop_non_secure</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-test</artifactId>
+          <version>${hadoop.version}</version>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
     </profile>
 
     <profile>
       <id>hadoop_facebook</id>
-      <properties>
-        <hadoop.fb.jar>${top.dir}/lib/hadoop-0.20-core.jar</hadoop.fb.jar>
-      </properties>
-    </profile>
-
-    <profile>
-      <id>hadoop_0.23</id>
-    </profile>
-
-    <profile>
-      <id>hadoop_2.0.0</id>
-    </profile>
-
-    <profile>
-      <id>hadoop_2.0.1</id>
-    </profile>
-
-    <profile>
-      <id>hadoop_2.0.2</id>
-    </profile>
-
-    <profile>
-      <id>hadoop_trunk</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-test</artifactId>
+          <version>${hadoop.version}</version>
+          <scope>system</scope>
+          <systemPath>${lib.dir}/facebook-hadoop-0.20-test.jar</systemPath>
+        </dependency>
+      </dependencies>
     </profile>
   </profiles>
 
@@ -226,11 +237,6 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hbase</groupId>
       <artifactId>hbase</artifactId>
       <type>test-jar</type>

Modified: giraph/trunk/giraph/pom.xml
URL: http://svn.apache.org/viewvc/giraph/trunk/giraph/pom.xml?rev=1411957&r1=1411956&r2=1411957&view=diff
==============================================================================
--- giraph/trunk/giraph/pom.xml (original)
+++ giraph/trunk/giraph/pom.xml Wed Nov 21 00:30:00 2012
@@ -34,6 +34,7 @@ under the License.
   <properties>
     <export-target.dir>export/target</export-target.dir>
     <top.dir>${project.basedir}/..</top.dir>
+    <lib.dir>${top.dir}/lib</lib.dir>
   </properties>
 
   <build>
@@ -179,9 +180,6 @@ under the License.
 
     <profile>
       <id>hadoop_facebook</id>
-      <properties>
-        <hadoop.fb.jar>${top.dir}/lib/hadoop-0.20-core.jar</hadoop.fb.jar>
-      </properties>
       <build>
         <plugins>
           <plugin>

Copied: giraph/trunk/lib/facebook-hadoop-0.20-core.jar (from r1411763, giraph/trunk/lib/hadoop-0.20-core.jar)
URL: http://svn.apache.org/viewvc/giraph/trunk/lib/facebook-hadoop-0.20-core.jar?p2=giraph/trunk/lib/facebook-hadoop-0.20-core.jar&p1=giraph/trunk/lib/hadoop-0.20-core.jar&r1=1411763&r2=1411957&rev=1411957&view=diff
==============================================================================
Binary files - no diff available.

Added: giraph/trunk/lib/facebook-hadoop-0.20-test.jar
URL: http://svn.apache.org/viewvc/giraph/trunk/lib/facebook-hadoop-0.20-test.jar?rev=1411957&view=auto
==============================================================================
Files giraph/trunk/lib/facebook-hadoop-0.20-test.jar (added) and giraph/trunk/lib/facebook-hadoop-0.20-test.jar
Wed Nov 21 00:30:00 2012 differ

Modified: giraph/trunk/pom.xml
URL: http://svn.apache.org/viewvc/giraph/trunk/pom.xml?rev=1411957&r1=1411956&r2=1411957&view=diff
==============================================================================
--- giraph/trunk/pom.xml (original)
+++ giraph/trunk/pom.xml Wed Nov 21 00:30:00 2012
@@ -220,8 +220,10 @@ under the License.
   </repositories>
 
   <properties>
+    <lib.dir>${project.basedir}/lib</lib.dir>
     <buildtype>test</buildtype>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <formats.module>giraph-formats-contrib</formats.module>
     <hbase.version>0.90.5</hbase.version>
     <jackson.version>1.8.0</jackson.version>
     <slf4j.version>1.7.2</slf4j.version>
@@ -461,6 +463,9 @@ under the License.
   <profiles>
     <profile>
       <id>hadoop_0.20.203</id>
+      <modules>
+        <module>${formats.module}</module>
+      </modules>
       <activation>
         <activeByDefault>true</activeByDefault>
       </activation>
@@ -485,6 +490,9 @@ under the License.
 
     <profile>
       <id>hadoop_1.0</id>
+      <modules>
+        <module>${formats.module}</module>
+      </modules>
       <properties>
         <hadoop.version>1.0.2</hadoop.version>
         <munge.symbols>HADOOP_NON_JOBCONTEXT_IS_INTERFACE,HADOOP_1_SECURITY,HADOOP_1_SECRET_MANAGER</munge.symbols>
@@ -506,6 +514,9 @@ under the License.
 
     <profile>
       <id>hadoop_non_secure</id>
+      <modules>
+        <module>${formats.module}</module>
+      </modules>
       <properties>
         <hadoop.version>0.20.2</hadoop.version>
         <munge.symbols>HADOOP_NON_SECURE,HADOOP_NON_JOBCONTEXT_IS_INTERFACE</munge.symbols>
@@ -527,20 +538,21 @@ under the License.
 
     <profile>
       <id>hadoop_facebook</id>
+      <modules>
+        <module>${formats.module}</module>
+      </modules>
       <properties>
-        <hadoop.fb.jar>${project.basedir}/lib/hadoop-0.20-core.jar</hadoop.fb.jar>
         <hadoop.version>0.20.1</hadoop.version>
         <munge.symbols>HADOOP_NON_SECURE,HADOOP_NON_JOBCONTEXT_IS_INTERFACE</munge.symbols>
       </properties>
       <dependencies>
         <!-- sorted lexicographically -->
         <dependency>
-          <groupId>com.facebook.hadoop</groupId>
+          <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-core</artifactId>
           <version>${hadoop.version}</version>
-          <type>jar</type>
           <scope>system</scope>
-          <systemPath>${hadoop.fb.jar}</systemPath>
+          <systemPath>${lib.dir}/facebook-hadoop-0.20-core.jar</systemPath>
         </dependency>
         <dependency>
           <groupId>commons-collections</groupId>
@@ -894,12 +906,6 @@ under the License.
         <scope>test</scope>
       </dependency>
       <dependency>
-        <groupId>org.apache.hadoop</groupId>
-        <artifactId>hadoop-test</artifactId>
-        <version>${hadoop.version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-all</artifactId>
         <version>1.8.5</version>
@@ -910,7 +916,6 @@ under the License.
 
   <modules>
     <module>giraph</module>
-    <module>giraph-formats-contrib</module>
   </modules>
 
 </project>



Mime
View raw message