Apache Ignite v2.1で新しいIgnite Persistent Storeを使用しようとするとエラーが発生します。私は新しい.Netコンソールアプリケーションを作成し、Apache Ignite v2.1のnugetパッケージを追加しました。Apache Ignite 2.1:PersistentStoreConfigurationプロパティを設定するときにエラーが発生する
ignite.SetActive(true)を呼び出すと、次の2つの例外がスローされます。
私はさまざまなオプションを試しましたが、これは動作するまでに最も遠いようです。 Workフォルダにデータを書き出しますが、SetActiveメソッドを過ぎることはありません。 PersistentStoreConfigurationプロパティを設定するときに行をコメントアウトすると、うまく処理されます。
エラー1:
(停止するプリロード)ローカルパーティションを再初期化に失敗しました: GridDhtPartitionExchangeId [topVer = AffinityTopologyVersion [topVer = 1、 minorTopVer = 1]、のnodeId = 07fd3596、EVT = DISCOVERY_CUSTOM_EVT]
エラー2:
は、パーティションマップ交換の完了を待つことができませんでした( ) をプリロード開始しません。GridDhtPartitionsExchangeFuture
ログイン:
[18:00:04] Ignite node started OK (id=07fd3596)
[18:00:04] Topology snapshot [ver=1, servers=1, clients=0, CPUs=4, heap=3.5GB]
[18:00:04] Default checkpoint page buffer size is too small, setting to an adjus
ted value: 2.0 GiB
Aug 04, 2017 6:00:05 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to reinitialize local partitions (preloading will be stopped): Gr
idDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1, minorTopVer=
1], nodeId=07fd3596, evt=DISCOVERY_CUSTOM_EVT]
java.lang.NullPointerException
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.applyUpdate(GridCacheDatabaseSharedManager.java:1620)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.applyLastUpdates(GridCacheDatabaseSharedManager.java:1492)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.restoreState(GridCacheDatabaseSharedManager.java:929)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.beforeExchange(GridCacheDatabaseSharedManager.java:733)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader
.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFu
ture.java:994)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader
.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:632)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchang
eManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java
:110)
at java.lang.Thread.run(Thread.java:748)
Aug 04, 2017 6:00:05 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to wait for completion of partition map exchange (preloading will
not start): GridDhtPartitionsExchangeFuture [dummy=false, forcePreload=false, r
eassign=false, discoEvt=DiscoveryCustomEvent [customMsg=null, affTopVer=Affinity
TopologyVersion [topVer=1, minorTopVer=1], super=DiscoveryEvent [evtNode=TcpDisc
overyNode [id=07fd3596-3660-46ac-a79c-8e3da290a945, addrs=[0:0:0:0:0:0:0:1, 127.
0.0.1, 164.55.146.204, 172.17.26.16, 192.168.56.1], sockAddrs=[CHMATHISPC.pc.fac
tset.com/164.55.146.204:47500, /0:0:0:0:0:0:0:1:47500, /127.0.0.1:47500, /172.17
.26.16:47500, /192.168.56.1:47500], discPort=47500, order=1, intOrder=1, lastExc
hangeTime=1501884001588, loc=true, ver=2.1.0#20170720-sha1:bdaeecca, isClient=fa
lse], topVer=1, nodeId8=07fd3596, msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=15
01884004535]], crd=TcpDiscoveryNode [id=07fd3596-3660-46ac-a79c-8e3da290a945, ad
drs=[0:0:0:0:0:0:0:1, 127.0.0.1, 164.55.146.204, 172.17.26.16, 192.168.56.1], so
ckAddrs=[CHMATHISPC.pc.factset.com/164.55.146.204:47500, /0:0:0:0:0:0:0:1:47500,
/127.0.0.1:47500, /172.17.26.16:47500, /192.168.56.1:47500], discPort=47500, or
der=1, intOrder=1, lastExchangeTime=1501884001588, loc=true, ver=2.1.0#20170720-
sha1:bdaeecca, isClient=false], exchId=GridDhtPartitionExchangeId [topVer=Affini
tyTopologyVersion [topVer=1, minorTopVer=1], nodeId=07fd3596, evt=DISCOVERY_CUST
OM_EVT], added=true, initFut=GridFutureAdapter [ignoreInterrupts=false, state=DO
NE, res=false, hash=1673424663], init=false, lastVer=null, partReleaseFut=GridCo
mpoundFuture [rdc=null, initFlag=1, lsnrCalls=4, done=true, cancelled=false, err
=null, futs=[true, true, true, true]], exchActions=null, affChangeMsg=null, skip
Preload=false, clientOnlyExchange=false, initTs=1501884004545, centralizedAff=fa
lse, changeGlobalStateE=null, forcedRebFut=null, done=true, evtLatch=0, remainin
g=[], super=GridFutureAdapter [ignoreInterrupts=false, state=DONE, res=java.lang
.NullPointerException, hash=574566747]]
class org.apache.ignite.IgniteCheckedException: null
at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:722
9)
at org.apache.ignite.internal.util.future.GridFutureAdapter.resolve(Grid
FutureAdapter.java:258)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get0(GridFut
ureAdapter.java:206)
at org.apache.ignite.internal.util.future.GridFutureAdapter.get(GridFutu
reAdapter.java:158)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchang
eManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1911)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java
:110)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.applyUpdate(GridCacheDatabaseSharedManager.java:1620)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.applyLastUpdates(GridCacheDatabaseSharedManager.java:1492)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.restoreState(GridCacheDatabaseSharedManager.java:929)
at org.apache.ignite.internal.processors.cache.persistence.GridCacheData
baseSharedManager.beforeExchange(GridCacheDatabaseSharedManager.java:733)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader
.GridDhtPartitionsExchangeFuture.distributedExchange(GridDhtPartitionsExchangeFu
ture.java:994)
at org.apache.ignite.internal.processors.cache.distributed.dht.preloader
.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:632)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchang
eManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
... 2 more
は、ここに私の全体のアプリケーションです:
using System;
using System.IO;
using Apache.Ignite.Core;
using Apache.Ignite.Core.PersistentStore;
namespace ConsoleApplication1 {
internal class Program {
private static void Main(string[] args) {
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var cfg = new IgniteConfiguration {
JvmClasspath = Path.Combine(basePath, "Libs"),
PersistentStoreConfiguration = new PersistentStoreConfiguration {
PersistentStorePath = Path.Combine(Path.GetDirectoryName(typeof(Program).Assembly.Location), "Work")
}
};
var ignite = Ignition.Start(cfg);
ignite.SetActive(true);
var cache = ignite.GetOrCreateCache<Guid, string>("myCache");
cache[Guid.NewGuid()] = "Hello, world!";
Console.WriteLine("\nCache size: " + cache.GetSize());
Console.ReadKey();
}
}
}
package.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Apache.Ignite" version="2.1.0" targetFramework="net461" />
</packages>
App.configファイルは
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>