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

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

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

origin: apache/incubator-rya

/**
 * Insert a statement into the child Accumulo instance via the child DAO.
 * @param rstmt RyaStatement to add to the child
 * @param context Map context, not used
 * @throws IOException if the DAO encounters an error adding the statement to Accumulo
 */
@Override
protected void copyStatement(final RyaStatement rstmt, final Context context) throws IOException {
  try {
    childDao.add(rstmt);
  }
  catch (final RyaDAOException e) {
    throw new IOException("Error inserting statement into child Rya DAO", e);
  }
}
origin: apache/incubator-rya

/**
 * Sets the copy tool split {@link Date} metadata key for the table.
 * @param date the tool copy split time {@link Date}.
 * @param dao the {@link AccumuloRyaDAO}.
 * @throws RyaDAOException
 */
public static RyaStatement setCopyToolSplitDate(final Date date, final AccumuloRyaDAO dao) throws RyaDAOException {
  final RyaStatement ryaStatement = createCopyToolSplitTimeRyaStatement(date);
  dao.add(ryaStatement);
  return ryaStatement;
}
origin: apache/incubator-rya

/**
 * Sets the copy tool run {@link Date} metadata key for the table.
 * @param date the copy tool run time {@link Date}.
 * @param dao the {@link AccumuloRyaDAO}.
 * @throws RyaDAOException
 */
public static RyaStatement setCopyToolRunDate(final Date date, final AccumuloRyaDAO dao) throws RyaDAOException {
  final RyaStatement ryaStatement = createCopyToolRunTimeRyaStatement(date);
  dao.add(ryaStatement);
  return ryaStatement;
}
origin: apache/incubator-rya

  /**
   * Sets the copy tool parent time offset metadata key for the table.
   * @param timeOffset the difference between the parent machine's system time and
   * the NTP server's time.
   * @param dao the {@link AccumuloRyaDAO}.
   * @throws RyaDAOException
   */
  public static RyaStatement setTimeOffset(final long timeOffset, final AccumuloRyaDAO dao) throws RyaDAOException {
    final RyaStatement ryaStatement = createTimeOffsetRyaStatement(timeOffset);
    dao.add(ryaStatement);
    return ryaStatement;
  }
}
origin: apache/incubator-rya

/**
 * Add a statement to an in-memory Accumulo instance, serialized as spo/pos/osp and any applicable secondary
 * indexes, and flush the in-memory rows through to the output if enough statements have been cached.
 * @param rstmt RyaStatement to copy to the child
 * @param context Context to use for writing
 * @throws InterruptedException if Hadoop is interrupted while writing output.
 * @throws IOException if an error is encountered serializing and storing the statement in memory, or
 *      if Hadoop reports an error writing the in-memory tables to the output.
 */
@Override
protected void copyStatement(final RyaStatement rstmt, final Context context) throws IOException, InterruptedException {
  try {
    childDao.add(rstmt);
    cachedStatements++;
  } catch (final RyaDAOException e) {
    throw new IOException("Error serializing RyaStatement", e);
  }
  if (cachedStatements >= maxStatements) {
    flush(context);
  }
}
origin: org.apache.rya/rya.export.accumulo

@Override
public void addStatement(final RyaStatement statement) throws AddStatementException {
  try {
    accumuloRyaDao.add(statement);
    accumuloRyaDao.flush();
    //This is a hack since a statement re-added with the same timestamp won't reappear since its been marked for deletion.
    //RYA-197 is the ticket for fixing this hack.
    if(!containsStatement(statement)) {
      statement.setTimestamp(statement.getTimestamp() + 1L);
      accumuloRyaDao.add(statement);
    }
  } catch (final RyaDAOException | ContainsStatementException e) {
    throw new AddStatementException("Unable to add the Rya Statement", e);
  }
}
origin: apache/incubator-rya

@Override
public void addStatement(final RyaStatement statement) throws AddStatementException {
  try {
    accumuloRyaDao.add(statement);
    accumuloRyaDao.flush();
    //This is a hack since a statement re-added with the same timestamp won't reappear since its been marked for deletion.
    //RYA-197 is the ticket for fixing this hack.
    if(!containsStatement(statement)) {
      statement.setTimestamp(statement.getTimestamp() + 1L);
      accumuloRyaDao.add(statement);
    }
  } catch (final RyaDAOException | ContainsStatementException e) {
    throw new AddStatementException("Unable to add the Rya Statement", e);
  }
}
origin: org.apache.rya/rya.mapreduce

ryaIndexer.add(buffer.iterator());
origin: apache/incubator-rya

ryaIndexer.add(buffer.iterator());
origin: apache/incubator-rya

dao.add(statement1);
dao.add(statement2);
origin: apache/incubator-rya

protected String loadRyaStatements(final String sparql, final Collection<RyaStatement> statements) throws Exception {
  requireNonNull(sparql);
  requireNonNull(statements);
  FluoClient client = null;
  try {
    CreateFluoPcj createPcj = new CreateFluoPcj();
    client = new FluoClientImpl(super.getFluoConfiguration());
    String id = createPcj.createPcj(sparql, client).getQueryId();
    AccumuloRyaDAO dao = getRyaDAO();
    dao.add(statements.iterator());
    // Wait for the Fluo application to finish computing the end result.
    super.getMiniFluo().waitForObservers();
    // FluoITHelper.printFluoTable(client);
    return id;
  } finally {
    if (client != null) {
      client.close();
    }
  }
}
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();
}
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

dao.add(statement1);
dao.add(statement2);
dao.add(statement3);
origin: apache/incubator-rya

dao.add(statement1);
dao.add(statement2);
dao.add(statement3);
origin: apache/incubator-rya

dao.add(statement1);
dao.add(statement2);
dao.add(statement3);
dao.add(statement4);
origin: apache/incubator-rya

    makeRyaStatement(vf.createStatement(vf.createIRI("http://David"), vf.createIRI("http://worksAt"), vf.createIRI("http://Chipotle")), "V"));
dao.add(historicTriples.iterator());
dao.flush();
org.apache.rya.accumuloAccumuloRyaDAOadd

Popular methods of AccumuloRyaDAO

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

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • startActivity (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
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