From avro-commitsjamesbrown@example.org Tue Oct 06 17:39:08 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 88844 invoked from network); 6 Oct 2009 17:39:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Oct 2009 17:39:08 -0000 Received: (qmail 52567 invoked by uid 500); 6 Oct 2009 17:39:08 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 52541 invoked by uid 500); 6 Oct 2009 17:39:07 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 52531 invoked by uid 99); 6 Oct 2009 17:39:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 17:39:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 17:39:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 68DBF238889D; Tue, 6 Oct 2009 17:38:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822368 - in /hadoop/avro/trunk: CHANGES.txt build.xml src/doc/content/xdocs/spec.xml src/doc/content/xdocs/tabs.xml Date: Tue, 06 Oct 2009 17:38:43 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Tue Oct 6 17:38:42 2009 New Revision: 822368 URL: http://svn.apache.org/viewvc?rev=822368&view=rev Log: AVRO-133. Update version number in specfication document and documentation tab automatically from build version. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml hadoop/avro/trunk/src/doc/content/xdocs/spec.xml hadoop/avro/trunk/src/doc/content/xdocs/tabs.xml Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=822368&r1=822367&r2=822368&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Tue Oct 6 17:38:42 2009 @@ -52,6 +52,9 @@ multiple instances without flushing or explicitly resetting the codec between each instance. (Thiruvalluvan M. G. via cutting) + AVRO-133. Update version number in specification document and + documentation tab automatically from build version. (cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=822368&r1=822367&r2=822368&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Tue Oct 6 17:38:42 2009 @@ -430,6 +430,9 @@ </target> <target name="doc" depends="forrest.check,javadoc,pydoc,cdoc" description="Generate forrest-based documentation. To use, specify -Dforrest.home=&lt;base of Apache Forrest installation&gt; on the command line." if="forrest.home"> + <echo file="${build.dir}/avro.ent" append="false"> + &lt;!ENTITY AvroVersion "${version}"&gt; + </echo> <exec executable="${forrest.home}/bin/forrest" failonerror="true"> <env key="JAVA_HOME" value="${java5.home}"/> <arg value="-Dproject.content-dir=src/doc"/> Modified: hadoop/avro/trunk/src/doc/content/xdocs/spec.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/doc/content/xdocs/spec.xml?rev=822368&r1=822367&r2=822368&view=diff ============================================================================== --- hadoop/avro/trunk/src/doc/content/xdocs/spec.xml (original) +++ hadoop/avro/trunk/src/doc/content/xdocs/spec.xml Tue Oct 6 17:38:42 2009 @@ -15,10 +15,14 @@ See the License for the specific language governing permissions and limitations under the License. --> -<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> +<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd" [ + <!ENTITY % avro-entities PUBLIC "-//Apache//ENTITIES Avro//EN" + "../../../../build/avro.ent"> + %avro-entities; +]> <document> <header> - <title>Avro 1.0 Specification</title> + <title>Avro &AvroVersion; Specification</title> </header> <body> Modified: hadoop/avro/trunk/src/doc/content/xdocs/tabs.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/doc/content/xdocs/tabs.xml?rev=822368&r1=822367&r2=822368&view=diff ============================================================================== --- hadoop/avro/trunk/src/doc/content/xdocs/tabs.xml (original) +++ hadoop/avro/trunk/src/doc/content/xdocs/tabs.xml Tue Oct 6 17:38:42 2009 @@ -15,7 +15,11 @@ See the License for the specific language governing permissions and limitations under the License. --> -<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "http://forrest.apache.org/dtd/tab-cocoon-v11.dtd"> +<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "http://forrest.apache.org/dtd/tab-cocoon-v11.dtd" [ + <!ENTITY % avro-entities PUBLIC "-//Apache//ENTITIES Avro//EN" + "../../../../build/avro.ent"> + %avro-entities; +]> <tabs software="Avro" title="Avro" @@ -30,6 +34,6 @@ <tab label="Project" href="http://hadoop.apache.org/avro/" /> <tab label="Wiki" href="http://wiki.apache.org/hadoop/Avro/" /> - <tab label="Avro 1.1.0 Documentation" dir="" /> + <tab label="Avro &AvroVersion; Documentation" dir="" /> </tabs> From avro-commitsjamesbrown@example.org Tue Oct 06 21:32:57 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 79797 invoked from network); 6 Oct 2009 21:32:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Oct 2009 21:32:57 -0000 Received: (qmail 97260 invoked by uid 500); 6 Oct 2009 21:32:57 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 97239 invoked by uid 500); 6 Oct 2009 21:32:57 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 97228 invoked by uid 99); 6 Oct 2009 21:32:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 21:32:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 21:32:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CC5F3238889D; Tue, 6 Oct 2009 21:32:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822518 - in /hadoop/avro/trunk: CHANGES.txt build.xml Date: Tue, 06 Oct 2009 21:32:01 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Tue Oct 6 21:32:01 2009 New Revision: 822518 URL: http://svn.apache.org/viewvc?rev=822518&view=rev Log: AVRO-131. Permit specification of JUnit test output format. Contributed by Giridharan Kesavan. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=822518&r1=822517&r2=822518&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Tue Oct 6 21:32:01 2009 @@ -55,6 +55,9 @@ AVRO-133. Update version number in specification document and documentation tab automatically from build version. (cutting) + AVRO-131. Permit specification of JUnit test output format. + (Giridharan Kesavan via cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=822518&r1=822517&r2=822518&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Tue Oct 6 21:32:01 2009 @@ -53,6 +53,7 @@ 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.java.build.dir" value="${build.dir}/test"/> @@ -273,7 +274,7 @@ <sysproperty key="test.dir" value="${test.java.build.dir}"/> <sysproperty key="test.validate" value="${test.validate}"/> <classpath refid="test.java.classpath"/> - <formatter type="plain" /> + <formatter type="${test.junit.output.format}"/> <batchtest todir="${test.java.build.dir}" unless="testcase"> <fileset dir="@{files.location}" includes="@{tests.pattern}" From avro-commitsjamesbrown@example.org Wed Oct 07 18:22:48 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 39158 invoked from network); 7 Oct 2009 18:22:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Oct 2009 18:22:48 -0000 Received: (qmail 69142 invoked by uid 500); 7 Oct 2009 18:22:48 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 69116 invoked by uid 500); 7 Oct 2009 18:22:48 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Delivered-To: moderator for jamesbrown@example.org Received: (qmail 65974 invoked by uid 99); 7 Oct 2009 18:21:08 -0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,OBSCURED_EMAIL X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822821 - in /hadoop/avro/site: author/content/xdocs/credits.xml publish/credits.html publish/credits.pdf Date: Wed, 07 Oct 2009 18:20:44 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sbanacho Date: Wed Oct 7 18:20:43 2009 New Revision: 822821 URL: http://svn.apache.org/viewvc?rev=822821&view=rev Log: adding sbanacho to list of committers Modified: hadoop/avro/site/author/content/xdocs/credits.xml hadoop/avro/site/publish/credits.html hadoop/avro/site/publish/credits.pdf Modified: hadoop/avro/site/author/content/xdocs/credits.xml URL: http://svn.apache.org/viewvc/hadoop/avro/site/author/content/xdocs/credits.xml?rev=822821&r1=822820&r2=822821&view=diff ============================================================================== --- hadoop/avro/site/author/content/xdocs/credits.xml (original) +++ hadoop/avro/site/author/content/xdocs/credits.xml Wed Oct 7 18:20:43 2009 @@ -37,7 +37,7 @@ <tr> <td>sharadag</td> <td>Sharad Agarwal</td> - <td>Yahoo Inc.</td> + <td>Yahoo! Inc.</td> <td>python</td> <td>+5.5</td> </tr> @@ -50,6 +50,14 @@ <td>-8</td> </tr> + <tr> + <td>sbanacho</td> + <td>Scott Banachowski</td> + <td>Yahoo! Inc.</td> + <td>c++</td> + <td>-8</td> + </tr> + </table> </section> Modified: hadoop/avro/site/publish/credits.html URL: http://svn.apache.org/viewvc/hadoop/avro/site/publish/credits.html?rev=822821&r1=822820&r2=822821&view=diff ============================================================================== --- hadoop/avro/site/publish/credits.html (original) +++ hadoop/avro/site/publish/credits.html Wed Oct 7 18:20:43 2009 @@ -212,7 +212,7 @@ <td colspan="1" rowspan="1">sharadag</td> <td colspan="1" rowspan="1">Sharad Agarwal</td> - <td colspan="1" rowspan="1">Yahoo Inc.</td> + <td colspan="1" rowspan="1">Yahoo! Inc.</td> <td colspan="1" rowspan="1">python</td> <td colspan="1" rowspan="1">+5.5</td> @@ -229,12 +229,23 @@ </tr> + +<tr> + +<td colspan="1" rowspan="1">sbanacho</td> + <td colspan="1" rowspan="1">Scott Banachowski</td> + <td colspan="1" rowspan="1">Yahoo! Inc.</td> + <td colspan="1" rowspan="1">c++</td> + <td colspan="1" rowspan="1">-8</td> + +</tr> + </table> </div> -<a name="N10089"></a><a name="Contributors"></a> +<a name="N100A5"></a><a name="Contributors"></a> <h2 class="h3">Contributors</h2> <div class="section"> <p>A list of Avro contributors and their contributions is available from @@ -244,7 +255,7 @@ </div> -<a name="N10097"></a><a name="Emeriti"></a> +<a name="N100B3"></a><a name="Emeriti"></a> <h2 class="h3">Emeriti</h2> <div class="section"> <p>Contributors who are no longer active on Avro are:</p> Modified: hadoop/avro/site/publish/credits.pdf URL: http://svn.apache.org/viewvc/hadoop/avro/site/publish/credits.pdf?rev=822821&r1=822820&r2=822821&view=diff ============================================================================== --- hadoop/avro/site/publish/credits.pdf (original) +++ hadoop/avro/site/publish/credits.pdf Wed Oct 7 18:20:43 2009 @@ -58,10 +58,10 @@ >> endobj 14 0 obj -<< /Length 1540 /Filter [ /ASCII85Decode /FlateDecode ] +<< /Length 1727 /Filter [ /ASCII85Decode /FlateDecode ] >> stream -GatUu9lK&M&;KZQ'teZ*D&ADpQ[6iPRme.GU2>9,\ihIMCo`YoP`d'Rrq]M*APtE<O`5mPU!+ZmStTLh_[jr0r=]El^^)JMM[4,8#XmqoJL".>(l9Dn)-H=ChsV,(&+2,gT>,`SpA;L:10M?ss+'4o`Q.*"5@rU'Ip2KQ0nFp25WXfb'OcfKbeVE]O2Zlt?4%83k8hm*&L>#]o&2H3m4pKb_bjH!e>Ae>Rf$iI^9ZNToo[qR[Z_:;OnqqX%f^Y];o"J%<]M^ocJJb6CAE3gHYJ&\TBa.1G#pgTTF$>Z@U2bEA3[`=5N74uSNfJkLHkN/#bYkHD:4AB%QF\EMI7WMU(;AnbB0B$;*uNES&8d">;-<+6:m(QEW[bl8<JRc;>FV:4;a:"A.hg[e1hEob'buN%QQVg<68u\k24W7YKAk10al"_0U]io*'GI=I$l@b3$HH/1L.48Z?hO0X/gfA*%$l>K#=I*-s5cVM/WMV3oe`Nqs8Z0Aln]!Z[oe8IDQ_sUiQq^$^#O\KAI^+hr2mp[jGs!-"VJVX]L:TaigdoNC3:7FP@m4E3NN^!cX#74Js2p>d4%#3c*OQ!Z0ZqjuOrHlM4#\5H3SV[<MkJjdr8%^EE2O</5TC;\pF/`q]qK5FgY6[:0<dA=daLFoeLibuR&sFnBTuFE2D8S=`XTEs`C]$ZuGOlH+n0$Vkp*\j5!Pq?ce:(RtP$eYt.abjB>qqkO$a+R-jJ/Mo5!>kK_7krPA5k7B>R>'OhY>,24%$;WQ`SS^@4*?=[aHJ#+c/M/=A3J>qa)VuCDeuSk]gln#SB:IFYl)q#pWaEpaS<3"I888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4%f^CY2gs!l-Qe:0OZ7:9WQDh>#O\9V"Ptb\H+=O_T"K?qEN/BQ^c2r(&!EY0Zg'IenHJ$)]u-\9f+`f4TSchB1R'<hDqdnZZNje%3hqY8%OUo2K@@0#;OBM$b@S4NV8Z[aBIoS&P`ZQ`Hc!WobbThOoJ\ef#8gQ@"5 3dVOR,3')i1R8q"+A(<%D5a-K1d<]WH=\VG,#aJQO]/<,2`;pgT-P\5P2O2`Wfe1F.MW6Nce4dC@N^j9KZB=t+TrBA2nh`[0GrCoJgIQ]AnjEb)$h.Qd/FpA,X_KYpe([lJgUC*e^0I-sZcdCRYfNln1<FD)A""4u94:j#2mV.uWb,NBi6P2,TiMDW,GIM50N"P1!Jt=-=r-s+!E9OX#B/OG.'IaDEXPR`:8:oV53Jj4puG]fTc=[lHDB+bh8apjo-V5@[<Bfh6k!3s$\in;/Z*-Z4??F1[];ml,c4FB*u%_cc/eOjQhF\G888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4t`BdbR,Ih*d-scu+<OR%=^=j$JmT(2O9C2cK^fJ&4H!2O4A@as0FcG['aWan_bGk:kj')n/TR<\dnBc+!u4T.&3n&VlnAF@9UnBYut(JZ?7j&\"YH_6jZcVq\HYfSX+IVGZYVD(F,MXJ$=TMupC;,E.B$^4):AG%Y[7?SP!HKqh2+el##p^KDEe?2M1d1iI[\oM;'Y6b2X-p<YQF$Ie5$Y,ukJBC_FlXnRqW!?^h%!!~> +GatUu?#uc!'L:RS/(CKb:)X9BIF5MLh<]5rG,K3TdcpIVfYjYp+U+C[m]Weo!Q(/]C7It0!mu^KO3!IQ]j!+,*[Dp<#AEqG#gd0L:nYQ0M?83$YRm!pT]I6noo@u)kaM)=r4DiR^JCm[.E_DKDm]GLpon$$Vdo&fO,GnSA69.h=;,[K_@T@>,j8t4qr4cm01U](pDr.T'$Om5bM/A.[7uD1hS'd$O6(=#YH%6FqYSE-Wuk7c5MJa6=9\OoVqV+#,g;An\lbN-MOJo;9Y$GW;=&!"d6DsPZZEVt_%D_VNeh@<l6>!+]>kTL):7HnNHaH)o0<in3o%V0'0QRu+qXr;;J)X6AQ!(/5+/08PW(Kja<W]_%TN4d<\ret;H/ih&Kdd"@%u'gP9XTNPBYP#pZ3luR$>Ne*+@!J9q8';j!r<[3F&9I`oRJo`8t8fA%m<o&6B]'Sb*Ms,2X^.*2hMkSt$cDPFT;/k+OG1%ckPR_ic!ZWmZ=d4jT9ICXCI_5t[b?`MmrNYn0)kLBk3^R.62a7]SDIa(gm]DREdkW[c7O/i4("_7U54j'A`@Qj6ADK;W)8e-VUOo#%?]+@t&LA^6K[=:_9H3%==5NP%C#8g#Q4:Is=1o#!L;@M^#>j'\U9_ssn[(s@Q/!5]&]$(UQ4=oC0>8,pN2:/2;>_*eaqjB]2+[0KeDjM^g"Ve^E]d.RWOJj,fY;p\e<g:[.7n:3D=1O]Bs.qegRZ#8MM[rE"`j!d(eJ=1Q=V3MrjH*C752TF$#SAtiZn:,SmM2Sif2rSBk<jO]sZuk=Z&%E7nb4sY%ok1q^o,e0;^LeuYiG'H2ZY$kWDBg_DZ2t<S\Cq/[nu^W+h`["lm"8nNL6kqUo^'DW"47rKgM!`Lk2unb?P4^Lo1:nF*Ra(e">4A45b!fP5:^C_@+m28qm\1UkBhp#Cd:.9\Tl_?*9BIa!Qc0AgLrdk<Ab'Fo3"m"XT@5d#3B."EKg]2#m=hpCkDf USUKG?g@*HnNMSaN$6U>K@iN^.6H),fB#St.O[d;2(cd\8;6`i,C8YlTn2dXHc$9#2##5[662rR1,Ngom*oCR>L<j%*cZfEb:AGT:nS4OhGh@YkXRn-He(=rO;$"KM$/8u3=*\ZA#0YDu5RhX<G:gS=o&"OUd2i^/I<ZnK,:tlr$"R`ICbt_=4*sem(#t!J)i;D1$6UW>C7EZ:l=rZ9*`-I^G[Z_(e8U3`#fV&BL=1G&m[fHMQqT_C@6iT+FOW=qWZljP<;ArNPj-4L#\hmPX]HK5l]cC?7JFQH45=nDQITr=5E?b`G5Ke7X`'kElf"Mj->DFp8Ft%48aZ$!38MPL40)*Q>ibcZH_W"jrUCIOoI@#S0jP.,9UE%T/.?YuZp1laH4IJRDs4J'*5%+\2JAJ`r[J\F:MIQ[Rr!C,b&J\+)\cISpL0[.C#q0c)b;4iOm6OQ0C0*(CB5@qQ$_[.]P[7;6[Lf6X?Z(BCm,Rr]ArS]YC#92*dQ3_G,6'+bu0rd^J`5OJCD)#TUH.C8QXQ2Thfb$5`sK2X8o-:UKE=_h4(.dEVEg4*(`GO[/1N;,$Cho\67DN3V6kbM'Y+0&WAYcFdY`[E..1OL%RVt8X%#0nRe9k[;+q%l2#\Tb6teklF_S!379<4Tqn12QZ#=(fig%)?R[A?&Iee!*%anHm71OdM<=RfJ$.YPF3pM(a:Ht8l*"PHCpt>nRX:CPEDe.&CU1D"]`/!LRi6M~> endstream endobj 15 0 obj @@ -81,7 +81,7 @@ 17 0 obj << /Type /Annot /Subtype /Link -/Rect [ 416.304 496.332 433.632 484.332 ] +/Rect [ 416.304 464.832 433.632 452.832 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (https://issues.apache.org/jira/secure/ConfigureReport.jspa?versionId=-1&issueStatus=all&selectedProjectId=12310911&reportKey=com.sourcelabs.jira.plugin.report.contributions%3Acontributionreport&Next=Next) @@ -172,13 +172,13 @@ 11 0 obj << /S /GoTo -/D [15 0 R /XYZ 85.0 525.666 null] +/D [15 0 R /XYZ 85.0 494.166 null] >> endobj 13 0 obj << /S /GoTo -/D [15 0 R /XYZ 85.0 473.332 null] +/D [15 0 R /XYZ 85.0 441.832 null] >> endobj 18 0 obj @@ -189,32 +189,32 @@ xref 0 27 0000000000 65535 f -0000004313 00000 n -0000004378 00000 n -0000004470 00000 n +0000004500 00000 n +0000004565 00000 n +0000004657 00000 n 0000000015 00000 n 0000000071 00000 n 0000000588 00000 n 0000000708 00000 n 0000000747 00000 n -0000004593 00000 n +0000004780 00000 n 0000000882 00000 n -0000004656 00000 n +0000004843 00000 n 0000001019 00000 n -0000004722 00000 n +0000004909 00000 n 0000001154 00000 n -0000002787 00000 n -0000002910 00000 n -0000002937 00000 n -0000004788 00000 n -0000003294 00000 n -0000003445 00000 n -0000003623 00000 n -0000003757 00000 n -0000003870 00000 n -0000003980 00000 n -0000004088 00000 n -0000004204 00000 n +0000002974 00000 n +0000003097 00000 n +0000003124 00000 n +0000004975 00000 n +0000003481 00000 n +0000003632 00000 n +0000003810 00000 n +0000003944 00000 n +0000004057 00000 n +0000004167 00000 n +0000004275 00000 n +0000004391 00000 n trailer << /Size 27 @@ -222,5 +222,5 @@ /Info 4 0 R >> startxref -4839 +5026 %%EOF From avro-commitsjamesbrown@example.org Wed Oct 07 18:36:59 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 50373 invoked from network); 7 Oct 2009 18:36:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Oct 2009 18:36:59 -0000 Received: (qmail 93774 invoked by uid 500); 7 Oct 2009 18:36:59 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 93752 invoked by uid 500); 7 Oct 2009 18:36:59 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 93742 invoked by uid 99); 7 Oct 2009 18:36:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2009 18:36:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2009 18:36:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4BC7E2388864; Wed, 7 Oct 2009 18:36:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822827 - in /hadoop/avro/trunk: ./ src/doc/content/xdocs/ src/java/org/apache/avro/file/ src/py/avro/ Date: Wed, 07 Oct 2009 18:36:34 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed Oct 7 18:36:33 2009 New Revision: 822827 URL: http://svn.apache.org/viewvc?rev=822827&view=rev Log: AVRO-134. Update data file format specification to include reserved metadata keys 'codec' and 'sync'. Contributed by Thiruvalluvan M. G. Added: hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileConstants.java Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/doc/content/xdocs/spec.xml hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileWriter.java hadoop/avro/trunk/src/py/avro/io.py Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=822827&r1=822826&r2=822827&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Wed Oct 7 18:36:33 2009 @@ -58,6 +58,10 @@ AVRO-131. Permit specification of JUnit test output format. (Giridharan Kesavan via cutting) + AVRO-134. Update data file format specification to include + reserved metadata keys "codec" and "sync". The only codec + currently defined is "null". (Thiruvalluvan M. G. via cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/src/doc/content/xdocs/spec.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/doc/content/xdocs/spec.xml?rev=822827&r1=822826&r2=822827&view=diff ============================================================================== --- hadoop/avro/trunk/src/doc/content/xdocs/spec.xml (original) +++ hadoop/avro/trunk/src/doc/content/xdocs/spec.xml Wed Oct 7 18:36:33 2009 @@ -593,7 +593,12 @@ <li><strong>count</strong> contains the number of objects in the file as a decimal ASCII string.</li> <li><strong>codec</strong> the name of the compression codec - used to compress blocks.</li> + used to compress blocks, as a string. The only value for codec + currently supported is "null" (meaning no compression is + performed). If codec is absent, it is assumed to be + "null".</li> + <li><strong>sync</strong> the 16-byte sync marker used in this file, + as a byte sequence.</li> </ul> <p>A normal block consists of:</p> Added: hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileConstants.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileConstants.java?rev=822827&view=auto ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileConstants.java (added) +++ hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileConstants.java Wed Oct 7 18:36:33 2009 @@ -0,0 +1,38 @@ +/** + * 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. + */ + +package org.apache.avro.file; + +/** + * Constants used in data files. + */ +class DataFileConstants { + public static final byte VERSION = 0; + public static final byte[] MAGIC = new byte[] { + (byte)'O', (byte)'b', (byte)'j', VERSION + }; + public static final long FOOTER_BLOCK = -1; + public static final int SYNC_SIZE = 16; + public static final int SYNC_INTERVAL = 1000*SYNC_SIZE; + + public static final String SCHEMA = "schema"; + public static final String SYNC = "sync"; + public static final String COUNT = "count"; + public static final String CODEC = "codec"; + public static final String NULL_CODEC = "null"; +} Modified: hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java?rev=822827&r1=822826&r2=822827&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java Wed Oct 7 18:36:33 2009 @@ -45,8 +45,8 @@ private long count; // # entries in file private long blockCount; // # entries in block - private byte[] sync = new byte[DataFileWriter.SYNC_SIZE]; - private byte[] syncBuffer = new byte[DataFileWriter.SYNC_SIZE]; + private byte[] sync = new byte[DataFileConstants.SYNC_SIZE]; + private byte[] syncBuffer = new byte[DataFileConstants.SYNC_SIZE]; /** Construct a reader for a file. */ public DataFileReader(SeekableInput sin, DatumReader<D> reader) @@ -55,7 +55,7 @@ byte[] magic = new byte[4]; in.read(magic); - if (!Arrays.equals(DataFileWriter.MAGIC, magic)) + if (!Arrays.equals(DataFileConstants.MAGIC, magic)) throw new IOException("Not a data file."); long length = in.length(); @@ -76,14 +76,18 @@ } while ((l = vin.mapNext()) != 0); } - this.sync = getMeta("sync"); - this.count = getMetaLong("count"); - this.schema = Schema.parse(getMetaString("schema")); + this.sync = getMeta(DataFileConstants.SYNC); + this.count = getMetaLong(DataFileConstants.COUNT); + String codec = getMetaString(DataFileConstants.CODEC); + if (codec != null && ! codec.equals(DataFileConstants.NULL_CODEC)) { + throw new IOException("Unknown codec: " + codec); + } + this.schema = Schema.parse(getMetaString(DataFileConstants.SCHEMA)); this.reader = reader; reader.setSchema(schema); - in.seek(DataFileWriter.MAGIC.length); // seek to start + in.seek(DataFileConstants.MAGIC.length); // seek to start } /** Return the value of a metadata property. */ @@ -92,8 +96,12 @@ } /** Return the value of a metadata property. */ public synchronized String getMetaString(String key) { + byte[] value = getMeta(key); + if (value == null) { + return null; + } try { - return new String(getMeta(key), "UTF-8"); + return new String(value, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } @@ -114,7 +122,7 @@ blockCount = vin.readLong(); // read blockCount - if (blockCount == DataFileWriter.FOOTER_BLOCK) { + if (blockCount == DataFileConstants.FOOTER_BLOCK) { in.seek(vin.readLong()+in.tell()); // skip a footer blockCount = 0; } @@ -138,7 +146,7 @@ /** Move to the next synchronization point after a position. */ public synchronized void sync(long position) throws IOException { - if (in.tell()+DataFileWriter.SYNC_SIZE >= in.length()) { + if (in.tell()+DataFileConstants.SYNC_SIZE >= in.length()) { in.seek(in.length()); return; } @@ -151,7 +159,7 @@ break; } if (j == sync.length) { // position before sync - in.seek(in.tell() - DataFileWriter.SYNC_SIZE); + in.seek(in.tell() - DataFileConstants.SYNC_SIZE); return; } syncBuffer[i%sync.length] = (byte)in.read(); Modified: hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileWriter.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileWriter.java?rev=822827&r1=822826&r2=822827&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileWriter.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileWriter.java Wed Oct 7 18:36:33 2009 @@ -44,14 +44,6 @@ * @see DataFileReader */ public class DataFileWriter<D> { - static final byte VERSION = 0; - static final byte[] MAGIC = new byte[] { - (byte)'O', (byte)'b', (byte)'j', VERSION - }; - static final long FOOTER_BLOCK = -1; - static final int SYNC_SIZE = 16; - static final int SYNC_INTERVAL = 1000*SYNC_SIZE; - private Schema schema; private DatumWriter<D> dout; @@ -64,7 +56,7 @@ private int blockCount; // # entries in current block private ByteArrayOutputStream buffer = - new ByteArrayOutputStream(SYNC_INTERVAL*2); + new ByteArrayOutputStream(DataFileConstants.SYNC_INTERVAL*2); private Encoder bufOut = new BinaryEncoder(buffer); private byte[] sync; // 16 random bytes @@ -89,10 +81,11 @@ dout.setSchema(schema); - setMeta("sync", sync); - setMeta("schema", schema.toString()); + setMeta(DataFileConstants.SYNC, sync); + setMeta(DataFileConstants.SCHEMA, schema.toString()); + setMeta(DataFileConstants.CODEC, DataFileConstants.NULL_CODEC); - out.write(MAGIC); + out.write(DataFileConstants.MAGIC); } /** Set a metadata property. */ @@ -120,7 +113,7 @@ types.add(branch); this.schema = Schema.createUnion(types); this.dout.setSchema(schema); - setMeta("schema", schema.toString()); + setMeta(DataFileConstants.SCHEMA, schema.toString()); } /** Append a datum to the file. */ @@ -128,7 +121,7 @@ dout.write(datum, bufOut); blockCount++; count++; - if (buffer.size() >= SYNC_INTERVAL) + if (buffer.size() >= DataFileConstants.SYNC_INTERVAL) writeBlock(); } @@ -164,7 +157,7 @@ private void writeFooter() throws IOException { writeBlock(); // flush any data - setMeta("count", count); // update count + setMeta(DataFileConstants.COUNT, count); // update count bufOut.writeMapStart(); // write meta entries bufOut.setItemCount(meta.size()); for (Map.Entry<String,byte[]> entry : meta.entrySet()) { @@ -176,7 +169,7 @@ int size = buffer.size()+4; out.write(sync); - vout.writeLong(FOOTER_BLOCK); // tag the block + vout.writeLong(DataFileConstants.FOOTER_BLOCK); // tag the block vout.writeLong(size); buffer.writeTo(out); buffer.reset(); Modified: hadoop/avro/trunk/src/py/avro/io.py URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/py/avro/io.py?rev=822827&r1=822826&r2=822827&view=diff ============================================================================== --- hadoop/avro/trunk/src/py/avro/io.py (original) +++ hadoop/avro/trunk/src/py/avro/io.py Wed Oct 7 18:36:33 2009 @@ -223,6 +223,7 @@ self.__meta = dict() self.__sync = uuid.uuid4().bytes self.__meta["sync"] = self.__sync + self.__meta["codec"] = "null" self.__meta["schema"] = schema.stringval(schm) self.__writer.write(struct.pack(len(_MAGIC).__str__()+'s', _MAGIC)) @@ -313,6 +314,9 @@ self.__meta[key] = self.__decoder.readbytes() self.__sync = self.__meta.get("sync") self.__count = int(self.__meta.get("count")) + self.__codec = self.__meta.get("codec") + if (self.__codec != None) and (self.__codec != "null"): + raise schema.AvroException("Unknown codec: " + self.__codec) self.__schema = schema.parse(self.__meta.get("schema").encode("utf-8")) self.__blockcount = 0 self.__dreader = dreader From avro-commitsjamesbrown@example.org Wed Oct 07 19:39:57 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 15201 invoked from network); 7 Oct 2009 19:39:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Oct 2009 19:39:57 -0000 Received: (qmail 7769 invoked by uid 500); 7 Oct 2009 19:39:57 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 7749 invoked by uid 500); 7 Oct 2009 19:39:57 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 7739 invoked by uid 99); 7 Oct 2009 19:39:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2009 19:39:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Oct 2009 19:39:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DD12A23888E5; Wed, 7 Oct 2009 19:39:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822873 - in /hadoop/avro/trunk: CHANGES.txt build.xml Date: Wed, 07 Oct 2009 19:39:33 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed Oct 7 19:39:32 2009 New Revision: 822873 URL: http://svn.apache.org/viewvc?rev=822873&view=rev Log: AVRO-138. Add a 'unit-test-java' Ant target that runs tests without running checkstyle or javadoc. Contributed by Thiruvalluvan M. G. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=822873&r1=822872&r2=822873&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Wed Oct 7 19:39:32 2009 @@ -62,6 +62,10 @@ reserved metadata keys "codec" and "sync". The only codec currently defined is "null". (Thiruvalluvan M. G. via cutting) + AVRO-138. Add a "unit-test-java" Ant target that runs tests + without running checkstyle or javadoc. (Thiruvalluvan M. G. via + cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=822873&r1=822872&r2=822873&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Wed Oct 7 19:39:32 2009 @@ -288,7 +288,10 @@ </sequential> </macrodef> - <target name="test-java" depends="compile-test-java,checkstyle-java,javadoc" + <target name="test-java" depends="unit-test-java,checkstyle-java,javadoc" + description="Run java tests" /> + + <target name="unit-test-java" depends="compile-test-java" description="Run java unit tests"> <test-runner files.location="${test.java.src.dir}" tests.pattern="**/${test.java.include}.java"/> </target> From avro-commitsjamesbrown@example.org Thu Oct 08 00:13:10 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 96976 invoked from network); 8 Oct 2009 00:13:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Oct 2009 00:13:10 -0000 Received: (qmail 37843 invoked by uid 500); 8 Oct 2009 00:13:10 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 37816 invoked by uid 500); 8 Oct 2009 00:13:10 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 37806 invoked by uid 99); 8 Oct 2009 00:13:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 00:13:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 00:13:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 545362388905; Thu, 8 Oct 2009 00:12:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822968 - in /hadoop/avro/trunk: ./ src/c++/api/ src/c++/impl/ Date: Thu, 08 Oct 2009 00:12:45 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sbanacho Date: Thu Oct 8 00:12:44 2009 New Revision: 822968 URL: http://svn.apache.org/viewvc?rev=822968&view=rev Log: AVRO-132. Fix multi-threading race condition when threads share schema objects. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/c++/api/Boost.hh hadoop/avro/trunk/src/c++/api/Node.hh hadoop/avro/trunk/src/c++/api/ValidSchema.hh hadoop/avro/trunk/src/c++/api/ValidatingReader.hh hadoop/avro/trunk/src/c++/api/Validator.hh hadoop/avro/trunk/src/c++/impl/NodeImpl.cc hadoop/avro/trunk/src/c++/impl/ValidSchema.cc hadoop/avro/trunk/src/c++/impl/ValidatingReader.cc hadoop/avro/trunk/src/c++/impl/ValidatingWriter.cc hadoop/avro/trunk/src/c++/impl/Validator.cc Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Thu Oct 8 00:12:44 2009 @@ -70,6 +70,9 @@ BUG FIXES + AVRO-132. Fix multi-threading race condition when threads share schema objects. + (sbanacho) + AVRO-113. Fix endian bug with C++ integer/long varint codec. (Scott Banachowski via cutting) Modified: hadoop/avro/trunk/src/c++/api/Boost.hh URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/api/Boost.hh?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/api/Boost.hh (original) +++ hadoop/avro/trunk/src/c++/api/Boost.hh Thu Oct 8 00:12:44 2009 @@ -55,7 +55,7 @@ typedef integral_constant<bool, true> true_type; typedef integral_constant<bool, false> false_type; -} +} // namespace boost #else #include <boost/type_traits.hpp> #endif // AVRO_BOOST_NO_TRAIT @@ -93,7 +93,7 @@ private: st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4vector<T *> ptrs_; }; -} +} // namespace boost #else #include <boost/ptr_container/ptr_vector.hpp> #endif // AVRO_BOOST_NO_PTRVECTOR Modified: hadoop/avro/trunk/src/c++/api/Node.hh URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/api/Node.hh?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/api/Node.hh (original) +++ hadoop/avro/trunk/src/c++/api/Node.hh Thu Oct 8 00:12:44 2009 @@ -21,7 +21,7 @@ #include <cassert> #include <boost/noncopyable.hpp> -#include <boost/intrusive_ptr.hpp> +#include <boost/shared_ptr.hpp> #include "Exception.hh" #include "Types.hh" @@ -30,7 +30,7 @@ class Node; -typedef boost888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4intrusive_ptr<Node> NodePtr; +typedef boost888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4shared_ptr<Node> NodePtr; /// Node is the building block for parse trees. Each node represents an avro @@ -40,10 +40,9 @@ /// The user does not use the Node object directly, they interface with Schema /// objects. /// -/// The Node object has an embedded reference count for use in the -/// boost888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4intrusive_ptr smart pointer. This is so that schemas may be reused -/// in other other schemas, without needing to worry about memory deallocation -/// for nodes that are added to multiple schema parse trees. +/// The Node object uses reference-counted pointers. This is so that schemas +/// may be reused in other other schemas, without needing to worry about memory +/// deallocation for nodes that are added to multiple schema parse trees. /// /// Node has minimal implementation, serving as an abstract base class for /// different node types. @@ -130,27 +129,11 @@ private: - friend void intrusive_ptr_add_ref(Node *node); - friend void intrusive_ptr_release(Node *node); - const Type type_; int refCount_; bool locked_; }; -inline void -intrusive_ptr_add_ref(Node *node) { - ++(node->refCount_); -} - -inline void -intrusive_ptr_release(Node *node) { - --(node->refCount_); - if(node->refCount_ == 0) { - delete node; - } -} - } // namespace avro #endif Modified: hadoop/avro/trunk/src/c++/api/ValidSchema.hh URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/api/ValidSchema.hh?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/api/ValidSchema.hh (original) +++ hadoop/avro/trunk/src/c++/api/ValidSchema.hh Thu Oct 8 00:12:44 2009 @@ -52,9 +52,9 @@ return node_; } - void toJson(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os); + void toJson(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) const; - void toFlatList(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os); + void toFlatList(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) const; NodePtr followSymbol(const st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4string &name) const { return symbolMap_.locateSymbol(name); Modified: hadoop/avro/trunk/src/c++/api/ValidatingReader.hh URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/api/ValidatingReader.hh?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/api/ValidatingReader.hh (original) +++ hadoop/avro/trunk/src/c++/api/ValidatingReader.hh Thu Oct 8 00:12:44 2009 @@ -47,7 +47,7 @@ public: - explicit ValidatingReader(const ValidSchema &schema, InputStreamer &in); + ValidatingReader(const ValidSchema &schema, InputStreamer &in); template<typename T> void getValue(T &val) { Modified: hadoop/avro/trunk/src/c++/api/Validator.hh URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/api/Validator.hh?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/api/Validator.hh (original) +++ hadoop/avro/trunk/src/c++/api/Validator.hh Thu Oct 8 00:12:44 2009 @@ -42,7 +42,7 @@ public: - Validator(const ValidSchema &schema); + explicit Validator(const ValidSchema &schema); void advance(); void advanceWithCount(int64_t val); @@ -80,7 +80,12 @@ void setupFlag(Type type); const ValidSchema &schema_; - NodePtr parseTree_; + + // since this only keeps a reference to the schema, to ensure its parse + // tree is not deleted, keep a copy of a shared pointer to the root of the + // tree + + const NodePtr parseTree_; Type nextType_; flag_t expectedTypesFlag_; Modified: hadoop/avro/trunk/src/c++/impl/NodeImpl.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/impl/NodeImpl.cc?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/impl/NodeImpl.cc (original) +++ hadoop/avro/trunk/src/c++/impl/NodeImpl.cc Thu Oct 8 00:12:44 2009 @@ -159,36 +159,36 @@ switch(node.type()) { case AVRO_ARRAY: - ptr = ( new NodeArray(node)); + ptr.reset ( new NodeArray(node)); break; case AVRO_ENUM: - ptr = ( new NodeEnum(node)); + ptr.reset ( new NodeEnum(node)); break; case AVRO_FIXED: - ptr = ( new NodeFixed(node)); + ptr.reset ( new NodeFixed(node)); break; case AVRO_MAP: - ptr = ( new NodeMap(node)); + ptr.reset ( new NodeMap(node)); break; case AVRO_RECORD: - ptr = ( new NodeRecord(node)); + ptr.reset ( new NodeRecord(node)); break; case AVRO_UNION: - ptr = ( new NodeUnion(node)); + ptr.reset ( new NodeUnion(node)); break; case AVRO_SYMBOLIC: - ptr = ( new NodeSymbolic(node)); + ptr.reset ( new NodeSymbolic(node)); break; default: if(isPrimitive(node.type())) { - ptr = ( new NodePrimitive(node.type())); + ptr.reset ( new NodePrimitive(node.type())); } else { throw Exception("Unknown type in nodeFromCompilerNode"); Modified: hadoop/avro/trunk/src/c++/impl/ValidSchema.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/impl/ValidSchema.cc?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/impl/ValidSchema.cc (original) +++ hadoop/avro/trunk/src/c++/impl/ValidSchema.cc Thu Oct 8 00:12:44 2009 @@ -46,7 +46,7 @@ ValidSchem888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4validate(const NodePtr &node) { if(!node) { - node_ = new NodePrimitive(AVRO_NULL); + node_.reset(new NodePrimitive(AVRO_NULL)); } if(!node->isValid()) { @@ -78,14 +78,14 @@ } void -ValidSchem888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4toJson(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) +ValidSchem888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4toJson(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) const { node_->printJson(os, 0); os << '\n'; } void -ValidSchem888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4toFlatList(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) +ValidSchem888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4toFlatList(st888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ostream &os) const { node_->printBasicInfo(os); } Modified: hadoop/avro/trunk/src/c++/impl/ValidatingReader.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/impl/ValidatingReader.cc?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/impl/ValidatingReader.cc (original) +++ hadoop/avro/trunk/src/c++/impl/ValidatingReader.cc Thu Oct 8 00:12:44 2009 @@ -78,4 +78,4 @@ return getCount(); } -} // namepspace avro +} // namespace avro Modified: hadoop/avro/trunk/src/c++/impl/ValidatingWriter.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/impl/ValidatingWriter.cc?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/impl/ValidatingWriter.cc (original) +++ hadoop/avro/trunk/src/c++/impl/ValidatingWriter.cc Thu Oct 8 00:12:44 2009 @@ -98,4 +98,4 @@ } -} // namepspace avro +} // namespace avro Modified: hadoop/avro/trunk/src/c++/impl/Validator.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/impl/Validator.cc?rev=822968&r1=822967&r2=822968&view=diff ============================================================================== --- hadoop/avro/trunk/src/c++/impl/Validator.cc (original) +++ hadoop/avro/trunk/src/c++/impl/Validator.cc Thu Oct 8 00:12:44 2009 @@ -295,4 +295,4 @@ return found; } -} // namepspace avro +} // namespace avro From avro-commitsjamesbrown@example.org Fri Oct 09 05:56:31 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 43213 invoked from network); 9 Oct 2009 05:56:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Oct 2009 05:56:31 -0000 Received: (qmail 77014 invoked by uid 500); 9 Oct 2009 05:56:31 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 76986 invoked by uid 500); 9 Oct 2009 05:56:30 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 76950 invoked by uid 99); 9 Oct 2009 05:56:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 05:56:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 05:56:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EF7FC23888D0; Fri, 9 Oct 2009 05:56:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823415 - in /hadoop/avro/trunk: CHANGES.txt src/java/org/apache/avro/specific/SpecificCompiler.java Date: Fri, 09 Oct 2009 05:56:03 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sharad Date: Fri Oct 9 05:56:03 2009 New Revision: 823415 URL: http://svn.apache.org/viewvc?rev=823415&view=rev Log: AVRO-137. Suppress warnings in generated java code. Contributed by Doug Cutting. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=823415&r1=823414&r2=823415&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Fri Oct 9 05:56:03 2009 @@ -94,6 +94,8 @@ AVRO-124. Remove Ivy's jar from distributions. (cutting) + AVRO-137. Suppress warnings in generated java code. (cutting via sharad) + Avro 1.1.0 (8 September 2009) INCOMPATIBLE CHANGES Modified: hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java?rev=823415&r1=823414&r2=823415&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/specific/SpecificCompiler.java Fri Oct 9 05:56:03 2009 @@ -153,6 +153,7 @@ : !namespace.equals(s.getNamespace())) line(0, "import "+SpecificData.get().getClassName(s)+";"); line(0, ""); + line(0, "@SuppressWarnings(\"all\")"); } private String params(Schema request) throws IOException { From avro-commitsjamesbrown@example.org Fri Oct 09 20:53:50 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 53363 invoked from network); 9 Oct 2009 20:53:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Oct 2009 20:53:49 -0000 Received: (qmail 46660 invoked by uid 500); 9 Oct 2009 20:53:49 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 46632 invoked by uid 500); 9 Oct 2009 20:53:49 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 46622 invoked by uid 99); 9 Oct 2009 20:53:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 20:53:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 20:53:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 585312388896; Fri, 9 Oct 2009 20:52:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823682 - in /hadoop/avro/trunk: CHANGES.txt build.xml src/java/org/apache/avro/ipc/HttpServer.java src/java/org/apache/avro/ipc/HttpTransceiver.java src/java/org/apache/avro/ipc/ResponderServlet.java Date: Fri, 09 Oct 2009 20:52:48 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Fri Oct 9 20:52:47 2009 New Revision: 823682 URL: http://svn.apache.org/viewvc?rev=823682&view=rev Log: AVRO-139. Refactor HTTP servlet to a separate, public class. Added: hadoop/avro/trunk/src/java/org/apache/avro/ipc/ResponderServlet.java Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpServer.java hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=823682&r1=823681&r2=823682&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Fri Oct 9 20:52:47 2009 @@ -37,6 +37,8 @@ AVRO-24. Add a simple bulk-data benchmark. (cutting) + AVRO-139. Refactor HTTP servlet to separate, public class. (cutting) + IMPROVEMENTS AVRO-99. Use Boost framework for C++ unit tests. Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=823682&r1=823681&r2=823682&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Fri Oct 9 20:52:47 2009 @@ -65,6 +65,8 @@ value="http://java.sun.com/javase/6/docs/api/"/> <property name="javadoc.link.jackson" value="http://jackson.codehaus.org/0.9.3/javadoc/"/> + <property name="javadoc.link.servlet" + value="http://java.sun.com/products/servlet/2.3/javadoc/"/> <property name="javadoc.packages" value="org.${org}.${name}.*"/> <property name="javac.encoding" value="ISO-8859-1"/> @@ -470,6 +472,7 @@ <link href="${javadoc.link.java}"/> <link href="${javadoc.link.jackson}"/> + <link href="${javadoc.link.servlet}"/> <classpath > <path refid="java.classpath" /> Modified: hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpServer.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpServer.java?rev=823682&r1=823681&r2=823682&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpServer.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpServer.java Fri Oct 9 20:52:47 2009 @@ -19,27 +19,25 @@ package org.apache.avro.ipc; import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.List; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.apache.avro.AvroRuntimeException; import org.mortbay.jetty.servlet.Context; import org.mortbay.jetty.servlet.ServletHolder; -public class HttpServer extends HttpServlet implements Server { - private Responder responder; +/** An HTTP-based RPC {@link Server}. */ +public class HttpServer implements Server { private org.mortbay.jetty.Server server; + /** Starts a server on the named port. */ public HttpServer(Responder responder, int port) throws IOException { - this.responder = responder; + this(new ResponderServlet(responder), port); + } + + /** Starts a server on the named port. */ + public HttpServer(ResponderServlet servlet, int port) throws IOException { this.server = new org.mortbay.jetty.Server(port); - new Context(server,"/").addServlet(new ServletHolder(this), "/*"); + new Context(server,"/").addServlet(new ServletHolder(servlet), "/*"); try { server.start(); } catch (Exception e) { @@ -58,19 +56,4 @@ throw new AvroRuntimeException(e); } } - - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - response.setContentType("avro/binary"); - List<ByteBuffer> requestBuffers = - HttpTransceiver.readBuffers(request.getInputStream()); - try { - List<ByteBuffer> responseBuffers = - responder.respond(requestBuffers); - response.setContentLength(HttpTransceiver.getLength(responseBuffers)); - HttpTransceiver.writeBuffers(responseBuffers, response.getOutputStream()); - } catch (AvroRuntimeException e) { - throw new ServletException(e); - } - } } Modified: hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java?rev=823682&r1=823681&r2=823682&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java Fri Oct 9 20:52:47 2009 @@ -36,6 +36,8 @@ private static final Logger LOG = LoggerFactory.getLogger(HttpTransceiver.class); + static final String CONTENT_TYPE = "avro/binary"; + private URL url; private URLConnection connection; @@ -47,7 +49,7 @@ public synchronized List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { this.connection = url.openConnection(); - connection.setRequestProperty("Content-Type", "avro/binary"); + connection.setRequestProperty("Content-Type", CONTENT_TYPE); connection.setRequestProperty("Content-Length", Integer.toString(getLength(request))); connection.setDoOutput(true); Added: hadoop/avro/trunk/src/java/org/apache/avro/ipc/ResponderServlet.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/ipc/ResponderServlet.java?rev=823682&view=auto ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/ipc/ResponderServlet.java (added) +++ hadoop/avro/trunk/src/java/org/apache/avro/ipc/ResponderServlet.java Fri Oct 9 20:52:47 2009 @@ -0,0 +1,56 @@ +/** + * 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. + */ + +package org.apache.avro.ipc; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.avro.AvroRuntimeException; + +/** An {@link HttpServlet} that responds to Avro RPC requests. */ +public class ResponderServlet extends HttpServlet { + private Responder responder; + + public ResponderServlet(Responder responder) throws IOException { + this.responder = responder; + } + + @Override + protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws IOException, ServletException { + response.setContentType(HttpTransceiver.CONTENT_TYPE); + List<ByteBuffer> requestBufs = + HttpTransceiver.readBuffers(request.getInputStream()); + try { + List<ByteBuffer> responseBufs = responder.respond(requestBufs); + response.setContentLength(HttpTransceiver.getLength(responseBufs)); + HttpTransceiver.writeBuffers(responseBufs, response.getOutputStream()); + } catch (AvroRuntimeException e) { + throw new ServletException(e); + } + } +} + From avro-commitsjamesbrown@example.org Fri Oct 09 20:55:12 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 53782 invoked from network); 9 Oct 2009 20:55:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Oct 2009 20:55:12 -0000 Received: (qmail 48950 invoked by uid 500); 9 Oct 2009 20:55:12 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 48922 invoked by uid 500); 9 Oct 2009 20:55:12 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 48912 invoked by uid 99); 9 Oct 2009 20:55:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 20:55:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 20:55:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 14CD12388896; Fri, 9 Oct 2009 20:54:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823684 - in /hadoop/avro/trunk: CHANGES.txt src/java/org/apache/avro/AvroRuntimeException.java src/java/org/apache/avro/SchemaParseException.java src/java/org/apache/avro/generic/GenericData.java Date: Fri, 09 Oct 2009 20:54:47 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Fri Oct 9 20:54:47 2009 New Revision: 823684 URL: http://svn.apache.org/viewvc?rev=823684&view=rev Log: AVRO-140. Add javadoc to public classes with none. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/java/org/apache/avro/AvroRuntimeException.java hadoop/avro/trunk/src/java/org/apache/avro/SchemaParseException.java hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericData.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=823684&r1=823683&r2=823684&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Fri Oct 9 20:54:47 2009 @@ -68,6 +68,8 @@ without running checkstyle or javadoc. (Thiruvalluvan M. G. via cutting) + AVRO-140. Add javadoc to public classes with none. (cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/src/java/org/apache/avro/AvroRuntimeException.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/AvroRuntimeException.java?rev=823684&r1=823683&r2=823684&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/AvroRuntimeException.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/AvroRuntimeException.java Fri Oct 9 20:54:47 2009 @@ -18,6 +18,7 @@ package org.apache.avro; +/** Base Avro exception. */ public class AvroRuntimeException extends RuntimeException { public AvroRuntimeException(Throwable cause) { super(cause); } public AvroRuntimeException(String message) { super(message); } Modified: hadoop/avro/trunk/src/java/org/apache/avro/SchemaParseException.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/SchemaParseException.java?rev=823684&r1=823683&r2=823684&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/SchemaParseException.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/SchemaParseException.java Fri Oct 9 20:54:47 2009 @@ -18,6 +18,7 @@ package org.apache.avro; +/** Thrown for errors parsing schemas and protocols. */ public class SchemaParseException extends AvroRuntimeException { public SchemaParseException(Throwable cause) { super(cause); } public SchemaParseException(String message) { super(message); } Modified: hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericData.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericData.java?rev=823684&r1=823683&r2=823684&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericData.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericData.java Fri Oct 9 20:54:47 2009 @@ -129,6 +129,7 @@ } } + /** Default implementation of {@link GenericFixed}. */ public static class Fixed implements GenericFixed, Comparable<Fixed> { private byte[] bytes; From avro-commitsjamesbrown@example.org Fri Oct 09 21:12:25 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 59405 invoked from network); 9 Oct 2009 21:12:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Oct 2009 21:12:25 -0000 Received: (qmail 70446 invoked by uid 500); 9 Oct 2009 21:12:25 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 70418 invoked by uid 500); 9 Oct 2009 21:12:25 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 70402 invoked by uid 99); 9 Oct 2009 21:12:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 21:12:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 21:12:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3097623888C2; Fri, 9 Oct 2009 21:11:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823690 - in /hadoop/avro/trunk: CHANGES.txt build.xml Date: Fri, 09 Oct 2009 21:11:30 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Fri Oct 9 21:11:29 2009 New Revision: 823690 URL: http://svn.apache.org/viewvc?rev=823690&view=rev Log: Preparing for 1.2.0 release candidate build. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=823690&r1=823689&r2=823690&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Fri Oct 9 21:11:29 2009 @@ -1,6 +1,6 @@ Avro Change Log -Trunk (unreleased changes) +Avro 1.2.0 (14 October 2009) INCOMPATIBLE CHANGES Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=823690&r1=823689&r2=823690&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Fri Oct 9 21:11:29 2009 @@ -27,7 +27,7 @@ <property name="org" value="apache"/> <property name="Name" value="Avro"/> <property name="name" value="avro"/> - <property name="version" value="1.1.0-dev"/> + <property name="version" value="1.2.0-dev"/> <property name="fullname" value="${name}-${version}"/> <property name="year" value="2009"/> From avro-commitsjamesbrown@example.org Wed Oct 14 18:38:28 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 67968 invoked from network); 14 Oct 2009 18:38:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 14 Oct 2009 18:38:28 -0000 Received: (qmail 74172 invoked by uid 500); 14 Oct 2009 18:38:28 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 74154 invoked by uid 500); 14 Oct 2009 18:38:27 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 74144 invoked by uid 99); 14 Oct 2009 18:38:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 18:38:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 18:38:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8A89D238889C; Wed, 14 Oct 2009 18:38:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r825213 - /hadoop/avro/tags/release-1.2.0/ Date: Wed, 14 Oct 2009 18:38:00 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed Oct 14 18:38:00 2009 New Revision: 825213 URL: http://svn.apache.org/viewvc?rev=825213&view=rev Log: Tagging release 1.2.0. Added: hadoop/avro/tags/release-1.2.0/ (props changed) - copied from r825212, hadoop/avro/trunk/ Propchange: hadoop/avro/tags/release-1.2.0/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Oct 14 18:38:00 2009 @@ -0,0 +1 @@ +build Propchange: hadoop/avro/tags/release-1.2.0/ ------------------------------------------------------------------------------ svn:mergeinfo = From avro-commitsjamesbrown@example.org Wed Oct 14 18:51:12 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 79157 invoked from network); 14 Oct 2009 18:51:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 14 Oct 2009 18:51:12 -0000 Received: (qmail 18372 invoked by uid 500); 14 Oct 2009 18:51:12 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 18346 invoked by uid 500); 14 Oct 2009 18:51:12 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 18336 invoked by uid 99); 14 Oct 2009 18:51:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 18:51:12 +0000 X-ASF-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 18:51:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A4176238889D; Wed, 14 Oct 2009 18:50:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r825217 - in /hadoop/avro/trunk: CHANGES.txt src/java/org/apache/avro/reflect/ReflectData.java src/test/java/org/apache/avro/TestReflect.java Date: Wed, 14 Oct 2009 18:50:49 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> Author: cutting Date: Wed Oct 14 18:50:49 2009 New Revision: 825217 URL: http://svn.apache.org/viewvc?rev=825217&view=rev Log: AVRO-141. Fix a NullPointerException in ReflectData#isRecord(). Contributed by Isabel Drost. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/java/org/apache/avro/reflect/ReflectData.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=825217&r1=825216&r2=825217&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Wed Oct 14 18:50:49 2009 @@ -1,5 +1,20 @@ Avro Change Log +Trunk (unreleased changes) + + INCOMPATIBLE CHANGES + + NEW FEATURES + + IMPROVEMENTS + + OPTIMIZATIONS + + BUG FIXES + + AVRO-141. Fix a NullPointerException in ReflectData#isRecord(). + (Isabel Drost via cutting) + Avro 1.2.0 (14 October 2009) INCOMPATIBLE CHANGES Modified: hadoop/avro/trunk/src/java/org/apache/avro/reflect/ReflectData.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/reflect/ReflectData.java?rev=825217&r1=825216&r2=825217&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/reflect/ReflectData.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/reflect/ReflectData.java Wed Oct 14 18:50:49 2009 @@ -76,6 +76,7 @@ @Override protected boolean isRecord(Object datum) { + if (datum == null) return false; return getSchema(datum.getClass()).getType() == Type.RECORD; } Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java?rev=825217&r1=825216&r2=825217&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Wed Oct 14 18:50:49 2009 @@ -121,23 +121,32 @@ public static class AnotherSampleRecord { private Integer a = null; - + private SampleRecord s = null; + public AnotherSampleRecord() { } - + AnotherSampleRecord(Integer a) { this.a = a; + this.s = new SampleRecord(); } public int hashCode() { - return (a != null ? a.hashCode() : 0); + int hash = (a != null ? a.hashCode() : 0); + hash += (s != null ? s.hashCode() : 0); + return hash; } public boolean equals(Object other) { if (other instanceof AnotherSampleRecord) { - return this.a == ((AnotherSampleRecord)other).a; + AnotherSampleRecord o = (AnotherSampleRecord) other; + boolean equals = this.a == o.a; + if (this.s == null && o.s != null) + equals = false; + if (this.s != null && this.s.equals(o.s)) + equals = true; } - return false; + return true; } } } From avro-commitsjamesbrown@example.org Wed Oct 14 20:47:38 2009 Return-Path: <avro-commitsjamesbrown@example.org> Delivered-To: jamesbrown@example.org Received: (qmail 28945 invoked from network); 14 Oct 2009 20:47:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 14 Oct 2009 20:47:38 -0000 Received: (qmail 26542 invoked by uid 500); 14 Oct 2009 20:47:38 -0000 Delivered-To: jamesbrown@example.org Received: (qmail 26514 invoked by uid 500); 14 Oct 2009 20:47:38 -0000 Mailing-List: contact jamesbrown@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jamesbrown@example.org> List-Unsubscribe: <mailto:jamesbrown@example.org> List-Post: <mailto:jamesbrown@example.org> List-Id: <avro-commits.hadoop.apache.org> Reply-To: jamesbrown@example.org Delivered-To: mailing list jamesbrown@example.org Received: (qmail 26504 invoked by uid 99); 14 Oct 2009 20:47:38 -0000 Received: from Unknown (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 20:47:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 20:47:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A02F2238889D; Wed, 14 Oct 2009 20:46:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r825270 - in /hadoop/avro/trunk: ./ src/java/org/apache/avro/ src/java/org/apache/avro/file/ src/java/org/apache/avro/generic/ src/java/org/apache/avro/io/ src/java/org/apache/avro/ipc/ src/test/java/org/apache/avro/ src/test/java/org/apach... Date: Wed, 14 Oct 2009 20:46:57 -0000 To: jamesbrown@example.org From: jamesbrown@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jamesbrown@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed Oct 14 20:46:55 2009 New Revision: 825270 URL: http://svn.apache.org/viewvc?rev=825270&view=rev Log: AVRO-142. Remove some Java unused fields and imports. Contributed by Philip Zeyliger. Added: hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java (contents, props changed) - copied, changed from r824967, hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestResolvingIO_resolving.java Removed: hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestResolvingIO_resolving.java Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/build.xml hadoop/avro/trunk/src/java/org/apache/avro/Schema.java hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericRequestor.java hadoop/avro/trunk/src/java/org/apache/avro/io/BlockingBinaryEncoder.java hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java hadoop/avro/trunk/src/test/java/org/apache/avro/BarRecord.java hadoop/avro/trunk/src/test/java/org/apache/avro/FooRecord.java hadoop/avro/trunk/src/test/java/org/apache/avro/GenerateBlockingData.java hadoop/avro/trunk/src/test/java/org/apache/avro/RandomData.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestBulkData.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestCompare.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFile.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFileReflect.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestNamespaceSpecific.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolGeneric.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolHttp.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java hadoop/avro/trunk/src/test/java/org/apache/avro/TestSchema.java hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestBinaryDecoder.java hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestBlockingIO.java hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestResolvingIO.java hadoop/avro/trunk/src/test/java/org/apache/avro/io/TestValidatingIO.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Wed Oct 14 20:46:55 2009 @@ -8,6 +8,9 @@ IMPROVEMENTS + AVRO-142. Remove some Java unused fields and imports. Start + running checkstyle on Java test code. (Philip Zeyliger via cutting) + OPTIMIZATIONS BUG FIXES Modified: hadoop/avro/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/build.xml (original) +++ hadoop/avro/trunk/build.xml Wed Oct 14 20:46:55 2009 @@ -207,8 +207,11 @@ <checkstyle config="${java.src.dir}/checkstyle.xml" classpathref="test.java.classpath"> <fileset dir="${java.src.dir}"> - <include name="**/*.java"/> - </fileset> + <include name="**/*.java"/> + </fileset> + <fileset dir="${test.java.src.dir}"> + <include name="**/*.java"/> + </fileset> </checkstyle> </target> Modified: hadoop/avro/trunk/src/java/org/apache/avro/Schema.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/Schema.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/Schema.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/Schema.java Wed Oct 14 20:46:55 2009 @@ -266,7 +266,6 @@ private static class Name { private String name; private String space; - public Name(Schema s) { this(s.getName(), s.getNamespace()); } public Name(String name, String space) { if (name == null) return; // anonymous int lastDot = name.lastIndexOf('.'); Modified: hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/file/DataFileReader.java Wed Oct 14 20:46:55 2009 @@ -89,7 +89,16 @@ in.seek(DataFileConstants.MAGIC.length); // seek to start } + + /** + * Return the number of records in the file, according + * to its metadata. + */ + public long getCount() { + return count; + } + /** Return the value of a metadata property. */ public synchronized byte[] getMeta(String key) { return meta.get(key); Modified: hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericRequestor.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericRequestor.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericRequestor.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/generic/GenericRequestor.java Wed Oct 14 20:46:55 2009 @@ -27,14 +27,9 @@ import org.apache.avro.ipc.AvroRemoteException; import org.apache.avro.ipc.Requestor; import org.apache.avro.ipc.Transceiver; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** {@link Requestor} implementation for generic Java data. */ public class GenericRequestor extends Requestor { - private static final Logger LOG - = LoggerFactory.getLogger(GenericRequestor.class); - public GenericRequestor(Protocol protocol, Transceiver transceiver) throws IOException { super(protocol, transceiver); Modified: hadoop/avro/trunk/src/java/org/apache/avro/io/BlockingBinaryEncoder.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/io/BlockingBinaryEncoder.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/io/BlockingBinaryEncoder.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/io/BlockingBinaryEncoder.java Wed Oct 14 20:46:55 2009 @@ -118,15 +118,6 @@ this.start = this.lastFullItem = 0; this.items = 1; // Makes various assertions work out } - - /** Create a REGULAR instance. (Gets changed to OVERFLOW by - * {@link #compact}.) */ - public BlockedValue(Schema.Type type, int start) { - this.type = type; - this.state = State.REGULAR; - this.start = this.lastFullItem = start; - this.items = 0; - } /** * Check invariants of <code>this</code> and also the Modified: hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java (original) +++ hadoop/avro/trunk/src/java/org/apache/avro/ipc/HttpTransceiver.java Wed Oct 14 20:46:55 2009 @@ -28,14 +28,8 @@ import java.net.URL; import java.net.URLConnection; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** An HTTP-based {@link Transceiver} implementation. */ public class HttpTransceiver extends Transceiver { - private static final Logger LOG - = LoggerFactory.getLogger(HttpTransceiver.class); - static final String CONTENT_TYPE = "avro/binary"; private URL url; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/BarRecord.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/BarRecord.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/BarRecord.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/BarRecord.java Wed Oct 14 20:46:55 2009 @@ -50,4 +50,4 @@ public String toString() { return BarRecord.class.getSimpleName() + "{msg=" + beerMsg + "}"; } -} \ No newline at end of file +} Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/FooRecord.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/FooRecord.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/FooRecord.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/FooRecord.java Wed Oct 14 20:46:55 2009 @@ -44,4 +44,4 @@ public String toString() { return FooRecord.class.getSimpleName() + "{count=" + fooCount + "}"; } -} \ No newline at end of file +} Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/GenerateBlockingData.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/GenerateBlockingData.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/GenerateBlockingData.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/GenerateBlockingData.java Wed Oct 14 20:46:55 2009 @@ -60,10 +60,10 @@ } Schema sch = Schema.parse(new File(args[0])); - File FILE = new File(args[1]); + File outputFile = new File(args[1]); int numObjects = Integer.parseInt(args[2]); - FileOutputStream out = new FileOutputStream(FILE, false); + FileOutputStream out = new FileOutputStream(outputFile, false); DatumWriter<Object> dout = new GenericDatumWriter<Object>(); dout.setSchema(sch); Encoder vout = new BinaryEncoder(out); Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/RandomData.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/RandomData.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/RandomData.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/RandomData.java Wed Oct 14 20:46:55 2009 @@ -17,6 +17,15 @@ */ package org.apache.avro; +import java.io.File; +import java.io.FileOutputStream; +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Random; + import org.apache.avro.file.DataFileWriter; import org.apache.avro.generic.GenericArray; import org.apache.avro.generic.GenericData; @@ -24,11 +33,6 @@ import org.apache.avro.generic.GenericRecord; import org.apache.avro.util.Utf8; -import java.io.File; -import java.io.FileOutputStream; -import java.nio.ByteBuffer; -import java.util.*; - /** Generates schema data as Java objects with random values. */ public class RandomData implements Iterable<Object> { private final Schema root; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestBulkData.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestBulkData.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestBulkData.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestBulkData.java Wed Oct 14 20:46:55 2009 @@ -19,9 +19,15 @@ import org.apache.avro.specific.SpecificRequestor; import org.apache.avro.specific.SpecificResponder; -import org.apache.avro.ipc.*; -import org.apache.avro.util.Utf8; -import org.junit.*; +import org.apache.avro.ipc.HttpServer; +import org.apache.avro.ipc.HttpTransceiver; +import org.apache.avro.ipc.Server; +import org.apache.avro.ipc.Transceiver; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; import java.io.IOException; import java.net.URL; @@ -54,7 +60,6 @@ private static Server server; private static Transceiver client; - private static Requestor requestor; private static BulkData proxy; @Before Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestCompare.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestCompare.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestCompare.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestCompare.java Wed Oct 14 20:46:55 2009 @@ -19,13 +19,10 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; -import java.util.HashMap; import org.apache.avro.generic.GenericArray; import org.apache.avro.generic.GenericData; @@ -34,12 +31,10 @@ import org.apache.avro.specific.SpecificDatumWriter; import org.apache.avro.io.BinaryData; import org.apache.avro.io.DatumWriter; -import org.apache.avro.io.Encoder; import org.apache.avro.io.BinaryEncoder; import org.apache.avro.util.Utf8; import org.apache.avro.test.TestRecord; -import org.apache.avro.test.Simple; import org.apache.avro.test.Kind; import org.apache.avro.test.MD5; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFile.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFile.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFile.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFile.java Wed Oct 14 20:46:55 2009 @@ -72,6 +72,7 @@ new DataFileReader<Object>(new SeekableFileInput(FILE), new GenericDatumReader<Object>()); try { + assertEquals(COUNT, reader.getCount()); Object datum = null; if (VALIDATE) { for (Object expected : new RandomData(SCHEMA, COUNT, SEED)) { Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFileReflect.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFileReflect.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFileReflect.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestDataFileReflect.java Wed Oct 14 20:46:55 2009 @@ -206,6 +206,7 @@ private static class BazRecord { private int nbr; + @SuppressWarnings("unused") public BazRecord() { } Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestNamespaceSpecific.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestNamespaceSpecific.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestNamespaceSpecific.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestNamespaceSpecific.java Wed Oct 14 20:46:55 2009 @@ -33,18 +33,11 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.*; +import java.io.IOException; import java.net.InetSocketAddress; -import java.nio.ByteBuffer; -import java.util.Random; - public class TestNamespaceSpecific { - private static final Logger LOG - = LoggerFactory.getLogger(TestNamespaceSpecific.class); public static class TestImpl implements TestNamespace { public TestRecord echo(TestRecord record) { return record; } Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolGeneric.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolGeneric.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolGeneric.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolGeneric.java Wed Oct 14 20:46:55 2009 @@ -23,7 +23,11 @@ import org.apache.avro.generic.GenericRecord; import org.apache.avro.generic.GenericRequestor; import org.apache.avro.generic.GenericResponder; -import org.apache.avro.ipc.*; +import org.apache.avro.ipc.AvroRemoteException; +import org.apache.avro.ipc.Requestor; +import org.apache.avro.ipc.SocketServer; +import org.apache.avro.ipc.SocketTransceiver; +import org.apache.avro.ipc.Transceiver; import org.apache.avro.util.Utf8; import org.junit.After; import org.junit.Before; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolHttp.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolHttp.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolHttp.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolHttp.java Wed Oct 14 20:46:55 2009 @@ -17,7 +17,6 @@ */ package org.apache.avro; -import java.util.Random; import org.apache.avro.ipc.HttpServer; import org.apache.avro.ipc.HttpTransceiver; import org.apache.avro.specific.SpecificRequestor; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestProtocolSpecific.java Wed Oct 14 20:46:55 2009 @@ -35,18 +35,18 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.*; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.LineNumberReader; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.Random; public class TestProtocolSpecific { - private static final Logger LOG - = LoggerFactory.getLogger(TestProtocolSpecific.class); protected static final File SERVER_PORTS_DIR = new File(System.getProperty("test.dir", "/tmp")+"/server-ports/"); Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Wed Oct 14 20:46:55 2009 @@ -33,12 +33,8 @@ import org.apache.avro.test.Simple; import org.apache.avro.test.TestRecord; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class TestReflect { - private static final Logger LOG - = LoggerFactory.getLogger(TestProtocolSpecific.class); private static final File FILE = new File("src/test/schemata/simple.avpr"); private static final Protocol PROTOCOL; Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestSchema.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestSchema.java?rev=825270&r1=825269&r2=825270&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestSchema.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestSchema.java Wed Oct 14 20:46:55
{'source': 'Apache Software Foundation Public Mail Archives'}