Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78E2165A1 for ; Sat, 2 Jul 2011 16:26:47 +0000 (UTC) Received: (qmail 28683 invoked by uid 500); 2 Jul 2011 16:26:46 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 28581 invoked by uid 500); 2 Jul 2011 16:26:46 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 28566 invoked by uid 99); 2 Jul 2011 16:26:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Jul 2011 16:26:45 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jakers@gmail.com designates 209.85.210.172 as permitted sender) Received: from [209.85.210.172] (HELO mail-iy0-f172.google.com) (209.85.210.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Jul 2011 16:26:40 +0000 Received: by iye7 with SMTP id 7so4394113iye.31 for ; Sat, 02 Jul 2011 09:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:references:from:content-type:x-mailer:in-reply-to :message-id:date:to:content-transfer-encoding:mime-version; bh=R+5cfLFrTBvKeqY3Erh1lRUi+J/7TYykAJ5HJfgnf8k=; b=vRtnILgrfWQP2RlSiMJ/dMrTyIJOxHX4aorpQknU7xP93b06cwoRvGtNJefY3voW+x Do0u0fwqt8Xc/pAZpUcc0Yh4mfJyeVzLpqvnmFxSc7elUwP5609f/aJbpvh8BUMTIGm4 v2mgxuyLZS7V+iyJG1+9IXwZVzw7LQLgDxE5Y= Received: by 10.42.196.69 with SMTP id ef5mr4300286icb.30.1309623979174; Sat, 02 Jul 2011 09:26:19 -0700 (PDT) Received: from [10.97.32.138] (mobile-166-137-137-116.mycingular.net [166.137.137.116]) by mx.google.com with ESMTPS id y1sm4551304ica.4.2011.07.02.09.26.17 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 02 Jul 2011 09:26:18 -0700 (PDT) Subject: Re: thrift generated java changes References: From: Jake Luciani Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (8J2) In-Reply-To: Message-Id: Date: Sat, 2 Jul 2011 12:26:08 -0400 To: "dev@cassandra.apache.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8J2) 0.8 uses thrift 0.6 =20 On Jul 2, 2011, at 11:40 AM, Joseph Stein wrote: > So I am working on https://issues.apache.org/jira/browse/CASSANDRA-2833 >=20 > And when I generate the cassandra.thrift file I am getting weird results a= nd > differences >=20 > Should I be modifying the CounterColumn.java by hand? >=20 > I am using thrift 0.5.0 and doing >=20 > thrift -gen java cassandra.thrift from the command line >=20 > some of the issues (as an example) >=20 > - tmpMap.put(_Fields.VALUE, new > org.apache.thrift.meta_data.FieldMetaData("value", > org.apache.thrift.TFieldRequirementType.REQUIRED, > - new > org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.= TType.I64))); > + Map<_Fields, FieldMetaData> tmpMap =3D new EnumMap<_Fields, > FieldMetaData>(_Fields.class); > + tmpMap.put(_Fields.NAME, new FieldMetaData("name", > TFieldRequirementType.REQUIRED, >=20 > public CounterColumn setName(byte[] name) { > - setName(name =3D=3D null ? (ByteBuffer)null : ByteBuffer.wrap(name));= > + setName(ByteBuffer.wrap(name)); > return this; > } >=20 > - /** Returns true if field name is set (has been assigned a value) and > false otherwise */ > + /** Returns true if field name is set (has been asigned a value) and > false otherwise */ >=20 > this last ones makes me suspect I am using the wrong thrift version and > maybe not the right commands? > http://wiki.apache.org/cassandra/InstallThriftleads me to what I did > but if there is something different or wrong with > what I am doing please let me know and I can update the wiki and get back o= n > track. >=20 > and all I did to the cassandra.thrift was: >=20 > - 2: required i64 value > + 2: optional i64 value, > + 3: optional double operand >=20 >=20 > Thanks! >=20 > /* > Joe Stein > http://www.linkedin.com/in/charmalloc > Twitter: @allthingshadoop > */