Tabnine Logo
AccumuloRyaDAO.destroy
Code IndexAdd Tabnine to your IDE (free)

How to use
destroy
method
in
org.apache.rya.accumulo.AccumuloRyaDAO

Best Java code snippets using org.apache.rya.accumulo.AccumuloRyaDAO.destroy (Showing top 16 results out of 315)

origin: org.apache.rya/rya.export.accumulo

/**
 * Tears down the {@link AccumuloRyaDAO}.
 * @throws Exception
 */
public void tearDownDao() throws Exception {
  if (dao != null) {
    log.info("Stopping " + driverName + " DAO");
    try {
      dao.destroy();
    } catch (final RyaDAOException e) {
      log.error("Error stopping " + driverName + " DAO", e);
    }
    dao = null;
  }
}
origin: apache/incubator-rya

/**
 * Tears down the {@link AccumuloRyaDAO}.
 * @throws Exception
 */
public void tearDownDao() throws Exception {
  if (dao != null) {
    log.info("Stopping " + driverName + " DAO");
    try {
      dao.destroy();
    } catch (final RyaDAOException e) {
      log.error("Error stopping " + driverName + " DAO", e);
    }
    dao = null;
  }
}
origin: apache/incubator-rya

/**
 * Tears down the {@link AccumuloRyaDAO}.
 * @throws Exception
 */
public void tearDownDao() throws Exception {
  if (dao != null) {
    log.info("Stopping " + driverName + " DAO");
    try {
      dao.destroy();
    } catch (final RyaDAOException e) {
      log.error("Error stopping " + driverName + " DAO", e);
    }
    dao = null;
  }
}
origin: apache/incubator-rya

  @Override
  protected void cleanup(final Context context) throws IOException, InterruptedException {
    super.cleanup(context);
    log.info("Cleaning up mapper...");
    try {
      if (childDao != null) {
        childDao.destroy();
      }
    } catch (final RyaDAOException e) {
      log.error("Error destroying child DAO", e);
    }
    log.info("Cleaned up mapper");
  }
}
origin: apache/incubator-rya

public void close() {
  try {
    System.out.println("Closing SailRepositoryConnection");
    conn.close();
    System.out.println("Shutting down SailRepository");
    repository.shutDown();
    System.out.println("Shutting down Sail.");
    sail.shutDown();
    dao.destroy();
  } catch (RyaDAOException | RepositoryException | SailException e) {
    System.out.println("Unable to cleanly shut down all resources.");
    e.printStackTrace();
    System.exit(0);
  }
}
origin: apache/incubator-rya

  @Override
  protected void cleanup(final Context context) throws IOException, InterruptedException {
    super.cleanup(context);
    log.info("Cleaning up mapper...");
    if (childScanner != null) {
      childScanner.close();
    }
    try {
      if (childDao != null) {
        childDao.destroy();
      }
    } catch (final RyaDAOException e) {
      log.error("Error destroying child DAO", e);
    }
    log.info("Cleaned up mapper");
  }
}
origin: apache/incubator-rya

public void destroy() throws Exception {
  logger.info("Shutting down Sparql Query Pig Engine");
  pigServer.shutdown();
  if (ryaDAO != null) {
    ryaDAO.destroy();
  }
  if (inferenceEngine != null) {
    inferenceEngine.destroy();
  }
  if (rdfEvalStatsDAO != null) {
    rdfEvalStatsDAO.destroy();
  }
}
origin: apache/incubator-rya

ryaIndexer.destroy();
origin: org.apache.rya/rya.mapreduce

ryaIndexer.destroy();
origin: org.apache.rya/accumulo.rya

@Override
public void dropAndDestroy() throws RyaDAOException {
  for (final String tableName : getTables()) {
    try {
      if (tableName != null) {
        drop(tableName);
      }
    } catch (final AccumuloSecurityException e) {
      logger.error(e.getMessage());
      throw new RyaDAOException(e);
    } catch (final AccumuloException e) {
      logger.error(e.getMessage());
      throw new RyaDAOException(e);
    } catch (final TableNotFoundException e) {
      logger.warn(e.getMessage());
    }
  }
  destroy();
  for(final AccumuloIndexer indexer : this.secondaryIndexers) {
    try {
      indexer.dropAndDestroy();
    } catch(final Exception e) {
      logger.error("Failed to drop and destroy indexer", e);
    }
  }
}
origin: apache/incubator-rya

@Override
public void dropAndDestroy() throws RyaDAOException {
  for (final String tableName : getTables()) {
    try {
      if (tableName != null) {
        drop(tableName);
      }
    } catch (final AccumuloSecurityException e) {
      logger.error(e.getMessage());
      throw new RyaDAOException(e);
    } catch (final AccumuloException e) {
      logger.error(e.getMessage());
      throw new RyaDAOException(e);
    } catch (final TableNotFoundException e) {
      logger.warn(e.getMessage());
    }
  }
  destroy();
  for(final AccumuloIndexer indexer : this.secondaryIndexers) {
    try {
      indexer.dropAndDestroy();
    } catch(final Exception e) {
      logger.error("Failed to drop and destroy indexer", e);
    }
  }
}
origin: org.apache.rya/rya.pcj.fluo.test.base

@After
public void teardownRya() {
  final MiniAccumuloCluster cluster = getMiniAccumuloCluster();
  final String instanceName = cluster.getInstanceName();
  final String zookeepers = cluster.getZooKeepers();
  // Uninstall the instance of Rya.
  final RyaClient ryaClient = AccumuloRyaClientFactory.build(
      new AccumuloConnectionDetails(ACCUMULO_USER, ACCUMULO_PASSWORD.toCharArray(), instanceName, zookeepers),
      super.getAccumuloConnector());
  try {
    ryaClient.getUninstall().uninstall(RYA_INSTANCE_NAME);
    // Shutdown the repo.
    if(ryaSailRepo != null) {ryaSailRepo.shutDown();}
    if(dao != null ) {dao.destroy();}
  } catch (final Exception e) {
    System.out.println("Encountered the following Exception when shutting down Rya: " + e.getMessage());
  }
}
origin: apache/incubator-rya

@After
public void teardownRya() {
  final MiniAccumuloCluster cluster = getMiniAccumuloCluster();
  final String instanceName = cluster.getInstanceName();
  final String zookeepers = cluster.getZooKeepers();
  // Uninstall the instance of Rya.
  final RyaClient ryaClient = AccumuloRyaClientFactory.build(
      new AccumuloConnectionDetails(ACCUMULO_USER, ACCUMULO_PASSWORD.toCharArray(), instanceName, zookeepers),
      super.getAccumuloConnector());
  try {
    ryaClient.getUninstall().uninstall(RYA_INSTANCE_NAME);
    // Shutdown the repo.
    if(ryaSailRepo != null) {ryaSailRepo.shutDown();}
    if(dao != null ) {dao.destroy();}
  } catch (final Exception e) {
    System.out.println("Encountered the following Exception when shutting down Rya: " + e.getMessage());
  }
}
origin: apache/incubator-rya

  ryaDAO.destroy();
} catch (RyaDAOException e) {
  logger.error("Exception closing ryadao", e);
origin: org.apache.rya/rya.mapreduce

static void setUpRya() throws AccumuloException, AccumuloSecurityException, RyaDAOException {
  MockInstance mock = new MockInstance(INSTANCE_NAME);
  Connector conn = mock.getConnector(USERNAME, new PasswordToken(USERP));
  AccumuloRyaDAO dao = new AccumuloRyaDAO();
  dao.setConnector(conn);
  AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
  conf.setTablePrefix(PREFIX);
  dao.setConf(conf);
  dao.init();
  String ns = "http://example.com/";
  dao.add(new RyaStatement(new RyaURI(ns+"s1"), new RyaURI(ns+"p1"), new RyaURI(ns+"o1")));
  dao.add(new RyaStatement(new RyaURI(ns+"s1"), new RyaURI(ns+"p2"), new RyaURI(ns+"o2")));
  dao.add(new RyaStatement(new RyaURI(ns+"s2"), new RyaURI(ns+"p1"), new RyaURI(ns+"o3"),
      new RyaURI(ns+"g1")));
  dao.add(new RyaStatement(new RyaURI(ns+"s3"), new RyaURI(ns+"p3"), new RyaURI(ns+"o3"),
      new RyaURI(ns+"g2")));
  dao.destroy();
}
origin: apache/incubator-rya

static void setUpRya() throws AccumuloException, AccumuloSecurityException, RyaDAOException {
  MockInstance mock = new MockInstance(INSTANCE_NAME);
  Connector conn = mock.getConnector(USERNAME, new PasswordToken(USERP));
  AccumuloRyaDAO dao = new AccumuloRyaDAO();
  dao.setConnector(conn);
  AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
  conf.setTablePrefix(PREFIX);
  dao.setConf(conf);
  dao.init();
  String ns = "http://example.com/";
  dao.add(new RyaStatement(new RyaIRI(ns+"s1"), new RyaIRI(ns+"p1"), new RyaIRI(ns+"o1")));
  dao.add(new RyaStatement(new RyaIRI(ns+"s1"), new RyaIRI(ns+"p2"), new RyaIRI(ns+"o2")));
  dao.add(new RyaStatement(new RyaIRI(ns+"s2"), new RyaIRI(ns+"p1"), new RyaIRI(ns+"o3"),
      new RyaIRI(ns+"g1")));
  dao.add(new RyaStatement(new RyaIRI(ns+"s3"), new RyaIRI(ns+"p3"), new RyaIRI(ns+"o3"),
      new RyaIRI(ns+"g2")));
  dao.destroy();
}
org.apache.rya.accumuloAccumuloRyaDAOdestroy

Popular methods of AccumuloRyaDAO

  • <init>
  • setConnector
  • setConf
  • init
  • add
  • delete
  • flush
  • getConnector
  • getConf
  • getQueryEngine
  • checkVersion
  • commit
  • checkVersion,
  • commit,
  • compact,
  • createBatchDeleter,
  • deleteSingleRyaStatement,
  • drop,
  • flushIndexers,
  • getTables,
  • getVersion

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Collectors (java.util.stream)
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now