You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@avro.apache.org by Lewis John Mcgibbney <le...@gmail.com> on 2014/11/07 18:11:10 UTC

When to Stop Nesting?

Hi Folks,
I am currently modeling a chain of data structures which reference the next
sequentially.
This is as follows
Product [0]
   ProductType [1]
       Metadata [2]
         .... more nesting

The nesting does stop shortly after Metadata, however I am seeking advice
as to when nesting should stop?
In this case, Metadata is a multivalued metadata container... essentially a
Map.
I would quite like to keep the existing Metadata implementation, but then I
cannot reference this in my Avro Schema. I always need to model it, is this
correct?
If this is the case how do I go about adding the expressiveness of the
following methods in my AVSC?

public void addMetadata(String group, Metadata metadata) {

public void addMetadata(String key, String value) {

public void addMetadata(Hashtable<String, Object> metadata) {

As always, thank you guys very much for any direction.

BTW, Doug, if you are there and read this, I'm currently baking up an
implementation for pre-defined types within the execution of the
GoraCompiler. Thanks for the previous pointer on this one.

Lewis


[0]
https://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Product.java
[1]
https://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/ProductType.java
[2]
https://svn.apache.org/repos/asf/oodt/trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/Metadata.java

-- 
*Lewis*

Re: When to Stop Nesting?

Posted by Lewis John Mcgibbney <le...@gmail.com>.
For the "how do I go about nesting the expressiveness"

... this is of course more of our friends the Union.
Sometimes you can't see the wood for the trees!!!

On Fri, Nov 7, 2014 at 9:11 AM, Lewis John Mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Hi Folks,
> I am currently modeling a chain of data structures which reference the
> next sequentially.
> This is as follows
> Product [0]
>    ProductType [1]
>        Metadata [2]
>          .... more nesting
>
> The nesting does stop shortly after Metadata, however I am seeking advice
> as to when nesting should stop?
> In this case, Metadata is a multivalued metadata container... essentially
> a Map.
> I would quite like to keep the existing Metadata implementation, but then
> I cannot reference this in my Avro Schema. I always need to model it, is
> this correct?
> If this is the case how do I go about adding the expressiveness of the
> following methods in my AVSC?
>
> public void addMetadata(String group, Metadata metadata) {
>
> public void addMetadata(String key, String value) {
>
> public void addMetadata(Hashtable<String, Object> metadata) {
>
> As always, thank you guys very much for any direction.
>
> BTW, Doug, if you are there and read this, I'm currently baking up an
> implementation for pre-defined types within the execution of the
> GoraCompiler. Thanks for the previous pointer on this one.
>
> Lewis
>
>
> [0]
> https://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/Product.java
> [1]
> https://svn.apache.org/repos/asf/oodt/trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/ProductType.java
> [2]
> https://svn.apache.org/repos/asf/oodt/trunk/metadata/src/main/java/org/apache/oodt/cas/metadata/Metadata.java
>
> --
> *Lewis*
>



-- 
*Lewis*