ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/9] ignite git commit: IGNITE-1847: Fixed rude bugs in BinaryMetaDataImpl.
Date Tue, 10 Nov 2015 12:21:41 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1847 [created] b2fd7bfd4


IGNITE-1847: Fixed rude bugs in BinaryMetaDataImpl.


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

Branch: refs/heads/ignite-1847
Commit: 52b57c7bf46539f3cc626a3ee40c0ec0d688424a
Parents: 93b71c7
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Nov 9 15:50:08 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Nov 9 15:50:08 2015 +0300

----------------------------------------------------------------------
 .../internal/portable/BinaryMetaDataImpl.java   | 30 +-------------------
 .../internal/portable/PortableContext.java      |  3 --
 .../CacheObjectBinaryProcessorImpl.java         |  4 +--
 3 files changed, 3 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/52b57c7b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
index 18f538b..7f2bdb9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryMetaDataImpl.java
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.Nullable;
 /**
  * Portable meta data implementation.
  */
-public class BinaryMetaDataImpl implements BinaryType, Binarylizable, Externalizable {
+public class BinaryMetaDataImpl implements BinaryType, Externalizable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -51,9 +51,6 @@ public class BinaryMetaDataImpl implements BinaryType, Binarylizable, Externaliz
     private Map<String, String> fields;
 
     /** */
-    private volatile Map<Integer, String> fldIdToName;
-
-    /** */
     private String affKeyFieldName;
 
     /**
@@ -104,13 +101,6 @@ public class BinaryMetaDataImpl implements BinaryType, Binarylizable,
Externaliz
         return affKeyFieldName;
     }
 
-    /**
-     * @return Fields meta data.
-     */
-    public Map<String, String> fieldsMeta() {
-        return fields != null ? fields : Collections.<String, String>emptyMap();
-    }
-
     /** {@inheritDoc} */
     @Override public void writeExternal(ObjectOutput out) throws IOException {
         U.writeString(out, typeName);
@@ -126,24 +116,6 @@ public class BinaryMetaDataImpl implements BinaryType, Binarylizable,
Externaliz
     }
 
     /** {@inheritDoc} */
-    @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
-        BinaryRawWriter raw = writer.rawWriter();
-
-        raw.writeString(typeName);
-        raw.writeString(affKeyFieldName);
-        raw.writeMap(fields);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
-        BinaryRawReader raw = reader.rawReader();
-
-        typeName = raw.readString();
-        affKeyFieldName = raw.readString();
-        fields = raw.readMap();
-    }
-
-    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(BinaryMetaDataImpl.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/52b57c7b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 54a180b..3c5633f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -237,9 +237,6 @@ public class PortableContext implements Externalizable {
         registerPredefinedType(T2.class, 62);
 
         // IDs range [200..1000] is used by Ignite internal APIs.
-
-        registerPredefinedType(BinaryObjectImpl.class, 200);
-        registerPredefinedType(BinaryMetaDataImpl.class, 201);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/52b57c7b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
index 2b3aa09..7c9b926 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/portable/CacheObjectBinaryProcessorImpl.java
@@ -843,8 +843,8 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
         BinaryType newMeta, @Nullable Map<String, String> fields) throws BinaryObjectException
{
         assert newMeta != null;
 
-        Map<String, String> oldFields = oldMeta != null ? ((BinaryMetaDataImpl)oldMeta).fieldsMeta()
: null;
-        Map<String, String> newFields = ((BinaryMetaDataImpl)newMeta).fieldsMeta();
+        Map<String, String> oldFields = oldMeta != null ? ((BinaryMetaDataImpl)oldMeta).fields0()
: null;
+        Map<String, String> newFields = ((BinaryMetaDataImpl)newMeta).fields0();
 
         boolean changed = false;
 


Mime
View raw message