Search in sources :

Example 1 with IndexesRebuildTask

use of org.apache.ignite.internal.managers.indexing.IndexesRebuildTask in project ignite by apache.

the class GridCommandHandlerIndexForceRebuildTest method schemaIndexCacheFuture.

/**
 * Getting internal index rebuild future for cache.
 *
 * @param n Node.
 * @param cacheId Cache id.
 * @return Internal index rebuild future.
 */
@Nullable
private SchemaIndexCacheFuture schemaIndexCacheFuture(IgniteEx n, int cacheId) {
    IndexesRebuildTask idxRebuild = n.context().indexProcessor().idxRebuild();
    Map<Integer, SchemaIndexCacheFuture> idxRebuildFuts = getFieldValue(idxRebuild, "idxRebuildFuts");
    return idxRebuildFuts.get(cacheId);
}
Also used : IndexesRebuildTask(org.apache.ignite.internal.managers.indexing.IndexesRebuildTask) SchemaIndexCacheFuture(org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheFuture) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with IndexesRebuildTask

use of org.apache.ignite.internal.managers.indexing.IndexesRebuildTask in project ignite by apache.

the class StopRebuildIndexTest method internalIndexRebuildFuture.

/**
 * Getting internal rebuild index future for the cache.
 *
 * @param n Node.
 * @param cacheId Cache id.
 * @return Rebuild index future.
 */
@Nullable
private SchemaIndexCacheFuture internalIndexRebuildFuture(IgniteEx n, int cacheId) {
    IndexesRebuildTask idxRebuild = n.context().indexProcessor().idxRebuild();
    Object idxRebuildFuts = getFieldValueHierarchy(idxRebuild, "idxRebuildFuts");
    return ((Map<Integer, SchemaIndexCacheFuture>) idxRebuildFuts).get(cacheId);
}
Also used : IndexesRebuildTask(org.apache.ignite.internal.managers.indexing.IndexesRebuildTask) Map(java.util.Map) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

IndexesRebuildTask (org.apache.ignite.internal.managers.indexing.IndexesRebuildTask)2 Nullable (org.jetbrains.annotations.Nullable)2 Map (java.util.Map)1 SchemaIndexCacheFuture (org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheFuture)1