EX)
100개의 데이터가 있으면 RAM에는 20개 정도의 데이터를 로드할 수 있는 용량이 있으면,
디스크에 100를 저장하고 RAM에는 그 중 20개만 캐시되서 사용합니다.
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true"/>
</bean>
</property>
</bean>
</property>
</bean>
클러스터가 비활성화되어 작업을 수행할 수 없습니다. Ignite Persistent Store를 사용하여 모든 노드가 클러스터에 가입하도록 하는 경우 클러스터는 기본적으로 비활성 상태로 간주됩니다. 클러스터를 활성화하려면 Ignite.active(true)를 호출하십시오.
[07:56:00,000][SEVERE][client-connector-#85][JdbcRequestHandler] Failed to execute SQL query [reqId=211, req=JdbcQueryExecuteRequest [schemaName=PUBLIC, pageSize=1024, maxRows=0, sqlQry=CREATE TABLE City ( id LONG PRIMARY KEY, name VARCHAR), args=Object[] [], stmtType=ANY_STATEMENT_TYPE, autoCommit=true, partResReq=false, explicitTimeout=false, super=JdbcRequest [type=2, reqId=211]]]
class org.apache.ignite.IgniteException: Can not perform the operation because the cluster is inactive. Note, that the cluster is considered inactive by default if Ignite Persistent Store is used to let all the nodes join the cluster. To activate the cluster call Ignite.active(true).
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.checkClusterState(IgniteH2Indexing.java:1087)
at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1135)
at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:2847)
at org.apache.ignite.internal.processors.query.GridQueryProcessor$2.applyx(GridQueryProcessor.java:2843)
at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3407)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$3(GridQueryProcessor.java:2863)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2901)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2837)
at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2795)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.executeQuery(JdbcRequestHandler.java:640)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.doHandle(JdbcRequestHandler.java:310)
at org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequestHandler.handle(JdbcRequestHandler.java:250)
at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:204)
at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:55)
at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
./control.sh --activate
/opt/ignite/apache-ignite/bin # ./control.sh --activate
Control utility [ver. 2.11.0#20210911-sha1:8f3f07d3]
2021 Copyright(C) Apache Software Foundation
User: root
Time: 2021-11-12T08:17:18.215
Command [ACTIVATE] started
Arguments: --activate
--------------------------------------------------------------------------------
Command deprecated. Use --set-state instead.
Cluster activated
Command [ACTIVATE] finished with code: 0
Control utility has completed execution at: 2021-11-12T08:17:18.547
Execution time: 332 ms
[08:21:21,006][INFO][exchange-worker-#79][time] Started exchange init [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], crd=true, evt=DISCOVERY_CUSTOM_EVT, evtNode=53d1d351-9c3a-45a0-83b9-7f9fd0f17e65, customEvt=DynamicCacheChangeBatch [id=99c39231d71-790217ad-65e2-4a9d-831a-bd576112997b, reqs=ArrayList [DynamicCacheChangeRequest [cacheName=SQL_PUBLIC_CITY1, hasCfg=true, nodeId=53d1d351-9c3a-45a0-83b9-7f9fd0f17e65, clientStartOnly=false, stop=false, destroy=false, disabledAfterStart=false]], exchangeActions=ExchangeActions [startCaches=[SQL_PUBLIC_CITY1], stopCaches=null, startGrps=[SQL_PUBLIC_CITY1], stopGrps=[], resetParts=null, stateChangeRequest=null], startCaches=false], allowMerge=false, exchangeFreeSwitch=false]
[08:21:21,122][INFO][exchange-worker-#79][GridCacheProcessor] Started cache [name=SQL_PUBLIC_CITY1, id=357057985, dataRegionName=default, mode=PARTITIONED, atomicity=ATOMIC, backups=0, mvcc=false]
[08:21:21,138][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] Finished waiting for partition release future [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], waitTime=0ms, futInfo=NA, mode=DISTRIBUTED]
[08:21:21,141][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] Finished waiting for partitions release latch: ServerLatch [permits=0, pendingAcks=HashSet [], super=CompletableLatch [id=CompletableLatchUid [id=exchange, topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2]]]]
[08:21:21,141][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] Finished waiting for partition release future [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], waitTime=0ms, futInfo=NA, mode=LOCAL]
[08:21:21,226][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] finishExchangeOnCoordinator [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], resVer=AffinityTopologyVersion [topVer=1, minorTopVer=2]]
[08:21:21,273][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] Finish exchange future [startVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], resVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], err=null, rebalanced=true, wasRebalanced=true]
[08:21:21,279][INFO][exchange-worker-#79][GridCacheProcessor] Finish proxy initialization, cacheName=SQL_PUBLIC_CITY1, localNodeId=53d1d351-9c3a-45a0-83b9-7f9fd0f17e65
[08:21:21,279][INFO][exchange-worker-#79][GridDhtPartitionsExchangeFuture] Completed partition exchange [localNode=53d1d351-9c3a-45a0-83b9-7f9fd0f17e65, exchange=GridDhtPartitionsExchangeFuture [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2], evt=DISCOVERY_CUSTOM_EVT, evtNode=TcpDiscoveryNode [id=53d1d351-9c3a-45a0-83b9-7f9fd0f17e65, consistentId=9439e851-2302-40d7-b545-80552a3615d2, addrs=ArrayList [127.0.0.1, 172.17.0.15], sockAddrs=HashSet [/127.0.0.1:39432, bf836fdb9e81/172.17.0.15:39432], discPort=39432, order=1, intOrder=1, lastExchangeTime=1636704010837, loc=true, ver=2.11.0#20210911-sha1:8f3f07d3, isClient=false], rebalanced=true, done=true, newCrdFut=null], topVer=AffinityTopologyVersion [topVer=1, minorTopVer=2]]
0: jdbc:ignite:thin://127.0.0.1> !table
+-----------+-------------+-----------------------------+------------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE |
+-----------+-------------+-----------------------------+------------+
| IGNITE | PUBLIC | CITY | TABLE |
| IGNITE | PUBLIC | CITY1 | TABLE |
+-----------+-------------+-----------------------------+------------+
0: jdbc:ignite:thin://127.0.0.1> !table
+-----------+-------------+-----------------------------+------------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE |
+-----------+-------------+-----------------------------+------------+
| IGNITE | PUBLIC | CITY | TABLE |
| IGNITE | PUBLIC | CITY1 | TABLE |
+-----------+-------------+-----------------------------+------------+
!!!잘된다!!!