Return-Path: Delivered-To: apmail-incubator-cassandra-dev-archive@minotaur.apache.org Received: (qmail 77998 invoked from network); 3 Dec 2009 19:01:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 19:01:21 -0000 Received: (qmail 47168 invoked by uid 500); 3 Dec 2009 19:01:20 -0000 Delivered-To: apmail-incubator-cassandra-dev-archive@incubator.apache.org Received: (qmail 47141 invoked by uid 500); 3 Dec 2009 19:01:20 -0000 Mailing-List: contact cassandra-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-dev@incubator.apache.org Received: (qmail 47131 invoked by uid 99); 3 Dec 2009 19:01:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 19:01:20 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 19:01:18 +0000 Received: by fg-out-1718.google.com with SMTP id e21so631185fga.0 for ; Thu, 03 Dec 2009 11:00:56 -0800 (PST) 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 :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=JTaumhQe2FKYU6dYo+JLk7JuXqH7qFK6WKL4QxUFTvo=; b=knuW+uBb9zMDm+MMVmBESKxoTpgZQexEVoSuDRJKiMX9T+4cOjNfgTqdA32Y6Mgbz8 YrEY1oGqF0Npgsinx1p7JKyFHgpiLSH41klgwYSfegg1n8h5Chrh2+VSifeFysPZ8S9U DEsOVzrU9/xPs7axh7tJ5zKfeBgkWbxasgd7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Sl3K6eocGtiwDKemxdgI0bq3oS3AP4czZJu0SJmmuF4frFNNrR/oaqlBwW1klD1If3 C1W23MMLGToUUOU9FE71f0kgayUhM59OyZNRCuyW0tTcIrKc/i/G5upIE8PjbRmIzqkF 0FEu3RAMBzshvCaF656bNFllsyPhcbtDJ37i0= MIME-Version: 1.0 Received: by 10.216.89.130 with SMTP id c2mr632395wef.44.1259866856513; Thu, 03 Dec 2009 11:00:56 -0800 (PST) In-Reply-To: <1c6fcff0912031036v2b60fbccr8baf77e2b2266129@mail.gmail.com> References: <87eineoaus.fsf@lifelogs.com> <1c6fcff0912030442r6c50d782pbe257e2d42d20683@mail.gmail.com> <87k4x4gmkl.fsf@lifelogs.com> <1c6fcff0912031036v2b60fbccr8baf77e2b2266129@mail.gmail.com> From: Jonathan Ellis Date: Thu, 3 Dec 2009 13:00:35 -0600 Message-ID: Subject: Re: build fails with "ant clean gen-thrift-java build" To: cassandra-dev@incubator.apache.org, gdusbabek@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable i think historically there has been a no-arg constructor and one w/ all arg= s. imo correct behavior is one with only req'd args, and one w/ all. rule of thumb: if it breaks cassandra, it's a bug. :) On Thu, Dec 3, 2009 at 12:36 PM, Gary Dusbabek wrote: > 2009/12/3 Ted Zlatanov : >> On Thu, 3 Dec 2009 06:42:27 -0600 Gary Dusbabek wr= ote: >> >> GD> This seems to be a Thrift regression. =A0It is failing to generate a= ny >> GD> but the no-arg constructors. =A0I saw this about a week ago but neve= r >> GD> got around to filing a Thrift ticket against it. >> >> GD> Your best bet, other than rolling back to an older version of thrift= , >> GD> is to add the constructors yourself from the old code. >> >> I could also file a Thrift bug. =A0Or are you implying you'll do it? > > If it is a bug. =A0I never made time to do the research, but here is > what seems to be happening... > > Optional members are not included in the constructor, required members > are. =A0I'm not sure if they ever were, and the constructors were just > manually added after generation or not. > > E.g., > > struct ColumnParent1 { > =A0 =A03: required string column_family, > =A0 =A04: optional binary super_column, > } > > generates: > > =A0public ColumnParent1(String column_family) > =A0{ > =A0 =A0this(); > =A0 =A0this.column_family =3D column_family; > =A0} > > whereas: > > struct ColumnParent3 { > =A0 =A03: required string column_family, > =A0 =A04: required binary super_column, > } > > generates: > > =A0public ColumnParent3(String column_family, byte[] super_column) > =A0{ > =A0 =A0this(); > =A0 =A0this.column_family =3D column_family; > =A0 =A0this.super_column =3D super_column; > =A0} > > > Changing the optional fields to required solves the problem and > creates the necessary constructors, or the required constructors can > be added. > > Unfortunately, I'm a thrift noob too. =A0Old-timers, what is the correct = behavior? > > Gary. >