Search in sources :

Example 1 with RowStore

use of org.apache.ignite.internal.processors.cache.persistence.RowStore in project ignite by apache.

the class GridCacheProcessor method pagesListViewSupplier.

/**
 * Pages list view supplier.
 *
 * @param filter Filter.
 */
private Iterable<CachePagesListView> pagesListViewSupplier(Map<String, Object> filter) {
    Integer cacheGrpId = (Integer) filter.get(CachePagesListViewWalker.CACHE_GROUP_ID_FILTER);
    Integer partId = (Integer) filter.get(CachePagesListViewWalker.PARTITION_ID_FILTER);
    Integer bucketNum = (Integer) filter.get(CachePagesListViewWalker.BUCKET_NUMBER_FILTER);
    Iterable<IgniteCacheOffheapManager.CacheDataStore> dataStores = F.flat(F.iterator(filteredMap(cacheGrps, cacheGrpId).values(), grp -> grp.offheap().cacheDataStores(), true));
    return F.flat(F.iterator(dataStores, dataStore -> {
        RowStore rowStore = dataStore.rowStore();
        if (rowStore == null || !(dataStore instanceof GridCacheOffheapManager.GridCacheDataStore))
            return Collections.emptySet();
        PagesList pagesList = (PagesList) rowStore.freeList();
        if (bucketNum != null) {
            return bucketNum >= 0 && bucketNum < pagesList.bucketsCount() ? Collections.singleton(new CachePagesListView(pagesList, bucketNum, dataStore.partId())) : Collections.emptyList();
        }
        return IntStream.range(0, pagesList.bucketsCount()).mapToObj(bucket -> new CachePagesListView(pagesList, bucket, dataStore.partId())).collect(toList());
    }, true, cacheDataStore -> partId == null || cacheDataStore.partId() == partId));
}
Also used : SchemaAbstractDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) ValidationOnNodeJoinUtils.validateHashIdResolvers(org.apache.ignite.internal.processors.cache.ValidationOnNodeJoinUtils.validateHashIdResolvers) GridCacheUtils.isPersistentCache(org.apache.ignite.internal.processors.cache.GridCacheUtils.isPersistentCache) MetastorageLifecycleListener(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetastorageLifecycleListener) ReadOnlyMetastorage(org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadOnlyMetastorage) PagesList(org.apache.ignite.internal.processors.cache.persistence.freelist.PagesList) GridDhtAtomicCache(org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) AffinityFunction(org.apache.ignite.cache.affinity.AffinityFunction) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) AffinityFunctionContext(org.apache.ignite.cache.affinity.AffinityFunctionContext) GridIoPolicy(org.apache.ignite.internal.managers.communication.GridIoPolicy) Objects.isNull(java.util.Objects.isNull) CacheStore(org.apache.ignite.cache.store.CacheStore) InitializationProtector(org.apache.ignite.internal.util.InitializationProtector) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) ChangeGlobalStateFinishMessage(org.apache.ignite.internal.processors.cluster.ChangeGlobalStateFinishMessage) CountDownLatch(java.util.concurrent.CountDownLatch) SnapshotDiscoveryMessage(org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotDiscoveryMessage) EternalExpiryPolicy(javax.cache.expiry.EternalExpiryPolicy) RowStore(org.apache.ignite.internal.processors.cache.persistence.RowStore) Stream(java.util.stream.Stream) IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK(org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK) IgniteWriteAheadLogManager(org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager) SecurityUtils.remoteSecurityContext(org.apache.ignite.internal.processors.security.SecurityUtils.remoteSecurityContext) IoStatisticsType(org.apache.ignite.internal.metric.IoStatisticsType) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteOutClosureX(org.apache.ignite.internal.util.lang.IgniteOutClosureX) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission) IgniteDiscoverySpi(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) F0(org.apache.ignite.internal.util.F0) S(org.apache.ignite.internal.util.typedef.internal.S) GridCacheDistributedQueryManager(org.apache.ignite.internal.processors.cache.query.GridCacheDistributedQueryManager) PartitionStateViewWalker(org.apache.ignite.internal.managers.systemview.walker.PartitionStateViewWalker) A(org.apache.ignite.internal.util.typedef.internal.A) MetricRegistry(org.apache.ignite.internal.processors.metric.MetricRegistry) T3(org.apache.ignite.internal.util.typedef.T3) T2(org.apache.ignite.internal.util.typedef.T2) REPLICATED(org.apache.ignite.cache.CacheMode.REPLICATED) CacheJtaManagerAdapter(org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter) GridDiscoveryData(org.apache.ignite.spi.discovery.DiscoveryDataBag.GridDiscoveryData) TreeMap(java.util.TreeMap) GridCacheLocalQueryManager(org.apache.ignite.internal.processors.cache.query.GridCacheLocalQueryManager) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) CacheGroupIoViewWalker(org.apache.ignite.internal.managers.systemview.walker.CacheGroupIoViewWalker) IgniteCacheSnapshotManager(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteCacheSnapshotManager) GridPerformanceSuggestions(org.apache.ignite.internal.suggestions.GridPerformanceSuggestions) GridDhtCache(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCache) DatabaseLifecycleListener(org.apache.ignite.internal.processors.cache.persistence.DatabaseLifecycleListener) CacheMode(org.apache.ignite.cache.CacheMode) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) IgniteSystemProperties.getBoolean(org.apache.ignite.IgniteSystemProperties.getBoolean) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion) SortedSet(java.util.SortedSet) ListIterator(java.util.ListIterator) GridCacheQueryManager(org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager) PartitionDefferedDeleteQueueCleanupTask(org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionDefferedDeleteQueueCleanupTask) SchemaExchangeWorkerTask(org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask) StopCachesOnClientReconnectExchangeTask(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.StopCachesOnClientReconnectExchangeTask) QueryEntity(org.apache.ignite.cache.QueryEntity) PartitionsEvictManager(org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager) IgniteMBeanAware(org.apache.ignite.mxbean.IgniteMBeanAware) IgniteOutClosure(org.apache.ignite.lang.IgniteOutClosure) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) MetaStorage(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) WarmUpConfiguration(org.apache.ignite.configuration.WarmUpConfiguration) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) Nullable(org.jetbrains.annotations.Nullable) DataStructuresProcessor(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor) CU(org.apache.ignite.internal.util.typedef.internal.CU) Objects.nonNull(java.util.Objects.nonNull) IntStream(java.util.stream.IntStream) FileWriteAheadLogManager(org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager) MarshallerUtils(org.apache.ignite.marshaller.MarshallerUtils) GridNearTransactionalCache(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) IgniteFeatures(org.apache.ignite.internal.IgniteFeatures) Function(java.util.function.Function) NearCacheConfiguration(org.apache.ignite.configuration.NearCacheConfiguration) ConcurrentMap(java.util.concurrent.ConcurrentMap) HashSet(java.util.HashSet) SchemaNodeLeaveExchangeWorkerTask(org.apache.ignite.internal.processors.query.schema.SchemaNodeLeaveExchangeWorkerTask) IgniteClosure(org.apache.ignite.lang.IgniteClosure) IgnitePredicate(org.apache.ignite.lang.IgnitePredicate) MBeanServer(javax.management.MBeanServer) Collectors.mapping(java.util.stream.Collectors.mapping) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) PlatformCacheManager(org.apache.ignite.internal.processors.platform.cache.PlatformCacheManager) IgniteSecurity(org.apache.ignite.internal.processors.security.IgniteSecurity) ExecutorService(java.util.concurrent.ExecutorService) SHARED(org.apache.ignite.configuration.DeploymentMode.SHARED) JTA(org.apache.ignite.internal.IgniteComponentType.JTA) GridLocalAtomicCache(org.apache.ignite.internal.processors.cache.local.atomic.GridLocalAtomicCache) GroupPartitionId(org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId) QuerySchemaPatch(org.apache.ignite.internal.processors.query.QuerySchemaPatch) GridAffinityAssignmentCache(org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache) GridPlainClosure2(org.apache.ignite.internal.util.lang.GridPlainClosure2) Collectors.toList(java.util.stream.Collectors.toList) DiscoveryDataClusterState(org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState) StringJoiner(java.util.StringJoiner) IgniteTransactionsEx(org.apache.ignite.internal.IgniteTransactionsEx) ATOMIC(org.apache.ignite.cache.CacheAtomicityMode.ATOMIC) Comparator(java.util.Comparator) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) QueryUtils(org.apache.ignite.internal.processors.query.QueryUtils) SYNC(org.apache.ignite.cache.CacheRebalanceMode.SYNC) IgniteCacheObjectProcessor(org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor) GridCacheUtils.isNearEnabled(org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearEnabled) DeadlockDetectionManager(org.apache.ignite.internal.processors.cache.mvcc.DeadlockDetectionManager) GridDhtColocatedCache(org.apache.ignite.internal.processors.cache.distributed.dht.colocated.GridDhtColocatedCache) ReuseList(org.apache.ignite.internal.processors.cache.persistence.tree.reuse.ReuseList) FinishPreloadingTask(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.FinishPreloadingTask) QuerySchema(org.apache.ignite.internal.processors.query.QuerySchema) LOCAL(org.apache.ignite.cache.CacheMode.LOCAL) BinaryContext(org.apache.ignite.internal.binary.BinaryContext) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) Set(java.util.Set) IgniteCollectors(org.apache.ignite.internal.util.IgniteCollectors) IgniteClusterReadOnlyException(org.apache.ignite.internal.processors.cache.distributed.dht.IgniteClusterReadOnlyException) IgnitePageStoreManager(org.apache.ignite.internal.pagemem.store.IgnitePageStoreManager) FreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.FreeList) ClusterState(org.apache.ignite.cluster.ClusterState) Collectors.groupingBy(java.util.stream.Collectors.groupingBy) GridCompoundFuture(org.apache.ignite.internal.util.future.GridCompoundFuture) TreeSet(java.util.TreeSet) GridBinaryMarshaller(org.apache.ignite.internal.binary.GridBinaryMarshaller) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) GridCacheOffheapManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager) IgniteTransactionsImpl(org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl) ClusterNode(org.apache.ignite.cluster.ClusterNode) DiscoveryCustomMessage(org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage) IgniteInterruptedException(org.apache.ignite.IgniteInterruptedException) IgniteInterruptedCheckedException(org.apache.ignite.internal.IgniteInterruptedCheckedException) CheckpointListener(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener) CacheStoreManager(org.apache.ignite.internal.processors.cache.store.CacheStoreManager) IgniteTxManager(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager) GridCacheDrManager(org.apache.ignite.internal.processors.cache.dr.GridCacheDrManager) ExpiryPolicy(javax.cache.expiry.ExpiryPolicy) AtomicLongFieldUpdater(java.util.concurrent.atomic.AtomicLongFieldUpdater) IgniteSnapshotManager(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager) CacheGroupIoView(org.apache.ignite.spi.systemview.view.CacheGroupIoView) Marshaller(org.apache.ignite.marshaller.Marshaller) WarmUpStrategy(org.apache.ignite.internal.processors.cache.warmup.WarmUpStrategy) DetachedClusterNode(org.apache.ignite.internal.cluster.DetachedClusterNode) GridDhtCacheAdapter(org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter) GridCacheVersionManager(org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager) CachePluginManager(org.apache.ignite.internal.processors.plugin.CachePluginManager) CACHE_PROC(org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType.CACHE_PROC) CachePagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.CachePagesListViewWalker) GridProcessorAdapter(org.apache.ignite.internal.processors.GridProcessorAdapter) GridLocalCache(org.apache.ignite.internal.processors.cache.local.GridLocalCache) IgniteUuid(org.apache.ignite.lang.IgniteUuid) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) LifecycleAware(org.apache.ignite.lifecycle.LifecycleAware) DiscoveryDataBag(org.apache.ignite.spi.discovery.DiscoveryDataBag) JoiningNodeDiscoveryData(org.apache.ignite.spi.discovery.DiscoveryDataBag.JoiningNodeDiscoveryData) CacheGroupMetricsMXBean(org.apache.ignite.mxbean.CacheGroupMetricsMXBean) CacheContinuousQueryManager(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager) TRANSACTIONAL_SNAPSHOT(org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT) CacheStoreSessionListener(org.apache.ignite.cache.store.CacheStoreSessionListener) DFLT_CACHE_REMOVE_ENTRIES_TTL(org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition.DFLT_CACHE_REMOVE_ENTRIES_TTL) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) X(org.apache.ignite.internal.util.typedef.X) DeploymentMode(org.apache.ignite.configuration.DeploymentMode) PARTITIONED(org.apache.ignite.cache.CacheMode.PARTITIONED) SecurityException(org.apache.ignite.plugin.security.SecurityException) MetricUtils.metricName(org.apache.ignite.internal.processors.metric.impl.MetricUtils.metricName) MvccCachingManager(org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager) Collectors.toSet(java.util.stream.Collectors.toSet) IgniteFuture(org.apache.ignite.lang.IgniteFuture) IdentityHashMap(java.util.IdentityHashMap) IgniteClientDisconnectedCheckedException(org.apache.ignite.internal.IgniteClientDisconnectedCheckedException) EventType(org.apache.ignite.events.EventType) PartitionStateView(org.apache.ignite.spi.systemview.view.PartitionStateView) IgniteException(org.apache.ignite.IgniteException) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) String.format(java.lang.String.format) GridNearAtomicCache(org.apache.ignite.internal.processors.cache.distributed.near.GridNearAtomicCache) List(java.util.List) IGNITE_CACHE_REMOVED_ENTRIES_TTL(org.apache.ignite.IgniteSystemProperties.IGNITE_CACHE_REMOVED_ENTRIES_TTL) Optional(java.util.Optional) NotNull(org.jetbrains.annotations.NotNull) HashMap(java.util.HashMap) CONTINUOUS(org.apache.ignite.configuration.DeploymentMode.CONTINUOUS) CacheExistsException(org.apache.ignite.cache.CacheExistsException) AtomicReference(java.util.concurrent.atomic.AtomicReference) CacheDataStructuresManager(org.apache.ignite.internal.processors.cache.datastructures.CacheDataStructuresManager) IgniteNodeValidationResult(org.apache.ignite.spi.IgniteNodeValidationResult) IgniteUtils.doInParallel(org.apache.ignite.internal.util.IgniteUtils.doInParallel) CacheException(javax.cache.CacheException) IgniteThrowableFunction(org.apache.ignite.internal.util.lang.IgniteThrowableFunction) F(org.apache.ignite.internal.util.typedef.F) SchemaProposeDiscoveryMessage(org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage) Iterator(java.util.Iterator) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) FULL_SYNC(org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC) CacheObjectBinaryProcessorImpl(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl) GridToStringInclude(org.apache.ignite.internal.util.tostring.GridToStringInclude) TimeUnit(java.util.concurrent.TimeUnit) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager) ChangeGlobalStateMessage(org.apache.ignite.internal.processors.cluster.ChangeGlobalStateMessage) Collections(java.util.Collections) CachePagesListView(org.apache.ignite.spi.systemview.view.CachePagesListView) PagesList(org.apache.ignite.internal.processors.cache.persistence.freelist.PagesList) RowStore(org.apache.ignite.internal.processors.cache.persistence.RowStore)

Aggregations

String.format (java.lang.String.format)1 ArrayList (java.util.ArrayList)1 Arrays.asList (java.util.Arrays.asList)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 IdentityHashMap (java.util.IdentityHashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 ListIterator (java.util.ListIterator)1 Map (java.util.Map)1 Objects.isNull (java.util.Objects.isNull)1 Objects.nonNull (java.util.Objects.nonNull)1 Optional (java.util.Optional)1 Set (java.util.Set)1 SortedSet (java.util.SortedSet)1 StringJoiner (java.util.StringJoiner)1 TreeMap (java.util.TreeMap)1