[med-svn] [python-avro] 01/05: Imported Upstream version 1.8.1+dfsg

Afif Elghraoui afif at moszumanska.debian.org
Sat Jul 9 21:24:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch master
in repository python-avro.

commit 1dd705e8547a389aa58e58adbfcbbdac517636a4
Author: Afif Elghraoui <afif at debian.org>
Date:   Sat Jul 9 13:08:32 2016 -0700

    Imported Upstream version 1.8.1+dfsg
---
 .editorconfig                                      |  34 +++
 .gitignore                                         |   2 +
 CHANGES.txt                                        |  69 ++++-
 build.sh                                           | 308 +++++++++++----------
 doc/.gitignore                                     |   1 +
 doc/build.xml                                      |   4 +-
 .../src/main/java/example/GenericMain.java         |  68 ++---
 .../src/main/java/example/SpecificMain.java        |  70 ++---
 .../main/java/example/MapReduceAvroWordCount.java  |   2 +-
 doc/src/content/xdocs/mr.xml                       |  16 +-
 doc/src/content/xdocs/site.xml                     |  10 +-
 doc/src/content/xdocs/spec.xml                     |  52 ++--
 doc/src/content/xdocs/tabs.xml                     |   4 +-
 doc/src/skinconf.xml                               |  92 +++---
 lang/py/.gitignore                                 |   3 +
 lang/py/build.xml                                  |  12 +-
 lang/py/ivysettings.xml                            |   4 +-
 lang/py/src/avro/schema.py                         |   9 +-
 lang/py/test/test_schema.py                        |  14 +
 lang/py3/.gitignore                                |   6 +
 lang/py3/scripts/avro                              |   0
 pom.xml                                            |  38 ++-
 share/VERSION.txt                                  |   2 +-
 share/githooks/commit-msg                          |  58 ++++
 share/test/interop/bin/test_rpc_interop.sh         |  54 ++--
 share/test/schemas/simple.avpr                     |   2 +-
 share/test/schemas/specialtypes.avdl               |   8 +
 27 files changed, 597 insertions(+), 345 deletions(-)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..4efdf7d
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+
+[*.{java,xml,sh}]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace=true
+
+#[*.scala]
+#indent_style = space
+#indent_size = 2
+
+#[*.py]
+#indent_style = space
+#indent_size = 4
diff --git a/.gitignore b/.gitignore
index 372789a..d5b1b74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
 *.iml
 *.ipr
 *.iws
+*.swp
+*~
 .idea/
 .project
 .settings
diff --git a/CHANGES.txt b/CHANGES.txt
index 0d27f60..352c0cd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,70 @@
 Avro Change Log
 
+Avro 1.8.1 (14 May 2016)
+
+  INCOMPATIBLE CHANGES
+
+  NEW FEATURES
+
+  OPTIMIZATIONS
+
+  IMPROVEMENTS
+
+    AVRO-1793. Python2: Retain stack trace and original exception when failing
+    to parse schemas. Contributed by Jakob Homan (jghoman).
+
+    AVRO-1778: JavaScript: Add IPC/RPC support. (mtth)
+
+    AVRO-1824: C++: Fix docs for building Avro C++. (William S. Fulton via blue)
+
+    AVRO-1701: Fix for "warning: comparison between 'const enum testgen_r::ExampleEnum' and 'const enum testgen::ExampleEnum'" (peter liu via thiru)
+
+    AVRO-1823: Java: Do not swallow IOException while reading magic bytes.
+    (Koji Noguchi via blue)
+
+    AVRO-1825: Allow running build.sh dist under git (nielsbasjes)
+
+    AVRO-1819, AVRO-1820: Java: Add aliases, custom properties to Protocol.
+    (Konstantin Usachev via blue)
+
+    AVRO-1834: Lower the Javadoc warnings on the generated code. (nielsbasjes)
+
+    AVRO-1835: Running tests using JDK 1.8 complains about MaxPermSize (nielsbasjes)
+
+    AVRO-1828: Add EditorConfig file and cleanup of whitespace violations (nielsbasjes)
+
+    AVRO-1839: Update the gitignore files to hide generated files (nielsbasjes)
+
+    AVRO-1840: Ensure that build.sh clean really cleans all generated files (nielsbasjes)
+
+    AVRO-1841: Add clientside githooks to do basic commit validation (nielsbasjes) 
+
+    AVRO-1807: Java/JSON: Throw for unsupported objects rather than ignoring. (blue)
+
+  BUG FIXES
+
+    AVRO-1493. Java: Avoid the "Turkish Locale Problem". Schema fingerprints are
+    now consistent regardless of the environment's locale.
+
+    AVRO-1799: Fix GenericRecord#toString ByteBuffer handling. (blue)
+
+    AVRO-1667: Fix parser grammar flattening for recursive cases.
+    (Zoltan Farkas via blue)
+
+    AVRO-1829. C++ documentation improvements (William S Fulton via thiru)
+
+    AVRO-1821: Java: Fix possible memory leak in ReflectData accessor cache.
+    (Bryan Harclerode via blue)
+
+    AVRO-1642: Java: Do not generate invalid all-args constructor.
+    (Prateek Rungta and Barry Jones via blue)
+
+    AVRO-1826: build.sh rat fails over extra license files and many others (nielsbasjes).
+
+    AVRO-1814: Generated java code fails on variables with a TLD name like 'org' (nielsbasjes)
+
+    AVRO-1711: Java: Fix JsonParser#skipChildren to implement its defined contract.
+    (Zoltan Farkas and Thiruvalluvan M. G. via blue)
 
 Avro 1.8.0 (22 January 2016)
 
@@ -34,7 +99,7 @@ Avro 1.8.0 (22 January 2016)
     (Ryan Blue via cutting)
 
     AVRO-570. Python: Add connector for tethered mapreduce.
-    (Jeremy Lewi and Steven Willis via cutting)    
+    (Jeremy Lewi and Steven Willis via cutting)
 
     AVRO-834. Java: Data File corruption recovery tool.
     (scottcarey and tomwhite)
@@ -63,6 +128,8 @@ Avro 1.8.0 (22 January 2016)
 
     AVRO-1767. JS: Fall back to unwrapped union values. (Matthieu Monsch via blue)
 
+    AVRO-1784. C++: Should have a json encoder that pretty prints. (John McClean via thiru)
+
   OPTIMIZATIONS
 
     AVRO-1760. Java: Thread scalability problem with the use of SynchronizedMap
diff --git a/build.sh b/build.sh
index 1758b84..c0c31df 100755
--- a/build.sh
+++ b/build.sh
@@ -15,14 +15,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -e						  # exit on error
+set -e                # exit on error
 
-cd `dirname "$0"`				  # connect to root
+cd `dirname "$0"`     # connect to root
 
 VERSION=`cat share/VERSION.txt`
 
 function usage {
-  echo "Usage: $0 {test|dist|sign|clean|docker|rat}"
+  echo "Usage: $0 {test|dist|sign|clean|docker|rat|githooks}"
   exit 1
 }
 
@@ -31,192 +31,220 @@ then
   usage
 fi
 
-set -x						  # echo commands
+set -x                # echo commands
 
 for target in "$@"
 do
-
-case "$target" in
+  case "$target" in
 
     test)
-	# run lang-specific tests
-        (cd lang/java; mvn test)
-	(cd lang/py; ant test)
-	(cd lang/py3; python3 setup.py test)
-	(cd lang/c; ./build.sh test)
-	(cd lang/c++; ./build.sh test)
-	(cd lang/csharp; ./build.sh test)
-	(cd lang/js; ./build.sh test)
-	(cd lang/ruby; ./build.sh test)
-	(cd lang/php; ./build.sh test)
-	(cd lang/perl; perl ./Makefile.PL && make test)
-
-	# create interop test data
-        mkdir -p build/interop/data
-	(cd lang/java/avro; mvn -P interop-data-generate generate-resources)
-	(cd lang/py; ant interop-data-generate)
-	(cd lang/c; ./build.sh interop-data-generate)
-	#(cd lang/c++; make interop-data-generate)
-	(cd lang/ruby; rake generate_interop)
-	(cd lang/php; ./build.sh interop-data-generate)
-
-	# run interop data tests
-	(cd lang/java; mvn test -P interop-data-test)
-	(cd lang/py; ant interop-data-test)
-	(cd lang/c; ./build.sh interop-data-test)
-	#(cd lang/c++; make interop-data-test)
-	(cd lang/ruby; rake interop)
-	(cd lang/php; ./build.sh test-interop)
-
-	# java needs to package the jars for the interop rpc tests
-        (cd lang/java; mvn package -DskipTests)
-	# run interop rpc test
-        /bin/bash share/test/interop/bin/test_rpc_interop.sh
-
-	;;
+      # run lang-specific tests
+      (cd lang/java; mvn test)
+      (cd lang/py; ant test)
+      (cd lang/py3; python3 setup.py test)
+      (cd lang/c; ./build.sh test)
+      (cd lang/c++; ./build.sh test)
+      (cd lang/csharp; ./build.sh test)
+      (cd lang/js; ./build.sh test)
+      (cd lang/ruby; ./build.sh test)
+      (cd lang/php; ./build.sh test)
+      (cd lang/perl; perl ./Makefile.PL && make test)
+
+      # create interop test data
+      mkdir -p build/interop/data
+      (cd lang/java/avro; mvn -P interop-data-generate generate-resources)
+      (cd lang/py; ant interop-data-generate)
+      (cd lang/c; ./build.sh interop-data-generate)
+      #(cd lang/c++; make interop-data-generate)
+      (cd lang/ruby; rake generate_interop)
+      (cd lang/php; ./build.sh interop-data-generate)
+
+      # run interop data tests
+      (cd lang/java; mvn test -P interop-data-test)
+      (cd lang/py; ant interop-data-test)
+      (cd lang/c; ./build.sh interop-data-test)
+      #(cd lang/c++; make interop-data-test)
+      (cd lang/ruby; rake interop)
+      (cd lang/php; ./build.sh test-interop)
+
+      # java needs to package the jars for the interop rpc tests
+      (cd lang/java; mvn package -DskipTests)
+      # run interop rpc test
+      /bin/bash share/test/interop/bin/test_rpc_interop.sh
+    ;;
 
     dist)
-        # ensure version matches
-        # FIXME: enforcer is broken:MENFORCER-42
-        # mvn enforcer:enforce -Davro.version=$VERSION
-        
-	# build source tarball
-        mkdir -p build
+      # ensure version matches
+      # FIXME: enforcer is broken:MENFORCER-42
+      # mvn enforcer:enforce -Davro.version=$VERSION
 
-        SRC_DIR=avro-src-$VERSION
-        DOC_DIR=avro-doc-$VERSION
+      # build source tarball
+      mkdir -p build
 
-	rm -rf build/${SRC_DIR}
-	svn export --force . build/${SRC_DIR}
+      SRC_DIR=avro-src-$VERSION
+      DOC_DIR=avro-doc-$VERSION
 
-	#runs RAT on artifacts
-        mvn -N -P rat antrun:run
+      rm -rf build/${SRC_DIR}
+      if [ -d .svn ];
+      then
+        svn export --force . build/${SRC_DIR}
+      elif [ -d .git ];
+      then
+        mkdir -p build/${SRC_DIR}
+        git archive HEAD | tar -x -C build/${SRC_DIR}
+      else
+        echo "Not SVN and not GIT .. cannot continue"
+        exit -1;
+      fi
 
-	mkdir -p dist
-        (cd build; tar czf ../dist/${SRC_DIR}.tar.gz ${SRC_DIR})
+      #runs RAT on artifacts
+      mvn -N -P rat antrun:run
 
-	# build lang-specific artifacts
-        
-	(cd lang/java; mvn package -DskipTests -Dhadoop.version=1;
-	  rm -rf mapred/target/{classes,test-classes}/;
-	  rm -rf trevni/avro/target/{classes,test-classes}/;
-	  mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate)
-        (cd lang/java/trevni/doc; mvn site)
-        (mvn -N -P copy-artifacts antrun:run) 
+      mkdir -p dist
+      (cd build; tar czf ../dist/${SRC_DIR}.tar.gz ${SRC_DIR})
 
-	(cd lang/py; ant dist)
-	(cd lang/py3; python3 setup.py sdist; cp -r dist ../../dist/py3)
+      # build lang-specific artifacts
 
-	(cd lang/c; ./build.sh dist)
+      (cd lang/java; mvn package -DskipTests -Dhadoop.version=1;
+      rm -rf mapred/target/{classes,test-classes}/;
+      rm -rf trevni/avro/target/{classes,test-classes}/;
+      mvn -P dist package -DskipTests -Davro.version=$VERSION javadoc:aggregate)
+      (cd lang/java/trevni/doc; mvn site)
+      (mvn -N -P copy-artifacts antrun:run)
 
-	(cd lang/c++; ./build.sh dist)
+      (cd lang/py; ant dist)
+      (cd lang/py3; python3 setup.py sdist; cp -r dist ../../dist/py3)
 
-	(cd lang/csharp; ./build.sh dist)
+      (cd lang/c; ./build.sh dist)
 
-	(cd lang/js; ./build.sh dist)
+      (cd lang/c++; ./build.sh dist)
 
-	(cd lang/ruby; ./build.sh dist)
+      (cd lang/csharp; ./build.sh dist)
 
-	(cd lang/php; ./build.sh dist)
+      (cd lang/js; ./build.sh dist)
 
-        mkdir -p dist/perl
-	(cd lang/perl; perl ./Makefile.PL && make dist)
-        cp lang/perl/Avro-$VERSION.tar.gz dist/perl/
+      (cd lang/ruby; ./build.sh dist)
 
-	# build docs
-	(cd doc; ant)
-        # add LICENSE and NOTICE for docs
-        mkdir -p build/$DOC_DIR
-        cp doc/LICENSE build/$DOC_DIR
-        cp doc/NOTICE build/$DOC_DIR
-	(cd build; tar czf ../dist/avro-doc-$VERSION.tar.gz $DOC_DIR)
+      (cd lang/php; ./build.sh dist)
 
-	cp DIST_README.txt dist/README.txt
-	;;
+      mkdir -p dist/perl
+      (cd lang/perl; perl ./Makefile.PL && make dist)
+      cp lang/perl/Avro-$VERSION.tar.gz dist/perl/
 
-    sign)
+      # build docs
+      (cd doc; ant)
+      # add LICENSE and NOTICE for docs
+      mkdir -p build/$DOC_DIR
+      cp doc/LICENSE build/$DOC_DIR
+      cp doc/NOTICE build/$DOC_DIR
+      (cd build; tar czf ../dist/avro-doc-$VERSION.tar.gz $DOC_DIR)
+
+      cp DIST_README.txt dist/README.txt
+      ;;
 
-	set +x
+    sign)
+      set +x
 
-	echo -n "Enter password: "
-	stty -echo
-	read password
-	stty echo
+      echo -n "Enter password: "
+      stty -echo
+      read password
+      stty echo
 
-	for f in $(find dist -type f \
-	    \! -name '*.md5' \! -name '*.sha1' \
-	    \! -name '*.asc' \! -name '*.txt' );
-	do
-	    (cd `dirname $f`; md5sum `basename $f`) > $f.md5
-	    (cd `dirname $f`; sha1sum `basename $f`) > $f.sha1
-	    gpg --passphrase $password --armor --output $f.asc --detach-sig $f
-	done
+      for f in $(find dist -type f \
+        \! -name '*.md5' \! -name '*.sha1' \
+        \! -name '*.asc' \! -name '*.txt' );
+      do
+        (cd `dirname $f`; md5sum `basename $f`) > $f.md5
+        (cd `dirname $f`; sha1sum `basename $f`) > $f.sha1
+        gpg --passphrase $password --armor --output $f.asc --detach-sig $f
+      done
 
-	set -x
-	;;
+      set -x
+      ;;
 
     clean)
-	rm -rf build dist
-	(cd doc; ant clean)
+      rm -rf build dist
+      (cd doc; ant clean)
+
+      (mvn clean)
+      rm -rf lang/java/*/userlogs/
+      rm -rf lang/java/*/dependency-reduced-pom.xml
 
-        (mvn clean)         
+      (cd lang/py; ant clean)
+      rm -rf lang/py/userlogs/
 
-	(cd lang/py; ant clean)
-	(cd lang/py3; python3 setup.py clean)
+      (cd lang/py3; python3 setup.py clean)
+      rm -rf lang/py3/dist
+      rm -rf lang/py3/avro_python3.egg-info
+      rm -f  lang/py3/avro/*.avsc
+      rm -f  lang/py3/avro/VERSION.txt
+      rm -rf lang/py3/avro/__pycache__/
+      rm -f  lang/py3/avro/tests/interop.avsc
+      rm -rf lang/py3/avro/tests/__pycache__/
 
-	(cd lang/c; ./build.sh clean)
+      (cd lang/c; ./build.sh clean)
 
-	(cd lang/c++; ./build.sh clean)
+      (cd lang/c++; ./build.sh clean)
 
-	(cd lang/csharp; ./build.sh clean)
+      (cd lang/csharp; ./build.sh clean)
 
-	(cd lang/js; ./build.sh clean)
+      (cd lang/js; ./build.sh clean)
 
-	(cd lang/ruby; ./build.sh clean)
+      (cd lang/ruby; ./build.sh clean)
 
-	(cd lang/php; ./build.sh clean)
+      (cd lang/php; ./build.sh clean)
 
-	(cd lang/perl; [ ! -f Makefile ] || make clean)
-	;;
+      (cd lang/perl; [ ! -f Makefile ] || make clean)
+      rm -f  lang/perl/Avro-*.tar.gz
+      rm -f  lang/perl/META.yml
+      rm -f  lang/perl/Makefile.old
+      rm -rf lang/perl/inc/
+      ;;
 
     docker)
-        docker build -t avro-build share/docker
-        if [ "$(uname -s)" == "Linux" ]; then
-          USER_NAME=${SUDO_USER:=$USER}
-          USER_ID=$(id -u $USER_NAME)
-          GROUP_ID=$(id -g $USER_NAME)
-        else # boot2docker uid and gid
-          USER_NAME=$USER
-          USER_ID=1000
-          GROUP_ID=50
-        fi
-        docker build -t avro-build-${USER_NAME} - <<UserSpecificDocker
+      docker build -t avro-build share/docker
+      if [ "$(uname -s)" == "Linux" ]; then
+        USER_NAME=${SUDO_USER:=$USER}
+        USER_ID=$(id -u $USER_NAME)
+        GROUP_ID=$(id -g $USER_NAME)
+      else # boot2docker uid and gid
+        USER_NAME=$USER
+        USER_ID=1000
+        GROUP_ID=50
+      fi
+      docker build -t avro-build-${USER_NAME} - <<UserSpecificDocker
 FROM avro-build
 RUN groupadd -g ${GROUP_ID} ${USER_NAME} || true
 RUN useradd -g ${GROUP_ID} -u ${USER_ID} -k /root -m ${USER_NAME}
 ENV HOME /home/${USER_NAME}
 UserSpecificDocker
-        # By mapping the .m2 directory you can do an mvn install from
-        # within the container and use the result on your normal
-        # system.  And this also is a significant speedup in subsequent
-        # builds because the dependencies are downloaded only once.
-        docker run --rm=true -t -i \
-          -v ${PWD}:/home/${USER_NAME}/avro \
-          -w /home/${USER_NAME}/avro \
-          -v ${HOME}/.m2:/home/${USER_NAME}/.m2 \
-          -v ${HOME}/.gnupg:/home/${USER_NAME}/.gnupg \
-          -u ${USER_NAME} \
-          avro-build-${USER_NAME}
-        ;;
+      # By mapping the .m2 directory you can do an mvn install from
+      # within the container and use the result on your normal
+      # system.  And this also is a significant speedup in subsequent
+      # builds because the dependencies are downloaded only once.
+      docker run --rm=true -t -i \
+        -v ${PWD}:/home/${USER_NAME}/avro \
+        -w /home/${USER_NAME}/avro \
+        -v ${HOME}/.m2:/home/${USER_NAME}/.m2 \
+        -v ${HOME}/.gnupg:/home/${USER_NAME}/.gnupg \
+        -u ${USER_NAME} \
+        avro-build-${USER_NAME}
+      ;;
 
     rat)
-        mvn test -Dmaven.main.skip=true -Dmaven.test.skip=true -DskipTests=true -P rat -pl :avro-toplevel
-        ;;
+      mvn test -Dmaven.main.skip=true -Dmaven.test.skip=true -DskipTests=true -P rat -pl :avro-toplevel
+      ;;
+
+    githooks)
+      echo "Installing AVRO git hooks."
+      cp share/githooks/* .git/hooks
+      find .git/hooks/ -type f | fgrep -v sample | xargs chmod 755
+      ;;
 
     *)
-        usage
-        ;;
-esac
+      usage
+      ;;
+  esac
 
 done
 
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..567609b
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/doc/build.xml b/doc/build.xml
index fe21c96..1e7c058 100644
--- a/doc/build.xml
+++ b/doc/build.xml
@@ -18,10 +18,10 @@
   - under the License.
   -->
 <project name="doc" default="doc" basedir=".">
-  
+
   <!-- Load user's default properties. -->
   <property file="${user.home}/build.properties" />
-  
+
   <loadresource property="version">
     <file file="${basedir}/../share/VERSION.txt"/>
   </loadresource>
diff --git a/doc/examples/java-example/src/main/java/example/GenericMain.java b/doc/examples/java-example/src/main/java/example/GenericMain.java
index 87a445c..2d51a8d 100644
--- a/doc/examples/java-example/src/main/java/example/GenericMain.java
+++ b/doc/examples/java-example/src/main/java/example/GenericMain.java
@@ -33,39 +33,39 @@ import org.apache.avro.io.DatumReader;
 import org.apache.avro.io.DatumWriter;
 
 public class GenericMain {
-	public static void main(String[] args) throws IOException {
-		Schema schema = new Parser().parse(new File("/home/skye/code/cloudera/avro/doc/examples/user.avsc"));
-		
-		GenericRecord user1 = new GenericData.Record(schema);
-		user1.put("name", "Alyssa");
-		user1.put("favorite_number", 256);
-		// Leave favorite color null
-		
-		GenericRecord user2 = new GenericData.Record(schema);
-		user2.put("name", "Ben");
-		user2.put("favorite_number", 7);
-		user2.put("favorite_color", "red");
-		
-		// Serialize user1 and user2 to disk
-		File file = new File("users.avro");
-		DatumWriter<GenericRecord> datumWriter = new GenericDatumWriter<GenericRecord>(schema);
-		DataFileWriter<GenericRecord> dataFileWriter = new DataFileWriter<GenericRecord>(datumWriter);
-		dataFileWriter.create(schema, file);
-		dataFileWriter.append(user1);
-		dataFileWriter.append(user2);
-		dataFileWriter.close();
+  public static void main(String[] args) throws IOException {
+    Schema schema = new Parser().parse(new File("/home/skye/code/cloudera/avro/doc/examples/user.avsc"));
 
-		// Deserialize users from disk
-		DatumReader<GenericRecord> datumReader = new GenericDatumReader<GenericRecord>(schema);
-		DataFileReader<GenericRecord> dataFileReader = new DataFileReader<GenericRecord>(file, datumReader);
-		GenericRecord user = null;
-		while (dataFileReader.hasNext()) {
-			// Reuse user object by passing it to next(). This saves us from
-			// allocating and garbage collecting many objects for files with
-			// many items.
-			user = dataFileReader.next(user);
-			System.out.println(user);
-		}
-		
-	}
+    GenericRecord user1 = new GenericData.Record(schema);
+    user1.put("name", "Alyssa");
+    user1.put("favorite_number", 256);
+    // Leave favorite color null
+
+    GenericRecord user2 = new GenericData.Record(schema);
+    user2.put("name", "Ben");
+    user2.put("favorite_number", 7);
+    user2.put("favorite_color", "red");
+
+    // Serialize user1 and user2 to disk
+    File file = new File("users.avro");
+    DatumWriter<GenericRecord> datumWriter = new GenericDatumWriter<GenericRecord>(schema);
+    DataFileWriter<GenericRecord> dataFileWriter = new DataFileWriter<GenericRecord>(datumWriter);
+    dataFileWriter.create(schema, file);
+    dataFileWriter.append(user1);
+    dataFileWriter.append(user2);
+    dataFileWriter.close();
+
+    // Deserialize users from disk
+    DatumReader<GenericRecord> datumReader = new GenericDatumReader<GenericRecord>(schema);
+    DataFileReader<GenericRecord> dataFileReader = new DataFileReader<GenericRecord>(file, datumReader);
+    GenericRecord user = null;
+    while (dataFileReader.hasNext()) {
+      // Reuse user object by passing it to next(). This saves us from
+      // allocating and garbage collecting many objects for files with
+      // many items.
+      user = dataFileReader.next(user);
+      System.out.println(user);
+    }
+
+  }
 }
diff --git a/doc/examples/java-example/src/main/java/example/SpecificMain.java b/doc/examples/java-example/src/main/java/example/SpecificMain.java
index 2b5fd0f..e068eed 100644
--- a/doc/examples/java-example/src/main/java/example/SpecificMain.java
+++ b/doc/examples/java-example/src/main/java/example/SpecificMain.java
@@ -31,43 +31,43 @@ import org.apache.avro.specific.SpecificDatumWriter;
 import example.avro.User;
 
 public class SpecificMain {
-	public static void main(String[] args) throws IOException {
-		User user1 = new User();
-		user1.setName("Alyssa");
-		user1.setFavoriteNumber(256);
-		// Leave favorite color null
+  public static void main(String[] args) throws IOException {
+    User user1 = new User();
+    user1.setName("Alyssa");
+    user1.setFavoriteNumber(256);
+    // Leave favorite color null
 
-		// Alternate constructor
-		User user2 = new User("Ben", 7, "red");
-		
-		// Construct via builder
-		User user3 = User.newBuilder()
-				     .setName("Charlie")
-				     .setFavoriteColor("blue")
-				     .setFavoriteNumber(null)
-				     .build();
+    // Alternate constructor
+    User user2 = new User("Ben", 7, "red");
 
-		// Serialize user1 and user2 to disk
-		File file = new File("users.avro");
-		DatumWriter<User> userDatumWriter = new SpecificDatumWriter<User>(User.class);
-		DataFileWriter<User> dataFileWriter = new DataFileWriter<User>(userDatumWriter);
-		dataFileWriter.create(user1.getSchema(), file);
-		dataFileWriter.append(user1);
-		dataFileWriter.append(user2);
-		dataFileWriter.append(user3);
-		dataFileWriter.close();
+    // Construct via builder
+    User user3 = User.newBuilder()
+             .setName("Charlie")
+             .setFavoriteColor("blue")
+             .setFavoriteNumber(null)
+             .build();
 
-		// Deserialize Users from disk
-		DatumReader<User> userDatumReader = new SpecificDatumReader<User>(User.class);
-		DataFileReader<User> dataFileReader = new DataFileReader<User>(file, userDatumReader);
-		User user = null;
-		while (dataFileReader.hasNext()) {
-			// Reuse user object by passing it to next(). This saves us from
-			// allocating and garbage collecting many objects for files with
-			// many items.
-			user = dataFileReader.next(user);
-			System.out.println(user);
-		}
+    // Serialize user1 and user2 to disk
+    File file = new File("users.avro");
+    DatumWriter<User> userDatumWriter = new SpecificDatumWriter<User>(User.class);
+    DataFileWriter<User> dataFileWriter = new DataFileWriter<User>(userDatumWriter);
+    dataFileWriter.create(user1.getSchema(), file);
+    dataFileWriter.append(user1);
+    dataFileWriter.append(user2);
+    dataFileWriter.append(user3);
+    dataFileWriter.close();
 
-	}
+    // Deserialize Users from disk
+    DatumReader<User> userDatumReader = new SpecificDatumReader<User>(User.class);
+    DataFileReader<User> dataFileReader = new DataFileReader<User>(file, userDatumReader);
+    User user = null;
+    while (dataFileReader.hasNext()) {
+      // Reuse user object by passing it to next(). This saves us from
+      // allocating and garbage collecting many objects for files with
+      // many items.
+      user = dataFileReader.next(user);
+      System.out.println(user);
+    }
+
+  }
 }
diff --git a/doc/examples/mr-example/src/main/java/example/MapReduceAvroWordCount.java b/doc/examples/mr-example/src/main/java/example/MapReduceAvroWordCount.java
index 8ca6a2f..5f5c919 100644
--- a/doc/examples/mr-example/src/main/java/example/MapReduceAvroWordCount.java
+++ b/doc/examples/mr-example/src/main/java/example/MapReduceAvroWordCount.java
@@ -112,7 +112,7 @@ public class MapReduceAvroWordCount extends Configured implements Tool {
     FileOutputFormat.setOutputPath(job, new Path(args[1]));
 
     job.waitForCompletion(true);
-    
+
     return 0;
   }
 
diff --git a/doc/src/content/xdocs/mr.xml b/doc/src/content/xdocs/mr.xml
index a93a137..7c91a24 100644
--- a/doc/src/content/xdocs/mr.xml
+++ b/doc/src/content/xdocs/mr.xml
@@ -39,7 +39,7 @@
       See the <a href="http://hadoop.apache.org/docs/current/">Hadoop
       documentation</a> and the <a href="gettingstartedjava.html">Avro getting
       started guide</a> for introductions to these projects.  This guide uses
-      the old MapReduce API (<code>org.apache.hadoop.mapred</code>) and the new 
+      the old MapReduce API (<code>org.apache.hadoop.mapred</code>) and the new
       MapReduce API (<code>org.apache.hadoop.mapreduce</code>).
     </p>
     <section>
@@ -91,10 +91,10 @@
 </plugin>
       </source>
       <p>
-        If you do not configure the <em>sourceDirectory</em> and <em>outputDirectory</em> 
-        properties, the defaults will be used. The <em>sourceDirectory</em> property 
-        defaults to <em>src/main/avro</em>. The <em>outputDirectory</em> property 
-        defaults to <em>target/generated-sources</em>. You can change the paths to 
+        If you do not configure the <em>sourceDirectory</em> and <em>outputDirectory</em>
+        properties, the defaults will be used. The <em>sourceDirectory</em> property
+        defaults to <em>src/main/avro</em>. The <em>outputDirectory</em> property
+        defaults to <em>target/generated-sources</em>. You can change the paths to
         match your project layout.
       </p>
       <p>
@@ -297,9 +297,9 @@ public class MapReduceColorCount extends Configured implements Tool {
         ColorCount reads in data files containing <code>User</code> records,
         defined in <em>examples/user.avsc</em>, and counts the number of
         instances of each favorite color.  (This example draws inspiration from
-        the canonical WordCount MapReduce application.)  This example uses the 
-        old MapReduce API.  See MapReduceAvroWordCount, found under 
-        <em>doc/examples/mr-example/src/main/java/example/</em> to see the new MapReduce 
+        the canonical WordCount MapReduce application.)  This example uses the
+        old MapReduce API.  See MapReduceAvroWordCount, found under
+        <em>doc/examples/mr-example/src/main/java/example/</em> to see the new MapReduce
         API example.  The <code>User</code>
         schema is defined as follows:
       </p>
diff --git a/doc/src/content/xdocs/site.xml b/doc/src/content/xdocs/site.xml
index 85d5fb9..30d0b48 100644
--- a/doc/src/content/xdocs/site.xml
+++ b/doc/src/content/xdocs/site.xml
@@ -24,13 +24,13 @@ This file contains an outline of the site's information content.  It is used to:
 <link href="site:changes"> links to changes.html (or ../changes.html if in
   subdir).
 - Provide aliases for external URLs in the external-refs section.  Eg, <link
-  href="ext:cocoon"> links to http://cocoon.apache.org/ 
+  href="ext:cocoon"> links to http://cocoon.apache.org/
 
 See http://forrest.apache.org/docs/linking.html for more info
 -->
 <!-- The label attribute of the outer "site" element will only show
   in the linkmap (linkmap.html).
-  Use elements project-name and group-name in skinconfig to change name of 
+  Use elements project-name and group-name in skinconfig to change name of
   your site or project that is usually shown at the top of page.
   No matter what you configure for the href attribute, Forrest will
   always use index.html when you request http://yourHost/
@@ -39,7 +39,7 @@ See http://forrest.apache.org/docs/linking.html for more info
 
 <site label="Avro" href="" xmlns="http://apache.org/forrest/linkmap/1.0">
 
-  <docs label="Documentation"> 
+  <docs label="Documentation">
     <overview   label="Overview"          href="index.html" />
     <gettingstartedjava label="Getting started (Java)" href="gettingstartedjava.html" />
     <gettingstartedpython label="Getting started (Python)" href="gettingstartedpython.html" />
@@ -55,7 +55,7 @@ See http://forrest.apache.org/docs/linking.html for more info
     <wiki       label="Wiki"              href="ext:wiki" />
     <faq        label="FAQ"               href="ext:faq" />
   </docs>
-  
+
   <external-refs>
     <site      href="http://avro.apache.org/"/>
     <lists     href="http://avro.apache.org/mailing_lists.html"/>
@@ -87,5 +87,5 @@ See http://forrest.apache.org/docs/linking.html for more info
       <spec href="spec.html"/>
     </trevni>
   </external-refs>
- 
+
 </site>
diff --git a/doc/src/content/xdocs/spec.xml b/doc/src/content/xdocs/spec.xml
index 1e6f4e3..ec1f199 100644
--- a/doc/src/content/xdocs/spec.xml
+++ b/doc/src/content/xdocs/spec.xml
@@ -41,9 +41,9 @@
       <p>A Schema is represented in <a href="ext:json">JSON</a> by one of:</p>
       <ul>
         <li>A JSON string, naming a defined type.</li>
-        
+
         <li>A JSON object, of the form:
-          
+
           <source>{"type": "<em>typeName</em>" ...<em>attributes</em>...}</source>
 
           where <em>typeName</em> is either a primitive or derived
@@ -67,25 +67,25 @@
           <li><code>bytes</code>: sequence of 8-bit unsigned bytes</li>
           <li><code>string</code>: unicode character sequence</li>
         </ul>
-        
+
         <p>Primitive types have no specified attributes.</p>
-        
+
         <p>Primitive type names are also defined type names.  Thus, for
           example, the schema "string" is equivalent to:</p>
-        
+
         <source>{"type": "string"}</source>
 
       </section>
 
       <section id="schema_complex">
         <title>Complex Types</title>
-        
+
         <p>Avro supports six kinds of complex types: records, enums,
         arrays, maps, unions and fixed.</p>
 
         <section id="schema_record">
           <title>Records</title>
-          
+
 	  <p>Records use the type name "record" and support three attributes:</p>
 	  <ul>
 	    <li><code>name</code>: a JSON string providing the name
@@ -145,7 +145,7 @@
 	  <p>For example, a linked-list of 64-bit values may be defined with:</p>
 	  <source>
 {
-  "type": "record", 
+  "type": "record",
   "name": "LongList",
   "aliases": ["LinkedLongs"],                      // old name for this
   "fields" : [
@@ -155,10 +155,10 @@
 }
 	  </source>
 	</section>
-        
+
         <section>
           <title>Enums</title>
-          
+
 	  <p>Enums use the type name "enum" and support the following
 	  attributes:</p>
 	  <ul>
@@ -183,7 +183,7 @@
 }
 	  </source>
 	</section>
-        
+
         <section>
           <title>Arrays</title>
           <p>Arrays use the type name <code>"array"</code> and support
@@ -420,7 +420,7 @@
 	    <p>For example, the record schema</p>
 	    <source>
 	      {
-	      "type": "record", 
+	      "type": "record",
 	      "name": "test",
 	      "fields" : [
 	      {"name": "a", "type": "long"},
@@ -436,7 +436,7 @@
 	      sequence:</p>
 	    <source>36 06 66 6f 6f</source>
 	  </section>
-          
+
           <section id="enum_encoding">
             <title>Enums</title>
             <p>An enum is encoded by a <code>int</code>, representing
@@ -487,13 +487,13 @@
               value, followed by that many key/value pairs.  A block
               with count zero indicates the end of the map.  Each item
               is encoded per the map's value schema.</p>
-	    
+	
             <p>If a block's count is negative, its absolute value is used,
               and the count is followed immediately by a <code>long</code>
               block <em>size</em> indicating the number of bytes in the
               block.  This block size permits fast skipping through data,
               e.g., when projecting a record to a subset of its fields.</p>
-	    
+	
             <p>The blocked representation permits one to read and write
               maps larger than can be buffered in memory, since one can
               start writing items without knowing the full length of the
@@ -531,7 +531,7 @@
 
       <section id="json_encoding">
         <title>JSON Encoding</title>
-        
+
         <p>Except for unions, the JSON encoding is the same as is used
         to encode <a href="#schema_record">field default
         values</a>.</p>
@@ -547,7 +547,7 @@
           types (record, fixed or enum) the user-specified name is
           used, for other types the type name is used.</li>
         </ul>
-          
+
         <p>For example, the union
           schema <code>["null","string","Foo"]</code>, where Foo is a
           record name, would encode:</p>
@@ -666,7 +666,7 @@
         stored in the file, as JSON data (required).</li>
         <li><strong>avro.codec</strong> the name of the compression codec
         used to compress blocks, as a string.  Implementations
-        are required to support the following codecs: "null" and "deflate".  
+        are required to support the following codecs: "null" and "deflate".
         If codec is absent, it is assumed to be "null".  The codecs
         are described with more detail below.</li>
       </ul>
@@ -692,7 +692,7 @@
         <li>The file's 16-byte sync marker.</li>
       </ul>
           <p>Thus, each block's binary data can be efficiently extracted or skipped without
-          deserializing the contents.  The combination of block size, object counts, and 
+          deserializing the contents.  The combination of block size, object counts, and
           sync markers enable detection of corrupt blocks and help ensure data integrity.</p>
       <section>
       <title>Required Codecs</title>
@@ -704,7 +704,7 @@
         <section>
         <title>deflate</title>
         <p>The "deflate" codec writes the data block using the
-        deflate algorithm as specified in 
+        deflate algorithm as specified in
         <a href="http://www.isi.edu/in-notes/rfc1951.txt">RFC 1951</a>,
         and typically implemented using the zlib library.  Note that this
         format (unlike the "zlib format" in RFC 1950) does not have a
@@ -757,7 +757,7 @@
           <li>a <em>request</em>, a list of named,
             typed <em>parameter</em> schemas (this has the same form
             as the fields of a record declaration);</li>
-          <li>a <em>response</em> schema; </li> 
+          <li>a <em>response</em> schema; </li>
           <li>an optional union of declared <em>error</em> schemas.
 	    The <em>effective</em> union has <code>"string"</code>
 	    prepended to the declared union, to permit transmission of
@@ -1092,14 +1092,14 @@
           <ul>
             <li>the ordering of fields may be different: fields are
               matched by name.</li>
-            
+
             <li>schemas for fields with the same name in both records
               are resolved recursively.</li>
-            
+
             <li>if the writer's record contains a field with a name
               not present in the reader's record, the writer's value
               for that field is ignored.</li>
-            
+
             <li>if the reader's record schema has a field that
               contains a default value, and writer's schema does not
               have a field with the same name, then the reader should
@@ -1137,13 +1137,13 @@
             writer's schema is recursively resolved against it.  If none
             match, an error is signalled.</p>
         </li>
-          
+
         <li><strong>if writer's is a union, but reader's is not</strong>
           <p>If the reader's schema matches the selected writer's schema,
             it is recursively resolved against it.  If they do not
             match, an error is signalled.</p>
         </li>
-          
+
       </ul>
 
       <p>A schema's "doc" fields are ignored for the purposes of schema resolution.  Hence,
diff --git a/doc/src/content/xdocs/tabs.xml b/doc/src/content/xdocs/tabs.xml
index 0a532b5..54ac0a7 100644
--- a/doc/src/content/xdocs/tabs.xml
+++ b/doc/src/content/xdocs/tabs.xml
@@ -34,6 +34,6 @@
 
   <tab label="Project" href="http://avro.apache.org/" />
   <tab label="Wiki" href="http://wiki.apache.org/hadoop/Avro/" />
-  <tab label="Avro &AvroVersion; Documentation" dir="" />  
-  
+  <tab label="Avro &AvroVersion; Documentation" dir="" />
+
 </tabs>
diff --git a/doc/src/skinconf.xml b/doc/src/skinconf.xml
index fcd7933..3b92362 100644
--- a/doc/src/skinconf.xml
+++ b/doc/src/skinconf.xml
@@ -34,7 +34,7 @@ which will be used to configure the chosen Forrest skin.
   <search name="Avro" domain="avro.apache.org" provider="google"/>
 
   <!-- Disable the print link? If enabled, invalid HTML 4.0.1 -->
-  <disable-print-link>true</disable-print-link>  
+  <disable-print-link>true</disable-print-link>
   <!-- Disable the PDF link? -->
   <disable-pdf-link>false</disable-pdf-link>
   <!-- Disable the POD link? -->
@@ -52,8 +52,8 @@ which will be used to configure the chosen Forrest skin.
   <!-- Disable navigation icons on all external links? -->
   <disable-external-link-image>true</disable-external-link-image>
 
-  <!-- Disable w3c compliance links? 
-    Use e.g. align="center" to move the compliance links logos to 
+  <!-- Disable w3c compliance links?
+    Use e.g. align="center" to move the compliance links logos to
     an alternate location default is left.
     (if the skin supports it) -->
   <disable-compliance-links>true</disable-compliance-links>
@@ -105,7 +105,7 @@ which will be used to configure the chosen Forrest skin.
   <!-- Configure the TOC, i.e. the Table of Contents.
   @max-depth
    how many "section" levels need to be included in the
-   generated Table of Contents (TOC). 
+   generated Table of Contents (TOC).
   @min-sections
    Minimum required to create a TOC.
   @location ("page","menu","page,menu", "none")
@@ -115,7 +115,7 @@ which will be used to configure the chosen Forrest skin.
 
   <!-- Heading types can be clean|underlined|boxed  -->
   <headings type="clean"/>
-  
+
   <!-- The optional feedback element will be used to construct a
     feedback link in the footer with the page pathname appended:
     <a href="@href">{@to}</a>
@@ -125,15 +125,15 @@ which will be used to configure the chosen Forrest skin.
   </feedback>
     -->
   <!--
-    extra-css - here you can define custom css-elements that are 
-    a. overriding the fallback elements or 
-    b. adding the css definition from new elements that you may have 
+    extra-css - here you can define custom css-elements that are
+    a. overriding the fallback elements or
+    b. adding the css definition from new elements that you may have
        used in your documentation.
     -->
   <extra-css>
-    <!--Example of b. 
+    <!--Example of b.
         To define the css definition of a new element that you may have used
-        in the class attribute of a <p> node. 
+        in the class attribute of a <p> node.
         e.g. <p class="quote"/>
     -->
     p.quote {
@@ -162,27 +162,27 @@ which will be used to configure the chosen Forrest skin.
 
     <color name="heading" value="#a5b6c6"/>
     <color name="subheading" value="#CFDCED"/>
-        
+
     <color name="navstrip" value="#CFDCED" font="#000000" link="#000000" vlink="#000000" hlink="#000000"/>
     <color name="toolbox" value="#a5b6c6"/>
     <color name="border" value="#a5b6c6"/>
-        
-    <color name="menu" value="#F7F7F7" link="#000000" vlink="#000000" hlink="#000000"/>    
+
+    <color name="menu" value="#F7F7F7" link="#000000" vlink="#000000" hlink="#000000"/>
     <color name="dialog" value="#F7F7F7"/>
-            
+
     <color name="body"    value="#ffffff" link="#0F3660" vlink="#009999" hlink="#000066"/>
-    
-    <color name="table" value="#a5b6c6"/>    
-    <color name="table-cell" value="#ffffff"/>    
+
+    <color name="table" value="#a5b6c6"/>
+    <color name="table-cell" value="#ffffff"/>
     <color name="highlight" value="#ffff00"/>
     <color name="fixme" value="#cc6600"/>
     <color name="note" value="#006699"/>
     <color name="warning" value="#990000"/>
     <color name="code" value="#a5b6c6"/>
-        
+
     <color name="footer" value="#a5b6c6"/>
 -->
-  
+
   <!-- Forrest -->
 <!--
     <color name="header"    value="#294563"/>
@@ -194,28 +194,28 @@ which will be used to configure the chosen Forrest skin.
 
     <color name="heading" value="#294563"/>
     <color name="subheading" value="#4a6d8c"/>
-        
+
     <color name="navstrip" value="#cedfef" font="#0F3660" link="#0F3660" vlink="#0F3660" hlink="#000066"/>
     <color name="toolbox" value="#4a6d8c"/>
     <color name="border" value="#294563"/>
-    
-    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>    
+
+    <color name="menu" value="#4a6d8c" font="#cedfef" link="#ffffff" vlink="#ffffff" hlink="#ffcf00"/>
     <color name="dialog" value="#4a6d8c"/>
-            
+
     <color name="body" value="#ffffff"  link="#0F3660" vlink="#009999" hlink="#000066"/>
-    
-    <color name="table" value="#7099C5"/>    
-    <color name="table-cell" value="#f0f0ff"/>    
+
+    <color name="table" value="#7099C5"/>
+    <color name="table-cell" value="#f0f0ff"/>
     <color name="highlight" value="#ffff00"/>
     <color name="fixme" value="#cc6600"/>
     <color name="note" value="#006699"/>
     <color name="warning" value="#990000"/>
     <color name="code" value="#CFDCED"/>
-        
+
     <color name="footer" value="#cedfef"/>
 -->
 
-  <!-- Collabnet --> 
+  <!-- Collabnet -->
 <!--
     <color name="header"    value="#003366"/>
 
@@ -226,24 +226,24 @@ which will be used to configure the chosen Forrest skin.
 
     <color name="heading" value="#003366"/>
     <color name="subheading" value="#888888"/>
-    
+
     <color name="navstrip" value="#dddddd" font="#555555"/>
     <color name="toolbox" value="#dddddd" font="#555555"/>
     <color name="border" value="#999999"/>
-    
-    <color name="menu" value="#ffffff"/>    
+
+    <color name="menu" value="#ffffff"/>
     <color name="dialog" value="#eeeeee"/>
-            
+
     <color name="body"      value="#ffffff"/>
-    
-    <color name="table" value="#ccc"/>    
-    <color name="table-cell" value="#ffffff"/>   
+
+    <color name="table" value="#ccc"/>
+    <color name="table-cell" value="#ffffff"/>
     <color name="highlight" value="#ffff00"/>
     <color name="fixme" value="#cc6600"/>
     <color name="note" value="#006699"/>
     <color name="warning" value="#990000"/>
     <color name="code" value="#003366"/>
-        
+
     <color name="footer" value="#ffffff"/>
 -->
  <!-- Lenya using pelt-->
@@ -264,28 +264,28 @@ which will be used to configure the chosen Forrest skin.
     <color name="toolbox" value="#CFDCED" font="#000000"/>
 
     <color name="border" value="#999999"/>
-    <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff" current="#FFCC33" />    
+    <color name="menu" value="#4C6C8F" font="#ffffff" link="#ffffff" vlink="#ffffff" hlink="#ffffff" current="#FFCC33" />
     <color name="menuheading" value="#cfdced" font="#000000" />
     <color name="searchbox" value="#E5E4D9" font="#000000"/>
-    
+
     <color name="dialog" value="#CFDCED"/>
-    <color name="body" value="#ffffff" />            
-    
-    <color name="table" value="#ccc"/>    
-    <color name="table-cell" value="#ffffff"/>   
+    <color name="body" value="#ffffff" />
+
+    <color name="table" value="#ccc"/>
+    <color name="table-cell" value="#ffffff"/>
     <color name="highlight" value="#ffff00"/>
     <color name="fixme" value="#cc6600"/>
     <color name="note" value="#006699"/>
     <color name="warning" value="#990000"/>
     <color name="code" value="#003366"/>
-        
+
     <color name="footer" value="#E5E4D9"/>
 -->
   </colors>
- 
+
   <!-- Settings specific to PDF output. -->
   <pdf>
-    <!-- 
+    <!--
        Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
        folio, legal, ledger, letter, quarto, tabloid (default letter).
        Supported page orientations are portrait, landscape (default
@@ -326,7 +326,7 @@ which will be used to configure the chosen Forrest skin.
   <!-- Credits are typically rendered as a set of small clickable
     images in the page footer.
     Use box-location="alt" to move the credit to an alternate location
-    (if the skin supports it). 
+    (if the skin supports it).
   -->
   <credits>
     <credit box-location="alt">
diff --git a/lang/py/.gitignore b/lang/py/.gitignore
new file mode 100644
index 0000000..df3cd4d
--- /dev/null
+++ b/lang/py/.gitignore
@@ -0,0 +1,3 @@
+build/
+lib/
+userlogs/
diff --git a/lang/py/build.xml b/lang/py/build.xml
index 61c3f4c..5ef5214 100644
--- a/lang/py/build.xml
+++ b/lang/py/build.xml
@@ -17,7 +17,7 @@
 -->
 
 <project name="Avro" default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">
- 
+
   <!-- Load user's default properties. -->
   <property file="${user.home}/build.properties"/>
 
@@ -66,7 +66,7 @@
       </classpath>
     </typedef>
   </target>
-  
+
   <target name="ivy-download" unless="ivy.jar.found" >
     <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" dest="${ivy.jar}" usetimestamp="true" />
   </target>
@@ -79,13 +79,13 @@
       <fileset dir="${src.dir}">
         <exclude name="**/*.pyc"/>
         <exclude name="**/*.py~"/>
-      </fileset> 
+      </fileset>
     </copy>
     <copy todir="${build.dir}/test">
       <fileset dir="${test.dir}">
         <exclude name="**/*.pyc"/>
         <exclude name="**/*.py~"/>
-      </fileset> 
+      </fileset>
     </copy>
     <copy todir="${build.dir}/lib">
       <fileset dir="${lib.dir}" />
@@ -102,9 +102,9 @@
           toFile="${build.dir}/src/avro/ipc.py"
           overwrite="true">
       <filterset>
-        <filter token="HANDSHAKE_REQUEST_SCHEMA" 
+        <filter token="HANDSHAKE_REQUEST_SCHEMA"
           value="${handshake.request.json}"/>
-        <filter token="HANDSHAKE_RESPONSE_SCHEMA" 
+        <filter token="HANDSHAKE_RESPONSE_SCHEMA"
           value="${handshake.response.json}"/>
      </filterset>
     </copy>
diff --git a/lang/py/ivysettings.xml b/lang/py/ivysettings.xml
index 31de16e..22104c7 100644
--- a/lang/py/ivysettings.xml
+++ b/lang/py/ivysettings.xml
@@ -19,8 +19,8 @@
   <property name="m2-pattern" value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" override="false" />
   <resolvers>
     <chain name="repos">
-      <ibiblio name="central" m2compatible="true"/>   
-      <ibiblio name="apache-snapshots" m2compatible="true" root="https://repository.apache.org/content/groups/snapshots"/> 
+      <ibiblio name="central" m2compatible="true"/>
+      <ibiblio name="apache-snapshots" m2compatible="true" root="https://repository.apache.org/content/groups/snapshots"/>
       <filesystem name="local-maven2" m2compatible="true"> <!-- needed when building non-snapshot version for release -->
         <artifact pattern="${m2-pattern}"/>
         <ivy pattern="${m2-pattern}"/>
diff --git a/lang/py/src/avro/schema.py b/lang/py/src/avro/schema.py
index f946d0a..6a7fbbb 100644
--- a/lang/py/src/avro/schema.py
+++ b/lang/py/src/avro/schema.py
@@ -443,7 +443,7 @@ class EnumSchema(NamedSchema):
       fail_msg = 'Enum Schema requires a JSON array for the symbols property.'
       raise AvroException(fail_msg)
     elif False in [isinstance(s, basestring) for s in symbols]:
-      fail_msg = 'Enum Schems requires All symbols to be JSON strings.'
+      fail_msg = 'Enum Schema requires all symbols to be JSON strings.'
       raise AvroException(fail_msg)
     elif len(set(symbols)) < len(symbols):
       fail_msg = 'Duplicate symbol: %s' % symbols
@@ -770,12 +770,13 @@ def make_avsc_object(json_data, names=None):
 # TODO(hammer): make method for reading from a file?
 def parse(json_string):
   """Constructs the Schema from the JSON text."""
-  # TODO(hammer): preserve stack trace from JSON parse
   # parse the JSON
   try:
     json_data = json.loads(json_string)
-  except:
-    raise SchemaParseException('Error parsing JSON: %s' % json_string)
+  except Exception, e:
+    import sys
+    raise SchemaParseException('Error parsing JSON: %s, error = %s'
+                               % (json_string, e)), None, sys.exc_info()[2]
 
   # Initialize the names object
   names = Names()
diff --git a/lang/py/test/test_schema.py b/lang/py/test/test_schema.py
index 204d1b1..00e2a05 100644
--- a/lang/py/test/test_schema.py
+++ b/lang/py/test/test_schema.py
@@ -477,5 +477,19 @@ class TestSchema(unittest.TestCase):
         self.assertEqual(type(v), list)
     self.assertEqual(correct,len(OTHER_PROP_EXAMPLES))
 
+  def test_exception_is_not_swallowed_on_parse_error(self):
+    print_test_name('TEST EXCEPTION NOT SWALLOWED ON PARSE ERROR')
+
+    try:
+        schema.parse('/not/a/real/file')
+        caught_exception = False
+    except schema.SchemaParseException, e:
+        expected_message = 'Error parsing JSON: /not/a/real/file, error = ' \
+                           'No JSON object could be decoded'
+        self.assertEqual(expected_message, e.args[0])
+        caught_exception = True
+
+    self.assertTrue(caught_exception, 'Exception was not caught')
+
 if __name__ == '__main__':
   unittest.main()
diff --git a/lang/py3/.gitignore b/lang/py3/.gitignore
new file mode 100644
index 0000000..777f026
--- /dev/null
+++ b/lang/py3/.gitignore
@@ -0,0 +1,6 @@
+avro/HandshakeRequest.avsc
+avro/HandshakeResponse.avsc
+avro/VERSION.txt
+avro/tests/interop.avsc
+avro_python3.egg-info/
+dist/
diff --git a/lang/py3/scripts/avro b/lang/py3/scripts/avro
old mode 100644
new mode 100755
diff --git a/pom.xml b/pom.xml
index f9a5322..a243fd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 
   <groupId>org.apache.avro</groupId>
   <artifactId>avro-toplevel</artifactId>
-  <version>1.8.0</version>
+  <version>1.8.1</version>
   <packaging>pom</packaging>
 
   <name>Apache Avro Toplevel</name>
@@ -225,8 +225,24 @@
                 <exclude>**/.git/**</exclude>
                 <exclude>**/.gitignore</exclude>
                 <!-- build or test files -->
-                <!-- <exclude>**/target/**</exclude> -->
                 <exclude>**/*.log</exclude>
+                <exclude>build/**</exclude>
+                <exclude>doc/build/**</exclude>
+                <exclude>lang/java/archetypes/**</exclude>
+                <exclude>lang/java/**/target/**</exclude>
+                <exclude>lang/js/node_modules/**</exclude>
+                <exclude>lang/csharp/build/doc/html/**</exclude>
+                <exclude>lang/c++/doc/html/**</exclude>
+                <exclude>lang/c++/build/**</exclude>
+                <exclude>lang/perl/pm_to_blib</exclude>
+                <exclude>lang/perl/blib/**/.exists</exclude>
+                <exclude>lang/py/build/**</exclude>
+                <exclude>lang/py3/avro_python3.egg-info/**</exclude>
+                <exclude>lang/ruby/Gemfile.lock</exclude>
+                <exclude>lang/ruby/avro.gemspec</exclude>
+                <exclude>lang/ruby/.gem/**</exclude>
+                <exclude>lang/ruby/pkg/**</exclude>
+                <exclude>lang/ruby/.bundle/**</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Player.java</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output-string/avro/examples/baseball/Position.java</exclude>
                 <exclude>lang/java/tools/src/test/compiler/output/Player.java</exclude>
@@ -254,14 +270,24 @@
                 <exclude>lang/csharp/Avro.sln</exclude> <!-- visual studio -->
                 <!-- build-related files -->
                 <exclude>BUILD.txt</exclude>
-                <exclude>share/VERSION.txt</exclude>
+                <exclude>**/VERSION.txt</exclude>
+                <exclude>**/dependency-reduced-pom.xml</exclude>
                 <exclude>lang/perl/.shipit</exclude>
+                <exclude>lang/perl/inc/Module/Install/*.pm</exclude>
+                <exclude>lang/perl/inc/Module/Install.pm</exclude>
+                <exclude>lang/perl/Makefile*</exclude>
+                <exclude>lang/perl/META.yml</exclude>
+                <exclude>lang/perl/MYMETA.yml</exclude>
+                <exclude>lang/py/userlogs/**</exclude>
                 <exclude>lang/c/src/avro-c.pc.in</exclude>
                 <exclude>lang/ruby/Manifest</exclude>
                 <exclude>lang/java/tools/userlogs/**</exclude>
                 <exclude>lang/java/mapred/userlogs/**</exclude>
                 <exclude>lang/java/archetypes/avro-service-archetype/src/test/integration/projects/basic/goal.txt</exclude>
-                <exclude>lang/java/tools/dependency-reduced-pom.xml</exclude>
+                <exclude>lang/js/test/mocha.opts</exclude>
+                <exclude>lang/csharp/TestResult.xml</exclude>
+                <exclude>lang/csharp/src/apache/*/obj/**/*.csproj.FilesWrittenAbsolute.txt</exclude>
+                <exclude>lang/js/coverage/**</exclude>
                 <!-- text documentation files -->
                 <exclude>CHANGES.txt</exclude>
                 <exclude>DIST_README.txt</exclude>
@@ -282,6 +308,10 @@
                 <exclude>lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/protovis-r3.2.js</exclude>
                 <exclude>lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/g.bar.js</exclude>
                 <exclude>lang/java/ipc/src/main/java/org/apache/avro/ipc/stats/static/jquery-1.4.2.min.js</exclude>
+                <!-- License files -->
+                <exclude>lang/java/tools/src/main/resources/META-INF/cddl-1.0.text</exclude>
+                <exclude>lang/java/tools/src/main/resources/META-INF/cddl-1.1.text</exclude>
+                <exclude>lang/java/tools/src/main/resources/META-INF/mpl-2.0.text</exclude>
               </excludes>
             </configuration>
           </plugin>
diff --git a/share/VERSION.txt b/share/VERSION.txt
index afa2b35..b9268da 100644
--- a/share/VERSION.txt
+++ b/share/VERSION.txt
@@ -1 +1 @@
-1.8.0
\ No newline at end of file
+1.8.1
\ No newline at end of file
diff --git a/share/githooks/commit-msg b/share/githooks/commit-msg
new file mode 100644
index 0000000..6a50adc
--- /dev/null
+++ b/share/githooks/commit-msg
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Client side pre-commit hook to assist the committers to ensure the commit messages
+# follow the chosen convention.
+
+LOGMESSAGE_FORMAT='^AVRO-[1-9][0-9]*: .*'
+COMMIT_MSG_FILE=$1
+
+echo "=========================="
+echo "Doing basic commit validation"
+
+echo -n "= Single line commit message: "
+COMMIT_LINES=$(cat ${COMMIT_MSG_FILE} | wc -l)
+if [ ${COMMIT_LINES} -eq 1 ];
+then
+  echo "Ok"
+else
+  echo "Fail: Found ${COMMIT_LINES} lines"
+  exit 1
+fi
+
+echo -n "= Commit message format: "
+if grep -q "${LOGMESSAGE_FORMAT}" ${COMMIT_MSG_FILE}
+then
+    echo "Ok"
+else
+    echo "Fail: Must be in this format: ${LOGMESSAGE_FORMAT}"
+    exit 1
+fi
+
+ISSUE_ID=$(head -1 ${COMMIT_MSG_FILE} | cut -d':' -f1)
+
+echo -n "= CHANGES.txt mentions ${ISSUE_ID}: "
+if grep -q "${ISSUE_ID}[^0-9]" CHANGES.txt
+then
+    echo "Ok"
+else
+    echo "Fail"
+    exit 1
+fi
+echo "=========================="
+
+exit 0
diff --git a/share/test/interop/bin/test_rpc_interop.sh b/share/test/interop/bin/test_rpc_interop.sh
index 75681be..20ee77f 100755
--- a/share/test/interop/bin/test_rpc_interop.sh
+++ b/share/test/interop/bin/test_rpc_interop.sh
@@ -15,13 +15,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set -e						  # exit on error
+set -e                          # exit on error
 
-cd `dirname "$0"`/../../../..			  # connect to root
+cd `dirname "$0"`/../../../..   # connect to root
 
 VERSION=`cat share/VERSION.txt`
 
-#set -x						  # echo commands
+#set -x                          # echo commands
 
 java_client="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcsend"
 java_server="java -jar lang/java/tools/target/avro-tools-$VERSION.jar rpcreceive"
@@ -32,7 +32,7 @@ py_server="python lang/py/build/src/avro/tool.py rpcreceive"
 ruby_client="ruby -rubygems -Ilang/ruby/lib lang/ruby/test/tool.rb rpcsend"
 ruby_server="ruby -rubygems -Ilang/ruby/lib lang/ruby/test/tool.rb rpcreceive"
 
-export PYTHONPATH=lang/py/build/src	  # path to avro Python module
+export PYTHONPATH=lang/py/build/src      # path to avro Python module
 
 clients=("$java_client" "$py_client" "$ruby_client")
 servers=("$java_server" "$py_server" "$ruby_server")
@@ -42,41 +42,41 @@ proto=share/test/schemas/simple.avpr
 portfile=/tmp/interop_$$
 
 function cleanup() {
-    rm -rf $portfile
-    for job in `jobs -p` ; do kill $job; done
+  rm -rf $portfile
+  for job in `jobs -p` ; do kill $job; done
 }
 
 trap 'cleanup' EXIT
 
 for server in "${servers[@]}"
 do
-    for msgDir in share/test/interop/rpc/*
+  for msgDir in share/test/interop/rpc/*
+  do
+    msg=`basename "$msgDir"`
+    for c in ${msgDir}/*
     do
-	msg=`basename "$msgDir"`
-	for c in ${msgDir}/*
-	do
-	    echo TEST: $c
-	    for client in "${clients[@]}"
-	    do
+      echo TEST: $c
+      for client in "${clients[@]}"
+      do
         rm -rf $portfile
-		$server http://127.0.0.1:0/ $proto $msg -file $c/response.avro \
-		    > $portfile &
+        $server http://127.0.0.1:0/ $proto $msg -file $c/response.avro \
+            > $portfile &
         count=0
         while [ ! -s $portfile ]
         do
-            sleep 1
-            if [ $count -ge 10 ]
-            then
-                echo $server did not start.
-                exit 1
-            fi
-            count=`expr $count + 1`
+          sleep 1
+          if [ $count -ge 10 ]
+          then
+            echo $server did not start.
+            exit 1
+          fi
+          count=`expr $count + 1`
         done
-		read ignore port < $portfile
-	    	$client http://127.0.0.1:$port $proto $msg -file $c/request.avro
-		wait
-	    done
-	done
+        read ignore port < $portfile
+        $client http://127.0.0.1:$port $proto $msg -file $c/request.avro
+        wait
+        done
+    done
     done
 done
 
diff --git a/share/test/schemas/simple.avpr b/share/test/schemas/simple.avpr
index 7165ad8..c1f2a4c 100644
--- a/share/test/schemas/simple.avpr
+++ b/share/test/schemas/simple.avpr
@@ -40,7 +40,7 @@
 
      "hello": {
          "doc": "Send a greeting",
-         "request": [{"name": "greeting", "type": "string"}],
+         "request": [{"name": "greeting", "type": "string", "aliases" : [ "salute" ], "customProp" : "customValue"}],
          "response": "string"
      },
 
diff --git a/share/test/schemas/specialtypes.avdl b/share/test/schemas/specialtypes.avdl
index 623e016..1be3aab 100644
--- a/share/test/schemas/specialtypes.avdl
+++ b/share/test/schemas/specialtypes.avdl
@@ -95,4 +95,12 @@ protocol LetsBreakIt {
       string value;
     }
 
+    record TopLevelDomainNames {
+      string org;
+      string avro;
+      string com;
+      string net;
+      string nl;
+    }
+
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-avro.git



More information about the debian-med-commit mailing list