Search in sources :

Example 1 with PagesListViewWalker

use of org.apache.ignite.internal.managers.systemview.walker.PagesListViewWalker in project ignite by apache.

the class IgniteCacheDatabaseSharedManager method start0.

/**
 * {@inheritDoc}
 */
@Override
protected void start0() throws IgniteCheckedException {
    if (cctx.kernalContext().clientNode() && cctx.kernalContext().config().getDataStorageConfiguration() == null)
        return;
    DataStorageConfiguration memCfg = cctx.kernalContext().config().getDataStorageConfiguration();
    assert memCfg != null;
    validateConfiguration(memCfg);
    pageSize = memCfg.getPageSize();
    initDataRegions(memCfg);
    cctx.kernalContext().systemView().registerView(DATA_REGION_PAGE_LIST_VIEW, DATA_REGION_PAGE_LIST_VIEW_DESC, new PagesListViewWalker(), () -> {
        Map<String, CacheFreeList> freeLists = freeListMap;
        if (freeLists == null)
            return Collections.emptyList();
        return freeLists.values().stream().flatMap(fl -> IntStream.range(0, fl.bucketsCount()).mapToObj(bucket -> new PagesListView(fl, bucket))).collect(Collectors.toList());
    }, Function.identity());
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) NoOpPageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.NoOpPageEvictionTracker) Arrays(java.util.Arrays) TimeBag(org.apache.ignite.internal.util.TimeBag) IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE(org.apache.ignite.IgniteSystemProperties.IGNITE_THRESHOLD_WAL_ARCHIVE_SIZE_PERCENTAGE) MetastorageLifecycleListener(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetastorageLifecycleListener) IgniteChangeGlobalStateSupport(org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport) WALPointer(org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer) IgniteSystemProperties(org.apache.ignite.IgniteSystemProperties) UnsafeMemoryProvider(org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider) DataRegionMetricsProvider(org.apache.ignite.DataRegionMetricsProvider) Map(java.util.Map) Objects.isNull(java.util.Objects.isNull) AbstractFreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.AbstractFreeList) IgniteKernal(org.apache.ignite.internal.IgniteKernal) HALF_MAX_WAL_ARCHIVE_SIZE(org.apache.ignite.configuration.DataStorageConfiguration.HALF_MAX_WAL_ARCHIVE_SIZE) FailureType(org.apache.ignite.failure.FailureType) ReuseList(org.apache.ignite.internal.processors.cache.persistence.tree.reuse.ReuseList) IgniteInClosure(org.apache.ignite.lang.IgniteInClosure) PageIdAllocator(org.apache.ignite.internal.pagemem.PageIdAllocator) IgniteOutClosure(org.apache.ignite.lang.IgniteOutClosure) DFLT_PAGE_SIZE(org.apache.ignite.configuration.DataStorageConfiguration.DFLT_PAGE_SIZE) Collection(java.util.Collection) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) MetaStorage(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage) DirectMemoryProvider(org.apache.ignite.internal.mem.DirectMemoryProvider) CheckpointMarkersStorage(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointMarkersStorage) Collectors(java.util.stream.Collectors) VOLATILE_DATA_REGION_NAME(org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.VOLATILE_DATA_REGION_NAME) GridCacheSharedManagerAdapter(org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter) WarmUpConfiguration(org.apache.ignite.configuration.WarmUpConfiguration) IgniteBiTuple(org.apache.ignite.lang.IgniteBiTuple) DataRegionMetrics(org.apache.ignite.DataRegionMetrics) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CU(org.apache.ignite.internal.util.typedef.internal.CU) DataRegionMetricsMXBean(org.apache.ignite.mxbean.DataRegionMetricsMXBean) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView) IgniteOutOfMemoryException(org.apache.ignite.internal.mem.IgniteOutOfMemoryException) MappedFileMemoryProvider(org.apache.ignite.internal.mem.file.MappedFileMemoryProvider) GridCacheContext(org.apache.ignite.internal.processors.cache.GridCacheContext) Objects.nonNull(java.util.Objects.nonNull) PageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.PageEvictionTracker) CacheFreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList) METASTORE_DATA_REGION_NAME(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.METASTORE_DATA_REGION_NAME) IntStream(java.util.stream.IntStream) FreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.FreeList) CheckpointProgress(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointProgress) PdsFolderSettings(org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteLogger(org.apache.ignite.IgniteLogger) PageMemory(org.apache.ignite.internal.pagemem.PageMemory) IgniteSystemProperties.getDouble(org.apache.ignite.IgniteSystemProperties.getDouble) Function(java.util.function.Function) Supplier(java.util.function.Supplier) DirectMemoryRegion(org.apache.ignite.internal.mem.DirectMemoryRegion) CacheGroupContext(org.apache.ignite.internal.processors.cache.CacheGroupContext) LT(org.apache.ignite.internal.util.typedef.internal.LT) PageMemoryNoStoreImpl(org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl) IGNITE_REUSE_MEMORY_ON_DEACTIVATE(org.apache.ignite.IgniteSystemProperties.IGNITE_REUSE_MEMORY_ON_DEACTIVATE) GridKernalContext(org.apache.ignite.internal.GridKernalContext) HashSet(java.util.HashSet) PagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.PagesListViewWalker) RandomLruPageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.RandomLruPageEvictionTracker) FailureContext(org.apache.ignite.failure.FailureContext) DFLT_DATA_REG_DEFAULT_NAME(org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME) IgniteClosure(org.apache.ignite.lang.IgniteClosure) GridDhtPartitionsExchangeFuture(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture) PageReadWriteManager(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageReadWriteManager) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) InstanceNotFoundException(javax.management.InstanceNotFoundException) GridDiscoveryManager(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager) DataStorageMetrics(org.apache.ignite.DataStorageMetrics) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) DataPageEvictionMode(org.apache.ignite.configuration.DataPageEvictionMode) UNLIMITED_WAL_ARCHIVE(org.apache.ignite.configuration.DataStorageConfiguration.UNLIMITED_WAL_ARCHIVE) WarmUpStrategy(org.apache.ignite.internal.processors.cache.warmup.WarmUpStrategy) File(java.io.File) T2(org.apache.ignite.internal.util.typedef.T2) TX_LOG_CACHE_NAME(org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog.TX_LOG_CACHE_NAME) Random2LruPageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.Random2LruPageEvictionTracker) Collections(java.util.Collections) FairFifoPageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.FairFifoPageEvictionTracker) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) PagesListViewWalker(org.apache.ignite.internal.managers.systemview.walker.PagesListViewWalker) CacheFreeList(org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList) PagesListView(org.apache.ignite.spi.systemview.view.PagesListView)

Aggregations

File (java.io.File)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Objects.isNull (java.util.Objects.isNull)1 Objects.nonNull (java.util.Objects.nonNull)1 Set (java.util.Set)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Function (java.util.function.Function)1 Supplier (java.util.function.Supplier)1 Collectors (java.util.stream.Collectors)1 IntStream (java.util.stream.IntStream)1 InstanceNotFoundException (javax.management.InstanceNotFoundException)1 DataRegionMetrics (org.apache.ignite.DataRegionMetrics)1 DataRegionMetricsProvider (org.apache.ignite.DataRegionMetricsProvider)1 DataStorageMetrics (org.apache.ignite.DataStorageMetrics)1 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1