/** * Test metrics for SQL fields queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from String"); checkQueryMetrics(cache, qry); }
/** * Test metrics for Scan queries. * * @throws Exception In case of error. */ @Test public void testScanQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); ScanQuery<Integer, String> qry = new ScanQuery<>(); checkQueryMetrics(cache, qry); }
/** * Test metrics for failed Scan queries. * * @throws Exception In case of error. */ @Test public void testScanQueryFailedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); ScanQuery<Integer, String> qry = new ScanQuery<>(Integer.MAX_VALUE); checkQueryFailedMetrics(cache, qry); }
/** * Test metrics for Sql queries. * * @throws Exception In case of error. */ @Test public void testSqlQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlQuery qry = new SqlQuery<>("String", "from String"); checkQueryMetrics(cache, qry); }
/** * Test metrics for SQL cross cache queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from \"B\".String"); checkQueryMetrics(cache, qry); }
/** * Test metrics for SQL cross cache queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsCrossCacheQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from \"B\".String"); checkQueryMetrics(cache, qry); }
/** * Test metrics for SQL fields queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from String"); checkQueryMetrics(cache, qry); }
/** * Test metrics for Scan queries. * * @throws Exception In case of error. */ @Test public void testScanQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); ScanQuery<Integer, String> qry = new ScanQuery<>(); checkQueryMetrics(cache, qry); }
/** * Test metrics for failed Scan queries. * * @throws Exception In case of error. */ @Test public void testScanQueryFailedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); ScanQuery<Integer, String> qry = new ScanQuery<>(Integer.MAX_VALUE); checkQueryFailedMetrics(cache, qry); }
/** * Test metrics for Sql queries. * * @throws Exception In case of error. */ @Test public void testTextQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); TextQuery qry = new TextQuery<>("String", "1"); checkQueryMetrics(cache, qry); }
/** * Test metrics for Sql queries. * * @throws Exception In case of error. */ @Test public void testTextQueryMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); TextQuery qry = new TextQuery<>("String", "1"); checkQueryMetrics(cache, qry); }
/** * Test metrics for failed Scan queries. * * @throws Exception In case of error. */ @Test public void testTextQueryFailedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); TextQuery qry = new TextQuery<>("Unknown", "zzz"); checkQueryFailedMetrics(cache, qry); }
/** * Test metrics for failed SQL cross cache queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsCrossCacheQueryFailedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from \"G\".String"); checkQueryFailedMetrics(cache, qry); }
/** * Test metrics for Scan queries. * * @throws Exception In case of error. */ @Test public void testScanQueryNotFullyFetchedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); ScanQuery<Integer, String> qry = new ScanQuery<>(); qry.setPageSize(10); checkQueryNotFullyFetchedMetrics(cache, qry, true); }
/** * Test metrics for Scan queries. * * @throws Exception In case of error. */ @Test public void testSqlQueryNotFullyFetchedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlQuery<Integer, String> qry = new SqlQuery<>("String", "from String"); qry.setPageSize(10); checkQueryNotFullyFetchedMetrics(cache, qry, true); }
/** * Test metrics for SQL fields queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from String"); qry.setPageSize(10); checkQueryNotFullyFetchedMetrics(cache, qry, false); }
/** * Test metrics for Sql queries. * * @throws Exception In case of error. */ @Test public void testTextQueryNotFullyFetchedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); TextQuery qry = new TextQuery<>("String", "1"); qry.setPageSize(10); checkQueryNotFullyFetchedMetrics(cache, qry, true); }
/** * Test metrics for SQL cross cache queries. * * @throws Exception In case of error. */ @Test public void testSqlFieldsCrossCacheQueryNotFullyFetchedMetrics() throws Exception { IgniteCache<Integer, String> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery("select * from \"B\".String"); qry.setPageSize(10); checkQueryNotFullyFetchedMetrics(cache, qry, false); }
/** * @param qry Query. */ private void checkQueryMetrics(Query qry) { IgniteCache<Integer, String> cache = queryNode().context().cache().jcache("A"); // Execute query. cache.query(qry).getAll(); checkMetrics(1, 0, 1, 0, true); // Execute again with the same parameters. cache.query(qry).getAll(); checkMetrics(1, 0, 2, 0, false); }
/** * @param qry Query. */ private void checkNoQueryMetrics(Query qry) { IgniteCache<Integer, String> cache = queryNode().context().cache().jcache("A"); // Execute query. cache.query(qry).getAll(); checkMetrics(0, 0, 0, 0, true); // Execute again with the same parameters. cache.query(qry).getAll(); checkMetrics(0, 0, 0, 0, false); }