Author: cutting
Date: Tue Jan 12 01:03:43 2010
New Revision: 898142
URL: http://svn.apache.org/viewvc?rev=898142&view=rev
Log:
AVRO-163. Re-organized source tree into separate directories for each language.
Added:
hadoop/avro/trunk/VERSION.txt
hadoop/avro/trunk/build.sh (with props)
hadoop/avro/trunk/doc/ (with props)
hadoop/avro/trunk/doc/build.xml
hadoop/avro/trunk/doc/src/
- copied from r898140, hadoop/avro/trunk/src/doc/
hadoop/avro/trunk/lang/
hadoop/avro/trunk/lang/c/
- copied from r898140, hadoop/avro/trunk/src/c/
hadoop/avro/trunk/lang/c++/
- copied from r898140, hadoop/avro/trunk/src/c++/
hadoop/avro/trunk/lang/java/ (with props)
hadoop/avro/trunk/lang/java/build.xml
- copied, changed from r898140, hadoop/avro/trunk/build.xml
hadoop/avro/trunk/lang/java/ivy.xml
- copied unchanged from r898140, hadoop/avro/trunk/ivy.xml
hadoop/avro/trunk/lang/java/ivysettings-ant-eclipse.xml
- copied unchanged from r898140,
hadoop/avro/trunk/ivysettings-ant-eclipse.xml
hadoop/avro/trunk/lang/java/lib/
- copied from r898140, hadoop/avro/trunk/lib/
hadoop/avro/trunk/lang/java/src/
hadoop/avro/trunk/lang/java/src/java/
hadoop/avro/trunk/lang/java/src/java/checkstyle.xml
- copied unchanged from r898140, hadoop/avro/trunk/src/java/checkstyle.xml
hadoop/avro/trunk/lang/java/src/java/org/
- copied from r898140, hadoop/avro/trunk/src/java/org/
hadoop/avro/trunk/lang/java/src/java/overview.html
- copied unchanged from r898140, hadoop/avro/trunk/src/java/overview.html
hadoop/avro/trunk/lang/java/src/test/
hadoop/avro/trunk/lang/java/src/test/bin/
- copied from r898140, hadoop/avro/trunk/src/test/bin/
hadoop/avro/trunk/lang/java/src/test/genavro/
- copied from r898140, hadoop/avro/trunk/src/test/genavro/
hadoop/avro/trunk/lang/java/src/test/java/
- copied from r898140, hadoop/avro/trunk/src/test/java/
hadoop/avro/trunk/lang/py/
hadoop/avro/trunk/lang/py/build.xml
- copied unchanged from r898140, hadoop/avro/trunk/build.xml
hadoop/avro/trunk/lang/py/lib/
- copied from r898140, hadoop/avro/trunk/lib/py/
hadoop/avro/trunk/lang/py/src/
- copied from r898140, hadoop/avro/trunk/src/py/
hadoop/avro/trunk/lang/py/test/
- copied from r898140, hadoop/avro/trunk/src/test/py/
hadoop/avro/trunk/share/
hadoop/avro/trunk/share/rat-excludes.txt
- copied unchanged from r898140, hadoop/avro/trunk/src/rat-excludes.txt
hadoop/avro/trunk/share/schemas/
hadoop/avro/trunk/share/schemas/org/
hadoop/avro/trunk/share/schemas/org/apache/
hadoop/avro/trunk/share/schemas/org/apache/avro/
hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/
hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeRequest.avsc
hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeResponse.avsc
hadoop/avro/trunk/share/test/
hadoop/avro/trunk/share/test/schemas/
- copied from r898140, hadoop/avro/trunk/src/test/schemata/
Removed:
hadoop/avro/trunk/build.xml
hadoop/avro/trunk/ivy.xml
hadoop/avro/trunk/ivysettings-ant-eclipse.xml
hadoop/avro/trunk/lang/java/lib/py/
hadoop/avro/trunk/lib/
hadoop/avro/trunk/src/c/
hadoop/avro/trunk/src/c++/
hadoop/avro/trunk/src/doc/
hadoop/avro/trunk/src/java/checkstyle.xml
hadoop/avro/trunk/src/java/org/
hadoop/avro/trunk/src/java/overview.html
hadoop/avro/trunk/src/py/
hadoop/avro/trunk/src/rat-excludes.txt
hadoop/avro/trunk/src/schemata/
hadoop/avro/trunk/src/test/bin/
hadoop/avro/trunk/src/test/genavro/
hadoop/avro/trunk/src/test/java/
hadoop/avro/trunk/src/test/py/
hadoop/avro/trunk/src/test/schemata/
Modified:
hadoop/avro/trunk/ (props changed)
hadoop/avro/trunk/CHANGES.txt
hadoop/avro/trunk/README.txt
hadoop/avro/trunk/lang/java/src/test/bin/test_avroj.sh
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolGeneric.java
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolParsing.java
Propchange: hadoop/avro/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jan 12 01:03:43 2010
@@ -1,4 +1,2 @@
-.classpath
-.eclipse
-.project
build
+dist
Modified: hadoop/avro/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=898142&r1=898141&r2=898142&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Tue Jan 12 01:03:43 2010
@@ -27,6 +27,9 @@
AVRO-278. Changed GenericRecord API and implementation to be
array-based rather than Map-based. (cutting)
+ AVRO-163. Re-organized source tree into separate directories for
+ each language. (cutting)
+
NEW FEATURES
AVRO-151. Validating Avro schema parser for C (massie)
Modified: hadoop/avro/trunk/README.txt
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/README.txt?rev=898142&r1=898141&r2=898142&view=diff
==============================================================================
--- hadoop/avro/trunk/README.txt (original)
+++ hadoop/avro/trunk/README.txt Tue Jan 12 01:03:43 2010
@@ -17,23 +17,8 @@
BUILDING
-One the requirements are installed, Ant can be used as follows:
+One the requirements are installed, build.sh can used as follows:
- 'ant javadoc' builds Java API documentation to build/doc/api
- 'ant doc' builds Avro specification document in build/doc/spec.html
- 'ant test' runs tests in src/test
- 'ant jar' creates a jar in build/avro-X.X.jar
- 'ant tar' makes a "release" with docs, jar, src, etc. in build/avro-X.X.tar.gz
- 'ant clean' removes all generated artifacts
-
-USING ECLIPSE
-
-To use Eclipse, use the "ant eclipse" target to trigger the generation
-of an Eclipse project. This project is automatically created by
-the ant-eclipse tool (see http://ant-eclipse.sourceforge.net/).
-Note that to build completely, you still have to use "ant", because
-the Eclipse project depends on some generated code.
-
-You should be able to run all the java tests in Eclipse, except
-for the InteropTest. There is a launcher in .eclipse_launchers,
-that should work if your checkout directory is "avro".
+ './build.sh test' runs tests for all languages
+ './build.sh dist' creates all release distribution files in dist/
+ './build.sh clean' removes all generated artifacts
Added: hadoop/avro/trunk/VERSION.txt
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/VERSION.txt?rev=898142&view=auto
==============================================================================
--- hadoop/avro/trunk/VERSION.txt (added)
+++ hadoop/avro/trunk/VERSION.txt Tue Jan 12 01:03:43 2010
@@ -0,0 +1 @@
+1.2.0-dev
\ No newline at end of file
Added: hadoop/avro/trunk/build.sh
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/build.sh?rev=898142&view=auto
==============================================================================
--- hadoop/avro/trunk/build.sh (added)
+++ hadoop/avro/trunk/build.sh Tue Jan 12 01:03:43 2010
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e # exit on error
+
+cd `dirname "$0"` # connect to root
+
+VERSION=`cat VERSION.txt`
+
+case "$1" in
+
+ test)
+ # run lang-specific tests
+ (cd lang/java; ant test)
+ # (cd lang/py; ant test)
+ # (cd lang/c; make test)
+ # (cd lang/c++; make test)
+ ;;
+
+ dist)
+ # build source tarball
+ svn export --force . build/avro-src-$VERSION
+ mkdir -p dist
+ tar czf dist/avro-src-$VERSION.tar.gz build/avro-src-$VERSION
+ md5sum dist/avro-src-$VERSION.tar.gz > dist/avro-src-$VERSION.tar.gz.md5
+ sha1sum dist/avro-src-$VERSION.tar.gz >
dist/avro-src-$VERSION.tar.gz.sha1
+
+ # build lang-specific artifacts
+ (cd lang/java; ant dist)
+
+ # (cd lang/py; ant dist)
+
+ # (cd lang/c; make dist)
+
+ # (cd lang/c++; make dist)
+
+ # build docs
+ (cd doc; ant)
+ (cd build; tar czf - avro-doc-$VERSION) > dist/avro-doc-$VERSION.tar.gz
+ ;;
+
+ clean)
+ rm -rf build dist
+ (cd doc; ant clean)
+
+ (cd lang/java; ant clean)
+
+ # (cd lang/py; ant clean)
+
+ # (cd lang/c; make clean)
+
+ # (cd lang/c++; make clean)
+ ;;
+
+ *)
+ echo "Usage: $0 {test|dist|clean}"
+ exit 1
+esac
+
+exit 0
Propchange: hadoop/avro/trunk/build.sh
------------------------------------------------------------------------------
svn:executable = *
Propchange: hadoop/avro/trunk/doc/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 12 01:03:43 2010
@@ -0,0 +1 @@
+build
Added: hadoop/avro/trunk/doc/build.xml
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/doc/build.xml?rev=898142&view=auto
==============================================================================
--- hadoop/avro/trunk/doc/build.xml (added)
+++ hadoop/avro/trunk/doc/build.xml Tue Jan 12 01:03:43 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<project name="doc" default="doc" basedir=".">
+
+ <!-- Load user's default properties. -->
+ <property file="${user.home}/build.properties" />
+
+ <loadresource property="version">
+ <file file="${basedir}/../VERSION.txt"/>
+ </loadresource>
+
+ <property name="build.dir" value="../build/avro-doc-${version}"/>
+
+ <target name="doc" depends="forrest.check" description="Generate
forrest-based documentation. To use, specify -Dforrest.home=<base of Apache
Forrest installation> on the command line." if="forrest.home">
+ <mkdir dir="${build.dir}"/>
+ <echo file="../build/avro.ent" append="false">
+ <!ENTITY AvroVersion "${version}">
+ </echo>
+ <exec executable="${forrest.home}/bin/forrest" failonerror="true">
+ <env key="JAVA_HOME" value="${java5.home}"/>
+ <arg value="-Dproject.content-dir=src"/>
+ <arg value="-Dproject.site=../${build.dir}/"/>
+ </exec>
+ </target>
+
+ <target name="forrest.check" unless="forrest.home" depends="java5.check">
+ <fail message="'forrest.home' is not defined. Please pass
-Dforrest.home=<base of Apache Forrest installation> to Ant on the
command-line." />
+ </target>
+
+ <target name="java5.check" unless="java5.home">
+ <fail message="'java5.home' is not defined. Forrest requires Java 5.
Please pass -Djava5.home=<base of Java 5 distribution> to Ant on the
command-line." />
+ </target>
+
+ <target name="clean" description="Delete build files, and their directories">
+ <delete dir="${basedir}/build"/>
+ </target>
+
+</project>
Propchange: hadoop/avro/trunk/lang/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 12 01:03:43 2010
@@ -0,0 +1 @@
+build
Copied: hadoop/avro/trunk/lang/java/build.xml (from r898140,
hadoop/avro/trunk/build.xml)
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/build.xml?p2=hadoop/avro/trunk/lang/java/build.xml&p1=hadoop/avro/trunk/build.xml&r1=898140&r2=898142&rev=898142&view=diff
==============================================================================
--- hadoop/avro/trunk/build.xml (original)
+++ hadoop/avro/trunk/lang/java/build.xml Tue Jan 12 01:03:43 2010
@@ -1,4 +1,3 @@
-
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -26,39 +25,31 @@
<property name="org" value="apache"/>
<property name="Name" value="Avro"/>
<property name="name" value="avro"/>
- <property name="version" value="1.2.0-dev"/>
+
+ <loadresource property="version">
+ <file file="${basedir}/../../VERSION.txt"/>
+ </loadresource>
<property name="fullname" value="${name}-${version}"/>
<property name="year" value="2009"/>
+ <property name="share.dir" value="${basedir}/../../share"/>
+ <property name="top.build" value="${basedir}/../../build"/>
+ <property name="dist.dir" value="${basedir}/../../dist"/>
+
<property name="src.dir" value="${basedir}/src"/>
+ <property name="java.src.dir" value="${src.dir}/java"/>
<property name="build.dir" value="${basedir}/build"/>
- <property name="java.src.dir" value="${src.dir}/java"/>
- <property name="c.src.dir" value="${src.dir}/c"/>
- <property name="c.build.dir" value="${build.dir}/c/obj"/>
- <property name="cpp.src.dir" value="${src.dir}/c++"/>
- <property name="cpp.build.dir" value="${build.dir}/c++"/>
<property name="lib.dir" value="${basedir}/lib"/>
- <property name="install.c" value="${build.dir}/c/install"/>
- <property name="install.cpp" value="${build.dir}/c++/install"/>
- <property name="dist.dir" value="${build.dir}/${fullname}"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.doc" value="${build.dir}/doc"/>
<property name="build.javadoc" value="${build.doc}/api/java"/>
<property name="build.javadoc.log" value="${build.dir}/javadoc.log"/>
- <property name="build.cdoc" value="${build.doc}/api/c"/>
- <property name="build.cppdoc" value="${build.doc}/api/cpp"/>
-
- <exec executable="sed" inputstring="${os.name}" outputproperty="nonspace.os">
- <arg value="s/ /_/g"/>
- </exec>
- <property name="build.platform"
- value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
<property name="test.count" value="100"/>
<property name="test.junit.output.format" value="plain"/>
<property name="test.java.src.dir" value="${basedir}/src/test/java"/>
- <property name="test.schemata.dir" value="${basedir}/src/test/schemata"/>
+ <property name="test.schemata.dir" value="${share.dir}/test/schemas"/>
<property name="test.genavro.dir" value="${basedir}/src/test/genavro"/>
<property name="test.genavro.mode" value="run" />
<property name="test.java.build.dir" value="${build.dir}/test"/>
@@ -144,18 +135,16 @@
</condition>
</target>
- <target name="compile" depends="compile-java,compile-c,compile-cpp"/>
-
<target name="javacc" depends="ivy-retrieve">
<mkdir dir="${build.dir}/src/org/apache/avro/genavro"/>
<copy tofile="${ivy.lib}/javacc.jar" file="${ivy.lib}/javacc-5.0.jar"
overwrite="true"/>
- <javacc target="${src.dir}/java/org/apache/avro/genavro/genavro.jj"
+ <javacc target="${java.src.dir}/org/apache/avro/genavro/genavro.jj"
outputdirectory="${build.dir}/src/org/apache/avro/genavro"
javacchome="${ivy.lib}"/>
</target>
- <target name="compile-java" depends="javacc,schemata,ivy-retrieve">
+ <target name="compile" depends="javacc,ivy-retrieve">
<java-compiler
excludes="**/ipc/** **/*Requestor.java **/*Responder.java **/tool/**">
<src path="${build.dir}/src"/>
@@ -216,17 +205,7 @@
</sequential>
</macrodef>
- <target name="schemata" depends="init">
- <mkdir dir="${build.dir}/src/org/apache/avro/ipc"/>
- <mapper id="m4toavsc" type="glob" from="*.m4"
to="${build.dir}/src/*.avsc"/>
- <apply executable="m4" dir="${src.dir}/schemata">
- <fileset dir="${src.dir}/schemata" includes="**/*.m4"/>
- <mapper refid="m4toavsc"/>
- <redirector><outputmapper refid="m4toavsc"/></redirector>
- </apply>
- </target>
-
- <target name="jar" depends="compile-java" description="Build jar file.">
+ <target name="jar" depends="compile" description="Build jar file.">
<jar jarfile="${build.dir}/${fullname}.jar"
basedir="${build.classes}">
<manifest>
@@ -239,7 +218,7 @@
</jar>
</target>
- <target name="checkstyle-java" depends="compile-java">
+ <target name="checkstyle-java" depends="compile">
<taskdef resource="checkstyletask.properties">
<classpath refid="test.java.classpath" />
</taskdef>
@@ -254,7 +233,7 @@
</checkstyle>
</target>
- <target name="compile-test-java" depends="ivy-retrieve-test,compile-java">
+ <target name="compile-test-java" depends="ivy-retrieve-test,compile">
<java-avro-compiler src="${test.schemata.dir}"
generated="${test.java.generated.dir}"
dest="${test.java.generated.classes}"
@@ -275,7 +254,7 @@
</target>
<macrodef name="java-avro-compiler">
- <attribute name="src" default="${build.dir}/src"/>
+ <attribute name="src" default="${share.dir}/schemas"/>
<attribute name="generated" default="${build.dir}/src"/>
<attribute name="dest" default="${build.classes}"/>
<attribute name="classpath" default="java.classpath"/>
@@ -310,9 +289,9 @@
</sequential>
</macrodef>
- <target name="test"
depends="test-java,test-py,test-c,test-cpp,test-interop,test-avroj,rat"/>
+ <target name="test" depends="test-java,test-avroj"/>
- <target name="rat" depends="ivy-retrieve-test,package">
+ <target name="rat" depends="ivy-retrieve-test">
<typedef resource="org/apache/rat/anttasks/antlib.xml"
uri="antlib:org.apache.rat.anttasks">
<classpath refid="test.java.classpath"/>
@@ -367,20 +346,6 @@
<test-runner files.location="${test.java.src.dir}"
tests.pattern="**/${test.java.include}.java"/>
</target>
- <path id="test.py.path">
- <pathelement location="${basedir}/src/py"/>
- <pathelement location="${basedir}/src/test/py"/>
- <pathelement location="${basedir}/lib/py"/>
- </path>
-
- <target name="init-py" depends="init, schemata">
- <copy todir="${basedir}/src/py/avro">
- <fileset dir="${build.dir}/src/org/apache/avro/ipc">
- <include name="**/*.avsc"/>
- </fileset>
- </copy>
- </target>
-
<target name="generate-test-data" depends="compile-test-java">
<mkdir dir="${test.java.build.dir}/data-files"/>
<mkdir dir="${test.java.build.dir}/blocking-data-files"/>
@@ -398,31 +363,6 @@
</java>
</target>
- <target name="test-py" depends="init-py" description="Run python unit tests">
- <taskdef name="py-test" classname="org.pyant.tasks.PythonTestTask">
- <classpath refid="java.classpath" />
- </taskdef>
- <py-test python="python" pythonpathref="test.py.path" >
- <fileset dir="${basedir}/src/test/py">
- <include name="test_*.py"/>
- </fileset>
- </py-test>
- </target>
-
- <target name="test-interop" depends="test-interop-java,test-interop-c"
- description="Run multiple languages interoperability tests">
- </target>
-
- <target name="test-interop-java"
- depends="test-interop-data-java,test-interop-rpc-java"
- description="Run java interoperability tests">
- </target>
-
- <target name="test-interop-c"
- depends="test-interop-data-c"
- description="Run C interoperability tests">
- </target>
-
<target name="test-interop-data-java" depends="generate-test-data"
description="Run java data file interoperability tests">
<test-runner files.location="${test.java.classes}"
tests.pattern="**/TestDataFile$InteropTest.class" />
@@ -454,7 +394,7 @@
<test-runner files.location="${test.java.classes}"
tests.pattern="**/TestProtocolSpecific$InteropTest.class" />
</target>
- <target name="avroj" depends="compile-java" description="Build standalone
avroj jar file">
+ <target name="avroj" depends="compile" description="Build standalone avroj
jar file">
<jar jarfile="${build.dir}/avroj-${version}.jar">
<manifest>
<attribute name="Main-Class" value="org.apache.avro.tool.Main"/>
@@ -477,42 +417,7 @@
</exec>
</target>
- <target name="pydoc" description="Generate python api docs">
- <taskdef name="py-doc" classname="org.pyant.tasks.PythonDocTask">
- <classpath refid="java.classpath" />
- </taskdef>
- <mkdir dir="${build.doc}/api/py"/>
- <py-doc python="python" pythonpathref="test.py.path" defaultexcludes="true"
- destdir="${build.doc}/api/py">
- <fileset dir="${basedir}/src/py">
- <include name="**/*"/>
- </fileset>
- </py-doc>
- </target>
-
- <target name="doc" depends="forrestdoc,javadoc,pydoc,cdoc,cppdoc"
description="Generate docs">
- </target>
-
- <target name="forrestdoc" depends="init,forrest.check" description="Generate
forrest-based documentation. To use, specify -Dforrest.home=<base of Apache
Forrest installation> on the command line." if="forrest.home">
- <echo file="${build.dir}/avro.ent" append="false">
- <!ENTITY AvroVersion "${version}">
- </echo>
- <exec executable="${forrest.home}/bin/forrest" failonerror="true">
- <env key="JAVA_HOME" value="${java5.home}"/>
- <arg value="-Dproject.content-dir=src/doc"/>
- <arg value="-Dproject.site=doc"/>
- </exec>
- </target>
-
- <target name="forrest.check" unless="forrest.home" depends="java5.check">
- <fail message="'forrest.home' is not defined. Please pass
-Dforrest.home=<base of Apache Forrest installation> to Ant on the
command-line." />
- </target>
-
- <target name="java5.check" unless="java5.home">
- <fail message="'java5.home' is not defined. Forrest requires Java 5.
Please pass -Djava5.home=<base of Java 5 distribution> to Ant on the
command-line." />
- </target>
-
- <target name="javadoc" depends="compile-java" description="Generate javadoc">
+ <target name="javadoc" depends="compile" description="Generate javadoc">
<mkdir dir="${build.javadoc}"/>
<record name="${build.javadoc.log}" action="start"/>
<javadoc
@@ -546,24 +451,9 @@
<fail if="javadoc.warnings">Javadoc warnings!</fail>
</target>
- <target name="package" depends="jar, avroj, doc, package-c, package-cpp"
+ <target name="dist" depends="jar, avroj, javadoc"
description="Build distribution">
<mkdir dir="${dist.dir}"/>
- <mkdir dir="${dist.dir}/lib"/>
- <mkdir dir="${dist.dir}/doc"/>
-
- <copy todir="${dist.dir}/lib" includeEmptyDirs="false">
- <fileset dir="lib" excludes="ivy-*.jar"/>
- <fileset dir="${ivy.lib}"/>
- </copy>
-
- <copy todir="${dist.dir}/c" includeEmptyDirs="false">
- <fileset dir="${install.c}"/>
- </copy>
-
- <copy todir="${dist.dir}/c++" includeEmptyDirs="false">
- <fileset dir="${install.cpp}"/>
- </copy>
<copy todir="${dist.dir}">
<fileset file="${build.dir}/${fullname}.jar"/>
@@ -581,168 +471,15 @@
<checksum file="${dist.dir}/${fullname}.pom" algorithm="md5"/>
<checksum file="${dist.dir}/${fullname}.pom" algorithm="sha1"/>
- <copy todir="${dist.dir}/doc">
- <fileset dir="${build.doc}"/>
- </copy>
-
- <copy todir="${dist.dir}">
- <fileset dir=".">
- <include name="*.txt" />
- </fileset>
+ <copy todir="${top.build}/avro-doc-${version}/api/java">
+ <fileset dir="${build.javadoc}"/>
</copy>
- <copy todir="${dist.dir}/src" includeEmptyDirs="true">
- <fileset dir="src"/>
- </copy>
-
- <copy todir="${dist.dir}/">
- <fileset file="build.xml"/>
- <fileset file="ivy.xml"/>
- </copy>
- </target>
-
- <macrodef name="macro_tar" description="Worker Macro for tar">
- <attribute name="param.destfile"/>
- <element name="param.listofitems"/>
- <sequential>
- <tar compression="gzip" longfile="gnu"
- destfile="@{param.destfile}">
- <param.listofitems/>
- </tar>
- </sequential>
- </macrodef>
-
- <target name="tar" depends="package" description="Make release tarball">
- <macro_tar param.destfile="${build.dir}/${fullname}.tar.gz">
- <param.listofitems>
- <tarfileset dir="${build.dir}" mode="664">
- <include name="${fullname}/**" />
- </tarfileset>
- </param.listofitems>
- </macro_tar>
- <checksum file="${build.dir}/${fullname}.tar.gz" algorithm="md5"/>
- <checksum file="${build.dir}/${fullname}.tar.gz" algorithm="sha1"/>
</target>
<target name="clean" description="Delete build files, and their directories">
<delete dir="${build.dir}"/>
- <delete>
- <fileset dir="src" includes="**/*.pyc" />
- <fileset dir="${basedir}/src/py/avro" includes="**/*.avsc"/>
- </delete>
- </target>
-
- <!-- C Targets -->
- <target name="cdoc" depends="configure-c">
- <mkdir dir="${build.cdoc}"/>
- <exec dir="${c.build.dir}" executable="make" failonerror="true">
- <env key="C_DOCS_OUTPUT" value="${build.cdoc}" />
- <arg line="docs" />
- </exec>
- </target>
-
- <target name="autoreconf-c-check">
- <uptodate targetfile="${c.src.dir}/configure"
- srcfile="${c.src.dir}/configure.in"
- property="autoreconf-c-not-needed"/>
- </target>
-
- <target name="autoreconf-c" depends="autoreconf-c-check"
- unless="autoreconf-c-not-needed">
- <exec dir="${c.src.dir}" executable="autoreconf" failonerror="true">
- <arg line="-f -i"/>
- </exec>
- </target>
-
- <target name="configure-c-check">
- <uptodate targetfile="${c.build.dir}/Makefile"
- srcfile="${c.src.dir}/configure"
- property="configure-c-not-needed"/>
- </target>
-
- <target name="configure-c" depends="autoreconf-c, configure-c-check"
- unless="configure-c-not-needed">
- <mkdir dir="${c.build.dir}" />
- <exec dir="${c.build.dir}" executable="sh" failonerror="true">
- <arg line="${c.src.dir}/configure
--prefix=${install.c}/${build.platform}"/>
- </exec>
- </target>
-
- <target name="compile-c" depends="init, configure-c">
- <exec dir="${c.build.dir}" executable="make" failonerror="true"/>
- </target>
-
- <target name="test-c" depends="compile-c">
- <exec dir="${c.build.dir}" executable="make" failonerror="true">
- <arg value="check"/>
- </exec>
- </target>
-
- <target name="test-interop-data-c" depends="generate-test-data,configure-c"
- description="Run C data file interoperability tests">
- <exec dir="${c.build.dir}" executable="make" failonerror="true">
- <arg value="test_avro_interop"/>
- </exec>
- <exec dir="${c.build.dir}" executable="./test_avro_interop"
failonerror="true">
- <env key="srcdir" value="${c.src.dir}" />
- </exec>
- </target>
-
- <target name="package-c" depends="compile-c">
- <chmod file="${c.src.dir}/config/install-sh" perm="ugo+x"/>
- <exec dir="${c.build.dir}" executable="make" failonerror="true">
- <arg value="install"/>
- </exec>
- </target>
-
- <target name="c-makefile-check">
- <available file="${c.build.dir}/Makefile" property="c-makefile-present"/>
- </target>
- <!-- End C Targets -->
-
- <!-- C++ Targets -->
- <target name="cppdoc" depends="configure-cpp">
- <mkdir dir="${build.cppdoc}"/>
- <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
- <env key="CPP_DOC_DIR" value="${build.cppdoc}" />
- <arg line="doc" />
- </exec>
- </target>
-
- <target name="configure-cpp-check">
- <uptodate targetfile="${cpp.build.dir}/Makefile"
- srcfile="${cpp.src.dir}/configure"
- property="configure-cpp-not-needed"/>
- </target>
-
- <target name="configure-cpp" depends="configure-cpp-check"
- unless="configure-cpp-not-needed">
- <mkdir dir="${cpp.build.dir}" />
- <exec dir="${cpp.build.dir}" executable="sh" failonerror="true">
- <arg line="${cpp.src.dir}/configure
--prefix=${install.cpp}/${build.platform}"/>
- </exec>
- </target>
-
- <target name="compile-cpp" depends="configure-cpp">
- <exec dir="${cpp.build.dir}" executable="make" failonerror="true"/>
- </target>
-
- <target name="test-cpp" depends="compile-cpp">
- <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
- <arg value="check"/>
- </exec>
- </target>
-
- <target name="package-cpp" depends="compile-cpp">
- <exec dir="${cpp.build.dir}" executable="make" failonerror="true">
- <arg value="install"/>
- </exec>
- </target>
-
- <target name="cpp-makefile-check">
- <available file="${cpp.build.dir}/Makefile"
property="cpp-makefile-present"/>
</target>
- <!-- End C++ Targets -->
<!-- Begin Eclipse targets -->
<property name="ant-eclipse.dir" value="${build.dir}/ant-eclipse"/>
Modified: hadoop/avro/trunk/lang/java/src/test/bin/test_avroj.sh
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/bin/test_avroj.sh?rev=898142&r1=898140&r2=898142&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/src/test/bin/test_avroj.sh (original)
+++ hadoop/avro/trunk/lang/java/src/test/bin/test_avroj.sh Tue Jan 12 01:03:43
2010
@@ -44,12 +44,12 @@
rm -rf $TMPDIR
######################################################################
-$CMD compile protocol src/test/schemata/namespace.avpr $TMPDIR/namespace
+$CMD compile protocol ../../share/test/schemas/namespace.avpr $TMPDIR/namespace
# Check that the expected names were generated
[ "MD5.java TestError.java TestNamespace.java TestRecord.java " = \
"$(find $TMPDIR/namespace -name "*.java" \
| awk -F "/" '{ print $NF }' | sort | tr '\n' ' ')" ]
-$CMD compile schema src/test/schemata/interop.avsc $TMPDIR/schema
+$CMD compile schema ../../share/test/schemas/interop.avsc $TMPDIR/schema
[ "Foo.java Interop.java Kind.java MD5.java Node.java " = \
"$(find $TMPDIR/schema -name "*.java" \
| awk -F "/" '{ print $NF }' | sort | tr '\n' ' ')" ]
@@ -84,4 +84,4 @@
$CMD 2>&1 | grep -q "Available tools:"
$CMD doesnotexist 2>&1 | grep -q "Available tools:"
! $CMD 2>&1 > /dev/null
-! $CMD 2>&1 doesnotexist 2>&1 > /dev/null
\ No newline at end of file
+! $CMD 2>&1 doesnotexist 2>&1 > /dev/null
Modified:
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolGeneric.java
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolGeneric.java?rev=898142&r1=898140&r2=898142&view=diff
==============================================================================
---
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolGeneric.java
(original)
+++
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolGeneric.java
Tue Jan 12 01:03:43 2010
@@ -49,7 +49,7 @@
private static final Logger LOG
= LoggerFactory.getLogger(TestProtocolGeneric.class);
- protected static final File FILE = new File("src/test/schemata/simple.avpr");
+ protected static final File FILE = new
File("../../share/test/schemas/simple.avpr");
protected static final Protocol PROTOCOL;
static {
try {
Modified:
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolParsing.java
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolParsing.java?rev=898142&r1=898140&r2=898142&view=diff
==============================================================================
---
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolParsing.java
(original)
+++
hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/TestProtocolParsing.java
Tue Jan 12 01:03:43 2010
@@ -26,7 +26,7 @@
public class TestProtocolParsing {
public static Protocol getSimpleProtocol() throws IOException {
- File file = new File("src/test/schemata/simple.avpr");
+ File file = new File("../../share/test/schemas/simple.avpr");
Protocol protocol = Protocol.parse(file);
return protocol;
}
Added: hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeRequest.avsc
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeRequest.avsc?rev=898142&view=auto
==============================================================================
--- hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeRequest.avsc
(added)
+++ hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeRequest.avsc
Tue Jan 12 01:03:43 2010
@@ -0,0 +1,11 @@
+{
+ "type": "record",
+ "name": "HandshakeRequest", "namespace":"org.apache.avro.ipc",
+ "fields": [
+ {"name": "clientHash",
+ "type": {"type": "fixed", "name": "MD5", "size": 16}},
+ {"name": "clientProtocol", "type": ["null", "string"]},
+ {"name": "serverHash", "type": "MD5"},
+ {"name": "meta", "type": ["null", {"type": "map", "values": "bytes"}]}
+ ]
+}
Added:
hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeResponse.avsc
URL:
http://svn.apache.org/viewvc/hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeResponse.avsc?rev=898142&view=auto
==============================================================================
--- hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeResponse.avsc
(added)
+++ hadoop/avro/trunk/share/schemas/org/apache/avro/ipc/HandshakeResponse.avsc
Tue Jan 12 01:03:43 2010
@@ -0,0 +1,15 @@
+{
+ "type": "record",
+ "name": "HandshakeResponse", "namespace": "org.apache.avro.ipc",
+ "fields": [
+ {"name": "match",
+ "type": {"type": "enum", "name": "HandshakeMatch",
+ "symbols": ["BOTH", "CLIENT", "NONE"]}},
+ {"name": "serverProtocol",
+ "type": ["null", "string"]},
+ {"name": "serverHash",
+ "type": ["null", {"type": "fixed", "name": "MD5", "size": 16}]},
+ {"name": "meta",
+ "type": ["null", {"type": "map", "values": "bytes"}]}
+ ]
+}