ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [16/16] ignite git commit: ignite-950-new - Fixed compilation.
Date Wed, 04 Nov 2015 10:28:19 GMT
ignite-950-new - Fixed compilation.


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

Branch: refs/heads/ignite-950-new
Commit: 27f939d92957447aa28a15f8ba588bdf7b7a3979
Parents: 76c73f3
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Wed Nov 4 13:27:33 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Wed Nov 4 13:27:33 2015 +0300

----------------------------------------------------------------------
 .../GridPortableMarshallerSelfTest.java         | 43 +++++---------------
 .../PortableCompactOffsetsAbstractSelfTest.java | 23 +++++------
 .../PortableCompactOffsetsHeapSelfTest.java     |  4 +-
 .../PortableCompactOffsetsOffheapSelfTest.java  |  4 +-
 .../IgnitePortableObjectsTestSuite.java         |  8 ++--
 5 files changed, 29 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/27f939d9/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
index 2171957..ea96842 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMarshallerSelfTest.java
@@ -41,19 +41,19 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentSkipListSet;
 import junit.framework.Assert;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryTypeIdMapper;
-import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.binary.BinaryRawReader;
 import org.apache.ignite.binary.BinaryRawWriter;
 import org.apache.ignite.binary.BinaryReader;
 import org.apache.ignite.binary.BinarySerializer;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryTypeConfiguration;
+import org.apache.ignite.binary.BinaryTypeIdMapper;
 import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.binary.Binarylizable;
+import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.portable.builder.BinaryObjectBuilderImpl;
 import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.IgniteUtils;
@@ -68,29 +68,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jsr166.ConcurrentHashMap8;
 import sun.misc.Unsafe;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetSocketAddress;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentSkipListSet;
-
 import static org.apache.ignite.internal.portable.PortableThreadLocalMemoryAllocator.THREAD_LOCAL_ALLOC;
 import static org.junit.Assert.assertArrayEquals;
 
@@ -417,7 +394,7 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
     /**
      * @throws Exception If failed.
      */
-    public void testPortableObject() throws Exception {
+    public void testBinaryObject() throws Exception {
         PortableMarshaller marsh = new PortableMarshaller();
 
         marsh.setTypeConfigurations(Arrays.asList(new BinaryTypeConfiguration(SimpleObject.class.getName())));
@@ -581,7 +558,7 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
             new BinaryTypeConfiguration(TestBinary.class.getName())
         ));
 
-        TestBinary obj = portableObject();
+        TestBinary obj = BinaryObject();
 
         BinaryObject po = marshal(obj, marsh);
 
@@ -1129,7 +1106,7 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
             customMappingType
         ));
 
-        TestBinary obj = portableObject();
+        TestBinary obj = BinaryObject();
 
         BinaryObjectImpl po = marshal(obj, marsh1);
 
@@ -2188,7 +2165,7 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
         assertEquals(obj.cls1, obj2.cls1);
         assertNull(obj2.cls2);
 
-        PortableObject portObj = marshal(obj, marsh);
+        BinaryObject portObj = marshal(obj, marsh);
 
         Class cls1 = portObj.field("cls1");
 
@@ -2561,7 +2538,7 @@ public class GridPortableMarshallerSelfTest extends GridCommonAbstractTest
{
     /**
      * @return Portable object.
      */
-    private TestBinary portableObject() {
+    private TestBinary BinaryObject() {
         SimpleObject innerSimple = new SimpleObject();
 
         innerSimple.b = 1;

http://git-wip-us.apache.org/repos/asf/ignite/blob/27f939d9/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsAbstractSelfTest.java
index 28058de..816af9a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsAbstractSelfTest.java
@@ -17,16 +17,15 @@
 
 package org.apache.ignite.internal.portable;
 
+import java.util.Arrays;
+import org.apache.ignite.binary.BinaryField;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.marshaller.MarshallerContextTestImpl;
 import org.apache.ignite.marshaller.portable.PortableMarshaller;
-import org.apache.ignite.portable.PortableField;
-import org.apache.ignite.portable.PortableMetadata;
-import org.apache.ignite.portable.PortableTypeConfiguration;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
-import java.util.Arrays;
-
 /**
  * Contains tests for compact offsets.
  */
@@ -39,11 +38,11 @@ public abstract class PortableCompactOffsetsAbstractSelfTest extends GridCommonA
 
     /** Dummy metadata handler. */
     protected static final PortableMetaDataHandler META_HND = new PortableMetaDataHandler()
{
-        @Override public void addMeta(int typeId, PortableMetadata meta) {
+        @Override public void addMeta(int typeId, BinaryType meta) {
             // No-op.
         }
 
-        @Override public PortableMetadata metadata(int typeId) {
+        @Override public BinaryType metadata(int typeId) {
             return null;
         }
     };
@@ -62,7 +61,7 @@ public abstract class PortableCompactOffsetsAbstractSelfTest extends GridCommonA
 
         marsh = new PortableMarshaller();
 
-        marsh.setTypeConfigurations(Arrays.asList(new PortableTypeConfiguration(TestObject.class.getName())));
+        marsh.setTypeConfigurations(Arrays.asList(new BinaryTypeConfiguration(TestObject.class.getName())));
         marsh.setContext(new MarshallerContextTestImpl(null));
 
         IgniteUtils.invoke(PortableMarshaller.class, marsh, "setPortableContext", ctx);
@@ -123,7 +122,7 @@ public abstract class PortableCompactOffsetsAbstractSelfTest extends GridCommonA
     private void check(int len) throws Exception {
         TestObject obj = new TestObject(len);
 
-        PortableObjectEx portObj = toPortable(marsh, obj);
+        BinaryObjectEx portObj = toPortable(marsh, obj);
 
         // 1. Test portable object content.
         assert portObj.hasField("field1");
@@ -139,8 +138,8 @@ public abstract class PortableCompactOffsetsAbstractSelfTest extends GridCommonA
         assert obj.field2 == field2;
 
         // 2. Test fields API.
-        PortableField field1Desc = portObj.fieldDescriptor("field1");
-        PortableField field2Desc = portObj.fieldDescriptor("field2");
+        BinaryField field1Desc = portObj.fieldDescriptor("field1");
+        BinaryField field2Desc = portObj.fieldDescriptor("field2");
 
         assert field1Desc.exists(portObj);
         assert field2Desc.exists(portObj);
@@ -165,7 +164,7 @@ public abstract class PortableCompactOffsetsAbstractSelfTest extends GridCommonA
      * @return Portable object.
      * @throws Exception If failed.
      */
-    protected abstract PortableObjectEx toPortable(PortableMarshaller marsh, Object obj)
throws Exception;
+    protected abstract BinaryObjectEx toPortable(PortableMarshaller marsh, Object obj) throws
Exception;
 
     /**
      * Test object.

http://git-wip-us.apache.org/repos/asf/ignite/blob/27f939d9/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsHeapSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsHeapSelfTest.java
index 826f972..ebdef38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsHeapSelfTest.java
@@ -24,9 +24,9 @@ import org.apache.ignite.marshaller.portable.PortableMarshaller;
  */
 public class PortableCompactOffsetsHeapSelfTest extends PortableCompactOffsetsAbstractSelfTest
{
     /** {@inheritDoc} */
-    @Override protected PortableObjectEx toPortable(PortableMarshaller marsh, Object obj)
throws Exception {
+    @Override protected BinaryObjectEx toPortable(PortableMarshaller marsh, Object obj) throws
Exception {
         byte[] bytes = marsh.marshal(obj);
 
-        return new PortableObjectImpl(ctx, bytes, 0);
+        return new BinaryObjectImpl(ctx, bytes, 0);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/27f939d9/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsOffheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsOffheapSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsOffheapSelfTest.java
index 9ad1c67..e3b6bda 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsOffheapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/portable/PortableCompactOffsetsOffheapSelfTest.java
@@ -47,7 +47,7 @@ public class PortableCompactOffsetsOffheapSelfTest extends PortableCompactOffset
     }
 
     /** {@inheritDoc} */
-    @Override protected PortableObjectEx toPortable(PortableMarshaller marsh, Object obj)
throws Exception {
+    @Override protected BinaryObjectEx toPortable(PortableMarshaller marsh, Object obj) throws
Exception {
         byte[] arr = marsh.marshal(obj);
 
         long ptr = UNSAFE.allocateMemory(arr.length);
@@ -56,6 +56,6 @@ public class PortableCompactOffsetsOffheapSelfTest extends PortableCompactOffset
 
         UNSAFE.copyMemory(arr, BYTE_ARR_OFF, null, ptr, arr.length);
 
-        return new PortableObjectOffheapImpl(ctx, ptr, 0, arr.length);
+        return new BinaryObjectOffheapImpl(ctx, ptr, 0, arr.length);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/27f939d9/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
index 3b6cb6a..c6b1fbc 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
@@ -30,8 +30,8 @@ import org.apache.ignite.internal.portable.GridPortableMetaDataSelfTest;
 import org.apache.ignite.internal.portable.GridPortableWildcardsSelfTest;
 import org.apache.ignite.internal.portable.PortableCompactOffsetsHeapSelfTest;
 import org.apache.ignite.internal.portable.PortableCompactOffsetsOffheapSelfTest;
-import org.apache.ignite.internal.portable.PortableFieldsHeapSelfTest;
-import org.apache.ignite.internal.portable.PortableFieldsOffheapSelfTest;
+import org.apache.ignite.internal.portable.BinaryFieldsHeapSelfTest;
+import org.apache.ignite.internal.portable.BinaryFieldsOffheapSelfTest;
 import org.apache.ignite.internal.processors.cache.portable.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
 import org.apache.ignite.internal.processors.cache.portable.GridCacheClientNodeBinaryObjectMetadataTest;
 import org.apache.ignite.internal.processors.cache.portable.GridCachePortableStoreObjectsSelfTest;
@@ -66,8 +66,8 @@ public class IgnitePortableObjectsTestSuite extends TestSuite {
         suite.addTestSuite(GridBinaryObjectBuilderStringAsCharsSelfTest.class);
         suite.addTestSuite(GridBinaryObjectBuilderAdditionalSelfTest.class);
         suite.addTestSuite(GridBinaryObjectBuilderStringAsCharsAdditionalSelfTest.class);
-        suite.addTestSuite(PortableFieldsHeapSelfTest.class);
-        suite.addTestSuite(PortableFieldsOffheapSelfTest.class);
+        suite.addTestSuite(BinaryFieldsHeapSelfTest.class);
+        suite.addTestSuite(BinaryFieldsOffheapSelfTest.class);
         suite.addTestSuite(PortableCompactOffsetsHeapSelfTest.class);
         suite.addTestSuite(PortableCompactOffsetsOffheapSelfTest.class);
         suite.addTestSuite(GridPortableMetaDataSelfTest.class);


Mime
View raw message