Some java code that helps me on node startup:
// Call for each partition in parallel
private void preloadPartition(int partition) {
IgniteCache<String, BinaryObject> cache = ignite
.cache("test_cache")
.withKeepBinary();
ScanQuery<String, BinaryObject> query = new
ScanQuery<>(partition, (k, v) -> {
return false;
});
query.setLocal(true);
try (QueryCursor<Cache.Entry<String, BinaryObject>> cursor =
cache.query(query)) {
for (@SuppressWarnings("unused") Cache.Entry<String,
BinaryObject> row : cursor) {
// empty
}
}
}
// Call for each index
private void preloadIndex(String index) {
// Use sql query which uses index and contains falsy-condition
}
PS. My memory region is bigger than total data size.
On 1/11/19 18:20, gweiske wrote:
> Is there a command that one can/needs to run to load the data into memory
> after restart of Ignite? The documentation suggests that at least for 2.7
> that is not necessary, and I have not found a command that would start the
> loading into memory from persistence. It looks like one can write some Java
> code, but it seems such basic functionality that I thought that there should
> be a shell command.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/