There are code examples of Martins suggestion for the latter here

get -
https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L405

getFieldValue -
https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L435

getUnionSchema -
https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L617


These methods are called (sequentially) when we wish to write data into an
underlying data store using Avro.

hth

Lewis
On May 14, 2014 7:15 AM, "Martin Kleppmann" <[email protected]> wrote:

>  Hi James,
>
>  If you're using code generation to create Java classes for the Avro
> schemas, you should be able to just use Java's instanceof.
>
>  If you're using GenericRecord, you can use GenericRecord.getSchema() to
> determine the type of a particular record.
>
>  Hope that helps,
> Martin
>
>

Reply via email to