Search in sources :

Example 61 with IN

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN in project ignite by apache.

the class DistributedLookupBatch method addSearchRows.

/**
 * {@inheritDoc}
 */
@SuppressWarnings({ "ForLoopReplaceableByForEach", "IfMayBeConditional" })
@Override
public boolean addSearchRows(SearchRow firstRow, SearchRow lastRow) {
    if (joinCtx == null || findCalled) {
        if (joinCtx == null) {
            // It is the first call after query begin (may be after reuse),
            // reinitialize query context and result.
            QueryContext qctx = QueryContext.threadLocal();
            res = new ArrayList<>();
            assert qctx != null;
            assert !findCalled;
            joinCtx = qctx.distributedJoinContext();
        } else {
            // Cleanup after the previous lookup phase.
            assert batchLookupId != 0;
            findCalled = false;
            joinCtx.putStreams(batchLookupId, null);
            res.clear();
        }
        // Reinitialize for the next lookup phase.
        batchLookupId = joinCtx.nextBatchLookupId();
        rangeStreams = new HashMap<>();
    }
    Object affKey = getAffinityKey(firstRow, lastRow);
    List<SegmentKey> segmentKeys;
    if (affKey != null) {
        // Affinity key is provided.
        if (// Affinity key is explicit null, we will not find anything.
        affKey == EXPLICIT_NULL)
            return false;
        segmentKeys = F.asList(rangeSegment(affKey));
    } else {
        // Affinity key is not provided or is not the same in upper and lower bounds, we have to broadcast.
        if (broadcastSegments == null)
            broadcastSegments = broadcastSegments();
        segmentKeys = broadcastSegments;
    }
    assert !F.isEmpty(segmentKeys) : segmentKeys;
    final int rangeId = res.size();
    // Create messages.
    GridH2RowMessage first = idx.toSearchRowMessage(firstRow);
    GridH2RowMessage last = idx.toSearchRowMessage(lastRow);
    // Range containing upper and lower bounds.
    GridH2RowRangeBounds rangeBounds = rangeBounds(rangeId, first, last);
    // Add range to every message of every participating node.
    for (int i = 0; i < segmentKeys.size(); i++) {
        SegmentKey segmentKey = segmentKeys.get(i);
        assert segmentKey != null;
        RangeStream stream = rangeStreams.get(segmentKey);
        List<GridH2RowRangeBounds> bounds;
        if (stream == null) {
            stream = new RangeStream(cctx.kernalContext(), idx, joinCtx, segmentKey.node());
            stream.request(createRequest(joinCtx, batchLookupId, segmentKey.segmentId()));
            stream.request().bounds(bounds = new ArrayList<>());
            rangeStreams.put(segmentKey, stream);
        } else
            bounds = stream.request().bounds();
        bounds.add(rangeBounds);
        // If at least one node will have a full batch then we are ok.
        if (bounds.size() >= joinCtx.pageSize())
            batchFull = true;
    }
    Cursor cur;
    if (segmentKeys.size() == 1)
        cur = new UnicastCursor(rangeId, rangeStreams.get(F.first(segmentKeys)));
    else
        cur = new BroadcastCursor(idx, rangeId, segmentKeys, rangeStreams);
    res.add(new DoneFuture<>(cur));
    return true;
}
Also used : GridH2RowRangeBounds(org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2RowRangeBounds) ArrayList(java.util.ArrayList) QueryContext(org.apache.ignite.internal.processors.query.h2.opt.QueryContext) Cursor(org.h2.index.Cursor) GridH2RowMessage(org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2RowMessage)

Example 62 with IN

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN in project ignite by apache.

the class ValidateIndexesClosure method checkSizes.

/**
 * Checking size of records in cache and indexes with a record into
 * {@code checkSizeRes} if they are not equal.
 *
 * @param cacheSizesFutures Futures calculating size of records in caches.
 * @param idxSizeFutures Futures calculating size of indexes of caches.
 * @param checkSizeRes Result of size check.
 */
private void checkSizes(List<T3<CacheGroupContext, GridDhtLocalPartition, Future<CacheSize>>> cacheSizesFutures, List<T3<GridCacheContext, Index, Future<T2<Throwable, Long>>>> idxSizeFutures, Map<String, ValidateIndexesCheckSizeResult> checkSizeRes) throws ExecutionException, InterruptedException {
    if (!checkSizes)
        return;
    Map<Integer, CacheSize> cacheSizeTotal = new HashMap<>();
    for (T3<CacheGroupContext, GridDhtLocalPartition, Future<CacheSize>> cacheSizeFut : cacheSizesFutures) {
        CacheGroupContext cacheGrpCtx = cacheSizeFut.get1();
        CacheSize cacheSize = cacheSizeFut.get3().get();
        Throwable cacheSizeErr = cacheSize.err;
        int grpId = cacheGrpCtx.groupId();
        if (failCalcCacheSizeGrpIds.contains(grpId) && nonNull(cacheSizeErr)) {
            checkSizeRes.computeIfAbsent(cacheGrpInfo(cacheGrpCtx), s -> new ValidateIndexesCheckSizeResult(0, new ArrayList<>())).issues().add(new ValidateIndexesCheckSizeIssue(null, 0, cacheSizeErr));
        } else {
            cacheSizeTotal.computeIfAbsent(grpId, i -> new CacheSize(null, new HashMap<>())).merge(cacheSize.cacheSizePerTbl);
        }
    }
    for (T3<GridCacheContext, Index, Future<T2<Throwable, Long>>> idxSizeFut : idxSizeFutures) {
        GridCacheContext cacheCtx = idxSizeFut.get1();
        int grpId = cacheCtx.groupId();
        if (failCalcCacheSizeGrpIds.contains(grpId))
            continue;
        Index idx = idxSizeFut.get2();
        String tblName = idx.getTable().getName();
        AtomicLong cacheSizeObj = cacheSizeTotal.get(grpId).cacheSizePerTbl.getOrDefault(cacheCtx.cacheId(), emptyMap()).get(tblName);
        long cacheSizeByTbl = isNull(cacheSizeObj) ? 0L : cacheSizeObj.get();
        T2<Throwable, Long> idxSizeRes = idxSizeFut.get3().get();
        Throwable err = idxSizeRes.get1();
        long idxSize = idxSizeRes.get2();
        if (isNull(err) && idxSize != cacheSizeByTbl)
            err = new IgniteException("Cache and index size not same.");
        if (nonNull(err)) {
            checkSizeRes.computeIfAbsent("[" + cacheGrpInfo(cacheCtx.group()) + ", " + cacheInfo(cacheCtx) + ", tableName=" + tblName + "]", s -> new ValidateIndexesCheckSizeResult(cacheSizeByTbl, new ArrayList<>())).issues().add(new ValidateIndexesCheckSizeIssue(idx.getName(), idxSize, err));
        }
    }
}
Also used : Collections.shuffle(java.util.Collections.shuffle) IgniteEx(org.apache.ignite.internal.IgniteEx) DbException(org.h2.message.DbException) H2Utils(org.apache.ignite.internal.processors.query.h2.H2Utils) Index(org.h2.index.Index) IdleVerifyUtility.checkPartitionsPageCrcSum(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.checkPartitionsPageCrcSum) ConnectionManager(org.apache.ignite.internal.processors.query.h2.ConnectionManager) Future(java.util.concurrent.Future) GridH2Table(org.apache.ignite.internal.processors.query.h2.opt.GridH2Table) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) X(org.apache.ignite.internal.util.typedef.X) BPlusTree(org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree) JdbcConnection(org.h2.jdbc.JdbcConnection) Objects.isNull(java.util.Objects.isNull) LoggerResource(org.apache.ignite.resources.LoggerResource) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) GridQueryTypeDescriptor(org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) GridNotIdleException(org.apache.ignite.internal.processors.cache.verify.GridNotIdleException) Collection(java.util.Collection) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) IgniteInstanceResource(org.apache.ignite.resources.IgniteInstanceResource) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) OWNING(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Executors(java.util.concurrent.Executors) GRID_NOT_IDLE_MSG(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.GRID_NOT_IDLE_MSG) INDEX_PARTITION(org.apache.ignite.internal.pagemem.PageIdAllocator.INDEX_PARTITION) Cursor(org.h2.index.Cursor) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) Entry(java.util.Map.Entry) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) Objects.nonNull(java.util.Objects.nonNull) FLAG_IDX(org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_IDX) CacheObjectUtils(org.apache.ignite.internal.processors.cache.CacheObjectUtils) PartitionKey(org.apache.ignite.internal.processors.cache.verify.PartitionKey) U(org.apache.ignite.internal.util.typedef.internal.U) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) IgniteLogger(org.apache.ignite.IgniteLogger) CorruptedTreeException(org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException) Supplier(java.util.function.Supplier) CacheGroupContext(org.apache.ignite.internal.processors.cache.CacheGroupContext) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) IdleVerifyUtility.formatUpdateCountersDiff(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.formatUpdateCountersDiff) Session(org.h2.engine.Session) Collections.newSetFromMap(java.util.Collections.newSetFromMap) IdleVerifyUtility.compareUpdateCounters(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.compareUpdateCounters) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) IgniteH2Indexing(org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing) IgniteInterruptedException(org.apache.ignite.IgniteInterruptedException) IdleVerifyUtility.getUpdateCountersSnapshot(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.getUpdateCountersSnapshot) GridH2RowDescriptor(org.apache.ignite.internal.processors.query.h2.opt.GridH2RowDescriptor) IdleVerifyUtility(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility) ExecutorService(java.util.concurrent.ExecutorService) F(org.apache.ignite.internal.util.typedef.F) Collections.emptyMap(java.util.Collections.emptyMap) DynamicCacheDescriptor(org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor) H2TreeIndexBase(org.apache.ignite.internal.processors.query.h2.database.H2TreeIndexBase) PartitionUpdateCounter(org.apache.ignite.internal.processors.cache.PartitionUpdateCounter) QueryTypeDescriptorImpl(org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl) T3(org.apache.ignite.internal.util.typedef.T3) GridIterator(org.apache.ignite.internal.util.lang.GridIterator) T2(org.apache.ignite.internal.util.typedef.T2) ExecutionException(java.util.concurrent.ExecutionException) AtomicLong(java.util.concurrent.atomic.AtomicLong) GridDhtLocalPartition(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) H2CacheRow(org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow) Collections(java.util.Collections) MvccQueryTracker(org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker) QueryContext(org.apache.ignite.internal.processors.query.h2.opt.QueryContext) IgniteUtils.error(org.apache.ignite.internal.util.IgniteUtils.error) GridQueryProcessor(org.apache.ignite.internal.processors.query.GridQueryProcessor) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Index(org.h2.index.Index) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AtomicLong(java.util.concurrent.atomic.AtomicLong) IgniteException(org.apache.ignite.IgniteException) AtomicLong(java.util.concurrent.atomic.AtomicLong) Future(java.util.concurrent.Future) GridDhtLocalPartition(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition) CacheGroupContext(org.apache.ignite.internal.processors.cache.CacheGroupContext)

Example 63 with IN

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN in project ignite by apache.

the class ValidateIndexesClosure method calcCacheSize.

/**
 * Calculation of caches size with divided by tables.
 *
 * @param grpCtx Cache group context.
 * @param locPart Local partition.
 * @return Cache size representation object.
 */
private CacheSize calcCacheSize(CacheGroupContext grpCtx, GridDhtLocalPartition locPart) {
    try {
        if (validateCtx.isCancelled())
            return new CacheSize(null, emptyMap());
        @Nullable PartitionUpdateCounter updCntr = locPart.dataStore().partUpdateCounter();
        PartitionUpdateCounter updateCntrBefore = updCntr == null ? updCntr : updCntr.copy();
        int grpId = grpCtx.groupId();
        if (failCalcCacheSizeGrpIds.contains(grpId))
            return new CacheSize(null, null);
        boolean reserve = false;
        int partId = locPart.id();
        try {
            if (!(reserve = locPart.reserve()))
                throw new IgniteException("Can't reserve partition");
            if (locPart.state() != OWNING)
                throw new IgniteException("Partition not in state " + OWNING);
            Map<Integer, Map<String, AtomicLong>> cacheSizeByTbl = new HashMap<>();
            GridIterator<CacheDataRow> partIter = grpCtx.offheap().partitionIterator(partId);
            GridQueryProcessor qryProcessor = ignite.context().query();
            IgniteH2Indexing h2Indexing = (IgniteH2Indexing) qryProcessor.getIndexing();
            while (partIter.hasNextX() && !failCalcCacheSizeGrpIds.contains(grpId)) {
                CacheDataRow cacheDataRow = partIter.nextX();
                int cacheId = cacheDataRow.cacheId();
                GridCacheContext cacheCtx = cacheId == 0 ? grpCtx.singleCacheContext() : grpCtx.shared().cacheContext(cacheId);
                if (cacheCtx == null)
                    throw new IgniteException("Unknown cacheId of CacheDataRow: " + cacheId);
                if (cacheDataRow.link() == 0L)
                    throw new IgniteException("Contains invalid partition row, possibly deleted");
                String cacheName = cacheCtx.name();
                QueryTypeDescriptorImpl qryTypeDesc = qryProcessor.typeByValue(cacheName, cacheCtx.cacheObjectContext(), cacheDataRow.key(), cacheDataRow.value(), true);
                if (isNull(qryTypeDesc))
                    // Tolerate - (k, v) is just not indexed.
                    continue;
                String tableName = qryTypeDesc.tableName();
                GridH2Table gridH2Tbl = h2Indexing.schemaManager().dataTable(cacheName, tableName);
                if (isNull(gridH2Tbl))
                    // Tolerate - (k, v) is just not indexed.
                    continue;
                cacheSizeByTbl.computeIfAbsent(cacheCtx.cacheId(), i -> new HashMap<>()).computeIfAbsent(tableName, s -> new AtomicLong()).incrementAndGet();
            }
            PartitionUpdateCounter updateCntrAfter = locPart.dataStore().partUpdateCounter();
            if (updateCntrAfter != null && !updateCntrAfter.equals(updateCntrBefore)) {
                throw new GridNotIdleException(GRID_NOT_IDLE_MSG + "[grpName=" + grpCtx.cacheOrGroupName() + ", grpId=" + grpCtx.groupId() + ", partId=" + locPart.id() + "] changed during size " + "calculation [updCntrBefore=" + updateCntrBefore + ", updCntrAfter=" + updateCntrAfter + "]");
            }
            return new CacheSize(null, cacheSizeByTbl);
        } catch (Throwable t) {
            IgniteException cacheSizeErr = new IgniteException("Cache size calculation error [" + cacheGrpInfo(grpCtx) + ", locParId=" + partId + ", err=" + t.getMessage() + "]", t);
            error(log, cacheSizeErr);
            failCalcCacheSizeGrpIds.add(grpId);
            return new CacheSize(cacheSizeErr, null);
        } finally {
            if (reserve)
                locPart.release();
        }
    } finally {
        processedCacheSizePartitions.incrementAndGet();
        printProgressOfIndexValidationIfNeeded();
    }
}
Also used : CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Collections.shuffle(java.util.Collections.shuffle) IgniteEx(org.apache.ignite.internal.IgniteEx) DbException(org.h2.message.DbException) H2Utils(org.apache.ignite.internal.processors.query.h2.H2Utils) Index(org.h2.index.Index) IdleVerifyUtility.checkPartitionsPageCrcSum(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.checkPartitionsPageCrcSum) ConnectionManager(org.apache.ignite.internal.processors.query.h2.ConnectionManager) Future(java.util.concurrent.Future) GridH2Table(org.apache.ignite.internal.processors.query.h2.opt.GridH2Table) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) X(org.apache.ignite.internal.util.typedef.X) BPlusTree(org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree) JdbcConnection(org.h2.jdbc.JdbcConnection) Objects.isNull(java.util.Objects.isNull) LoggerResource(org.apache.ignite.resources.LoggerResource) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) GridQueryTypeDescriptor(org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) GridNotIdleException(org.apache.ignite.internal.processors.cache.verify.GridNotIdleException) Collection(java.util.Collection) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) IgniteInstanceResource(org.apache.ignite.resources.IgniteInstanceResource) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) OWNING(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Executors(java.util.concurrent.Executors) GRID_NOT_IDLE_MSG(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.GRID_NOT_IDLE_MSG) INDEX_PARTITION(org.apache.ignite.internal.pagemem.PageIdAllocator.INDEX_PARTITION) Cursor(org.h2.index.Cursor) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) Entry(java.util.Map.Entry) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) Objects.nonNull(java.util.Objects.nonNull) FLAG_IDX(org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_IDX) CacheObjectUtils(org.apache.ignite.internal.processors.cache.CacheObjectUtils) PartitionKey(org.apache.ignite.internal.processors.cache.verify.PartitionKey) U(org.apache.ignite.internal.util.typedef.internal.U) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) IgniteLogger(org.apache.ignite.IgniteLogger) CorruptedTreeException(org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException) Supplier(java.util.function.Supplier) CacheGroupContext(org.apache.ignite.internal.processors.cache.CacheGroupContext) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) IgniteCallable(org.apache.ignite.lang.IgniteCallable) HashSet(java.util.HashSet) IdleVerifyUtility.formatUpdateCountersDiff(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.formatUpdateCountersDiff) Session(org.h2.engine.Session) Collections.newSetFromMap(java.util.Collections.newSetFromMap) IdleVerifyUtility.compareUpdateCounters(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.compareUpdateCounters) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) IgniteH2Indexing(org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing) IgniteInterruptedException(org.apache.ignite.IgniteInterruptedException) IdleVerifyUtility.getUpdateCountersSnapshot(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility.getUpdateCountersSnapshot) GridH2RowDescriptor(org.apache.ignite.internal.processors.query.h2.opt.GridH2RowDescriptor) IdleVerifyUtility(org.apache.ignite.internal.processors.cache.verify.IdleVerifyUtility) ExecutorService(java.util.concurrent.ExecutorService) F(org.apache.ignite.internal.util.typedef.F) Collections.emptyMap(java.util.Collections.emptyMap) DynamicCacheDescriptor(org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor) H2TreeIndexBase(org.apache.ignite.internal.processors.query.h2.database.H2TreeIndexBase) PartitionUpdateCounter(org.apache.ignite.internal.processors.cache.PartitionUpdateCounter) QueryTypeDescriptorImpl(org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl) T3(org.apache.ignite.internal.util.typedef.T3) GridIterator(org.apache.ignite.internal.util.lang.GridIterator) T2(org.apache.ignite.internal.util.typedef.T2) ExecutionException(java.util.concurrent.ExecutionException) AtomicLong(java.util.concurrent.atomic.AtomicLong) GridDhtLocalPartition(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) H2CacheRow(org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow) Collections(java.util.Collections) MvccQueryTracker(org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker) QueryContext(org.apache.ignite.internal.processors.query.h2.opt.QueryContext) IgniteUtils.error(org.apache.ignite.internal.util.IgniteUtils.error) GridQueryProcessor(org.apache.ignite.internal.processors.query.GridQueryProcessor) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) QueryTypeDescriptorImpl(org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) PartitionUpdateCounter(org.apache.ignite.internal.processors.cache.PartitionUpdateCounter) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) GridNotIdleException(org.apache.ignite.internal.processors.cache.verify.GridNotIdleException) AtomicLong(java.util.concurrent.atomic.AtomicLong) IgniteException(org.apache.ignite.IgniteException) GridH2Table(org.apache.ignite.internal.processors.query.h2.opt.GridH2Table) GridQueryProcessor(org.apache.ignite.internal.processors.query.GridQueryProcessor) IgniteH2Indexing(org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) Collections.newSetFromMap(java.util.Collections.newSetFromMap) Collections.emptyMap(java.util.Collections.emptyMap) Nullable(org.jetbrains.annotations.Nullable)

Example 64 with IN

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN in project ignite by apache.

the class IgniteH2Indexing method tablesInformation.

/**
 * {@inheritDoc}
 */
@Override
public Collection<TableInformation> tablesInformation(String schemaNamePtrn, String tblNamePtrn, String... tblTypes) {
    Set<String> types = F.isEmpty(tblTypes) ? Collections.emptySet() : new HashSet<>(Arrays.asList(tblTypes));
    Collection<TableInformation> infos = new ArrayList<>();
    boolean allTypes = F.isEmpty(tblTypes);
    if (allTypes || types.contains(TableType.TABLE.name())) {
        schemaMgr.dataTables().stream().filter(t -> matches(t.getSchema().getName(), schemaNamePtrn)).filter(t -> matches(t.getName(), tblNamePtrn)).map(t -> {
            int cacheGrpId = t.cacheInfo().groupId();
            CacheGroupDescriptor cacheGrpDesc = ctx.cache().cacheGroupDescriptors().get(cacheGrpId);
            // We should skip table in case regarding cache group has been removed.
            if (cacheGrpDesc == null)
                return null;
            GridQueryTypeDescriptor type = t.rowDescriptor().type();
            IndexColumn affCol = t.getExplicitAffinityKeyColumn();
            String affinityKeyCol = affCol != null ? affCol.columnName : null;
            return new TableInformation(t.getSchema().getName(), t.getName(), TableType.TABLE.name(), cacheGrpId, cacheGrpDesc.cacheOrGroupName(), t.cacheId(), t.cacheName(), affinityKeyCol, type.keyFieldAlias(), type.valueFieldAlias(), type.keyTypeName(), type.valueTypeName());
        }).filter(Objects::nonNull).forEach(infos::add);
    }
    if ((allTypes || types.contains(TableType.VIEW.name())) && matches(QueryUtils.SCHEMA_SYS, schemaNamePtrn)) {
        schemaMgr.systemViews().stream().filter(t -> matches(t.getTableName(), tblNamePtrn)).map(v -> new TableInformation(QueryUtils.SCHEMA_SYS, v.getTableName(), TableType.VIEW.name())).forEach(infos::add);
    }
    return infos;
}
Also used : QueryCancelledException(org.apache.ignite.cache.query.QueryCancelledException) SQL_CMD_QRY_EXECUTE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_CMD_QRY_EXECUTE) InlineIndexFactory(org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexFactory) Collections.singletonList(java.util.Collections.singletonList) BinaryUtils(org.apache.ignite.internal.binary.BinaryUtils) SysProperties(org.h2.engine.SysProperties) Map(java.util.Map) SqlQuery(org.apache.ignite.cache.query.SqlQuery) JdbcParameterMeta(org.apache.ignite.internal.processors.odbc.jdbc.JdbcParameterMeta) TimestampIndexKey(org.apache.ignite.internal.processors.query.h2.index.keys.TimestampIndexKey) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) QueryField(org.apache.ignite.internal.processors.query.QueryField) CacheGroupDescriptor(org.apache.ignite.internal.processors.cache.CacheGroupDescriptor) PreparedStatement(java.sql.PreparedStatement) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) GridMapQueryExecutor(org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor) Stream(java.util.stream.Stream) GridQueryCacheObjectsIterator(org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator) InlineIndexImpl(org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexImpl) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) GridQueryNextPageRequest(org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageRequest) SchemaIndexCacheVisitor(org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheVisitor) BatchUpdateException(java.sql.BatchUpdateException) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteLogger(org.apache.ignite.IgniteLogger) GridQueryIndexing(org.apache.ignite.internal.processors.query.GridQueryIndexing) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission) LinkedHashMap(java.util.LinkedHashMap) SqlQueryExecutionEvent(org.apache.ignite.events.SqlQueryExecutionEvent) GridCacheQueryMarshallable(org.apache.ignite.internal.processors.cache.query.GridCacheQueryMarshallable) DmlUtils(org.apache.ignite.internal.processors.query.h2.dml.DmlUtils) ClusterTopologyServerNotFoundException(org.apache.ignite.internal.cluster.ClusterTopologyServerNotFoundException) IgniteStatisticsManagerImpl(org.apache.ignite.internal.processors.query.stat.IgniteStatisticsManagerImpl) IgniteMBeansManager(org.apache.ignite.internal.managers.IgniteMBeansManager) GridQueryProperty(org.apache.ignite.internal.processors.query.GridQueryProperty) DmlDistributedPlanInfo(org.apache.ignite.internal.processors.query.h2.dml.DmlDistributedPlanInfo) SQL_QRY(org.apache.ignite.internal.processors.tracing.SpanType.SQL_QRY) MvccSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot) SqlClientContext(org.apache.ignite.internal.processors.query.SqlClientContext) H2Utils.generateFieldsQueryString(org.apache.ignite.internal.processors.query.h2.H2Utils.generateFieldsQueryString) SQL_QRY_EXECUTE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_QRY_EXECUTE) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) SqlRollbackTransactionCommand(org.apache.ignite.internal.sql.command.SqlRollbackTransactionCommand) IndexingQueryFilter(org.apache.ignite.spi.indexing.IndexingQueryFilter) JdbcUtils(org.h2.util.JdbcUtils) GridQueryFieldMetadata(org.apache.ignite.internal.processors.query.GridQueryFieldMetadata) IgniteStatisticsManager(org.apache.ignite.internal.processors.query.stat.IgniteStatisticsManager) PartitionResult(org.apache.ignite.internal.sql.optimizer.affinity.PartitionResult) RegisteredQueryCursor(org.apache.ignite.internal.processors.cache.query.RegisteredQueryCursor) LoggerResource(org.apache.ignite.resources.LoggerResource) GridCacheTwoStepQuery(org.apache.ignite.internal.processors.cache.query.GridCacheTwoStepQuery) SqlCommand(org.apache.ignite.internal.sql.command.SqlCommand) Collection(java.util.Collection) GridSqlStatement(org.apache.ignite.internal.processors.query.h2.sql.GridSqlStatement) UUID(java.util.UUID) GridQueryFieldsResultAdapter(org.apache.ignite.internal.processors.query.GridQueryFieldsResultAdapter) Math.min(java.lang.Math.min) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) H2TreeIndex(org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex) IndexColumn(org.h2.table.IndexColumn) CU(org.apache.ignite.internal.util.typedef.internal.CU) TX_SIZE_THRESHOLD(org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager.TX_SIZE_THRESHOLD) SQL_CURSOR_OPEN(org.apache.ignite.internal.processors.tracing.SpanType.SQL_CURSOR_OPEN) FieldsQueryCursor(org.apache.ignite.cache.query.FieldsQueryCursor) SqlCommitTransactionCommand(org.apache.ignite.internal.sql.command.SqlCommitTransactionCommand) Span(org.apache.ignite.internal.processors.tracing.Span) H2TreeClientIndex(org.apache.ignite.internal.processors.query.h2.database.H2TreeClientIndex) QueryUtils.matches(org.apache.ignite.internal.processors.query.QueryUtils.matches) HashSet(java.util.HashSet) QueryIndexDescriptorImpl(org.apache.ignite.internal.processors.query.QueryIndexDescriptorImpl) IndexType(org.h2.index.IndexType) UpdateSourceIterator(org.apache.ignite.internal.processors.query.UpdateSourceIterator) CacheDataTree(org.apache.ignite.internal.processors.cache.tree.CacheDataTree) GridMessageListener(org.apache.ignite.internal.managers.communication.GridMessageListener) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal) DynamicCacheDescriptor(org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor) GridCacheContextInfo(org.apache.ignite.internal.processors.cache.GridCacheContextInfo) GridReduceQueryExecutor(org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor) GridCloseableIterator(org.apache.ignite.internal.util.lang.GridCloseableIterator) GridQueryNextPageResponse(org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryNextPageResponse) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException) GridCacheQueryType(org.apache.ignite.internal.processors.cache.query.GridCacheQueryType) UPDATE_RESULT_META(org.apache.ignite.internal.processors.query.h2.H2Utils.UPDATE_RESULT_META) EnlistOperation(org.apache.ignite.internal.processors.query.EnlistOperation) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) GridLocalEventListener(org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener) IndexKeyTypes(org.apache.ignite.internal.cache.query.index.sorted.IndexKeyTypes) Arrays(java.util.Arrays) GridQueryCancel(org.apache.ignite.internal.processors.query.GridQueryCancel) QueryUtils(org.apache.ignite.internal.processors.query.QueryUtils) UpdateMode(org.apache.ignite.internal.processors.query.h2.dml.UpdateMode) MvccUtils.txStart(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.txStart) DateIndexKey(org.apache.ignite.internal.processors.query.h2.index.keys.DateIndexKey) GridH2Table(org.apache.ignite.internal.processors.query.h2.opt.GridH2Table) ResultSet(java.sql.ResultSet) QueryIndexDefinition(org.apache.ignite.internal.processors.query.h2.index.QueryIndexDefinition) GridEmptyCloseableIterator(org.apache.ignite.internal.util.GridEmptyCloseableIterator) QueryContextRegistry(org.apache.ignite.internal.processors.query.h2.opt.QueryContextRegistry) StaticMvccQueryTracker(org.apache.ignite.internal.processors.cache.mvcc.StaticMvccQueryTracker) GridQueryTypeDescriptor(org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) Set(java.util.Set) SqlQueryMXBean(org.apache.ignite.internal.mxbean.SqlQueryMXBean) IgniteClusterReadOnlyException(org.apache.ignite.internal.processors.cache.distributed.dht.IgniteClusterReadOnlyException) ERROR(org.apache.ignite.internal.processors.tracing.SpanTags.ERROR) DataType(org.h2.value.DataType) MTC(org.apache.ignite.internal.processors.tracing.MTC) IGNITE_MVCC_TX_SIZE_CACHING_THRESHOLD(org.apache.ignite.IgniteSystemProperties.IGNITE_MVCC_TX_SIZE_CACHING_THRESHOLD) ClientIndexDefinition(org.apache.ignite.internal.processors.query.h2.index.client.ClientIndexDefinition) Message(org.apache.ignite.plugin.extensions.communication.Message) H2Utils.zeroCursor(org.apache.ignite.internal.processors.query.h2.H2Utils.zeroCursor) ColumnInformation(org.apache.ignite.internal.processors.query.ColumnInformation) GridQueryFieldsResult(org.apache.ignite.internal.processors.query.GridQueryFieldsResult) SQL_SCHEMA(org.apache.ignite.internal.processors.tracing.SpanTags.SQL_SCHEMA) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) Column(org.h2.table.Column) MvccUtils.requestSnapshot(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.requestSnapshot) CacheServerNotFoundException(org.apache.ignite.cache.CacheServerNotFoundException) SQLException(java.sql.SQLException) Session(org.h2.engine.Session) ClusterNode(org.apache.ignite.cluster.ClusterNode) SQL_QRY_TEXT(org.apache.ignite.internal.processors.tracing.SpanTags.SQL_QRY_TEXT) GridDhtPartitionsExchangeFuture(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture) MvccUtils(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils) IndexName(org.apache.ignite.internal.cache.query.index.IndexName) IgniteTxAdapter(org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter) SQL_ITER_OPEN(org.apache.ignite.internal.processors.tracing.SpanType.SQL_ITER_OPEN) ErrorCode(org.h2.api.ErrorCode) DmlUpdateSingleEntryIterator(org.apache.ignite.internal.processors.query.h2.dml.DmlUpdateSingleEntryIterator) GridRunningQueryInfo(org.apache.ignite.internal.processors.query.GridRunningQueryInfo) Marshaller(org.apache.ignite.marshaller.Marshaller) TableType(org.h2.table.TableType) GridH2IndexBase(org.apache.ignite.internal.processors.query.h2.opt.GridH2IndexBase) TimeIndexKey(org.apache.ignite.internal.processors.query.h2.index.keys.TimeIndexKey) GridTopic(org.apache.ignite.internal.GridTopic) PartitionReservationManager(org.apache.ignite.internal.processors.query.h2.twostep.PartitionReservationManager) Statement(java.sql.Statement) IgniteDataStreamer(org.apache.ignite.IgniteDataStreamer) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) SqlFieldsQuery(org.apache.ignite.cache.query.SqlFieldsQuery) H2Utils.session(org.apache.ignite.internal.processors.query.h2.H2Utils.session) SqlQueryMXBeanImpl(org.apache.ignite.internal.mxbean.SqlQueryMXBeanImpl) Index(org.h2.index.Index) CacheObjectValueContext(org.apache.ignite.internal.processors.cache.CacheObjectValueContext) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) TableInformation(org.apache.ignite.internal.processors.query.TableInformation) ClientIndexFactory(org.apache.ignite.internal.processors.query.h2.index.client.ClientIndexFactory) SqlStateCode(org.apache.ignite.internal.processors.odbc.SqlStateCode) RunningQueryManager(org.apache.ignite.internal.processors.query.RunningQueryManager) H2Utils.validateTypeDescriptor(org.apache.ignite.internal.processors.query.h2.H2Utils.validateTypeDescriptor) InlineIndex(org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndex) X(org.apache.ignite.internal.util.typedef.X) GridQueryFailResponse(org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryFailResponse) GridH2DmlResponse(org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2DmlResponse) UpdatePlan(org.apache.ignite.internal.processors.query.h2.dml.UpdatePlan) TEXT(org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.TEXT) IgniteFuture(org.apache.ignite.lang.IgniteFuture) DmlUpdateResultsIterator(org.apache.ignite.internal.processors.query.h2.dml.DmlUpdateResultsIterator) EventType(org.apache.ignite.events.EventType) IndexingQueryFilterImpl(org.apache.ignite.spi.indexing.IndexingQueryFilterImpl) IgniteException(org.apache.ignite.IgniteException) GridSpinBusyLock(org.apache.ignite.internal.util.GridSpinBusyLock) List(java.util.List) JavaObjectSerializer(org.h2.api.JavaObjectSerializer) Math.max(java.lang.Math.max) KeyCacheObject(org.apache.ignite.internal.processors.cache.KeyCacheObject) IgniteSingletonIterator(org.apache.ignite.internal.util.lang.IgniteSingletonIterator) DiscoveryEvent(org.apache.ignite.events.DiscoveryEvent) QueryCursorImpl(org.apache.ignite.internal.processors.cache.QueryCursorImpl) GridH2QueryRequest(org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2QueryRequest) MvccUtils.tx(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.tx) GridQueryCancelRequest(org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQueryCancelRequest) HashMap(java.util.HashMap) IgniteBiClosure(org.apache.ignite.lang.IgniteBiClosure) SQL_DML_QRY_EXECUTE(org.apache.ignite.internal.processors.tracing.SpanType.SQL_DML_QRY_EXECUTE) PartitionExtractor(org.apache.ignite.internal.processors.query.h2.affinity.PartitionExtractor) IndexKeyFactory(org.apache.ignite.internal.cache.query.index.sorted.keys.IndexKeyFactory) IgniteUtils(org.apache.ignite.internal.util.IgniteUtils) CacheException(javax.cache.CacheException) EVT_SQL_QUERY_EXECUTION(org.apache.ignite.events.EventType.EVT_SQL_QUERY_EXECUTION) IgniteInClosure2X(org.apache.ignite.internal.util.lang.IgniteInClosure2X) F(org.apache.ignite.internal.util.typedef.F) Iterator(java.util.Iterator) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) H2TreeIndexBase(org.apache.ignite.internal.processors.query.h2.database.H2TreeIndexBase) GridH2DmlRequest(org.apache.ignite.internal.processors.query.h2.twostep.msg.GridH2DmlRequest) MvccUtils.mvccEnabled(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.mvccEnabled) IgniteQueryErrorCode(org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode) TimeUnit(java.util.concurrent.TimeUnit) H2PartitionResolver(org.apache.ignite.internal.processors.query.h2.affinity.H2PartitionResolver) GridSqlConst(org.apache.ignite.internal.processors.query.h2.sql.GridSqlConst) CacheOperationContext(org.apache.ignite.internal.processors.cache.CacheOperationContext) MvccUtils.checkActive(org.apache.ignite.internal.processors.cache.mvcc.MvccUtils.checkActive) Collections(java.util.Collections) MvccQueryTracker(org.apache.ignite.internal.processors.cache.mvcc.MvccQueryTracker) QueryContext(org.apache.ignite.internal.processors.query.h2.opt.QueryContext) TraceSurroundings(org.apache.ignite.internal.processors.tracing.MTC.TraceSurroundings) ArrayList(java.util.ArrayList) CacheGroupDescriptor(org.apache.ignite.internal.processors.cache.CacheGroupDescriptor) H2Utils.generateFieldsQueryString(org.apache.ignite.internal.processors.query.h2.H2Utils.generateFieldsQueryString) GridQueryTypeDescriptor(org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor) IndexColumn(org.h2.table.IndexColumn) TableInformation(org.apache.ignite.internal.processors.query.TableInformation)

Example 65 with IN

use of org.apache.ignite.internal.processors.query.h2.sql.GridSqlOperationType.IN 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

IgniteCheckedException (org.apache.ignite.IgniteCheckedException)35 ArrayList (java.util.ArrayList)29 IgniteException (org.apache.ignite.IgniteException)26 IgniteSQLException (org.apache.ignite.internal.processors.query.IgniteSQLException)26 SQLException (java.sql.SQLException)21 List (java.util.List)21 GridH2Table (org.apache.ignite.internal.processors.query.h2.opt.GridH2Table)21 GridCacheContext (org.apache.ignite.internal.processors.cache.GridCacheContext)19 CacheException (javax.cache.CacheException)15 QueryCancelledException (org.apache.ignite.cache.query.QueryCancelledException)13 GridH2RowDescriptor (org.apache.ignite.internal.processors.query.h2.opt.GridH2RowDescriptor)13 Column (org.h2.table.Column)13 IgniteH2Indexing (org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing)10 IgniteBiTuple (org.apache.ignite.lang.IgniteBiTuple)10 ResultSet (java.sql.ResultSet)9 HashMap (java.util.HashMap)9 CacheDataRow (org.apache.ignite.internal.processors.cache.persistence.CacheDataRow)9 GridSqlSelect (org.apache.ignite.internal.processors.query.h2.sql.GridSqlSelect)9 PreparedStatement (java.sql.PreparedStatement)8 HashSet (java.util.HashSet)8