ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [43/50] [abbrv] ignite git commit: Page memory integration WIP
Date Thu, 04 Feb 2016 10:09:46 GMT
Page memory integration WIP


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

Branch: refs/heads/sql-store
Commit: fd13f7dbf15ef0adccf503559c23001a94821d9a
Parents: 9d195a5
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Fri Jan 29 15:55:23 2016 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Wed Feb 3 17:13:42 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheProcessor.java |  4 ++++
 .../processors/plugin/IgnitePluginProcessor.java      | 14 ++++++++++++++
 .../java/org/apache/ignite/plugin/PluginProvider.java | 11 +++++++++++
 .../processors/query/h2/opt/GridH2SpatialIndex.java   |  5 +++++
 .../processors/query/h2/opt/GridH2IndexBase.java      |  8 ++++++++
 .../internal/processors/query/h2/opt/GridH2Table.java |  8 ++++----
 6 files changed, 46 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 48c84d6..372ec6e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -1030,6 +1030,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
     private void startCache(GridCacheAdapter<?, ?> cache) throws IgniteCheckedException
{
         GridCacheContext<?, ?> cacheCtx = cache.context();
 
+        ctx.plugins().onBeforeCacheStart(cacheCtx);
+
         ctx.query().onCacheStart(cacheCtx);
         ctx.continuous().onCacheStart(cacheCtx);
 
@@ -1117,6 +1119,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         ctx.kernalContext().query().onCacheStop(ctx);
         ctx.kernalContext().continuous().onCacheStop(ctx);
 
+        ctx.kernalContext().plugins().onAfterCacheStop(ctx);
+
         U.stopLifecycleAware(log, lifecycleAwares(cache.configuration(), ctx.store().configuredStore()));
 
         if (log.isInfoEnabled())

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 560d474..058d018 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -33,6 +33,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.GridPluginContext;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.Extension;
@@ -186,6 +187,19 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * @param ctx Cache context.
+     */
+    public void onBeforeCacheStart(GridCacheContext<?, ?> ctx) {
+        for (PluginProvider provider : plugins.values())
+            provider.onBeforeCacheStart(ctx);
+    }
+
+    public void onAfterCacheStop(GridCacheContext<?, ?> ctx) {
+        for (PluginProvider provider : plugins.values())
+            provider.onAfterCacheStop(ctx);
+    }
+
+    /**
      * Print plugins information.
      */
     private void ackPluginsInfo() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java b/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
index 47acf0f..ddacdfe 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java
@@ -23,6 +23,7 @@ import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -128,6 +129,16 @@ public interface PluginProvider<C extends PluginConfiguration>
{
     public void receiveDiscoveryData(UUID nodeId, Serializable data);
 
     /**
+     * @param cctx Cache context.
+     */
+    public void onBeforeCacheStart(GridCacheContext cctx);
+
+    /**
+     * @param cctx Cache context.
+     */
+    public void onAfterCacheStop(GridCacheContext cctx);
+
+    /**
      * Validates that new node can join grid topology, this method is called on coordinator
      * node before new node joins topology.
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
b/modules/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
index 29b7dd4..52edbe4 100644
--- a/modules/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
+++ b/modules/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
@@ -267,6 +267,11 @@ public class GridH2SpatialIndex extends GridH2IndexBase implements SpatialIndex
     }
 
     /** {@inheritDoc} */
+    @Override public GridH2Row findOne(GridSearchRowPointer row) {
+        throw new UnsupportedOperationException();
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean canGetFirstOrLast() {
         return true;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
index fe90dec..1733c1e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
@@ -89,6 +89,14 @@ public abstract class GridH2IndexBase extends BaseIndex {
     public abstract GridH2Row remove(SearchRow row);
 
     /**
+     * Finds a single row by the given row.
+     *
+     * @param row Search row.
+     * @return Search result.
+     */
+    public abstract GridH2Row findOne(GridSearchRowPointer row);
+
+    /**
      * Takes or sets existing snapshot to be used in current thread.
      *
      * @param s Optional existing snapshot to use.

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd13f7db/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 175f5be..c09081c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -166,7 +166,7 @@ public class GridH2Table extends TableBase {
     private boolean onSwapUnswap(CacheObject key, @Nullable CacheObject val) throws IgniteCheckedException
{
         assert key != null;
 
-        GridH2TreeIndex pk = pk();
+        GridH2IndexBase pk = pk();
 
         assert desc != null;
 
@@ -358,8 +358,8 @@ public class GridH2Table extends TableBase {
      *
      * @return Primary key.
      */
-    private GridH2TreeIndex pk() {
-        return (GridH2TreeIndex)idxs.get(1);
+    private GridH2IndexBase pk() {
+        return (GridH2IndexBase)idxs.get(1);
     }
 
     /**
@@ -382,7 +382,7 @@ public class GridH2Table extends TableBase {
             desc.guard().begin();
 
         try {
-            GridH2TreeIndex pk = pk();
+            GridH2IndexBase pk = pk();
 
             if (!del) {
                 GridH2Row old = pk.put(row); // Put to PK.


Mime
View raw message