Search in sources :

Example 16 with RegionAttributes

use of org.apache.geode.cache.RegionAttributes in project geode by apache.

the class LikePredicateJUnitTest method testQueryExecutionMultipleTimes.

@Test
public void testQueryExecutionMultipleTimes() throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();
    Region region = cache.createRegion("pos", regionAttributes);
    Region region2 = cache.createRegion("pos2", regionAttributes);
    // Create Index
    Index i1 = cache.getQueryService().createIndex("status", IndexType.FUNCTIONAL, "ps.status", "/pos ps");
    Index i2 = cache.getQueryService().createIndex("description", IndexType.FUNCTIONAL, "ps.description", "/pos ps");
    Index i3 = cache.getQueryService().createIndex("description2", IndexType.FUNCTIONAL, "ps2.description", "/pos2 ps2");
    for (int i = 0; i < 10; i++) {
        Portfolio p = new Portfolio(i);
        region.put("key-" + i, p);
        region2.put("key-" + i, p);
    }
    executeQueryMultipleTimes("SELECT distinct *  FROM /pos ps WHERE ps.status like 'in%ve'", false);
    assertEquals(2, i1.getStatistics().getTotalUses());
    assertEquals(0, i2.getStatistics().getTotalUses());
    assertEquals(0, i3.getStatistics().getTotalUses());
    executeQueryMultipleTimes("SELECT distinct *  FROM /pos ps WHERE ps.status like 'in%ve' or ps.description like 'X%X'", false);
    assertEquals(4, i1.getStatistics().getTotalUses());
    assertEquals(2, i2.getStatistics().getTotalUses());
    assertEquals(0, i3.getStatistics().getTotalUses());
    executeQueryMultipleTimes("SELECT distinct *  FROM /pos ps WHERE ps.ID >= 0 and ps.status like 'in%ve'", false);
    assertEquals(6, i1.getStatistics().getTotalUses());
    assertEquals(2, i2.getStatistics().getTotalUses());
    assertEquals(0, i3.getStatistics().getTotalUses());
    executeQueryMultipleTimes("SELECT distinct *  FROM /pos ps1, /pos2 ps2 WHERE ps1.status like 'in%ve' or ps2.description like 'X%X'", false);
    assertEquals(8, i1.getStatistics().getTotalUses());
    assertEquals(2, i2.getStatistics().getTotalUses());
    assertEquals(2, i3.getStatistics().getTotalUses());
}
Also used : AttributesFactory(org.apache.geode.cache.AttributesFactory) RegionAttributes(org.apache.geode.cache.RegionAttributes) Portfolio(org.apache.geode.cache.query.data.Portfolio) Region(org.apache.geode.cache.Region) Index(org.apache.geode.cache.query.Index) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Example 17 with RegionAttributes

use of org.apache.geode.cache.RegionAttributes in project geode by apache.

the class LikePredicateJUnitTest method testMultipleWhereClausesWithIndexes.

@Test
public void testMultipleWhereClausesWithIndexes() throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();
    Region region = cache.createRegion("pos", regionAttributes);
    QueryService qs = cache.getQueryService();
    Query q;
    String[] queries = new String[] { " SELECT  status, pkid FROM /pos  WHERE status like 'inactive' and pkid like '1' ", " SELECT  status, pkid FROM /pos  WHERE status like 'active' or pkid like '1' ", " SELECT  status, pkid FROM /pos  WHERE status like 'in%' and pkid like '1' ", " SELECT  status  FROM /pos  WHERE status like 'in%' or pkid like '1'", " SELECT  pkid FROM /pos  WHERE status like 'inact%' and pkid like '1%' ", " SELECT  *  FROM /pos  WHERE status like 'inact%' or pkid like '1%' ", " SELECT  *  FROM /pos  WHERE status like 'inactiv_' or pkid like '1%' ", " SELECT  status, pkid  FROM /pos  WHERE status like '_nactive' or pkid like '1%' ", " SELECT  *  FROM /pos  WHERE status like '_nac%ive' or pkid like '1%' ", " SELECT  *  FROM /pos  WHERE status like 'in_ctive' or pkid like '1%' ", " SELECT  *  FROM /pos  WHERE status like 'in_ctive' or pkid like '1_' ", " SELECT  status, pkid FROM /pos  WHERE status like '%ctive' and pkid like '1%' ", " SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1%') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'acti%' and pkid like '1%') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'acti%' or pkid like '1%') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'active' and pkid like '1%') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1%') ", " SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '11' or pkid like '1') ", " SELECT  *  FROM /pos  WHERE status like '%' and pkid like '1%' ", " SELECT  *  FROM /pos  WHERE pkid like '_'", " SELECT  *  FROM /pos  WHERE status like '.*tive' ", " SELECT  *  FROM /pos  WHERE pkid like '1+' ", " SELECT  *  FROM /pos  WHERE unicodeṤtring like 'ṤṶẐ' ", " SELECT  *  FROM /pos  WHERE unicodeṤtring like 'ṤṶ%' ", " SELECT  *  FROM /pos p, p.positions.values v  WHERE v.secId like 'I%' ", " SELECT  *  FROM /pos p, p.positions.values v  WHERE v.secId like '%L' ", " SELECT  *  FROM /pos p, p.positions.values v  WHERE v.secId like 'A%L' " };
    SelectResults[][] sr = new SelectResults[queries.length][2];
    for (int i = 0; i < 20; i++) {
        Portfolio pf = new Portfolio(i);
        region.put(new Integer(i), pf);
    }
    for (int i = 0; i < queries.length; i++) {
        q = qs.newQuery(queries[i]);
        sr[i][0] = (SelectResults) q.execute();
    }
    // Create index.
    qs.createIndex("pkidIndex", "pkid", "/pos");
    qs.createIndex("statusIndex", "status", "/pos");
    qs.createIndex("unicodeṤtringIndex", "unicodeṤtring", "/pos");
    qs.createIndex("secIdIndex", "v.secId", "/pos p, p.positions.values v");
    for (int i = 0; i < queries.length; i++) {
        q = qs.newQuery(queries[i]);
        try {
            sr[i][1] = (SelectResults) q.execute();
        } catch (Exception e) {
            fail("Query execution failed for: " + queries[i]);
        }
    }
    // compare results.
    CacheUtils.compareResultsOfWithAndWithoutIndex(sr, this);
    SelectResults results = null;
    q = qs.newQuery("SELECT  status  FROM /pos  WHERE status like 'inactive' and pkid like '1' ");
    results = (SelectResults) q.execute();
    if (results.size() != 1) {
        fail("Unexpected result. expected :" + 1 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  pkid  FROM /pos  WHERE status like 'active' or pkid like '1' ");
    results = (SelectResults) q.execute();
    if (results.size() != 11) {
        fail("Unexpected result. expected :" + 11 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'in%' and pkid like '1' ");
    results = (SelectResults) q.execute();
    if (results.size() != 1) {
        fail("Unexpected result. expected :" + 1 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'in%' or pkid like '1' ");
    results = (SelectResults) q.execute();
    if (results.size() != 10) {
        fail("Unexpected result. expected :" + 10 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'inact%' and pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 6) {
        fail("Unexpected result. expected :" + 6 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'inact%' or pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'inactiv_' or pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like '_nactive' or pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like '_nac%ive' or pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'in_ctive' or pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like 'in_ctive' or pkid like '1_' ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like '%ctive' and pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 11) {
        fail("Unexpected result. expected :" + 11 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1') ");
    results = (SelectResults) q.execute();
    if (results.size() != 9) {
        fail("Unexpected result. expected :" + 9 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1%') ");
    results = (SelectResults) q.execute();
    if (results.size() != 4) {
        fail("Unexpected result. expected :" + 4 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'acti%' and pkid like '1%') ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'acti%' or pkid like '1%') ");
    results = (SelectResults) q.execute();
    if (results.size() != 4) {
        fail("Unexpected result. expected :" + 4 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'active' and pkid like '1%') ");
    results = (SelectResults) q.execute();
    if (results.size() != 15) {
        fail("Unexpected result. expected :" + 15 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '1%') ");
    results = (SelectResults) q.execute();
    if (results.size() != 4) {
        fail("Unexpected result. expected :" + 4 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE NOT (status like 'active' or pkid like '11' or pkid like '1') ");
    results = (SelectResults) q.execute();
    if (results.size() != 8) {
        fail("Unexpected result. expected :" + 8 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE status like '%' and pkid like '1%' ");
    results = (SelectResults) q.execute();
    if (results.size() != 11) {
        fail("Unexpected result. expected :" + 11 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE pkid like '_' ");
    results = (SelectResults) q.execute();
    if (results.size() != 10) {
        fail("Unexpected result. expected :" + 10 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE pkid like '.*tive' ");
    results = (SelectResults) q.execute();
    if (results.size() != 0) {
        fail("Unexpected result. expected :" + 0 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos  WHERE pkid like '1+' ");
    results = (SelectResults) q.execute();
    if (results.size() != 0) {
        fail("Unexpected result. expected :" + 0 + " found : " + results.size());
    }
}
Also used : Query(org.apache.geode.cache.query.Query) RegionAttributes(org.apache.geode.cache.RegionAttributes) Portfolio(org.apache.geode.cache.query.data.Portfolio) AttributesFactory(org.apache.geode.cache.AttributesFactory) SelectResults(org.apache.geode.cache.query.SelectResults) QueryService(org.apache.geode.cache.query.QueryService) Region(org.apache.geode.cache.Region) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Example 18 with RegionAttributes

use of org.apache.geode.cache.RegionAttributes in project geode by apache.

the class LikePredicateJUnitTest method enhancedLike.

/**
   * Tests with combination of % and _ Supported from 6.6
   * 
   * @throws Exception
   */
private void enhancedLike(boolean useBindPrms) throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();
    Region region = cache.createRegion("pos", regionAttributes);
    String[] values = new String[] { "active" };
    String[] likePredicates = new String[] { "active", "act%%ve", "a%e", "%ctiv%", "%c%iv%", "%ctive", "%%ti%", "activ_", "_ctive", "ac_ive", "_c_iv_", "_ctiv%", "__tive", "act__e", "a%iv_", "a_tiv%", "%", "ac%" };
    for (int i = 0; i < values.length; i++) {
        region.put(new Integer(i), values[i]);
    }
    QueryService qs = cache.getQueryService();
    Query q;
    SelectResults results;
    for (int i = 0; i < likePredicates.length; i++) {
        if (!useBindPrms) {
            q = qs.newQuery("select p from /pos.values p where p like '" + likePredicates[i] + "'");
            results = (SelectResults) q.execute();
        } else {
            q = qs.newQuery("select p from /pos.values p where p like $1");
            results = (SelectResults) q.execute(new Object[] { likePredicates[i] });
        }
        List r = results.asList();
        if (r.size() != 1 || !r.get(0).equals(values[0])) {
            fail("Unexpected result. expected :" + values[0] + " for the like predicate: " + likePredicates[i] + " found : " + (r.size() == 1 ? r.get(0) : "Result size not equal to 1"));
        }
    }
    // Create Index
    qs.createIndex("p", IndexType.FUNCTIONAL, "p", "/pos.values p");
    for (int i = 0; i < likePredicates.length; i++) {
        if (!useBindPrms) {
            q = qs.newQuery("select p from /pos.values p where p like '" + likePredicates[i] + "'");
            results = (SelectResults) q.execute();
        } else {
            q = qs.newQuery("select p from /pos.values p where p like $1");
            results = (SelectResults) q.execute(new Object[] { likePredicates[i] });
        }
        List r = results.asList();
        if (r.size() != 1 || !r.get(0).equals(values[0])) {
            fail("Unexpected result. expected :" + values[0] + " for the like predicate: " + likePredicates[i] + " found : " + (r.size() == 1 ? r.get(0) : "Result size not equal to 1"));
        }
    }
}
Also used : AttributesFactory(org.apache.geode.cache.AttributesFactory) SelectResults(org.apache.geode.cache.query.SelectResults) Query(org.apache.geode.cache.query.Query) RegionAttributes(org.apache.geode.cache.RegionAttributes) QueryService(org.apache.geode.cache.query.QueryService) Region(org.apache.geode.cache.Region) List(java.util.List) Cache(org.apache.geode.cache.Cache)

Example 19 with RegionAttributes

use of org.apache.geode.cache.RegionAttributes in project geode by apache.

the class LikePredicateJUnitTest method testNotLikeWithOtherIndexedField2.

/**
   * Query with index on other fields.
   * 
   * @throws Exception
   */
@Test
public void testNotLikeWithOtherIndexedField2() throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();
    Region region = cache.createRegion("pos", regionAttributes);
    int size = 10;
    String base = "abc";
    for (int i = 1; i <= size; i++) {
        Portfolio pf = new Portfolio(i);
        pf.pkid = "1";
        if ((i % 4) == 0) {
            pf.status = base;
        } else if ((i <= 2)) {
            pf.pkid = "2";
        }
        region.put(new Integer(i), pf);
    }
    QueryService qs = cache.getQueryService();
    Query q;
    SelectResults results;
    SelectResults expectedResults;
    int expectedResultSize = 2;
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%')");
    results = (SelectResults) q.execute();
    if (results.size() != expectedResultSize * 4) {
        fail("Unexpected result. expected :" + expectedResultSize * 4 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' or ps.pkid = '2')");
    results = (SelectResults) q.execute();
    if (results.size() != (expectedResultSize * 3)) {
        fail("Unexpected result. expected :" + (expectedResultSize * 3) + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' or ps.ID > 0 )");
    results = (SelectResults) q.execute();
    if (results.size() != 0) {
        fail("Unexpected result. expected :" + 0 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%') or ps.ID > 4 ");
    results = (SelectResults) q.execute();
    if (results.size() != 9) {
        fail("Unexpected result. expected :" + 9 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' and ps.ID > 3 )");
    results = (SelectResults) q.execute();
    if (results.size() != 8) {
        fail("Unexpected result. expected :" + 5 + " found : " + results.size());
    }
    // Query to be compared with indexed results.
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' and ps.pkid = '1' )");
    expectedResults = (SelectResults) q.execute();
    if (expectedResults.size() != 8) {
        fail("Unexpected result. expected :" + size + " found : " + expectedResults.size());
    }
    // Create Index
    qs.createIndex("pkid", IndexType.FUNCTIONAL, "ps.pkid", "/pos ps");
    qs.createIndex("status", IndexType.FUNCTIONAL, "ps.status", "/pos ps");
    qs.createIndex("id", IndexType.FUNCTIONAL, "ps.ID", "/pos ps");
    results = (SelectResults) q.execute();
    SelectResults[][] rs = new SelectResults[][] { { results, expectedResults } };
    if (results.size() != expectedResults.size()) {
        fail("Unexpected result. expected :" + expectedResults.size() + " found : " + results.size());
    }
    // compare results.
    CacheUtils.compareResultsOfWithAndWithoutIndex(rs, this);
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' and ps.ID > 3 )");
    results = (SelectResults) q.execute();
    if (results.size() != 8) {
        fail("Unexpected result. expected :" + 5 + " found : " + results.size());
    }
    // Index will only be used in OR junctions if NOT is used with LIKE.
    QueryObserver old = QueryObserverHolder.setInstance(new QueryObserverAdapter() {

        private boolean indexCalled = false;

        public void afterIndexLookup(Collection results) {
            indexCalled = true;
        }

        public void endQuery() {
            assertTrue(indexCalled);
        }
    });
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '_b_' or ps.pkid = '2')");
    results = (SelectResults) q.execute();
    if (results.size() != (expectedResultSize * 3)) {
        fail("Unexpected result. expected :" + (expectedResultSize * 3) + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%' or ps.ID > 0 )");
    results = (SelectResults) q.execute();
    if (results.size() != 0) {
        fail("Unexpected result. expected :" + 0 + " found : " + results.size());
    }
    q = qs.newQuery(" SELECT  *  FROM /pos ps WHERE NOT (ps.status like '%b%') or ps.ID > 4");
    results = (SelectResults) q.execute();
    if (results.size() != 9) {
        fail("Unexpected result. expected :" + 9 + " found : " + results.size());
    }
    QueryObserverHolder.setInstance(old);
}
Also used : Query(org.apache.geode.cache.query.Query) RegionAttributes(org.apache.geode.cache.RegionAttributes) Portfolio(org.apache.geode.cache.query.data.Portfolio) QueryObserver(org.apache.geode.cache.query.internal.QueryObserver) AttributesFactory(org.apache.geode.cache.AttributesFactory) SelectResults(org.apache.geode.cache.query.SelectResults) QueryService(org.apache.geode.cache.query.QueryService) QueryObserverAdapter(org.apache.geode.cache.query.internal.QueryObserverAdapter) Region(org.apache.geode.cache.Region) Collection(java.util.Collection) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Example 20 with RegionAttributes

use of org.apache.geode.cache.RegionAttributes in project geode by apache.

the class LikePredicateJUnitTest method enhancedNotLike2.

private void enhancedNotLike2(boolean useBindPrms, boolean useIndex) throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();
    Region region = cache.createRegion("pos", regionAttributes);
    String[] values = new String[] { "ac\\tive", "X\\\\X", "Y%Y", "Z\\%Z", "pass\\ive", "inact\\%+ive", "1inact\\_+ive" };
    String[] likePredicates = new String[] { "ac\\\\tive", "ac\\\\%", "ac_tive", "Y\\%Y", "X__X", "X%X", "Z\\\\\\%Z", "inact\\\\%+ive", "1inact\\\\_+ive" };
    String[] result = new String[] { "ac\\tive", "ac\\tive", "ac\\tive", "Y%Y", "X\\\\X", "X\\\\X", "Z\\%Z", "inact\\%+ive", "1inact\\_+ive" };
    for (int i = 0; i < values.length; i++) {
        region.put(new Integer(i), values[i]);
    }
    QueryService qs = cache.getQueryService();
    Query q;
    SelectResults results;
    if (useIndex) {
        qs.createIndex("p", IndexType.FUNCTIONAL, "p", "/pos.values p");
    }
    for (int i = 0; i < likePredicates.length; i++) {
        if (!useBindPrms) {
            q = qs.newQuery("select p from /pos.values p where NOT (p like '" + likePredicates[i] + "')");
            results = (SelectResults) q.execute();
        } else {
            q = qs.newQuery("select p from /pos.values p where NOT (p like $1)");
            results = (SelectResults) q.execute(new Object[] { likePredicates[i] });
        }
        List r = results.asList();
        if (r.size() != 6) {
            fail("Unexpected result size: " + r.size() + " for query: " + q.getQueryString());
        }
    }
}
Also used : AttributesFactory(org.apache.geode.cache.AttributesFactory) SelectResults(org.apache.geode.cache.query.SelectResults) Query(org.apache.geode.cache.query.Query) RegionAttributes(org.apache.geode.cache.RegionAttributes) QueryService(org.apache.geode.cache.query.QueryService) Region(org.apache.geode.cache.Region) List(java.util.List) Cache(org.apache.geode.cache.Cache)

Aggregations

RegionAttributes (org.apache.geode.cache.RegionAttributes)590 AttributesFactory (org.apache.geode.cache.AttributesFactory)471 Region (org.apache.geode.cache.Region)256 Test (org.junit.Test)251 Properties (java.util.Properties)158 PartitionedRegion (org.apache.geode.internal.cache.PartitionedRegion)128 ConfigurationProperties (org.apache.geode.distributed.ConfigurationProperties)126 PartitionAttributesFactory (org.apache.geode.cache.PartitionAttributesFactory)118 LocalRegion (org.apache.geode.internal.cache.LocalRegion)112 Cache (org.apache.geode.cache.Cache)99 VM (org.apache.geode.test.dunit.VM)93 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)93 Host (org.apache.geode.test.dunit.Host)89 HashSet (java.util.HashSet)80 CacheException (org.apache.geode.cache.CacheException)65 FlakyTest (org.apache.geode.test.junit.categories.FlakyTest)62 CacheServer (org.apache.geode.cache.server.CacheServer)60 SerializableCallable (org.apache.geode.test.dunit.SerializableCallable)59 ArrayList (java.util.ArrayList)57 PartitionAttributesImpl (org.apache.geode.internal.cache.PartitionAttributesImpl)56