hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r704733 - in /hadoop/core/branches/branch-0.19: ./ CHANGES.txt build.xml src/c++/librecordio/Makefile src/c++/librecordio/test/Makefile
Date Tue, 14 Oct 2008 23:02:58 GMT
Author: acmurthy
Date: Tue Oct 14 16:02:58 2008
New Revision: 704733

URL: http://svn.apache.org/viewvc?rev=704733&view=rev
Log:
Merge -r 704731:704722 from trunk to branch-0.19 to fix HADOOP-4150.

Modified:
    hadoop/core/branches/branch-0.19/   (props changed)
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/build.xml
    hadoop/core/branches/branch-0.19/src/c++/librecordio/Makefile
    hadoop/core/branches/branch-0.19/src/c++/librecordio/test/Makefile

Propchange: hadoop/core/branches/branch-0.19/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 14 16:02:58 2008
@@ -1 +1 @@
-/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712
+/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=704733&r1=704732&r2=704733&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Tue Oct 14 16:02:58 2008
@@ -439,6 +439,9 @@
 
     HADOOP-3790. Add more unit tests for testing HDFS file append.  (szetszwo)
 
+    HADOOP-4150. Include librecordio in hadoop releases. (Giridharan Kesavan
+    via acmurthy) 
+
   OPTIMIZATIONS
 
     HADOOP-3556. Removed lock contention in MD5Hash by changing the 

Modified: hadoop/core/branches/branch-0.19/build.xml
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/build.xml?rev=704733&r1=704732&r2=704733&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/build.xml (original)
+++ hadoop/core/branches/branch-0.19/build.xml Tue Oct 14 16:02:58 2008
@@ -49,8 +49,10 @@
   <property name="c++.pipes.src" value="${c++.src}/pipes"/>
   <property name="c++.examples.pipes.src" value="${examples.dir}/pipes"/>
   <property name="libhdfs.src" value="${c++.src}/libhdfs"/>
+  <property name="librecordio.src" value="${c++.src}/librecordio"/>
   <property name="tools.src" value="${basedir}/src/tools"/>
 
+  <property name="xercescroot" value=""/> 
   <property name="build.dir" value="${basedir}/build"/>
   <property name="build.classes" value="${build.dir}/classes"/>
   <property name="build.src" value="${build.dir}/src"/>
@@ -59,6 +61,7 @@
   <property name="build.examples" value="${build.dir}/examples"/>
   <property name="build.anttasks" value="${build.dir}/ant"/>
   <property name="build.libhdfs" value="${build.dir}/libhdfs"/>
+  <property name="build.librecordio" value="${build.dir}/librecordio"/>
   <!-- convert spaces to _ so that mac os doesn't break things -->
   <exec executable="sed" inputstring="${os.name}" 
         outputproperty="nonspace.os">
@@ -106,6 +109,7 @@
   <property name="libhdfs.test.conf.dir" value="${libhdfs.src}/tests/conf"/>
   <property name="libhdfs.test.dir" value="${test.build.dir}/libhdfs"/>
 
+  <property name="librecordio.test.dir" value="${test.build.dir}/librecordio"/>
   <property name="web.src.dir" value="${basedir}/src/web"/>
   <property name="src.webapps" value="${basedir}/src/webapps"/>
 
@@ -929,7 +933,7 @@
   <!-- ================================================================== -->
   <!--                                                                    -->
   <!-- ================================================================== -->
-  <target name="package" depends="compile, jar, javadoc, examples, tools-jar, jar-test,
ant-tasks, package-libhdfs"
+  <target name="package" depends="compile, jar, javadoc, examples, tools-jar, jar-test,
ant-tasks, package-libhdfs, package-librecordio"
 	  description="Build distribution">
     <mkdir dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}/lib"/>
@@ -1135,7 +1139,44 @@
   		<arg line="-sf libhdfs.so.${libhdfs.version} libhdfs.so"/>
   	</exec>
   </target>
-		
+<!-- ================================================================== -->
+<!-- librecordio targets.                                               -->
+<!-- ================================================================== -->		
+
+  <target name="compile-librecordio" depends="init" if="librecordio" >
+     <mkdir dir="${build.librecordio}"/>
+     <exec dir="${librecordio.src}" executable="${make.cmd}" failonerror="true">
+        <env key="XERCESCROOT" value="${xercescroot}"/>
+        <env key="LIBRECORDIO_BUILD_DIR" value="${build.librecordio}"/>
+     </exec>
+  </target>
+  	
+  <target name="test-librecordio" depends="compile-librecordio, compile-core" if="librecordio">
+    <delete dir="${librecordio.test.dir}"/>
+    <mkdir dir="${librecordio.test.dir}"/>
+    <exec dir="${librecordio.src}/test" executable="${make.cmd}" failonerror="true">
+        <env key="HADOOP_HOME" value="${basedir}"/>
+	<env key="XERCESCROOT" value="${xercescroot}"/>
+        <env key="LIBRECORDIO_BUILD_DIR" value="${build.librecordio}"/> 	
+        <env key="LIBRECORDIO_TEST_DIR" value="${librecordio.test.dir}"/>
+      		<arg value="all"/>		
+    </exec>
+  </target>
+
+  <target name="package-librecordio" depends="compile-librecordio" if="librecordio">
+    <mkdir dir="${dist.dir}/librecordio"/> 
+    <copy todir="${dist.dir}/librecordio">
+       <fileset dir="${build.librecordio}" casesensitive="yes" followsymlinks="false">
+          <exclude name="**/tests/**"/>
+          <exclude name="*.so"/> 
+          <exclude name="*.o"/>
+       </fileset>
+    </copy>
+    <chmod perm="ugo+x" type="file">
+       <fileset dir="${dist.dir}/librecordio"/>
+    </chmod>
+  </target>
+ 
   <target name="create-c++-configure" depends="init" if="compile.c++">
     <exec executable="autoreconf" dir="${c++.utils.src}" searchpath="yes" 
           failonerror="yes">

Modified: hadoop/core/branches/branch-0.19/src/c++/librecordio/Makefile
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/c%2B%2B/librecordio/Makefile?rev=704733&r1=704732&r2=704733&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/c++/librecordio/Makefile (original)
+++ hadoop/core/branches/branch-0.19/src/c++/librecordio/Makefile Tue Oct 14 16:02:58 2008
@@ -16,40 +16,43 @@
 
 COPTS=-g3 -O0 -Wall
 
-all: librecordio.a test
+all: ${LIBRECORDIO_BUILD_DIR}/librecordio.a
 
-librecordio.a: recordio.o filestream.o binarchive.o csvarchive.o xmlarchive.o \
-	exception.o typeIDs.o fieldTypeInfo.o recordTypeInfo.o utils.o
-	ar cru librecordio.a recordio.o filestream.o binarchive.o csvarchive.o xmlarchive.o \
-	exception.o typeIDs.o fieldTypeInfo.o recordTypeInfo.o utils.o
-
-recordio.o: recordio.cc recordio.hh archive.hh
-	g++ ${COPTS} -c -I${XERCESCROOT}/include -o recordio.o recordio.cc
-
-filestream.o: filestream.cc recordio.hh filestream.hh
-	g++ ${COPTS} -c -o filestream.o filestream.cc
-
-binarchive.o: binarchive.cc recordio.hh binarchive.hh archive.hh
-	g++ ${COPTS} -c -o binarchive.o binarchive.cc
-
-csvarchive.o: csvarchive.cc recordio.hh csvarchive.hh archive.hh
-	g++ ${COPTS} -c -o csvarchive.o csvarchive.cc
-
-xmlarchive.o: xmlarchive.cc recordio.hh xmlarchive.hh archive.hh
-	g++ ${COPTS} -c -I${XERCESCROOT}/include -o xmlarchive.o xmlarchive.cc
-
-exception.o: exception.cc exception.hh
-	g++ ${COPTS} -c -o exception.o exception.cc
-
-typeIDs.o: typeIDs.cc typeIDs.hh
-	g++ ${COPTS} -c -o typeIDs.o typeIDs.cc
-fieldTypeInfo.o: fieldTypeInfo.cc fieldTypeInfo.hh
-	g++ ${COPTS} -c -o fieldTypeInfo.o fieldTypeInfo.cc
-recordTypeInfo.o: recordTypeInfo.cc recordTypeInfo.hh
-	g++ ${COPTS} -c -o recordTypeInfo.o recordTypeInfo.cc
-utils.o: utils.cc utils.hh
-	g++ ${COPTS} -c -o utils.o utils.cc
+COBJS = $(addprefix ${LIBRECORDIO_BUILD_DIR}/, recordio.o filestream.o binarchive.o csvarchive.o
xmlarchive.o \
+	exception.o typeIDs.o fieldTypeInfo.o recordTypeInfo.o utils.o)
 
+CCMD = $(addprefix ${LIBRECORDIO_BUILD_DIR}/, librecordio.a recordio.o filestream.o binarchive.o
csvarchive.o xmlarchive.o \
+        exception.o typeIDs.o fieldTypeInfo.o recordTypeInfo.o utils.o)
+
+${LIBRECORDIO_BUILD_DIR}/librecordio.a: ${COBJS}
+	ar cru ${CCMD}
+
+${LIBRECORDIO_BUILD_DIR}/recordio.o: recordio.cc recordio.hh archive.hh
+	g++ ${COPTS} -c -I${XERCESCROOT}/include -o ${LIBRECORDIO_BUILD_DIR}/recordio.o recordio.cc
+
+${LIBRECORDIO_BUILD_DIR}/filestream.o: filestream.cc recordio.hh filestream.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/filestream.o filestream.cc
+
+${LIBRECORDIO_BUILD_DIR}/binarchive.o: binarchive.cc recordio.hh binarchive.hh archive.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/binarchive.o binarchive.cc
+
+${LIBRECORDIO_BUILD_DIR}/csvarchive.o: csvarchive.cc recordio.hh csvarchive.hh archive.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/csvarchive.o csvarchive.cc
+
+${LIBRECORDIO_BUILD_DIR}/xmlarchive.o: xmlarchive.cc recordio.hh xmlarchive.hh archive.hh
+	g++ ${COPTS} -c -I${XERCESCROOT}/include -o ${LIBRECORDIO_BUILD_DIR}/xmlarchive.o xmlarchive.cc
+
+${LIBRECORDIO_BUILD_DIR}/exception.o: exception.cc exception.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/exception.o exception.cc
+
+${LIBRECORDIO_BUILD_DIR}/typeIDs.o: typeIDs.cc typeIDs.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/typeIDs.o typeIDs.cc
+${LIBRECORDIO_BUILD_DIR}/fieldTypeInfo.o: fieldTypeInfo.cc fieldTypeInfo.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/fieldTypeInfo.o fieldTypeInfo.cc
+${LIBRECORDIO_BUILD_DIR}/recordTypeInfo.o: recordTypeInfo.cc recordTypeInfo.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/recordTypeInfo.o recordTypeInfo.cc
+${LIBRECORDIO_BUILD_DIR}/utils.o: utils.cc utils.hh
+	g++ ${COPTS} -c -o ${LIBRECORDIO_BUILD_DIR}/utils.o utils.cc
 recordio.cc: recordio.hh archive.hh exception.hh
 filestream.cc: recordio.hh filestream.hh 
 binarchive.cc: recordio.hh binarchive.hh 
@@ -65,5 +68,5 @@
 	make -C test all
 
 clean:
-	rm -f *~ *.o *.a
+	rm -f ${LIBRECORDIO_BUILD_DIR}/*~ ${LIBRECORDIO_BUILD_DIR}/*.o ${LIBRECORDIO_BUILD_DIR}/*.a
 	make -C test clean

Modified: hadoop/core/branches/branch-0.19/src/c++/librecordio/test/Makefile
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/c%2B%2B/librecordio/test/Makefile?rev=704733&r1=704732&r2=704733&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/c++/librecordio/test/Makefile (original)
+++ hadoop/core/branches/branch-0.19/src/c++/librecordio/test/Makefile Tue Oct 14 16:02:58
2008
@@ -18,21 +18,22 @@
 
 all: test testFromJava
 
-test: test.o test.jr.o
-	g++ -g3 -O0 -o test test.o test.jr.o -L.. -L${XERCESCROOT}/lib -lrecordio -lxerces-c
+test: ${LIBRECORDIO_TEST_DIR}/test.o ${LIBRECORDIO_TEST_DIR}/test.jr.o
+	g++ -g3 -O0 -o ${LIBRECORDIO_TEST_DIR}/test ${LIBRECORDIO_TEST_DIR}/test.o \
+	${LIBRECORDIO_TEST_DIR}/test.jr.o -L${LIBRECORDIO_BUILD_DIR} -L${XERCESCROOT}/lib -lrecordio
-lxerces-c
 	
-test.o: test.cc
-	g++ ${COPTS} -c -I.. -o test.o test.cc
+${LIBRECORDIO_TEST_DIR}/test.o: test.cc
+	g++ ${COPTS} -c -I .. -o ${LIBRECORDIO_TEST_DIR}/test.o test.cc
 
-testFromJava: testFromJava.o test.jr.o
-	g++ -g3 -O0 -o testFromJava testFromJava.o test.jr.o -L.. -L${XERCESCROOT}/lib -lrecordio
-lxerces-c
+testFromJava: ${LIBRECORDIO_TEST_DIR}/testFromJava.o ${LIBRECORDIO_TEST_DIR}/test.jr.o
+	g++ -g3 -O0 -o ${LIBRECORDIO_TEST_DIR}/testFromJava ${LIBRECORDIO_TEST_DIR}/testFromJava.o
${LIBRECORDIO_TEST_DIR}/test.jr.o \
+	-L${LIBRECORDIO_BUILD_DIR} -L${XERCESCROOT}/lib -lrecordio -lxerces-c
 	
-testFromJava.o: testFromJava.cc
-	g++ ${COPTS} -c -I.. -o testFromJava.o testFromJava.cc
+${LIBRECORDIO_TEST_DIR}/testFromJava.o: testFromJava.cc
+	g++ ${COPTS} -c -I.. -o ${LIBRECORDIO_TEST_DIR}/testFromJava.o testFromJava.cc
 
-
-test.jr.o: test.jr.cc
-	g++ ${COPTS} -c -I.. -o test.jr.o test.jr.cc
+${LIBRECORDIO_TEST_DIR}/test.jr.o: test.jr.cc
+	g++ ${COPTS} -c -I..  -o ${LIBRECORDIO_TEST_DIR}/test.jr.o test.jr.cc
 
 %.jr.cc %.jr.hh: %.jr
 	${HADOOP_HOME}/bin/rcc --language c++ $<
@@ -44,5 +45,6 @@
 test.hh: test.jr.hh ../recordio.hh ../filestream.hh
 
 clean:
-	rm -f *~ *.o test testFromJava *.jr.*
+	rm -f ${LIBRECORDIO_TEST_DIR}/*~ ${LIBRECORDIO_TEST_DIR}/*.o ${LIBRECORDIO_TEST_DIR}/test
\
+	${LIBRECORDIO_TEST_DIR}/testFromJava ${LIBRECORDIO_TEST_DIR}/*.jr.*
 



Mime
View raw message