// Preparing IgniteConfiguration using Java APIs IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setJdbcEnabled(true).setMaxOpenCursorsPerConnection(120).setThreadPoolSize(8).setThinClientEnabled(true)); // The node will be started as a client node. // cfg.setClientMode(true); // Classes of custom Java logic will be transferred over the wire from this app. cfg.setPeerClassLoadingEnabled(true); cfg.setIgniteInstanceName(RadarClient.RADAR_CACHE_NAME); // Setting up an IP Finder to ensure the client can locate the servers. TcpDiscoveryMulticastIpFinder ipFinder = new TcpDiscoveryMulticastIpFinder(); ipFinder.setAddresses(Collections.singletonList("127.0.0.1:47500..47509")); cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(ipFinder)); //data storage configuration DataStorageConfiguration storageCfg = new DataStorageConfiguration(); storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true); storageCfg.setWalSegmentSize(128 * 1024 * 1024); storageCfg.setPageSize(16 * 1024 ); storageCfg.setStoragePath("C:/Ignite_DataStore"); cfg.setDataStorageConfiguration(storageCfg); // Starting the node ignite = Ignition.start(cfg); ignite.cluster().state(ClusterState.ACTIVE); ignite.getOrCreateCache(RadarClient.RADAR_CACHE_NAME); ignite.cluster().enableWal(RadarClient.RADAR_CACHE_NAME); RadarClient.createProductsTable(); public static void createProductsTable() { CacheConfiguration cacheCfg = new CacheConfiguration<>(RADAR_CACHE_NAME).setSqlSchema(RADAR_CACHE_NAME); try ( IgniteCache cache = RadarServer.getIgniteServer().getOrCreateCache(cacheCfg) ) { // Create reference City table based on REPLICATED template. cache.query(new SqlFieldsQuery("CREATE TABLE Products (Product_Name VARCHAR,Product_Log_Syntax VARCHAR,Status VARCHAR,PRIMARY KEY (Product_Name, Status)) WITH \"template=replicated\"")).getAll(); // Create an index. cache.query(new SqlFieldsQuery("CREATE INDEX on Products (Status)")).getAll(); System.out.println("Created database objects ===> createProductsTable"); } }