Return-Path: Delivered-To: apmail-hadoop-avro-user-archive@minotaur.apache.org Received: (qmail 94954 invoked from network); 1 Aug 2009 00:06:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Aug 2009 00:06:22 -0000 Received: (qmail 73827 invoked by uid 500); 1 Aug 2009 00:06:23 -0000 Delivered-To: apmail-hadoop-avro-user-archive@hadoop.apache.org Received: (qmail 73765 invoked by uid 500); 1 Aug 2009 00:06:23 -0000 Mailing-List: contact avro-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: avro-user@hadoop.apache.org Delivered-To: mailing list avro-user@hadoop.apache.org Received: (qmail 73756 invoked by uid 99); 1 Aug 2009 00:06:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 00:06:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gmporter@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-px0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 00:06:14 +0000 Received: by pxi1 with SMTP id 1so1628542pxi.5 for ; Fri, 31 Jul 2009 17:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=b25VgzUZVls+v7Gl5SEsUxQCezmhARv7QGT981zyGcY=; b=xSCAgrHMKS9hAFHRoubMAUk0Y3Wzx+FVl+YA6W64sLymsvxlTdqPDM2388+KCWgY3U UoRtNUVXCoSZgcEdhP7pY+yLTTmxHSw9Oeb3cC/nvY6TyS4b0tupajBFRndqKvkuXNBc XamR08TrnflalD+IITzNcJNsTKvaCNRZgoLvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=eC6rvL1mlGMTsgA2IC8Vgr9F0DLkogvQhexRtpE/0dAdgU3ZLy1vy9jfxbRYH87mtg dPHw+XkJSUGaBfQb2w7qF3y9wz8b32lNNrXYqqDz5khs/VfqzsMpDAGS2OKHT02yOEJd e1FZuwmc9ClPjm8FhkUVT46yka2so76xrZGsU= MIME-Version: 1.0 Received: by 10.114.153.17 with SMTP id a17mr4384650wae.162.1249085152856; Fri, 31 Jul 2009 17:05:52 -0700 (PDT) In-Reply-To: <4A73843F.6030207@apache.org> References: <4A73843F.6030207@apache.org> Date: Fri, 31 Jul 2009 17:05:52 -0700 Message-ID: Subject: Re: How to define an RPC message with a void return type From: George Porter To: avro-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The issue showed up when I was implementing put() on the server side. I had written the method like this: {code} @Override public Void put(ByteBuffer key, ByteBuffer value) throws AvroRemoteExcept= ion { kvstore.put(key, value); } {code} and was getting compiler errors. I just added a "return null;" and it fixed the problem. I guess that I had expected the compiler to produce a method with a return type of 'void', rather than 'Void'. Thanks, George On Fri, Jul 31, 2009 at 4:54 PM, Doug Cutting wrote: > George Porter wrote: >> >> The 'put' message gets compiled into the following signature in Java: >> >> {code} >> Void put(ByteBuffer key, ByteBuffer value) >> =A0 =A0throws AvroRemoteException; >> {code} >> >> Unfortunately, Void isn't an instantiatable type in Java. =A0Any thought= s? > > When do you need to instantiate a Void? =A0I'm not saying this isn't a > problem, I'm just not yet sure where the problem is. > > Doug >