ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [19/37] incubator-ignite git commit: #ignite-738: Remove rebuildAllIndexes() method from CacheQueries.
Date Thu, 16 Apr 2015 09:50:41 GMT
#ignite-738: Remove rebuildAllIndexes() method from CacheQueries.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/761c6cdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/761c6cdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/761c6cdc

Branch: refs/heads/ignite-218
Commit: 761c6cdc7b121aebcfd86f30b506b94afe251c89
Parents: 7cec172
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 19:50:45 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 19:50:45 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/query/CacheQueries.java   | 11 -----------
 .../processors/cache/query/GridCacheQueriesImpl.java    | 10 ----------
 .../processors/cache/query/GridCacheQueriesProxy.java   | 12 ------------
 .../handlers/cache/GridCacheQueryCommandHandler.java    |  2 +-
 .../processors/query/h2/GridH2IndexRebuildTest.java     |  8 ++++----
 5 files changed, 5 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/761c6cdc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
index 823c0a4..25b98ef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
@@ -89,17 +89,6 @@ public interface CacheQueries<K, V> {
     public IgniteInternalFuture<?> rebuildIndexes(String typeName);
 
     /**
-     * Forces this cache to rebuild search indexes of all types. Sometimes indexes
-     * may hold references to objects that have already been removed from cache. Although
-     * not affecting query results, these objects may consume extra memory. Rebuilding
-     * indexes will remove any redundant references that may have temporarily got stuck
-     * inside in-memory index.
-     *
-     * @return Future that will be completed when rebuilding of all indexes is finished.
-     */
-    public IgniteInternalFuture<?> rebuildAllIndexes();
-
-    /**
      * Accumulated metrics for all queries executed for this cache.
      *
      * @return Cache query metrics.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/761c6cdc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
index 929eb3e..c456498 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
@@ -141,21 +141,11 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<?> rebuildAllIndexes() {
-        return ctx.queries().rebuildAllIndexes();
-    }
-
-    /** {@inheritDoc} */
     @Override public QueryMetrics metrics() {
         return ctx.queries().metrics();
     }
 
     /** {@inheritDoc} */
-    @Override public void resetMetrics() {
-        ctx.queries().resetMetrics();
-    }
-
-    /** {@inheritDoc} */
     @Override public Collection<GridCacheSqlMetadata> sqlMetadata() throws IgniteCheckedException
{
         return ctx.queries().sqlMetadata();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/761c6cdc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
index c960a1d..8b39ef2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesProxy.java
@@ -174,18 +174,6 @@ public class GridCacheQueriesProxy<K, V> implements GridCacheQueriesEx<K,
V>, Ex
     }
 
     /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<?> rebuildAllIndexes() {
-        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
-
-        try {
-            return delegate.rebuildAllIndexes();
-        }
-        finally {
-            gate.leave(prev);
-        }
-    }
-
-    /** {@inheritDoc} */
     @Override public QueryMetrics metrics() {
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/761c6cdc/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
index a1fecaa..f223328 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheQueryCommandHandler.java
@@ -371,7 +371,7 @@ public class GridCacheQueryCommandHandler extends GridRestCommandHandlerAdapter
         /** {@inheritDoc} */
         @Override public Object call() throws Exception {
             if (clsName == null)
-                ((IgniteKernal)g).getCache(cacheName).queries().rebuildAllIndexes();
+                ((IgniteKernal)g).context().query().rebuildAllIndexes();
             else
                 ((IgniteKernal)g).getCache(cacheName).queries().rebuildIndexes(clsName);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/761c6cdc/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index bf81716..feab20a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -155,7 +155,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
     public void testRebuildIndexes() throws Exception {
         ((IgniteKernal)grid(0)).internalCache(null).queries().rebuildIndexes(ArrayList.class).get();
 
-        ((IgniteKernal)grid(0)).internalCache(null).queries().rebuildAllIndexes().get();
+        grid(0).context().query().rebuildAllIndexes().get();
 
         IgniteCache<Integer, TestValue1> cache1 = grid(0).cache(null);
         IgniteCache<Integer, TestValue2> cache2 = grid(0).cache(null);
@@ -195,7 +195,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
         assertEquals(1, cache2.query(qry4).getAll().size());
         assertEquals(1, cache2.query(qry5).getAll().size());
 
-        ((IgniteKernal)grid(0)).internalCache(null).queries().rebuildAllIndexes().get();
+        grid(0).context().query().rebuildAllIndexes().get();
 
         assertEquals(1, cache1.query(qry1).getAll().size());
         assertEquals(1, cache1.query(qry2).getAll().size());
@@ -218,7 +218,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
 
         checkCancel(((IgniteKernal)grid(0)).getCache(null).queries().rebuildIndexes("TestValue1"));
 
-        checkCancel(((IgniteKernal)grid(0)).getCache(null).queries().rebuildAllIndexes());
+        checkCancel(grid(0).context().query().rebuildAllIndexes());
 
         spi.sleepInRebuild = false;
 
@@ -228,7 +228,7 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
 
         fut1.get();
 
-        final IgniteInternalFuture<?> fut2 = ((IgniteKernal)grid(0)).getCache(null).queries().rebuildAllIndexes();
+        final IgniteInternalFuture<?> fut2 = grid(0).context().query().rebuildAllIndexes();;
 
         assertFalse(fut2.isCancelled());
 


Mime
View raw message