Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # dev >> why isn't getSchema static?


+
Skye Wanderman-Milne 2012-11-21, 00:00
+
Philip Zeyliger 2012-11-21, 00:04
Copy link to this message
-
Re: why isn't getSchema static?
GeneratedClass.SCHEMA$, but yes that does work. Thanks! I guess with the
ugly variable name I assumed that wasn't meant to be exposed but it is
indeed public :)
On Tue, Nov 20, 2012 at 4:04 PM, Philip Zeyliger <[EMAIL PROTECTED]>wrote:

> GeneratedClass.$SCHEMA?
>
> I'm not on the most latest version, but I think that exists.
>
> -- Philip
>
> On Tue, Nov 20, 2012 at 4:00 PM, Skye Wanderman-Milne <[EMAIL PROTECTED]
> >wrote:
>
> > The SpecificCompiler produces a getSchema function, which looks like it
> > could be static but isn't. Is there a good reason for this?
> >
> > I bring this up because when writing to a data file, you have to provide
> a
> > schema to the DataFileWriter.create call, and using something like
> > MyGeneratedClass.getSchema() seems like the natural way to do this
> > (especially if you haven't created any instances of MyGeneratedClass
> yet).
> > Is there a good way to get the Schema object without creating an instance
> > or parsing the schema yourself?
> >
> > Skye
> >
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB