ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manuelmourato <manuelmourat...@gmail.com>
Subject Cannot create cache in existing Apache Ignite single node cluster
Date Thu, 01 Mar 2018 12:15:53 GMT
I am running two Apache Ignite instances (version 2.2.0) in my single host
pc, and they discover each other with no issues. What I want to do now, is
to simply create an IgniteCache in this existing "pseudo cluster",
preferably without starting a new instance to do so. This is the code I have
right now:

public class Create_Ignite_Cache {

public static void main(String[] args){

    TcpDiscoverySpi spi = new TcpDiscoverySpi();
    TcpDiscoveryVmIpFinder ipFinder=new TcpDiscoveryMulticastIpFinder();
    List<String> adresses=new ArrayList<String>();

    IgniteConfiguration cfg=new IgniteConfiguration()

    CacheConfiguration cache_conf=new

    Ignite ignite=Ignition.getOrStart(cfg);


    System.out.print("[INFO] CACHE CREATED");

When I run this code, an Ignite client instance is created, tries to create
a cache, and then closes the client instance. If I check the logs from the
Ignite server instance, it detects the client instance when it is created:

[10:36:57] Topology snapshot [ver=1, servers=1, clients=0, CPUs=12,
[10:41:07] Topology snapshot [ver=2, servers=1, clients=1, CPUs=12,
[10:41:07] Topology snapshot [ver=3, servers=1, clients=0, CPUs=12,

However, when I run the ignitevisor to check the cache list, it doesn't have
any cache present:

visor> cache
(wrn) <visor>: No caches found.

My questions are: What am I doing wrong by using this approach? Is there a
way to create a cache in an existing cluster without having to create a
client instance to do so? With a JDBC connection for example?

Thank you very much.

Sent from: http://apache-ignite-users.70518.x6.nabble.com/

View raw message