ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject incubator-ignite git commit: ignite-212 - p2p lucene
Date Sun, 15 Feb 2015 20:28:25 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-212 d78a84c95 -> 22f42a323


ignite-212 - p2p lucene


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

Branch: refs/heads/ignite-212
Commit: 22f42a3230fc2e786934b19f38c2477aa5a9f3f0
Parents: d78a84c
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Sun Feb 15 23:28:04 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Sun Feb 15 23:28:04 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/IgniteH2Indexing.java   |  6 ++--
 .../query/h2/opt/GridLuceneIndex.java           | 13 ++++++--
 ...eplicatedFieldsQueryP2PDisabledSelfTest.java | 34 --------------------
 3 files changed, 14 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22f42a32/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 7276121..e3da0b7 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -1143,7 +1143,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
         }
 
         if (cfg.isUseOptimizedSerializer())
-            Utils.serializer = h2Serializer(ctx != null && ctx.config().isPeerClassLoadingEnabled());
+            Utils.serializer = h2Serializer(ctx != null && ctx.deploy().enabled());
 
         long maxOffHeapMemory = cfg.getMaxOffHeapMemory();
 
@@ -1737,7 +1737,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
             if (type().valueClass() == String.class) {
                 try {
-                    luceneIdx = new GridLuceneIndex(marshaller, offheap, spaceName, type,
true);
+                    luceneIdx = new GridLuceneIndex(ctx, marshaller, offheap, spaceName,
type, true);
                 }
                 catch (IgniteCheckedException e1) {
                     throw new IgniteException(e1);
@@ -1750,7 +1750,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
                 if (idx.type() == FULLTEXT) {
                     try {
-                        luceneIdx = new GridLuceneIndex(marshaller, offheap, spaceName, type,
true);
+                        luceneIdx = new GridLuceneIndex(ctx, marshaller, offheap, spaceName,
type, true);
                     }
                     catch (IgniteCheckedException e1) {
                         throw new IgniteException(e1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22f42a32/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
index 559f18e..7fc4843 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridLuceneIndex.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.query.h2.opt;
 
 import org.apache.commons.codec.binary.*;
 import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.lang.*;
@@ -81,9 +82,13 @@ public class GridLuceneIndex implements Closeable {
     /** */
     private final GridLuceneDirectory dir;
 
+    /** */
+    private final GridKernalContext ctx;
+
     /**
      * Constructor.
      *
+     * @param ctx Kernal context.
      * @param marshaller Indexing marshaller.
      * @param mem Unsafe memory.
      * @param spaceName Space name.
@@ -91,8 +96,9 @@ public class GridLuceneIndex implements Closeable {
      * @param storeVal Store value in index.
      * @throws IgniteCheckedException If failed.
      */
-    public GridLuceneIndex(Marshaller marshaller, @Nullable GridUnsafeMemory mem,
+    public GridLuceneIndex(GridKernalContext ctx, Marshaller marshaller, @Nullable GridUnsafeMemory
mem,
         @Nullable String spaceName, GridQueryTypeDescriptor type, boolean storeVal) throws
IgniteCheckedException {
+        this.ctx = ctx;
         this.marshaller = marshaller;
         this.spaceName = spaceName;
         this.type = type;
@@ -348,7 +354,10 @@ public class GridLuceneIndex implements Closeable {
 
                 String keyStr = doc.get(KEY_FIELD_NAME);
 
-                ClassLoader ldr = null; // TODO
+                ClassLoader ldr = null;
+
+                if (ctx != null && ctx.deploy().enabled())
+                    ldr = ctx.cache().internalCache(spaceName).context().deploy().globalLoader();
 
                 K k = marshaller.unmarshal(Base64.decodeBase64(keyStr), ldr);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22f42a32/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
deleted file mode 100644
index 83cb200..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQueryP2PDisabledSelfTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.configuration.*;
-
-/**
- * Tests for fields queries.
- */
-public class GridCacheReplicatedFieldsQueryP2PDisabledSelfTest extends GridCacheReplicatedFieldsQuerySelfTest
{
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        c.setPeerClassLoadingEnabled(false);
-
-        return c;
-    }
-}


Mime
View raw message