You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by jasonyang1686 <gi...@git.apache.org> on 2016/05/16 07:48:53 UTC

[GitHub] incubator-rya pull request: FederatedRyaExample

GitHub user jasonyang1686 opened a pull request:

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

    FederatedRyaExample

    Some example codes using federated Rya with current Rya state.

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

    $ git pull https://github.com/jasonyang1686/incubator-rya patch-1

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

    https://github.com/apache/incubator-rya/pull/41.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 #41
    
----
commit 7ed4e1bc027d982cf126e52052855fbc1afc13fe
Author: jasonyang1686 <ja...@gmail.com>
Date:   2016-05-16T07:42:22Z

    A federated example for Rya in mock instance mode

commit 30bd0398706acdd9c5922c3da8b76c887ab6e35a
Author: jasonyang1686 <ja...@gmail.com>
Date:   2016-05-16T07:45:33Z

    A federated example using different table prefix

commit 5828d629ccc5374b6cbeb9562b50bd8b1c4d5c32
Author: jasonyang1686 <ja...@gmail.com>
Date:   2016-05-16T07:46:26Z

    A federated example for Rya in real instance mode

commit 86507edeefc70046bca67c4331bb67494a4e2721
Author: jasonyang1686 <ja...@gmail.com>
Date:   2016-05-16T07:47:07Z

    Update FederatedRyaMockExample_diff_prefix.java

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #41: FederatedRyaExample

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

    https://github.com/apache/incubator-rya/pull/41#discussion_r65613562
  
    --- Diff: extras/indexingExample/src/main/java/FederatedRyaMockExample.java ---
    @@ -0,0 +1,297 @@
    +/*
    + * 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.
    + */
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +import org.apache.accumulo.core.client.AccumuloException;
    +import org.apache.accumulo.core.client.AccumuloSecurityException;
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.accumulo.core.client.TableExistsException;
    +import org.apache.accumulo.core.client.TableNotFoundException;
    +import org.apache.accumulo.core.client.mock.MockInstance;
    +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
    +import org.apache.commons.lang.Validate;
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.log4j.Logger;
    +import org.openrdf.model.URI;
    +import org.openrdf.model.ValueFactory;
    +import org.openrdf.model.impl.LiteralImpl;
    +import org.openrdf.model.impl.URIImpl;
    +import org.openrdf.model.vocabulary.RDF;
    +import org.openrdf.model.vocabulary.RDFS;
    +import org.openrdf.query.BindingSet;
    +import org.openrdf.query.MalformedQueryException;
    +import org.openrdf.query.QueryEvaluationException;
    +import org.openrdf.query.QueryLanguage;
    +import org.openrdf.query.QueryResultHandlerException;
    +import org.openrdf.query.TupleQuery;
    +import org.openrdf.query.TupleQueryResultHandler;
    +import org.openrdf.query.TupleQueryResultHandlerException;
    +import org.openrdf.query.Update;
    +import org.openrdf.query.UpdateExecutionException;
    +import org.openrdf.repository.Repository;
    +import org.openrdf.repository.RepositoryConnection;
    +import org.openrdf.repository.RepositoryException;
    +import org.openrdf.repository.sail.SailRepository;
    +import org.openrdf.repository.sail.SailRepositoryConnection;
    +import org.openrdf.rio.RDFFormat;
    +import org.openrdf.rio.RDFParseException;
    +import org.openrdf.sail.Sail;
    +import org.openrdf.sail.federation.Federation;
    +import org.openrdf.sail.memory.MemoryStore;
    +
    +import com.google.common.base.Optional;
    +
    +import mvm.rya.accumulo.AccumuloRdfConfiguration;
    +import mvm.rya.api.RdfCloudTripleStoreConfiguration;
    +import mvm.rya.api.persist.RyaDAOException;
    +import mvm.rya.indexing.accumulo.ConfigUtils;
    +import mvm.rya.indexing.accumulo.geo.GeoConstants;
    +import mvm.rya.indexing.external.tupleSet.PcjTables;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjException;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjVarOrderFactory;
    +import mvm.rya.rdftriplestore.inference.InferenceEngineException;
    +import mvm.rya.sail.config.RyaSailFactory;
    +
    +public class FederatedRyaMockExample {
    +	private static final Logger log = Logger.getLogger(RyaDirectExample.class);
    --- End diff --
    
    change the logging to reference the right class


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya issue #41: FederatedRyaExample

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

    https://github.com/apache/incubator-rya/pull/41
  
    I'm not sure that we want to add all three of these examples.  There is a lot of duplicated code between them.  
    I think that you likely would only want FederatedRyaMockExample_diff_prefix.java (though maybe rename that to FederatedRyaMockExample.java), and the sesame integration.  If you could combine the diff prefix and the sesame integration into the same example (so that they don't duplicate code anymore), I will merge this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #41: FederatedRyaExample

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

    https://github.com/apache/incubator-rya/pull/41#discussion_r65614221
  
    --- Diff: extras/indexingExample/src/main/java/FederatedRyaRealExample.java ---
    @@ -0,0 +1,281 @@
    +/*
    + * 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.
    + */
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +import org.apache.accumulo.core.client.AccumuloException;
    +import org.apache.accumulo.core.client.AccumuloSecurityException;
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.accumulo.core.client.Instance;
    +import org.apache.accumulo.core.client.TableExistsException;
    +import org.apache.accumulo.core.client.TableNotFoundException;
    +import org.apache.accumulo.core.client.ZooKeeperInstance;
    +import org.apache.accumulo.core.client.mock.MockInstance;
    +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
    +import org.apache.commons.lang.Validate;
    +import org.apache.zookeeper.client.*;
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.log4j.Logger;
    +import org.openrdf.model.URI;
    +import org.openrdf.model.ValueFactory;
    +import org.openrdf.model.impl.LiteralImpl;
    +import org.openrdf.model.impl.URIImpl;
    +import org.openrdf.model.vocabulary.RDF;
    +import org.openrdf.model.vocabulary.RDFS;
    +import org.openrdf.query.BindingSet;
    +import org.openrdf.query.MalformedQueryException;
    +import org.openrdf.query.QueryEvaluationException;
    +import org.openrdf.query.QueryLanguage;
    +import org.openrdf.query.QueryResultHandlerException;
    +import org.openrdf.query.TupleQuery;
    +import org.openrdf.query.TupleQueryResultHandler;
    +import org.openrdf.query.TupleQueryResultHandlerException;
    +import org.openrdf.query.Update;
    +import org.openrdf.query.UpdateExecutionException;
    +import org.openrdf.repository.Repository;
    +import org.openrdf.repository.RepositoryConnection;
    +import org.openrdf.repository.RepositoryException;
    +import org.openrdf.repository.http.HTTPRepository;
    +import org.openrdf.repository.sail.SailRepository;
    +import org.openrdf.repository.sail.SailRepositoryConnection;
    +import org.openrdf.rio.RDFFormat;
    +import org.openrdf.rio.RDFParseException;
    +import org.openrdf.sail.Sail;
    +import org.openrdf.sail.federation.Federation;
    +import org.openrdf.sail.memory.MemoryStore;
    +
    +import com.google.common.base.Optional;
    +
    +import mvm.rya.accumulo.AccumuloRdfConfiguration;
    +import mvm.rya.api.RdfCloudTripleStoreConfiguration;
    +import mvm.rya.api.persist.RyaDAOException;
    +import mvm.rya.indexing.accumulo.ConfigUtils;
    +import mvm.rya.indexing.accumulo.geo.GeoConstants;
    +import mvm.rya.indexing.external.tupleSet.PcjTables;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjException;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjVarOrderFactory;
    +import mvm.rya.rdftriplestore.inference.InferenceEngineException;
    +import mvm.rya.sail.config.RyaSailFactory;
    +
    +public class FederatedRyaRealExample{
    +	private static final Logger log = Logger.getLogger(RyaDirectExample.class);
    +
    +	//
    +	// Connection configuration parameters
    +	//
    +
    +	private static final boolean USE_MOCK_INSTANCE = false;
    +	private static final boolean PRINT_QUERIES = true;
    +	private static final String INSTANCE = "dev";
    +	private static final String RYA_TABLE_PREFIX = "rya_";
    +	private static final String AUTHS = "";
    +	//the second VM's IP is 192.168.33.20
    +	private static final String SESAME_SERVER="http://192.168.33.20:8080/openrdf-sesame";
    --- End diff --
    
    don't check in ips


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #41: FederatedRyaExample

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

    https://github.com/apache/incubator-rya/pull/41#discussion_r65614291
  
    --- Diff: extras/indexingExample/src/main/java/FederatedRyaRealExample.java ---
    @@ -0,0 +1,281 @@
    +/*
    + * 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.
    + */
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +import org.apache.accumulo.core.client.AccumuloException;
    +import org.apache.accumulo.core.client.AccumuloSecurityException;
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.accumulo.core.client.Instance;
    +import org.apache.accumulo.core.client.TableExistsException;
    +import org.apache.accumulo.core.client.TableNotFoundException;
    +import org.apache.accumulo.core.client.ZooKeeperInstance;
    +import org.apache.accumulo.core.client.mock.MockInstance;
    +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
    +import org.apache.commons.lang.Validate;
    +import org.apache.zookeeper.client.*;
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.log4j.Logger;
    +import org.openrdf.model.URI;
    +import org.openrdf.model.ValueFactory;
    +import org.openrdf.model.impl.LiteralImpl;
    +import org.openrdf.model.impl.URIImpl;
    +import org.openrdf.model.vocabulary.RDF;
    +import org.openrdf.model.vocabulary.RDFS;
    +import org.openrdf.query.BindingSet;
    +import org.openrdf.query.MalformedQueryException;
    +import org.openrdf.query.QueryEvaluationException;
    +import org.openrdf.query.QueryLanguage;
    +import org.openrdf.query.QueryResultHandlerException;
    +import org.openrdf.query.TupleQuery;
    +import org.openrdf.query.TupleQueryResultHandler;
    +import org.openrdf.query.TupleQueryResultHandlerException;
    +import org.openrdf.query.Update;
    +import org.openrdf.query.UpdateExecutionException;
    +import org.openrdf.repository.Repository;
    +import org.openrdf.repository.RepositoryConnection;
    +import org.openrdf.repository.RepositoryException;
    +import org.openrdf.repository.http.HTTPRepository;
    +import org.openrdf.repository.sail.SailRepository;
    +import org.openrdf.repository.sail.SailRepositoryConnection;
    +import org.openrdf.rio.RDFFormat;
    +import org.openrdf.rio.RDFParseException;
    +import org.openrdf.sail.Sail;
    +import org.openrdf.sail.federation.Federation;
    +import org.openrdf.sail.memory.MemoryStore;
    +
    +import com.google.common.base.Optional;
    +
    +import mvm.rya.accumulo.AccumuloRdfConfiguration;
    +import mvm.rya.api.RdfCloudTripleStoreConfiguration;
    +import mvm.rya.api.persist.RyaDAOException;
    +import mvm.rya.indexing.accumulo.ConfigUtils;
    +import mvm.rya.indexing.accumulo.geo.GeoConstants;
    +import mvm.rya.indexing.external.tupleSet.PcjTables;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjException;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjVarOrderFactory;
    +import mvm.rya.rdftriplestore.inference.InferenceEngineException;
    +import mvm.rya.sail.config.RyaSailFactory;
    +
    +public class FederatedRyaRealExample{
    +	private static final Logger log = Logger.getLogger(RyaDirectExample.class);
    +
    +	//
    +	// Connection configuration parameters
    +	//
    +
    +	private static final boolean USE_MOCK_INSTANCE = false;
    +	private static final boolean PRINT_QUERIES = true;
    +	private static final String INSTANCE = "dev";
    +	private static final String RYA_TABLE_PREFIX = "rya_";
    +	private static final String AUTHS = "";
    +	//the second VM's IP is 192.168.33.20
    +	private static final String SESAME_SERVER="http://192.168.33.20:8080/openrdf-sesame";
    +	private static final String repositoryID="RyaAccumulo";
    +
    +	public static void main(String[] args) throws Exception {
    +		final Configuration conf = getConf();
    +		conf.setBoolean(ConfigUtils.DISPLAY_QUERY_PLAN, PRINT_QUERIES);
    +
    +		SailRepository repo = null;	
    +		SailRepositoryConnection con=null;	
    +
    +
    +		try {
    +
    +			log.info("Connecting to Federation Sail Repository.");
    +			
    +			Federation federation = new Federation();
    +			repo = new SailRepository(federation);
    +			repo.initialize();
    +			
    +			// Create local member
    +	        federation.addMember( createMember_test_1(conf));
    +	        // Create remote member
    +	        federation.addMember( createMember_test_2());
    +			con = repo.getConnection();
    +			
    +			final long start = System.currentTimeMillis();
    +            // execute query
    +			String query_1 = "PREFIX money:<http://telegraphis.net/ontology/money/money#> select ?name where {   ?x a money:Currency .   ?x money:shortName \"dollar\" .  ?x money:name ?name .}";
    +			String query_2="PREFIX geographis:<http://www.telegraphis.net/ontology/geography/geography#> PREFIX gn:<http://www.geonames.org/ontology#> select ?name where { ?x a geographis:Continent .  ?x gn:name ?name .}";
    +			final CountingResultHandler resultHandler_1 = new CountingResultHandler();
    +			final CountingResultHandler resultHandler_2 = new CountingResultHandler();
    +			TupleQuery tupleQuery_1 = con.prepareTupleQuery(QueryLanguage.SPARQL,
    +					query_1);
    +			tupleQuery_1.evaluate(resultHandler_1);
    +			log.info("Result count : " + resultHandler_1.getCount());
    +			
    +			TupleQuery tupleQuery_2 = con.prepareTupleQuery(QueryLanguage.SPARQL,
    +					query_2);
    +			tupleQuery_2.evaluate(resultHandler_1);
    +			log.info("Result count : " + resultHandler_2.getCount());
    +
    +			log.info("TIME: " + (System.currentTimeMillis() - start) / 1000.);
    +		} finally {
    +			log.info("Shutting down");
    +			closeQuietly(con);
    +			closeQuietly(repo);
    +		
    +		}
    +	}
    +	
    +	// Local repository
    +	private static Repository createMember_test_1(Configuration conf) throws AccumuloException, AccumuloSecurityException, RyaDAOException, InferenceEngineException, RepositoryException{
    +		final Sail extSail = RyaSailFactory.getInstance(conf);
    +		SailRepository repository = new SailRepository(extSail);
    +		repository.initialize();
    +		return repository;
    +		
    +	}
    +	// Remote repository
    +	private static Repository createMember_test_2() throws RepositoryException{
    +		Repository repository_1=new HTTPRepository(SESAME_SERVER, repositoryID);	
    +		repository_1.initialize();	
    +		return repository_1;
    +	}
    +
    +	private static void closeQuietly(SailRepository repository) {
    +		if (repository != null) {
    +			try {
    +				repository.shutDown();
    +			} catch (final RepositoryException e) {
    +				// quietly absorb this exception
    +			}
    +		}
    +	}
    +
    +	private static void closeQuietly(SailRepositoryConnection conn) {
    +		if (conn != null) {
    +			try {
    +				conn.close();
    +			} catch (final RepositoryException e) {
    +				// quietly absorb this exception
    +			}
    +		}
    +	}
    +
    +	private static Configuration getConf(int numTable) throws AccumuloException, AccumuloSecurityException {
    +
    +		final AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
    +		conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, USE_MOCK_INSTANCE);
    +		conf.set(ConfigUtils.USE_PCJ, "false");
    +		conf.set(ConfigUtils.USE_GEO, "false");
    +		conf.set(ConfigUtils.USE_FREETEXT, "false");
    +		conf.set(ConfigUtils.USE_TEMPORAL, "false");
    +		conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX,
    +				RYA_TABLE_PREFIX);
    +		conf.set(ConfigUtils.CLOUDBASE_USER, "root");
    +		conf.set(ConfigUtils.CLOUDBASE_PASSWORD, "root");
    +		conf.set(ConfigUtils.CLOUDBASE_INSTANCE, INSTANCE);
    +		conf.set(ConfigUtils.CLOUDBASE_ZOOKEEPERS,"192.168.33.10:2181");
    --- End diff --
    
    don't check in ips


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #41: FederatedRyaExample

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

    https://github.com/apache/incubator-rya/pull/41#discussion_r65616452
  
    --- Diff: extras/indexingExample/src/main/java/FederatedRyaRealExample.java ---
    @@ -0,0 +1,281 @@
    +/*
    + * 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.
    + */
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +import org.apache.accumulo.core.client.AccumuloException;
    +import org.apache.accumulo.core.client.AccumuloSecurityException;
    +import org.apache.accumulo.core.client.Connector;
    +import org.apache.accumulo.core.client.Instance;
    +import org.apache.accumulo.core.client.TableExistsException;
    +import org.apache.accumulo.core.client.TableNotFoundException;
    +import org.apache.accumulo.core.client.ZooKeeperInstance;
    +import org.apache.accumulo.core.client.mock.MockInstance;
    +import org.apache.accumulo.core.client.security.tokens.PasswordToken;
    +import org.apache.commons.lang.Validate;
    +import org.apache.zookeeper.client.*;
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.log4j.Logger;
    +import org.openrdf.model.URI;
    +import org.openrdf.model.ValueFactory;
    +import org.openrdf.model.impl.LiteralImpl;
    +import org.openrdf.model.impl.URIImpl;
    +import org.openrdf.model.vocabulary.RDF;
    +import org.openrdf.model.vocabulary.RDFS;
    +import org.openrdf.query.BindingSet;
    +import org.openrdf.query.MalformedQueryException;
    +import org.openrdf.query.QueryEvaluationException;
    +import org.openrdf.query.QueryLanguage;
    +import org.openrdf.query.QueryResultHandlerException;
    +import org.openrdf.query.TupleQuery;
    +import org.openrdf.query.TupleQueryResultHandler;
    +import org.openrdf.query.TupleQueryResultHandlerException;
    +import org.openrdf.query.Update;
    +import org.openrdf.query.UpdateExecutionException;
    +import org.openrdf.repository.Repository;
    +import org.openrdf.repository.RepositoryConnection;
    +import org.openrdf.repository.RepositoryException;
    +import org.openrdf.repository.http.HTTPRepository;
    +import org.openrdf.repository.sail.SailRepository;
    +import org.openrdf.repository.sail.SailRepositoryConnection;
    +import org.openrdf.rio.RDFFormat;
    +import org.openrdf.rio.RDFParseException;
    +import org.openrdf.sail.Sail;
    +import org.openrdf.sail.federation.Federation;
    +import org.openrdf.sail.memory.MemoryStore;
    +
    +import com.google.common.base.Optional;
    +
    +import mvm.rya.accumulo.AccumuloRdfConfiguration;
    +import mvm.rya.api.RdfCloudTripleStoreConfiguration;
    +import mvm.rya.api.persist.RyaDAOException;
    +import mvm.rya.indexing.accumulo.ConfigUtils;
    +import mvm.rya.indexing.accumulo.geo.GeoConstants;
    +import mvm.rya.indexing.external.tupleSet.PcjTables;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjException;
    +import mvm.rya.indexing.external.tupleSet.PcjTables.PcjVarOrderFactory;
    +import mvm.rya.rdftriplestore.inference.InferenceEngineException;
    +import mvm.rya.sail.config.RyaSailFactory;
    +
    +public class FederatedRyaRealExample{
    +	private static final Logger log = Logger.getLogger(RyaDirectExample.class);
    +
    +	//
    +	// Connection configuration parameters
    +	//
    +
    +	private static final boolean USE_MOCK_INSTANCE = false;
    +	private static final boolean PRINT_QUERIES = true;
    +	private static final String INSTANCE = "dev";
    +	private static final String RYA_TABLE_PREFIX = "rya_";
    +	private static final String AUTHS = "";
    +	//the second VM's IP is 192.168.33.20
    +	private static final String SESAME_SERVER="http://192.168.33.20:8080/openrdf-sesame";
    --- End diff --
    
    Note that this is a non-internet-routable address similar to the one used by our VM in the Rya Vagrant example.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #41: FederatedRyaExample

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---