ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [31/31] incubator-ignite git commit: ignite-471-2: huge merge from sprint-6
Date Wed, 10 Jun 2015 16:27:54 GMT
ignite-471-2: huge merge from sprint-6


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

Branch: refs/heads/ignite-471-2
Commit: a062467e517ec3403dcbc3027c4f3ba446920cb0
Parents: 3d78aa1
Author: Denis Magda <dmagda@gridgain.com>
Authored: Wed Jun 10 19:27:00 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Wed Jun 10 19:27:00 2015 +0300

----------------------------------------------------------------------
 modules/yardstick/config/ignite-base-config.xml | 87 +++-----------------
 .../yardstick/cache/model/Organization.java     | 14 +++-
 .../ignite/yardstick/cache/model/Person.java    | 20 ++++-
 3 files changed, 44 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a062467e/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index cd57edc..9d28774 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -112,39 +112,13 @@
 
                     <property name="swapEnabled" value="false"/>
 
-                    <property name="typeMetadata">
+                    <property name="indexedTypes">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                                <property name="keyType" value="java.lang.Integer"/>
-                                <property name="valueType" value="org.apache.ignite.yardstick.cache.model.Organization"/>
-
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="id" value="java.lang.Integer"/>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
-                                </property>
-                            </bean>
-
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                                <property name="keyType" value="java.lang.Integer"/>
-                                <property name="valueType" value="org.apache.ignite.yardstick.cache.model.Person"/>
-
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="id" value="java.lang.Integer"/>
-                                        <entry key="orgId" value="java.lang.Integer"/>
-                                        <entry key="salary" value="java.lang.Double"/>
-                                    </map>
-                                </property>
-
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="firstName" value="java.lang.String"/>
-                                        <entry key="lastName" value="java.lang.String"/>
-                                    </map>
-                                </property>
-                            </bean>
+                            <value>java.lang.Integer</value>
+                            <value>org.apache.ignite.yardstick.cache.model.Organization</value>
+
+                            <value>java.lang.Integer</value>
+                            <value>org.apache.ignite.yardstick.cache.model.Person</value>
                         </list>
                     </property>
                 </bean>
@@ -160,39 +134,13 @@
 
                     <property name="memoryMode" value="OFFHEAP_TIERED"/>
 
-                    <property name="typeMetadata">
+                    <property name="indexedTypes">
                         <list>
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                                <property name="keyType" value="java.lang.Integer"/>
-                                <property name="valueType" value="org.apache.ignite.yardstick.cache.model.Organization"/>
-
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="id" value="java.lang.Integer"/>
-                                        <entry key="name" value="java.lang.String"/>
-                                    </map>
-                                </property>
-                            </bean>
-
-                            <bean class="org.apache.ignite.cache.CacheTypeMetadata">
-                                <property name="keyType" value="java.lang.Integer"/>
-                                <property name="valueType" value="org.apache.ignite.yardstick.cache.model.Person"/>
-
-                                <property name="ascendingFields">
-                                    <map>
-                                        <entry key="id" value="java.lang.Integer"/>
-                                        <entry key="orgId" value="java.lang.Integer"/>
-                                        <entry key="salary" value="java.lang.Double"/>
-                                    </map>
-                                </property>
-
-                                <property name="queryFields">
-                                    <map>
-                                        <entry key="firstName" value="java.lang.String"/>
-                                        <entry key="lastName" value="java.lang.String"/>
-                                    </map>
-                                </property>
-                            </bean>
+                            <value>java.lang.Integer</value>
+                            <value>org.apache.ignite.yardstick.cache.model.Organization</value>
+
+                            <value>java.lang.Integer</value>
+                            <value>org.apache.ignite.yardstick.cache.model.Person</value>
                         </list>
                     </property>
                 </bean>
@@ -215,17 +163,6 @@
             <list/>
         </property>
 
-        <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.portable.PortableMarshaller">
-                <property name="classNames">
-                    <list>
-                        <value>org.apache.ignite.yardstick.cache.model.*</value>
-                    </list>
-                </property>
-                <property name="metaDataEnabled" value="false" />
-            </bean>
-        </property>
-
         <property name="loadBalancingSpi">
             <bean class="org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi">
                 <property name="perTask" value="false"/>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a062467e/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Organization.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Organization.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Organization.java
index 2c9f01c..d8bba98 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Organization.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Organization.java
@@ -24,7 +24,7 @@ import java.io.*;
 /**
  * Organization record used for query test.
  */
-public class Organization {
+public class Organization implements Externalizable {
     /** Organization ID. */
     @QuerySqlField(index = true)
     private int id;
@@ -80,6 +80,18 @@ public class Organization {
     }
 
     /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(id);
+        out.writeUTF(name);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+        id = in.readInt();
+        name = in.readUTF();
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean equals(Object o) {
         return this == o || (o instanceof Organization) && id == ((Organization)o).id;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a062467e/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person.java
index 461da49..df8d58b 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/model/Person.java
@@ -24,7 +24,7 @@ import java.io.*;
 /**
  * Person record used for query test.
  */
-public class Person {
+public class Person implements Externalizable {
     /** Person ID. */
     @QuerySqlField(index = true)
     private int id;
@@ -152,6 +152,24 @@ public class Person {
     }
 
     /** {@inheritDoc} */
+    @Override public void writeExternal(ObjectOutput out) throws IOException {
+        out.writeInt(id);
+        out.writeInt(orgId);
+        out.writeUTF(firstName);
+        out.writeUTF(lastName);
+        out.writeDouble(salary);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
+        id = in.readInt();
+        orgId = in.readInt();
+        firstName = in.readUTF();
+        lastName = in.readUTF();
+        salary = in.readDouble();
+    }
+
+    /** {@inheritDoc} */
     @Override public boolean equals(Object o) {
         return this == o || (o instanceof Person) && id == ((Person)o).id;
     }


Mime
View raw message