ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
Repository: ignite Updated Branches: refs/heads/ignite-1.5 49c298866 -> 18c413c41 IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-1.5 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/
[1/3] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
Repository: ignite Updated Branches: refs/heads/ignite-1537 bf101deb9 -> bd86925b1 IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-1537 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignit
[1/2] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
Repository: ignite Updated Branches: refs/heads/ignite-gg-10837 cc40e1f4e -> 9f7b14e84 IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-gg-10837 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apac
[4/5] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-1.5.1-2 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
[19/21] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-2236 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java ---
[2/3] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-843-rc2 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
[11/13] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-2206 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java ---
[15/31] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/master Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
[39/50] [abbrv] ignite git commit: IGNITE-2257: Fixed BinaryContext serialization.
IGNITE-2257: Fixed BinaryContext serialization. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18c413c4 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18c413c4 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18c413c4 Branch: refs/heads/ignite-961 Commit: 18c413c41b51994fb2eeaaebf4cf727049db0c8b Parents: 49c2988 Author: vozerov-gridgain Authored: Fri Dec 25 09:48:28 2015 +0300 Committer: thatcoach Committed: Fri Dec 25 09:48:28 2015 +0300 -- .../ignite/internal/binary/BinaryContext.java | 44 +-- .../internal/binary/BinaryEnumObjectImpl.java | 4 +- .../internal/binary/BinaryObjectImpl.java | 27 --- .../internal/binary/GridBinaryMarshaller.java | 82 +++- 4 files changed, 94 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java index 5c63fbd..163532d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java @@ -31,10 +31,8 @@ import org.apache.ignite.cache.affinity.AffinityKey; import org.apache.ignite.cache.affinity.AffinityKeyMapped; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataKey; -import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl; import org.apache.ignite.internal.processors.datastructures.CollocatedQueueItemKey; import org.apache.ignite.internal.processors.datastructures.CollocatedSetItemKey; import org.apache.ignite.internal.util.IgniteUtils; @@ -51,10 +49,6 @@ import org.jsr166.ConcurrentHashMap8; import java.io.Externalizable; import java.io.File; import java.io.IOException; -import java.io.InvalidObjectException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.io.ObjectStreamException; import java.lang.reflect.Field; import java.math.BigDecimal; import java.net.URISyntaxException; @@ -81,10 +75,7 @@ import java.util.jar.JarFile; /** * Binary context. */ -public class BinaryContext implements Externalizable { -/** */ -private static final long serialVersionUID = 0L; - +public class BinaryContext { /** */ private static final ClassLoader dfltLdr = U.gridClassLoader(); @@ -125,9 +116,6 @@ public class BinaryContext implements Externalizable { private MarshallerContext marshCtx; /** */ -private String gridName; - -/** */ private IgniteConfiguration igniteCfg; /** Logger. */ @@ -162,8 +150,6 @@ public class BinaryContext implements Externalizable { this.igniteCfg = igniteCfg; this.log = log; -gridName = igniteCfg.getGridName(); - colTypes.put(ArrayList.class, GridBinaryMarshaller.ARR_LIST); colTypes.put(LinkedList.class, GridBinaryMarshaller.LINKED_LIST); colTypes.put(HashSet.class, GridBinaryMarshaller.HASH_SET); @@ -727,34 +713,6 @@ public class BinaryContext implements Externalizable { return null; } -/** {@inheritDoc} */ -@Override public void writeExternal(ObjectOutput out) throws IOException { -U.writeString(out, igniteCfg.getGridName()); -} - -/** {@inheritDoc} */ -@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { -gridName = U.readString(in); -} - -/** - * @return Binary context. - * @throws ObjectStreamException In case of error. - */ -protected Object readResolve() throws ObjectStreamException { -try { -IgniteKernal g = IgnitionEx.gridx(gridName); - -if (g == null) -throw new IllegalStateException("Failed to find grid for name: " + gridName); - -return ((CacheObjectBinaryProcessorImpl)g.context().cacheObjects()).binaryContext(); -} -catch (IllegalStateException e) { -throw U.withCause(new InvalidObjectException(e.getMessage()), e); -} -} - /** * @param cls Class. * @param id Type ID. http://git-wip-us.apache.org/repos/asf/ignite/blob/18c413c4/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java