Examples of swapFiles()


Examples of voldemort.store.readonly.ReadOnlyStorageEngine.swapFiles()

                                                                            "test-readonly-fetchfiles");

        Utils.mkdirs(new File(storeNode0.getStoreDirPath(), "version-10"));
        File newVersionNode1 = new File(storeNode1.getStoreDirPath(), "version-11");
        Utils.mkdirs(newVersionNode1);
        storeNode1.swapFiles(newVersionNode1.getAbsolutePath());

        // Node 0
        // Test current version
        storesToVersions = getAdminClient().readonlyOps.getROCurrentVersion(0,
                                                                            Lists.newArrayList("test-readonly-fetchfiles"));
View Full Code Here

Examples of voldemort.store.readonly.ReadOnlyStorageEngine.swapFiles()

                                                                   + Long.toString(versionId));
            Utils.mkdirs(newVersionDir);
            generateROFiles(numChunks, indexSize, dataSize, nodeBuckets, newVersionDir);

            // Swap it...
            store.swapFiles(newVersionDir.getAbsolutePath());

            // Check if everything got mmap-ed correctly...
            HashMap<Object, Integer> chunkIdToNumChunks = store.getChunkedFileSet()
                                                               .getChunkIdToNumChunks();
            for(Object bucket: chunkIdToNumChunks.keySet()) {
View Full Code Here

Examples of voldemort.store.readonly.ReadOnlyStorageEngine.swapFiles()

        String currentDirPath = store.getCurrentDirPath();

        logger.info("Swapping RO store '" + storeName + "' to version directory '" + directory
                    + "'");
        store.swapFiles(directory);
        logger.info("Swapping swapped RO store '" + storeName + "' to version directory '"
                    + directory + "'");

        return currentDirPath;
    }
View Full Code Here

Examples of voldemort.store.readonly.ReadOnlyStorageEngine.swapFiles()

        // Retrieve the current directory before swapping it
        String currentDirPath = store.getCurrentDirPath();

        // Swap with the new directory
        store.swapFiles(dir);

        // Send back the previous directory
        resp.getWriter().write(currentDirPath);
    }
View Full Code Here

Examples of voldemort.store.readonly.ReadOnlyStorageEngine.swapFiles()

                    logger.info("Swapping RO store " + storeDef.getName());

                    // Time to swap this store - Could have used admin client,
                    // but why incur the overhead?
                    engine.swapFiles(engine.getCurrentDirPath());

                    // Add to list of stores already swapped
                    if(!useSwappedStoreNames)
                        swappedStoreNames.add(storeDef.getName());
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.