Tabnine Logo
SequenceManager.getSequenceCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getSequenceCount
method
in
org.apache.phoenix.compile.SequenceManager

Best Java code snippets using org.apache.phoenix.compile.SequenceManager.getSequenceCount (Showing top 20 results out of 315)

origin: apache/phoenix

@Override
public void explain(List<String> planSteps) {
  super.explain(planSteps);
  int nSequences = sequenceManager.getSequenceCount();
  planSteps.add("CLIENT RESERVE VALUES FROM " + nSequences + " SEQUENCE" + (nSequences == 1 ? "" : "S"));
}
origin: apache/phoenix

@Override
public ExplainPlan getExplainPlan() throws SQLException {
  List<String> planSteps = Lists.newArrayListWithExpectedSize(2);
  if (context.getSequenceManager().getSequenceCount() > 0) {
    planSteps.add("CLIENT RESERVE " + context.getSequenceManager().getSequenceCount() + " SEQUENCES");
  }
  planSteps.add("PUT SINGLE ROW");
  return new ExplainPlan(planSteps);
}
origin: apache/phoenix

@Override
public ExplainPlan getExplainPlan() throws SQLException {
  List<String> planSteps = Lists.newArrayList(delegate.getExplainPlan().getPlanSteps());
  if (where != null) {
    planSteps.add("CLIENT FILTER BY " + where.toString());
  }
  if (!orderBy.getOrderByExpressions().isEmpty()) {
    if (offset != null) {
      planSteps.add("CLIENT OFFSET " + offset);
    }
    planSteps.add("CLIENT" + (limit == null ? "" : " TOP " + limit + " ROW" + (limit == 1 ? "" : "S"))
        + " SORTED BY " + orderBy.getOrderByExpressions().toString());
  } else {
    if (offset != null) {
      planSteps.add("CLIENT OFFSET " + offset);
    }
    if (limit != null) {
      planSteps.add("CLIENT " + limit + " ROW LIMIT");
    }
  }
  if (context.getSequenceManager().getSequenceCount() > 0) {
    int nSequences = context.getSequenceManager().getSequenceCount();
    planSteps.add("CLIENT RESERVE VALUES FROM " + nSequences + " SEQUENCE" + (nSequences == 1 ? "" : "S"));
  }
  
  return new ExplainPlan(planSteps);
}
origin: apache/phoenix

  planSteps.add("CLIENT" + (limit == null ? "" : " TOP " + limit + " ROW"  + (limit == 1 ? "" : "S"))  + " SORTED BY " + orderBy.getOrderByExpressions().toString());
if (context.getSequenceManager().getSequenceCount() > 0) {
  int nSequences = context.getSequenceManager().getSequenceCount();
  planSteps.add("CLIENT RESERVE VALUES FROM " + nSequences + " SEQUENCE" + (nSequences == 1 ? "" : "S"));
origin: apache/phoenix

if (context.getSequenceManager().getSequenceCount() > 0) {
  scanner = new SequenceResultIterator(scanner, context.getSequenceManager());
origin: apache/phoenix

@Override
protected MutationState mutate(StatementContext parentContext, ResultIterator iterator, PhoenixConnection connection) throws SQLException {
  if (parentContext.getSequenceManager().getSequenceCount() > 0) {
    throw new IllegalStateException("Cannot pipeline upsert when sequence is referenced");
  }
  PhoenixStatement statement = new PhoenixStatement(connection);
  /*
   * We don't want to collect any read metrics within the child context. This is because any read metrics that
   * need to be captured are already getting collected in the parent statement context enclosed in the result
   * iterator being used for reading rows out.
   */
  StatementContext childContext = new StatementContext(statement, false);
  // Clone the row projector as it's not thread safe and would be used simultaneously by
  // multiple threads otherwise.
  MutationState state = upsertSelect(childContext, tableRef, projector.cloneIfNecessary(), iterator, columnIndexes, pkSlotIndexes, useSeverTimestamp, false);
  return state;
}

origin: apache/phoenix

    ? RoundRobinResultIterator.newIterator(iterators, queryPlan)
    : ConcatResultIterator.newIterator(iterators);
if (queryPlan.getContext().getSequenceManager().getSequenceCount() > 0) {
  iterator = new SequenceResultIterator(iterator, queryPlan.getContext()
      .getSequenceManager());
origin: apache/phoenix

if(queryPlan.getContext().getSequenceManager().getSequenceCount() > 0) {
  iterator = new SequenceResultIterator(iterator, queryPlan.getContext().getSequenceManager());
origin: apache/phoenix

@Override
public ResultIterator iterator(ParallelScanGrouper scanGrouper, Scan scan) throws SQLException {
  ResultIterator iterator = delegate.iterator(scanGrouper, scan);
  if (where != null) {
    iterator = new FilterResultIterator(iterator, where);
  }
  
  if (!orderBy.getOrderByExpressions().isEmpty()) { // TopN
    int thresholdBytes = context.getConnection().getQueryServices().getProps().getInt(
        QueryServices.SPOOL_THRESHOLD_BYTES_ATTRIB, QueryServicesOptions.DEFAULT_SPOOL_THRESHOLD_BYTES);
    iterator = new OrderedResultIterator(iterator, orderBy.getOrderByExpressions(), thresholdBytes, limit,
        offset, projector.getEstimatedRowByteSize());
  } else {
    if (offset != null) {
      iterator = new OffsetResultIterator(iterator, offset);
    }
    if (limit != null) {
      iterator = new LimitingResultIterator(iterator, limit);
    }
  }
  
  if (context.getSequenceManager().getSequenceCount() > 0) {
    iterator = new SequenceResultIterator(iterator, context.getSequenceManager());
  }
  
  return iterator;
}
origin: org.apache.phoenix/phoenix-core

@Override
public void explain(List<String> planSteps) {
  super.explain(planSteps);
  int nSequences = sequenceManager.getSequenceCount();
  planSteps.add("CLIENT RESERVE VALUES FROM " + nSequences + " SEQUENCE" + (nSequences == 1 ? "" : "S"));
}
origin: apache/phoenix

if (queryPlan.getContext().getSequenceManager().getSequenceCount() > 0) {
  iterator = new SequenceResultIterator(iterator, queryPlan.getContext().getSequenceManager());
origin: com.aliyun.phoenix/ali-phoenix-core

@Override
public void explain(List<String> planSteps) {
  super.explain(planSteps);
  int nSequences = sequenceManager.getSequenceCount();
  planSteps.add("CLIENT RESERVE VALUES FROM " + nSequences + " SEQUENCE" + (nSequences == 1 ? "" : "S"));
}
origin: com.aliyun.phoenix/ali-phoenix-core

@Override
public ExplainPlan getExplainPlan() throws SQLException {
  List<String> planSteps = Lists.newArrayListWithExpectedSize(2);
  if (context.getSequenceManager().getSequenceCount() > 0) {
    planSteps.add("CLIENT RESERVE " + context.getSequenceManager().getSequenceCount() + " SEQUENCES");
  }
  planSteps.add("PUT SINGLE ROW");
  return new ExplainPlan(planSteps);
}
origin: org.apache.phoenix/phoenix-core

@Override
public ExplainPlan getExplainPlan() throws SQLException {
  List<String> planSteps = Lists.newArrayListWithExpectedSize(2);
  if (context.getSequenceManager().getSequenceCount() > 0) {
    planSteps.add("CLIENT RESERVE " + context.getSequenceManager().getSequenceCount() + " SEQUENCES");
  }
  planSteps.add("PUT SINGLE ROW");
  return new ExplainPlan(planSteps);
}
origin: apache/phoenix

  resultScanner = new OrderedAggregatingResultIterator(aggResultIterator, orderBy.getOrderByExpressions(), thresholdBytes, limit, offset);
if (context.getSequenceManager().getSequenceCount() > 0) {
  resultScanner = new SequenceResultIterator(resultScanner, context.getSequenceManager());
origin: apache/phoenix

Tuple tuple = sequenceManager.getSequenceCount() == 0 ? null :
  sequenceManager.newSequenceTuple(null);
for (Expression constantExpression : constantExpressions) {
origin: apache/phoenix

if (context.getSequenceManager().getSequenceCount() > 0) {
  scanner = new SequenceResultIterator(scanner, context.getSequenceManager());
origin: apache/phoenix

      thresholdBytes, limit, offset);
if (context.getSequenceManager().getSequenceCount() > 0) {
  resultScanner = new SequenceResultIterator(resultScanner, context.getSequenceManager());
origin: com.aliyun.phoenix/ali-phoenix-core

@Override
protected MutationState mutate(StatementContext parentContext, ResultIterator iterator, PhoenixConnection connection) throws SQLException {
  if (parentContext.getSequenceManager().getSequenceCount() > 0) {
    throw new IllegalStateException("Cannot pipeline upsert when sequence is referenced");
  }
  PhoenixStatement statement = new PhoenixStatement(connection);
  /*
   * We don't want to collect any read metrics within the child context. This is because any read metrics that
   * need to be captured are already getting collected in the parent statement context enclosed in the result
   * iterator being used for reading rows out.
   */
  StatementContext childContext = new StatementContext(statement, false);
  // Clone the row projector as it's not thread safe and would be used simultaneously by
  // multiple threads otherwise.
  MutationState state = upsertSelect(childContext, tableRef, projector.cloneIfNecessary(), iterator, columnIndexes, pkSlotIndexes, useSeverTimestamp, false);
  return state;
}

origin: org.apache.phoenix/phoenix-core

@Override
protected MutationState mutate(StatementContext parentContext, ResultIterator iterator, PhoenixConnection connection) throws SQLException {
  if (parentContext.getSequenceManager().getSequenceCount() > 0) {
    throw new IllegalStateException("Cannot pipeline upsert when sequence is referenced");
  }
  PhoenixStatement statement = new PhoenixStatement(connection);
  /*
   * We don't want to collect any read metrics within the child context. This is because any read metrics that
   * need to be captured are already getting collected in the parent statement context enclosed in the result
   * iterator being used for reading rows out.
   */
  StatementContext childContext = new StatementContext(statement, false);
  // Clone the row projector as it's not thread safe and would be used simultaneously by
  // multiple threads otherwise.
  MutationState state = upsertSelect(childContext, tableRef, projector.cloneIfNecessary(), iterator, columnIndexes, pkSlotIndexes, useSeverTimestamp, false);
  return state;
}

org.apache.phoenix.compileSequenceManagergetSequenceCount

Popular methods of SequenceManager

  • <init>
  • determineNumToAllocate
    If caller specified used NEXT VALUES FOR expression then we have set the numToAllocate. If numToAllo
  • newSequenceReference
  • newSequenceTuple
  • setSequenceValues
  • validateSequences

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top plugins for Android Studio
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