Search in sources :

Example 1 with RunningQueryManager

use of org.apache.ignite.internal.processors.query.RunningQueryManager in project ignite by apache.

the class IgniteH2Indexing method start.

/**
 * {@inheritDoc}
 */
@SuppressWarnings({ "deprecation", "AssignmentToStaticFieldFromInstanceMethod" })
@Override
public void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException {
    if (log.isDebugEnabled())
        log.debug("Starting cache query index...");
    this.busyLock = busyLock;
    if (SysProperties.serializeJavaObject) {
        U.warn(log, "Serialization of Java objects in H2 was enabled.");
        SysProperties.serializeJavaObject = false;
    }
    this.ctx = ctx;
    partReservationMgr = new PartitionReservationManager(ctx);
    connMgr = new ConnectionManager(ctx);
    longRunningQryMgr = new LongRunningQueryManager(ctx);
    parser = new QueryParser(this, connMgr);
    schemaMgr = new SchemaManager(ctx, connMgr);
    schemaMgr.start(ctx.config().getSqlConfiguration().getSqlSchemas());
    statsMgr = new IgniteStatisticsManagerImpl(ctx, schemaMgr);
    nodeId = ctx.localNodeId();
    marshaller = ctx.config().getMarshaller();
    mapQryExec = new GridMapQueryExecutor();
    rdcQryExec = new GridReduceQueryExecutor();
    mapQryExec.start(ctx, this);
    rdcQryExec.start(ctx, this);
    discoLsnr = evt -> {
        mapQryExec.onNodeLeft((DiscoveryEvent) evt);
        rdcQryExec.onNodeLeft((DiscoveryEvent) evt);
    };
    ctx.event().addLocalEventListener(discoLsnr, EventType.EVT_NODE_FAILED, EventType.EVT_NODE_LEFT);
    qryLsnr = (nodeId, msg, plc) -> onMessage(nodeId, msg);
    ctx.io().addMessageListener(GridTopic.TOPIC_QUERY, qryLsnr);
    runningQryMgr = new RunningQueryManager(ctx);
    partExtractor = new PartitionExtractor(new H2PartitionResolver(this), ctx);
    cmdProc = new CommandProcessor(ctx, schemaMgr, this);
    cmdProc.start();
    if (JdbcUtils.serializer != null)
        U.warn(log, "Custom H2 serialization is already configured, will override.");
    JdbcUtils.serializer = h2Serializer();
    distrCfg = new DistributedSqlConfiguration(ctx, log);
    funcMgr = new FunctionsManager(distrCfg);
}
Also used : H2PartitionResolver(org.apache.ignite.internal.processors.query.h2.affinity.H2PartitionResolver) GridMapQueryExecutor(org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor) RunningQueryManager(org.apache.ignite.internal.processors.query.RunningQueryManager) IgniteStatisticsManagerImpl(org.apache.ignite.internal.processors.query.stat.IgniteStatisticsManagerImpl) PartitionReservationManager(org.apache.ignite.internal.processors.query.h2.twostep.PartitionReservationManager) PartitionExtractor(org.apache.ignite.internal.processors.query.h2.affinity.PartitionExtractor) GridReduceQueryExecutor(org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor)

Aggregations

RunningQueryManager (org.apache.ignite.internal.processors.query.RunningQueryManager)1 H2PartitionResolver (org.apache.ignite.internal.processors.query.h2.affinity.H2PartitionResolver)1 PartitionExtractor (org.apache.ignite.internal.processors.query.h2.affinity.PartitionExtractor)1 GridMapQueryExecutor (org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor)1 GridReduceQueryExecutor (org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor)1 PartitionReservationManager (org.apache.ignite.internal.processors.query.h2.twostep.PartitionReservationManager)1 IgniteStatisticsManagerImpl (org.apache.ignite.internal.processors.query.stat.IgniteStatisticsManagerImpl)1