Tabnine Logo
SqlQuery.setDistributedJoins
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/ignite

/** */
@Test
public void testNonCollocatedRetryMessage() {
  SqlQuery<String, JoinSqlTestHelper.Person> qry = new SqlQuery<String, JoinSqlTestHelper.Person>(
    JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
  qry.setDistributedJoins(true);
  try {
    List<Cache.Entry<String, JoinSqlTestHelper.Person>> prsns = personCache.query(qry).getAll();
    fail("No CacheException emitted. Collection size=" + prsns.size());
  }
  catch (CacheException e) {
    assertTrue(e.getMessage(), e.getMessage().contains("Failed to execute non-collocated query"));
  }
}
origin: apache/ignite

/** */
@Test
public void testDisappearedCacheWasNotFoundMessage() {
  SqlQuery<String, Person> qry = new SqlQuery<String, Person>(Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
  qry.setDistributedJoins(true);
  try {
    personCache.query(qry).getAll();
    fail("No CacheException emitted.");
  }
  catch (CacheException e) {
    boolean exp = e.getMessage().contains("Cache not found on local node (was concurrently destroyed?)");
    if (!exp)
      throw e;
  }
}
origin: apache/ignite

  "where Person.orgId = Organization.id and Person.id = Account.personId and Organization.id = ?");
q.setDistributedJoins(distributedJoins());
origin: apache/ignite

/** */
@Test
public void testDisappearedCacheCauseRetryMessage() {
  SqlQuery<String, JoinSqlTestHelper.Person> qry = new SqlQuery<String, JoinSqlTestHelper.Person>(JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
  qry.setDistributedJoins(true);
  try {
    personCache.query(qry).getAll();
    fail("No CacheException emitted.");
  }
  catch (CacheException e) {
    assertTrue(e.getMessage(), e.getMessage().contains("Failed to reserve partitions for query (cache is not found on local node) ["));
  }
}
origin: apache/ignite

((SqlQuery)q).setDistributedJoins(distributedJoins());
origin: apache/ignite

/**
 * Ctor.
 *
 * @param reader Reader.
 */
public ClientCacheSqlQueryRequest(BinaryRawReaderEx reader) {
  super(reader);
  qry = new SqlQuery(reader.readString(), reader.readString())
      .setArgs(PlatformCache.readQueryArgs(reader))
      .setDistributedJoins(reader.readBoolean())
      .setLocal(reader.readBoolean())
      .setReplicatedOnly(reader.readBoolean())
      .setPageSize(reader.readInt())
      .setTimeout((int) reader.readLong(), TimeUnit.MILLISECONDS);
}
origin: apache/ignite

);
qry2.setDistributedJoins(distributedJoins());
origin: apache/ignite

/**
 * Reads sql query.
 *
 * @param reader Binary reader.
 * @return Query.
 */
private Query readSqlQuery(BinaryRawReaderEx reader) {
  boolean loc = reader.readBoolean();
  String sql = reader.readString();
  String typ = reader.readString();
  final int pageSize = reader.readInt();
  Object[] args = readQueryArgs(reader);
  boolean distrJoins = reader.readBoolean();
  int timeout = reader.readInt();
  boolean replicated = reader.readBoolean();
  return new SqlQuery(typ, sql)
      .setPageSize(pageSize)
      .setArgs(args)
      .setLocal(loc)
      .setDistributedJoins(distrJoins)
      .setTimeout(timeout, TimeUnit.MILLISECONDS)
      .setReplicatedOnly(replicated);
}
origin: apache/ignite

((SqlQuery)qry).setDistributedJoins(req.distributedJoins());
origin: apache/ignite

qry.setDistributedJoins(true);
try {
  personCache.query(qry).getAll();
origin: apache/ignite

qry.setDistributedJoins(true);
origin: apache/ignite

qry.setDistributedJoins(true);
origin: apache/ignite

qry.setDistributedJoins(true);
try {
  personCache.query(qry).getAll();
origin: apache/ignite

qry.setDistributedJoins(true);
origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testNonCollocatedDistributedJoin() throws Exception {
  CacheConfiguration ccfg1 = cacheConfig("pers", true, String.class, Person.class);
  CacheConfiguration ccfg2 = cacheConfig("org", true, String.class, Organization.class);
  IgniteCache<String, Person> c1 = ignite(0).getOrCreateCache(ccfg1);
  IgniteCache<String, Organization> c2 = ignite(0).getOrCreateCache(ccfg2);
  try {
    awaitPartitionMapExchange();
    populateDataIntoCaches(c1, c2);
    String joinSql =
      "select * from Person, \"org\".Organization as org " +
        "where Person.orgId = org.id " +
        "and lower(org.name) = lower(?)";
    SqlQuery qry = new SqlQuery<String, Person>(Person.class, joinSql).setArgs("Organization #0");
    qry.setDistributedJoins(true);
    List<Person> prns = c1.query(qry).getAll();
    assertEquals(PERSON_PER_ORG_COUNT, prns.size());
  }
  finally {
    c1.destroy();
    c2.destroy();
  }
}
origin: apache/ignite

qry.setDistributedJoins(true);
origin: org.apache.ignite/ignite-core

/**
 * Ctor.
 *
 * @param reader Reader.
 */
public ClientCacheSqlQueryRequest(BinaryRawReaderEx reader) {
  super(reader);
  qry = new SqlQuery(reader.readString(), reader.readString())
      .setArgs(PlatformCache.readQueryArgs(reader))
      .setDistributedJoins(reader.readBoolean())
      .setLocal(reader.readBoolean())
      .setReplicatedOnly(reader.readBoolean())
      .setPageSize(reader.readInt())
      .setTimeout((int) reader.readLong(), TimeUnit.MILLISECONDS);
}
origin: org.apache.ignite/ignite-core

/**
 * Reads sql query.
 *
 * @param reader Binary reader.
 * @return Query.
 */
private Query readSqlQuery(BinaryRawReaderEx reader) {
  boolean loc = reader.readBoolean();
  String sql = reader.readString();
  String typ = reader.readString();
  final int pageSize = reader.readInt();
  Object[] args = readQueryArgs(reader);
  boolean distrJoins = reader.readBoolean();
  int timeout = reader.readInt();
  boolean replicated = reader.readBoolean();
  return new SqlQuery(typ, sql)
      .setPageSize(pageSize)
      .setArgs(args)
      .setLocal(loc)
      .setDistributedJoins(distrJoins)
      .setTimeout(timeout, TimeUnit.MILLISECONDS)
      .setReplicatedOnly(replicated);
}
origin: org.apache.ignite/ignite-core

((SqlQuery)qry).setDistributedJoins(req.distributedJoins());
org.apache.ignite.cache.querySqlQuerysetDistributedJoins

Javadoc

Specify if distributed joins are enabled for this query. When disabled, join results will only contain colocated data (joins work locally). When enabled, joins work as expected, no matter how the data is distributed.

Popular methods of SqlQuery

  • <init>
    Constructs query for the given type name and SQL query.
  • setArgs
    Sets SQL arguments.
  • getArgs
    Gets SQL arguments.
  • getPageSize
  • getPartitions
    Gets partitions for query, in ascending order.
  • 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.
  • setLocal
  • isReplicatedOnly,
  • setLocal,
  • setPageSize,
  • setReplicatedOnly,
  • setSql,
  • getAlias,
  • isDataPageScanEnabled,
  • prepare,
  • setAlias

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • runOnUiThread (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Table (org.hibernate.mapping)
    A relational table
  • 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