Tabnine Logo
ILSMIndexAccessor.forceInsert
Code IndexAdd Tabnine to your IDE (free)

How to use
forceInsert
method
in
org.apache.hyracks.storage.am.lsm.common.api.ILSMIndexAccessor

Best Java code snippets using org.apache.hyracks.storage.am.lsm.common.api.ILSMIndexAccessor.forceInsert (Showing top 4 results out of 315)

origin: apache/asterixdb

private static void redo(ILogRecord logRecord, IDatasetLifecycleManager datasetLifecycleManager) {
  try {
    int datasetId = logRecord.getDatasetId();
    long resourceId = logRecord.getResourceId();
    ILSMIndex index = (ILSMIndex) datasetLifecycleManager.getIndex(datasetId, resourceId);
    ILSMIndexAccessor indexAccessor = index.createAccessor(NoOpIndexAccessParameters.INSTANCE);
    ILSMIndexOperationContext opCtx = indexAccessor.getOpContext();
    opCtx.setFilterSkip(true);
    opCtx.setRecovery(true);
    if (logRecord.getNewOp() == AbstractIndexModificationOperationCallback.INSERT_BYTE) {
      indexAccessor.forceInsert(logRecord.getNewValue());
    } else if (logRecord.getNewOp() == AbstractIndexModificationOperationCallback.DELETE_BYTE) {
      indexAccessor.forceDelete(logRecord.getNewValue());
    } else if (logRecord.getNewOp() == AbstractIndexModificationOperationCallback.UPSERT_BYTE) {
      // redo, upsert the new value
      indexAccessor.forceUpsert(logRecord.getNewValue());
    } else if (logRecord.getNewOp() == AbstractIndexModificationOperationCallback.FILTER_BYTE) {
      opCtx.setFilterSkip(false);
      indexAccessor.updateFilter(logRecord.getNewValue());
    } else {
      throw new IllegalStateException("Unsupported OperationType: " + logRecord.getNewOp());
    }
  } catch (Exception e) {
    throw new IllegalStateException("Failed to redo", e);
  }
}
origin: apache/asterixdb

  lsmAccessor.insert(tuple);
} else {
  lsmAccessor.forceInsert(tuple);
origin: apache/asterixdb

switch (op) {
  case INSERT:
    indexAccessor.forceInsert(tuple);
    break;
  case DELETE:
origin: apache/asterixdb

lsmAccessor.forceInsert(tuple);
org.apache.hyracks.storage.am.lsm.common.apiILSMIndexAccessorforceInsert

Javadoc

Insert a new tuple (failing if duplicate key entry is found)

Popular methods of ILSMIndexAccessor

  • getOpContext
  • scheduleMerge
    Schedule a merge operation
  • forceDelete
    Force deleting an index entry even if the memory component is full replace the entry if found with a
  • scheduleFlush
    Schedule a flush operation
  • delete
  • insert
  • createSearchCursor
  • forceUpsert
    Force upserting the tuple into the memory component even if it is full
  • scanDiskComponents
    Open the given cursor for scanning all disk components of the primary index. The returned tuple has
  • upsert
  • deleteComponents
    Delete components that match the passed predicate NOTE: This call can only be made when the caller k
  • destroy
  • deleteComponents,
  • destroy,
  • flush,
  • forcePhysicalDelete,
  • merge,
  • scheduleFullMerge,
  • scheduleReplication,
  • search,
  • tryDelete

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • Kernel (java.awt.image)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JOptionPane (javax.swing)
  • Best plugins for Eclipse
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