/** * Create a new KB instance. * * @param namespace * The namespace of the KB instance. * @param properties * The configuration properties for that KB instance. * * @throws Exception * * @see <a href="http://trac.bigdata.com/ticket/1257"> createRepository() * does not set the namespace on the Properties</a> */ public void createRepository(final String namespace, final Properties properties) throws Exception { createRepository(namespace, properties, UUID.randomUUID()); }
private void createNamespace(final String namespace) throws Exception { // final Properties properties = new Properties(); // final Properties properties = getTestMode().getProperties(); // FIXME BLZG-2023: Use the indicated test mode, but also test for triplesPlusTM. final Properties properties = TestMode.triplesPlusTruthMaintenance.getProperties(); properties.put(BigdataSail.Options.NAMESPACE, namespace); log.warn(String.format("Create namespace %s...", namespace)); m_mgr.createRepository(namespace, properties); log.warn(String.format("Create namespace %s done", namespace)); }
@Override public void run() { final String namespace = "n" + namespaceCount.getAndIncrement(); final Properties properties = new Properties(); properties.put("com.bigdata.rdf.sail.namespace", namespace); try { log.warn(String.format("Create namespace %s...", namespace)); m_mgr.createRepository(namespace, properties); log.warn(String.format("Create namespace %s done", namespace)); latch.countDown(); } catch (final Exception e) { log.error(String.format("Failed to create namespace %s:", namespace), e); testSucceeding.set(false); } if (testSucceeding.get()) executor.schedule(this, 5, TimeUnit.SECONDS); } });
@Override public Void call() throws Exception { // Note: Wrap properties to avoid modification! final Properties properties = new Properties( sharedTestState.testMode.getProperties()); // create namespace. rmgr.createRepository(namespace, properties); // add entry IFF created. if (sharedTestState.namespaces.putIfAbsent(namespace, new ReentrantReadWriteLock()) != null) { // Should not exist! Each namespace name is distinct!!! throw new AssertionError("namespace=" + namespace); } // Track #of namespaces that exist in the service. sharedTestState.namespaceExistCounter.incrementAndGet(); return null; }
private void createNamespace(final String namespace) throws Exception { // final Properties properties = new Properties(); // final Properties properties = getTestMode().getProperties(); // FIXME BLZG-2023: Use the indicated test mode, but also test for triplesPlusTM. final Properties properties = TestMode.triplesPlusTruthMaintenance.getProperties(); properties.put(BigdataSail.Options.NAMESPACE, namespace); log.warn(String.format("Create namespace %s...", namespace)); m_mgr.createRepository(namespace, properties); log.warn(String.format("Create namespace %s done", namespace)); }
@Override public void run() { final String namespace = "n" + namespaceCount.getAndIncrement(); final Properties properties = new Properties(); properties.put("com.bigdata.rdf.sail.namespace", namespace); try { log.warn(String.format("Create namespace %s...", namespace)); m_mgr.createRepository(namespace, properties); log.warn(String.format("Create namespace %s done", namespace)); latch.countDown(); } catch (final Exception e) { log.error(String.format("Failed to create namespace %s:", namespace), e); testSucceeding.set(false); } if (testSucceeding.get()) executor.schedule(this, 5, TimeUnit.SECONDS); } });
@Override public Void call() throws Exception { // Note: Wrap properties to avoid modification! final Properties properties = new Properties( sharedTestState.testMode.getProperties()); // create namespace. rmgr.createRepository(namespace, properties); // add entry IFF created. if (sharedTestState.namespaces.putIfAbsent(namespace, new ReentrantReadWriteLock()) != null) { // Should not exist! Each namespace name is distinct!!! throw new AssertionError("namespace=" + namespace); } // Track #of namespaces that exist in the service. sharedTestState.namespaceExistCounter.incrementAndGet(); return null; }
repositoryManager.createRepository(namespace, properties); log.info(String.format("Create namespace %s done", namespace));
if (!namespaceExists(repo, namespace)) { log.info(String.format("Create namespace %s...", namespace)); repo.createRepository(namespace, properties); log.info(String.format("Create namespace %s done", namespace)); } else {
repositoryManager.createRepository(namespace, properties); log.info(String.format("Create namespace %s done", namespace));
p.setProperty(RemoteRepositoryManager.OPTION_CREATE_KB_NAMESPACE, ns); m_mgr.createRepository(ns, p);
serviceURL , false /* useLBS */); repo.createRepository(namespace, journalProperties);
serviceURL , false /* useLBS */); repo.createRepository(namespace, journalProperties);
m_mgr.createRepository(namespace2, properties); m_mgr.createRepository(namespace2, properties);
p.setProperty(RemoteRepositoryManager.OPTION_CREATE_KB_NAMESPACE, ns); m_mgr.createRepository(ns, p);
m_mgr.createRepository(namespace, properties );
m_mgr.createRepository(namespace2, properties); m_mgr.createRepository(namespace2, properties);
m_mgr.createRepository(namespace, properties );