Codota Logo
SqlQuery.getPartitions
Code IndexAdd Codota to your IDE (free)

How to use
getPartitions
method
in
org.apache.ignite.cache.query.SqlQuery

Best Java code snippets using org.apache.ignite.cache.query.SqlQuery.getPartitions (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: apache/ignite

/** {@inheritDoc} */
@SuppressWarnings("deprecation")
@Override public SqlFieldsQuery generateFieldsQuery(String cacheName, SqlQuery qry) {
  String schemaName = schema(cacheName);
  String type = qry.getType();
  H2TableDescriptor tblDesc = schemaMgr.tableForType(schemaName, cacheName, type);
  if (tblDesc == null)
    throw new IgniteSQLException("Failed to find SQL table for type: " + type,
      IgniteQueryErrorCode.TABLE_NOT_FOUND);
  String sql;
  try {
    sql = H2Utils.generateFieldsQueryString(qry.getSql(), qry.getAlias(), tblDesc);
  }
  catch (IgniteCheckedException e) {
    throw new IgniteException(e);
  }
  SqlFieldsQuery res = new SqlFieldsQuery(sql);
  res.setArgs(qry.getArgs());
  res.setDistributedJoins(qry.isDistributedJoins());
  res.setLocal(qry.isLocal());
  res.setPageSize(qry.getPageSize());
  res.setPartitions(qry.getPartitions());
  res.setReplicatedOnly(qry.isReplicatedOnly());
  res.setSchema(schemaName);
  res.setSql(sql);
  res.setDataPageScanEnabled(qry.isDataPageScanEnabled());
  if (qry.getTimeout() > 0)
    res.setTimeout(qry.getTimeout(), TimeUnit.MILLISECONDS);
  return res;
}
origin: org.apache.ignite/ignite-core

/**
 * Execute distributed SQL query.
 *
 * @param cctx Cache context.
 * @param qry Query.
 * @param keepBinary Keep binary flag.
 * @return Cursor.
 */
public <K, V> QueryCursor<Cache.Entry<K,V>> querySql(final GridCacheContext<?,?> cctx, final SqlQuery qry,
  boolean keepBinary) {
  validateSqlQuery(qry, ctx, cctx);
  if (qry.isReplicatedOnly() && qry.getPartitions() != null)
    throw new CacheException("Partitions are not supported in replicated only mode.");
  if (qry.isDistributedJoins() && qry.getPartitions() != null)
    throw new CacheException(
      "Using both partitions and distributed JOINs is not supported for the same query");
  if ((qry.isReplicatedOnly() && cctx.isReplicatedAffinityNode()) || cctx.isLocal() || qry.isLocal())
    return queryLocalSql(cctx, qry, keepBinary);
  return queryDistributedSql(cctx, qry, keepBinary);
}
origin: org.apache.ignite/ignite-indexing

fqry.setPageSize(qry.getPageSize());
fqry.setDistributedJoins(qry.isDistributedJoins());
fqry.setPartitions(qry.getPartitions());
fqry.setLocal(qry.isLocal());
org.apache.ignite.cache.querySqlQuerygetPartitions

Javadoc

Gets partitions for query, in ascending order.

Popular methods of SqlQuery

  • <init>
    Constructs query for the given type name and SQL query.
  • setArgs
    Sets SQL arguments.
  • getArgs
    Gets SQL arguments.
  • getPageSize
  • getSql
    Gets SQL clause.
  • getTimeout
    Gets the query execution timeout in milliseconds.
  • getType
    Gets type for query.
  • isDistributedJoins
    Check if distributed joins are enabled for this query.
  • isLocal
  • isReplicatedOnly
    Check is the query contains only replicated tables.
  • setDistributedJoins
    Specify if distributed joins are enabled for this query. When disabled, join results will only conta
  • setLocal
  • setDistributedJoins,
  • setLocal,
  • setPageSize,
  • setReplicatedOnly,
  • setSql,
  • getAlias,
  • isDataPageScanEnabled,
  • prepare,
  • setAlias

Popular in Java

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now