Hi all,

We didn't make Persistent extend directly from SpecificRecord as there
might be other Java beans not generated through Avro, and so the
schema could not be just handled by Avro. Let's say that in the future
we might want to implement some other persistent framework as Trevni,
Parquet, or whatever else, then we would create a different Persistent
extended class to implement this new persistency framework.
What we might be missing here is to define an standard API inside
Persistent so that all other new persistency classes also have it. I
think this is the problem right now with Persistent not having the
getSchema method. These are part of the things that need to be
addressed, and taken out of our to-do lists one-by-one.
Do you want to open a JIRA issue for this? Thanks! (:


Renato M.



2013/5/10 Lewis John Mcgibbney <[email protected]>:
> Hi All,
> As above, due to the API changes in 0.3, namely the decision to make
> PersistentBase [0] implement both Persistent [1] and Avro's SpecificRecord
> [2] as oppose to Persistent implementing SPecificRecord directly, we now
> get many instances such as
>
> org.apache.gora.persistency.Persistent.getSchema()Lorg/apache/avro/Schema;
> java.lang.NoSuchMethodError:
> org.apache.gora.persistency.Persistent.getSchema()Lorg/apache/avro/Schema;
>     at org.apache.gora.sql.store.SqlStore.put(SqlStore.java:591)
>     at
> org.apache.nutch.crawl.TestGenerator.testGenerateDomainLimit(TestGenerator.java:172)
>
> Where Persistent simply can't implement getSchema.
>
> For me, this is not a huge problem, but it is a problem for applications
> using the legacy gora-sql-0.1.1-incubating artifact who wish to upgrade to
> 0.3.
>
> Realistically, I don't know how many people are using this artifact. We do
> use it over in Nutch for our Unit testing so we have a problem there.
>
> The solution is to branch the gora trunk code (somewhere) and implement
> JOOQ then the SQL module again.
>
> Just thought I would give a heads up on this one.
>
> Thanks
> Lewis
>
> [0]
> http://svn.apache.org/viewvc/gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/impl/PersistentBase.java?revision=1405417&view=markup
> [1]
> http://svn.apache.org/viewvc/gora/trunk/gora-core/src/main/java/org/apache/gora/persistency/Persistent.java?view=markup
> [2]
> http://avro.apache.org/docs/1.3.3/api/java/index.html?org/apache/avro/specific/SpecificRecord.html
>
> --
> *Lewis*

Reply via email to