You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by "David W. Lotts (JIRA)" <ji...@apache.org> on 2016/08/03 20:53:20 UTC

[jira] [Updated] (RYA-135) Confusing configuration: CONF_TBL_PREFIX versus MONGO_COLLECTION_PREFIX versus RyaInstance

     [ https://issues.apache.org/jira/browse/RYA-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David W. Lotts updated RYA-135:
-------------------------------
    Description: 
These THREE constants [#1] [#2] [#3] are somewhat redundant.  They are the the same as the Rya Instance in most cases.  For MongoDB, the table prefix[#2] may be used incorrectly instead of the collection prefix[#1].

They should probably be melded into one config key and method and be called the rya instance.  The RyaDetails has this concept.  There is a ConfigUtil.getTablePrefix() and TablePrefixLayoutStrategy.getTablePrefix()  that should be refactored as part of this.

Some have suggested that the collection prefix is not needed at all since it is scoped inside a single Mongo Database which contains only one rya instance.

{1} {code} conf.set(MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX, "rya_");{code}
{anchor:2} {code}conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");{code}
{anchor:3} {code}TablePrefixLayoutStrategy.tablePrefix = RdfCloudTripleStoreConstants.TBL_PRFX_DEF; // = "rya_";{code}

Some unit tests set them as different values.

Look at  extras/indexing/src/main/java/mvm/rya/sail/config/RyaSailFactory.java around line 73 for a good example of the confusion.  Look for this comment:
// XXX Should(?) be MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX inside the if below.

One more redundant field: TablePrefixLayoutStrategy.tablePrefix   See RYA-138
It is defaults to "rya_" but has a getter and setter.
{code}
TablePrefixLayoutStrategy implements TableLayoutStrategy{
    private String tablePrefix = RdfCloudTripleStoreConstants.TBL_PRFX_DEF;
{code}


  was:
These two constants[1][2] are somewhat redundant.  They are the the same as the Rya Instance in most cases.  For MongoDB, the table prefix[2] may be used incorrectly instead of the collection prefix[1].

They should probably be melded into one config key and method and be called the rya instance.  The RyaDetails has this concept.  There is a ConfigUtil.getTablePrefix() that should be refactored as part of this.

Some have suggested that the collection prefix is not needed at all since it is scoped inside a single Mongo Database which contains only one rya instance.

[1]  conf.set(MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX, "rya_");
[2]  conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");

Some unit tests set them as different values.

Look at  extras/indexing/src/main/java/mvm/rya/sail/config/RyaSailFactory.java around line 73 for a good example of the confusion.  Look for this comment:
// XXX Should(?) be MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX inside the if below.


> Confusing configuration: CONF_TBL_PREFIX versus  MONGO_COLLECTION_PREFIX versus RyaInstance
> -------------------------------------------------------------------------------------------
>
>                 Key: RYA-135
>                 URL: https://issues.apache.org/jira/browse/RYA-135
>             Project: Rya
>          Issue Type: Improvement
>          Components: sail
>            Reporter: David W. Lotts
>            Priority: Minor
>
> These THREE constants [#1] [#2] [#3] are somewhat redundant.  They are the the same as the Rya Instance in most cases.  For MongoDB, the table prefix[#2] may be used incorrectly instead of the collection prefix[#1].
> They should probably be melded into one config key and method and be called the rya instance.  The RyaDetails has this concept.  There is a ConfigUtil.getTablePrefix() and TablePrefixLayoutStrategy.getTablePrefix()  that should be refactored as part of this.
> Some have suggested that the collection prefix is not needed at all since it is scoped inside a single Mongo Database which contains only one rya instance.
> {1} {code} conf.set(MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX, "rya_");{code}
> {anchor:2} {code}conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");{code}
> {anchor:3} {code}TablePrefixLayoutStrategy.tablePrefix = RdfCloudTripleStoreConstants.TBL_PRFX_DEF; // = "rya_";{code}
> Some unit tests set them as different values.
> Look at  extras/indexing/src/main/java/mvm/rya/sail/config/RyaSailFactory.java around line 73 for a good example of the confusion.  Look for this comment:
> // XXX Should(?) be MongoDBRdfConfiguration.MONGO_COLLECTION_PREFIX inside the if below.
> One more redundant field: TablePrefixLayoutStrategy.tablePrefix   See RYA-138
> It is defaults to "rya_" but has a getter and setter.
> {code}
> TablePrefixLayoutStrategy implements TableLayoutStrategy{
>     private String tablePrefix = RdfCloudTripleStoreConstants.TBL_PRFX_DEF;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)