Hello.


    I installed DBeaver in order to browse caches, configured the driver
accordingly the instruction. As a result DBeaver successfully connected to
server node, but there was no "City" cache in tables folder. Cache was
created with the code attached below.



    Server node configuration:



    <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

       http://www.springframework.org/schema/beans/spring-beans.xsd";>

        <bean id = "grid.cfg" class=
"org.apache.ignite.configuration.IgniteConfiguration">

          <property name = "dataStorageConfiguration" >

            < bean class=
"org.apache.ignite.configuration.DataStorageConfiguration">

              <property name = "dataRegionConfigurations">

                < list >

                  < bean class=
"org.apache.ignite.configuration.DataRegionConfiguration">

                    <property name = "name" value="DR0"/>

                    <property name = "persistenceEnabled"value="true"/>

                    <property name = "maxSize" value="#{500L * 1024L *
1024L}"/>

                  </bean>

                  <bean class=
"org.apache.ignite.configuration.DataRegionConfiguration">

                    <property name = "name" value="DR1"/>

                    <property name = "maxSize" value="#{500L * 1024L *
1024L}"/>

                  </bean>

                </list>

              </property>

            </bean>

          </property>

        </bean>

    </beans>



    Code snippet:



    public class City

    {

        public int Id;

        public string Name;



    }



    class Program

    {



        static void Main(string[] args)

        {



            var cfg = new IgniteConfiguration

            {

                DiscoverySpi = new TcpDiscoverySpi

                {

                    IpFinder = new TcpDiscoveryStaticIpFinder

                    {

                        Endpoints = new[] { "xxx.xxx.xxx.xxx" }

                    }

                },

                ClientMode = true,

            };

            var ignite = Ignition.Start(cfg);



            var cityCache = ignite.GetOrCreateCache<int,City>(new
CacheConfiguration
{ Name = "City", DataRegionName = "DR0" });



            //cityCache.Put(1, new City { Id = 1, Name = "TestCity0" });



            foreach (var city in cityCache)

            {

            }



            ignite.Dispose();

        }

    }

}

Reply via email to