Search in sources :

Example 6 with FilePageStore

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

the class PagesPossibleCorruptionDiagnosticTest method testCorruptedNodeFailsOnStart.

/**
 * Tests that node with corrupted partition fails on start.
 */
@Test
public void testCorruptedNodeFailsOnStart() throws Exception {
    IgniteEx ignite = startGrid(0);
    ignite.cluster().state(ClusterState.ACTIVE);
    IgniteCache<Integer, Integer> cache = ignite.getOrCreateCache(new CacheConfiguration<Integer, Integer>(DEFAULT_CACHE_NAME).setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL).setAffinity(new RendezvousAffinityFunction(false, 1)));
    cache.put(1, 1);
    PartitionUpdateCounter counter = counter(0, DEFAULT_CACHE_NAME, ignite.name());
    counter.update(10, 5);
    forceCheckpoint();
    FilePageStore store = filePageStore(ignite, 0);
    stopAllGrids();
    store.ensure();
    // Index of meta page is always 0.
    int metaPageIdx = 0;
    long offset = store.headerSize() + metaPageIdx * PAGE_SIZE + PART_META_REUSE_LIST_ROOT_OFF;
    writeLongToFileByOffset(store.getFileAbsolutePath(), offset, 0L);
    try {
        startGrid(0);
    } catch (Exception ignored) {
    /* No-op. */
    }
    assertTrue(correctFailure);
}
Also used : IgniteEx(org.apache.ignite.internal.IgniteEx) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) PartitionUpdateCounter(org.apache.ignite.internal.processors.cache.PartitionUpdateCounter) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) CorruptedFreeListException(org.apache.ignite.internal.processors.cache.persistence.freelist.CorruptedFreeListException) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 7 with FilePageStore

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

the class IgniteClusterSnapshotCheckTest method corruptPartitionFile.

/**
 * @param ignite Ignite instance.
 * @param snpName Snapshot name.
 * @param ccfg Cache configuration.
 * @param partId Partition id to corrupt.
 * @throws IgniteCheckedException If fails.
 * @throws IOException If partition file failed to be changed.
 */
private static void corruptPartitionFile(IgniteEx ignite, String snpName, CacheConfiguration<?, ?> ccfg, int partId) throws IgniteCheckedException, IOException {
    Path cachePath = Paths.get(snp(ignite).snapshotLocalDir(snpName).getAbsolutePath(), databaseRelativePath(ignite.context().pdsFolderResolver().resolveFolders().folderName()), cacheDirName(ccfg));
    Path part0 = U.searchFileRecursively(cachePath, getPartitionFileName(partId));
    int grpId = CU.cacheId(ccfg.getName());
    try (FilePageStore pageStore = (FilePageStore) ((FilePageStoreManager) ignite.context().cache().context().pageStore()).getPageStoreFactory(grpId, ignite.context().cache().isEncrypted(grpId)).createPageStore(getTypeByPartId(partId), () -> part0, val -> {
    })) {
        ByteBuffer buff = ByteBuffer.allocateDirect(ignite.configuration().getDataStorageConfiguration().getPageSize()).order(ByteOrder.nativeOrder());
        pageStore.read(0, buff, false);
        pageStore.beginRecover();
        PageIO.setCrc(buff, 1);
        buff.flip();
        pageStore.write(PageIO.getPageId(buff), buff, 0, false);
        pageStore.finishRecover();
    }
}
Also used : Path(java.nio.file.Path) IgniteSnapshotManager.databaseRelativePath(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.databaseRelativePath) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) Arrays(java.util.Arrays) PartitionHashRecordV2(org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2) Random(java.util.Random) IgniteEx(org.apache.ignite.internal.IgniteEx) CacheObjectBinaryProcessorImpl.binaryWorkDir(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.binaryWorkDir) ByteBuffer(java.nio.ByteBuffer) RendezvousAffinityFunction(org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction) Collections.singletonList(java.util.Collections.singletonList) PagePartitionMetaIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PagePartitionMetaIO) Map(java.util.Map) X(org.apache.ignite.internal.util.typedef.X) Path(java.nio.file.Path) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) Parameterized(org.junit.runners.Parameterized) SNAPSHOT_METAFILE_EXT(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.SNAPSHOT_METAFILE_EXT) IgniteDataIntegrityViolationException(org.apache.ignite.internal.processors.cache.persistence.wal.crc.IgniteDataIntegrityViolationException) BinaryContext(org.apache.ignite.internal.binary.BinaryContext) Collection(java.util.Collection) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) IgniteException(org.apache.ignite.IgniteException) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) MarshallerContextImpl.mappingFileStoreWorkDir(org.apache.ignite.internal.MarshallerContextImpl.mappingFileStoreWorkDir) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) UUID(java.util.UUID) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) ByteOrder(java.nio.ByteOrder) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) PartitionKeyV2(org.apache.ignite.internal.processors.cache.verify.PartitionKeyV2) GridJobExecuteRequest(org.apache.ignite.internal.GridJobExecuteRequest) CU(org.apache.ignite.internal.util.typedef.internal.CU) BinaryObjectImpl(org.apache.ignite.internal.binary.BinaryObjectImpl) IdleVerifyResultV2(org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2) FilePageStoreManager.getPartitionFileName(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getPartitionFileName) GridCacheEntryEx(org.apache.ignite.internal.processors.cache.GridCacheEntryEx) FilePageStoreManager.cacheDirName(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.cacheDirName) DR_NONE(org.apache.ignite.internal.processors.dr.GridDrType.DR_NONE) GridCacheAdapter(org.apache.ignite.internal.processors.cache.GridCacheAdapter) GridTestUtils.waitForCondition(org.apache.ignite.testframework.GridTestUtils.waitForCondition) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) PdsFolderSettings(org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings) GridCacheVersion(org.apache.ignite.internal.processors.cache.version.GridCacheVersion) U(org.apache.ignite.internal.util.typedef.internal.U) IgniteSnapshotManager.databaseRelativePath(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager.databaseRelativePath) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) ComputeJobResult(org.apache.ignite.compute.ComputeJobResult) PageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO) CheckpointListener(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener) GridTestUtils.assertNotContains(org.apache.ignite.testframework.GridTestUtils.assertNotContains) GridMessageListener(org.apache.ignite.internal.managers.communication.GridMessageListener) VerifyBackupPartitionsTaskV2(org.apache.ignite.internal.processors.cache.verify.VerifyBackupPartitionsTaskV2) Before(org.junit.Before) ACTIVE(org.apache.ignite.cluster.ClusterState.ACTIVE) F(org.apache.ignite.internal.util.typedef.F) VisorIdleVerifyTaskArg(org.apache.ignite.internal.visor.verify.VisorIdleVerifyTaskArg) Files(java.nio.file.Files) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) GridUnsafe(org.apache.ignite.internal.util.GridUnsafe) DFLT_SNAPSHOT_DIRECTORY(org.apache.ignite.configuration.IgniteConfiguration.DFLT_SNAPSHOT_DIRECTORY) TTL_ETERNAL(org.apache.ignite.internal.processors.cache.GridCacheUtils.TTL_ETERNAL) IOException(java.io.IOException) Test(org.junit.Test) File(java.io.File) CacheObjectBinaryProcessorImpl(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl) GridIterator(org.apache.ignite.internal.util.lang.GridIterator) GridTestUtils.assertContains(org.apache.ignite.testframework.GridTestUtils.assertContains) NONE(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) GridTopic(org.apache.ignite.internal.GridTopic) Paths(java.nio.file.Paths) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) CacheFilterEnum(org.apache.ignite.internal.visor.verify.CacheFilterEnum) GroupPartitionId.getTypeByPartId(org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId.getTypeByPartId) Collections(java.util.Collections) TxState(org.apache.ignite.internal.processors.cache.mvcc.txlog.TxState) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) ByteBuffer(java.nio.ByteBuffer)

Example 8 with FilePageStore

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

the class IgnitePdsRecoveryAfterFileCorruptionTest method eraseDataFromDisk.

/**
 * @param pageStore Page store.
 * @param cacheId Cache id.
 * @param page Page.
 */
private void eraseDataFromDisk(FilePageStoreManager pageStore, int cacheId, FullPageId page) throws IgniteCheckedException, IOException {
    PageStore store = pageStore.getStore(cacheId, PageIdUtils.partId(page.pageId()));
    FilePageStore filePageStore = (FilePageStore) store;
    FileIO fileIO = U.field(filePageStore, "fileIO");
    long size = fileIO.size();
    fileIO.writeFully(ByteBuffer.allocate((int) size - filePageStore.headerSize()), filePageStore.headerSize());
    fileIO.force();
}
Also used : PageStore(org.apache.ignite.internal.pagemem.store.PageStore) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FileIO(org.apache.ignite.internal.processors.cache.persistence.file.FileIO)

Example 9 with FilePageStore

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

the class IgnitePdsTaskCancelingTest method testFilePageStoreInterruptThreads.

/**
 * Test FilePageStore with multiple interrupted threads.
 */
@Test
public void testFilePageStoreInterruptThreads() throws Exception {
    failure.set(false);
    FileIOFactory factory = new RandomAccessFileIOFactory();
    File file = new File(U.defaultWorkDirectory(), "file.bin");
    file.deleteOnExit();
    DataStorageConfiguration dbCfg = getDataStorageConfiguration();
    FilePageStore pageStore = new FilePageStore(PageMemory.FLAG_DATA, file::toPath, factory, dbCfg.getPageSize(), val -> {
    });
    int pageSize = dbCfg.getPageSize();
    PageIO pageIO = PageIO.getPageIO(PageIO.T_DATA, 1);
    long ptr = GridUnsafe.allocateMemory(NUM_TASKS * pageSize);
    try {
        List<Thread> threadList = new ArrayList<>(NUM_TASKS);
        AtomicBoolean stopThreads = new AtomicBoolean(false);
        for (int i = 0; i < NUM_TASKS; i++) {
            long pageId = PageIdUtils.pageId(0, PageMemory.FLAG_DATA, (int) pageStore.allocatePage());
            long pageAdr = ptr + i * pageSize;
            pageIO.initNewPage(pageAdr, pageId, pageSize, null);
            ByteBuffer buf = GridUnsafe.wrapPointer(pageAdr, pageSize);
            pageStore.write(pageId, buf, 0, true);
            threadList.add(new Thread(new Runnable() {

                @Override
                public void run() {
                    Random random = new Random();
                    while (!stopThreads.get()) {
                        buf.position(0);
                        try {
                            if (random.nextBoolean()) {
                                log.info(">>> Read page " + U.hexLong(pageId));
                                pageStore.read(pageId, buf, false);
                            } else {
                                log.info(">>> Write page " + U.hexLong(pageId));
                                pageStore.write(pageId, buf, 0, true);
                            }
                            Thread.interrupted();
                        } catch (Exception e) {
                            log.error("Error while reading/writing page", e);
                            failure.set(true);
                        }
                    }
                }
            }));
        }
        for (Thread thread : threadList) thread.start();
        for (int i = 0; i < 10; i++) {
            for (Thread thread : threadList) {
                doSleep(10L);
                log.info("Interrupting " + thread.getName());
                thread.interrupt();
            }
        }
        stopThreads.set(true);
        for (Thread thread : threadList) thread.join();
        assertFalse(failure.get());
    } finally {
        GridUnsafe.freeMemory(ptr);
    }
}
Also used : FileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory) RandomAccessFileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory) ArrayList(java.util.ArrayList) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) ByteBuffer(java.nio.ByteBuffer) IOException(java.io.IOException) DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Random(java.util.Random) IgniteRunnable(org.apache.ignite.lang.IgniteRunnable) File(java.io.File) RandomAccessFileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory) PageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Example 10 with FilePageStore

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

the class IgniteSnapshotManager method partitionRowIterator.

/**
 * @param snpName Snapshot name.
 * @param folderName The node folder name, usually it's the same as the U.maskForFileName(consistentId).
 * @param grpName Cache group name.
 * @param partId Partition id.
 * @return Iterator over partition.
 * @throws IgniteCheckedException If and error occurs.
 */
public GridCloseableIterator<CacheDataRow> partitionRowIterator(GridKernalContext ctx, String snpName, String folderName, String grpName, int partId) throws IgniteCheckedException {
    File snpDir = resolveSnapshotDir(snpName);
    File nodePath = new File(snpDir, databaseRelativePath(folderName));
    if (!nodePath.exists())
        throw new IgniteCheckedException("Consistent id directory doesn't exists: " + nodePath.getAbsolutePath());
    List<File> grps = cacheDirectories(nodePath, name -> name.equals(grpName));
    if (F.isEmpty(grps)) {
        throw new IgniteCheckedException("The snapshot cache group not found [dir=" + snpDir.getAbsolutePath() + ", grpName=" + grpName + ']');
    }
    if (grps.size() > 1) {
        throw new IgniteCheckedException("The snapshot cache group directory cannot be uniquely identified [dir=" + snpDir.getAbsolutePath() + ", grpName=" + grpName + ']');
    }
    File snpPart = getPartitionFile(new File(snapshotLocalDir(snpName), databaseRelativePath(folderName)), grps.get(0).getName(), partId);
    int grpId = CU.cacheId(grpName);
    FilePageStore pageStore = (FilePageStore) storeMgr.getPageStoreFactory(grpId, cctx.cache().isEncrypted(grpId)).createPageStore(getTypeByPartId(partId), snpPart::toPath, val -> {
    });
    GridCloseableIterator<CacheDataRow> partIter = partitionRowIterator(ctx, grpName, partId, pageStore);
    return new GridCloseableIteratorAdapter<CacheDataRow>() {

        /**
         * {@inheritDoc}
         */
        @Override
        protected CacheDataRow onNext() throws IgniteCheckedException {
            return partIter.nextX();
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected boolean onHasNext() throws IgniteCheckedException {
            return partIter.hasNextX();
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected void onClose() {
            U.closeQuiet(pageStore);
        }
    };
}
Also used : MappedName(org.apache.ignite.internal.processors.marshaller.MappedName) EVT_CLUSTER_SNAPSHOT_FINISHED(org.apache.ignite.events.EventType.EVT_CLUSTER_SNAPSHOT_FINISHED) BufferedInputStream(java.io.BufferedInputStream) GridFinishedFuture(org.apache.ignite.internal.util.future.GridFinishedFuture) MetastorageLifecycleListener(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetastorageLifecycleListener) CacheObjectBinaryProcessorImpl.binaryWorkDir(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.binaryWorkDir) ReadOnlyMetastorage(org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadOnlyMetastorage) FileIO(org.apache.ignite.internal.processors.cache.persistence.file.FileIO) METASTORAGE_CACHE_ID(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_ID) Map(java.util.Map) TransmissionHandler(org.apache.ignite.internal.managers.communication.TransmissionHandler) Path(java.nio.file.Path) GridToStringExclude(org.apache.ignite.internal.util.tostring.GridToStringExclude) CacheGroupDescriptor(org.apache.ignite.internal.processors.cache.CacheGroupDescriptor) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) Serializable(java.io.Serializable) ByteOrder(java.nio.ByteOrder) FileVisitResult(java.nio.file.FileVisitResult) SnapshotEvent(org.apache.ignite.events.SnapshotEvent) END_SNAPSHOT(org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.END_SNAPSHOT) IgniteFutureImpl(org.apache.ignite.internal.util.future.IgniteFutureImpl) U(org.apache.ignite.internal.util.typedef.internal.U) EVT_DISCOVERY_CUSTOM_EVT(org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT) IgniteLogger(org.apache.ignite.IgniteLogger) EVT_CLUSTER_SNAPSHOT_STARTED(org.apache.ignite.events.EventType.EVT_CLUSTER_SNAPSHOT_STARTED) PageIO.getVersion(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO.getVersion) ReadWriteMetastorage(org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadWriteMetastorage) S(org.apache.ignite.internal.util.typedef.internal.S) METASTORAGE_CACHE_NAME(org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME) GridInternal(org.apache.ignite.internal.processors.task.GridInternal) A(org.apache.ignite.internal.util.typedef.internal.A) MarshallerContextImpl.resolveMappingFileStoreWorkDir(org.apache.ignite.internal.MarshallerContextImpl.resolveMappingFileStoreWorkDir) IOException(java.io.IOException) MetricRegistry(org.apache.ignite.internal.processors.metric.MetricRegistry) T2(org.apache.ignite.internal.util.typedef.T2) BinaryType(org.apache.ignite.binary.BinaryType) GridCacheSharedContext(org.apache.ignite.internal.processors.cache.GridCacheSharedContext) StandaloneGridKernalContext(org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneGridKernalContext) BROADCAST(org.apache.ignite.internal.GridClosureCallMode.BROADCAST) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) DFLT_BINARY_METADATA_PATH(org.apache.ignite.configuration.DataStorageConfiguration.DFLT_BINARY_METADATA_PATH) GroupPartitionId.getTypeByPartId(org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId.getTypeByPartId) PageIdUtils.flag(org.apache.ignite.internal.pagemem.PageIdUtils.flag) CacheObjectContext(org.apache.ignite.internal.processors.cache.CacheObjectContext) START_SNAPSHOT(org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.START_SNAPSHOT) IgniteInternalFuture(org.apache.ignite.internal.IgniteInternalFuture) DiscoveryCustomEvent(org.apache.ignite.internal.events.DiscoveryCustomEvent) PageIdUtils.pageId(org.apache.ignite.internal.pagemem.PageIdUtils.pageId) PageIdUtils.toDetailString(org.apache.ignite.internal.pagemem.PageIdUtils.toDetailString) PageStore(org.apache.ignite.internal.pagemem.store.PageStore) IgniteFeatures.nodeSupports(org.apache.ignite.internal.IgniteFeatures.nodeSupports) BiFunction(java.util.function.BiFunction) SYSTEM_POOL(org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SimpleFileVisitor(java.nio.file.SimpleFileVisitor) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) MarshallerContextImpl.mappingFileStoreWorkDir(org.apache.ignite.internal.MarshallerContextImpl.mappingFileStoreWorkDir) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) Nullable(org.jetbrains.annotations.Nullable) FastCrc(org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc) InitMessage(org.apache.ignite.internal.util.distributed.InitMessage) FilePageStoreManager.cacheDirectories(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.cacheDirectories) CU(org.apache.ignite.internal.util.typedef.internal.CU) Queue(java.util.Queue) FilePageStoreManager.getPartitionFile(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getPartitionFile) MarshallerUtils(org.apache.ignite.marshaller.MarshallerUtils) DataPagePayload(org.apache.ignite.internal.processors.cache.persistence.tree.io.DataPagePayload) SnapshotViewWalker(org.apache.ignite.internal.managers.systemview.walker.SnapshotViewWalker) IgniteFeatures(org.apache.ignite.internal.IgniteFeatures) Function(java.util.function.Function) ConcurrentMap(java.util.concurrent.ConcurrentMap) HashSet(java.util.HashSet) SnapshotView(org.apache.ignite.spi.systemview.view.SnapshotView) GridUnsafe.bufferAddress(org.apache.ignite.internal.util.GridUnsafe.bufferAddress) DFLT_MARSHALLER_PATH(org.apache.ignite.configuration.DataStorageConfiguration.DFLT_MARSHALLER_PATH) LinkedList(java.util.LinkedList) NoSuchElementException(java.util.NoSuchElementException) ExecutorService(java.util.concurrent.ExecutorService) TC_SUBGRID(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID) GridMessageListener(org.apache.ignite.internal.managers.communication.GridMessageListener) GroupPartitionId(org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId) FileInputStream(java.io.FileInputStream) BasicFileAttributes(java.nio.file.attribute.BasicFileAttributes) ConcurrentLinkedDeque(java.util.concurrent.ConcurrentLinkedDeque) GridCloseableIterator(org.apache.ignite.internal.util.lang.GridCloseableIterator) Consumer(java.util.function.Consumer) PartitionsExchangeAware(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.PartitionsExchangeAware) DiscoveryDataClusterState(org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState) DataPageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.DataPageIO) GridPlainRunnable(org.apache.ignite.internal.util.lang.GridPlainRunnable) BitSet(java.util.BitSet) FileChannel(java.nio.channels.FileChannel) IgniteSnapshot(org.apache.ignite.IgniteSnapshot) TransmissionMeta(org.apache.ignite.internal.managers.communication.TransmissionMeta) GridClosureException(org.apache.ignite.internal.util.lang.GridClosureException) Arrays(java.util.Arrays) CacheType(org.apache.ignite.internal.processors.cache.CacheType) GridFutureAdapter(org.apache.ignite.internal.util.future.GridFutureAdapter) EVT_NODE_LEFT(org.apache.ignite.events.EventType.EVT_NODE_LEFT) MAX_PARTITION_ID(org.apache.ignite.internal.pagemem.PageIdAllocator.MAX_PARTITION_ID) BooleanSupplier(java.util.function.BooleanSupplier) DirectoryStream(java.nio.file.DirectoryStream) GridCloseableIteratorAdapter(org.apache.ignite.internal.util.GridCloseableIteratorAdapter) MarshallerContextImpl.saveMappings(org.apache.ignite.internal.MarshallerContextImpl.saveMappings) ComputeTask(org.apache.ignite.compute.ComputeTask) T_DATA(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO.T_DATA) DataRow(org.apache.ignite.internal.processors.cache.tree.DataRow) PERSISTENCE_CACHE_SNAPSHOT(org.apache.ignite.internal.IgniteFeatures.PERSISTENCE_CACHE_SNAPSHOT) RandomAccessFileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.RandomAccessFileIOFactory) EnumMap(java.util.EnumMap) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) Set(java.util.Set) IgniteInstanceResource(org.apache.ignite.resources.IgniteInstanceResource) GridBusyLock(org.apache.ignite.internal.util.GridBusyLock) TransmissionCancelledException(org.apache.ignite.internal.managers.communication.TransmissionCancelledException) CacheDataRowAdapter(org.apache.ignite.internal.processors.cache.persistence.CacheDataRowAdapter) PageIO.getType(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO.getType) INDEX_PARTITION(org.apache.ignite.internal.pagemem.PageIdAllocator.INDEX_PARTITION) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) PageIdUtils.pageIndex(org.apache.ignite.internal.pagemem.PageIdUtils.pageIndex) GridCompoundFuture(org.apache.ignite.internal.util.future.GridCompoundFuture) IgniteUtils.isLocalNodeCoordinator(org.apache.ignite.internal.util.IgniteUtils.isLocalNodeCoordinator) CacheObjectBinaryProcessorImpl.resolveBinaryWorkDir(org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.resolveBinaryWorkDir) BufferedOutputStream(java.io.BufferedOutputStream) ArrayList(java.util.ArrayList) GridKernalContext(org.apache.ignite.internal.GridKernalContext) READ(java.nio.file.StandardOpenOption.READ) ClusterNode(org.apache.ignite.cluster.ClusterNode) DB_DEFAULT_FOLDER(org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderResolver.DB_DEFAULT_FOLDER) GridDhtPartitionsExchangeFuture(org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture) BiConsumer(java.util.function.BiConsumer) IgniteInterruptedException(org.apache.ignite.IgniteInterruptedException) Files(java.nio.file.Files) Executor(java.util.concurrent.Executor) TC_SKIP_AUTH(org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SKIP_AUTH) FileOutputStream(java.io.FileOutputStream) Marshaller(org.apache.ignite.marshaller.Marshaller) File(java.io.File) GridTopic(org.apache.ignite.internal.GridTopic) Paths(java.nio.file.Paths) IgniteFinishedFutureImpl(org.apache.ignite.internal.util.future.IgniteFinishedFutureImpl) SNAPSHOT_SYS_VIEW(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW) ArrayDeque(java.util.ArrayDeque) IgniteUuid(org.apache.ignite.lang.IgniteUuid) FLAG_DATA(org.apache.ignite.internal.pagemem.PageIdAllocator.FLAG_DATA) IgniteEx(org.apache.ignite.internal.IgniteEx) IgniteChangeGlobalStateSupport(org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport) ByteBuffer(java.nio.ByteBuffer) IgniteFutureCancelledCheckedException(org.apache.ignite.internal.IgniteFutureCancelledCheckedException) SNAPSHOT_SYS_VIEW_DESC(org.apache.ignite.spi.systemview.view.SnapshotView.SNAPSHOT_SYS_VIEW_DESC) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) IgniteFuture(org.apache.ignite.lang.IgniteFuture) PART_FILE_TEMPLATE(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.PART_FILE_TEMPLATE) FailureType(org.apache.ignite.failure.FailureType) IgniteClientDisconnectedCheckedException(org.apache.ignite.internal.IgniteClientDisconnectedCheckedException) Predicate(java.util.function.Predicate) IgniteException(org.apache.ignite.IgniteException) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) GridCacheSharedManagerAdapter(org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter) List(java.util.List) EVT_NODE_FAILED(org.apache.ignite.events.EventType.EVT_NODE_FAILED) DiscoveryEventListener(org.apache.ignite.internal.managers.eventstorage.DiscoveryEventListener) IdleVerifyResultV2(org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2) FilePageStoreManager.getPartitionFileName(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getPartitionFileName) NodeStoppingException(org.apache.ignite.internal.NodeStoppingException) DiscoveryEvent(org.apache.ignite.events.DiscoveryEvent) PdsFolderSettings(org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderSettings) HashMap(java.util.HashMap) GridIoManager(org.apache.ignite.internal.managers.communication.GridIoManager) Deque(java.util.Deque) EVT_CLUSTER_SNAPSHOT_FAILED(org.apache.ignite.events.EventType.EVT_CLUSTER_SNAPSHOT_FAILED) IgniteCallable(org.apache.ignite.lang.IgniteCallable) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) FailureContext(org.apache.ignite.failure.FailureContext) FileIOFactory(org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory) BALANCE(org.apache.ignite.internal.GridClosureCallMode.BALANCE) PageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO) IgniteThrowableFunction(org.apache.ignite.internal.util.lang.IgniteThrowableFunction) DistributedMetaStorageImpl(org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageImpl) OutputStream(java.io.OutputStream) DistributedProcess(org.apache.ignite.internal.util.distributed.DistributedProcess) F(org.apache.ignite.internal.util.typedef.F) PageIO.getPageIO(org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO.getPageIO) AffinityTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ClusterTopologyCheckedException(org.apache.ignite.internal.cluster.ClusterTopologyCheckedException) TransmissionPolicy(org.apache.ignite.internal.managers.communication.TransmissionPolicy) ADMIN_SNAPSHOT(org.apache.ignite.plugin.security.SecurityPermission.ADMIN_SNAPSHOT) INDEX_FILE_NAME(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.INDEX_FILE_NAME) Collections(java.util.Collections) InputStream(java.io.InputStream) CacheDataRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow) IgniteCheckedException(org.apache.ignite.IgniteCheckedException) GridCloseableIteratorAdapter(org.apache.ignite.internal.util.GridCloseableIteratorAdapter) FilePageStore(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore) FilePageStoreManager.getPartitionFile(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.getPartitionFile) File(java.io.File)

Aggregations

FilePageStore (org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore)16 File (java.io.File)11 ByteBuffer (java.nio.ByteBuffer)11 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)10 ArrayList (java.util.ArrayList)9 IgniteException (org.apache.ignite.IgniteException)8 FilePageStoreManager (org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager)8 IOException (java.io.IOException)7 HashMap (java.util.HashMap)7 List (java.util.List)7 Map (java.util.Map)7 PageIO (org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO)7 Collections (java.util.Collections)6 HashSet (java.util.HashSet)6 Set (java.util.Set)6 IgniteEx (org.apache.ignite.internal.IgniteEx)6 PagePartitionMetaIO (org.apache.ignite.internal.processors.cache.persistence.tree.io.PagePartitionMetaIO)6 F (org.apache.ignite.internal.util.typedef.F)6 Path (java.nio.file.Path)5 Arrays (java.util.Arrays)5