You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by isper3at <gi...@git.apache.org> on 2018/09/14 16:52:22 UTC

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

GitHub user isper3at opened a pull request:

    https://github.com/apache/incubator-rya/pull/300

    RYA-135 Hard code triples collection

    There is no need for the triples collection to be configurable, as
    only the mongo database name will change the rya instance.
    
    <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
    
      http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
    ## Description
    >What Changed?
    [Brief Description of what changed]
    
    ### Tests
    >Coverage?
    
    ### Links
    [Jira](https://issues.apache.org/jira/browse/RYA-135)
    
    ### Checklist
    - [ ] Code Review
    - [x] Squash Commits
    
    #### People To Reivew
    @pujav65 
    @kchilton2 
    @ejwhite922 
    @jessehatfield 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/isper3at/incubator-rya RYA-135_collectionName

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-rya/pull/300.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #300
    
----
commit 942d9d62350815a33f28a22f101cdb5c262c70ed
Author: Andrew Smith <sm...@...>
Date:   2018-09-14T16:33:10Z

    RYA-135 Hard code triples collection
    
    There is no need for the triples collection to be configurable, as
    only the mongo database name will change the rya instance.

----


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217848617
  
    --- Diff: extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java ---
    @@ -73,12 +72,12 @@
         protected T storageStrategy;
     
         private MongoDbBatchWriter<DBObject> mongoDbBatchWriter;
    +    protected String collectionName;
    --- End diff --
    
    Is this field ever set anywhere?


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by isper3at <gi...@git.apache.org>.
Github user isper3at commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217849215
  
    --- Diff: extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java ---
    @@ -73,12 +72,12 @@
         protected T storageStrategy;
     
         private MongoDbBatchWriter<DBObject> mongoDbBatchWriter;
    +    protected String collectionName;
    --- End diff --
    
    yes, the implementations of AbstractMongoIndexer set it in the init() function.  I can't have it in the constructor because of the hadoop/reflexive construction


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by isper3at <gi...@git.apache.org>.
Github user isper3at commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217845838
  
    --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRdfConfiguration.java ---
    @@ -274,16 +274,17 @@ public boolean getUseAggregationPipeline() {
          * on their child subtrees.
          * @param value whether to use aggregation pipeline optimization.
          */
    -    public void setUseAggregationPipeline(boolean value) {
    +    public void setUseAggregationPipeline(final boolean value) {
             setBoolean(USE_AGGREGATION_PIPELINE, value);
         }
     
         @Override
         public List<Class<QueryOptimizer>> getOptimizers() {
    -        List<Class<QueryOptimizer>> optimizers = super.getOptimizers();
    +        final List<Class<QueryOptimizer>> optimizers = super.getOptimizers();
             if (getUseAggregationPipeline()) {
    -            Class<?> cl = AggregationPipelineQueryOptimizer.class;
    +            final Class<?> cl = AggregationPipelineQueryOptimizer.class;
                 @SuppressWarnings("unchecked")
    +            final
    --- End diff --
    
    fixed


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217848961
  
    --- Diff: extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java ---
    @@ -73,12 +72,12 @@
         protected T storageStrategy;
     
         private MongoDbBatchWriter<DBObject> mongoDbBatchWriter;
    +    protected String collectionName;
    --- End diff --
    
    Oh, the subclasses change it directly. That's unclear, why not leave it the way it was?


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by isper3at <gi...@git.apache.org>.
Github user isper3at closed the pull request at:

    https://github.com/apache/incubator-rya/pull/300


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by isper3at <gi...@git.apache.org>.
Github user isper3at commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217849654
  
    --- Diff: extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java ---
    @@ -73,12 +72,12 @@
         protected T storageStrategy;
     
         private MongoDbBatchWriter<DBObject> mongoDbBatchWriter;
    +    protected String collectionName;
    --- End diff --
    
    getCollectionName()  would build the collection name with the collection suffix and rya prefix


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217847623
  
    --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRdfConfiguration.java ---
    @@ -197,22 +195,22 @@ public void setMongoPassword(final String password) {
          * @return The name of the Rya instance to connect to. (default: rya)
          */
         public String getRyaInstanceName() {
    -        return get(MONGO_COLLECTION_PREFIX, "rya");
    +        return get(MONGO_DB_NAME, "rya");
    --- End diff --
    
    So an application can say set 
    
    setMongoDBName("a")
    setRyaInstanceName("b")
    
    And then getMongoDBName() returns "b"? That's unexpected.


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217849376
  
    --- Diff: extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java ---
    @@ -73,12 +72,12 @@
         protected T storageStrategy;
     
         private MongoDbBatchWriter<DBObject> mongoDbBatchWriter;
    +    protected String collectionName;
    --- End diff --
    
    How did it work before, then?


---

[GitHub] incubator-rya issue #300: RYA-135 Hard code triples collection

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/incubator-rya/pull/300
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/<h2>Failed Tests: <span class='status-failure'>4</span></h2><h3><a name='incubator-rya-master-with-optionals-pull-requests/org.apache.rya:mongodb.rya' /><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$mongodb.rya/testReport'>incubator-rya-master-with-optionals-pull-requests/org.apache.rya:mongodb.rya</a>: <span class='status-failure'>2</span></h3><ul><li><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$mongodb.rya/testReport/org.apache.rya.mongodb/MongoDBRdfConfigurationTest/testBuilder/'><strong>org.apache.rya.mongodb.MongoDBRdfConfigurationTest.testBuilder</strong></a></li><li><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$mongodb.rya/testReport/org.apache.rya.mongodb/MongoDBRdfConfigurationTest/testBuilderFromProperti
 es/'><strong>org.apache.rya.mongodb.MongoDBRdfConfigurationTest.testBuilderFromProperties</strong></a></li></ul><h3><a name='incubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.indexing' /><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$rya.indexing/testReport'>incubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.indexing</a>: <span class='status-failure'>2</span></h3><ul><li><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$rya.indexing/testReport/org.apache.rya.indexing.mongo/MongoIndexingConfigurationTest/testBuilder/'><strong>org.apache.rya.indexing.mongo.MongoIndexingConfigurationTest.testBuilder</strong></a></li><li><a href='https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/766/org.apache.rya$rya.indexing/testReport/org.apache.rya.indexing.mongo/MongoIndexingConfigurationTest/testBuilderFromProperti
 es/'><strong>org.apache.rya.indexing.mongo.MongoIndexingConfigurationTest.testBuilderFromProperties</strong></a></li></ul>



---

[GitHub] incubator-rya issue #300: RYA-135 Hard code triples collection

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/incubator-rya/pull/300
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/775/<h2>Build result: FAILURE</span></h2>[...truncated 96.58 KB...][INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 03:11 min[INFO] Finished at: 2018-09-14T21:56:57+00:00[INFO] Final Memory: 162M/2086M[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.5:jar (default-jar) on project rya.api: Error assembling JAR: Failed to create directory: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests@2/common/rya.api/target/maven-archiver -> [Help 1][ERROR] [ERROR] To see the full stack trace of th
 e errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR]   mvn <goals> -rf :rya.apichannel stoppedSetting status of 010f40de276b2152451a42e1c830a2ad88b94860 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/775/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by ejwhite922 <gi...@git.apache.org>.
Github user ejwhite922 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217797943
  
    --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRdfConfiguration.java ---
    @@ -274,16 +274,17 @@ public boolean getUseAggregationPipeline() {
          * on their child subtrees.
          * @param value whether to use aggregation pipeline optimization.
          */
    -    public void setUseAggregationPipeline(boolean value) {
    +    public void setUseAggregationPipeline(final boolean value) {
             setBoolean(USE_AGGREGATION_PIPELINE, value);
         }
     
         @Override
         public List<Class<QueryOptimizer>> getOptimizers() {
    -        List<Class<QueryOptimizer>> optimizers = super.getOptimizers();
    +        final List<Class<QueryOptimizer>> optimizers = super.getOptimizers();
             if (getUseAggregationPipeline()) {
    -            Class<?> cl = AggregationPipelineQueryOptimizer.class;
    +            final Class<?> cl = AggregationPipelineQueryOptimizer.class;
                 @SuppressWarnings("unchecked")
    +            final
    --- End diff --
    
    Move `final` to the same line as the variable.


---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217846855
  
    --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/AbstractMongoDBRdfConfigurationBuilder.java ---
    @@ -182,8 +167,7 @@ private C getConf(C conf) {
                 conf.setMongoPassword(pass);
             }
             conf.setMongoDBName(mongoDBName);
    -        conf.setRyaInstanceName(mongoCollectionPrefix);
    -        conf.setTablePrefix(mongoCollectionPrefix);
    +        conf.setRyaInstanceName(mongoDBName);
    --- End diff --
    
    If Mongo DB Name and Rya Instance Name are always the same, why not just have one of those fields?


---

[GitHub] incubator-rya issue #300: RYA-135 Hard code triples collection

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/incubator-rya/pull/300
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/773/<h2>Build result: FAILURE</span></h2>[...truncated 1.38 MB...][INFO] Apache Rya Spark Support ........................... SKIPPED[INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 17:17 min[INFO] Finished at: 2018-09-14T21:56:49+00:00[INFO] Final Memory: 256M/2815M[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.4.3:shade (map-reduce) on project rya.indexing: Error creating shaded jar: No space left on device -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] 
 Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR]   mvn <goals> -rf :rya.indexingchannel stoppedSetting status of 9286de02cc24952bd3550686866d755c90c78fb6 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/773/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---

[GitHub] incubator-rya pull request #300: RYA-135 Hard code triples collection

Posted by isper3at <gi...@git.apache.org>.
Github user isper3at commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/300#discussion_r217847761
  
    --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRdfConfiguration.java ---
    @@ -197,22 +195,22 @@ public void setMongoPassword(final String password) {
          * @return The name of the Rya instance to connect to. (default: rya)
          */
         public String getRyaInstanceName() {
    -        return get(MONGO_COLLECTION_PREFIX, "rya");
    +        return get(MONGO_DB_NAME, "rya");
    --- End diff --
    
    yeah that's a good point


---

[GitHub] incubator-rya issue #300: RYA-135 Hard code triples collection

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/incubator-rya/pull/300
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/777/<h2>Build result: FAILURE</span></h2>[...truncated 1.44 MB...][INFO] Apache Rya Web Projects ............................ SKIPPED[INFO] Apache Rya Web Implementation ...................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 17:21 min[INFO] Finished at: 2018-09-14T22:43:30+00:00[INFO] Final Memory: 183M/3421M[INFO] ------------------------------------------------------------------------Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:testResources (default-testResources) on project rya.pcj.fluo.client: No space left on device -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using th
 e -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR]   mvn <goals> -rf :rya.pcj.fluo.clientchannel stoppedSetting status of 3593c535ddf387d656cde87e793be7bb8980289e to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/777/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---