ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kavitha <kavithamr...@gmail.com>
Subject Re: Load data to cache
Date Sat, 25 Mar 2017 03:33:43 GMT
Hi Igor,

First I will explain you what I did. successfully build the solution from
the location
F:\Apache\apache-ignite-fabric-1.9.0-bin\apache-ignite-fabric-1.9.0-bin\platforms\cpp\project\vs\ignite.sln.
Then executed the command Install_amd64 <absolute file path> to install
ignite driver. After that created DSN like below screenshot.
<http://apache-ignite-users.70518.x6.nabble.com/file/n11442/DSN.png> 

My console application code is:
using System.Data;
using Apache.Ignite.Core;
using System.Data.Odbc;

namespace CreateCluster
{
    class Program
    {
        static void Main(string[] args)
        {
            IIgnite ignite =
                Ignition.Start(@"F:\Visual
Studio2015\Projects\CreateCluster\CreateCluster\my-file.xml"));
            var cache = ignite.GetOrCreateCache<int, string>("Person");
            cache.Put(1, "John");
            cache.Put(2, "Smith");
            cache.Put(3, "Vinet");
            cache.Get(1);
            cache.Get(2);
            cache.Get(3);
        }
    }
}

my-file.xml code:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">
  <bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">

    
    <property name="odbcConfiguration">
      <bean class="org.apache.ignite.configuration.OdbcConfiguration"/>
    </property>
 <property name="cacheConfiguration">
      <list>
        <bean class="org.apache.ignite.configuration.CacheConfiguration">
          <property name="name" value="Person"/>

          <property name="queryEntities">
            <list>
              <bean class="org.apache.ignite.cache.QueryEntity">
                <property name="keyType" value="java.lang.Integer"/>
                <property name="valueType" value="java.lang.String"/>
              </bean>
            </list>
          </property>
        </bean>
      </list>
    </property>
            </bean>
        </beans>

If I run console application, node is started. 
My problem is, no data exist in database while connecting through ignite
ODBC driver.

Can you please help me, what will do to display data?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Load-data-to-cache-tp11394p11442.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message