私たちのコードベースをgridgainからigniteに移植する際には、ほとんどのigniteメソッドに似た/名前を変更したメソッドがあります。私は明確にする必要があるいくつかあります。gridgainからigniteへの移植 - これらのgridgainメソッドの等価な点
コンピューティングの未来を呼び出すための推奨方法は何
//Listener for asynchronous local node grid events. You can subscribe for local node grid event notifications via {@link GridEventStorageManager#addLocalEventListener public interface GridLocalEventListener extends EventListener {}
用のIgnite同等とは何ですか。コンパイル失敗の画像を参照してください。
それとは別に、それはfuture.listenAsync(ように見える)(future.listenする必要があります)
final ProcessingTaskAdapter taskAdapter = new ProcessingTaskAdapter(task, manager, node);
ComputeTaskFuture<ProcessingJob> future = grid.cluster()
.forPredicate(this) //===> what should this be
.compute().execute(taskAdapter, job);
future.listen(new IgniteInClosure<IgniteFuture<ProcessingJob>>() {
@Override
public void apply(IgniteFuture<ProcessingJob> future) {
try {
// Need this to extract the remote exception, if one occurred
future.get();
} catch (IgniteException e) {
manager.fail(e.getCause() != null ? e.getCause() : e);
} finally {
manager.finishJob(job);
jobDistributor.distribute(taskAdapter.getSelectedNode());
}
}
再2.あなたはこのような何か意味ですか: をhttps://gist.github.com /匿名/ 074aa436a39f85e23f25e871894fc59f –
はい、いいですね。 –
私は投稿した要点スニペットの一部を忘れてしまった。どのように私たちの処理ジョブの1つを提出し、まだ未来を得るか。 古いコードでは、これを行いました ComputeTaskFuture future = grid.cluster() .forPredicate(this) .compute()。execute(taskAdapter、job); 新しいコードでは、私は次のことを実行できましたが、executeは処理ジョブインスタンス(クラスの1つ)を返すため、未来はexecuteに関連付けられていません ProcessingJob j = asyncCompute.execute(taskAdapter、job); –