Return-Path: X-Original-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A9B19815 for ; Mon, 5 Mar 2012 17:12:59 +0000 (UTC) Received: (qmail 64324 invoked by uid 500); 5 Mar 2012 17:12:59 -0000 Delivered-To: apmail-incubator-giraph-user-archive@incubator.apache.org Received: (qmail 64243 invoked by uid 500); 5 Mar 2012 17:12:58 -0000 Mailing-List: contact giraph-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: giraph-user@incubator.apache.org Delivered-To: mailing list giraph-user@incubator.apache.org Received: (qmail 64235 invoked by uid 99); 5 Mar 2012 17:12:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 17:12:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [140.203.201.101] (HELO mx2.nuigalway.ie) (140.203.201.101) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 17:12:49 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAHvzVE+My8qD/2dsb2JhbABDtXGBfQEBBAE6RAsLRleIGwW3eYJUimeCP2MElT6QEoJj X-IronPort-AV: E=Sophos;i="4.73,534,1325462400"; d="scan'208";a="23153618" Received: from vmserver66.nuigalway.ie (HELO vmit04.deri.ie) ([140.203.202.131]) by mx2.nuigalway.ie with ESMTP; 05 Mar 2012 17:12:26 +0000 Received: from chapultepec.ie.deri.local (deri-dmz2.nuigalway.ie [140.203.154.5]) by vmit04.deri.ie (Postfix) with ESMTPSA id CA77E984D8 for ; Mon, 5 Mar 2012 16:55:54 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Error in instantiating custom Vertex class via InternalVertexRunner.run From: Benjamin Heitmann In-Reply-To: <4F51549C.4090409@apache.org> Date: Mon, 5 Mar 2012 17:12:26 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <965BEC26-D863-490E-AD9A-6F54ADBD4F71@deri.org> References: <4F51549C.4090409@apache.org> To: giraph-user@incubator.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org On 2 Mar 2012, at 23:15, Avery Ching wrote: > If I'm reading this right, you're using a public abstract class for = the vertex. The vertex class must be instantiable and cannot be = abstract. >=20 > Hope that helps, Thanks, that was the right issue to point out. I removed the "abstract" = keyword, which solved the issue.=20 (Of course, then I found lots of other bugs in my code... ;)=20 After adding the abstract keyword, I ran into some problems in = overriding "package private methods" of BasicVertex.=20 Almost all of the abstract methods in BasicVertex are declared as = public, e.g. public abstract Iterable getMessages(); However, there are two methods which do not have the public keyword:=20 abstract void putMessages(Iterable messages); abstract void releaseResources(); I am guessing that this inconsistency is just on oversight.=20 However, if I understood everything correctly, then this provides = problems for developers who want to implement BasicVertex=20 *outside* of the Giraph source tree. As the public keyword is missing, = it is not possible to override these two method signatures from another package. The result, is that if I do not need = IntIntNullIntVertex, but instead IntMyStateNullIntVertex which = implements BasicVertex,=20 then I will need to either copy BasicVertex to my own project, or I need = to copy IntMyStateNullIntVertex to my local Giraph source tree.=20 Is that the right reasoning, or is there some other pattern for using = BasicVertex which I missed ?=20 Should I file a bug report somewhere ?=20 cheers, Benjamin.=20