ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [02/15] ignite git commit: Fixed IGFS and Memcached examples.
Date Thu, 27 Apr 2017 12:57:15 GMT
Fixed IGFS and Memcached examples.


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

Branch: refs/heads/ignite-5072-merge
Commit: ff13240c428439327b0de7efd8bad4bc773a093c
Parents: f5db974
Author: devozerov <vozerov@gridgain.com>
Authored: Thu Apr 27 11:45:03 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Apr 27 11:45:03 2017 +0300

----------------------------------------------------------------------
 .../misc/client/memcache/MemcacheRestExample.java |  2 +-
 .../memcache/MemcacheRestExampleNodeStartup.java  |  1 +
 .../processors/cache/GridCacheProcessor.java      |  2 +-
 modules/core/src/test/config/igfs-loopback.xml    | 18 ------------------
 modules/core/src/test/config/igfs-shmem.xml       | 18 ------------------
 5 files changed, 3 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ff13240c/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
index eb0e2d4..7913ea6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
@@ -52,7 +52,7 @@ public class MemcacheRestExample {
             System.out.println();
             System.out.println(">>> Memcache REST example started.");
 
-            IgniteCache<String, Object> cache = ignite.cache(null);
+            IgniteCache<String, Object> cache = ignite.cache("default");
 
             client = startMemcachedClient(host, port);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff13240c/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
index 439e042..aa3685e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExampleNodeStartup.java
@@ -65,6 +65,7 @@ public class MemcacheRestExampleNodeStartup {
 
         CacheConfiguration cacheCfg = new CacheConfiguration();
 
+        cacheCfg.setName("default");
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setRebalanceMode(SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff13240c/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 a01bac6..8e58856 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
@@ -708,7 +708,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
      * @throws IgniteCheckedException If failed.
      */
     private void registerCache(CacheConfiguration<?, ?> cfg) throws IgniteCheckedException
{
-        assert cfg.getName() != null;
+        CU.validateCacheName(cfg.getName());
 
         cloneCheckSerializable(cfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff13240c/modules/core/src/test/config/igfs-loopback.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/igfs-loopback.xml b/modules/core/src/test/config/igfs-loopback.xml
index 7ec5f10..6584348 100644
--- a/modules/core/src/test/config/igfs-loopback.xml
+++ b/modules/core/src/test/config/igfs-loopback.xml
@@ -53,24 +53,6 @@
         Configuration below demonstrates how to setup a IGFS node with file data.
     -->
     <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <!--
-            Configure optimized marshaller.
-        -->
-        <property name="marshaller">
-            <bean class="org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller">
-                <!--
-                    For better performance set this property to true in case
-                    all marshalled classes implement java.io.Serializable.
-                    Default value is true.
-
-                    Note, that it is recommended to implement java.io.Externalizable
-                    instead of java.io.Serializable for smaller network footprint
-                    and even better performance.
-                -->
-                <property name="requireSerializable" value="false"/>
-            </bean>
-        </property>
-
         <property name="fileSystemConfiguration">
             <list>
                 <bean class="org.apache.ignite.configuration.FileSystemConfiguration">

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff13240c/modules/core/src/test/config/igfs-shmem.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/igfs-shmem.xml b/modules/core/src/test/config/igfs-shmem.xml
index f6b1790..79aacb8 100644
--- a/modules/core/src/test/config/igfs-shmem.xml
+++ b/modules/core/src/test/config/igfs-shmem.xml
@@ -53,24 +53,6 @@
         Configuration below demonstrates how to setup a IGFS node with file data.
     -->
     <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <!--
-            Configure optimized marshaller.
-        -->
-        <property name="marshaller">
-            <bean class="org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller">
-                <!--
-                    For better performance set this property to true in case
-                    all marshalled classes implement java.io.Serializable.
-                    Default value is true.
-
-                    Note, that it is recommended to implement java.io.Externalizable
-                    instead of java.io.Serializable for smaller network footprint
-                    and even better performance.
-                -->
-                <property name="requireSerializable" value="false"/>
-            </bean>
-        </property>
-
         <property name="fileSystemConfiguration">
             <list>
                 <bean class="org.apache.ignite.configuration.FileSystemConfiguration">


Mime
View raw message