ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [03/18] incubator-ignite git commit: IGNITE-51 - Got rid of portables in code, tests need to be fixed.
Date Tue, 10 Feb 2015 14:06:34 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/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 4efebf9..968cc4c 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
@@ -450,10 +450,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (cc.getAtomicityMode() == ATOMIC)
             assertParameter(cc.getTransactionManagerLookupClassName() == null,
                 "transaction manager can not be used with ATOMIC cache");
-
-        if (cc.isPortableEnabled() && !ctx.isEnterprise())
-            throw new IgniteCheckedException("Portable mode for cache is supported only in Enterprise edition " +
-                "(set 'portableEnabled' property to 'false') [cacheName=" + cc.getName() + ']');
     }
 
     /**
@@ -1175,9 +1171,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "queryIndexEnabled",
                             "Query index enabled", locAttr.queryIndexEnabled(), rmtAttr.queryIndexEnabled(), true);
 
-                        CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "portableEnabled",
-                            "Portables enabled", locAttr.portableEnabled(), rmtAttr.portableEnabled(), true);
-
                         if (locAttr.cacheMode() == PARTITIONED) {
                             CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "evictSynchronized",
                                 "Eviction synchronized", locAttr.evictSynchronized(), rmtAttr.evictSynchronized(),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 5e441e1..b99def7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.portables.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
@@ -416,15 +415,6 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V
     ) {
         A.notNull(keyType, "keyType", valType, "valType");
 
-        if (!keepPortable && (PortableObject.class.isAssignableFrom(keyType) ||
-            PortableObject.class.isAssignableFrom(valType)))
-            throw new IllegalStateException("Failed to create cache projection for portable objects. " +
-                "Use keepPortable() method instead.");
-
-        if (keepPortable && (!U.isPortableOrCollectionType(keyType) || !U.isPortableOrCollectionType(valType)))
-            throw new IllegalStateException("Failed to create typed cache projection. If keepPortable() was " +
-                "called, projection can work only with portable classes (see GridPortables JavaDoc for details).");
-
         if (cctx.deploymentEnabled()) {
             try {
                 cctx.deploy().registerClasses(keyType, valType);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
index 1f6fbfa..e301d84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java
@@ -183,9 +183,9 @@ public class GridCacheStoreManager<K, V> extends GridCacheManagerAdapter<K, V> {
             }
         }
 
-        boolean convertPortable = !cctx.config().isKeepPortableInStore();
+        boolean convertPortable = !cctx.keepPortableInStore();
 
-        if (cctx.config().isPortableEnabled())
+        if (cctx.portableEnabled())
             this.convertPortable = convertPortable;
         else if (convertPortable)
             U.warn(log, "CacheConfiguration.isKeepPortableInStore() configuration property will " +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOsSerializationManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOsSerializationManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOsSerializationManager.java
new file mode 100644
index 0000000..594f791
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOsSerializationManager.java
@@ -0,0 +1,48 @@
+/*
+ * 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;
+
+import org.apache.ignite.internal.processors.cache.serialization.*;
+
+import java.util.*;
+
+/**
+ * Cache manager responsible for translating user objects into cache objects.
+ */
+public class IgniteCacheOsSerializationManager<K, V> extends GridCacheManagerAdapter<K, V>
+    implements IgniteCacheSerializationManager<K, V> {
+    /** {@inheritDoc} */
+    @Override public boolean portableEnabled() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean keepPortableInStore() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Object unwrapPortableIfNeeded(Object o, boolean keepPortable) {
+        return o;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<Object> unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable) {
+        return col;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
index 53c933f..3b2d073 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -23,7 +23,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -152,7 +151,7 @@ public class GridCacheAffinityImpl<K, V> implements CacheAffinity<K> {
             try {
                 key = (K)cctx.marshalToPortable(key);
             }
-            catch (PortableException e) {
+            catch (IgniteException e) {
                 U.error(log, "Failed to marshal key to portable: " + key, e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/serialization/IgniteCacheSerializationManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/serialization/IgniteCacheSerializationManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/serialization/IgniteCacheSerializationManager.java
new file mode 100644
index 0000000..974cfd7
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/serialization/IgniteCacheSerializationManager.java
@@ -0,0 +1,51 @@
+/*
+ * 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.serialization;
+
+import org.apache.ignite.internal.processors.cache.*;
+
+import java.util.*;
+
+/**
+ *
+ */
+public interface IgniteCacheSerializationManager<K, V> extends GridCacheManager<K, V> {
+    /**
+     * TODO this method should be removed from Ignite internals as a part of work on cache objects.
+     *
+     * @return Portable enabled flag for cache.
+     */
+    public boolean portableEnabled();
+
+    /**
+     * @return {@code True} if portable format should be preserved when passing values to cache store.
+     */
+    public boolean keepPortableInStore();
+
+
+    public Object unwrapPortableIfNeeded(Object o, boolean keepPortable);
+
+    /**
+     * Unwraps collection.
+     *
+     * @param col Collection to unwrap.
+     * @param keepPortable Keep portable flag.
+     * @return Unwrapped collection.
+     */
+    public Collection<Object> unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 8b98d41..71eda97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -34,7 +34,6 @@ import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.security.*;
-import org.apache.ignite.portables.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
@@ -2515,7 +2514,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K, V>
                         map0.put(key, val);
                     }
                 }
-                catch (PortableException e) {
+                catch (IgniteException e) {
                     return new GridFinishedFuture<>(cctx.kernalContext(), e);
                 }
             }
@@ -2532,7 +2531,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K, V>
                         invokeMap0.put(key, e.getValue());
                     }
                 }
-                catch (PortableException e) {
+                catch (IgniteException e) {
                     return new GridFinishedFuture<>(cctx.kernalContext(), e);
                 }
             }
@@ -2736,7 +2735,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K, V>
                 else
                     keys0 = null;
             }
-            catch (PortableException e) {
+            catch (IgniteException e) {
                 return new GridFinishedFuture<>(cctx.kernalContext(), e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
index ca9d1a1..c7002f8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/dataload/IgniteDataLoaderImpl.java
@@ -176,11 +176,7 @@ public class IgniteDataLoaderImpl<K, V> implements IgniteDataLoader<K, V>, Delay
         if (node == null)
             throw new IllegalStateException("Cache doesn't exist: " + cacheName);
 
-        GridCacheAttributes attrs = U.cacheAttributes(node, cacheName);
-
-        assert attrs != null : cacheName;
-
-        portableEnabled = attrs.portableEnabled();
+        portableEnabled = ctx.portable().portableEnabled(node, cacheName);
 
         discoLsnr = new GridLocalEventListener() {
             @Override public void onEvent(Event evt) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/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 9c6dc0e..7ac8a73 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
@@ -161,7 +161,9 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
      */
     public <T> T createComponent(Class<T> cls) {
         for (PluginProvider plugin : plugins.values()) {
-            T comp = (T)plugin.createComponent(cls);
+            PluginContext ctx = pluginContextForProvider(plugin);
+
+            T comp = (T)plugin.createComponent(ctx, cls);
 
             if (comp != null)
                 return comp;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableProcessor.java
index 594b767..8dc3fa9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/GridPortableProcessor.java
@@ -17,13 +17,13 @@
 
 package org.apache.ignite.internal.processors.portable;
 
+import org.apache.ignite.*;
 import org.apache.ignite.client.marshaller.*;
+import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.*;
-import org.apache.ignite.portables.*;
 import org.jetbrains.annotations.*;
 
 import java.nio.*;
-import java.util.*;
 
 /**
  * Portable processor.
@@ -36,44 +36,50 @@ public interface GridPortableProcessor extends GridProcessor {
     public int typeId(String typeName);
 
     /**
+     * @param obj Object to get type ID for.
+     * @return Type ID.
+     */
+    public int typeId(Object obj);
+
+    /**
      * @param obj Object to marshal.
      * @param trim If {@code true} trims result byte buffer.
      * @return Object bytes.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @throws IgniteException In case of error.
      */
-    public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws PortableException;
+    public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws IgniteException;
 
     /**
      * @param arr Byte array.
      * @param off Offset.
      * @return Unmarshalled object.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @throws IgniteException In case of error.
      */
-    public Object unmarshal(byte[] arr, int off) throws PortableException;
+    public Object unmarshal(byte[] arr, int off) throws IgniteException;
 
     /**
      * @param ptr Offheap pointer.
      * @param forceHeap If {@code true} creates heap-based object.
      * @return Unmarshalled object.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @throws IgniteException In case of error.
      */
-    public Object unmarshal(long ptr, boolean forceHeap) throws PortableException;
+    public Object unmarshal(long ptr, boolean forceHeap) throws IgniteException;
 
     /**
      * Converts temporary offheap object to heap-based.
      *
      * @param obj Object.
      * @return Heap-based object.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @throws IgniteException In case of error.
      */
-    @Nullable public Object unwrapTemporary(@Nullable Object obj) throws PortableException;
+    @Nullable public Object unwrapTemporary(@Nullable Object obj) throws IgniteException;
 
     /**
      * @param obj Object to marshal.
      * @return Portable object.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @throws IgniteException In case of error.
      */
-    public Object marshalToPortable(@Nullable Object obj) throws PortableException;
+    public Object marshalToPortable(@Nullable Object obj) throws IgniteException;
 
     /**
      * @param obj Object (portable or not).
@@ -94,57 +100,31 @@ public interface GridPortableProcessor extends GridProcessor {
     public boolean isPortable(GridClientMarshaller marsh);
 
     /**
-     * @return Builder.
+     * @param node Node to check.
+     * @param cacheName Cache name to check.
+     * @return {@code True} if portable enabled for the specified cache, {@code false} otherwise.
      */
-    public PortableBuilder builder(int typeId);
+    public boolean portableEnabled(ClusterNode node, String cacheName);
 
     /**
-     * @return Builder.
-     */
-    public PortableBuilder builder(String clsName);
-
-    /**
-     * Creates builder initialized by existing portable object.
+     * Checks whether object is portable object.
      *
-     * @param portableObj Portable object to edit.
-     * @return Portable builder.
-     */
-    public PortableBuilder builder(PortableObject portableObj);
-
-    /**
-     * @param typeId Type ID.
-     * @param newMeta New meta data.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
-     */
-    public void addMeta(int typeId, final PortableMetadata newMeta) throws PortableException;
-
-    /**
-     * @param typeId Type ID.
-     * @param typeName Type name.
-     * @param affKeyFieldName Affinity key field name.
-     * @param fieldTypeIds Fields map.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @param obj Object to check.
+     * @return {@code True} if object is already a portable object, {@code false} otherwise.
      */
-    public void updateMetaData(int typeId, String typeName, @Nullable String affKeyFieldName,
-        Map<String, Integer> fieldTypeIds) throws PortableException;
+    public boolean isPortableObject(Object obj);
 
     /**
-     * @param typeId Type ID.
-     * @return Meta data.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
-     */
-    @Nullable public PortableMetadata metadata(int typeId) throws PortableException;
-
-    /**
-     * @param typeIds Type ID.
-     * @return Meta data.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * Gets affinity key of portable object.
+     *
+     * @param obj Object to get affinity key for.
+     * @return Affinity key.
      */
-    public Map<Integer, PortableMetadata> metadata(Collection<Integer> typeIds) throws PortableException;
+    public Object affinityKey(Object obj);
 
     /**
-     * @return Metadata for all types.
-     * @throws org.apache.ignite.portables.PortableException In case of error.
+     * @param obj Portable object to get field from.
+     * @return Field value.
      */
-    public Collection<PortableMetadata> metadata() throws PortableException;
+    public Object field(Object obj, String fieldName);
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
index 46bc955..2442eb2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/portable/os/GridOsPortableProcessor.java
@@ -17,15 +17,15 @@
 
 package org.apache.ignite.internal.processors.portable.os;
 
+import org.apache.ignite.*;
 import org.apache.ignite.client.marshaller.*;
+import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.*;
 import org.apache.ignite.internal.processors.portable.*;
-import org.apache.ignite.portables.*;
 import org.jetbrains.annotations.*;
 
 import java.nio.*;
-import java.util.*;
 
 /**
  * No-op implementation of {@link GridPortableProcessor}.
@@ -44,27 +44,27 @@ public class GridOsPortableProcessor extends GridProcessorAdapter implements Gri
     }
 
     /** {@inheritDoc} */
-    @Override public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws PortableException {
+    @Override public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws IgniteException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Object unmarshal(byte[] arr, int off) throws PortableException {
+    @Nullable @Override public Object unmarshal(byte[] arr, int off) throws IgniteException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public Object unmarshal(long ptr, boolean forceHeap) throws PortableException {
+    @Override public Object unmarshal(long ptr, boolean forceHeap) throws IgniteException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public Object unwrapTemporary(Object obj) throws PortableException {
+    @Override public Object unwrapTemporary(Object obj) throws IgniteException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Object marshalToPortable(@Nullable Object obj) throws PortableException {
+    @Nullable @Override public Object marshalToPortable(@Nullable Object obj) throws IgniteException {
         return obj;
     }
 
@@ -84,43 +84,27 @@ public class GridOsPortableProcessor extends GridProcessorAdapter implements Gri
     }
 
     /** {@inheritDoc} */
-    @Override public PortableBuilder builder(int typeId) {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public PortableBuilder builder(String clsName) {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public PortableBuilder builder(PortableObject portableObj) {
-        return null;
+    @Override public boolean portableEnabled(ClusterNode node, String cacheName) {
+        return false;
     }
 
     /** {@inheritDoc} */
-    @Override public void addMeta(int typeId, PortableMetadata newMeta) throws PortableException {
-        // No-op.
+    @Override public boolean isPortableObject(Object obj) {
+        return false;
     }
 
     /** {@inheritDoc} */
-    @Override public void updateMetaData(int typeId, String typeName, String affKeyFieldName,
-        Map<String, Integer> fieldTypeIds) throws PortableException {
-        // No-op.
+    @Override public Object affinityKey(Object obj) {
+        return obj;
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public PortableMetadata metadata(int typeId) {
-        return null;
+    @Override public int typeId(Object obj) {
+        return 0;
     }
 
     /** {@inheritDoc} */
-    @Override public Map<Integer, PortableMetadata> metadata(Collection<Integer> typeIds) {
+    @Override public Object field(Object obj, String fieldName) {
         return null;
     }
-
-    /** {@inheritDoc} */
-    @Override public Collection<PortableMetadata> metadata() throws PortableException {
-        return Collections.emptyList();
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index d1fb0c1..af92335 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.internal.util.worker.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.portables.*;
 import org.apache.ignite.spi.indexing.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
@@ -290,10 +289,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
 
             if (id == null) {
-                if (val instanceof PortableObject) {
-                    PortableObject portable = (PortableObject)val;
-
-                    int typeId = portable.typeId();
+                if (ctx.portable().isPortableObject(val)) {
+                    int typeId = ctx.portable().typeId(val);
 
                     String typeName = portableName(typeId);
 
@@ -325,13 +322,13 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         d.keyClass(keyCls);
                         d.valueClass(valCls);
 
-                        if (key instanceof PortableObject) {
-                            PortableObject portableKey = (PortableObject)key;
+                        if (ctx.portable().isPortableObject(key)) {
+                            int typeId = ctx.portable().typeId(key);
 
-                            String typeName = portableName(portableKey.typeId());
+                            String typeName = portableName(typeId);
 
                             if (typeName != null) {
-                                CacheTypeMetadata keyMeta = declaredType(space, portableKey.typeId());
+                                CacheTypeMetadata keyMeta = declaredType(space, typeId);
 
                                 if (keyMeta != null)
                                     processPortableMeta(true, keyMeta, d);
@@ -346,13 +343,13 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                                 processClassMeta(true, d.keyCls, keyMeta, d);
                         }
 
-                        if (val instanceof PortableObject) {
-                            PortableObject portableVal = (PortableObject)val;
+                        if (ctx.portable().isPortableObject(val)) {
+                            int typeId = ctx.portable().typeId(val);
 
-                            String typeName = portableName(portableVal.typeId());
+                            String typeName = portableName(typeId);
 
                             if (typeName != null) {
-                                CacheTypeMetadata valMeta = declaredType(space, portableVal.typeId());
+                                CacheTypeMetadata valMeta = declaredType(space, typeId);
 
                                 d.name(typeName);
 
@@ -922,7 +919,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param d Type descriptor.
      * @throws IgniteCheckedException If failed.
      */
-    static void processPortableMeta(boolean key, CacheTypeMetadata meta, TypeDescriptor d)
+    private void processPortableMeta(boolean key, CacheTypeMetadata meta, TypeDescriptor d)
         throws IgniteCheckedException {
         for (Map.Entry<String, Class<?>> entry : meta.getAscendingFields().entrySet()) {
             PortableProperty prop = buildPortableProperty(entry.getKey(), entry.getValue());
@@ -996,7 +993,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param resType Result type.
      * @return Portable property.
      */
-    static PortableProperty buildPortableProperty(String pathStr, Class<?> resType) {
+    private PortableProperty buildPortableProperty(String pathStr, Class<?> resType) {
         String[] path = pathStr.split("\\.");
 
         PortableProperty res = null;
@@ -1240,7 +1237,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
     /**
      *
      */
-    private static class PortableProperty extends Property {
+    private class PortableProperty extends Property {
         /** Property name. */
         private String propName;
 
@@ -1271,11 +1268,11 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             if (obj == null)
                 return null;
 
-            if (!(obj instanceof PortableObject))
+            if (!ctx.portable().isPortableObject(obj))
                 throw new IgniteCheckedException("Non-portable object received as a result of property extraction " +
                     "[parent=" + parent + ", propName=" + propName + ", obj=" + obj + ']');
 
-            return ((PortableObject)obj).field(propName);
+            return ctx.portable().field(obj, propName);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index f20bf04..9c8bcc3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -28,7 +28,6 @@ import org.apache.ignite.internal.processors.rest.handlers.*;
 import org.apache.ignite.internal.processors.rest.handlers.cache.*;
 import org.apache.ignite.internal.processors.rest.handlers.datastructures.*;
 import org.apache.ignite.internal.processors.rest.handlers.log.*;
-import org.apache.ignite.internal.processors.rest.handlers.metadata.*;
 import org.apache.ignite.internal.processors.rest.handlers.task.*;
 import org.apache.ignite.internal.processors.rest.handlers.top.*;
 import org.apache.ignite.internal.processors.rest.handlers.version.*;
@@ -255,7 +254,6 @@ public class GridRestProcessor extends GridProcessorAdapter {
             addHandler(new GridTopologyCommandHandler(ctx));
             addHandler(new GridVersionCommandHandler(ctx));
             addHandler(new GridLogCommandHandler(ctx));
-            addHandler(new GridPortableMetadataHandler(ctx));
             addHandler(new DataStructuresCommandHandler(ctx));
 
             // Start protocols.
@@ -331,8 +329,8 @@ public class GridRestProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Applies {@link org.apache.ignite.configuration.ClientMessageInterceptor}
-     * from {@link org.apache.ignite.configuration.ClientConnectionConfiguration#getClientMessageInterceptor()}
+     * Applies {@link ClientMessageInterceptor}
+     * from {@link ClientConnectionConfiguration#getClientMessageInterceptor()}
      * to all user parameters in the request.
      *
      * @param req Client request.
@@ -378,8 +376,8 @@ public class GridRestProcessor extends GridProcessorAdapter {
     }
 
     /**
-     * Applies {@link org.apache.ignite.configuration.ClientMessageInterceptor} from
-     * {@link org.apache.ignite.configuration.ClientConnectionConfiguration#getClientMessageInterceptor()}
+     * Applies {@link ClientMessageInterceptor} from
+     * {@link ClientConnectionConfiguration#getClientMessageInterceptor()}
      * to all user objects in the response.
      *
      * @param res Response.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAbstractMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAbstractMessage.java
index 9f49377..c6557bc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAbstractMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAbstractMessage.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 import java.util.*;
@@ -26,7 +25,7 @@ import java.util.*;
 /**
  * This class provides implementation for commit message fields and cannot be used directly.
  */
-public abstract class GridClientAbstractMessage implements GridClientMessage, Externalizable, PortableMarshalAware {
+public abstract class GridClientAbstractMessage implements GridClientMessage, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -97,20 +96,6 @@ public abstract class GridClientAbstractMessage implements GridClientMessage, Ex
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeByteArray(sesTok);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader raw = reader.rawReader();
-
-        sesTok = raw.readByteArray();
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridClientAbstractMessage.class, this, super.toString());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAuthenticationRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAuthenticationRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAuthenticationRequest.java
index c9f28fc..8eed157 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAuthenticationRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientAuthenticationRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 
@@ -61,24 +60,6 @@ public class GridClientAuthenticationRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeObject(cred);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        cred = raw.readObject();
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridClientAuthenticationRequest.class, this, super.toString());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheQueryRequest.java
index f689b69..b62d2b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheQueryRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -321,50 +320,6 @@ public class GridClientCacheQueryRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader rawReader = reader.rawReader();
-
-        qryId = rawReader.readLong();
-        op = GridQueryOperation.fromOrdinal(rawReader.readInt());
-        type = GridQueryType.fromOrdinal(rawReader.readInt());
-        cacheName = rawReader.readString();
-        clause = rawReader.readString();
-        pageSize = rawReader.readInt();
-        timeout = rawReader.readLong();
-        includeBackups = rawReader.readBoolean();
-        enableDedup = rawReader.readBoolean();
-        keepPortable = rawReader.readBoolean();
-        clsName = rawReader.readString();
-        rmtReducerClsName = rawReader.readString();
-        rmtTransformerClsName = rawReader.readString();
-        qryArgs = rawReader.readObjectArray();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter rawWriter = writer.rawWriter();
-
-        rawWriter.writeLong(qryId);
-        rawWriter.writeInt(op.ordinal());
-        rawWriter.writeInt(type == null ? -1 : type.ordinal());
-        rawWriter.writeString(cacheName);
-        rawWriter.writeString(clause);
-        rawWriter.writeInt(pageSize);
-        rawWriter.writeLong(timeout);
-        rawWriter.writeBoolean(includeBackups);
-        rawWriter.writeBoolean(enableDedup);
-        rawWriter.writeBoolean(keepPortable);
-        rawWriter.writeString(clsName);
-        rawWriter.writeString(rmtReducerClsName);
-        rawWriter.writeString(rmtTransformerClsName);
-        rawWriter.writeObjectArray(qryArgs);
-    }
-
-    /** {@inheritDoc} */
     @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         super.readExternal(in);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheRequest.java
index 0bfe08a..58e973b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientCacheRequest.java
@@ -17,9 +17,7 @@
 
 package org.apache.ignite.internal.processors.rest.client.message;
 
-import org.apache.ignite.internal.util.portable.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 import org.jetbrains.annotations.*;
 
 import java.io.*;
@@ -230,52 +228,6 @@ public class GridClientCacheRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriterEx raw = (PortableRawWriterEx)writer.rawWriter();
-
-        raw.writeInt(op.ordinal());
-        raw.writeString(cacheName);
-        raw.writeInt(cacheFlagsOn);
-        raw.writeObjectDetached(key);
-        raw.writeObjectDetached(val);
-        raw.writeObjectDetached(val2);
-
-        raw.writeInt(vals != null ? vals.size() : -1);
-
-        if (vals != null) {
-            for (Map.Entry<Object, Object> e : vals.entrySet()) {
-                raw.writeObjectDetached(e.getKey());
-                raw.writeObjectDetached(e.getValue());
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReaderEx raw = (PortableRawReaderEx)reader.rawReader();
-
-        op = GridCacheOperation.fromOrdinal(raw.readInt());
-        cacheName = raw.readString();
-        cacheFlagsOn = raw.readInt();
-        key = raw.readObjectDetached();
-        val = raw.readObjectDetached();
-        val2 = raw.readObjectDetached();
-
-        int valsSize = raw.readInt();
-
-        if (valsSize >= 0) {
-            vals = U.newHashMap(valsSize);
-
-            for (int i = 0; i < valsSize; i++)
-                vals.put(raw.readObjectDetached(), raw.readObjectDetached());
-        }
-    }
-
-    /** {@inheritDoc} */
     @SuppressWarnings("deprecation")
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         super.writeExternal(out);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientGetMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientGetMetaDataRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientGetMetaDataRequest.java
deleted file mode 100644
index b4ee5dc..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientGetMetaDataRequest.java
+++ /dev/null
@@ -1,64 +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.rest.client.message;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
-
-import java.util.*;
-
-/**
- * Metadata request.
- */
-public class GridClientGetMetaDataRequest extends GridClientAbstractMessage {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** */
-    private Collection<Integer> typeIds;
-
-    /**
-     * @return Type IDs.
-     */
-    public Collection<Integer> typeIds() {
-        return typeIds;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeCollection(typeIds);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        typeIds = raw.readCollection();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridClientGetMetaDataRequest.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientLogRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientLogRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientLogRequest.java
index 2bd8735..af931c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientLogRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientLogRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 
@@ -81,28 +80,6 @@ public class GridClientLogRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeString(path);
-        raw.writeInt(from);
-        raw.writeInt(to);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        path = raw.readString();
-        from = raw.readInt();
-        to = raw.readInt();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         super.writeExternal(out);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientMetaDataResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientMetaDataResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientMetaDataResponse.java
deleted file mode 100644
index b74d922..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientMetaDataResponse.java
+++ /dev/null
@@ -1,57 +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.rest.client.message;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
-
-import java.util.*;
-
-/**
- * Metadata response.
- */
-public class GridClientMetaDataResponse implements PortableMarshalAware {
-    /** */
-    private Map<Integer, PortableMetadata> meta;
-
-    /**
-     * @param meta Portable objects metadata.
-     */
-    public void metaData(Map<Integer, PortableMetadata> meta) {
-        this.meta = meta;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeMap(meta);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader raw = reader.rawReader();
-
-        meta = raw.readMap();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridClientMetaDataResponse.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
index bedbb97..6605a15 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeBean.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 import java.util.*;
@@ -26,7 +25,7 @@ import java.util.*;
 /**
  * Node bean.
  */
-public class GridClientNodeBean implements Externalizable, PortableMarshalAware {
+public class GridClientNodeBean implements Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -255,43 +254,6 @@ public class GridClientNodeBean implements Externalizable, PortableMarshalAware
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeInt(tcpPort);
-        raw.writeInt(replicaCnt);
-        raw.writeString(dfltCacheMode);
-        raw.writeMap(attrs);
-        raw.writeMap(caches);
-        raw.writeCollection(tcpAddrs);
-        raw.writeCollection(tcpHostNames);
-        raw.writeUuid(nodeId);
-        raw.writeObject(consistentId);
-        raw.writeObject(metrics);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader raw = reader.rawReader();
-
-        tcpPort = raw.readInt();
-        replicaCnt = raw.readInt();
-
-        dfltCacheMode = raw.readString();
-
-        attrs = raw.readMap();
-        caches = raw.readMap();
-
-        tcpAddrs = raw.readCollection();
-        tcpHostNames = raw.readCollection();
-
-        nodeId = raw.readUuid();
-
-        consistentId = raw.readObject();
-        metrics = (GridClientNodeMetricsBean)raw.readObject();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         out.writeInt(tcpPort);
         out.writeInt(0); // Jetty port.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeMetricsBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeMetricsBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeMetricsBean.java
index 98a499a..91bfd6a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeMetricsBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientNodeMetricsBean.java
@@ -17,14 +17,12 @@
 
 package org.apache.ignite.internal.processors.rest.client.message;
 
-import org.apache.ignite.portables.*;
-
 import java.io.*;
 
 /**
  * Node metrics bean.
  */
-public class GridClientNodeMetricsBean implements Externalizable, PortableMarshalAware {
+public class GridClientNodeMetricsBean implements Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -1349,122 +1347,6 @@ public class GridClientNodeMetricsBean implements Externalizable, PortableMarsha
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeLong(lastUpdateTime);
-        raw.writeInt(maxActiveJobs);
-        raw.writeInt(curActiveJobs);
-        raw.writeFloat(avgActiveJobs);
-        raw.writeInt(maxWaitingJobs);
-        raw.writeInt(curWaitingJobs);
-        raw.writeFloat(avgWaitingJobs);
-        raw.writeInt(maxRejectedJobs);
-        raw.writeInt(curRejectedJobs);
-        raw.writeFloat(avgRejectedJobs);
-        raw.writeInt(maxCancelledJobs);
-        raw.writeInt(curCancelledJobs);
-        raw.writeFloat(avgCancelledJobs);
-        raw.writeInt(totalRejectedJobs);
-        raw.writeInt(totalCancelledJobs);
-        raw.writeInt(totalExecutedJobs);
-        raw.writeLong(maxJobWaitTime);
-        raw.writeLong(curJobWaitTime);
-        raw.writeDouble(avgJobWaitTime);
-        raw.writeLong(maxJobExecTime);
-        raw.writeLong(curJobExecTime);
-        raw.writeDouble(avgJobExecTime);
-        raw.writeInt(totalExecTasks);
-        raw.writeLong(totalIdleTime);
-        raw.writeLong(curIdleTime);
-        raw.writeInt(availProcs);
-        raw.writeDouble(load);
-        raw.writeDouble(avgLoad);
-        raw.writeDouble(gcLoad);
-        raw.writeLong(heapInit);
-        raw.writeLong(heapUsed);
-        raw.writeLong(heapCommitted);
-        raw.writeLong(heapMax);
-        raw.writeLong(nonHeapInit);
-        raw.writeLong(nonHeapUsed);
-        raw.writeLong(nonHeapCommitted);
-        raw.writeLong(nonHeapMax);
-        raw.writeLong(upTime);
-        raw.writeLong(startTime);
-        raw.writeLong(nodeStartTime);
-        raw.writeInt(threadCnt);
-        raw.writeInt(peakThreadCnt);
-        raw.writeLong(startedThreadCnt);
-        raw.writeInt(daemonThreadCnt);
-        raw.writeLong(fileSysFreeSpace);
-        raw.writeLong(fileSysTotalSpace);
-        raw.writeLong(fileSysUsableSpace);
-        raw.writeLong(lastDataVer);
-        raw.writeInt(sentMsgsCnt);
-        raw.writeLong(sentBytesCnt);
-        raw.writeInt(rcvdMsgsCnt);
-        raw.writeLong(rcvdBytesCnt);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader raw = reader.rawReader();
-
-        lastUpdateTime = raw.readLong();
-        maxActiveJobs = raw.readInt();
-        curActiveJobs = raw.readInt();
-        avgActiveJobs = raw.readFloat();
-        maxWaitingJobs = raw.readInt();
-        curWaitingJobs = raw.readInt();
-        avgWaitingJobs = raw.readFloat();
-        maxRejectedJobs = raw.readInt();
-        curRejectedJobs = raw.readInt();
-        avgRejectedJobs = raw.readFloat();
-        maxCancelledJobs = raw.readInt();
-        curCancelledJobs = raw.readInt();
-        avgCancelledJobs = raw.readFloat();
-        totalRejectedJobs = raw.readInt();
-        totalCancelledJobs = raw.readInt();
-        totalExecutedJobs = raw.readInt();
-        maxJobWaitTime = raw.readLong();
-        curJobWaitTime = raw.readLong();
-        avgJobWaitTime = raw.readDouble();
-        maxJobExecTime = raw.readLong();
-        curJobExecTime = raw.readLong();
-        avgJobExecTime = raw.readDouble();
-        totalExecTasks = raw.readInt();
-        totalIdleTime = raw.readLong();
-        curIdleTime = raw.readLong();
-        availProcs = raw.readInt();
-        load = raw.readDouble();
-        avgLoad = raw.readDouble();
-        gcLoad = raw.readDouble();
-        heapInit = raw.readLong();
-        heapUsed = raw.readLong();
-        heapCommitted = raw.readLong();
-        heapMax = raw.readLong();
-        nonHeapInit = raw.readLong();
-        nonHeapUsed = raw.readLong();
-        nonHeapCommitted = raw.readLong();
-        nonHeapMax = raw.readLong();
-        upTime = raw.readLong();
-        startTime = raw.readLong();
-        nodeStartTime = raw.readLong();
-        threadCnt = raw.readInt();
-        peakThreadCnt = raw.readInt();
-        startedThreadCnt = raw.readLong();
-        daemonThreadCnt = raw.readInt();
-        fileSysFreeSpace = raw.readLong();
-        fileSysTotalSpace = raw.readLong();
-        fileSysUsableSpace = raw.readLong();
-        lastDataVer = raw.readLong();
-        sentMsgsCnt = raw.readInt();
-        sentBytesCnt = raw.readLong();
-        rcvdMsgsCnt = raw.readInt();
-        rcvdBytesCnt = raw.readLong();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         out.writeLong(lastUpdateTime);
         out.writeInt(maxActiveJobs);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPortableMetaData.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPortableMetaData.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPortableMetaData.java
index 5b9a2f6..e96baf5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPortableMetaData.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPortableMetaData.java
@@ -18,14 +18,13 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.util.*;
 
 /**
  * Portable meta data sent from client.
  */
-public class GridClientPortableMetaData implements PortableMarshalAware {
+public class GridClientPortableMetaData {
     /** */
     private int typeId;
 
@@ -67,26 +66,6 @@ public class GridClientPortableMetaData implements PortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeInt(typeId);
-        raw.writeString(typeName);
-        raw.writeString(affKeyFieldName);
-        raw.writeMap(fields);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader raw = reader.rawReader();
-
-        typeId = raw.readInt();
-        typeName = raw.readString();
-        affKeyFieldName = raw.readString();
-        fields = raw.readMap();
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridClientPortableMetaData.class, this);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPutMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPutMetaDataRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPutMetaDataRequest.java
deleted file mode 100644
index 487da7a..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientPutMetaDataRequest.java
+++ /dev/null
@@ -1,64 +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.rest.client.message;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
-
-import java.util.*;
-
-/**
- * Metadata put request.
- */
-public class GridClientPutMetaDataRequest extends GridClientAbstractMessage {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** */
-    private Collection<GridClientPortableMetaData> meta;
-
-    /**
-     * @return Type IDs.
-     */
-    public Collection<GridClientPortableMetaData> metaData() {
-        return meta;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeCollection(meta);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        meta = raw.readCollection();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridClientPutMetaDataRequest.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientResponse.java
index 09e542f..c9a7263 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientResponse.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 
@@ -93,28 +92,6 @@ public class GridClientResponse extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeInt(successStatus);
-        raw.writeString(errorMsg);
-        raw.writeObject(res);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        successStatus = raw.readInt();
-        errorMsg = raw.readString();
-        res = raw.readObject();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         super.writeExternal(out);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
index 8a43030..a7fa86e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskRequest.java
@@ -17,9 +17,7 @@
 
 package org.apache.ignite.internal.processors.rest.client.message;
 
-import org.apache.ignite.internal.util.portable.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 
@@ -102,32 +100,6 @@ public class GridClientTaskRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriterEx raw = (PortableRawWriterEx)writer.rawWriter();
-
-        raw.writeString(taskName);
-        raw.writeBoolean(keepPortables);
-
-        if (keepPortables)
-            raw.writeObjectDetached(arg);
-        else
-            raw.writeObject(arg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReaderEx raw = (PortableRawReaderEx)reader.rawReader();
-
-        taskName = raw.readString();
-        keepPortables = raw.readBoolean();
-        arg = keepPortables ? raw.readObjectDetached() : raw.readObject();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         super.writeExternal(out);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskResultBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskResultBean.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskResultBean.java
index 12f4fdf..696ac03 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskResultBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTaskResultBean.java
@@ -17,16 +17,14 @@
 
 package org.apache.ignite.internal.processors.rest.client.message;
 
-import org.apache.ignite.internal.util.portable.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 
 /**
  * Task result.
  */
-public class GridClientTaskResultBean implements Externalizable, PortableMarshalAware {
+public class GridClientTaskResultBean implements Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -100,30 +98,6 @@ public class GridClientTaskResultBean implements Externalizable, PortableMarshal
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriterEx raw = (PortableRawWriterEx)writer.rawWriter();
-
-        raw.writeString(id);
-        raw.writeBoolean(finished);
-
-        raw.writeObject(res);
-
-        raw.writeString(error);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReaderEx raw = (PortableRawReaderEx)reader.rawReader();
-
-        id = raw.readString();
-        finished = raw.readBoolean();
-
-        res = raw.readObject();
-
-        error = raw.readString();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         U.writeString(out, id);
         out.writeBoolean(finished);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTopologyRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTopologyRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTopologyRequest.java
index 5a817c2..8b27084 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTopologyRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientTopologyRequest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.rest.client.message;
 
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
 
 import java.io.*;
 import java.util.*;
@@ -119,30 +118,6 @@ public class GridClientTopologyRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        super.writePortable(writer);
-
-        PortableRawWriter raw = writer.rawWriter();
-
-        raw.writeUuid(nodeId);
-        raw.writeString(nodeIp);
-        raw.writeBoolean(includeMetrics);
-        raw.writeBoolean(includeAttrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        super.readPortable(reader);
-
-        PortableRawReader raw = reader.rawReader();
-
-        nodeId = raw.readUuid();
-        nodeIp = raw.readString();
-        includeMetrics = raw.readBoolean();
-        includeAttrs = raw.readBoolean();
-    }
-
-    /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         super.writeExternal(out);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheClientQueryResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
index cd16cb8..b994cae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
@@ -17,15 +17,13 @@
 
 package org.apache.ignite.internal.processors.rest.handlers.cache;
 
-import org.apache.ignite.portables.*;
-
 import java.io.*;
 import java.util.*;
 
 /**
  * Client query result.
  */
-public class GridCacheClientQueryResult implements PortableMarshalAware, Serializable {
+public class GridCacheClientQueryResult implements Serializable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -96,24 +94,4 @@ public class GridCacheClientQueryResult implements PortableMarshalAware, Seriali
     public void nodeId(UUID nodeId) {
         this.nodeId = nodeId;
     }
-
-    /** {@inheritDoc} */
-    @Override public void writePortable(PortableWriter writer) throws PortableException {
-        PortableRawWriter rawWriter = writer.rawWriter();
-
-        rawWriter.writeBoolean(last);
-        rawWriter.writeLong(qryId);
-        rawWriter.writeUuid(nodeId);
-        rawWriter.writeCollection(items);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readPortable(PortableReader reader) throws PortableException {
-        PortableRawReader rawReader = reader.rawReader();
-
-        last = rawReader.readBoolean();
-        qryId = rawReader.readLong();
-        nodeId = rawReader.readUuid();
-        items = rawReader.readCollection();
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
deleted file mode 100644
index 1c53a9d..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/metadata/GridPortableMetadataHandler.java
+++ /dev/null
@@ -1,103 +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.rest.handlers.metadata;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.processors.rest.*;
-import org.apache.ignite.internal.processors.rest.client.message.*;
-import org.apache.ignite.internal.processors.rest.handlers.*;
-import org.apache.ignite.internal.processors.rest.request.*;
-import org.apache.ignite.internal.util.future.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.portables.*;
-
-import java.util.*;
-
-import static org.apache.ignite.internal.processors.rest.GridRestCommand.*;
-
-/**
- * Portable metadata handler.
- */
-public class GridPortableMetadataHandler extends GridRestCommandHandlerAdapter {
-    /** Supported commands. */
-    private static final Collection<GridRestCommand> SUPPORTED_COMMANDS = U.sealList(
-        PUT_PORTABLE_METADATA,
-        GET_PORTABLE_METADATA
-    );
-
-    /**
-     * @param ctx Context.
-     */
-    public GridPortableMetadataHandler(GridKernalContext ctx) {
-        super(ctx);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<GridRestCommand> supportedCommands() {
-        return SUPPORTED_COMMANDS;
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteInternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
-        assert SUPPORTED_COMMANDS.contains(req.command()) : req.command();
-
-        try {
-            if (req.command() == GET_PORTABLE_METADATA) {
-                GridRestPortableGetMetaDataRequest metaReq = (GridRestPortableGetMetaDataRequest)req;
-
-                GridRestResponse res = new GridRestResponse();
-
-                Map<Integer, PortableMetadata> meta = ctx.portable().metadata(metaReq.typeIds());
-
-                GridClientMetaDataResponse metaRes = new GridClientMetaDataResponse();
-
-                metaRes.metaData(meta);
-
-                res.setResponse(metaRes);
-
-                return new GridFinishedFuture<>(ctx, res);
-            }
-            else {
-                assert req.command() == PUT_PORTABLE_METADATA;
-
-                GridRestPortablePutMetaDataRequest metaReq = (GridRestPortablePutMetaDataRequest)req;
-
-                for (GridClientPortableMetaData meta : metaReq.metaData())
-                    ctx.portable().updateMetaData(meta.typeId(),
-                        meta.typeName(),
-                        meta.affinityKeyFieldName(),
-                        meta.fields());
-
-                GridRestResponse res = new GridRestResponse();
-
-                res.setResponse(true);
-
-                return new GridFinishedFuture<>(ctx, res);
-            }
-        }
-        catch (IgniteException e) {
-            return new GridFinishedFuture<>(ctx, e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridPortableMetadataHandler.class, this, super.toString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
index a3e2311..f9004c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskCommandHandler.java
@@ -34,7 +34,6 @@ import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.portables.*;
 import org.apache.ignite.resources.*;
 import org.jetbrains.annotations.*;
 
@@ -263,7 +262,7 @@ public class GridTaskCommandHandler extends GridRestCommandHandlerAdapter {
                                         res.setResponse(taskRestRes);
                                         fut.onDone(res);
                                     }
-                                    catch (PortableException e) {
+                                    catch (IgniteException e) {
                                         fut.onDone(new IgniteCheckedException("Failed to marshal task result: " +
                                             desc.result(), e));
                                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
index 12dc711..9407ce1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
@@ -313,20 +313,6 @@ public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridCli
 
             restReq = restTaskReq;
         }
-        else if (msg instanceof GridClientGetMetaDataRequest) {
-            GridClientGetMetaDataRequest req = (GridClientGetMetaDataRequest)msg;
-
-            restReq = new GridRestPortableGetMetaDataRequest(req);
-
-            restReq.command(GET_PORTABLE_METADATA);
-        }
-        else if (msg instanceof GridClientPutMetaDataRequest) {
-            GridClientPutMetaDataRequest req = (GridClientPutMetaDataRequest)msg;
-
-            restReq = new GridRestPortablePutMetaDataRequest(req);
-
-            restReq.command(PUT_PORTABLE_METADATA);
-        }
         else if (msg instanceof GridClientTopologyRequest) {
             GridClientTopologyRequest req = (GridClientTopologyRequest) msg;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortableGetMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortableGetMetaDataRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortableGetMetaDataRequest.java
deleted file mode 100644
index 6205a0e..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortableGetMetaDataRequest.java
+++ /dev/null
@@ -1,44 +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.rest.request;
-
-import org.apache.ignite.internal.processors.rest.client.message.*;
-
-import java.util.*;
-
-/**
- * Portable get metadata request.
- */
-public class GridRestPortableGetMetaDataRequest extends GridRestRequest {
-    /** */
-    private final GridClientGetMetaDataRequest msg;
-
-    /**
-     * @param msg Client message.
-     */
-    public GridRestPortableGetMetaDataRequest(GridClientGetMetaDataRequest msg) {
-        this.msg = msg;
-    }
-
-    /**
-     * @return Type IDs.
-     */
-    public Collection<Integer> typeIds() {
-        return msg.typeIds();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dff026be/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortablePutMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortablePutMetaDataRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortablePutMetaDataRequest.java
deleted file mode 100644
index 7acee393..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/request/GridRestPortablePutMetaDataRequest.java
+++ /dev/null
@@ -1,44 +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.rest.request;
-
-import org.apache.ignite.internal.processors.rest.client.message.*;
-
-import java.util.*;
-
-/**
- * Portable get metadata request.
- */
-public class GridRestPortablePutMetaDataRequest extends GridRestRequest {
-    /** */
-    private final GridClientPutMetaDataRequest msg;
-
-    /**
-     * @param msg Client message.
-     */
-    public GridRestPortablePutMetaDataRequest(GridClientPutMetaDataRequest msg) {
-        this.msg = msg;
-    }
-
-    /**
-     * @return Type IDs.
-     */
-    public Collection<GridClientPortableMetaData> metaData() {
-        return msg.metaData();
-    }
-}


Mime
View raw message