ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [25/50] [abbrv] incubator-ignite git commit: # IGNITE-32 Fixed db dialects.
Date Thu, 05 Feb 2015 09:25:43 GMT
# IGNITE-32 Fixed db dialects.


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

Branch: refs/heads/ignite-82
Commit: 6144c6130d140a5e9c038eea014706eb382c0b1a
Parents: 7e062cb
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Feb 4 18:06:47 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Feb 4 18:06:47 2015 +0700

----------------------------------------------------------------------
 .../ignite/cache/store/jdbc/JdbcCacheStore.java |  44 +++++--
 .../cache/store/jdbc/JdbcPojoCacheStore.java    |  49 ++++++-
 .../cache/store/jdbc/dialect/OracleDialect.java |   6 +-
 .../store/jdbc/dialect/SQLServerDialect.java    |   2 +-
 .../core/src/test/config/store/jdbc/Ignite.xml  |   2 +-
 .../store/jdbc/PojoJdbcCacheStoreTest.java      | 100 +++++++++++++--
 .../apache/ignite/schema/load/model/Ignite.xml  | 128 +++++++++----------
 7 files changed, 233 insertions(+), 98 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
index 5537965..29ca25d 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
@@ -38,6 +38,8 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.locks.*;
 
+import static java.sql.Statement.*;
+
 /**
  * Base {@link CacheStore} implementation backed by JDBC. This implementation stores objects
in underlying database
  * using mapping description.
@@ -649,9 +651,9 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements L
                             nested = nested.getNextException();
                         }
 
-                        // The error with code 23505 is thrown when trying to insert a row
that
+                        // The error with code 23505 or 23000 is thrown when trying to insert
a row that
                         // would violate a unique index or primary key.
-                        if (sqlState != null && Integer.valueOf(sqlState) == 23505)
{
+                        if ("23505".equals(sqlState) || "23000".equals(sqlState)) {
                             if (we == null)
                                 we = new CacheWriterException("Failed insert entry in database,
violate a unique" +
                                     " index or primary key [table=" + em.fullTableName()
+ ", entry=" + entry + "]");
@@ -903,24 +905,40 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements L
      */
     private void executeBatch(EntryMapping em, Statement stmt, String desc, int fromIdx,
int prepared,
         LazyValue<Object[]> lazyObjs) throws SQLException {
-        int[] rowCounts = stmt.executeBatch();
+        try {
+            int[] rowCounts = stmt.executeBatch();
 
-        int numOfRowCnt = rowCounts.length;
+            int numOfRowCnt = rowCounts.length;
 
-        if (numOfRowCnt != prepared)
-            U.warn(log, "Unexpected number of updated rows [table=" + em.fullTableName()
+ ", expected=" + prepared +
-                ", actual=" + numOfRowCnt + "]");
+            if (numOfRowCnt != prepared)
+                U.warn(log, "Unexpected number of updated rows [table=" + em.fullTableName()
+ ", expected=" + prepared +
+                    ", actual=" + numOfRowCnt + "]");
 
-        for (int i = 0; i < numOfRowCnt; i++) {
-            int cnt = rowCounts[i];
+            for (int i = 0; i < numOfRowCnt; i++) {
+                int cnt = rowCounts[i];
 
-            if (cnt != 1) {
-                Object[] objs = lazyObjs.value();
+                if (cnt != 1 && cnt != SUCCESS_NO_INFO) {
+                    Object[] objs = lazyObjs.value();
 
-                U.warn(log, "Batch " + desc + " returned unexpected updated row count [table="
+ em.fullTableName() +
-                    ", entry=" + objs[fromIdx + i] + ", expected=1, actual=" + cnt + "]");
+                    U.warn(log, "Batch " + desc + " returned unexpected updated row count
[table=" + em.fullTableName() +
+                        ", entry=" + objs[fromIdx + i] + ", expected=1, actual=" + cnt +
"]");
+                }
             }
         }
+        catch (BatchUpdateException be) {
+            int[] rowCounts = be.getUpdateCounts();
+
+            for (int i = 0; i < rowCounts.length; i++) {
+                if (rowCounts[i] == EXECUTE_FAILED) {
+                    Object[] objs = lazyObjs.value();
+
+                    U.warn(log, "Batch " + desc + " failed on execution [table=" + em.fullTableName()
+
+                        ", entry=" + objs[fromIdx + i] + "]");
+                }
+            }
+
+            throw be;
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
index 5a8548c..45f8dd9 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcPojoCacheStore.java
@@ -160,8 +160,53 @@ public class JdbcPojoCacheStore extends JdbcCacheStore<Object, Object>
{
         Object obj = t.newInstance();
 
         try {
-            for (CacheTypeFieldMetadata field : fields)
-                t.setters.get(field.getJavaName()).invoke(obj, rs.getObject(field.getDatabaseName()));
+            for (CacheTypeFieldMetadata field : fields) {
+                Method setter = t.setters.get(field.getJavaName());
+
+                Class<?> type = field.getJavaType();
+
+                String colName = field.getDatabaseName();
+
+                if (type == boolean.class)
+                    setter.invoke(obj, rs.getBoolean(colName));
+                else if (type == byte.class)
+                    setter.invoke(obj, rs.getByte(colName));
+                else if (type == short.class)
+                    setter.invoke(obj, rs.getShort(colName));
+                else if (type == int.class)
+                    setter.invoke(obj, rs.getInt(colName));
+                else if (type == long.class)
+                    setter.invoke(obj, rs.getLong(colName));
+                else if (type == float.class)
+                    setter.invoke(obj, rs.getFloat(colName));
+                else if (type == double.class)
+                    setter.invoke(obj, rs.getDouble(colName));
+                else if (type == Byte.class || type == Short.class || type == Integer.class
||
+                    type == Long.class || type == Float.class || type == Double.class) {
+                    Object val = rs.getObject(colName);
+
+                    if (val != null) {
+                        Number num = (Number)val;
+
+                        if (type == Byte.class)
+                            setter.invoke(obj, num.byteValue());
+                        else if (type == Short.class)
+                            setter.invoke(obj, num.shortValue());
+                        else if (type == Integer.class)
+                            setter.invoke(obj, num.intValue());
+                        else if (type == long.class)
+                            setter.invoke(obj, num.longValue());
+                        else if (type == float.class)
+                            setter.invoke(obj, num.floatValue());
+                        else if (type == double.class)
+                            setter.invoke(obj, num.doubleValue());
+                    }
+                    else
+                        setter.invoke(obj, new Object[]{ null });
+                }
+                else
+                    setter.invoke(obj, rs.getObject(colName));
+            }
 
             return (R)obj;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/OracleDialect.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/OracleDialect.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/OracleDialect.java
index cc960e8..e85e890 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/OracleDialect.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/OracleDialect.java
@@ -37,7 +37,7 @@ public class OracleDialect extends BasicJdbcDialect {
 
         String colsLst = mkString(cols, ", ");
 
-        String selCols = mkString(uniqCols, new C1<String, String>() {
+        String selCols = mkString(cols, new C1<String, String>() {
             @Override public String apply(String col) {
                 return String.format("? AS %s", col);
             }
@@ -47,7 +47,7 @@ public class OracleDialect extends BasicJdbcDialect {
             @Override public String apply(String col) {
                 return String.format("t.%s=v.%s", col, col);
             }
-        }, "", ", ", "");
+        }, "(", " AND ", ")");
 
         String setCols = mkString(uniqCols, new C1<String, String>() {
             @Override public String apply(String col) {
@@ -62,7 +62,7 @@ public class OracleDialect extends BasicJdbcDialect {
         }, "", ", ", "");
 
         return String.format("MERGE INTO %s.%s t" +
-            " USING (SELECT %s FROM dual) AS v" +
+            " USING (SELECT %s FROM dual) v" +
             "  ON %s" +
             " WHEN MATCHED THEN" +
             "  UPDATE SET %s" +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
index c3ce64b..df8cef9 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/SQLServerDialect.java
@@ -61,7 +61,7 @@ public class SQLServerDialect extends BasicJdbcDialect {
                 " WHEN MATCHED THEN" +
                 "  UPDATE SET %s" +
                 " WHEN NOT MATCHED THEN" +
-                "  INSERT (%s) VALUES (%s)", schema, tblName, repeat("?", cols.size(), "",
",", ""), colsLst,
+                "  INSERT (%s) VALUES (%s);", schema, tblName, repeat("?", cols.size(), "",
",", ""), colsLst,
             match, setCols, colsLst, valuesCols);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/test/config/store/jdbc/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/Ignite.xml b/modules/core/src/test/config/store/jdbc/Ignite.xml
index f0db1a7..a1fc231 100644
--- a/modules/core/src/test/config/store/jdbc/Ignite.xml
+++ b/modules/core/src/test/config/store/jdbc/Ignite.xml
@@ -20,7 +20,7 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
     <bean class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseSchema" value="PUBLIC"/>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/PojoJdbcCacheStoreTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/PojoJdbcCacheStoreTest.java
b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/PojoJdbcCacheStoreTest.java
index 63b5b11..e31abaf 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/PojoJdbcCacheStoreTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/PojoJdbcCacheStoreTest.java
@@ -38,6 +38,7 @@ import org.springframework.context.support.*;
 import org.springframework.core.io.*;
 
 import javax.cache.*;
+import javax.cache.integration.*;
 import java.io.*;
 import java.net.*;
 import java.sql.*;
@@ -87,6 +88,19 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
     protected JdbcPojoCacheStore store() throws IgniteCheckedException {
         JdbcPojoCacheStore store = new JdbcPojoCacheStore();
 
+//        PGPoolingDataSource ds = new PGPoolingDataSource();
+//        ds.setUser("postgres");
+//        ds.setPassword("1");
+//        ds.setServerName("192.168.1.47");
+//        ds.setDatabaseName("postgres");
+//        store.setDataSource(ds);
+
+//        MysqlDataSource ds = new MysqlDataSource();
+//        ds.setURL("jdbc:mysql://192.168.1.12:3306/test");
+//        ds.setUser("test");
+//        ds.setPassword("1");
+//        store.setDataSource(ds);
+
         store.setDataSource(JdbcConnectionPool.create(DFLT_CONN_URL, "sa", ""));
 
         return store;
@@ -132,7 +146,7 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
 
             store.prepareBuilders(null, typeMeta);
 
-            cacheMappings.put(null, Collections.unmodifiableMap(entryMappings));
+            cacheMappings.put(null, entryMappings);
 
             GridTestUtils.setFieldValue(store, JdbcCacheStore.class, "cacheMappings", cacheMappings);
         }
@@ -150,10 +164,60 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void testLoadCache() throws Exception {
-        Connection conn = DriverManager.getConnection(DFLT_CONN_URL, "sa", "");
+    public void testWriteRetry() throws Exception {
+        BasicJdbcDialect dialect = new BasicJdbcDialect() {
+            /** {@inheritDoc} */
+            @Override public String updateQuery(String schema, String tblName, Collection<String>
keyCols,
+                Iterable<String> valCols) {
+                return super.updateQuery(schema, tblName, keyCols, valCols) + " AND 1 = 0";
+            }
+        };
 
-        Statement stmt = conn.createStatement();
+        store.setDialect(dialect);
+
+        Map<String, Map<Object, JdbcCacheStore.EntryMapping>> cacheMappings =
+            GridTestUtils.getFieldValue(store, JdbcCacheStore.class, "cacheMappings");
+
+        JdbcCacheStore.EntryMapping em = cacheMappings.get(null).get(OrganizationKey.class);
+
+        CacheTypeMetadata typeMeta = GridTestUtils.getFieldValue(em, JdbcCacheStore.EntryMapping.class,
"typeMeta");
+
+        cacheMappings.get(null).put(OrganizationKey.class, new JdbcCacheStore.EntryMapping(dialect,
typeMeta));
+
+        Connection conn = store.openConnection(false);
+
+        PreparedStatement orgStmt = conn.prepareStatement("INSERT INTO Organization(id, name,
city) VALUES (?, ?, ?)");
+
+        orgStmt.setInt(1, 1);
+        orgStmt.setString(2, "name" + 1);
+        orgStmt.setString(3, "city" + 1);
+
+        orgStmt.executeUpdate();
+
+        U.closeQuiet(orgStmt);
+
+        conn.commit();
+
+        OrganizationKey k1 = new OrganizationKey(1);
+        Organization v1 = new Organization(1, "Name1", "City1");
+
+        ses.newSession(null);
+
+        try {
+            store.write(new CacheEntryImpl<>(k1, v1));
+        }
+        catch (CacheWriterException e) {
+            if (!e.getMessage().startsWith("Failed insert entry in database, violate a unique
index or primary key") ||
+                e.getSuppressed().length != 2)
+                throw e;
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testLoadCache() throws Exception {
+        Connection conn = store.openConnection(false);
 
         PreparedStatement orgStmt = conn.prepareStatement("INSERT INTO Organization(id, name,
city) VALUES (?, ?, ?)");
 
@@ -167,6 +231,8 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
 
         orgStmt.executeBatch();
 
+        U.closeQuiet(orgStmt);
+
         conn.commit();
 
         PreparedStatement prnStmt = conn.prepareStatement("INSERT INTO Person(id, org_id,
name) VALUES (?, ?, ?)");
@@ -183,7 +249,7 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
 
         conn.commit();
 
-        U.closeQuiet(stmt);
+        U.closeQuiet(prnStmt);
 
         U.closeQuiet(conn);
 
@@ -606,20 +672,26 @@ public class PojoJdbcCacheStoreTest extends GridCommonAbstractTest {
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
-        Connection conn = DriverManager.getConnection(DFLT_CONN_URL, "sa", "");
+        Connection conn = store.openConnection(false);
 
         Statement stmt = conn.createStatement();
 
-        stmt.executeUpdate("DROP TABLE IF EXISTS Organization");
-        stmt.executeUpdate("DROP TABLE IF EXISTS Person");
+        try {
+            stmt.executeUpdate("delete from Organization");
+        }
+        catch (SQLException ignore) {
+            // no-op
+        }
 
-        stmt.executeUpdate("CREATE TABLE Organization (id integer PRIMARY KEY, name varchar(50),
city varchar(50))");
-        stmt.executeUpdate("CREATE TABLE Person (id integer PRIMARY KEY, org_id integer,
name varchar(50))");
+        try {
+            stmt.executeUpdate("delete from Person");
+        }
+        catch (SQLException ignore) {
+            // no-op
+        }
 
-        stmt.executeUpdate("CREATE INDEX Org_Name_IDX On Organization (name)");
-        stmt.executeUpdate("CREATE INDEX Org_Name_City_IDX On Organization (name, city)");
-        stmt.executeUpdate("CREATE INDEX Person_Name_IDX1 On Person (name)");
-        stmt.executeUpdate("CREATE INDEX Person_Name_IDX2 On Person (name desc)");
+        stmt.executeUpdate("CREATE TABLE IF NOT EXISTS Organization (id integer not null,
name varchar(50), city varchar(50), PRIMARY KEY(id))");
+        stmt.executeUpdate("CREATE TABLE IF NOT EXISTS Person (id integer not null, org_id
integer, name varchar(50), PRIMARY KEY(id))");
 
         conn.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6144c613/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
index bfd5ad4..1e8fda9 100644
--- a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
+++ b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
@@ -30,8 +30,8 @@
         <property name="keyFields">
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="PK"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="PK"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -40,92 +40,92 @@
         <property name="valueFields">
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="PK"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="PK"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BOOLCOL"/>
-                    <property name="dbType" value="16"/>
+                    <property name="databaseName" value="BOOLCOL"/>
+                    <property name="databaseType" value="16"/>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="java.lang.Boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BYTECOL"/>
-                    <property name="dbType" value="-6"/>
+                    <property name="databaseName" value="BYTECOL"/>
+                    <property name="databaseType" value="-6"/>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="java.lang.Byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="SHORTCOL"/>
-                    <property name="dbType" value="5"/>
+                    <property name="databaseName" value="SHORTCOL"/>
+                    <property name="databaseType" value="5"/>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="java.lang.Short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="INTCOL"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="INTCOL"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="LONGCOL"/>
-                    <property name="dbType" value="-5"/>
+                    <property name="databaseName" value="LONGCOL"/>
+                    <property name="databaseType" value="-5"/>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="java.lang.Long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="FLOATCOL"/>
-                    <property name="dbType" value="7"/>
+                    <property name="databaseName" value="FLOATCOL"/>
+                    <property name="databaseType" value="7"/>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="java.lang.Float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DOUBLECOL"/>
-                    <property name="dbType" value="8"/>
+                    <property name="databaseName" value="DOUBLECOL"/>
+                    <property name="databaseType" value="8"/>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DOUBLECOL2"/>
-                    <property name="dbType" value="8"/>
+                    <property name="databaseName" value="DOUBLECOL2"/>
+                    <property name="databaseType" value="8"/>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BIGDECIMALCOL"/>
-                    <property name="dbType" value="3"/>
+                    <property name="databaseName" value="BIGDECIMALCOL"/>
+                    <property name="databaseType" value="3"/>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="STRCOL"/>
-                    <property name="dbType" value="12"/>
+                    <property name="databaseName" value="STRCOL"/>
+                    <property name="databaseType" value="12"/>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DATECOL"/>
-                    <property name="dbType" value="91"/>
+                    <property name="databaseName" value="DATECOL"/>
+                    <property name="databaseType" value="91"/>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="TIMECOL"/>
-                    <property name="dbType" value="92"/>
+                    <property name="databaseName" value="TIMECOL"/>
+                    <property name="databaseType" value="92"/>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="TSCOL"/>
-                    <property name="dbType" value="93"/>
+                    <property name="databaseName" value="TSCOL"/>
+                    <property name="databaseType" value="93"/>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="ARRCOL"/>
-                    <property name="dbType" value="-3"/>
+                    <property name="databaseName" value="ARRCOL"/>
+                    <property name="databaseType" value="-3"/>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>
@@ -140,8 +140,8 @@
         <property name="keyFields">
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="PK"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="PK"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -150,92 +150,92 @@
         <property name="valueFields">
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="PK"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="PK"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BOOLCOL"/>
-                    <property name="dbType" value="16"/>
+                    <property name="databaseName" value="BOOLCOL"/>
+                    <property name="databaseType" value="16"/>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BYTECOL"/>
-                    <property name="dbType" value="-6"/>
+                    <property name="databaseName" value="BYTECOL"/>
+                    <property name="databaseType" value="-6"/>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="SHORTCOL"/>
-                    <property name="dbType" value="5"/>
+                    <property name="databaseName" value="SHORTCOL"/>
+                    <property name="databaseType" value="5"/>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="INTCOL"/>
-                    <property name="dbType" value="4"/>
+                    <property name="databaseName" value="INTCOL"/>
+                    <property name="databaseType" value="4"/>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="LONGCOL"/>
-                    <property name="dbType" value="-5"/>
+                    <property name="databaseName" value="LONGCOL"/>
+                    <property name="databaseType" value="-5"/>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="FLOATCOL"/>
-                    <property name="dbType" value="7"/>
+                    <property name="databaseName" value="FLOATCOL"/>
+                    <property name="databaseType" value="7"/>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DOUBLECOL"/>
-                    <property name="dbType" value="8"/>
+                    <property name="databaseName" value="DOUBLECOL"/>
+                    <property name="databaseType" value="8"/>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DOUBLECOL2"/>
-                    <property name="dbType" value="8"/>
+                    <property name="databaseName" value="DOUBLECOL2"/>
+                    <property name="databaseType" value="8"/>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="BIGDECIMALCOL"/>
-                    <property name="dbType" value="3"/>
+                    <property name="databaseName" value="BIGDECIMALCOL"/>
+                    <property name="databaseType" value="3"/>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="STRCOL"/>
-                    <property name="dbType" value="12"/>
+                    <property name="databaseName" value="STRCOL"/>
+                    <property name="databaseType" value="12"/>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="DATECOL"/>
-                    <property name="dbType" value="91"/>
+                    <property name="databaseName" value="DATECOL"/>
+                    <property name="databaseType" value="91"/>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="TIMECOL"/>
-                    <property name="dbType" value="92"/>
+                    <property name="databaseName" value="TIMECOL"/>
+                    <property name="databaseType" value="92"/>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="TSCOL"/>
-                    <property name="dbType" value="93"/>
+                    <property name="databaseName" value="TSCOL"/>
+                    <property name="databaseType" value="93"/>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
-                    <property name="dbName" value="ARRCOL"/>
-                    <property name="dbType" value="-3"/>
+                    <property name="databaseName" value="ARRCOL"/>
+                    <property name="databaseType" value="-3"/>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>


Mime
View raw message