Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 107334B83 for ; Tue, 31 May 2011 23:26:41 +0000 (UTC) Received: (qmail 2716 invoked by uid 500); 31 May 2011 23:26:39 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 2695 invoked by uid 500); 31 May 2011 23:26:39 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 2687 invoked by uid 99); 31 May 2011 23:26:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 23:26:38 +0000 X-ASF-Spam-Status: No, hits=4.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HK_RANDOM_ENVFROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of teddyyyy123@gmail.com designates 209.85.160.172 as permitted sender) Received: from [209.85.160.172] (HELO mail-gy0-f172.google.com) (209.85.160.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 23:26:32 +0000 Received: by gyf3 with SMTP id 3so2725319gyf.31 for ; Tue, 31 May 2011 16:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=1wnPE5+UQJ1eaET09FFPJfnMb8AC6j/n1H4u76CGuYk=; b=iZn5aI1c7WHdzV4MVCd/9zND0+EjnbunLUuWYCZUKz606BvoV5/CqIT5g1nAc2fiw7 O+p9jNveTS02lEuE8jONxOJwsxSLt7gdRg/7Jnk0CPZx9FsvnkeykgmBpqGIogrFA2dX h3AOsq1b0LaoZqFCrHW71YP2U/keL8HJx79Xk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=RFzNjmN6rdZ/EocX5hvLNgb6AdD9Fx1058L11t16ygiYF6NUD8UTLJaOHT3H6MBR0G 9SgG5tUHCc+5j+hFcOQICqDLfCEFfnv8skbOuRlL1UF7Lz3mFKx4UN10qSLrkY2PVHko y7UVJd4xG9iIhNihuocc6iBEs20PRgTJWXCxM= MIME-Version: 1.0 Received: by 10.236.154.1 with SMTP id g1mr7808272yhk.112.1306884371481; Tue, 31 May 2011 16:26:11 -0700 (PDT) Received: by 10.236.199.72 with HTTP; Tue, 31 May 2011 16:26:11 -0700 (PDT) Date: Tue, 31 May 2011 16:26:11 -0700 Message-ID: Subject: "include" ability in schema file? From: Yang To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf302d49c6b9852604a49aba8d --20cf302d49c6b9852604a49aba8d Content-Type: text/plain; charset=ISO-8859-1 I have a protocol schema hello.avpr { .... types: { { name : input_msg , type: record : fields [ { name: date , type int }, { name :msg, type: string} ] } } } now if I need to serialize the record "input_msg", I'm going to need its schema, so I'd need to pass a schema obj to DataFileWriter. but how can I parse the schema out from schema file? the schema for "input_msg" is not a standalone file. I would like a way to write the type of "input_msg" in a standalone file, and then reference/include that from my hello.avpr. is this possible? also btw, for an avro-generate object class, would it be better to make the getSchema() method static? that way I can get its schema without creating an actual obj thanks Yang --20cf302d49c6b9852604a49aba8d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have a protocol schema =A0hello.avpr

{ ....
= types: {
=A0 =A0{ name : input_msg , =A0type: record : fields [
=A0 =A0 =A0 =A0 { name: date , type int },
=A0 =A0 =A0 = =A0{ name :msg, type: string}
=A0 =A0 ]
=A0 }

}

}


now if I need to serializ= e the record "input_msg", I'm going to need its schema,
=
so I'd need to pass a schema obj to DataFileWriter. but how can I parse= the schema out from schema file?
the schema for "input_msg&= quot; is not a standalone file.=A0

I would like a = way to write the type of "input_msg" in a standalone file, and th= en reference/include that from my hello.avpr.
is this possible?


also btw, fo= r an avro-generate object class, would it be better to make the getSchema()= method static?
that way I can get its schema without creating an= actual obj


thanks
Yang

--20cf302d49c6b9852604a49aba8d--