You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/11/03 05:10:19 UTC

[1/3] ignite git commit: Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1753-1282

Repository: ignite
Updated Branches:
  refs/heads/ignite-1753-1282 a111137d5 -> f3e4deed1


Merge branch 'ignite-1282' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-1753-1282


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

Branch: refs/heads/ignite-1753-1282
Commit: 07128a0c8952e4f3352261ca0429b27efe2ce137
Parents: 952ecf8 fd640d7
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Nov 3 09:39:58 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Nov 3 09:39:58 2015 +0700

----------------------------------------------------------------------
 .../portable/GridPortableMarshaller.java        |   26 +-
 .../portable/PortableClassDescriptor.java       |  121 +-
 .../internal/portable/PortableContext.java      |   51 +
 .../internal/portable/PortableFieldImpl.java    |   82 +
 .../internal/portable/PortableObjectEx.java     |   33 +-
 .../internal/portable/PortableObjectImpl.java   |  153 +-
 .../portable/PortableObjectOffheapImpl.java     |   53 +-
 .../portable/PortablePositionReadable.java      |   47 +
 .../internal/portable/PortablePrimitives.java   |  755 ++------
 .../portable/PortableReaderContext.java         |   37 +-
 .../internal/portable/PortableReaderExImpl.java | 1826 +++++++-----------
 .../internal/portable/PortableSchema.java       |  223 +++
 .../portable/PortableSchemaRegistry.java        |  172 ++
 .../ignite/internal/portable/PortableUtils.java |  174 +-
 .../internal/portable/PortableWriterExImpl.java |  613 +++---
 .../portable/builder/PortableBuilderImpl.java   |  198 +-
 .../portable/builder/PortableBuilderReader.java |   61 +-
 .../builder/PortableBuilderSerializer.java      |    6 +-
 .../portable/builder/PortableLazyArrayList.java |    6 +-
 .../builder/PortableLazyLinkedList.java         |    6 +-
 .../portable/builder/PortableLazyMap.java       |    6 +-
 .../portable/builder/PortableLazySet.java       |    4 +-
 .../streams/PortableAbstractInputStream.java    |   42 +-
 .../streams/PortableAbstractOutputStream.java   |   15 +
 .../streams/PortableHeapInputStream.java        |   17 +-
 .../streams/PortableHeapOutputStream.java       |    8 +
 .../portable/streams/PortableInputStream.java   |   12 +-
 .../streams/PortableOffheapInputStream.java     |   17 +-
 .../streams/PortableOffheapOutputStream.java    |    8 +
 .../portable/streams/PortableOutputStream.java  |    8 +
 .../processors/cache/GridCacheIoManager.java    |   28 +-
 .../CacheObjectPortableProcessorImpl.java       |    6 +-
 .../dotnet/PlatformDotNetCacheStore.java        |   53 +-
 .../PlatformDotNetConfigurationClosure.java     |    3 +-
 .../events/PlatformEventFilterListenerImpl.java |   31 +-
 .../PlatformBigEndianInputStreamImpl.java       |   14 +-
 .../PlatformBigEndianOutputStreamImpl.java      |    5 +
 .../memory/PlatformInputStreamImpl.java         |   22 +-
 .../memory/PlatformOutputStreamImpl.java        |    7 +
 .../platform/utils/PlatformUtils.java           |    1 -
 .../marshaller/portable/PortableMarshaller.java |    2 +-
 .../dotnet/PlatformDotNetCacheStoreFactory.java |   44 +-
 .../dotnet/PlatformDotNetLifecycleBean.java     |   49 +-
 ...PlatformDotNetPortableTypeConfiguration.java |   18 -
 .../apache/ignite/portable/PortableField.java   |   39 +
 .../apache/ignite/portable/PortableObject.java  |    9 +
 .../GridPortableMarshallerSelfTest.java         |   55 +-
 .../cache/IgniteCacheCreateRestartSelfTest.java |    6 +-
 .../IgniteCountDownLatchAbstractSelfTest.java   |    4 +-
 ...PartitionedQueueCreateMultiNodeSelfTest.java |    5 +-
 ...omicMultiNodeP2PDisabledFullApiSelfTest.java |    7 +-
 ...omicNearEnabledMultiNodeFullApiSelfTest.java |    7 +-
 ...niteCacheP2pUnmarshallingQueryErrorTest.java |   32 +-
 modules/platforms/cpp/README.txt                |   12 +-
 .../cpp/core-test/src/cache_query_test.cpp      |  214 +-
 .../src/portable_reader_writer_test.cpp         |  555 ++++--
 modules/platforms/cpp/core/Makefile.am          |    1 +
 modules/platforms/cpp/core/include/Makefile.am  |    5 +
 .../cpp/core/include/ignite/cache/cache.h       |   33 +
 .../cpp/core/include/ignite/cache/query/query.h |    1 +
 .../include/ignite/cache/query/query_cursor.h   |   11 +-
 .../ignite/cache/query/query_fields_cursor.h    |  153 ++
 .../ignite/cache/query/query_fields_row.h       |  154 ++
 .../core/include/ignite/cache/query/query_sql.h |   76 +-
 .../ignite/cache/query/query_sql_fields.h       |  210 ++
 .../core/include/ignite/impl/cache/cache_impl.h |   10 +
 .../impl/cache/query/query_fields_row_impl.h    |  174 ++
 .../ignite/impl/cache/query/query_impl.h        |   10 +
 .../ignite/impl/interop/interop_output_stream.h |    8 +
 .../ignite/impl/portable/portable_common.h      |   33 +-
 .../ignite/impl/portable/portable_reader_impl.h |  241 ++-
 .../ignite/impl/portable/portable_schema.h      |  114 ++
 .../ignite/impl/portable/portable_writer_impl.h |  105 +-
 .../platforms/cpp/core/project/vs/core.vcxproj  |    6 +
 .../cpp/core/project/vs/core.vcxproj.filters    |   18 +
 .../cpp/core/src/impl/cache/cache_impl.cpp      |    5 +
 .../core/src/impl/cache/query/query_impl.cpp    |   39 +-
 .../src/impl/interop/interop_input_stream.cpp   |    2 +-
 .../src/impl/interop/interop_output_stream.cpp  |   11 +
 .../src/impl/portable/portable_reader_impl.cpp  |  176 +-
 .../core/src/impl/portable/portable_schema.cpp  |   88 +
 .../src/impl/portable/portable_writer_impl.cpp  |  100 +-
 modules/platforms/cpp/examples/README.txt       |    4 +-
 .../Portable/PortableWriteBenchmark.cs          |    4 +-
 .../Config/Cache/Store/cache-store-session.xml  |    3 +-
 .../Config/Lifecycle/lifecycle-beans.xml        |    4 +-
 .../native-client-test-cache-parallel-store.xml |    3 +-
 .../Config/native-client-test-cache-store.xml   |   12 +-
 .../Apache.Ignite.Core.csproj                   |    5 +
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |    7 +-
 .../Impl/Cache/Store/CacheStore.cs              |    3 +-
 .../Apache.Ignite.Core/Impl/Common/Fnv1Hash.cs  |   54 +
 .../Impl/Common/ResizeableArray.cs              |   70 +
 .../Apache.Ignite.Core/Impl/IgniteUtils.cs      |   14 +-
 .../Impl/Memory/PlatformMemoryStream.cs         |   35 +-
 .../Impl/Portable/IPortableTypeDescriptor.cs    |    5 +
 .../Impl/Portable/Io/IPortableStream.cs         |    8 +-
 .../Impl/Portable/Io/PortableAbstractStream.cs  |   72 +-
 .../Impl/Portable/Io/PortableHeapStream.cs      |   99 +-
 .../Impl/Portable/PortableBuilderImpl.cs        |  145 +-
 .../Impl/Portable/PortableFullTypeDescriptor.cs |    9 +
 .../Impl/Portable/PortableMarshaller.cs         |    7 +-
 .../Impl/Portable/PortableObjectHeader.cs       |  343 ++++
 .../Impl/Portable/PortableObjectSchema.cs       |   98 +
 .../Impl/Portable/PortableObjectSchemaField.cs  |  113 ++
 .../Impl/Portable/PortableReaderImpl.cs         |  173 +-
 .../Portable/PortableSurrogateTypeDescriptor.cs |    9 +
 .../Impl/Portable/PortableUserObject.cs         |   82 +-
 .../Impl/Portable/PortableUtils.cs              |  147 +-
 .../Impl/Portable/PortableWriterImpl.cs         |  164 +-
 .../Impl/Portable/PortablesImpl.cs              |   16 +-
 .../Structure/PortableStructureTracker.cs       |    8 +
 .../Portable/PortableTypeConfiguration.cs       |   62 +-
 modules/platforms/dotnet/Apache.Ignite.sln      |    4 +
 .../examples/Config/example-cache-store.xml     |    3 +-
 parent/pom.xml                                  |    8 +-
 116 files changed, 5897 insertions(+), 3688 deletions(-)
----------------------------------------------------------------------



[3/3] ignite git commit: IGNITE-1753 Reworked builders logic: if we have class - use POJO otherwise use portable builder.

Posted by ak...@apache.org.
IGNITE-1753 Reworked builders logic: if we have class - use POJO otherwise use portable builder.


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

Branch: refs/heads/ignite-1753-1282
Commit: f3e4deed1e1bd4928850c1a0228dbe72f630745a
Parents: c4af3f6
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Nov 3 11:10:26 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Nov 3 11:10:26 2015 +0700

----------------------------------------------------------------------
 .../cache/store/jdbc/CacheJdbcPojoStore.java    | 204 ++++++++-----------
 .../jdbc/CacheJdbcPortableStoreSelfTest.java    |   2 -
 2 files changed, 85 insertions(+), 121 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f3e4deed/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
index e93e828..48d4972 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java
@@ -17,20 +17,25 @@
 
 package org.apache.ignite.cache.store.jdbc;
 
-import org.apache.ignite.*;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import javax.cache.CacheException;
+import javax.cache.integration.CacheLoaderException;
+import org.apache.ignite.IgnitePortables;
 import org.apache.ignite.cache.IgniteObject;
-import org.apache.ignite.cache.store.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
-import org.apache.ignite.portable.*;
-import org.jetbrains.annotations.*;
-
-import javax.cache.*;
-import javax.cache.integration.*;
-import java.lang.reflect.*;
-import java.sql.*;
-import java.util.*;
+import org.apache.ignite.cache.store.CacheStore;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.portable.PortableBuilder;
+import org.apache.ignite.portable.PortableObject;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Implementation of {@link CacheStore} backed by JDBC and POJO via reflection.
@@ -40,10 +45,10 @@ import java.util.*;
  */
 public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
     /** POJO methods cache. */
-    private volatile Map<String, Map<String, PojoMethodsCache>> pojoMethods = Collections.emptyMap();
+    private volatile Map<String, Map<String, PojoMethodsCache>> pojosMethods = Collections.emptyMap();
 
     /** Portables builders cache. */
-    private volatile Map<String, Map<String, IgniteBiTuple<Boolean, Integer>>> portableTypeIds = Collections.emptyMap();
+    private volatile Map<String, Map<String, Integer>> portablesTypeIds = Collections.emptyMap();
 
     /**
      * Get field value from object for use as query parameter.
@@ -62,7 +67,8 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
                 return obj;
             case POJO:
                 return extractPojoParameter(cacheName, typeName, fieldName, obj);
-            default: return extractPortableParameter(fieldName, obj);
+            default:
+                return extractPortableParameter(fieldName, obj);
         }
     }
 
@@ -79,10 +85,10 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
     @Nullable private Object extractPojoParameter(@Nullable String cacheName, String typeName, String fieldName,
         Object obj) throws CacheException {
         try {
-            Map<String, PojoMethodsCache> cacheMethods = pojoMethods.get(cacheName);
+            Map<String, PojoMethodsCache> cacheMethods = pojosMethods.get(cacheName);
 
             if (cacheMethods == null)
-                throw new CacheException("Failed to find POJO type metadata for cache: " +  U.maskName(cacheName));
+                throw new CacheException("Failed to find POJO type metadata for cache: " + U.maskName(cacheName));
 
             PojoMethodsCache mc = cacheMethods.get(typeName);
 
@@ -126,29 +132,33 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
         JdbcTypeField[] fields, Collection<String> hashFields, Map<String, Integer> loadColIdxs, ResultSet rs)
         throws CacheLoaderException {
         switch (typeKind(cacheName, typeName)) {
-            case SIMPLE: return (R)buildSimpleObject(cacheName, typeName, fields, hashFields, loadColIdxs, rs);
-            case POJO: return (R)buildPojoObject(cacheName, typeName, fields, loadColIdxs, rs);
-            default: return (R)buildPortableObject(cacheName, typeName, fields, hashFields, loadColIdxs, rs);
+            case SIMPLE:
+                return (R)buildSimpleObject(typeName, fields, loadColIdxs, rs);
+            case POJO:
+                return (R)buildPojoObject(cacheName, typeName, fields, loadColIdxs, rs);
+            default:
+                return (R)buildPortableObject(cacheName, typeName, fields, hashFields, loadColIdxs, rs);
         }
     }
 
     /**
+     * Construct simple object from query result.
      *
-     * @param cacheName
-     * @param typeName
-     * @param fields
-     * @param hashFields
-     * @param loadColIdxs
-     * @param rs
-     * @return
+     * @param typeName Type name.
+     * @param fields Fields descriptors.
+     * @param loadColIdxs Select query columns index.
+     * @param rs ResultSet.
+     * @return Constructed POJO.
+     * @throws CacheLoaderException If failed to construct POJO.
      */
-    private Object buildSimpleObject(@Nullable String cacheName, String typeName, JdbcTypeField[] fields,
-        Collection<String> hashFields, Map<String, Integer> loadColIdxs, ResultSet rs) throws CacheLoaderException {
+    private Object buildSimpleObject(String typeName, JdbcTypeField[] fields, Map<String, Integer> loadColIdxs,
+        ResultSet rs) throws CacheLoaderException {
         try {
             JdbcTypeField field = fields[0];
 
             return getColumnValue(rs, loadColIdxs.get(field.getDatabaseFieldName()), field.getJavaFieldType());
-        } catch (SQLException e) {
+        }
+        catch (SQLException e) {
             throw new CacheLoaderException("Failed to read object of class: " + typeName, e);
         }
     }
@@ -168,10 +178,10 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
         JdbcTypeField[] fields, Map<String, Integer> loadColIdxs, ResultSet rs)
         throws CacheLoaderException {
 
-        Map<String, PojoMethodsCache> cacheMethods = pojoMethods.get(cacheName);
+        Map<String, PojoMethodsCache> cacheMethods = pojosMethods.get(cacheName);
 
         if (cacheMethods == null)
-            throw new CacheLoaderException("Failed to find POJO types metadata for cache: " +  U.maskName(cacheName));
+            throw new CacheLoaderException("Failed to find POJO types metadata for cache: " + U.maskName(cacheName));
 
         PojoMethodsCache mc = cacheMethods.get(typeName);
 
@@ -232,53 +242,38 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
      */
     protected Object buildPortableObject(String cacheName, String typeName, JdbcTypeField[] fields,
         Collection<String> hashFields, Map<String, Integer> loadColIdxs, ResultSet rs) throws CacheLoaderException {
-        Map<String, IgniteBiTuple<Boolean, Integer>> cacheTypeIds = portableTypeIds.get(cacheName);
+        Map<String, Integer> cacheTypeIds = portablesTypeIds.get(cacheName);
 
         if (cacheTypeIds == null)
-            throw new CacheLoaderException("Failed to find portable types IDs for cache: " +  U.maskName(cacheName));
+            throw new CacheLoaderException("Failed to find portable types IDs for cache: " + U.maskName(cacheName));
 
-        IgniteBiTuple<Boolean, Integer> tuple = cacheTypeIds.get(typeName);
+        Integer typeId = cacheTypeIds.get(typeName);
 
-        if (tuple == null)
+        if (typeId == null)
             throw new CacheLoaderException("Failed to find portable type ID for type: " + typeName);
 
         try {
-            if (tuple.get1()) {
-                Object simple = null;
+            PortableBuilder builder = ignite.portables().builder(typeId);
 
-                if (fields.length > 0) {
-                    JdbcTypeField field = fields[0];
+            boolean calcHash = hashFields != null;
 
-                    Integer colIdx = loadColIdxs.get(field.getDatabaseFieldName());
+            Collection<Object> hashValues = calcHash ? new ArrayList<>(hashFields.size()) : null;
 
-                    simple = getColumnValue(rs, colIdx, field.getJavaFieldType());
-                }
-
-                return simple;
-            }
-            else {
-                PortableBuilder builder = ignite.portables().builder(tuple.get2());
-
-                boolean calcHash = hashFields != null;
-
-                Collection<Object> hashValues = calcHash ? new ArrayList<>(hashFields.size()) : null;
-
-                for (JdbcTypeField field : fields) {
-                    Integer colIdx = loadColIdxs.get(field.getDatabaseFieldName());
-
-                    Object colVal = getColumnValue(rs, colIdx, field.getJavaFieldType());
+            for (JdbcTypeField field : fields) {
+                Integer colIdx = loadColIdxs.get(field.getDatabaseFieldName());
 
-                    builder.setField(field.getJavaFieldName(), colVal);
+                Object colVal = getColumnValue(rs, colIdx, field.getJavaFieldType());
 
-                    if (calcHash)
-                        hashValues.add(colVal);
-                }
+                builder.setField(field.getJavaFieldName(), colVal);
 
                 if (calcHash)
-                    builder.hashCode(hasher.hashCode(hashValues));
-
-                return builder.build();
+                    hashValues.add(colVal);
             }
+
+            if (calcHash)
+                builder.hashCode(hasher.hashCode(hashValues));
+
+            return builder.build();
         }
         catch (SQLException e) {
             throw new CacheException("Failed to read portable object", e);
@@ -321,79 +316,50 @@ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> {
      */
     @Override protected void prepareBuilders(@Nullable String cacheName, Collection<JdbcType> types)
         throws CacheException {
-        preparePojoBuilders(cacheName, types);
-        preparePortableBuilders(cacheName, types);
-    }
-
+        Map<String, PojoMethodsCache> pojoMethods = U.newHashMap(types.size() * 2);
+        Map<String, Integer> typeIds = U.newHashMap(types.size() * 2);
 
-    /**
-     * Prepare builders for POJOs via reflection (getters and setters).
-     *
-     * @param cacheName Cache name to prepare builders for.
-     * @param types Collection of types.
-     * @throws CacheException If failed to prepare internal builders for types.
-     */
-    private void preparePojoBuilders(@Nullable String cacheName, Collection<JdbcType> types)
-        throws CacheException {
-        Map<String, PojoMethodsCache> typeMethods = U.newHashMap(types.size() * 2);
+        IgnitePortables portables = ignite.portables();
 
         for (JdbcType type : types) {
-            // TODO FIX-ME !!!
-            if (typeKind(cacheName, type.getKeyType()) == TypeKind.POJO) {
-                String keyType = type.getKeyType();
+            String keyTypeName = type.getKeyType();
 
-                if (typeMethods.containsKey(keyType))
-                    throw new CacheException("Found duplicate key type [cache=" +  U.maskName(cacheName) +
-                        ", keyType=" + keyType + "]");
+            TypeKind keyKind = typeKind(cacheName, keyTypeName);
 
-                typeMethods.put(keyType, new PojoMethodsCache(keyType, type.getKeyFields()));
+            if (keyKind == TypeKind.POJO) {
+                if (pojoMethods.containsKey(keyTypeName))
+                    throw new CacheException("Found duplicate key type [cache=" + U.maskName(cacheName) +
+                        ", keyType=" + keyTypeName + "]");
 
-                String valType = type.getValueType();
-                typeMethods.put(valType, new PojoMethodsCache(valType, type.getValueFields()));
+                pojoMethods.put(keyTypeName, new PojoMethodsCache(keyTypeName, type.getKeyFields()));
             }
-        }
+            else if (keyKind == TypeKind.PORTABLE)
+                typeIds.put(keyTypeName, portables.typeId(keyTypeName));
 
-        if (!typeMethods.isEmpty()) {
-            Map<String, Map<String, PojoMethodsCache>> newMtdsCache = new HashMap<>(pojoMethods);
+            String valTypeName = type.getValueType();
 
-            newMtdsCache.put(cacheName, typeMethods);
+            TypeKind valKind = typeKind(cacheName, valTypeName);
 
-            pojoMethods = newMtdsCache;
+            if (valKind == TypeKind.POJO)
+                pojoMethods.put(valTypeName, new PojoMethodsCache(valTypeName, type.getValueFields()));
+            else if (valKind == TypeKind.PORTABLE)
+                typeIds.put(valTypeName, portables.typeId(valTypeName));
         }
-    }
 
-    /**
-     * Prepare builders for portable objects via portable builder.
-     *
-     * @param cacheName Cache name to prepare builders for.
-     * @param types Collection of types.
-     * @throws CacheException If failed to prepare internal builders for types.
-     */
-    private void preparePortableBuilders(@Nullable String cacheName, Collection<JdbcType> types)
-        throws CacheException {
-        Map<String, IgniteBiTuple<Boolean, Integer>> typeIds = U.newHashMap(types.size() * 2);
-
-        for (JdbcType type : types) {
-            // TODO FIX-ME !!!
-            if (typeKind(cacheName, type.getKeyType()) == TypeKind.PORTABLE) {
-                Ignite ignite = ignite();
+        if (!pojoMethods.isEmpty()) {
+            Map<String, Map<String, PojoMethodsCache>> newPojosMethods = new HashMap<>(pojosMethods);
 
-                IgnitePortables portables = ignite.portables();
+            newPojosMethods.put(cacheName, pojoMethods);
 
-                String keyType = type.getKeyType();
-                typeIds.put(keyType, new IgniteBiTuple<>(SIMPLE_TYPES.contains(keyType), portables.typeId(keyType)));
-
-                String valType = type.getValueType();
-                typeIds.put(valType, new IgniteBiTuple<>(SIMPLE_TYPES.contains(valType), portables.typeId(valType)));
-            }
+            pojosMethods = newPojosMethods;
         }
 
         if (!typeIds.isEmpty()) {
-            Map<String, Map<String, IgniteBiTuple<Boolean, Integer>>> newBuilders = new HashMap<>(portableTypeIds);
+            Map<String, Map<String, Integer>> newPortablesTypeIds = new HashMap<>(portablesTypeIds);
 
-            newBuilders.put(cacheName, typeIds);
+            newPortablesTypeIds.put(cacheName, typeIds);
 
-            portableTypeIds = newBuilders;
+            portablesTypeIds = newPortablesTypeIds;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f3e4deed/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPortableStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPortableStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPortableStoreSelfTest.java
index 299b537..20a5fdf 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPortableStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPortableStoreSelfTest.java
@@ -47,7 +47,6 @@ public class CacheJdbcPortableStoreSelfTest extends CacheJdbcStoreAbstractSelfTe
         JdbcType[] storeTypes = new JdbcType[2];
 
         storeTypes[0] = new JdbcType();
-        storeTypes[0].setKeepSerialized(true);
         storeTypes[0].setDatabaseSchema("PUBLIC");
         storeTypes[0].setDatabaseTable("ORGANIZATION");
         storeTypes[0].setKeyType("org.apache.ignite.cache.store.jdbc.model.OrganizationKey");
@@ -59,7 +58,6 @@ public class CacheJdbcPortableStoreSelfTest extends CacheJdbcStoreAbstractSelfTe
             new JdbcTypeField(Types.VARCHAR, "CITY", String.class, "city"));
 
         storeTypes[1] = new JdbcType();
-        storeTypes[1].setKeepSerialized(true);
         storeTypes[1].setDatabaseSchema("PUBLIC");
         storeTypes[1].setDatabaseTable("PERSON");
         storeTypes[1].setKeyType("org.apache.ignite.cache.store.jdbc.model.PersonKey");


[2/3] ignite git commit: Merge remote-tracking branch 'origin/ignite-1753-1282' into ignite-1753-1282

Posted by ak...@apache.org.
Merge remote-tracking branch 'origin/ignite-1753-1282' into ignite-1753-1282


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

Branch: refs/heads/ignite-1753-1282
Commit: c4af3f641be4c6e0250165298f1964ec51a5b469
Parents: 07128a0 a111137
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Nov 3 10:16:02 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Nov 3 10:16:02 2015 +0700

----------------------------------------------------------------------
 .../store/jdbc/CacheAbstractJdbcStore.java      |  83 +++++++++------
 .../cache/store/jdbc/CacheJdbcPojoStore.java    | 102 +++++++++----------
 .../ignite/cache/store/jdbc/JdbcType.java       |  26 -----
 3 files changed, 105 insertions(+), 106 deletions(-)
----------------------------------------------------------------------