ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/2] incubator-ignite git commit: Merge branches 'ignite-163' and 'ignite-sql' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-sql
Date Tue, 03 Feb 2015 08:58:16 GMT
Merge branches 'ignite-163' and 'ignite-sql' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-sql

Conflicts:
	modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
	modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
	modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java


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

Branch: refs/heads/ignite-sql
Commit: d94d98f660cdc7c59e1dc185acacaad2072b5ca5
Parents: 31bc98e dba4756
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Tue Feb 3 11:56:42 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Tue Feb 3 11:56:42 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/CacheConfiguration.java |   4 +-
 .../configuration/IgniteConfiguration.java      |  12 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   5 +-
 .../managers/indexing/GridIndexingManager.java  |   4 +-
 .../cache/query/GridCacheQueriesImpl.java       |   2 +-
 .../cache/query/GridCacheQueryManager.java      |  16 +--
 .../cache/query/GridCacheSqlMetadata.java       |   2 +-
 .../processors/query/GridQueryIndexing.java     |   8 +-
 .../processors/query/GridQueryProcessor.java    |   6 +-
 .../spi/indexing/GridIndexingQueryFilter.java   |  35 ------
 .../ignite/spi/indexing/GridIndexingSpi.java    | 113 -------------------
 .../spi/indexing/GridNoopIndexingSpi.java       |  67 -----------
 .../spi/indexing/IndexingQueryFilter.java       |  34 ++++++
 .../apache/ignite/spi/indexing/IndexingSpi.java | 113 +++++++++++++++++++
 .../spi/indexing/noop/NoopIndexingSpi.java      |  68 +++++++++++
 .../IgniteTxExceptionAbstractSelfTest.java      |   4 +-
 .../processors/query/h2/IgniteH2Indexing.java   |  12 +-
 .../query/h2/opt/GridH2IndexBase.java           |   6 +-
 .../query/h2/opt/GridH2TreeIndex.java           |   2 +-
 .../query/h2/opt/GridLuceneIndex.java           |   2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |   2 +-
 21 files changed, 258 insertions(+), 259 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/cache/CacheConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
index 0000000,d379db7..93117bf
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
@@@ -1,0 -1,112 +1,113 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.ignite.spi.indexing;
+ 
+ import org.apache.ignite.spi.*;
+ import org.jetbrains.annotations.*;
+ 
++import javax.cache.*;
+ import java.util.*;
+ 
+ /**
+  * Indexing SPI allows user to index cache content. Using indexing SPI user can index data
in cache and run
+  * Usually cache name will be used as space name, so multiple caches can write to single
indexing SPI instance.
+  * <p>
+  * <b>NOTE:</b> this SPI (i.e. methods in this interface) should never be used
directly. SPIs provide
+  * internal view on the subsystem and is used internally by GridGain kernal. In rare use
cases when
+  * access to a specific implementation of this SPI is required - an instance of this SPI
can be obtained
+  * via {@link org.apache.ignite.Ignite#configuration()} method to check its configuration
properties or call other non-SPI
+  * methods. Note again that calling methods from this interface on the obtained instance
can lead
+  * to undefined behavior and explicitly not supported.
+  *
+  * Here is a Java example on how to configure SPI.
+  * <pre name="code" class="java">
+  * GridIndexingSpi spi = new MyIndexingSpi();
+  *
+  * GridConfiguration cfg = new GridConfiguration();
+  *
+  * // Overrides default indexing SPI.
+  * cfg.setIndexingSpi(spi);
+  *
+  * // Starts grid.
+  * G.start(cfg);
+  * </pre>
+  * Here is an example of how to configure SPI from Spring XML configuration file.
+  * <pre name="code" class="xml">
+  * &lt;property name=&quot;indexingSpi&quot;&gt;
+  *     &lt;bean class=&quot;com.example.MyIndexingSpi&quot;&gt;
+  *     &lt;/bean&gt;
+  * &lt;/property&gt;
+  * </pre>
+  * <p>
+  * <img src="http://www.gridgain.com/images/spring-small.png">
+  * <br>
+  * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
+  */
+ public interface IndexingSpi extends IgniteSpi {
+     /**
+      * Executes query.
+      *
+      * @param spaceName Space name.
+      * @param params Query parameters.
+      * @param filters System filters.
+      * @return Query result. If the iterator implements {@link AutoCloseable} it will be
correctly closed.
+      * @throws IgniteSpiException If failed.
+      */
 -    public Iterator<?> query(@Nullable String spaceName, Collection<Object>
params,
++    public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName, Collection<Object>
params,
+         @Nullable IndexingQueryFilter filters) throws IgniteSpiException;
+ 
+     /**
+      * Updates index. Note that key is unique for space, so if space contains multiple indexes
+      * the key should be removed from indexes other than one being updated.
+      *
+      * @param spaceName Space name.
+      * @param key Key.
+      * @param val Value.
+      * @param expirationTime Expiration time or 0 if never expires.
+      * @throws IgniteSpiException If failed.
+      */
+     public void store(@Nullable String spaceName, Object key, Object val, long expirationTime)
throws IgniteSpiException;
+ 
+     /**
+      * Removes index entry by key.
+      *
+      * @param spaceName Space name.
+      * @param key Key.
+      * @throws IgniteSpiException If failed.
+      */
+     public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException;
+ 
+     /**
+      * Will be called when entry with given key is swapped.
+      *
+      * @param spaceName Space name.
+      * @param key Key.
+      * @throws IgniteSpiException If failed.
+      */
+     public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException;
+ 
+     /**
+      * Will be called when entry with given key is unswapped.
+      *
+      * @param spaceName Space name.
+      * @param key Key.
+      * @param val Value.
+      * @throws IgniteSpiException If failed.
+      */
+     public void onUnswap(@Nullable String spaceName, Object key, Object val) throws IgniteSpiException;
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
index 0000000,8141bbd..83684ba
mode 000000,100644..100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
@@@ -1,0 -1,67 +1,68 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package org.apache.ignite.spi.indexing.noop;
+ 
+ import org.apache.ignite.spi.*;
+ import org.apache.ignite.spi.indexing.*;
+ import org.jetbrains.annotations.*;
+ 
++import javax.cache.*;
+ import java.util.*;
+ 
+ /**
+  * Default implementation of {@link IndexingSpi} which does not index cache.
+  */
+ @IgniteSpiNoop
+ public class NoopIndexingSpi extends IgniteSpiAdapter implements IndexingSpi {
+     /** {@inheritDoc} */
 -    @Override public Iterator<?> query(@Nullable String spaceName, Collection<Object>
params,
++    @Override public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName,
Collection<Object> params,
+         @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
+         throw new IgniteSpiException("You have to configure custom GridIndexingSpi implementation.");
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void store(@Nullable String spaceName, Object key, Object val, long
expirationTime)
+         throws IgniteSpiException {
+         assert false;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException
{
+         assert false;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException
{
+         assert false;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void onUnswap(@Nullable String spaceName, Object key, Object val) throws
IgniteSpiException {
+         assert false;
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException
{
+         // No-op.
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void spiStop() throws IgniteSpiException {
+         // No-op.
+     }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
index 85993ef,8794766..2de4091
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
@@@ -601,8 -601,7 +601,8 @@@ public abstract class IgniteTxException
          }
  
          /** {@inheritDoc} */
 -        @Override public Iterator<?> query(@Nullable String spaceName, Collection<Object>
params, @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
 +        @Override public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName,
Collection<Object> params,
-             @Nullable GridIndexingQueryFilter filters) throws IgniteSpiException {
++            @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
              throw new UnsupportedOperationException();
          }
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2IndexBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TreeIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d94d98f6/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
----------------------------------------------------------------------


Mime
View raw message