[ https://issues.apache.org/jira/browse/RYA-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310195#comment-16310195 ]
ASF GitHub Bot commented on RYA-414: ------------------------------------ Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/256#discussion_r159512745 --- Diff: dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/StatefulMongoDBRdfConfiguration.java --- @@ -0,0 +1,102 @@ +/** + * 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. + */ +package org.apache.rya.mongodb; + +import static java.util.Objects.requireNonNull; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; + +import com.mongodb.MongoClient; + +import edu.umd.cs.findbugs.annotations.DefaultAnnotation; +import edu.umd.cs.findbugs.annotations.NonNull; + +/** + * A {@link MongoDBRdfConfiguration} that is used to hold onto state that is pass into Rya components that accept + * {@link Configuration} objects. + * </p> + * HACK: + * This class is part of a hack to get around how Rya uses reflection to initialize indexers, optimizers, etc. --- End diff -- There isn't really a correct solution at the moment. The problem is outlined in that documentation, so I think that's enough. > Fix inconsistent method of using MongoClient within a Sail object > ----------------------------------------------------------------- > > Key: RYA-414 > URL: https://issues.apache.org/jira/browse/RYA-414 > Project: Rya > Issue Type: Bug > Reporter: Andrew Smith > Assignee: Kevin Chilton > Priority: Blocker > > We've decided to introduce a stateful configuration object that is used to > hold onto objects that needs to be shared across components within a Sail > object in favor of having a static holder. The static holder limited our > ability to use more than a single Sail object within a single JVM because all > of those Sail objects would all have to access the same Mongo DB repository. -- This message was sent by Atlassian JIRA (v6.4.14#64029)